bump product version to 5.0.4.1
[LibreOffice.git] / svx / source / inc / datanavi.hxx
blob5dba115d44ebfa73fbaaa239b1966f985b83fa3f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SVX_SOURCE_INC_DATANAVI_HXX
20 #define INCLUDED_SVX_SOURCE_INC_DATANAVI_HXX
22 #include <vcl/builder.hxx>
23 #include <vcl/dialog.hxx>
24 #include <vcl/fixed.hxx>
25 #include <vcl/layout.hxx>
26 #include <vcl/lstbox.hxx>
27 #include <vcl/menubtn.hxx>
28 #include <vcl/tabctrl.hxx>
29 #include <vcl/tabpage.hxx>
30 #include <vcl/toolbox.hxx>
31 #include <vcl/idle.hxx>
32 #include <svtools/inettbc.hxx>
33 #include <svtools/simptabl.hxx>
34 #include <svtools/svmedit.hxx>
35 #include <svtools/treelistbox.hxx>
36 #include <sfx2/dockwin.hxx>
37 #include <sfx2/childwin.hxx>
38 #include <sfx2/ctrlitem.hxx>
39 #include <svx/dialmgr.hxx>
40 #include <svx/dialogs.hrc>
41 #include <svx/fmresids.hrc>
42 #include <svx/svxdllapi.h>
43 #include <rtl/ref.hxx>
44 #include <com/sun/star/beans/XPropertySet.hpp>
45 #include <com/sun/star/container/XContainer.hpp>
46 #include <com/sun/star/container/XNameContainer.hpp>
47 #include <com/sun/star/frame/XFrame.hpp>
48 #include <com/sun/star/xforms/XFormsUIHelper1.hpp>
49 #include <com/sun/star/xforms/XModel.hpp>
50 #include <com/sun/star/xforms/XSubmission.hpp>
51 #include <com/sun/star/xml/dom/XNode.hpp>
52 #include <com/sun/star/xml/dom/events/XEventTarget.hpp>
54 #include "datalistener.hxx"
55 #include <vector>
57 class FmFormShell;
61 namespace svxform
65 enum DataGroupType
67 DGTUnknown = 0,
68 DGTInstance,
69 DGTSubmission,
70 DGTBinding
73 enum DataItemType
75 DITNone = 0,
76 DITText,
77 DITAttribute,
78 DITElement,
79 DITBinding
82 struct ItemNode;
83 class XFormsPage;
84 class DataNavigatorWindow;
85 class AddInstanceDialog;
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;
108 typedef ::com::sun::star::uno::Sequence<
109 ::com::sun::star::beans::PropertyValue > PropertyValue_seq;
111 typedef std::vector< XContainer_ref > ContainerList;
112 typedef std::vector< XEventTarget_ref > EventTargetList;
115 class DataTreeListBox : public SvTreeListBox
117 private:
118 VclPtr<XFormsPage> m_pXFormsPage;
119 DataGroupType m_eGroup;
120 sal_uInt16 m_nAddId;
121 sal_uInt16 m_nAddElementId;
122 sal_uInt16 m_nAddAttributeId;
123 sal_uInt16 m_nEditId;
124 sal_uInt16 m_nRemoveId;
126 protected:
127 using SvTreeListBox::ExecuteDrop;
129 public:
130 DataTreeListBox( vcl::Window* pParent, WinBits nBits );
131 virtual ~DataTreeListBox();
132 virtual void dispose() SAL_OVERRIDE;
134 virtual PopupMenu* CreateContextMenu() SAL_OVERRIDE;
135 virtual void ExcecuteContextMenuAction( sal_uInt16 _nSelectedPopupEntry ) SAL_OVERRIDE;
136 virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) SAL_OVERRIDE;
137 virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) SAL_OVERRIDE;
138 virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) SAL_OVERRIDE;
140 void SetGroup(DataGroupType _eGroup);
141 void SetXFormsPage(XFormsPage* _pPage);
142 void SetToolBoxItemIds(sal_uInt16 _nAddId,
143 sal_uInt16 _nAddElementId,
144 sal_uInt16 _nAddAttributeId,
145 sal_uInt16 _nEditId,
146 sal_uInt16 _nRemoveId);
147 void DeleteAndClear();
148 void RemoveEntry( SvTreeListEntry* _pEntry );
151 class ReplaceString
153 OUString m_sDoc_UI;
154 OUString m_sInstance_UI;
155 OUString m_sNone_UI;
157 OUString m_sDoc_API;
158 OUString m_sInstance_API;
159 OUString m_sNone_API;
161 ReplaceString( const ReplaceString& ) SAL_DELETED_FUNCTION;
163 public:
164 ReplaceString() :
165 m_sDoc_API( "all" ),
166 m_sInstance_API( "instance" ),
167 m_sNone_API( "none" )
169 m_sDoc_UI = SVX_RESSTR(RID_STR_REPLACE_DOC);
170 m_sInstance_UI = SVX_RESSTR(RID_STR_REPLACE_INST);
171 m_sNone_UI = SVX_RESSTR(RID_STR_REPLACE_NONE);
174 /** convert submission replace string from API value to UI value.
175 Use 'none' as default. */
176 OUString toUI( const OUString& rStr ) const
178 if( rStr == m_sDoc_API )
179 return m_sDoc_UI;
180 else if( rStr == m_sInstance_API )
181 return m_sInstance_UI;
182 else
183 return m_sNone_UI;
186 /** convert submission replace string from UI to API.
187 Use 'none' as default. */
188 OUString toAPI( const OUString& rStr ) const
190 if( rStr == m_sDoc_UI )
191 return m_sDoc_API;
192 else if( rStr == m_sInstance_UI )
193 return m_sInstance_API;
194 else
195 return m_sNone_API;
199 class MethodString
201 OUString m_sPost_UI;
202 OUString m_sPut_UI;
203 OUString m_sGet_UI;
205 OUString m_sPost_API;
206 OUString m_sPut_API;
207 OUString m_sGet_API;
209 MethodString( const MethodString& ) SAL_DELETED_FUNCTION;
211 public:
213 MethodString() :
214 m_sPost_API( "post" ),
215 m_sPut_API( "put" ),
216 m_sGet_API( "get" )
218 m_sPost_UI = SVX_RESSTR(RID_STR_METHOD_POST);
219 m_sPut_UI = SVX_RESSTR(RID_STR_METHOD_PUT);
220 m_sGet_UI = SVX_RESSTR(RID_STR_METHOD_GET);
223 /** convert from API to UI; put is default. */
224 OUString toUI( const OUString& rStr ) const
226 if( rStr == m_sGet_API )
227 return m_sGet_UI;
228 else if( rStr == m_sPost_API )
229 return m_sPost_UI;
230 else
231 return m_sPut_UI;
234 /** convert from UI to API; put is default */
235 OUString toAPI( const OUString& rStr ) const
237 if( rStr == m_sGet_UI )
238 return m_sGet_API;
239 else if( rStr == m_sPost_UI )
240 return m_sPost_API;
241 else
242 return m_sPut_API;
247 class XFormsPage : public TabPage
249 private:
250 MethodString m_aMethodString;
251 ReplaceString m_aReplaceString;
253 VclPtr<ToolBox> m_pToolBox;
254 VclPtr<DataTreeListBox> m_pItemList;
255 sal_uInt16 m_nAddId;
256 sal_uInt16 m_nAddElementId;
257 sal_uInt16 m_nAddAttributeId;
258 sal_uInt16 m_nEditId;
259 sal_uInt16 m_nRemoveId;
261 XFormsUIHelper1_ref m_xUIHelper;
263 VclPtr<DataNavigatorWindow> m_pNaviWin;
264 bool m_bHasModel;
265 DataGroupType m_eGroup;
266 ImageList m_TbxImageList;
267 // these strings are not valid on the Submission and Binding Page
268 // mb: furthermore these are properties of an instance, thus
269 // it would be much better to get/set them through the UIHelper
270 // interface.
271 OUString m_sInstanceName;
272 OUString m_sInstanceURL;
273 bool m_bLinkOnce;
275 DECL_LINK_TYPED(TbxSelectHdl, ToolBox *, void);
276 DECL_LINK(ItemSelectHdl, void *);
278 void AddChildren( SvTreeListEntry* _pParent,
279 const ImageList& _rImgLst,
280 const XNode_ref& _xNode );
281 bool DoToolBoxAction( sal_uInt16 _nToolBoxID );
282 SvTreeListEntry* AddEntry( ItemNode* _pNewNode, bool _bIsElement );
283 SvTreeListEntry* AddEntry( const XPropertySet_ref& _rPropSet );
284 void EditEntry( const XPropertySet_ref& _rPropSet );
285 bool RemoveEntry();
287 protected:
288 virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
290 public:
291 XFormsPage( vcl::Window* pParent, DataNavigatorWindow* _pNaviWin, DataGroupType _eGroup );
292 virtual ~XFormsPage();
293 virtual void dispose() SAL_OVERRIDE;
295 virtual void Resize() SAL_OVERRIDE;
297 inline bool HasModel() const { return m_bHasModel; }
298 OUString SetModel( const XModel_ref& _xModel, sal_uInt16 _nPagePos );
299 void ClearModel();
300 OUString LoadInstance( const PropertyValue_seq& _xPropSeq,
301 const ImageList& _rImgLst );
303 bool DoMenuAction( sal_uInt16 _nMenuID );
304 void EnableMenuItems( Menu* _pMenu );
306 inline SvTreeListEntry* GetSelectedItem() const { return m_pItemList->FirstSelected(); }
307 inline const OUString& GetInstanceName() const { return m_sInstanceName; }
308 inline const OUString& GetInstanceURL() const { return m_sInstanceURL; }
309 inline bool GetLinkOnce() const { return m_bLinkOnce; }
310 inline void SetInstanceName( const OUString &name ) { m_sInstanceName=name; }
311 inline void SetInstanceURL( const OUString &url ) { m_sInstanceURL=url; }
312 inline void SetLinkOnce( bool bLinkOnce ) { m_bLinkOnce=bLinkOnce; }
314 typedef com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> XPropertySet_t;
315 typedef com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode> XNode_t;
317 inline XPropertySet_t GetBindingForNode( const XNode_t &xNode ) { return m_xUIHelper->getBindingForNode(xNode,true); }
318 inline OUString GetServiceNameForNode( const XNode_t &xNode ) { return m_xUIHelper->getDefaultServiceNameForNode(xNode); }
319 inline XFormsUIHelper1_ref GetXFormsHelper() const { return m_xUIHelper; }
324 typedef std::vector< VclPtr<XFormsPage> > PageList;
325 typedef ::rtl::Reference < DataListener > DataListener_ref;
327 class DataNavigatorWindow : public vcl::Window, public VclBuilderContainer
329 private:
330 VclPtr<ListBox> m_pModelsBox;
331 VclPtr<MenuButton> m_pModelBtn;
332 VclPtr<TabControl> m_pTabCtrl;
333 VclPtr<MenuButton> m_pInstanceBtn;
335 VclPtr<XFormsPage> m_pInstPage;
336 VclPtr<XFormsPage> m_pSubmissionPage;
337 VclPtr<XFormsPage> m_pBindingPage;
339 sal_Int32 m_nLastSelectedPos;
340 bool m_bShowDetails;
341 bool m_bIsNotifyDisabled;
342 ImageList m_aItemImageList;
343 PageList m_aPageList;
344 ContainerList m_aContainerList;
345 EventTargetList m_aEventTargetList;
346 Timer m_aUpdateTimer;
348 DataListener_ref m_xDataListener;
349 XNameContainer_ref m_xDataContainer;
350 XFrame_ref m_xFrame;
351 XFrameModel_ref m_xFrameModel;
353 DECL_LINK( ModelSelectHdl, ListBox * );
354 DECL_LINK_TYPED( MenuSelectHdl, MenuButton *, void );
355 DECL_LINK( MenuActivateHdl, MenuButton * );
356 DECL_LINK(ActivatePageHdl, void *);
357 DECL_LINK_TYPED(UpdateHdl, Timer *, void);
359 XFormsPage* GetCurrentPage( sal_uInt16& rCurId );
360 void LoadModels();
361 void SetPageModel();
362 void ClearAllPageModels( bool bClearPages );
363 void InitPages();
364 void CreateInstancePage( const PropertyValue_seq& _xPropSeq );
365 bool HasFirstInstancePage() const;
366 sal_uInt16 GetNewPageId() const;
368 bool IsAdditionalPage(sal_uInt16 nPageId) const;
370 protected:
371 virtual void Resize() SAL_OVERRIDE;
372 virtual Size GetOptimalSize() const SAL_OVERRIDE;
374 public:
375 DataNavigatorWindow( vcl::Window* pParent, SfxBindings* pBindings );
376 virtual ~DataNavigatorWindow();
377 virtual void dispose() SAL_OVERRIDE;
379 static void SetDocModified();
380 void NotifyChanges( bool _bLoadAll = false );
381 void AddContainerBroadcaster( const XContainer_ref& xContainer );
382 void AddEventBroadcaster( const XEventTarget_ref& xTarget );
383 void RemoveBroadcaster();
385 inline const ImageList& GetItemImageList() const { return m_aItemImageList; }
386 inline bool IsShowDetails() const { return m_bShowDetails; }
387 inline void DisableNotify( bool _bDisable ) { m_bIsNotifyDisabled = _bDisable; }
391 class DataNavigator : public SfxDockingWindow, public SfxControllerItem
393 private:
394 VclPtr<DataNavigatorWindow> m_aDataWin;
396 protected:
397 virtual void Resize() SAL_OVERRIDE;
398 virtual bool Close() SAL_OVERRIDE;
399 virtual void GetFocus() SAL_OVERRIDE;
400 virtual Size CalcDockingSize( SfxChildAlignment ) SAL_OVERRIDE;
401 virtual SfxChildAlignment CheckAlignment( SfxChildAlignment, SfxChildAlignment ) SAL_OVERRIDE;
403 public:
404 DataNavigator( SfxBindings* pBindings, SfxChildWindow* pMgr, vcl::Window* pParent );
405 virtual ~DataNavigator();
406 virtual void dispose() SAL_OVERRIDE;
408 using Window::Update;
409 using SfxDockingWindow::StateChanged;
411 void StateChanged( sal_uInt16 nSID, SfxItemState eState,
412 const SfxPoolItem* pState ) SAL_OVERRIDE;
416 class SVX_DLLPUBLIC DataNavigatorManager : public SfxChildWindow
418 public:
419 SVX_DLLPRIVATE DataNavigatorManager( vcl::Window* pParent, sal_uInt16 nId,
420 SfxBindings* pBindings, SfxChildWinInfo* pInfo );
421 SFX_DECL_CHILDWINDOW( DataNavigatorManager );
425 class AddDataItemDialog : public ModalDialog
427 private:
429 VclPtr<VclFrame> m_pItemFrame;
430 VclPtr<FixedText> m_pNameFT;
431 VclPtr<Edit> m_pNameED;
432 VclPtr<FixedText> m_pDefaultFT;
433 VclPtr<Edit> m_pDefaultED;
434 VclPtr<PushButton> m_pDefaultBtn;
436 VclPtr<VclFrame> m_pSettingsFrame;
438 VclPtr<FixedText> m_pDataTypeFT;
439 VclPtr<ListBox> m_pDataTypeLB;
441 VclPtr<CheckBox> m_pRequiredCB;
442 VclPtr<PushButton> m_pRequiredBtn;
443 VclPtr<CheckBox> m_pRelevantCB;
444 VclPtr<PushButton> m_pRelevantBtn;
445 VclPtr<CheckBox> m_pConstraintCB;
446 VclPtr<PushButton> m_pConstraintBtn;
447 VclPtr<CheckBox> m_pReadonlyCB;
448 VclPtr<PushButton> m_pReadonlyBtn;
449 VclPtr<CheckBox> m_pCalculateCB;
450 VclPtr<PushButton> m_pCalculateBtn;
452 VclPtr<OKButton> m_pOKBtn;
454 XFormsUIHelper1_ref m_xUIHelper;
455 XPropertySet_ref m_xBinding;
456 XPropertySet_ref m_xTempBinding;
458 ItemNode* m_pItemNode;
459 DataItemType m_eItemType;
460 OUString m_sFL_Element;
461 OUString m_sFL_Attribute;
462 OUString m_sFL_Binding;
463 OUString m_sFT_BindingExp;
465 DECL_LINK( CheckHdl, CheckBox * );
466 DECL_LINK( ConditionHdl, PushButton * );
467 DECL_LINK(OKHdl, void *);
469 void InitDialog();
470 void InitFromNode();
471 void InitDataTypeBox();
473 public:
474 AddDataItemDialog(
475 vcl::Window* pParent, ItemNode* _pNode, const XFormsUIHelper1_ref& _rUIHelper );
476 virtual ~AddDataItemDialog();
477 virtual void dispose() SAL_OVERRIDE;
479 void InitText( DataItemType _eType );
483 class AddConditionDialog : public ModalDialog
485 private:
486 VclPtr<VclMultiLineEdit> m_pConditionED;
487 VclPtr<VclMultiLineEdit> m_pResultWin;
488 VclPtr<PushButton> m_pEditNamespacesBtn;
489 VclPtr<OKButton> m_pOKBtn;
491 Idle m_aResultIdle;
492 OUString m_sPropertyName;
494 XFormsUIHelper1_ref m_xUIHelper;
495 XPropertySet_ref m_xBinding;
497 DECL_LINK(ModifyHdl, void *);
498 DECL_LINK_TYPED(ResultHdl, Idle *, void);
499 DECL_LINK(EditHdl, void *);
500 DECL_LINK(OKHdl, void *);
502 public:
503 AddConditionDialog(vcl::Window* pParent,
504 const OUString& _rPropertyName, const XPropertySet_ref& _rBinding);
505 virtual ~AddConditionDialog();
506 virtual void dispose() SAL_OVERRIDE;
508 XFormsUIHelper1_ref GetUIHelper() const { return m_xUIHelper; }
509 OUString GetCondition() const { return m_pConditionED->GetText(); }
510 void SetCondition(const OUString& _rCondition)
512 m_pConditionED->SetText(_rCondition);
513 m_aResultIdle.Start();
518 class NamespaceItemDialog : public ModalDialog
520 private:
521 typedef std::vector< OUString > PrefixList;
523 VclPtr<SvSimpleTable> m_pNamespacesList;
524 VclPtr<PushButton> m_pAddNamespaceBtn;
525 VclPtr<PushButton> m_pEditNamespaceBtn;
526 VclPtr<PushButton> m_pDeleteNamespaceBtn;
527 VclPtr<OKButton> m_pOKBtn;
529 VclPtr<AddConditionDialog> m_pConditionDlg;
530 PrefixList m_aRemovedList;
532 XNameContainer_ref& m_rNamespaces;
534 DECL_LINK( SelectHdl, SvSimpleTable * );
535 DECL_LINK( ClickHdl, PushButton * );
536 DECL_LINK(OKHdl, void *);
538 void LoadNamespaces();
540 public:
541 NamespaceItemDialog( AddConditionDialog* pParent, XNameContainer_ref& _rContainer );
542 virtual ~NamespaceItemDialog();
543 virtual void dispose() SAL_OVERRIDE;
547 class ManageNamespaceDialog : public ModalDialog
549 private:
550 VclPtr<Edit> m_pPrefixED;
551 VclPtr<Edit> m_pUrlED;
552 VclPtr<OKButton> m_pOKBtn;
554 VclPtr<AddConditionDialog> m_pConditionDlg;
556 DECL_LINK(OKHdl, void *);
558 public:
559 ManageNamespaceDialog(vcl::Window* pParent, AddConditionDialog* _pCondDlg, bool bIsEdit);
560 virtual ~ManageNamespaceDialog();
561 virtual void dispose() SAL_OVERRIDE;
563 void SetNamespace(const OUString& _rPrefix, const OUString& _rURL)
565 m_pPrefixED->SetText( _rPrefix );
566 m_pUrlED->SetText( _rURL );
568 OUString GetPrefix() const { return m_pPrefixED->GetText(); }
569 OUString GetURL() const { return m_pUrlED->GetText(); }
573 class AddSubmissionDialog : public ModalDialog
575 private:
576 MethodString m_aMethodString;
577 ReplaceString m_aReplaceString;
579 VclPtr<Edit> m_pNameED;
580 VclPtr<Edit> m_pActionED;
581 VclPtr<ListBox> m_pMethodLB;
582 VclPtr<Edit> m_pRefED;
583 VclPtr<PushButton> m_pRefBtn;
584 VclPtr<ListBox> m_pBindLB;
585 VclPtr<ListBox> m_pReplaceLB;
587 VclPtr<OKButton> m_pOKBtn;
589 ItemNode* m_pItemNode;
591 XFormsUIHelper1_ref m_xUIHelper;
592 XSubmission_ref m_xNewSubmission;
593 XPropertySet_ref m_xSubmission;
594 XPropertySet_ref m_xTempBinding;
595 XPropertySet_ref m_xCreatedBinding;
597 DECL_LINK(RefHdl, void *);
598 DECL_LINK(OKHdl, void *);
600 void FillAllBoxes();
602 public:
603 AddSubmissionDialog( vcl::Window* pParent, ItemNode* _pNode,
604 const XFormsUIHelper1_ref& _rUIHelper );
605 virtual ~AddSubmissionDialog();
606 virtual void dispose() SAL_OVERRIDE;
608 inline const XSubmission_ref& GetNewSubmission() const { return m_xNewSubmission; }
612 class AddModelDialog : public ModalDialog
614 private:
615 VclPtr<Edit> m_pNameED;
616 VclPtr<CheckBox> m_pModifyCB;
618 public:
619 AddModelDialog( vcl::Window* pParent, bool _bEdit );
620 virtual ~AddModelDialog();
621 virtual void dispose() SAL_OVERRIDE;
623 OUString GetName() const { return m_pNameED->GetText(); }
624 void SetName( const OUString& _rName ) { m_pNameED->SetText( _rName );}
626 bool GetModifyDoc() const { return bool( m_pModifyCB->IsChecked() ); }
627 void SetModifyDoc( const bool bModify ) { m_pModifyCB->Check( bModify ); }
631 class AddInstanceDialog : public ModalDialog
633 private:
634 VclPtr<Edit> m_pNameED;
635 VclPtr<FixedText> m_pURLFT;
636 VclPtr<SvtURLBox> m_pURLED;
637 VclPtr<PushButton> m_pFilePickerBtn;
638 VclPtr<CheckBox> m_pLinkInstanceCB;
640 OUString m_sAllFilterName;
642 DECL_LINK(FilePickerHdl, void *);
644 public:
645 AddInstanceDialog( vcl::Window* pParent, bool _bEdit );
646 virtual ~AddInstanceDialog();
647 virtual void dispose() SAL_OVERRIDE;
649 void SetRenameMode()
651 m_pURLFT->Disable();
652 m_pURLED->Disable();
653 m_pFilePickerBtn->Disable();
654 m_pLinkInstanceCB->Disable();
656 OUString GetName() const { return m_pNameED->GetText(); }
657 void SetName( const OUString& _rName ) { m_pNameED->SetText( _rName );}
658 OUString GetURL() const { return m_pURLED->GetText(); }
659 void SetURL( const OUString& _rURL ) { m_pURLED->SetText( _rURL );}
660 bool IsLinkInstance() const { return m_pLinkInstanceCB->IsChecked(); }
661 void SetLinkInstance( bool _bLink ) { m_pLinkInstanceCB->Check(_bLink); }
665 class LinkedInstanceWarningBox : public MessageDialog
667 public:
668 LinkedInstanceWarningBox( vcl::Window* pParent );
675 #endif // INCLUDED_SVX_SOURCE_INC_DATANAVI_HXX
677 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */