xref: /trunk/main/sd/source/ui/app/sddll1.cxx (revision 16e7aaae)
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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sd.hxx"
26 
27 
28 #include <unotools/moduleoptions.hxx>
29 #include "sddll.hxx"
30 #include "diactrl.hxx"
31 #include "tbx_ww.hxx"
32 #include "TextObjectBar.hxx"
33 #include "BezierObjectBar.hxx"
34 #include "GraphicObjectBar.hxx"
35 #include "MediaObjectBar.hxx"
36 #include "ImpressViewShellBase.hxx"
37 #include "PresentationViewShellBase.hxx"
38 #include "OutlineViewShell.hxx"
39 #include "PresentationViewShell.hxx"
40 #include "OutlineViewShellBase.hxx"
41 #include "SlideSorterViewShellBase.hxx"
42 #include "DrawViewShell.hxx"
43 #include "GraphicViewShell.hxx"
44 #include "GraphicViewShellBase.hxx"
45 #include "DrawDocShell.hxx"
46 #include "GraphicDocShell.hxx"
47 #include "SlideSorterViewShell.hxx"
48 #include "FactoryIds.hxx"
49 #include "sdmod.hxx"
50 #include "app.hrc"
51 
52 namespace sd { namespace ui { namespace table {
53 	extern void RegisterInterfaces( SfxModule* pMod );
54 } } }
55 
56 
57 /*************************************************************************
58 |* Register all Factorys
59 \************************************************************************/
60 
61 
RegisterFactorys()62 void SdDLL::RegisterFactorys()
63 {
64 	if (SvtModuleOptions().IsImpress())
65 	{
66 		::sd::ImpressViewShellBase::RegisterFactory (
67 			::sd::IMPRESS_FACTORY_ID);
68 		::sd::SlideSorterViewShellBase::RegisterFactory (
69 			::sd::SLIDE_SORTER_FACTORY_ID);
70 		::sd::OutlineViewShellBase::RegisterFactory (
71 			::sd::OUTLINE_FACTORY_ID);
72 		::sd::PresentationViewShellBase::RegisterFactory (
73 			::sd::PRESENTATION_FACTORY_ID);
74 	}
75 	if (SvtModuleOptions().IsDraw())
76 	{
77 		::sd::GraphicViewShellBase::RegisterFactory (::sd::DRAW_FACTORY_ID);
78 	}
79 }
80 
81 
82 
83 /*************************************************************************
84 |* Register all Interfaces
85 \************************************************************************/
86 
RegisterInterfaces()87 void SdDLL::RegisterInterfaces()
88 {
89 	// Modul
90 	SfxModule* pMod = SD_MOD();
91 	SdModule::RegisterInterface(pMod);
92 
93 	// View shell base.
94 	::sd::ViewShellBase::RegisterInterface(pMod);
95 
96 	// DocShells
97 	::sd::DrawDocShell::RegisterInterface(pMod);
98 	::sd::GraphicDocShell::RegisterInterface(pMod);
99 
100 	// Impress ViewShells
101 	::sd::DrawViewShell::RegisterInterface(pMod);
102 	::sd::OutlineViewShell::RegisterInterface(pMod);
103 	::sd::PresentationViewShell::RegisterInterface(pMod);
104 
105 	// Draw ViewShell
106 	::sd::GraphicViewShell::RegisterInterface(pMod);
107 
108 	// Impress ObjectShells
109 	::sd::BezierObjectBar::RegisterInterface(pMod);
110 	::sd::TextObjectBar::RegisterInterface(pMod);
111 	::sd::GraphicObjectBar::RegisterInterface(pMod);
112 
113 	// Media ObjectShell
114 	::sd::MediaObjectBar::RegisterInterface(pMod);
115 
116 	// Table ObjectShell
117 	::sd::ui::table::RegisterInterfaces(pMod);
118 
119 	// View shells for the side panes.
120 	::sd::slidesorter::SlideSorterViewShell::RegisterInterface (pMod);
121 }
122