LCOV - code coverage report
Current view: top level - libreoffice/sw/source/core/access - accfrmobjmap.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 9 0.0 %
Date: 2012-12-17 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             : #ifndef _ACCFRMOBJMAP_HXX
      20             : #define _ACCFRMOBJMAP_HXX
      21             : 
      22             : #include <accfrmobj.hxx>
      23             : 
      24             : #include <svx/svdtypes.hxx>
      25             : 
      26             : #include <map>
      27             : 
      28             : class SwAccessibleMap;
      29             : class SwRect;
      30             : class SwFrm;
      31             : class SdrObject;
      32             : 
      33             : class SwAccessibleChildMapKey
      34             : {
      35             : public:
      36             :     enum LayerId { INVALID, HELL, TEXT, HEAVEN, CONTROLS, XWINDOW };
      37             : 
      38           0 :     inline SwAccessibleChildMapKey()
      39             :         : eLayerId( INVALID )
      40           0 :         , nOrdNum( 0 )
      41           0 :     {}
      42             : 
      43           0 :     inline SwAccessibleChildMapKey( LayerId eId, sal_uInt32 nOrd )
      44             :         : eLayerId( eId )
      45           0 :         , nOrdNum( nOrd )
      46           0 :     {}
      47             : 
      48           0 :     inline bool operator()( const SwAccessibleChildMapKey& r1,
      49             :                             const SwAccessibleChildMapKey& r2 ) const
      50             :     {
      51             :         return (r1.eLayerId == r2.eLayerId)
      52             :                ? (r1.nOrdNum < r2.nOrdNum)
      53           0 :                : (r1.eLayerId < r2.eLayerId);
      54             :     }
      55             : 
      56             : private:
      57             : 
      58             :     LayerId eLayerId;
      59             :     sal_uInt32 nOrdNum;
      60             : 
      61             : };
      62             : 
      63             : typedef ::std::map < SwAccessibleChildMapKey, sw::access::SwAccessibleChild, SwAccessibleChildMapKey >
      64             :     _SwAccessibleChildMap;
      65             : 
      66           0 : class SwAccessibleChildMap : public _SwAccessibleChildMap
      67             : {
      68             :     const SdrLayerID nHellId;
      69             :     const SdrLayerID nControlsId;
      70             : 
      71             :     ::std::pair< iterator, bool > insert( const sal_uInt32 nPos,
      72             :                                           const SwAccessibleChildMapKey::LayerId eLayerId,
      73             :                                           const sw::access::SwAccessibleChild& rLower );
      74             :     ::std::pair< iterator, bool > insert( const SdrObject* pObj,
      75             :                                           const sw::access::SwAccessibleChild& rLower );
      76             : 
      77             : public:
      78             : 
      79             :     SwAccessibleChildMap( const SwRect& rVisArea,
      80             :                           const SwFrm& rFrm,
      81             :                           SwAccessibleMap& rAccMap );
      82             : 
      83             :     static bool IsSortingRequired( const SwFrm& rFrm );
      84             : };
      85             : 
      86             : #endif
      87             : 
      88             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10