bump product version to 4.1.6.2
[LibreOffice.git] / sd / source / ui / app / sddll.cxx
blobd76fedfa02671595f14e58c256f2b9c1c2c88d43
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <editeng/eeitem.hxx>
22 #include <editeng/editeng.hxx>
23 #include <svx/svdobj.hxx>
24 #include <unotools/moduleoptions.hxx>
25 #include <svx/fmobjfac.hxx>
26 #include <svx/svdfield.hxx>
27 #include <svx/objfac3d.hxx>
29 #include "sddll.hxx"
30 #include "DrawDocShell.hxx"
31 #include "GraphicDocShell.hxx"
32 #include "sdresid.hxx"
33 #include "sdobjfac.hxx"
34 #include "cfgids.hxx"
35 #include "strmname.h"
36 #include "SdShapeTypes.hxx"
38 #include <svx/SvxShapeTypes.hxx>
39 #include <sfx2/docfilt.hxx>
40 #include <sfx2/docfile.hxx>
41 #include <sfx2/fcontnr.hxx>
42 #include <vcl/FilterConfigItem.hxx>
43 #include <comphelper/processfactory.hxx>
45 using namespace ::rtl;
46 using namespace ::com::sun::star;
49 /*************************************************************************
51 |* Init
53 \************************************************************************/
55 void SdDLL::Init()
57 if ( SD_MOD() )
58 return;
60 SfxObjectFactory* pDrawFact = NULL;
61 SfxObjectFactory* pImpressFact = NULL;
63 if (SvtModuleOptions().IsImpress())
64 pImpressFact = &::sd::DrawDocShell::Factory();
66 if (SvtModuleOptions().IsDraw())
67 pDrawFact = &::sd::GraphicDocShell::Factory();
69 // the SdModule must be created
70 SdModule** ppShlPtr = (SdModule**) GetAppData(SHL_DRAW);
72 // #i46427#
73 // The SfxModule::SfxModule stops when the first given factory
74 // is 0, so we must not give a 0 as first factory
75 if( pImpressFact )
77 (*ppShlPtr) = new SdModule( pImpressFact, pDrawFact );
79 else
81 (*ppShlPtr) = new SdModule( pDrawFact, pImpressFact );
84 if (SvtModuleOptions().IsImpress())
86 // Register the Impress shape types in order to make the shapes accessible.
87 ::accessibility::RegisterImpressShapeTypes ();
88 ::sd::DrawDocShell::Factory().SetDocumentServiceName( "com.sun.star.presentation.PresentationDocument" );
91 if (SvtModuleOptions().IsDraw())
93 ::sd::GraphicDocShell::Factory().SetDocumentServiceName( "com.sun.star.drawing.DrawingDocument" );
96 // register your view-factories here
97 RegisterFactorys();
99 // register your shell-interfaces here
100 RegisterInterfaces();
102 // register your controllers here
103 RegisterControllers();
105 // register SvDraw-Fields
106 SdrRegisterFieldClasses();
108 // register 3D-Objekt-Factory
109 E3dObjFactory();
111 // register ::com::sun::star::form::component::Form-Object-Factory
112 FmFormObjFactory();
114 // register Object-Factory
115 SdrObjFactory::InsertMakeUserDataHdl(LINK(&aSdObjectFactory, SdObjectFactory, MakeUserData));
117 // register your exotic remote controlls here
118 #ifdef ENABLE_SDREMOTE
119 RegisterRemotes();
120 #endif
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */