LCOV - code coverage report
Current view: top level - sw/inc - fmtruby.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 8 11 72.7 %
Date: 2015-06-13 12:38:46 Functions: 8 11 72.7 %
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 INCLUDED_SW_INC_FMTRUBY_HXX
      20             : #define INCLUDED_SW_INC_FMTRUBY_HXX
      21             : 
      22             : #include <svl/poolitem.hxx>
      23             : 
      24             : class SwTextRuby;
      25             : 
      26             : class SW_DLLPUBLIC SwFormatRuby : public SfxPoolItem
      27             : {
      28             :     friend class SwTextRuby;
      29             : 
      30             :     OUString sRubyText;                      ///< The ruby txt.
      31             :     OUString sCharFormatName;                  ///< Name of the charformat.
      32             :     SwTextRuby* pTextAttr;                    ///< The TextAttribute.
      33             :     sal_uInt16 nCharFormatId;                  ///< PoolId of the charformat.
      34             :     sal_uInt16 nPosition;                   ///< Position of the Ruby-character.
      35             :     sal_uInt16 nAdjustment;                 ///< Specific adjustment of the Ruby-ch.
      36             : 
      37             : public:
      38             :     SwFormatRuby( const OUString& rRubyText );
      39             :     SwFormatRuby( const SwFormatRuby& rAttr );
      40             :     virtual ~SwFormatRuby();
      41             : 
      42             :     SwFormatRuby& operator=( const SwFormatRuby& rAttr );
      43             : 
      44             :     // "Pure virtual methods" of SfxPoolItem.
      45             :     virtual bool            operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
      46             :     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const SAL_OVERRIDE;
      47             : 
      48             :     virtual bool GetPresentation( SfxItemPresentation ePres,
      49             :                                     SfxMapUnit eCoreMetric,
      50             :                                     SfxMapUnit ePresMetric,
      51             :                                     OUString &rText,
      52             :                                     const IntlWrapper* pIntl = 0 ) const SAL_OVERRIDE;
      53             : 
      54             :     virtual bool QueryValue( com::sun::star::uno::Any& rVal,
      55             :                                         sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
      56             :     virtual bool PutValue( const com::sun::star::uno::Any& rVal,
      57             :                                         sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
      58             : 
      59           6 :     const SwTextRuby* GetTextRuby() const         { return pTextAttr; }
      60             :     SwTextRuby* GetTextRuby()                     { return pTextAttr; }
      61             : 
      62         314 :     OUString GetText() const                    { return sRubyText; }
      63           0 :     void SetText( const OUString& rText )        { sRubyText = rText; }
      64             : 
      65         157 :     OUString GetCharFormatName() const             { return sCharFormatName; }
      66           3 :     void SetCharFormatName( const OUString& rNm )  { sCharFormatName = rNm; }
      67             : 
      68          15 :     sal_uInt16 GetCharFormatId() const                 { return nCharFormatId; }
      69           6 :     void SetCharFormatId( sal_uInt16 nNew )            { nCharFormatId = nNew; }
      70             : 
      71         163 :     sal_uInt16 GetPosition() const                  { return nPosition; }
      72           0 :     void SetPosition( sal_uInt16 nNew )             { nPosition = nNew; }
      73             : 
      74         163 :     sal_uInt16 GetAdjustment() const                { return nAdjustment; }
      75           0 :     void SetAdjustment( sal_uInt16 nNew )           { nAdjustment = nNew; }
      76             : };
      77             : 
      78             : #endif
      79             : 
      80             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11