LCOV - code coverage report
Current view: top level - sd/source/ui/accessibility - AccessiblePresentationShape.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 47 0.0 %
Date: 2012-08-25 Functions: 0 6 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 80 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #include "AccessiblePresentationShape.hxx"
      30                 :            : 
      31                 :            : #include "SdShapeTypes.hxx"
      32                 :            : 
      33                 :            : #include <svx/DescriptionGenerator.hxx>
      34                 :            : #include <rtl/ustring.h>
      35                 :            : 
      36                 :            : using namespace ::rtl;
      37                 :            : using namespace ::com::sun::star;
      38                 :            : using namespace ::com::sun::star::accessibility;
      39                 :            : 
      40                 :            : namespace accessibility {
      41                 :            : 
      42                 :            : //=====  internal  ============================================================
      43                 :            : 
      44                 :          0 : AccessiblePresentationShape::AccessiblePresentationShape (
      45                 :            :     const AccessibleShapeInfo& rShapeInfo,
      46                 :            :     const AccessibleShapeTreeInfo& rShapeTreeInfo)
      47                 :          0 :     : AccessibleShape (rShapeInfo, rShapeTreeInfo)
      48                 :            : {
      49                 :          0 : }
      50                 :            : 
      51                 :            : 
      52                 :            : 
      53                 :            : 
      54                 :          0 : AccessiblePresentationShape::~AccessiblePresentationShape (void)
      55                 :            : {
      56         [ #  # ]:          0 : }
      57                 :            : 
      58                 :            : 
      59                 :            : 
      60                 :            : 
      61                 :            : //=====  XServiceInfo  ========================================================
      62                 :            : 
      63                 :            : ::rtl::OUString SAL_CALL
      64                 :          0 :     AccessiblePresentationShape::getImplementationName (void)
      65                 :            :     throw (::com::sun::star::uno::RuntimeException)
      66                 :            : {
      67                 :          0 :     return ::rtl::OUString("AccessiblePresentationShape");
      68                 :            : }
      69                 :            : 
      70                 :            : 
      71                 :            : 
      72                 :            : 
      73                 :            : /// Set this object's name if is different to the current name.
      74                 :            : ::rtl::OUString
      75                 :          0 :     AccessiblePresentationShape::CreateAccessibleBaseName (void)
      76                 :            :     throw (::com::sun::star::uno::RuntimeException)
      77                 :            : {
      78                 :          0 :     ::rtl::OUString sName;
      79                 :            : 
      80 [ #  # ][ #  # ]:          0 :     ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
      81   [ #  #  #  #  :          0 :     switch (nShapeType)
          #  #  #  #  #  
                   #  # ]
      82                 :            :     {
      83                 :            :         case PRESENTATION_TITLE:
      84                 :          0 :             sName = "ImpressTitle";
      85                 :            :             break;
      86                 :            :         case PRESENTATION_OUTLINER:
      87                 :          0 :             sName = "ImpressOutliner";
      88                 :            :             break;
      89                 :            :         case PRESENTATION_SUBTITLE:
      90                 :          0 :             sName = "ImpressSubtitle";
      91                 :            :             break;
      92                 :            :         case PRESENTATION_PAGE:
      93                 :          0 :             sName = "ImpressPage";
      94                 :            :             break;
      95                 :            :         case PRESENTATION_NOTES:
      96                 :          0 :             sName = "ImpressNotes";
      97                 :            :             break;
      98                 :            :         case PRESENTATION_HANDOUT:
      99                 :          0 :             sName = "ImpressHandout";
     100                 :            :             break;
     101                 :            :         case PRESENTATION_HEADER:
     102                 :          0 :             sName = "ImpressHeader";
     103                 :            :             break;
     104                 :            :         case PRESENTATION_FOOTER:
     105                 :          0 :             sName = "ImpressFooter";
     106                 :            :             break;
     107                 :            :         case PRESENTATION_DATETIME:
     108                 :          0 :             sName = "ImpressDateAndTime";
     109                 :            :             break;
     110                 :            :         case PRESENTATION_PAGENUMBER:
     111                 :          0 :             sName = "ImpressPageNumber";
     112                 :            :             break;
     113                 :            :         default:
     114                 :          0 :             sName = "UnknownAccessibleImpressShape";
     115         [ #  # ]:          0 :             uno::Reference<drawing::XShapeDescriptor> xDescriptor (mxShape, uno::UNO_QUERY);
     116         [ #  # ]:          0 :             if (xDescriptor.is())
     117 [ #  # ][ #  # ]:          0 :                 sName += ": " + xDescriptor->getShapeType();
     118                 :            :     }
     119                 :            : 
     120                 :          0 :     return sName;
     121                 :            : }
     122                 :            : 
     123                 :            : 
     124                 :            : 
     125                 :            : 
     126                 :            : ::rtl::OUString
     127                 :          0 :     AccessiblePresentationShape::CreateAccessibleDescription (void)
     128                 :            :     throw (::com::sun::star::uno::RuntimeException)
     129                 :            : {
     130                 :            :     //    return createAccessibleName ();
     131         [ #  # ]:          0 :     DescriptionGenerator aDG (mxShape);
     132 [ #  # ][ #  # ]:          0 :     ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
     133   [ #  #  #  #  :          0 :     switch (nShapeType)
          #  #  #  #  #  
                   #  # ]
     134                 :            :     {
     135                 :            :         case PRESENTATION_TITLE:
     136         [ #  # ]:          0 :             aDG.Initialize ("PresentationTitleShape");
     137                 :            :             break;
     138                 :            :         case PRESENTATION_OUTLINER:
     139         [ #  # ]:          0 :             aDG.Initialize ("PresentationOutlinerShape");
     140                 :            :             break;
     141                 :            :         case PRESENTATION_SUBTITLE:
     142         [ #  # ]:          0 :             aDG.Initialize ("PresentationSubtitleShape");
     143                 :            :             break;
     144                 :            :         case PRESENTATION_PAGE:
     145         [ #  # ]:          0 :             aDG.Initialize ("PresentationPageShape");
     146                 :            :             break;
     147                 :            :         case PRESENTATION_NOTES:
     148         [ #  # ]:          0 :             aDG.Initialize ("PresentationNotesShape");
     149                 :            :             break;
     150                 :            :         case PRESENTATION_HANDOUT:
     151         [ #  # ]:          0 :             aDG.Initialize ("PresentationHandoutShape");
     152                 :            :             break;
     153                 :            :         case PRESENTATION_HEADER:
     154         [ #  # ]:          0 :             aDG.Initialize ("PresentationHeaderShape");
     155                 :            :             break;
     156                 :            :         case PRESENTATION_FOOTER:
     157         [ #  # ]:          0 :             aDG.Initialize ("PresentationFooterShape");
     158                 :            :             break;
     159                 :            :         case PRESENTATION_DATETIME:
     160         [ #  # ]:          0 :             aDG.Initialize ("PresentationDateAndTimeShape");
     161                 :            :             break;
     162                 :            :         case PRESENTATION_PAGENUMBER:
     163         [ #  # ]:          0 :             aDG.Initialize ("PresentationPageNumberShape");
     164                 :            :             break;
     165                 :            :         default:
     166         [ #  # ]:          0 :             aDG.Initialize ("Unknown accessible presentation shape");
     167         [ #  # ]:          0 :             uno::Reference<drawing::XShapeDescriptor> xDescriptor (mxShape, uno::UNO_QUERY);
     168         [ #  # ]:          0 :             if (xDescriptor.is())
     169                 :            :             {
     170         [ #  # ]:          0 :                 aDG.AppendString ("service name=");
     171 [ #  # ][ #  # ]:          0 :                 aDG.AppendString (xDescriptor->getShapeType());
                 [ #  # ]
     172                 :          0 :             }
     173                 :            :     }
     174                 :            : 
     175 [ #  # ][ #  # ]:          0 :     return aDG();
     176                 :            : }
     177                 :            : 
     178                 :            : } // end of namespace accessibility
     179                 :            : 
     180                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10