LCOV - code coverage report
Current view: top level - sw/source/uibase/inc - swcont.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 2 12 16.7 %
Date: 2015-06-13 12:38:46 Functions: 2 10 20.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             : #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_SWCONT_HXX
      21             : #define INCLUDED_SW_SOURCE_UIBASE_INC_SWCONT_HXX
      22             : 
      23             : #include <rtl/ustring.hxx>
      24             : 
      25             : class SwContentType;
      26             : 
      27             : // synchronize order and number with ResIds!!
      28             : #define CONTENT_TYPE_OUTLINE        0
      29             : #define CONTENT_TYPE_TABLE          1
      30             : #define CONTENT_TYPE_FRAME          2
      31             : #define CONTENT_TYPE_GRAPHIC        3
      32             : #define CONTENT_TYPE_OLE            4
      33             : #define CONTENT_TYPE_BOOKMARK       5
      34             : #define CONTENT_TYPE_REGION         6
      35             : #define CONTENT_TYPE_URLFIELD       7
      36             : #define CONTENT_TYPE_REFERENCE      8
      37             : #define CONTENT_TYPE_INDEX          9
      38             : #define CONTENT_TYPE_POSTIT         10
      39             : #define CONTENT_TYPE_DRAWOBJECT     11
      40             : #define CONTENT_TYPE_MAX            CONTENT_TYPE_DRAWOBJECT +1
      41             : 
      42             : // strings for context menus
      43             : #define CONTEXT_COUNT   12
      44             : #define GLOBAL_CONTEXT_COUNT 14
      45             : 
      46             : // modes for Drag 'n Drop
      47             : #define REGION_MODE_NONE        0
      48             : #define REGION_MODE_LINK        1
      49             : #define REGION_MODE_EMBEDDED    2
      50             : 
      51             : //mini rtti
      52             : class SwTypeNumber
      53             : {
      54             :     sal_uInt8 nTypeId;
      55             : 
      56             :     public:
      57          96 :         SwTypeNumber(sal_uInt8 nId) :nTypeId(nId){}
      58             :         virtual ~SwTypeNumber();
      59             : 
      60         573 :         sal_uInt8 GetTypeId() const { return nTypeId;}
      61             : };
      62             : 
      63           0 : class SwContent : public SwTypeNumber
      64             : {
      65             :     const SwContentType*    pParent;
      66             :     OUString                sContentName;
      67             :     long                    nYPosition;
      68             :     bool                    bInvisible;
      69             : public:
      70             :         SwContent(const SwContentType* pCnt, const OUString& rName, long nYPos );
      71             : 
      72             :     virtual bool            IsProtect() const;
      73           0 :     const SwContentType*    GetParent() const {return pParent;}
      74           0 :     const OUString&         GetName()   const {return sContentName;}
      75             :     bool                    operator==(const SwContent& /*rCont*/) const
      76             :                                 {
      77             :                                     // they're never equal, otherwise they'd fall out of the array
      78             :                                     return false;
      79             :                                 }
      80           0 :     bool                    operator<(const SwContent& rCont) const
      81             :                                 {
      82             :                                     // at first sort by position and then by name
      83           0 :                                     return nYPosition != rCont.nYPosition ?
      84           0 :                                         nYPosition < rCont.nYPosition :
      85           0 :                                             sContentName < rCont.sContentName;
      86             :                                 }
      87             : 
      88           0 :     long        GetYPos() const {return nYPosition;}
      89             : 
      90           0 :     bool        IsInvisible() const {return bInvisible;}
      91           0 :     void        SetInvisible(){ bInvisible = true;}
      92             : };
      93             : 
      94             : #endif
      95             : 
      96             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11