2010-10-14 01:30:41 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-09-18 11:15:01 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 05:29:27 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2008-04-10 05:29:27 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2008-04-10 05:29:27 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2008-04-10 05:29:27 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2008-04-10 05:29:27 -05:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2008-04-10 05:29:27 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef _PARATR_HXX
|
|
|
|
#define _PARATR_HXX
|
2009-10-15 17:05:16 -05:00
|
|
|
#include <svl/eitem.hxx>
|
|
|
|
#include <svl/stritem.hxx>
|
2004-08-23 02:37:48 -05:00
|
|
|
#include "swdllapi.h"
|
2000-11-20 02:41:15 -06:00
|
|
|
#include <hintids.hxx>
|
|
|
|
#include <calbck.hxx>
|
|
|
|
#include <swatrset.hxx>
|
|
|
|
#include <format.hxx>
|
|
|
|
#include <swtypes.hxx>
|
2000-09-18 11:15:01 -05:00
|
|
|
|
|
|
|
class SwCharFmt;
|
2001-05-12 21:33:31 -05:00
|
|
|
class IntlWrapper;
|
2000-09-18 11:15:01 -05:00
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|* class SwFmtDrop
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
#define DROP_WHOLEWORD ((USHORT)0x0001)
|
|
|
|
|
|
|
|
//Wenn ein SwFmtDrop Client ist, so ist dies das CharFmt welches den Font fuer
|
|
|
|
//die DropCaps beschreibt. Ist es kein Client, so wird von der Formatierung
|
|
|
|
//das CharFmt des Absatzes benutzt.
|
|
|
|
//Wird das CharFmt verandert, so wird diese Aenderung ueber das Modify des
|
|
|
|
//SwFmtDrop an die Absatze propagiert.
|
2004-08-23 02:37:48 -05:00
|
|
|
class SW_DLLPUBLIC SwFmtDrop: public SfxPoolItem, public SwClient
|
2000-09-18 11:15:01 -05:00
|
|
|
{
|
|
|
|
SwModify* pDefinedIn; // Modify-Object, in dem der DropCaps steht
|
|
|
|
// kann nur TxtFmtCollection/TxtNode sein
|
|
|
|
USHORT nDistance; // Abstand zum Textbeginn
|
|
|
|
USHORT nReadFmt; // fuer den Sw3-Reader: CharFormat-Id (Pool laden!)
|
|
|
|
BYTE nLines; // Anzahl der Zeilen
|
|
|
|
BYTE nChars; // Anzahl der Zeichen
|
|
|
|
BOOL bWholeWord; // Erstes Wort als Initialen
|
|
|
|
public:
|
|
|
|
TYPEINFO(); //Bereits in der Basisklasse SwClient
|
|
|
|
|
|
|
|
SwFmtDrop();
|
2004-08-23 02:37:48 -05:00
|
|
|
virtual ~SwFmtDrop();
|
|
|
|
|
|
|
|
// @@@ public copy ctor, but no copy assignment?
|
2000-09-18 11:15:01 -05:00
|
|
|
SwFmtDrop( const SwFmtDrop & );
|
2004-08-23 02:37:48 -05:00
|
|
|
private:
|
|
|
|
// @@@ public copy ctor, but no copy assignment?
|
|
|
|
SwFmtDrop & operator= (const SwFmtDrop &);
|
|
|
|
public:
|
2000-09-18 11:15:01 -05:00
|
|
|
|
2010-11-15 05:59:57 -06:00
|
|
|
// "pure virtual methods" of SfxPoolItem
|
2000-09-18 11:15:01 -05:00
|
|
|
virtual int operator==( const SfxPoolItem& ) const;
|
|
|
|
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
|
|
|
|
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
|
|
|
|
SfxMapUnit eCoreMetric,
|
|
|
|
SfxMapUnit ePresMetric,
|
|
|
|
String &rText,
|
2001-05-12 21:33:31 -05:00
|
|
|
const IntlWrapper* pIntl = 0) const;
|
2010-10-04 09:23:52 -05:00
|
|
|
virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
|
|
|
|
virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
|
2000-09-18 11:15:01 -05:00
|
|
|
|
|
|
|
inline BYTE GetLines() const { return nLines; }
|
|
|
|
inline BYTE &GetLines() { return nLines; }
|
|
|
|
|
|
|
|
inline BYTE GetChars() const { return nChars; }
|
|
|
|
inline BYTE &GetChars() { return nChars; }
|
|
|
|
|
|
|
|
inline BOOL GetWholeWord() const { return bWholeWord; }
|
|
|
|
inline BYTE &GetWholeWord() { return bWholeWord; }
|
|
|
|
|
|
|
|
inline USHORT GetDistance() const { return nDistance; }
|
|
|
|
inline USHORT &GetDistance() { return nDistance; }
|
|
|
|
|
|
|
|
inline const SwCharFmt *GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
|
|
|
|
inline SwCharFmt *GetCharFmt() { return (SwCharFmt*)pRegisteredIn; }
|
|
|
|
void SetCharFmt( SwCharFmt *pNew );
|
|
|
|
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
|
|
|
|
// erfrage vom Client Informationen
|
|
|
|
virtual BOOL GetInfo( SfxPoolItem& ) const;
|
|
|
|
|
|
|
|
// erfrage und setze den Modify-Pointer
|
|
|
|
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
|
|
|
|
inline void ChgDefinedIn( const SwModify* pNew )
|
|
|
|
{ pDefinedIn = (SwModify*)pNew; }
|
|
|
|
};
|
|
|
|
|
|
|
|
class SwRegisterItem : public SfxBoolItem
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TYPEINFO();
|
|
|
|
|
|
|
|
inline SwRegisterItem( const BOOL bRegister = FALSE );
|
2004-08-23 02:37:48 -05:00
|
|
|
|
|
|
|
// @@@ public copy assignment, but no copy ctor?
|
2000-09-18 11:15:01 -05:00
|
|
|
inline SwRegisterItem& operator=( const SwRegisterItem& rRegister );
|
|
|
|
|
2010-11-15 05:59:57 -06:00
|
|
|
// "pure virtual methods" of SfxPoolItem
|
2000-09-18 11:15:01 -05:00
|
|
|
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
|
|
|
|
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
|
|
|
|
SfxMapUnit eCoreMetric,
|
|
|
|
SfxMapUnit ePresMetric,
|
|
|
|
String &rText,
|
2001-05-12 21:33:31 -05:00
|
|
|
const IntlWrapper* pIntl = 0 ) const;
|
2000-09-18 11:15:01 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
inline SwRegisterItem::SwRegisterItem( const BOOL bRegister ) :
|
|
|
|
SfxBoolItem( RES_PARATR_REGISTER, bRegister )
|
|
|
|
{}
|
|
|
|
|
|
|
|
inline SwRegisterItem& SwRegisterItem::operator=(
|
|
|
|
const SwRegisterItem& rRegister )
|
|
|
|
{
|
|
|
|
SetValue( rRegister.GetValue() );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2005-03-29 07:36:19 -06:00
|
|
|
class SW_DLLPUBLIC SwNumRuleItem : public SfxStringItem
|
2000-09-18 11:15:01 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
TYPEINFO();
|
|
|
|
|
|
|
|
SwNumRuleItem()
|
2008-06-13 03:28:38 -05:00
|
|
|
: SfxStringItem( RES_PARATR_NUMRULE, aEmptyStr ) {}
|
2000-09-18 11:15:01 -05:00
|
|
|
|
|
|
|
SwNumRuleItem( const String& rRuleName )
|
2008-06-13 03:28:38 -05:00
|
|
|
: SfxStringItem( RES_PARATR_NUMRULE, rRuleName ) {}
|
2000-09-18 11:15:01 -05:00
|
|
|
|
|
|
|
SwNumRuleItem( const SwNumRuleItem& rCpy )
|
2008-06-13 03:28:38 -05:00
|
|
|
: SfxStringItem( RES_PARATR_NUMRULE, rCpy.GetValue() ) {}
|
2000-09-18 11:15:01 -05:00
|
|
|
|
|
|
|
SwNumRuleItem& operator=( const SwNumRuleItem& rCpy )
|
2008-06-13 03:28:38 -05:00
|
|
|
{ SetValue( rCpy.GetValue() ); return *this; }
|
2000-09-18 11:15:01 -05:00
|
|
|
|
2010-11-15 05:59:57 -06:00
|
|
|
// "pure virtual methods" of SfxPoolItem
|
2000-09-18 11:15:01 -05:00
|
|
|
virtual int operator==( const SfxPoolItem& ) const;
|
|
|
|
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
|
|
|
|
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
|
|
|
|
SfxMapUnit eCoreMetric,
|
|
|
|
SfxMapUnit ePresMetric,
|
|
|
|
String &rText,
|
2001-05-12 21:33:31 -05:00
|
|
|
const IntlWrapper* pIntl = 0 ) const;
|
2000-09-18 11:15:01 -05:00
|
|
|
|
2010-10-04 09:23:52 -05:00
|
|
|
virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const;
|
|
|
|
virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId );
|
2000-09-18 11:15:01 -05:00
|
|
|
};
|
2004-08-23 02:37:48 -05:00
|
|
|
|
2003-05-27 10:09:49 -05:00
|
|
|
class SwParaConnectBorderItem : public SfxBoolItem
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TYPEINFO();
|
|
|
|
|
|
|
|
inline SwParaConnectBorderItem( const BOOL bConnect = TRUE );
|
2004-08-23 02:37:48 -05:00
|
|
|
|
|
|
|
// @@@ public copy assignment, but no copy ctor?
|
2003-05-27 10:09:49 -05:00
|
|
|
inline SwParaConnectBorderItem& operator=( const SwParaConnectBorderItem& rConnect );
|
|
|
|
|
2010-11-15 05:59:57 -06:00
|
|
|
// "pure virtual methods" of SfxPoolItem
|
2003-05-27 10:09:49 -05:00
|
|
|
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
|
|
|
|
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
|
|
|
|
SfxMapUnit eCoreMetric,
|
|
|
|
SfxMapUnit ePresMetric,
|
|
|
|
String &rText,
|
|
|
|
const IntlWrapper* pIntl = 0 ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
inline SwParaConnectBorderItem::SwParaConnectBorderItem( const BOOL bConnect ) :
|
|
|
|
SfxBoolItem( RES_PARATR_CONNECT_BORDER, bConnect )
|
|
|
|
{}
|
|
|
|
|
|
|
|
inline SwParaConnectBorderItem& SwParaConnectBorderItem::operator=(
|
|
|
|
const SwParaConnectBorderItem& rConnect )
|
|
|
|
{
|
|
|
|
SetValue( rConnect.GetValue() );
|
|
|
|
return *this;
|
|
|
|
}
|
2000-09-18 11:15:01 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* Implementierung der Paragraph-Attribut Methoden vom SwAttrSet
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
inline const SvxLineSpacingItem &SwAttrSet::GetLineSpacing(BOOL bInP) const
|
|
|
|
{ return (const SvxLineSpacingItem&)Get( RES_PARATR_LINESPACING,bInP); }
|
|
|
|
inline const SvxAdjustItem &SwAttrSet::GetAdjust(BOOL bInP) const
|
|
|
|
{ return (const SvxAdjustItem&)Get( RES_PARATR_ADJUST,bInP); }
|
|
|
|
inline const SvxFmtSplitItem &SwAttrSet::GetSplit(BOOL bInP) const
|
|
|
|
{ return (const SvxFmtSplitItem&)Get( RES_PARATR_SPLIT,bInP); }
|
|
|
|
inline const SwRegisterItem &SwAttrSet::GetRegister(BOOL bInP) const
|
|
|
|
{ return (const SwRegisterItem&)Get( RES_PARATR_REGISTER,bInP); }
|
|
|
|
inline const SvxWidowsItem &SwAttrSet::GetWidows(BOOL bInP) const
|
|
|
|
{ return (const SvxWidowsItem&)Get( RES_PARATR_WIDOWS,bInP); }
|
|
|
|
inline const SvxOrphansItem &SwAttrSet::GetOrphans(BOOL bInP) const
|
|
|
|
{ return (const SvxOrphansItem&)Get( RES_PARATR_ORPHANS,bInP); }
|
|
|
|
inline const SvxTabStopItem &SwAttrSet::GetTabStops(BOOL bInP) const
|
|
|
|
{ return (const SvxTabStopItem&)Get( RES_PARATR_TABSTOP,bInP); }
|
|
|
|
inline const SvxHyphenZoneItem &SwAttrSet::GetHyphenZone(BOOL bInP) const
|
|
|
|
{ return (const SvxHyphenZoneItem&)Get(RES_PARATR_HYPHENZONE,bInP); }
|
|
|
|
inline const SwFmtDrop &SwAttrSet::GetDrop(BOOL bInP) const
|
|
|
|
{ return (const SwFmtDrop&)Get(RES_PARATR_DROP,bInP); }
|
|
|
|
inline const SwNumRuleItem &SwAttrSet::GetNumRule(BOOL bInP) const
|
|
|
|
{ return (const SwNumRuleItem&)Get(RES_PARATR_NUMRULE,bInP); }
|
2000-11-20 02:41:15 -06:00
|
|
|
inline const SvxScriptSpaceItem& SwAttrSet::GetScriptSpace(BOOL bInP) const
|
|
|
|
{ return (const SvxScriptSpaceItem&)Get(RES_PARATR_SCRIPTSPACE,bInP); }
|
|
|
|
inline const SvxHangingPunctuationItem &SwAttrSet::GetHangingPunctuation(BOOL bInP) const
|
|
|
|
{ return (const SvxHangingPunctuationItem&)Get(RES_PARATR_HANGINGPUNCTUATION,bInP); }
|
2000-11-29 10:20:06 -06:00
|
|
|
inline const SvxForbiddenRuleItem &SwAttrSet::GetForbiddenRule(BOOL bInP) const
|
|
|
|
{ return (const SvxForbiddenRuleItem&)Get(RES_PARATR_FORBIDDEN_RULES, bInP); }
|
2001-04-10 08:18:33 -05:00
|
|
|
inline const SvxParaVertAlignItem &SwAttrSet::GetParaVertAlign(BOOL bInP) const
|
|
|
|
{ return (const SvxParaVertAlignItem&)Get( RES_PARATR_VERTALIGN, bInP ); }
|
2002-02-06 09:07:13 -06:00
|
|
|
inline const SvxParaGridItem &SwAttrSet::GetParaGrid(BOOL bInP) const
|
|
|
|
{ return (const SvxParaGridItem&)Get( RES_PARATR_SNAPTOGRID, bInP ); }
|
2003-05-27 10:09:49 -05:00
|
|
|
inline const SwParaConnectBorderItem &SwAttrSet::GetParaConnectBorder(BOOL bInP) const
|
|
|
|
{ return (const SwParaConnectBorderItem&)Get( RES_PARATR_CONNECT_BORDER, bInP ); }
|
2000-09-18 11:15:01 -05:00
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* Implementierung der Paragraph-Attribut Methoden vom SwFmt
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
inline const SvxLineSpacingItem &SwFmt::GetLineSpacing(BOOL bInP) const
|
|
|
|
{ return aSet.GetLineSpacing(bInP); }
|
|
|
|
inline const SvxAdjustItem &SwFmt::GetAdjust(BOOL bInP) const
|
|
|
|
{ return aSet.GetAdjust(bInP); }
|
|
|
|
inline const SvxFmtSplitItem &SwFmt::GetSplit(BOOL bInP) const
|
|
|
|
{ return aSet.GetSplit(bInP); }
|
|
|
|
inline const SwRegisterItem &SwFmt::GetRegister(BOOL bInP) const
|
|
|
|
{ return aSet.GetRegister(bInP); }
|
|
|
|
inline const SvxWidowsItem &SwFmt::GetWidows(BOOL bInP) const
|
|
|
|
{ return aSet.GetWidows(bInP); }
|
|
|
|
inline const SvxOrphansItem &SwFmt::GetOrphans(BOOL bInP) const
|
|
|
|
{ return aSet.GetOrphans(bInP); }
|
|
|
|
inline const SvxTabStopItem &SwFmt::GetTabStops(BOOL bInP) const
|
|
|
|
{ return aSet.GetTabStops(bInP); }
|
|
|
|
inline const SvxHyphenZoneItem &SwFmt::GetHyphenZone(BOOL bInP) const
|
|
|
|
{ return aSet.GetHyphenZone(bInP); }
|
|
|
|
inline const SwFmtDrop &SwFmt::GetDrop(BOOL bInP) const
|
|
|
|
{ return aSet.GetDrop(bInP); }
|
|
|
|
inline const SwNumRuleItem &SwFmt::GetNumRule(BOOL bInP) const
|
|
|
|
{ return aSet.GetNumRule(bInP); }
|
2000-11-20 02:41:15 -06:00
|
|
|
inline const SvxScriptSpaceItem& SwFmt::GetScriptSpace(BOOL bInP) const
|
|
|
|
{ return aSet.GetScriptSpace(bInP) ; }
|
|
|
|
inline const SvxHangingPunctuationItem &SwFmt::GetHangingPunctuation(BOOL bInP) const
|
|
|
|
{ return aSet.GetHangingPunctuation(bInP) ; }
|
2000-11-29 10:20:06 -06:00
|
|
|
inline const SvxForbiddenRuleItem &SwFmt::GetForbiddenRule(BOOL bInP) const
|
|
|
|
{ return (const SvxForbiddenRuleItem&)aSet.Get(RES_PARATR_FORBIDDEN_RULES, bInP); }
|
2001-04-10 08:18:33 -05:00
|
|
|
inline const SvxParaVertAlignItem &SwFmt::GetParaVertAlign(BOOL bInP) const
|
|
|
|
{ return (const SvxParaVertAlignItem&)aSet.Get( RES_PARATR_VERTALIGN, bInP ); }
|
2002-02-06 09:07:13 -06:00
|
|
|
inline const SvxParaGridItem &SwFmt::GetParaGrid(BOOL bInP) const
|
|
|
|
{ return (const SvxParaGridItem&)aSet.Get( RES_PARATR_SNAPTOGRID, bInP ); }
|
2003-05-27 10:09:49 -05:00
|
|
|
inline const SwParaConnectBorderItem &SwFmt::GetParaConnectBorder(BOOL bInP) const
|
|
|
|
{ return (const SwParaConnectBorderItem&)aSet.Get( RES_PARATR_CONNECT_BORDER, bInP ); }
|
2000-09-18 11:15:01 -05:00
|
|
|
|
|
|
|
#endif
|
2010-10-14 01:30:41 -05:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|