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 __FRAMEWORK_CLASSES_TASKCREATOR_HXX_ 25 #define __FRAMEWORK_CLASSES_TASKCREATOR_HXX_ 26 27 //_________________________________________________________________________________________________________________ 28 // my own includes 29 //_________________________________________________________________________________________________________________ 30 31 #include <threadhelp/threadhelpbase.hxx> 32 #include <macros/generic.hxx> 33 #include <macros/debug.hxx> 34 #include <general.h> 35 36 //_________________________________________________________________________________________________________________ 37 // interface includes 38 //_________________________________________________________________________________________________________________ 39 #include <com/sun/star/frame/XFramesSupplier.hpp> 40 #include <com/sun/star/lang/XMultiServiceFactory.hpp> 41 42 //_________________________________________________________________________________________________________________ 43 // other includes 44 //_________________________________________________________________________________________________________________ 45 #include <com/sun/star/uno/Reference.hxx> 46 #include <rtl/ustring.hxx> 47 48 //_________________________________________________________________________________________________________________ 49 // namespace 50 //_________________________________________________________________________________________________________________ 51 52 namespace framework{ 53 54 //_________________________________________________________________________________________________________________ 55 // exported const 56 //_________________________________________________________________________________________________________________ 57 58 //_________________________________________________________________________________________________________________ 59 // exported definitions 60 //_________________________________________________________________________________________________________________ 61 62 /*-************************************************************************************************************//** 63 @short a helper to create new tasks or sub frames for "_blank" or FrameSearchFlag::CREATE 64 @descr There are different places to create new (task)frames. Its not easy to service this code! 65 Thats the reason for this helper. He capsulate asynchronous/synchronous creation by calling 66 a simple interface. 67 68 @devstatus ready to use 69 @threadsafe yes 70 @modified 20.08.2003 08:37, as96863 71 *//*-*************************************************************************************************************/ 72 class TaskCreator : private ThreadHelpBase 73 { 74 //_______________________ 75 // member 76 private: 77 78 css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; 79 80 //_______________________ 81 // interface 82 public: 83 84 TaskCreator( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR ); 85 virtual ~TaskCreator( ); 86 87 css::uno::Reference< css::frame::XFrame > createTask( const ::rtl::OUString& sName , 88 sal_Bool bVisible ); 89 90 //_______________________ 91 // helper 92 private: 93 94 }; // class TaskCreator 95 96 } // namespace framework 97 98 #endif // #ifndef __FRAMEWORK_CLASSES_TASKCREATOR_HXX_ 99