LCOV - code coverage report
Current view: top level - libreoffice/sc/source/ui/app - scdll.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 123 123 100.0 %
Date: 2012-12-27 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #include <editeng/eeitem.hxx>
      21             : 
      22             : 
      23             : #include <svx/fmobjfac.hxx>
      24             : #include <svx/objfac3d.hxx>
      25             : #include <svx/tbxcolor.hxx>
      26             : 
      27             : #include <sot/clsids.hxx>
      28             : #include <sfx2/taskpane.hxx>
      29             : #include <sfx2/docfilt.hxx>
      30             : #include <sfx2/fcontnr.hxx>
      31             : #include <sfx2/docfile.hxx>
      32             : #include <sfx2/app.hxx>
      33             : #include <avmedia/mediaplayer.hxx>
      34             : #include <avmedia/mediatoolbox.hxx>
      35             : #include <comphelper/types.hxx>
      36             : #include <svx/extrusioncolorcontrol.hxx>
      37             : #include <svx/fontworkgallery.hxx>
      38             : #include <svx/tbxcustomshapes.hxx>
      39             : 
      40             : #include <svtools/parhtml.hxx>
      41             : #include <sot/formats.hxx>
      42             : 
      43             : #include "scitems.hxx"      // fuer tbxctrls etc.
      44             : #include "scmod.hxx"
      45             : #include "scresid.hxx"
      46             : #include "sc.hrc"
      47             : #include "cfgids.hxx"
      48             : 
      49             : //! die Registrierung wird wegen CLOOKs in ein eigenes File wandern muessen...
      50             : 
      51             : // Interface-Registrierung
      52             : #include "docsh.hxx"
      53             : #include "tabvwsh.hxx"
      54             : #include "prevwsh.hxx"
      55             : #include "drawsh.hxx"
      56             : #include "drformsh.hxx"
      57             : #include "drtxtob.hxx"
      58             : #include "editsh.hxx"
      59             : #include "pivotsh.hxx"
      60             : #include "auditsh.hxx"
      61             : #include "cellsh.hxx"
      62             : #include "oleobjsh.hxx"
      63             : #include "chartsh.hxx"
      64             : #include "graphsh.hxx"
      65             : #include "mediash.hxx"
      66             : #include "pgbrksh.hxx"
      67             : 
      68             : #include "docpool.hxx"
      69             : #include "appoptio.hxx"
      70             : 
      71             : // Controls
      72             : 
      73             : #include <svx/tbxalign.hxx>
      74             : #include <svx/tbxctl.hxx>
      75             : #include <svx/fillctrl.hxx>
      76             : #include <svx/linectrl.hxx>
      77             : #include <svx/tbcontrl.hxx>
      78             : #include <svx/selctrl.hxx>
      79             : #include <svx/insctrl.hxx>
      80             : #include <svx/zoomctrl.hxx>
      81             : #include <editeng/flditem.hxx>
      82             : #include <svx/modctrl.hxx>
      83             : #include <svx/pszctrl.hxx>
      84             : #include <svx/fntctl.hxx>
      85             : #include <svx/fntszctl.hxx>
      86             : #include <svx/grafctrl.hxx>
      87             : #include <svx/galbrws.hxx>
      88             : #include <svx/clipboardctl.hxx>
      89             : #include <svx/lboxctrl.hxx>
      90             : #include <svx/verttexttbxctrl.hxx>
      91             : #include <svx/formatpaintbrushctrl.hxx>
      92             : #include "tbinsert.hxx"
      93             : #include "tbzoomsliderctrl.hxx"
      94             : #include <svx/zoomsliderctrl.hxx>
      95             : 
      96             : #include <svx/xmlsecctrl.hxx>
      97             : // Child-Windows
      98             : #include "reffact.hxx"
      99             : #include "navipi.hxx"
     100             : #include "inputwin.hxx"
     101             : #include "spelldialog.hxx"
     102             : #include <svx/fontwork.hxx>
     103             : #include <svx/srchdlg.hxx>
     104             : #include <svx/hyperdlg.hxx>
     105             : #include <svx/imapdlg.hxx>
     106             : 
     107             : #include "editutil.hxx"
     108             : #include <svx/svdfield.hxx>     //  SdrRegisterFieldClasses
     109             : #include <rtl/logfile.hxx>
     110             : 
     111             : #include "dwfunctr.hxx"
     112             : #include "acredlin.hxx"
     113             : 
     114             : //------------------------------------------------------------------
     115             : 
     116             : 
     117             : //------------------------------------------------------------------
     118             : 
     119        2767 : ScResId::ScResId( sal_uInt16 nId ) :
     120        2767 :     ResId( nId, *SC_MOD()->GetResMgr() )
     121             : {
     122        2767 : }
     123             : 
     124             : //------------------------------------------------------------------
     125             : 
     126         120 : void ScDLL::Init()
     127             : {
     128             :     RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDLL::Init" );
     129             : 
     130         120 :     ScModule **ppShlPtr = (ScModule**) GetAppData(SHL_CALC);
     131         120 :     if ( *ppShlPtr )
     132         235 :         return;
     133             : 
     134           5 :     ScDocumentPool::InitVersionMaps();  // wird im ScModule ctor gebraucht
     135             : 
     136           5 :     ScModule* pMod = new ScModule( &ScDocShell::Factory() );
     137           5 :     (*ppShlPtr) = pMod;
     138             : 
     139           5 :     ScDocShell::Factory().SetDocumentServiceName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" )) );
     140             : 
     141           5 :     ScGlobal::Init();       // erst wenn der ResManager initialisiert ist
     142             :                             //  erst nach ScGlobal::Init duerfen die App-Optionen
     143             :                             //  initialisiert werden
     144             : 
     145             :     // register your view-factories here
     146             : 
     147           5 :     ScTabViewShell      ::RegisterFactory(1);
     148           5 :     ScPreviewShell      ::RegisterFactory(2);
     149             : 
     150             :     // register your shell-interfaces here
     151             : 
     152           5 :     ScModule            ::RegisterInterface(pMod);
     153           5 :     ScDocShell          ::RegisterInterface(pMod);
     154           5 :     ScTabViewShell      ::RegisterInterface(pMod);
     155           5 :     ScPreviewShell      ::RegisterInterface(pMod);
     156           5 :     ScDrawShell         ::RegisterInterface(pMod);
     157           5 :     ScDrawFormShell     ::RegisterInterface(pMod);
     158           5 :     ScDrawTextObjectBar ::RegisterInterface(pMod);
     159           5 :     ScEditShell         ::RegisterInterface(pMod);
     160           5 :     ScPivotShell        ::RegisterInterface(pMod);
     161           5 :     ScAuditingShell     ::RegisterInterface(pMod);
     162           5 :     ScFormatShell       ::RegisterInterface(pMod);
     163           5 :     ScCellShell         ::RegisterInterface(pMod);
     164           5 :     ScOleObjectShell    ::RegisterInterface(pMod);
     165           5 :     ScChartShell        ::RegisterInterface(pMod);
     166           5 :     ScGraphicShell      ::RegisterInterface(pMod);
     167           5 :     ScMediaShell        ::RegisterInterface(pMod);
     168           5 :     ScPageBreakShell    ::RegisterInterface(pMod);
     169             : 
     170             :     //  eigene Controller
     171           5 :     ScTbxInsertCtrl     ::RegisterControl(SID_TBXCTL_INSERT, pMod);
     172           5 :     ScTbxInsertCtrl     ::RegisterControl(SID_TBXCTL_INSCELLS, pMod);
     173           5 :     ScTbxInsertCtrl     ::RegisterControl(SID_TBXCTL_INSOBJ, pMod);
     174           5 :     ScZoomSliderControl ::RegisterControl(SID_PREVIEW_SCALINGFACTOR, pMod);
     175             : 
     176             :     //  Svx-Toolbox-Controller
     177           5 :     SvxTbxCtlDraw                   ::RegisterControl(SID_INSERT_DRAW,          pMod);
     178           5 :     SvxTbxCtlCustomShapes           ::RegisterControl(SID_DRAWTBX_CS_BASIC,     pMod);
     179           5 :     SvxTbxCtlCustomShapes           ::RegisterControl(SID_DRAWTBX_CS_SYMBOL,    pMod);
     180           5 :     SvxTbxCtlCustomShapes           ::RegisterControl(SID_DRAWTBX_CS_ARROW,     pMod);
     181           5 :     SvxTbxCtlCustomShapes           ::RegisterControl(SID_DRAWTBX_CS_FLOWCHART, pMod);
     182           5 :     SvxTbxCtlCustomShapes           ::RegisterControl(SID_DRAWTBX_CS_CALLOUT,   pMod);
     183           5 :     SvxTbxCtlCustomShapes           ::RegisterControl(SID_DRAWTBX_CS_STAR,      pMod);
     184           5 :     SvxTbxCtlAlign                  ::RegisterControl(SID_OBJECT_ALIGN,         pMod);
     185           5 :     SvxFillToolBoxControl           ::RegisterControl(0, pMod);
     186           5 :     SvxLineStyleToolBoxControl      ::RegisterControl(0, pMod);
     187           5 :     SvxLineWidthToolBoxControl      ::RegisterControl(0, pMod);
     188           5 :     SvxLineColorToolBoxControl      ::RegisterControl(0, pMod);
     189           5 :     SvxLineEndToolBoxControl        ::RegisterControl(SID_ATTR_LINEEND_STYLE,   pMod);
     190           5 :     SvxStyleToolBoxControl          ::RegisterControl(SID_STYLE_APPLY,          pMod);
     191           5 :     SvxFontNameToolBoxControl       ::RegisterControl(SID_ATTR_CHAR_FONT,       pMod);
     192           5 :     SvxColorExtToolBoxControl       ::RegisterControl(SID_ATTR_CHAR_COLOR,      pMod);
     193           5 :     SvxColorExtToolBoxControl       ::RegisterControl(SID_BACKGROUND_COLOR,     pMod);
     194           5 :     SvxFrameToolBoxControl          ::RegisterControl(SID_ATTR_BORDER,          pMod);
     195           5 :     SvxFrameLineStyleToolBoxControl ::RegisterControl(SID_FRAME_LINESTYLE,      pMod);
     196           5 :     SvxColorExtToolBoxControl       ::RegisterControl(SID_FRAME_LINECOLOR,      pMod);
     197           5 :     SvxClipBoardControl             ::RegisterControl(SID_PASTE,                pMod );
     198           5 :     SvxUndoRedoControl              ::RegisterControl(SID_UNDO,                 pMod );
     199           5 :     SvxUndoRedoControl              ::RegisterControl(SID_REDO,                 pMod );
     200           5 :     svx::FormatPaintBrushToolBoxControl::RegisterControl(SID_FORMATPAINTBRUSH,  pMod );
     201             : 
     202           5 :     SvxGrafModeToolBoxControl       ::RegisterControl(SID_ATTR_GRAF_MODE,       pMod);
     203           5 :     SvxGrafRedToolBoxControl        ::RegisterControl(SID_ATTR_GRAF_RED,        pMod);
     204           5 :     SvxGrafGreenToolBoxControl      ::RegisterControl(SID_ATTR_GRAF_GREEN,      pMod);
     205           5 :     SvxGrafBlueToolBoxControl       ::RegisterControl(SID_ATTR_GRAF_BLUE,       pMod);
     206           5 :     SvxGrafLuminanceToolBoxControl  ::RegisterControl(SID_ATTR_GRAF_LUMINANCE,  pMod);
     207           5 :     SvxGrafContrastToolBoxControl   ::RegisterControl(SID_ATTR_GRAF_CONTRAST,   pMod);
     208           5 :     SvxGrafGammaToolBoxControl      ::RegisterControl(SID_ATTR_GRAF_GAMMA,      pMod);
     209           5 :     SvxGrafTransparenceToolBoxControl::RegisterControl(SID_ATTR_GRAF_TRANSPARENCE, pMod);
     210           5 :     SvxGrafFilterToolBoxControl     ::RegisterControl(SID_GRFFILTER,            pMod);
     211             : 
     212           5 :     SvxVertTextTbxCtrl::RegisterControl(SID_DRAW_CAPTION_VERTICAL,          pMod);
     213           5 :     SvxVertTextTbxCtrl::RegisterControl(SID_DRAW_TEXT_VERTICAL,             pMod);
     214           5 :     SvxVertTextTbxCtrl::RegisterControl(SID_TEXTDIRECTION_LEFT_TO_RIGHT,    pMod);
     215           5 :     SvxVertTextTbxCtrl::RegisterControl(SID_TEXTDIRECTION_TOP_TO_BOTTOM,    pMod);
     216           5 :     SvxCTLTextTbxCtrl::RegisterControl(SID_ATTR_PARA_LEFT_TO_RIGHT, pMod);
     217           5 :     SvxCTLTextTbxCtrl::RegisterControl(SID_ATTR_PARA_RIGHT_TO_LEFT, pMod);
     218             : 
     219             :     //Media Controller
     220           5 :     ::avmedia::MediaToolBoxControl::RegisterControl( SID_AVMEDIA_TOOLBOX, pMod );
     221             : 
     222             :     // common SFX controller
     223           5 :     ::sfx2::TaskPaneWrapper::RegisterChildWindow( false, pMod );
     224             : 
     225             :     // Svx-StatusBar-Controller
     226           5 :     SvxInsertStatusBarControl       ::RegisterControl(SID_ATTR_INSERT,      pMod);
     227           5 :     SvxSelectionModeControl         ::RegisterControl(SID_STATUS_SELMODE,   pMod);
     228           5 :     SvxZoomStatusBarControl         ::RegisterControl(SID_ATTR_ZOOM,        pMod);
     229           5 :     SvxZoomSliderControl            ::RegisterControl(SID_ATTR_ZOOMSLIDER,  pMod);
     230           5 :     SvxModifyControl                ::RegisterControl(SID_DOC_MODIFIED,     pMod);
     231           5 :     XmlSecStatusBarControl          ::RegisterControl( SID_SIGNATURE,       pMod );
     232             : 
     233           5 :     SvxPosSizeStatusBarControl      ::RegisterControl(SID_ATTR_SIZE,        pMod);
     234             : 
     235             :     // Svx-Menue-Controller
     236           5 :     SvxFontMenuControl              ::RegisterControl(SID_ATTR_CHAR_FONT,       pMod);
     237           5 :     SvxFontSizeMenuControl          ::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT, pMod);
     238             : 
     239             :     // CustomShape extrusion controller
     240           5 :     svx::ExtrusionColorControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
     241           5 :     svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod );
     242             : 
     243             :     //  Child-Windows
     244             : 
     245             :     // Hack: Eingabezeile mit 42 registrieren, damit sie im PlugIn immer sichtbar ist
     246           5 :     ScInputWindowWrapper        ::RegisterChildWindow(42, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK);
     247             :     ScNavigatorDialogWrapper    ::RegisterChildWindowContext(
     248           5 :             sal::static_int_cast<sal_uInt16>(ScTabViewShell::GetInterfaceId()), pMod);
     249           5 :     ScSolverDlgWrapper          ::RegisterChildWindow(false, pMod);
     250           5 :     ScOptSolverDlgWrapper       ::RegisterChildWindow(false, pMod);
     251           5 :     ScXMLSourceDlgWrapper       ::RegisterChildWindow(false, pMod);
     252           5 :     ScNameDlgWrapper            ::RegisterChildWindow(false, pMod);
     253           5 :     ScNameDefDlgWrapper         ::RegisterChildWindow(false, pMod);
     254           5 :     ScPivotLayoutWrapper        ::RegisterChildWindow(false, pMod);
     255           5 :     ScTabOpDlgWrapper           ::RegisterChildWindow(false, pMod);
     256           5 :     ScFilterDlgWrapper          ::RegisterChildWindow(false, pMod);
     257           5 :     ScSpecialFilterDlgWrapper   ::RegisterChildWindow(false, pMod);
     258           5 :     ScDbNameDlgWrapper          ::RegisterChildWindow(false, pMod);
     259           5 :     ScConsolidateDlgWrapper     ::RegisterChildWindow(false, pMod);
     260           5 :     ScPrintAreasDlgWrapper      ::RegisterChildWindow(false, pMod);
     261           5 :     ScColRowNameRangesDlgWrapper::RegisterChildWindow(false, pMod);
     262           5 :     ScFormulaDlgWrapper         ::RegisterChildWindow(false, pMod);
     263             : 
     264             :     // First docking Window for Calc
     265           5 :     ScFunctionChildWindow       ::RegisterChildWindow(false, pMod);
     266             : 
     267             :     // Redlining- Window
     268           5 :     ScAcceptChgDlgWrapper       ::RegisterChildWindow(false, pMod);
     269           5 :     ScSimpleRefDlgWrapper       ::RegisterChildWindow(false, pMod, SFX_CHILDWIN_ALWAYSAVAILABLE|SFX_CHILDWIN_NEVERHIDE );
     270           5 :     ScHighlightChgDlgWrapper    ::RegisterChildWindow(false, pMod);
     271             : 
     272           5 :     SvxSearchDialogWrapper      ::RegisterChildWindow(false, pMod);
     273           5 :     SvxHlinkDlgWrapper          ::RegisterChildWindow(false, pMod);
     274           5 :     SvxFontWorkChildWindow      ::RegisterChildWindow(false, pMod);
     275           5 :     SvxIMapDlgChildWindow       ::RegisterChildWindow(false, pMod);
     276           5 :     GalleryChildWindow          ::RegisterChildWindow(false, pMod);
     277           5 :     ScSpellDialogChildWindow    ::RegisterChildWindow(false, pMod);
     278             : 
     279           5 :     ScValidityRefChildWin::RegisterChildWindow(false, pMod);
     280             : 
     281             :     //  Edit-Engine-Felder, soweit nicht schon in OfficeApplication::Init
     282             : 
     283           5 :     SvClassManager& rClassManager = SvxFieldItem::GetClassManager();
     284           5 :     rClassManager.Register(SvxPagesField::StaticClassId(), SvxPagesField::CreateInstance);
     285           5 :     rClassManager.Register(SvxFileField::StaticClassId(),  SvxFileField::CreateInstance);
     286           5 :     rClassManager.Register(SvxTableField::StaticClassId(), SvxTableField::CreateInstance);
     287             : 
     288           5 :     SdrRegisterFieldClasses();      // SvDraw-Felder registrieren
     289             : 
     290             :     // 3D-Objekt-Factory eintragen
     291           5 :     E3dObjFactory();
     292             : 
     293             :     // ::com::sun::star::form::component::Form-Objekt-Factory eintragen
     294           5 :     FmFormObjFactory();
     295             : 
     296           5 :     pMod->PutItem( SfxUInt16Item( SID_ATTR_METRIC, sal::static_int_cast<sal_uInt16>(pMod->GetAppOptions().GetAppMetric()) ) );
     297             : 
     298             :     //  StarOne Services are now handled in the registry
     299          15 : }
     300             : 
     301             : // DetectFilter functionality has moved - please update your bookmarks
     302             : // see sc/source/ui/unoobj/scdetect.cxx, have a nice day.
     303             : 
     304             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10