update dev300-m58
[ooovba.git] / sw / inc / fmtruby.hxx
blobceb7c87f86d9efa0f6078e2f7445a02341ab14db
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fmtruby.hxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _FMTRUBY_HXX
31 #define _FMTRUBY_HXX
34 #include <tools/string.hxx>
35 #include <svtools/poolitem.hxx>
37 class SwTxtRuby;
39 class SW_DLLPUBLIC SwFmtRuby : public SfxPoolItem
41 friend class SwTxtRuby;
43 String sRubyTxt; // the ruby txt
44 String sCharFmtName; // name of the charformat
45 SwTxtRuby* pTxtAttr; // the TextAttribut
46 USHORT nCharFmtId; // PoolId of the charformat
47 USHORT nPosition; // Position of the Ruby-Character
48 USHORT nAdjustment; // specific adjustment of the Ruby-Ch.
50 public:
51 SwFmtRuby( const String& rRubyTxt );
52 SwFmtRuby( const SwFmtRuby& rAttr );
53 virtual ~SwFmtRuby();
55 SwFmtRuby& operator=( const SwFmtRuby& rAttr );
57 // "pure virtual Methoden" vom SfxPoolItem
58 virtual int operator==( const SfxPoolItem& ) const;
59 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
61 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
62 SfxMapUnit eCoreMetric,
63 SfxMapUnit ePresMetric,
64 String &rText,
65 const IntlWrapper* pIntl = 0 ) const;
67 virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
68 BYTE nMemberId = 0 ) const;
69 virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
70 BYTE nMemberId = 0 );
73 const SwTxtRuby* GetTxtRuby() const { return pTxtAttr; }
74 SwTxtRuby* GetTxtRuby() { return pTxtAttr; }
76 const String& GetText() const { return sRubyTxt; }
77 void SetText( const String& rTxt ) { sRubyTxt = rTxt; }
79 const String& GetCharFmtName() const { return sCharFmtName; }
80 void SetCharFmtName( const String& rNm ) { sCharFmtName = rNm; }
82 USHORT GetCharFmtId() const { return nCharFmtId; }
83 void SetCharFmtId( USHORT nNew ) { nCharFmtId = nNew; }
85 USHORT GetPosition() const { return nPosition; }
86 void SetPosition( USHORT nNew ) { nPosition = nNew; }
88 USHORT GetAdjustment() const { return nAdjustment; }
89 void SetAdjustment( USHORT nNew ) { nAdjustment = nNew; }
93 #endif