xref: /aoo41x/main/sd/source/ui/app/sddll1.cxx (revision 02c50d82)
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 |*
59 |* Register all Factorys
60 |*
61 \************************************************************************/
62 
63 
RegisterFactorys()64 void SdDLL::RegisterFactorys()
65 {
66 	if (SvtModuleOptions().IsImpress())
67     {
68         ::sd::ImpressViewShellBase::RegisterFactory (
69             ::sd::IMPRESS_FACTORY_ID);
70         ::sd::SlideSorterViewShellBase::RegisterFactory (
71             ::sd::SLIDE_SORTER_FACTORY_ID);
72         ::sd::OutlineViewShellBase::RegisterFactory (
73             ::sd::OUTLINE_FACTORY_ID);
74         ::sd::PresentationViewShellBase::RegisterFactory (
75             ::sd::PRESENTATION_FACTORY_ID);
76     }
77 	if (SvtModuleOptions().IsDraw())
78     {
79 		::sd::GraphicViewShellBase::RegisterFactory (::sd::DRAW_FACTORY_ID);
80     }
81 }
82 
83 
84 
85 /*************************************************************************
86 |*
87 |* Register all Interfaces
88 |*
89 \************************************************************************/
90 
RegisterInterfaces()91 void SdDLL::RegisterInterfaces()
92 {
93 	// Modul
94 	SfxModule* pMod = SD_MOD();
95 	SdModule::RegisterInterface(pMod);
96 
97     // View shell base.
98 	::sd::ViewShellBase::RegisterInterface(pMod);
99 
100 	// DocShells
101 	::sd::DrawDocShell::RegisterInterface(pMod);
102 	::sd::GraphicDocShell::RegisterInterface(pMod);
103 
104 	// Impress ViewShells
105 	::sd::DrawViewShell::RegisterInterface(pMod);
106 	::sd::OutlineViewShell::RegisterInterface(pMod);
107 	::sd::PresentationViewShell::RegisterInterface(pMod);
108 
109 	// Draw ViewShell
110 	::sd::GraphicViewShell::RegisterInterface(pMod);
111 
112 	// Impress ObjectShells
113 	::sd::BezierObjectBar::RegisterInterface(pMod);
114 	::sd::TextObjectBar::RegisterInterface(pMod);
115 	::sd::GraphicObjectBar::RegisterInterface(pMod);
116 
117 	// Media ObjectShell
118 	::sd::MediaObjectBar::RegisterInterface(pMod);
119 
120 	// Table ObjectShell
121 	::sd::ui::table::RegisterInterfaces(pMod);
122 
123     // View shells for the side panes.
124     ::sd::slidesorter::SlideSorterViewShell::RegisterInterface (pMod);
125 }
126