LCOV - code coverage report
Current view: top level - sd/source/ui/accessibility - AccessiblePresentationGraphicShape.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 33 0.0 %
Date: 2014-11-03 Functions: 0 7 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 "AccessiblePresentationGraphicShape.hxx"
      21             : 
      22             : #include "SdShapeTypes.hxx"
      23             : 
      24             : #include <svx/DescriptionGenerator.hxx>
      25             : #include <rtl/ustring.h>
      26             : 
      27             : using namespace ::com::sun::star;
      28             : using namespace ::com::sun::star::accessibility;
      29             : 
      30             : namespace accessibility {
      31             : 
      32             : //=====  internal  ============================================================
      33             : 
      34           0 : AccessiblePresentationGraphicShape::AccessiblePresentationGraphicShape (
      35             :     const AccessibleShapeInfo& rShapeInfo,
      36             :     const AccessibleShapeTreeInfo& rShapeTreeInfo)
      37           0 :     : AccessibleGraphicShape (rShapeInfo, rShapeTreeInfo)
      38             : {
      39           0 : }
      40             : 
      41           0 : AccessiblePresentationGraphicShape::~AccessiblePresentationGraphicShape (void)
      42             : {
      43           0 : }
      44             : 
      45             : //=====  XServiceInfo  ========================================================
      46             : 
      47             : OUString SAL_CALL
      48           0 :     AccessiblePresentationGraphicShape::getImplementationName (void)
      49             :     throw (::com::sun::star::uno::RuntimeException, std::exception)
      50             : {
      51           0 :     return OUString("AccessiblePresentationGraphicShape");
      52             : }
      53             : 
      54             : /// Set this object's name if is different to the current name.
      55             : OUString
      56           0 :     AccessiblePresentationGraphicShape::CreateAccessibleBaseName (void)
      57             :     throw (::com::sun::star::uno::RuntimeException)
      58             : {
      59           0 :     OUString sName;
      60             : 
      61           0 :     ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
      62           0 :     switch (nShapeType)
      63             :     {
      64             :         case PRESENTATION_GRAPHIC_OBJECT:
      65           0 :             sName = "ImpressGraphicObject";
      66           0 :             break;
      67             :         default:
      68           0 :             sName = "UnknownAccessibleImpressShape";
      69           0 :             uno::Reference<drawing::XShapeDescriptor> xDescriptor (mxShape, uno::UNO_QUERY);
      70           0 :             if (xDescriptor.is())
      71           0 :                 sName += ": " + xDescriptor->getShapeType();
      72             :     }
      73             : 
      74           0 :     return sName;
      75             : }
      76             : 
      77             : OUString
      78           0 :     AccessiblePresentationGraphicShape::CreateAccessibleDescription (void)
      79             :     throw (::com::sun::star::uno::RuntimeException)
      80             : {
      81             :     //    return createAccessibleName ();
      82           0 :     DescriptionGenerator aDG (mxShape);
      83           0 :     ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
      84           0 :     switch (nShapeType)
      85             :     {
      86             :         case PRESENTATION_GRAPHIC_OBJECT:
      87           0 :             aDG.Initialize ("PresentationGraphicShape");
      88           0 :             break;
      89             :         default:
      90           0 :             aDG.Initialize ("Unknown accessible presentation graphic shape");
      91           0 :             uno::Reference<drawing::XShapeDescriptor> xDescriptor (mxShape, uno::UNO_QUERY);
      92           0 :             if (xDescriptor.is())
      93             :             {
      94           0 :                 aDG.AppendString ("service name=");
      95           0 :                 aDG.AppendString (xDescriptor->getShapeType());
      96           0 :             }
      97             :     }
      98             : 
      99           0 :     return aDG();
     100             : }
     101             : 
     102           0 : sal_Int16 SAL_CALL AccessiblePresentationGraphicShape::getAccessibleRole ()
     103             :     throw (::com::sun::star::uno::RuntimeException, std::exception)
     104             : {
     105           0 :     return  AccessibleRole::GRAPHIC ;
     106             : }
     107             : } // end of namespace accessibility
     108             : 
     109             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10