xref: /aoo42x/main/sd/source/ui/app/sddll1.cxx (revision 5b190011)
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 "taskpane/ToolPanelViewShell.hxx"
49 #include "FactoryIds.hxx"
50 #include "sdmod.hxx"
51 #include "app.hrc"
52 
53 namespace sd { namespace ui { namespace table {
54 	extern void RegisterInterfaces( SfxModule* pMod );
55 } } }
56 
57 
58 /*************************************************************************
59 |*
60 |* Register all Factorys
61 |*
62 \************************************************************************/
63 
64 
65 void SdDLL::RegisterFactorys()
66 {
67 	if (SvtModuleOptions().IsImpress())
68     {
69         ::sd::ImpressViewShellBase::RegisterFactory (
70             ::sd::IMPRESS_FACTORY_ID);
71         ::sd::SlideSorterViewShellBase::RegisterFactory (
72             ::sd::SLIDE_SORTER_FACTORY_ID);
73         ::sd::OutlineViewShellBase::RegisterFactory (
74             ::sd::OUTLINE_FACTORY_ID);
75         ::sd::PresentationViewShellBase::RegisterFactory (
76             ::sd::PRESENTATION_FACTORY_ID);
77     }
78 	if (SvtModuleOptions().IsDraw())
79     {
80 		::sd::GraphicViewShellBase::RegisterFactory (::sd::DRAW_FACTORY_ID);
81     }
82 }
83 
84 
85 
86 /*************************************************************************
87 |*
88 |* Register all Interfaces
89 |*
90 \************************************************************************/
91 
92 void SdDLL::RegisterInterfaces()
93 {
94 	// Modul
95 	SfxModule* pMod = SD_MOD();
96 	SdModule::RegisterInterface(pMod);
97 
98     // View shell base.
99 	::sd::ViewShellBase::RegisterInterface(pMod);
100 
101 	// DocShells
102 	::sd::DrawDocShell::RegisterInterface(pMod);
103 	::sd::GraphicDocShell::RegisterInterface(pMod);
104 
105 	// Impress ViewShells
106 	::sd::DrawViewShell::RegisterInterface(pMod);
107 	::sd::OutlineViewShell::RegisterInterface(pMod);
108 	::sd::PresentationViewShell::RegisterInterface(pMod);
109 
110 	// Draw ViewShell
111 	::sd::GraphicViewShell::RegisterInterface(pMod);
112 
113 	// Impress ObjectShells
114 	::sd::BezierObjectBar::RegisterInterface(pMod);
115 	::sd::TextObjectBar::RegisterInterface(pMod);
116 	::sd::GraphicObjectBar::RegisterInterface(pMod);
117 
118 	// Media ObjectShell
119 	::sd::MediaObjectBar::RegisterInterface(pMod);
120 
121 	// Table ObjectShell
122 	::sd::ui::table::RegisterInterfaces(pMod);
123 
124     // View shells for the side panes.
125     ::sd::slidesorter::SlideSorterViewShell::RegisterInterface (pMod);
126 	::sd::toolpanel::ToolPanelViewShell::RegisterInterface(pMod);
127     // Tell the tool panel view shell to register the interfaces of its
128     // controls.
129 	::sd::toolpanel::ToolPanelViewShell::RegisterControls();
130 }
131