xref: /aoo4110/main/sfx2/source/layout/factory.cxx (revision b1cdbd2c)
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 #include <com/sun/star/awt/WindowAttribute.hpp>
25 #include <sal/types.h>
26 #include <sfx2/basedlgs.hxx>
27 #include <toolkit/awt/vclxtoolkit.hxx>
28 #include <toolkit/awt/vclxdialog.hxx>
29 
30 using rtl::OUString;
31 
32 class SfxModelessDialog_unprotect : public SfxModelessDialog
33 {
34 public:
35     SfxModelessDialog_unprotect (Window *parent, WinBits attributes);
36 };
37 
38 SFX2_DLLPUBLIC SfxBindings* sfx2_global_bindings;
39 SFX2_DLLPUBLIC SfxChildWindow* sfx2_global_child;
40 
SfxModelessDialog_unprotect(Window * parent,WinBits bits)41 SfxModelessDialog_unprotect::SfxModelessDialog_unprotect (Window *parent, WinBits bits)
42     : SfxModelessDialog (sfx2_global_bindings, sfx2_global_child, parent, bits)
43 {
44 }
45 
46 extern "C"
47 {
48 
CreateWindow(VCLXWindow ** vcl,OUString const & name,Window * parent,long & attributes)49 SAL_DLLPUBLIC_EXPORT Window* CreateWindow (VCLXWindow** vcl, OUString const& name, Window* parent, long& attributes)
50 {
51 	Window* window = 0;
52 	if (0)
53     {
54         ;
55     }
56 	else if (name.equalsAscii ("sfxmodelessdialog"))
57 	{
58 		window = new SfxModelessDialog_unprotect (parent, ImplGetWinBits (attributes, 0));
59 		*vcl = new layoutimpl::VCLXDialog ();
60 	}
61     return window;
62 }
63 
64 }
65