Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _SVX_DATANAVI_HXX
29 : : #define _SVX_DATANAVI_HXX
30 : :
31 : : #include <vcl/dialog.hxx>
32 : : #include <vcl/fixed.hxx>
33 : : #include <vcl/lstbox.hxx>
34 : : #include <vcl/menubtn.hxx>
35 : : #include <vcl/msgbox.hxx>
36 : : #include <vcl/tabctrl.hxx>
37 : : #include <vcl/tabpage.hxx>
38 : : #include <vcl/toolbox.hxx>
39 : : #include <svtools/inettbc.hxx>
40 : : #include <svtools/svmedit.hxx>
41 : : #include <svtools/svtreebx.hxx>
42 : : #include <sfx2/dockwin.hxx>
43 : : #include <sfx2/ctrlitem.hxx>
44 : : #include <svx/simptabl.hxx>
45 : : #include <rtl/ref.hxx>
46 : : #include <com/sun/star/beans/XPropertySet.hpp>
47 : : #include <com/sun/star/container/XContainer.hpp>
48 : : #include <com/sun/star/container/XNameContainer.hpp>
49 : : #include <com/sun/star/frame/XFrame.hpp>
50 : : #include <com/sun/star/xforms/XFormsUIHelper1.hpp>
51 : : #include <com/sun/star/xforms/XModel.hpp>
52 : : #include <com/sun/star/xforms/XSubmission.hpp>
53 : : #include <com/sun/star/xml/dom/XNode.hpp>
54 : : #include <com/sun/star/xml/dom/events/XEventTarget.hpp>
55 : :
56 : : #include "datalistener.hxx"
57 : : #include <vector>
58 : :
59 : : // forward ---------------------------------------------------------------
60 : :
61 : : class FmFormShell;
62 : :
63 : : //========================================================================
64 : : //............................................................................
65 : : namespace svxform
66 : : {
67 : : //............................................................................
68 : :
69 : : enum DataGroupType
70 : : {
71 : : DGTUnknown = 0,
72 : : DGTInstance,
73 : : DGTSubmission,
74 : : DGTBinding
75 : : };
76 : :
77 : : enum DataItemType
78 : : {
79 : : DITNone = 0,
80 : : DITText,
81 : : DITAttribute,
82 : : DITElement,
83 : : DITBinding
84 : : };
85 : :
86 : : struct ItemNode;
87 : : class XFormsPage;
88 : : class DataNavigatorWindow;
89 : : class AddInstanceDialog;
90 : :
91 : : typedef ::com::sun::star::uno::Reference<
92 : : ::com::sun::star::xforms::XFormsUIHelper1 > XFormsUIHelper1_ref;
93 : : typedef ::com::sun::star::uno::Reference<
94 : : ::com::sun::star::xml::dom::XNode > XNode_ref;
95 : : typedef ::com::sun::star::uno::Reference<
96 : : ::com::sun::star::beans::XPropertySet > XPropertySet_ref;
97 : : typedef ::com::sun::star::uno::Reference<
98 : : ::com::sun::star::xforms::XModel > XModel_ref;
99 : : typedef ::com::sun::star::uno::Reference<
100 : : ::com::sun::star::container::XContainer > XContainer_ref;
101 : : typedef ::com::sun::star::uno::Reference<
102 : : ::com::sun::star::container::XNameContainer > XNameContainer_ref;
103 : : typedef ::com::sun::star::uno::Reference<
104 : : ::com::sun::star::frame::XFrame > XFrame_ref;
105 : : typedef ::com::sun::star::uno::Reference<
106 : : ::com::sun::star::frame::XModel > XFrameModel_ref;
107 : : typedef ::com::sun::star::uno::Reference<
108 : : ::com::sun::star::xml::dom::events::XEventTarget > XEventTarget_ref;
109 : : typedef ::com::sun::star::uno::Reference<
110 : : ::com::sun::star::xforms::XSubmission > XSubmission_ref;
111 : :
112 : : typedef ::com::sun::star::uno::Sequence<
113 : : ::com::sun::star::beans::PropertyValue > PropertyValue_seq;
114 : :
115 : : typedef std::vector< XContainer_ref > ContainerList;
116 : : typedef std::vector< XEventTarget_ref > EventTargetList;
117 : :
118 : : //========================================================================
119 : : class DataTreeListBox : public SvTreeListBox
120 : : {
121 : : private:
122 : : XFormsPage* m_pXFormsPage;
123 : : DataGroupType m_eGroup;
124 : :
125 : : protected:
126 : : using SvTreeListBox::ExecuteDrop;
127 : :
128 : : public:
129 : : DataTreeListBox( XFormsPage* pPage, DataGroupType _eGroup, const ResId& rResId );
130 : : ~DataTreeListBox();
131 : :
132 : : virtual PopupMenu* CreateContextMenu( void );
133 : : virtual void ExcecuteContextMenuAction( sal_uInt16 _nSelectedPopupEntry );
134 : : virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
135 : : virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
136 : : virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
137 : :
138 : : void DeleteAndClear();
139 : : void RemoveEntry( SvLBoxEntry* _pEntry );
140 : : };
141 : :
142 : : //========================================================================
143 : : class XFormsPage : public TabPage
144 : : {
145 : : private:
146 : : ToolBox m_aToolBox;
147 : : DataTreeListBox m_aItemList;
148 : :
149 : : XFormsUIHelper1_ref m_xUIHelper;
150 : :
151 : : DataNavigatorWindow* m_pNaviWin;
152 : : bool m_bHasModel;
153 : : DataGroupType m_eGroup;
154 : : ImageList m_TbxImageList;
155 : : // these strings are not valid on the Submission and Binding Page
156 : : // mb: furthermore these are properties of an instance, thus
157 : : // it would be much better to get/set them through the UIHelper
158 : : // interface.
159 : : String m_sInstanceName;
160 : : String m_sInstanceURL;
161 : : bool m_bLinkOnce;
162 : :
163 : : DECL_LINK(TbxSelectHdl, void *);
164 : : DECL_LINK(ItemSelectHdl, void *);
165 : :
166 : : void AddChildren( SvLBoxEntry* _pParent,
167 : : const ImageList& _rImgLst,
168 : : const XNode_ref& _xNode );
169 : : bool DoToolBoxAction( sal_uInt16 _nToolBoxID );
170 : : SvLBoxEntry* AddEntry( ItemNode* _pNewNode, bool _bIsElement );
171 : : SvLBoxEntry* AddEntry( const XPropertySet_ref& _rPropSet );
172 : : void EditEntry( const XPropertySet_ref& _rPropSet );
173 : : bool RemoveEntry();
174 : :
175 : : protected:
176 : : virtual long Notify( NotifyEvent& rNEvt );
177 : :
178 : : public:
179 : : XFormsPage( Window* pParent, DataNavigatorWindow* _pNaviWin, DataGroupType _eGroup );
180 : : ~XFormsPage();
181 : :
182 : : virtual void Resize();
183 : :
184 : 0 : inline bool HasModel() const { return m_bHasModel; }
185 : : String SetModel( const XModel_ref& _xModel, sal_uInt16 _nPagePos );
186 : : void ClearModel();
187 : : String LoadInstance( const PropertyValue_seq& _xPropSeq,
188 : : const ImageList& _rImgLst );
189 : :
190 : : bool DoMenuAction( sal_uInt16 _nMenuID );
191 : : void EnableMenuItems( Menu* _pMenu );
192 : :
193 : : inline SvLBoxEntry* GetSelectedItem() const { return m_aItemList.FirstSelected(); }
194 : 0 : inline const String& GetInstanceName() const { return m_sInstanceName; }
195 : 0 : inline const String& GetInstanceURL() const { return m_sInstanceURL; }
196 : 0 : inline bool GetLinkOnce() const { return m_bLinkOnce; }
197 : 0 : inline void SetInstanceName( const String &name ) { m_sInstanceName=name; }
198 : 0 : inline void SetInstanceURL( const String &url ) { m_sInstanceURL=url; }
199 : 0 : inline void SetLinkOnce( bool bLinkOnce ) { m_bLinkOnce=bLinkOnce; }
200 : :
201 : : typedef com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> XPropertySet_t;
202 : : typedef com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode> XNode_t;
203 : :
204 : 0 : inline XPropertySet_t GetBindingForNode( const XNode_t &xNode ) { return m_xUIHelper->getBindingForNode(xNode,true); }
205 [ # # ]: 0 : inline String GetServiceNameForNode( const XNode_t &xNode ) { return m_xUIHelper->getDefaultServiceNameForNode(xNode); }
206 : 0 : inline XFormsUIHelper1_ref GetXFormsHelper( void ) const { return m_xUIHelper; }
207 : : };
208 : :
209 : : //========================================================================
210 : :
211 : : typedef std::vector< XFormsPage* > PageList;
212 : : typedef ::rtl::Reference < DataListener > DataListener_ref;
213 : :
214 : : class DataNavigatorWindow : public Window
215 : : {
216 : : private:
217 : :
218 : : ListBox m_aModelsBox;
219 : : MenuButton m_aModelBtn;
220 : : TabControl m_aTabCtrl;
221 : : MenuButton m_aInstanceBtn;
222 : :
223 : : XFormsPage* m_pInstPage;
224 : : XFormsPage* m_pSubmissionPage;
225 : : XFormsPage* m_pBindingPage;
226 : :
227 : : long m_nMinWidth;
228 : : long m_nMinHeight;
229 : : long m_nBorderHeight;
230 : : sal_uInt16 m_nLastSelectedPos;
231 : : bool m_bShowDetails;
232 : : bool m_bIsNotifyDisabled;
233 : : Size m_a2Size;
234 : : Size m_a3Size;
235 : : ImageList m_aItemImageList;
236 : : PageList m_aPageList;
237 : : ContainerList m_aContainerList;
238 : : EventTargetList m_aEventTargetList;
239 : : Timer m_aUpdateTimer;
240 : :
241 : : DataListener_ref m_xDataListener;
242 : : XNameContainer_ref m_xDataContainer;
243 : : XFrame_ref m_xFrame;
244 : : XFrameModel_ref m_xFrameModel;
245 : :
246 : : DECL_LINK( ModelSelectHdl, ListBox * );
247 : : DECL_LINK( MenuSelectHdl, MenuButton * );
248 : : DECL_LINK( MenuActivateHdl, MenuButton * );
249 : : DECL_LINK(ActivatePageHdl, void *);
250 : : DECL_LINK(UpdateHdl, void *);
251 : :
252 : : XFormsPage* GetCurrentPage( sal_uInt16& rCurId );
253 : : void LoadModels();
254 : : void SetPageModel();
255 : : void ClearAllPageModels( bool bClearPages );
256 : : void InitPages();
257 : : void CreateInstancePage( const PropertyValue_seq& _xPropSeq );
258 : : bool HasFirstInstancePage() const;
259 : : sal_uInt16 GetNewPageId() const;
260 : :
261 : : protected:
262 : : virtual void Resize();
263 : :
264 : : public:
265 : : DataNavigatorWindow( Window* pParent, SfxBindings* pBindings );
266 : : ~DataNavigatorWindow();
267 : :
268 : : void SetDocModified();
269 : : void NotifyChanges( bool _bLoadAll = false );
270 : : void AddContainerBroadcaster( const XContainer_ref& xContainer );
271 : : void AddEventBroadcaster( const XEventTarget_ref& xTarget );
272 : : void RemoveBroadcaster();
273 : :
274 : 0 : inline const ImageList& GetItemImageList() const { return m_aItemImageList; }
275 : 0 : inline bool IsShowDetails() const { return m_bShowDetails; }
276 : 0 : inline void DisableNotify( bool _bDisable ) { m_bIsNotifyDisabled = _bDisable; }
277 : : };
278 : :
279 : : //========================================================================
280 : : class DataNavigator : public SfxDockingWindow, public SfxControllerItem
281 : : {
282 : : private:
283 : : DataNavigatorWindow m_aDataWin;
284 : :
285 : : protected:
286 : : virtual void Resize();
287 : : virtual sal_Bool Close();
288 : : virtual void GetFocus();
289 : : virtual Size CalcDockingSize( SfxChildAlignment );
290 : : virtual SfxChildAlignment CheckAlignment( SfxChildAlignment, SfxChildAlignment );
291 : :
292 : : public:
293 : : DataNavigator( SfxBindings* pBindings, SfxChildWindow* pMgr, Window* pParent );
294 : : virtual ~DataNavigator();
295 : :
296 : : using Window::Update;
297 : : using SfxDockingWindow::StateChanged;
298 : :
299 : : void Update( FmFormShell* pFormShell );
300 : : void StateChanged( sal_uInt16 nSID, SfxItemState eState,
301 : : const SfxPoolItem* pState );
302 : : };
303 : :
304 : : //========================================================================
305 [ # # ]: 0 : class SVX_DLLPUBLIC DataNavigatorManager : public SfxChildWindow
306 : : {
307 : : public:
308 : : SVX_DLLPRIVATE DataNavigatorManager( Window* pParent, sal_uInt16 nId,
309 : : SfxBindings* pBindings, SfxChildWinInfo* pInfo );
310 : : SFX_DECL_CHILDWINDOW( DataNavigatorManager );
311 : : };
312 : :
313 : : //========================================================================
314 : : class AddDataItemDialog : public ModalDialog
315 : : {
316 : : private:
317 : :
318 : : FixedLine m_aItemFL;
319 : : FixedText m_aNameFT;
320 : : Edit m_aNameED;
321 : : FixedText m_aDefaultFT;
322 : : Edit m_aDefaultED;
323 : : PushButton m_aDefaultBtn;
324 : :
325 : : FixedLine m_aSettingsFL;
326 : : FixedText m_aDataTypeFT;
327 : : ListBox m_aDataTypeLB;
328 : :
329 : : CheckBox m_aRequiredCB;
330 : : PushButton m_aRequiredBtn;
331 : : CheckBox m_aRelevantCB;
332 : : PushButton m_aRelevantBtn;
333 : : CheckBox m_aConstraintCB;
334 : : PushButton m_aConstraintBtn;
335 : : CheckBox m_aReadonlyCB;
336 : : PushButton m_aReadonlyBtn;
337 : : CheckBox m_aCalculateCB;
338 : : PushButton m_aCalculateBtn;
339 : :
340 : : FixedLine m_aButtonsFL;
341 : : OKButton m_aOKBtn;
342 : : CancelButton m_aEscBtn;
343 : : HelpButton m_aHelpBtn;
344 : :
345 : : XFormsUIHelper1_ref m_xUIHelper;
346 : : XPropertySet_ref m_xBinding;
347 : : XPropertySet_ref m_xTempBinding;
348 : :
349 : : ItemNode* m_pItemNode;
350 : : DataItemType m_eItemType;
351 : : String m_sFL_Element;
352 : : String m_sFL_Attribute;
353 : : String m_sFL_Binding;
354 : : String m_sFT_BindingExp;
355 : :
356 : : DECL_LINK( CheckHdl, CheckBox * );
357 : : DECL_LINK( ConditionHdl, PushButton * );
358 : : DECL_LINK(OKHdl, void *);
359 : :
360 : : void InitDialog();
361 : : void InitFromNode();
362 : : void InitDataTypeBox();
363 : :
364 : : public:
365 : : AddDataItemDialog(
366 : : Window* pParent, ItemNode* _pNode, const XFormsUIHelper1_ref& _rUIHelper );
367 : : ~AddDataItemDialog();
368 : :
369 : : void InitText( DataItemType _eType );
370 : : };
371 : :
372 : : //========================================================================
373 : : class AddConditionDialog : public ModalDialog
374 : : {
375 : : private:
376 : : FixedText m_aConditionFT;
377 : : MultiLineEdit m_aConditionED;
378 : : FixedText m_aResultFT;
379 : : FixedText m_aResultWin;
380 : : PushButton m_aEditNamespacesBtn;
381 : : FixedLine m_aButtonsFL;
382 : : OKButton m_aOKBtn;
383 : : CancelButton m_aEscBtn;
384 : : HelpButton m_aHelpBtn;
385 : :
386 : : Timer m_aResultTimer;
387 : : ::rtl::OUString m_sPropertyName;
388 : :
389 : : XFormsUIHelper1_ref m_xUIHelper;
390 : : XPropertySet_ref m_xBinding;
391 : :
392 : : DECL_LINK(ModifyHdl, void *);
393 : : DECL_LINK(ResultHdl, void *);
394 : : DECL_LINK(EditHdl, void *);
395 : : DECL_LINK(OKHdl, void *);
396 : :
397 : : public:
398 : : AddConditionDialog( Window* pParent,
399 : : const ::rtl::OUString& _rPropertyName, const XPropertySet_ref& _rBinding );
400 : : ~AddConditionDialog();
401 : :
402 : 0 : inline XFormsUIHelper1_ref GetUIHelper() const { return m_xUIHelper; }
403 : 0 : inline String GetCondition() const { return m_aConditionED.GetText(); }
404 : : inline void SetCondition( const String& _rCondition );
405 : : };
406 : :
407 : 0 : inline void AddConditionDialog::SetCondition( const String& _rCondition )
408 : : {
409 : 0 : m_aConditionED.SetText( _rCondition );
410 : 0 : m_aResultTimer.Start();
411 : 0 : }
412 : :
413 : : //========================================================================
414 : : class NamespaceItemDialog : public ModalDialog
415 : : {
416 : : private:
417 : : typedef std::vector< ::rtl::OUString > PrefixList;
418 : :
419 : : FixedText m_aNamespacesFT;
420 : : SvxSimpleTableContainer m_aNamespacesListContainer;
421 : : SvxSimpleTable m_aNamespacesList;
422 : : PushButton m_aAddNamespaceBtn;
423 : : PushButton m_aEditNamespaceBtn;
424 : : PushButton m_aDeleteNamespaceBtn;
425 : : FixedLine m_aButtonsFL;
426 : : OKButton m_aOKBtn;
427 : : CancelButton m_aEscBtn;
428 : : HelpButton m_aHelpBtn;
429 : :
430 : : AddConditionDialog* m_pConditionDlg;
431 : : PrefixList m_aRemovedList;
432 : :
433 : : XNameContainer_ref& m_rNamespaces;
434 : :
435 : : DECL_LINK( SelectHdl, SvxSimpleTable * );
436 : : DECL_LINK( ClickHdl, PushButton * );
437 : : DECL_LINK(OKHdl, void *);
438 : :
439 : : void LoadNamespaces();
440 : :
441 : : public:
442 : : NamespaceItemDialog( AddConditionDialog* pParent, XNameContainer_ref& _rContainer );
443 : : ~NamespaceItemDialog();
444 : : };
445 : :
446 : : //========================================================================
447 : : class ManageNamespaceDialog : public ModalDialog
448 : : {
449 : : private:
450 : : FixedText m_aPrefixFT;
451 : : Edit m_aPrefixED;
452 : : FixedText m_aUrlFT;
453 : : Edit m_aUrlED;
454 : : FixedLine m_aButtonsFL;
455 : : OKButton m_aOKBtn;
456 : : CancelButton m_aEscBtn;
457 : : HelpButton m_aHelpBtn;
458 : :
459 : : AddConditionDialog* m_pConditionDlg;
460 : :
461 : : DECL_LINK(OKHdl, void *);
462 : :
463 : : public:
464 : : ManageNamespaceDialog( Window* pParent, AddConditionDialog* _pCondDlg, bool _bIsEdit );
465 : : ~ManageNamespaceDialog();
466 : :
467 : : inline void SetNamespace( const String& _rPrefix, const String& _rURL );
468 : 0 : inline String GetPrefix() const { return m_aPrefixED.GetText(); }
469 : 0 : inline String GetURL() const { return m_aUrlED.GetText(); }
470 : : };
471 : :
472 : 0 : void ManageNamespaceDialog::SetNamespace( const String& _rPrefix, const String& _rURL )
473 : : {
474 : 0 : m_aPrefixED.SetText( _rPrefix );
475 : 0 : m_aUrlED.SetText( _rURL );
476 : 0 : }
477 : :
478 : : //========================================================================
479 : : class AddSubmissionDialog : public ModalDialog
480 : : {
481 : : private:
482 : : FixedLine m_aSubmissionFL;
483 : : FixedText m_aNameFT;
484 : : Edit m_aNameED;
485 : : FixedText m_aActionFT;
486 : : Edit m_aActionED;
487 : : FixedText m_aMethodFT;
488 : : ListBox m_aMethodLB;
489 : : FixedText m_aRefFT;
490 : : Edit m_aRefED;
491 : : PushButton m_aRefBtn;
492 : : FixedText m_aBindFT;
493 : : ListBox m_aBindLB;
494 : : FixedText m_aReplaceFT;
495 : : ListBox m_aReplaceLB;
496 : :
497 : : FixedLine m_aButtonsFL;
498 : : OKButton m_aOKBtn;
499 : : CancelButton m_aEscBtn;
500 : : HelpButton m_aHelpBtn;
501 : :
502 : : ItemNode* m_pItemNode;
503 : :
504 : : XFormsUIHelper1_ref m_xUIHelper;
505 : : XSubmission_ref m_xNewSubmission;
506 : : XPropertySet_ref m_xSubmission;
507 : : XPropertySet_ref m_xTempBinding;
508 : : XPropertySet_ref m_xCreatedBinding;
509 : :
510 : : DECL_LINK(RefHdl, void *);
511 : : DECL_LINK(OKHdl, void *);
512 : :
513 : : void FillAllBoxes();
514 : :
515 : : public:
516 : : AddSubmissionDialog( Window* pParent, ItemNode* _pNode,
517 : : const XFormsUIHelper1_ref& _rUIHelper );
518 : : ~AddSubmissionDialog();
519 : :
520 : 0 : inline const XSubmission_ref& GetNewSubmission() const { return m_xNewSubmission; }
521 : : };
522 : :
523 : : //========================================================================
524 : : class AddModelDialog : public ModalDialog
525 : : {
526 : : private:
527 : : FixedLine m_aModelFL;
528 : : FixedText m_aNameFT;
529 : : Edit m_aNameED;
530 : : CheckBox m_aModifyCB;
531 : : FixedLine m_aButtonsFL;
532 : : OKButton m_aOKBtn;
533 : : CancelButton m_aEscBtn;
534 : : HelpButton m_aHelpBtn;
535 : :
536 : : public:
537 : : AddModelDialog( Window* pParent, bool _bEdit );
538 : : ~AddModelDialog();
539 : :
540 : 0 : inline String GetName() const { return m_aNameED.GetText(); }
541 : 0 : inline void SetName( const String& _rName ) { m_aNameED.SetText( _rName );}
542 : :
543 : 0 : inline bool GetModifyDoc() const { return bool( m_aModifyCB.IsChecked() ); }
544 : 0 : inline void SetModifyDoc( const bool _bModify ) { m_aModifyCB.Check( _bModify ); }
545 : : };
546 : :
547 : : //========================================================================
548 : : class AddInstanceDialog : public ModalDialog
549 : : {
550 : : private:
551 : : FixedLine m_aInstanceFL;
552 : : FixedText m_aNameFT;
553 : : Edit m_aNameED;
554 : : FixedText m_aURLFT;
555 : : SvtURLBox m_aURLED;
556 : : PushButton m_aFilePickerBtn;
557 : : CheckBox m_aLinkInstanceCB;
558 : : FixedLine m_aButtonsFL;
559 : : OKButton m_aOKBtn;
560 : : CancelButton m_aEscBtn;
561 : : HelpButton m_aHelpBtn;
562 : :
563 : : String m_sAllFilterName;
564 : :
565 : : DECL_LINK(FilePickerHdl, void *);
566 : :
567 : : public:
568 : : AddInstanceDialog( Window* pParent, bool _bEdit );
569 : : ~AddInstanceDialog();
570 : :
571 : : inline void SetRenameMode();
572 : 0 : inline String GetName() const { return m_aNameED.GetText(); }
573 : 0 : inline void SetName( const String& _rName ) { m_aNameED.SetText( _rName );}
574 : 0 : inline String GetURL() const { return m_aURLED.GetText(); }
575 : 0 : inline void SetURL( const String& _rURL ) { m_aURLED.SetText( _rURL );}
576 : 0 : inline bool IsLinkInstance() const { return ( m_aLinkInstanceCB.IsChecked() != sal_False ); }
577 : 0 : inline void SetLinkInstance( bool _bLink ) { m_aLinkInstanceCB.Check( _bLink != false ); }
578 : : };
579 : :
580 : : inline void AddInstanceDialog::SetRenameMode()
581 : : {
582 : : m_aURLFT.Disable();
583 : : m_aURLED.Disable();
584 : : m_aFilePickerBtn.Disable();
585 : : m_aLinkInstanceCB.Disable();
586 : : }
587 : :
588 : : //========================================================================
589 [ # # ]: 0 : class LinkedInstanceWarningBox : public MessBox
590 : : {
591 : : public:
592 : : LinkedInstanceWarningBox( Window* pParent );
593 : : };
594 : :
595 : : //............................................................................
596 : : } // namespace svxform
597 : : //............................................................................
598 : :
599 : : #endif // _SVX_DATANAVI_HXX
600 : :
601 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|