LCOV - code coverage report
Current view: top level - sd/source/ui/accessibility - SdShapeTypes.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 5 11 45.5 %
Date: 2014-11-03 Functions: 1 2 50.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 "SdShapeTypes.hxx"
      21             : #include "AccessiblePresentationShape.hxx"
      22             : #include "AccessiblePresentationGraphicShape.hxx"
      23             : #include "AccessiblePresentationOLEShape.hxx"
      24             : #include <rtl/ustring.hxx>
      25             : 
      26             : namespace accessibility {
      27             : 
      28             : AccessibleShape*
      29           0 :     CreateSdAccessibleShape (
      30             :         const AccessibleShapeInfo& rShapeInfo,
      31             :         const AccessibleShapeTreeInfo& rShapeTreeInfo,
      32             :         ShapeTypeId nId)
      33             : {
      34           0 :     switch (nId)
      35             :     {
      36             :         case PRESENTATION_TITLE:
      37             :         case PRESENTATION_OUTLINER:
      38             :         case PRESENTATION_SUBTITLE:
      39             :         case PRESENTATION_PAGE:
      40             :         case PRESENTATION_NOTES:
      41             :         case PRESENTATION_HANDOUT:
      42             :         case PRESENTATION_HEADER:
      43             :         case PRESENTATION_FOOTER:
      44             :         case PRESENTATION_DATETIME:
      45             :         case PRESENTATION_PAGENUMBER:
      46           0 :             return new AccessiblePresentationShape (rShapeInfo, rShapeTreeInfo);
      47             : 
      48             :         case PRESENTATION_GRAPHIC_OBJECT:
      49           0 :             return new AccessiblePresentationGraphicShape (rShapeInfo, rShapeTreeInfo);
      50             : 
      51             :         case PRESENTATION_OLE:
      52             :         case PRESENTATION_CHART:
      53             :         case PRESENTATION_TABLE:
      54           0 :             return new AccessiblePresentationOLEShape (rShapeInfo, rShapeTreeInfo);
      55             : 
      56             :         default:
      57           0 :             return new AccessibleShape (rShapeInfo, rShapeTreeInfo);
      58             :     }
      59             : }
      60             : 
      61          36 : void RegisterImpressShapeTypes (void)
      62             : {
      63             :     /** List of shape type descriptors corresponding to the
      64             :         <type>SdShapeTypes</type> enum.
      65             :     */
      66             :     ShapeTypeDescriptor aSdShapeTypeList[] = {
      67             :         ShapeTypeDescriptor (
      68             :             PRESENTATION_OUTLINER,
      69             :             "com.sun.star.presentation.OutlinerShape",
      70             :             CreateSdAccessibleShape ),
      71             :         ShapeTypeDescriptor (
      72             :             PRESENTATION_SUBTITLE,
      73             :             "com.sun.star.presentation.SubtitleShape",
      74             :             CreateSdAccessibleShape ),
      75             :         ShapeTypeDescriptor (
      76             :             PRESENTATION_GRAPHIC_OBJECT,
      77             :             "com.sun.star.presentation.GraphicObjectShape",
      78             :             CreateSdAccessibleShape ),
      79             :         ShapeTypeDescriptor (
      80             :             PRESENTATION_PAGE,
      81             :             "com.sun.star.presentation.PageShape",
      82             :             CreateSdAccessibleShape ),
      83             :         ShapeTypeDescriptor (
      84             :             PRESENTATION_OLE,
      85             :             "com.sun.star.presentation.OLE2Shape",
      86             :             CreateSdAccessibleShape ),
      87             :         ShapeTypeDescriptor (
      88             :             PRESENTATION_CHART,
      89             :             "com.sun.star.presentation.ChartShape",
      90             :             CreateSdAccessibleShape ),
      91             :         ShapeTypeDescriptor (
      92             :             PRESENTATION_TABLE,
      93             :             "com.sun.star.presentation.TableShape",
      94             :             CreateSdAccessibleShape ),
      95             :         ShapeTypeDescriptor (
      96             :             PRESENTATION_NOTES,
      97             :             "com.sun.star.presentation.NotesShape",
      98             :             CreateSdAccessibleShape ),
      99             :         ShapeTypeDescriptor (
     100             :             PRESENTATION_TITLE,
     101             :             "com.sun.star.presentation.TitleTextShape",
     102             :             CreateSdAccessibleShape ),
     103             :         ShapeTypeDescriptor (
     104             :             PRESENTATION_HANDOUT,
     105             :             "com.sun.star.presentation.HandoutShape",
     106             :             CreateSdAccessibleShape ),
     107             :         ShapeTypeDescriptor (
     108             :             PRESENTATION_HEADER,
     109             :             "com.sun.star.presentation.HeaderShape",
     110             :             CreateSdAccessibleShape ),
     111             :         ShapeTypeDescriptor (
     112             :             PRESENTATION_FOOTER,
     113             :             "com.sun.star.presentation.FooterShape",
     114             :             CreateSdAccessibleShape ),
     115             :         ShapeTypeDescriptor (
     116             :             PRESENTATION_DATETIME,
     117             :             "com.sun.star.presentation.DateTimeShape",
     118             :             CreateSdAccessibleShape ),
     119             :         ShapeTypeDescriptor (
     120             :             PRESENTATION_PAGENUMBER,
     121             :             "com.sun.star.presentation.SlideNumberShape",
     122             :             CreateSdAccessibleShape )
     123         540 :     };
     124             : 
     125          36 :     ShapeTypeHandler::Instance().AddShapeTypeList (
     126             :         PRESENTATION_PAGENUMBER - PRESENTATION_OUTLINER + 1,
     127         540 :         aSdShapeTypeList);
     128          36 : }
     129             : 
     130             : } // end of namespace accessibility
     131             : 
     132             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10