2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2013-11-05 02:17:53 +01:00
|
|
|
#ifndef INCLUDED_SW_INC_FMTRUBY_HXX
|
|
|
|
#define INCLUDED_SW_INC_FMTRUBY_HXX
|
2000-10-23 15:11:14 +00:00
|
|
|
|
2018-02-20 21:24:25 +01:00
|
|
|
#include "swdllapi.h"
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/poolitem.hxx>
|
2017-03-31 13:49:52 +02:00
|
|
|
#include <com/sun/star/text/RubyAdjust.hpp>
|
2000-10-23 15:11:14 +00:00
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
class SwTextRuby;
|
2000-10-23 15:11:14 +00:00
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
class SW_DLLPUBLIC SwFormatRuby : public SfxPoolItem
|
2000-10-23 15:11:14 +00:00
|
|
|
{
|
2015-05-20 13:05:49 +02:00
|
|
|
friend class SwTextRuby;
|
2000-10-23 15:11:14 +00:00
|
|
|
|
2017-10-02 08:26:44 +02:00
|
|
|
OUString m_sRubyText; ///< The ruby text.
|
|
|
|
OUString m_sCharFormatName; ///< Name of the charformat.
|
|
|
|
SwTextRuby* m_pTextAttr; ///< The TextAttribute.
|
|
|
|
sal_uInt16 m_nCharFormatId; ///< PoolId of the charformat.
|
|
|
|
sal_uInt16 m_nPosition; ///< Position of the Ruby-character.
|
|
|
|
css::text::RubyAdjust m_eAdjustment; ///< Specific adjustment of the Ruby-ch.
|
2000-10-23 15:11:14 +00:00
|
|
|
|
|
|
|
public:
|
2015-05-20 13:05:49 +02:00
|
|
|
SwFormatRuby( const OUString& rRubyText );
|
|
|
|
SwFormatRuby( const SwFormatRuby& rAttr );
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SwFormatRuby() override;
|
2000-10-23 15:11:14 +00:00
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
SwFormatRuby& operator=( const SwFormatRuby& rAttr );
|
2001-01-23 19:21:55 +00:00
|
|
|
|
2011-02-07 02:08:11 +01:00
|
|
|
// "Pure virtual methods" of SfxPoolItem.
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool operator==( const SfxPoolItem& ) const override;
|
2015-11-10 10:25:48 +01:00
|
|
|
virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
|
2000-10-23 15:11:14 +00:00
|
|
|
|
2014-07-24 11:31:39 +02:00
|
|
|
virtual bool GetPresentation( SfxItemPresentation ePres,
|
2016-08-19 09:31:35 +01:00
|
|
|
MapUnit eCoreMetric,
|
|
|
|
MapUnit ePresMetric,
|
|
|
|
OUString &rText,
|
2017-07-28 16:43:06 +01:00
|
|
|
const IntlWrapper& rIntl ) const override;
|
2000-10-23 15:11:14 +00:00
|
|
|
|
2015-11-05 15:55:58 +02:00
|
|
|
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
|
|
|
|
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
|
2000-10-23 15:11:14 +00:00
|
|
|
|
2017-10-02 08:26:44 +02:00
|
|
|
const SwTextRuby* GetTextRuby() const { return m_pTextAttr; }
|
2000-10-23 15:11:14 +00:00
|
|
|
|
2017-10-02 08:26:44 +02:00
|
|
|
const OUString& GetText() const { return m_sRubyText; }
|
|
|
|
void SetText( const OUString& rText ) { m_sRubyText = rText; }
|
2000-10-23 15:11:14 +00:00
|
|
|
|
2017-10-02 08:26:44 +02:00
|
|
|
const OUString& GetCharFormatName() const { return m_sCharFormatName; }
|
|
|
|
void SetCharFormatName( const OUString& rNm ) { m_sCharFormatName = rNm; }
|
2000-10-23 15:11:14 +00:00
|
|
|
|
2017-10-02 08:26:44 +02:00
|
|
|
sal_uInt16 GetCharFormatId() const { return m_nCharFormatId; }
|
|
|
|
void SetCharFormatId( sal_uInt16 nNew ) { m_nCharFormatId = nNew; }
|
2000-10-23 15:11:14 +00:00
|
|
|
|
2017-10-02 08:26:44 +02:00
|
|
|
sal_uInt16 GetPosition() const { return m_nPosition; }
|
|
|
|
void SetPosition( sal_uInt16 nNew ) { m_nPosition = nNew; }
|
2000-10-23 15:11:14 +00:00
|
|
|
|
2017-10-02 08:26:44 +02:00
|
|
|
css::text::RubyAdjust GetAdjustment() const { return m_eAdjustment; }
|
|
|
|
void SetAdjustment( css::text::RubyAdjust nNew ) { m_eAdjustment = nNew; }
|
2000-10-23 15:11:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|