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

Generated by: LCOV version 1.10