1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef __FRAMEWORK_CLASSES_TASKCREATOR_HXX_
29 #define __FRAMEWORK_CLASSES_TASKCREATOR_HXX_
30 
31 //_________________________________________________________________________________________________________________
32 //	my own includes
33 //_________________________________________________________________________________________________________________
34 
35 #include <threadhelp/threadhelpbase.hxx>
36 #include <macros/generic.hxx>
37 #include <macros/debug.hxx>
38 #include <general.h>
39 
40 //_________________________________________________________________________________________________________________
41 //	interface includes
42 //_________________________________________________________________________________________________________________
43 #include <com/sun/star/frame/XFramesSupplier.hpp>
44 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
45 
46 //_________________________________________________________________________________________________________________
47 //	other includes
48 //_________________________________________________________________________________________________________________
49 #include <com/sun/star/uno/Reference.hxx>
50 #include <rtl/ustring.hxx>
51 
52 //_________________________________________________________________________________________________________________
53 //	namespace
54 //_________________________________________________________________________________________________________________
55 
56 namespace framework{
57 
58 //_________________________________________________________________________________________________________________
59 //	exported const
60 //_________________________________________________________________________________________________________________
61 
62 //_________________________________________________________________________________________________________________
63 //	exported definitions
64 //_________________________________________________________________________________________________________________
65 
66 /*-************************************************************************************************************//**
67     @short          a helper to create new tasks or sub frames for "_blank" or FrameSearchFlag::CREATE
68     @descr          There are different places to create new (task)frames. Its not easy to service this code!
69                     Thats the reason for this helper. He capsulate asynchronous/synchronous creation by calling
70                     a simple interface.
71 
72 	@devstatus		ready to use
73     @threadsafe     yes
74     @modified       20.08.2003 08:37, as96863
75 *//*-*************************************************************************************************************/
76 class TaskCreator : private ThreadHelpBase
77 {
78     //_______________________
79     // member
80     private:
81 
82         css::uno::Reference< css::lang::XMultiServiceFactory >  m_xSMGR;
83 
84     //_______________________
85     // interface
86 	public:
87 
88                  TaskCreator( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR );
89         virtual ~TaskCreator(                                                                     );
90 
91         css::uno::Reference< css::frame::XFrame > createTask( const ::rtl::OUString& sName    ,
92                                                                     sal_Bool         bVisible );
93 
94     //_______________________
95     // helper
96     private:
97 
98 }; // class TaskCreator
99 
100 } // namespace framework
101 
102 #endif // #ifndef __FRAMEWORK_CLASSES_TASKCREATOR_HXX_
103