LCOV - code coverage report
Current view: top level - svx/source/inc - datanavi.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 80 0.0 %
Date: 2014-04-11 Functions: 0 50 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 INCLUDED_SVX_SOURCE_INC_DATANAVI_HXX
      20             : #define INCLUDED_SVX_SOURCE_INC_DATANAVI_HXX
      21             : 
      22             : #include <vcl/dialog.hxx>
      23             : #include <vcl/fixed.hxx>
      24             : #include <vcl/layout.hxx>
      25             : #include <vcl/lstbox.hxx>
      26             : #include <vcl/menubtn.hxx>
      27             : #include <vcl/msgbox.hxx>
      28             : #include <vcl/tabctrl.hxx>
      29             : #include <vcl/tabpage.hxx>
      30             : #include <vcl/toolbox.hxx>
      31             : #include <svtools/inettbc.hxx>
      32             : #include <svtools/simptabl.hxx>
      33             : #include <svtools/svmedit.hxx>
      34             : #include <svtools/treelistbox.hxx>
      35             : #include <sfx2/dockwin.hxx>
      36             : #include <sfx2/childwin.hxx>
      37             : #include <sfx2/ctrlitem.hxx>
      38             : #include <svx/dialmgr.hxx>
      39             : #include <svx/fmresids.hrc>
      40             : #include <svx/svxdllapi.h>
      41             : #include <rtl/ref.hxx>
      42             : #include <com/sun/star/beans/XPropertySet.hpp>
      43             : #include <com/sun/star/container/XContainer.hpp>
      44             : #include <com/sun/star/container/XNameContainer.hpp>
      45             : #include <com/sun/star/frame/XFrame.hpp>
      46             : #include <com/sun/star/xforms/XFormsUIHelper1.hpp>
      47             : #include <com/sun/star/xforms/XModel.hpp>
      48             : #include <com/sun/star/xforms/XSubmission.hpp>
      49             : #include <com/sun/star/xml/dom/XNode.hpp>
      50             : #include <com/sun/star/xml/dom/events/XEventTarget.hpp>
      51             : 
      52             : #include "datalistener.hxx"
      53             : #include <vector>
      54             : 
      55             : // forward ---------------------------------------------------------------
      56             : 
      57             : class FmFormShell;
      58             : 
      59             : 
      60             : 
      61             : namespace svxform
      62             : {
      63             : 
      64             : 
      65             :     enum DataGroupType
      66             :     {
      67             :         DGTUnknown = 0,
      68             :         DGTInstance,
      69             :         DGTSubmission,
      70             :         DGTBinding
      71             :     };
      72             : 
      73             :     enum DataItemType
      74             :     {
      75             :         DITNone = 0,
      76             :         DITText,
      77             :         DITAttribute,
      78             :         DITElement,
      79             :         DITBinding
      80             :     };
      81             : 
      82             :     struct ItemNode;
      83             :     class XFormsPage;
      84             :     class DataNavigatorWindow;
      85             :     class AddInstanceDialog;
      86             : 
      87             :     typedef ::com::sun::star::uno::Reference<
      88             :                 ::com::sun::star::xforms::XFormsUIHelper1 >         XFormsUIHelper1_ref;
      89             :     typedef ::com::sun::star::uno::Reference<
      90             :                 ::com::sun::star::xml::dom::XNode >                 XNode_ref;
      91             :     typedef ::com::sun::star::uno::Reference<
      92             :                 ::com::sun::star::beans::XPropertySet >             XPropertySet_ref;
      93             :     typedef ::com::sun::star::uno::Reference<
      94             :                 ::com::sun::star::xforms::XModel >                  XModel_ref;
      95             :     typedef ::com::sun::star::uno::Reference<
      96             :                 ::com::sun::star::container::XContainer >           XContainer_ref;
      97             :     typedef ::com::sun::star::uno::Reference<
      98             :                 ::com::sun::star::container::XNameContainer >       XNameContainer_ref;
      99             :     typedef ::com::sun::star::uno::Reference<
     100             :                 ::com::sun::star::frame::XFrame >                   XFrame_ref;
     101             :     typedef ::com::sun::star::uno::Reference<
     102             :                 ::com::sun::star::frame::XModel >                   XFrameModel_ref;
     103             :     typedef ::com::sun::star::uno::Reference<
     104             :                 ::com::sun::star::xml::dom::events::XEventTarget >  XEventTarget_ref;
     105             :     typedef ::com::sun::star::uno::Reference<
     106             :                 ::com::sun::star::xforms::XSubmission >             XSubmission_ref;
     107             : 
     108             :     typedef ::com::sun::star::uno::Sequence<
     109             :                 ::com::sun::star::beans::PropertyValue >            PropertyValue_seq;
     110             : 
     111             :     typedef std::vector< XContainer_ref >                           ContainerList;
     112             :     typedef std::vector< XEventTarget_ref >                         EventTargetList;
     113             : 
     114             : 
     115             :     class DataTreeListBox : public SvTreeListBox
     116             :     {
     117             :     private:
     118             :         XFormsPage*             m_pXFormsPage;
     119             :         DataGroupType           m_eGroup;
     120             : 
     121             :     protected:
     122             :         using SvTreeListBox::ExecuteDrop;
     123             : 
     124             :     public:
     125             :         DataTreeListBox( XFormsPage* pPage, DataGroupType _eGroup, const ResId& rResId );
     126             :         virtual ~DataTreeListBox();
     127             : 
     128             :         virtual PopupMenu*      CreateContextMenu( void ) SAL_OVERRIDE;
     129             :         virtual void            ExcecuteContextMenuAction( sal_uInt16 _nSelectedPopupEntry ) SAL_OVERRIDE;
     130             :         virtual sal_Int8        AcceptDrop( const AcceptDropEvent& rEvt ) SAL_OVERRIDE;
     131             :         virtual sal_Int8        ExecuteDrop( const ExecuteDropEvent& rEvt ) SAL_OVERRIDE;
     132             :         virtual void            StartDrag( sal_Int8 nAction, const Point& rPosPixel ) SAL_OVERRIDE;
     133             : 
     134             :         void                    DeleteAndClear();
     135             :         void                    RemoveEntry( SvTreeListEntry* _pEntry );
     136             :     };
     137             : 
     138           0 :     class ReplaceString
     139             :     {
     140             :         OUString m_sDoc_UI;
     141             :         OUString m_sInstance_UI;
     142             :         OUString m_sNone_UI;
     143             : 
     144             :         OUString m_sDoc_API;
     145             :         OUString m_sInstance_API;
     146             :         OUString m_sNone_API;
     147             : 
     148             :         ReplaceString( const ReplaceString& );
     149             : 
     150             :     public:
     151           0 :         ReplaceString() :
     152             :             m_sDoc_API(      "all" ),
     153             :             m_sInstance_API( "instance" ),
     154           0 :             m_sNone_API(     "none" )
     155             :         {
     156           0 :             m_sDoc_UI = SVX_RESSTR(RID_STR_REPLACE_DOC);
     157           0 :             m_sInstance_UI = SVX_RESSTR(RID_STR_REPLACE_INST);
     158           0 :             m_sNone_UI = SVX_RESSTR(RID_STR_REPLACE_NONE);
     159           0 :         }
     160             : 
     161             :         /** convert submission replace string from API value to UI value.
     162             :             Use 'none' as default. */
     163           0 :         OUString toUI( const OUString& rStr ) const
     164             :         {
     165           0 :             if( rStr == m_sDoc_API )
     166           0 :                 return m_sDoc_UI;
     167           0 :             else if( rStr == m_sInstance_API )
     168           0 :                 return m_sInstance_UI;
     169             :             else
     170           0 :                 return m_sNone_UI;
     171             :         }
     172             : 
     173             :         /** convert submission replace string from UI to API.
     174             :             Use 'none' as default. */
     175           0 :         OUString toAPI( const OUString& rStr ) const
     176             :         {
     177           0 :             if( rStr == m_sDoc_UI )
     178           0 :                 return m_sDoc_API;
     179           0 :             else if( rStr == m_sInstance_UI )
     180           0 :                 return m_sInstance_API;
     181             :             else
     182           0 :                 return m_sNone_API;
     183             :         }
     184             :     };
     185             : 
     186           0 :     class MethodString
     187             :     {
     188             :         OUString m_sPost_UI;
     189             :         OUString m_sPut_UI;
     190             :         OUString m_sGet_UI;
     191             : 
     192             :         OUString m_sPost_API;
     193             :         OUString m_sPut_API;
     194             :         OUString m_sGet_API;
     195             : 
     196             :         MethodString( const MethodString& );
     197             : 
     198             :     public:
     199             : 
     200           0 :         MethodString() :
     201             :             m_sPost_API( "post" ),
     202             :             m_sPut_API(  "put" ),
     203           0 :             m_sGet_API(  "get" )
     204             :         {
     205           0 :             m_sPost_UI = SVX_RESSTR(RID_STR_METHOD_POST);
     206           0 :             m_sPut_UI  = SVX_RESSTR(RID_STR_METHOD_PUT);
     207           0 :             m_sGet_UI  = SVX_RESSTR(RID_STR_METHOD_GET);
     208           0 :         }
     209             : 
     210             :         /** convert from API to UI; put is default. */
     211           0 :         OUString toUI( const OUString& rStr ) const
     212             :         {
     213           0 :             if( rStr == m_sGet_API )
     214           0 :                 return m_sGet_UI;
     215           0 :             else if( rStr == m_sPost_API )
     216           0 :                 return m_sPost_UI;
     217             :             else
     218           0 :                 return m_sPut_UI;
     219             :         }
     220             : 
     221             :         /** convert from UI to API; put is default */
     222           0 :         OUString toAPI( const OUString& rStr ) const
     223             :         {
     224           0 :             if( rStr == m_sGet_UI )
     225           0 :                 return m_sGet_API;
     226           0 :             else if( rStr == m_sPost_UI )
     227           0 :                 return m_sPost_API;
     228             :             else
     229           0 :                 return m_sPut_API;
     230             :         }
     231             :     };
     232             : 
     233             : 
     234             :     class XFormsPage : public TabPage
     235             :     {
     236             :     private:
     237             :         MethodString                m_aMethodString;
     238             :         ReplaceString               m_aReplaceString;
     239             : 
     240             :         ToolBox                     m_aToolBox;
     241             :         DataTreeListBox             m_aItemList;
     242             : 
     243             :         XFormsUIHelper1_ref         m_xUIHelper;
     244             : 
     245             :         DataNavigatorWindow*        m_pNaviWin;
     246             :         bool                        m_bHasModel;
     247             :         DataGroupType               m_eGroup;
     248             :         ImageList                   m_TbxImageList;
     249             :         // these strings are not valid on the Submission and Binding Page
     250             :         // mb: furthermore these are properties of an instance, thus
     251             :         // it would be much better to get/set them through the UIHelper
     252             :         // interface.
     253             :         OUString                    m_sInstanceName;
     254             :         OUString                    m_sInstanceURL;
     255             :         bool                        m_bLinkOnce;
     256             : 
     257             :         DECL_LINK(TbxSelectHdl, void *);
     258             :         DECL_LINK(ItemSelectHdl, void *);
     259             : 
     260             :         void                        AddChildren( SvTreeListEntry* _pParent,
     261             :                                                  const ImageList& _rImgLst,
     262             :                                                  const XNode_ref& _xNode );
     263             :         bool                        DoToolBoxAction( sal_uInt16 _nToolBoxID );
     264             :         SvTreeListEntry*                AddEntry( ItemNode* _pNewNode, bool _bIsElement );
     265             :         SvTreeListEntry*                AddEntry( const XPropertySet_ref& _rPropSet );
     266             :         void                        EditEntry( const XPropertySet_ref& _rPropSet );
     267             :         bool                        RemoveEntry();
     268             : 
     269             :     protected:
     270             :         virtual bool                Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     271             : 
     272             :     public:
     273             :         XFormsPage( Window* pParent, DataNavigatorWindow* _pNaviWin, DataGroupType _eGroup );
     274             :         virtual ~XFormsPage();
     275             : 
     276             :         virtual void                Resize() SAL_OVERRIDE;
     277             : 
     278           0 :         inline bool                 HasModel() const { return m_bHasModel; }
     279             :         OUString                    SetModel( const XModel_ref& _xModel, sal_uInt16 _nPagePos );
     280             :         void                        ClearModel();
     281             :         OUString                    LoadInstance( const PropertyValue_seq& _xPropSeq,
     282             :                                                   const ImageList& _rImgLst );
     283             : 
     284             :         bool                        DoMenuAction( sal_uInt16 _nMenuID );
     285             :         void                        EnableMenuItems( Menu* _pMenu );
     286             : 
     287             :         inline SvTreeListEntry*     GetSelectedItem() const { return m_aItemList.FirstSelected(); }
     288           0 :         inline const OUString&      GetInstanceName() const { return m_sInstanceName; }
     289           0 :         inline const OUString&      GetInstanceURL() const { return m_sInstanceURL; }
     290           0 :         inline bool                 GetLinkOnce() const { return m_bLinkOnce; }
     291           0 :         inline void                 SetInstanceName( const OUString &name ) { m_sInstanceName=name; }
     292           0 :         inline void                 SetInstanceURL( const OUString &url ) { m_sInstanceURL=url; }
     293           0 :         inline void                 SetLinkOnce( bool bLinkOnce ) { m_bLinkOnce=bLinkOnce; }
     294             : 
     295             :         typedef com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> XPropertySet_t;
     296             :         typedef com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode> XNode_t;
     297             : 
     298           0 :         inline XPropertySet_t GetBindingForNode( const XNode_t &xNode ) { return m_xUIHelper->getBindingForNode(xNode,true); }
     299           0 :         inline OUString GetServiceNameForNode( const XNode_t &xNode ) { return m_xUIHelper->getDefaultServiceNameForNode(xNode); }
     300           0 :         inline XFormsUIHelper1_ref GetXFormsHelper( void ) const { return m_xUIHelper; }
     301             :     };
     302             : 
     303             : 
     304             : 
     305             :     typedef std::vector< XFormsPage* >          PageList;
     306             :     typedef ::rtl::Reference < DataListener >   DataListener_ref;
     307             : 
     308             :     class DataNavigatorWindow : public Window
     309             :     {
     310             :     private:
     311             : 
     312             :         ListBox                     m_aModelsBox;
     313             :         MenuButton                  m_aModelBtn;
     314             :         TabControl                  m_aTabCtrl;
     315             :         MenuButton                  m_aInstanceBtn;
     316             : 
     317             :         XFormsPage*                 m_pInstPage;
     318             :         XFormsPage*                 m_pSubmissionPage;
     319             :         XFormsPage*                 m_pBindingPage;
     320             : 
     321             :         long                        m_nMinWidth;
     322             :         long                        m_nMinHeight;
     323             :         long                        m_nBorderHeight;
     324             :         sal_Int32                   m_nLastSelectedPos;
     325             :         bool                        m_bShowDetails;
     326             :         bool                        m_bIsNotifyDisabled;
     327             :         Size                        m_a2Size;
     328             :         Size                        m_a3Size;
     329             :         ImageList                   m_aItemImageList;
     330             :         PageList                    m_aPageList;
     331             :         ContainerList               m_aContainerList;
     332             :         EventTargetList             m_aEventTargetList;
     333             :         Timer                       m_aUpdateTimer;
     334             : 
     335             :         DataListener_ref            m_xDataListener;
     336             :         XNameContainer_ref          m_xDataContainer;
     337             :         XFrame_ref                  m_xFrame;
     338             :         XFrameModel_ref             m_xFrameModel;
     339             : 
     340             :         DECL_LINK(                  ModelSelectHdl, ListBox * );
     341             :         DECL_LINK(                  MenuSelectHdl, MenuButton * );
     342             :         DECL_LINK(                  MenuActivateHdl, MenuButton * );
     343             :         DECL_LINK(ActivatePageHdl, void *);
     344             :         DECL_LINK(UpdateHdl, void *);
     345             : 
     346             :         XFormsPage*                 GetCurrentPage( sal_uInt16& rCurId );
     347             :         void                        LoadModels();
     348             :         void                        SetPageModel();
     349             :         void                        ClearAllPageModels( bool bClearPages );
     350             :         void                        InitPages();
     351             :         void                        CreateInstancePage( const PropertyValue_seq& _xPropSeq );
     352             :         bool                        HasFirstInstancePage() const;
     353             :         sal_uInt16                      GetNewPageId() const;
     354             : 
     355             :     protected:
     356             :         virtual void                Resize() SAL_OVERRIDE;
     357             : 
     358             :     public:
     359             :         DataNavigatorWindow( Window* pParent, SfxBindings* pBindings );
     360             :         virtual ~DataNavigatorWindow();
     361             : 
     362             :         void                        SetDocModified();
     363             :         void                        NotifyChanges( bool _bLoadAll = false );
     364             :         void                        AddContainerBroadcaster( const XContainer_ref& xContainer );
     365             :         void                        AddEventBroadcaster( const XEventTarget_ref& xTarget );
     366             :         void                        RemoveBroadcaster();
     367             : 
     368           0 :         inline const ImageList&     GetItemImageList() const { return m_aItemImageList; }
     369           0 :         inline bool                 IsShowDetails() const { return m_bShowDetails; }
     370           0 :         inline void                 DisableNotify( bool _bDisable ) { m_bIsNotifyDisabled = _bDisable; }
     371             :     };
     372             : 
     373             : 
     374             :     class DataNavigator : public SfxDockingWindow, public SfxControllerItem
     375             :     {
     376             :     private:
     377             :         DataNavigatorWindow         m_aDataWin;
     378             : 
     379             :     protected:
     380             :         virtual void                Resize() SAL_OVERRIDE;
     381             :         virtual bool            Close() SAL_OVERRIDE;
     382             :         virtual void                GetFocus() SAL_OVERRIDE;
     383             :         virtual Size                CalcDockingSize( SfxChildAlignment ) SAL_OVERRIDE;
     384             :         virtual SfxChildAlignment   CheckAlignment( SfxChildAlignment, SfxChildAlignment ) SAL_OVERRIDE;
     385             : 
     386             :     public:
     387             :         DataNavigator( SfxBindings* pBindings, SfxChildWindow* pMgr, Window* pParent );
     388             :         virtual ~DataNavigator();
     389             : 
     390             :         using Window::Update;
     391             :         using                       SfxDockingWindow::StateChanged;
     392             : 
     393             :         void                        Update( FmFormShell* pFormShell );
     394             :         void                        StateChanged( sal_uInt16 nSID, SfxItemState eState,
     395             :                                                   const SfxPoolItem* pState ) SAL_OVERRIDE;
     396             :     };
     397             : 
     398             : 
     399           0 :     class SVX_DLLPUBLIC DataNavigatorManager : public SfxChildWindow
     400             :     {
     401             :     public:
     402             :         SVX_DLLPRIVATE DataNavigatorManager( Window* pParent, sal_uInt16 nId,
     403             :                               SfxBindings* pBindings, SfxChildWinInfo* pInfo );
     404             :         SFX_DECL_CHILDWINDOW( DataNavigatorManager );
     405             :     };
     406             : 
     407             : 
     408             :     class AddDataItemDialog : public ModalDialog
     409             :     {
     410             :     private:
     411             : 
     412             :         VclFrame*           m_pItemFrame;
     413             :         FixedText*          m_pNameFT;
     414             :         Edit*               m_pNameED;
     415             :         FixedText*          m_pDefaultFT;
     416             :         Edit*               m_pDefaultED;
     417             :         PushButton*         m_pDefaultBtn;
     418             : 
     419             :         VclFrame*           m_pSettingsFrame;
     420             : 
     421             :         FixedText*          m_pDataTypeFT;
     422             :         ListBox*            m_pDataTypeLB;
     423             : 
     424             :         CheckBox*           m_pRequiredCB;
     425             :         PushButton*         m_pRequiredBtn;
     426             :         CheckBox*           m_pRelevantCB;
     427             :         PushButton*         m_pRelevantBtn;
     428             :         CheckBox*           m_pConstraintCB;
     429             :         PushButton*         m_pConstraintBtn;
     430             :         CheckBox*           m_pReadonlyCB;
     431             :         PushButton*         m_pReadonlyBtn;
     432             :         CheckBox*           m_pCalculateCB;
     433             :         PushButton*         m_pCalculateBtn;
     434             : 
     435             :         OKButton*           m_pOKBtn;
     436             : 
     437             :         XFormsUIHelper1_ref m_xUIHelper;
     438             :         XPropertySet_ref    m_xBinding;
     439             :         XPropertySet_ref    m_xTempBinding;
     440             : 
     441             :         ItemNode*           m_pItemNode;
     442             :         DataItemType        m_eItemType;
     443             :         OUString            m_sFL_Element;
     444             :         OUString            m_sFL_Attribute;
     445             :         OUString            m_sFL_Binding;
     446             :         OUString            m_sFT_BindingExp;
     447             : 
     448             :         DECL_LINK(          CheckHdl, CheckBox * );
     449             :         DECL_LINK(          ConditionHdl, PushButton * );
     450             :         DECL_LINK(OKHdl, void *);
     451             : 
     452             :         void                InitDialog();
     453             :         void                InitFromNode();
     454             :         void                InitDataTypeBox();
     455             : 
     456             :     public:
     457             :         AddDataItemDialog(
     458             :             Window* pParent, ItemNode* _pNode, const XFormsUIHelper1_ref& _rUIHelper );
     459             :         virtual ~AddDataItemDialog();
     460             : 
     461             :         void                InitText( DataItemType _eType );
     462             :     };
     463             : 
     464             : 
     465           0 :     class AddConditionDialog : public ModalDialog
     466             :     {
     467             :     private:
     468             :         VclMultiLineEdit*       m_pConditionED;
     469             :         VclMultiLineEdit*       m_pResultWin;
     470             :         PushButton*             m_pEditNamespacesBtn;
     471             :         OKButton*               m_pOKBtn;
     472             : 
     473             :         Timer                   m_aResultTimer;
     474             :         OUString         m_sPropertyName;
     475             : 
     476             :         XFormsUIHelper1_ref     m_xUIHelper;
     477             :         XPropertySet_ref        m_xBinding;
     478             : 
     479             :         DECL_LINK(ModifyHdl, void *);
     480             :         DECL_LINK(ResultHdl, void *);
     481             :         DECL_LINK(EditHdl, void *);
     482             :         DECL_LINK(OKHdl, void *);
     483             : 
     484             :     public:
     485             :         AddConditionDialog(Window* pParent,
     486             :             const OUString& _rPropertyName, const XPropertySet_ref& _rBinding);
     487             : 
     488           0 :         XFormsUIHelper1_ref GetUIHelper() const { return m_xUIHelper; }
     489           0 :         OUString GetCondition() const { return m_pConditionED->GetText(); }
     490           0 :         void SetCondition(const OUString& _rCondition)
     491             :         {
     492           0 :             m_pConditionED->SetText(_rCondition);
     493           0 :             m_aResultTimer.Start();
     494           0 :         }
     495             :     };
     496             : 
     497             : 
     498             :     class NamespaceItemDialog : public ModalDialog
     499             :     {
     500             :     private:
     501             :         typedef std::vector< OUString > PrefixList;
     502             : 
     503             :         SvSimpleTable*      m_pNamespacesList;
     504             :         PushButton*         m_pAddNamespaceBtn;
     505             :         PushButton*         m_pEditNamespaceBtn;
     506             :         PushButton*         m_pDeleteNamespaceBtn;
     507             :         OKButton*           m_pOKBtn;
     508             : 
     509             :         AddConditionDialog* m_pConditionDlg;
     510             :         PrefixList          m_aRemovedList;
     511             : 
     512             :         XNameContainer_ref& m_rNamespaces;
     513             : 
     514             :         DECL_LINK(          SelectHdl, SvSimpleTable * );
     515             :         DECL_LINK(          ClickHdl, PushButton * );
     516             :         DECL_LINK(OKHdl, void *);
     517             : 
     518             :         void                LoadNamespaces();
     519             : 
     520             :     public:
     521             :         NamespaceItemDialog( AddConditionDialog* pParent, XNameContainer_ref& _rContainer );
     522             :         virtual ~NamespaceItemDialog();
     523             :     };
     524             : 
     525             : 
     526           0 :     class ManageNamespaceDialog : public ModalDialog
     527             :     {
     528             :     private:
     529             :         Edit*               m_pPrefixED;
     530             :         Edit*               m_pUrlED;
     531             :         OKButton*           m_pOKBtn;
     532             : 
     533             :         AddConditionDialog* m_pConditionDlg;
     534             : 
     535             :         DECL_LINK(OKHdl, void *);
     536             : 
     537             :     public:
     538             :         ManageNamespaceDialog(Window* pParent, AddConditionDialog* _pCondDlg, bool bIsEdit);
     539             : 
     540           0 :         void SetNamespace(const OUString& _rPrefix, const OUString& _rURL)
     541             :         {
     542           0 :             m_pPrefixED->SetText( _rPrefix );
     543           0 :             m_pUrlED->SetText( _rURL );
     544           0 :         }
     545           0 :         OUString GetPrefix() const { return m_pPrefixED->GetText(); }
     546           0 :         OUString GetURL() const { return m_pUrlED->GetText(); }
     547             :     };
     548             : 
     549             : 
     550             :     class AddSubmissionDialog : public ModalDialog
     551             :     {
     552             :     private:
     553             :         MethodString        m_aMethodString;
     554             :         ReplaceString       m_aReplaceString;
     555             : 
     556             :         Edit*               m_pNameED;
     557             :         Edit*               m_pActionED;
     558             :         ListBox*            m_pMethodLB;
     559             :         Edit*               m_pRefED;
     560             :         PushButton*         m_pRefBtn;
     561             :         ListBox*            m_pBindLB;
     562             :         ListBox*            m_pReplaceLB;
     563             : 
     564             :         OKButton*           m_pOKBtn;
     565             : 
     566             :         ItemNode*           m_pItemNode;
     567             : 
     568             :         XFormsUIHelper1_ref m_xUIHelper;
     569             :         XSubmission_ref     m_xNewSubmission;
     570             :         XPropertySet_ref    m_xSubmission;
     571             :         XPropertySet_ref    m_xTempBinding;
     572             :         XPropertySet_ref    m_xCreatedBinding;
     573             : 
     574             :         DECL_LINK(RefHdl, void *);
     575             :         DECL_LINK(OKHdl, void *);
     576             : 
     577             :         void                FillAllBoxes();
     578             : 
     579             :     public:
     580             :         AddSubmissionDialog( Window* pParent, ItemNode* _pNode,
     581             :             const XFormsUIHelper1_ref& _rUIHelper );
     582             :         virtual ~AddSubmissionDialog();
     583             : 
     584           0 :         inline const XSubmission_ref& GetNewSubmission() const { return m_xNewSubmission; }
     585             :     };
     586             : 
     587             : 
     588           0 :     class AddModelDialog : public ModalDialog
     589             :     {
     590             :     private:
     591             :         Edit* m_pNameED;
     592             :         CheckBox* m_pModifyCB;
     593             : 
     594             :     public:
     595             :         AddModelDialog( Window* pParent, bool _bEdit );
     596             : 
     597           0 :         OUString         GetName() const { return m_pNameED->GetText(); }
     598           0 :         void             SetName( const OUString& _rName ) { m_pNameED->SetText( _rName );}
     599             : 
     600           0 :         bool             GetModifyDoc() const { return bool( m_pModifyCB->IsChecked() ); }
     601           0 :         void             SetModifyDoc( const bool bModify ) { m_pModifyCB->Check( bModify ); }
     602             :     };
     603             : 
     604             : 
     605           0 :     class AddInstanceDialog : public ModalDialog
     606             :     {
     607             :     private:
     608             :         Edit*                   m_pNameED;
     609             :         FixedText*              m_pURLFT;
     610             :         SvtURLBox*              m_pURLED;
     611             :         PushButton*             m_pFilePickerBtn;
     612             :         CheckBox*               m_pLinkInstanceCB;
     613             : 
     614             :         OUString                m_sAllFilterName;
     615             : 
     616             :         DECL_LINK(FilePickerHdl, void *);
     617             : 
     618             :     public:
     619             :         AddInstanceDialog( Window* pParent, bool _bEdit );
     620             : 
     621             :         void SetRenameMode()
     622             :         {
     623             :             m_pURLFT->Disable();
     624             :             m_pURLED->Disable();
     625             :             m_pFilePickerBtn->Disable();
     626             :             m_pLinkInstanceCB->Disable();
     627             :         }
     628           0 :         OUString         GetName() const { return m_pNameED->GetText(); }
     629           0 :         void             SetName( const OUString& _rName ) { m_pNameED->SetText( _rName );}
     630           0 :         OUString         GetURL() const { return m_pURLED->GetText(); }
     631           0 :         void             SetURL( const OUString& _rURL ) { m_pURLED->SetText( _rURL );}
     632           0 :         bool             IsLinkInstance() const { return m_pLinkInstanceCB->IsChecked(); }
     633           0 :         void             SetLinkInstance( bool _bLink ) { m_pLinkInstanceCB->Check( _bLink != false ); }
     634             :     };
     635             : 
     636             : 
     637           0 :     class LinkedInstanceWarningBox : public MessBox
     638             :     {
     639             :     public:
     640             :         LinkedInstanceWarningBox( Window* pParent );
     641             :     };
     642             : 
     643             : 
     644             : }   // namespace svxform
     645             : 
     646             : 
     647             : #endif // INCLUDED_SVX_SOURCE_INC_DATANAVI_HXX
     648             : 
     649             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10