xref: /aoo41x/main/sfx2/source/layout/factory.cxx (revision d119d52d)
1*d119d52dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*d119d52dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*d119d52dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*d119d52dSAndrew Rist  * distributed with this work for additional information
6*d119d52dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*d119d52dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*d119d52dSAndrew Rist  * "License"); you may not use this file except in compliance
9*d119d52dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*d119d52dSAndrew Rist  *
11*d119d52dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*d119d52dSAndrew Rist  *
13*d119d52dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*d119d52dSAndrew Rist  * software distributed under the License is distributed on an
15*d119d52dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d119d52dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*d119d52dSAndrew Rist  * specific language governing permissions and limitations
18*d119d52dSAndrew Rist  * under the License.
19*d119d52dSAndrew Rist  *
20*d119d52dSAndrew Rist  *************************************************************/
21*d119d52dSAndrew Rist 
22*d119d52dSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #include <com/sun/star/awt/WindowAttribute.hpp>
25cdf0e10cSrcweir #include <sal/types.h>
26cdf0e10cSrcweir #include <sfx2/basedlgs.hxx>
27cdf0e10cSrcweir #include <toolkit/awt/vclxtoolkit.hxx>
28cdf0e10cSrcweir #include <toolkit/awt/vclxdialog.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir using rtl::OUString;
31cdf0e10cSrcweir 
32cdf0e10cSrcweir class SfxModelessDialog_unprotect : public SfxModelessDialog
33cdf0e10cSrcweir {
34cdf0e10cSrcweir public:
35cdf0e10cSrcweir     SfxModelessDialog_unprotect (Window *parent, WinBits attributes);
36cdf0e10cSrcweir };
37cdf0e10cSrcweir 
38cdf0e10cSrcweir SFX2_DLLPUBLIC SfxBindings* sfx2_global_bindings;
39cdf0e10cSrcweir SFX2_DLLPUBLIC SfxChildWindow* sfx2_global_child;
40cdf0e10cSrcweir 
SfxModelessDialog_unprotect(Window * parent,WinBits bits)41cdf0e10cSrcweir SfxModelessDialog_unprotect::SfxModelessDialog_unprotect (Window *parent, WinBits bits)
42cdf0e10cSrcweir     : SfxModelessDialog (sfx2_global_bindings, sfx2_global_child, parent, bits)
43cdf0e10cSrcweir {
44cdf0e10cSrcweir }
45cdf0e10cSrcweir 
46cdf0e10cSrcweir extern "C"
47cdf0e10cSrcweir {
48cdf0e10cSrcweir 
CreateWindow(VCLXWindow ** vcl,OUString const & name,Window * parent,long & attributes)49cdf0e10cSrcweir SAL_DLLPUBLIC_EXPORT Window* CreateWindow (VCLXWindow** vcl, OUString const& name, Window* parent, long& attributes)
50cdf0e10cSrcweir {
51cdf0e10cSrcweir 	Window* window = 0;
52cdf0e10cSrcweir 	if (0)
53cdf0e10cSrcweir     {
54cdf0e10cSrcweir         ;
55cdf0e10cSrcweir     }
56cdf0e10cSrcweir 	else if (name.equalsAscii ("sfxmodelessdialog"))
57cdf0e10cSrcweir 	{
58cdf0e10cSrcweir 		window = new SfxModelessDialog_unprotect (parent, ImplGetWinBits (attributes, 0));
59cdf0e10cSrcweir 		*vcl = new layoutimpl::VCLXDialog ();
60cdf0e10cSrcweir 	}
61cdf0e10cSrcweir     return window;
62cdf0e10cSrcweir }
63cdf0e10cSrcweir 
64cdf0e10cSrcweir }
65