update credits
[LibreOffice.git] / sw / inc / fmtruby.hxx
blobed8edfe4fac0bab54d497f10f7256fd4e0642355
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef _FMTRUBY_HXX
20 #define _FMTRUBY_HXX
23 #include <tools/string.hxx>
24 #include <svl/poolitem.hxx>
26 class SwTxtRuby;
28 class SW_DLLPUBLIC SwFmtRuby : public SfxPoolItem
30 friend class SwTxtRuby;
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.
39 public:
40 SwFmtRuby( const String& rRubyTxt );
41 SwFmtRuby( const SwFmtRuby& rAttr );
42 virtual ~SwFmtRuby();
44 SwFmtRuby& operator=( const SwFmtRuby& rAttr );
46 // "Pure virtual methods" of SfxPoolItem.
47 virtual int operator==( const SfxPoolItem& ) const;
48 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
50 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
51 SfxMapUnit eCoreMetric,
52 SfxMapUnit ePresMetric,
53 OUString &rText,
54 const IntlWrapper* pIntl = 0 ) const;
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 );
62 const SwTxtRuby* GetTxtRuby() const { return pTxtAttr; }
63 SwTxtRuby* GetTxtRuby() { return pTxtAttr; }
65 const String& GetText() const { return sRubyTxt; }
66 void SetText( const String& rTxt ) { sRubyTxt = rTxt; }
68 const String& GetCharFmtName() const { return sCharFmtName; }
69 void SetCharFmtName( const String& rNm ) { sCharFmtName = rNm; }
71 sal_uInt16 GetCharFmtId() const { return nCharFmtId; }
72 void SetCharFmtId( sal_uInt16 nNew ) { nCharFmtId = nNew; }
74 sal_uInt16 GetPosition() const { return nPosition; }
75 void SetPosition( sal_uInt16 nNew ) { nPosition = nNew; }
77 sal_uInt16 GetAdjustment() const { return nAdjustment; }
78 void SetAdjustment( sal_uInt16 nNew ) { nAdjustment = nNew; }
82 #endif
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */