LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sw/inc - fmtruby.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 8 11 72.7 %
Date: 2013-07-09 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 _FMTRUBY_HXX
      20             : #define _FMTRUBY_HXX
      21             : 
      22             : 
      23             : #include <tools/string.hxx>
      24             : #include <svl/poolitem.hxx>
      25             : 
      26             : class SwTxtRuby;
      27             : 
      28             : class SW_DLLPUBLIC SwFmtRuby : public SfxPoolItem
      29             : {
      30             :     friend class SwTxtRuby;
      31             : 
      32             :     String sRubyTxt;                        ///< The ruby txt.
      33             :     String sCharFmtName;                    ///< Name of the charformat.
      34             :     SwTxtRuby* pTxtAttr;                    ///< The TextAttribute.
      35             :     sal_uInt16 nCharFmtId;                  ///< PoolId of the charformat.
      36             :     sal_uInt16 nPosition;                   ///< Position of the Ruby-character.
      37             :     sal_uInt16 nAdjustment;                 ///< Specific adjustment of the Ruby-ch.
      38             : 
      39             : public:
      40             :     SwFmtRuby( const String& rRubyTxt );
      41             :     SwFmtRuby( const SwFmtRuby& rAttr );
      42             :     virtual ~SwFmtRuby();
      43             : 
      44             :     SwFmtRuby& operator=( const SwFmtRuby& rAttr );
      45             : 
      46             :     // "Pure virtual methods" of SfxPoolItem.
      47             :     virtual int             operator==( const SfxPoolItem& ) const;
      48             :     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const;
      49             : 
      50             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      51             :                                     SfxMapUnit eCoreMetric,
      52             :                                     SfxMapUnit ePresMetric,
      53             :                                     OUString &rText,
      54             :                                     const IntlWrapper* pIntl = 0 ) const;
      55             : 
      56             :     virtual bool QueryValue( com::sun::star::uno::Any& rVal,
      57             :                                         sal_uInt8 nMemberId = 0 ) const;
      58             :     virtual bool PutValue( const com::sun::star::uno::Any& rVal,
      59             :                                         sal_uInt8 nMemberId = 0 );
      60             : 
      61             : 
      62           6 :     const SwTxtRuby* GetTxtRuby() const         { return pTxtAttr; }
      63             :     SwTxtRuby* GetTxtRuby()                     { return pTxtAttr; }
      64             : 
      65         336 :     const String& GetText() const               { return sRubyTxt; }
      66           0 :     void SetText( const String& rTxt )          { sRubyTxt = rTxt; }
      67             : 
      68         168 :     const String& GetCharFmtName() const        { return sCharFmtName; }
      69           4 :     void SetCharFmtName( const String& rNm )    { sCharFmtName = rNm; }
      70             : 
      71          30 :     sal_uInt16 GetCharFmtId() const                 { return nCharFmtId; }
      72           8 :     void SetCharFmtId( sal_uInt16 nNew )            { nCharFmtId = nNew; }
      73             : 
      74         174 :     sal_uInt16 GetPosition() const                  { return nPosition; }
      75           0 :     void SetPosition( sal_uInt16 nNew )             { nPosition = nNew; }
      76             : 
      77         174 :     sal_uInt16 GetAdjustment() const                { return nAdjustment; }
      78           0 :     void SetAdjustment( sal_uInt16 nNew )           { nAdjustment = nNew; }
      79             : };
      80             : 
      81             : 
      82             : #endif
      83             : 
      84             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10