1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef DBAUI_COLLECTIONVIEW_HXX
25 #define DBAUI_COLLECTIONVIEW_HXX
26 
27 #ifndef _SVT_FILEVIEW_HXX
28 #include <svtools/fileview.hxx>
29 #endif
30 #ifndef _BUTTON_HXX //autogen
31 #include <vcl/button.hxx>
32 #endif
33 #ifndef _SV_EDIT_HXX
34 #include <vcl/edit.hxx>
35 #endif
36 #ifndef _SV_FIXED_HXX
37 #include <vcl/fixed.hxx>
38 #endif
39 #ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
40 #include <com/sun/star/ucb/XContent.hpp>
41 #endif
42 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
43 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
44 #endif
45 
46 //.........................................................................
47 namespace dbaui
48 {
49 //.........................................................................
50 	/* this class allows to browse through the collection of forms and reports
51 	*/
52 	class OCollectionView : public ModalDialog
53 	{
54 		FixedText		m_aFTCurrentPath;
55 		ImageButton		m_aNewFolder;
56 		ImageButton		m_aUp;
57 		SvtFileView		m_aView;
58 		FixedText		m_aFTName;
59 		Edit			m_aName;
60 		FixedLine		m_aFL;
61 		PushButton		m_aPB_OK;
62 		CancelButton	m_aPB_CANCEL;
63 		HelpButton		m_aPB_HELP;
64 		String			m_sPath;
65 		::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>					m_xContent;
66 		::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >	m_xORB;
67 		Size			m_aDlgSize;
68 		Size			m_a6Size;
69 		sal_Int32		m_nFixDeltaHeight;
70 		sal_Bool		m_bCreateForm;
71 
72 		DECL_LINK(Up_Click,PushButton*);
73 		DECL_LINK(NewFolder_Click,PushButton*);
74 		DECL_LINK(Save_Click,PushButton*);
75 		DECL_LINK(Dbl_Click_FileView,SvtFileView*);
76 
77 		/// sets the fixedtext to the right content
78 		void initCurrentPath();
79 	public:
80 		OCollectionView( Window * pParent
81 						,const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent
82 						,const ::rtl::OUString& _sDefaultName
83 						,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB);
84 		virtual ~OCollectionView();
85 
86 		::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent> getSelectedFolder() const;
87 		::rtl::OUString getName() const;
88 	};
89 //.........................................................................
90 }	// namespace dbaui
91 //.........................................................................
92 
93 
94 #endif //DBAUI_COLLECTIONVIEW_HXX
95 
96 
97