summaryrefslogtreecommitdiff
path: root/editeng/source/items/textitem.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'editeng/source/items/textitem.cxx')
-rw-r--r--editeng/source/items/textitem.cxx312
1 files changed, 0 insertions, 312 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 019fb06eb621..13c5c04ffbbe 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -94,8 +94,6 @@
#include <editeng/eerdll.hxx>
#include <libxml/xmlwriter.h>
-#define STORE_UNICODE_MAGIC_MARKER 0xFE331188
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::text;
@@ -199,17 +197,6 @@ SvxFontItem::SvxFontItem( const FontFamily eFam, const OUString& aName,
}
-SvxFontItem& SvxFontItem::operator=(const SvxFontItem& rFont)
-{
- aFamilyName = rFont.GetFamilyName();
- aStyleName = rFont.GetStyleName();
- eFamily = rFont.GetFamily();
- ePitch = rFont.GetPitch();
- eTextEncoding = rFont.GetCharSet();
- return *this;
-}
-
-
bool SvxFontItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
@@ -330,64 +317,6 @@ SfxPoolItem* SvxFontItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxFontItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- bool bToBats = IsStarSymbol( GetFamilyName() );
-
- rStrm.WriteUChar( GetFamily() ).WriteUChar( GetPitch() )
- .WriteUChar( bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet()) );
-
- OUString aStoreFamilyName( GetFamilyName() );
- if( bToBats )
- aStoreFamilyName = "StarBats";
- rStrm.WriteUniOrByteString(aStoreFamilyName, rStrm.GetStreamCharSet());
- rStrm.WriteUniOrByteString(GetStyleName(), rStrm.GetStreamCharSet());
-
- return rStrm;
-}
-
-
-SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt8 _eFamily, eFontPitch, eFontTextEncoding;
- OUString aName, aStyle;
- rStrm.ReadUChar( _eFamily );
- rStrm.ReadUChar( eFontPitch );
- rStrm.ReadUChar( eFontTextEncoding );
-
- // UNICODE: rStrm >> aName;
- aName = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet());
-
- // UNICODE: rStrm >> aStyle;
- aStyle = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet());
-
- // Set the "correct" textencoding
- eFontTextEncoding = static_cast<sal_uInt8>(GetSOLoadTextEncoding( eFontTextEncoding ));
-
- // at some point, the StarBats changes from ANSI font to SYMBOL font
- if ( RTL_TEXTENCODING_SYMBOL != eFontTextEncoding && aName == "StarBats" )
- eFontTextEncoding = RTL_TEXTENCODING_SYMBOL;
-
- // Check if we have stored unicode
- sal_uInt64 const nStreamPos = rStrm.Tell();
- sal_uInt32 nMagic = STORE_UNICODE_MAGIC_MARKER;
- rStrm.ReadUInt32( nMagic );
- if ( nMagic == STORE_UNICODE_MAGIC_MARKER )
- {
- aName = rStrm.ReadUniOrByteString( RTL_TEXTENCODING_UNICODE );
- aStyle = rStrm.ReadUniOrByteString( RTL_TEXTENCODING_UNICODE );
- }
- else
- {
- rStrm.Seek( nStreamPos );
- }
-
-
- return new SvxFontItem( static_cast<FontFamily>(_eFamily), aName, aStyle,
- static_cast<FontPitch>(eFontPitch), static_cast<rtl_TextEncoding>(eFontTextEncoding), Which() );
-}
-
-
bool SvxFontItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -433,21 +362,6 @@ sal_uInt16 SvxPostureItem::GetValueCount() const
}
-SvStream& SvxPostureItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteUChar( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxPostureItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt8 nPosture;
- rStrm.ReadUChar( nPosture );
- return new SvxPostureItem( static_cast<FontItalic>(nPosture), Which() );
-}
-
-
bool SvxPostureItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -581,20 +495,6 @@ SfxPoolItem* SvxWeightItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxWeightItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteUChar( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxWeightItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt8 nWeight;
- rStrm.ReadUChar( nWeight );
- return new SvxWeightItem( static_cast<FontWeight>(nWeight), Which() );
-}
-
bool SvxWeightItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -697,55 +597,6 @@ SfxPoolItem* SvxFontHeightItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxFontHeightItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
-{
- rStrm.WriteUInt16( GetHeight() );
-
- if( FONTHEIGHT_UNIT_VERSION <= nItemVersion )
- rStrm.WriteUInt16( GetProp() ).WriteUInt16( static_cast<sal_uInt16>(GetPropUnit()) );
- else
- {
- // When exporting to the old versions the relative information is lost
- // when there is no percentage
- sal_uInt16 _nProp = GetProp();
- if( MapUnit::MapRelative != GetPropUnit() )
- _nProp = 100;
- rStrm.WriteUInt16( _nProp );
- }
- return rStrm;
-}
-
-
-SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm,
- sal_uInt16 nVersion ) const
-{
- sal_uInt16 nsize, nprop = 0;
- MapUnit nPropUnit = MapUnit::MapRelative;
-
- rStrm.ReadUInt16( nsize );
-
- if( FONTHEIGHT_16_VERSION <= nVersion )
- rStrm.ReadUInt16( nprop );
- else
- {
- sal_uInt8 nP;
- rStrm .ReadUChar( nP );
- nprop = static_cast<sal_uInt16>(nP);
- }
-
- if( FONTHEIGHT_UNIT_VERSION <= nVersion )
- {
- sal_uInt16 nTmp;
- rStrm.ReadUInt16( nTmp );
- nPropUnit = static_cast<MapUnit>(nTmp);
- }
-
- SvxFontHeightItem* pItem = new SvxFontHeightItem( nsize, 100, Which() );
- pItem->SetProp( nprop, nPropUnit );
- return pItem;
-}
-
-
bool SvxFontHeightItem::operator==( const SfxPoolItem& rItem ) const
{
assert(SfxPoolItem::operator==(rItem));
@@ -1009,14 +860,6 @@ bool SvxFontHeightItem::GetPresentation
}
-sal_uInt16 SvxFontHeightItem::GetVersion(sal_uInt16 nFileVersion) const
-{
- return (nFileVersion <= SOFFICE_FILEFORMAT_40)
- ? FONTHEIGHT_16_VERSION
- : FONTHEIGHT_UNIT_VERSION;
-}
-
-
void SvxFontHeightItem::ScaleMetrics( long nMult, long nDiv )
{
nHeight = static_cast<sal_uInt32>(Scale( nHeight, nMult, nDiv ));
@@ -1112,21 +955,6 @@ sal_uInt16 SvxTextLineItem::GetValueCount() const
}
-SvStream& SvxTextLineItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteUChar( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxTextLineItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt8 nState;
- rStrm.ReadUChar( nState );
- return new SvxTextLineItem( static_cast<FontLineStyle>(nState), Which() );
-}
-
-
bool SvxTextLineItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -1232,14 +1060,6 @@ SfxPoolItem* SvxUnderlineItem::Clone( SfxItemPool * ) const
}
-SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt8 nState;
- rStrm.ReadUChar( nState );
- return new SvxUnderlineItem( static_cast<FontLineStyle>(nState), Which() );
-}
-
-
OUString SvxUnderlineItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
static const char* RID_SVXITEMS_UL[] =
@@ -1283,14 +1103,6 @@ SfxPoolItem* SvxOverlineItem::Clone( SfxItemPool * ) const
}
-SfxPoolItem* SvxOverlineItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt8 nState;
- rStrm.ReadUChar( nState );
- return new SvxOverlineItem( static_cast<FontLineStyle>(nState), Which() );
-}
-
-
OUString SvxOverlineItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
static const char* RID_SVXITEMS_OL[] =
@@ -1358,21 +1170,6 @@ SfxPoolItem* SvxCrossedOutItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxCrossedOutItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteUChar( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxCrossedOutItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt8 eCross;
- rStrm.ReadUChar( eCross );
- return new SvxCrossedOutItem( static_cast<FontStrikeout>(eCross), Which() );
-}
-
-
bool SvxCrossedOutItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -1450,21 +1247,6 @@ SfxPoolItem* SvxShadowedItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxShadowedItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteBool( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxShadowedItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt8 nState;
- rStrm.ReadUChar( nState );
- return new SvxShadowedItem( nState, Which() );
-}
-
-
bool SvxShadowedItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -1556,21 +1338,6 @@ SfxPoolItem* SvxContourItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxContourItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteBool( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxContourItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- bool bValue;
- rStrm.ReadCharAsBool( bValue );
- return new SvxContourItem( bValue, Which() );
-}
-
-
bool SvxContourItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -1665,27 +1432,10 @@ SvxColorItem::SvxColorItem( const Color& rCol, const sal_uInt16 nId ) :
{
}
-SvxColorItem::SvxColorItem( SvStream &rStrm, const sal_uInt16 nId ) :
- SfxPoolItem( nId )
-{
- Color aColor;
- ReadColor( rStrm, aColor );
- mColor = aColor;
-}
-
SvxColorItem::~SvxColorItem()
{
}
-sal_uInt16 SvxColorItem::GetVersion( sal_uInt16 nFFVer ) const
-{
- DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
- SOFFICE_FILEFORMAT_40==nFFVer ||
- SOFFICE_FILEFORMAT_50==nFFVer,
- "SvxColorItem: Is there a new file format? ");
- return SOFFICE_FILEFORMAT_50 >= nFFVer ? VERSION_USEAUTOCOLOR : 0;
-}
-
bool SvxColorItem::operator==( const SfxPoolItem& rAttr ) const
{
assert(SfxPoolItem::operator==(rAttr));
@@ -1709,21 +1459,6 @@ SfxPoolItem* SvxColorItem::Clone( SfxItemPool * ) const
return new SvxColorItem( *this );
}
-SvStream& SvxColorItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
-{
- if( VERSION_USEAUTOCOLOR == nItemVersion &&
- COL_AUTO == mColor )
- WriteColor( rStrm, COL_BLACK );
- else
- WriteColor( rStrm, mColor );
- return rStrm;
-}
-
-SfxPoolItem* SvxColorItem::Create(SvStream& rStrm, sal_uInt16 /*nVer*/ ) const
-{
- return new SvxColorItem( rStrm, Which() );
-}
-
bool SvxColorItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -2328,17 +2063,6 @@ bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
return true;
}
-sal_uInt16 SvxEmphasisMarkItem::GetVersion( sal_uInt16 nFFVer ) const
-{
- DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
- SOFFICE_FILEFORMAT_40==nFFVer ||
- SOFFICE_FILEFORMAT_50==nFFVer,
- "SvxEmphasisMarkItem: Is there a new file format? ");
-
- return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
-}
-
-
/*************************************************************************
|* class SvxTwoLinesItem
*************************************************************************/
@@ -2448,17 +2172,6 @@ bool SvxTwoLinesItem::GetPresentation( SfxItemPresentation /*ePres*/,
}
-sal_uInt16 SvxTwoLinesItem::GetVersion( sal_uInt16 nFFVer ) const
-{
- DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
- SOFFICE_FILEFORMAT_40==nFFVer ||
- SOFFICE_FILEFORMAT_50==nFFVer,
- "SvxTwoLinesItem: Is there a new file format?" );
-
- return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
-}
-
-
/*************************************************************************
|* class SvxTextRotateItem
*************************************************************************/
@@ -2473,11 +2186,6 @@ SfxPoolItem* SvxTextRotateItem::Clone(SfxItemPool*) const
return new SvxTextRotateItem(*this);
}
-sal_uInt16 SvxTextRotateItem::GetVersion(sal_uInt16 nFFVer) const
-{
- return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
-}
-
bool SvxTextRotateItem::GetPresentation(
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/,
@@ -2563,11 +2271,6 @@ SfxPoolItem* SvxCharRotateItem::Clone( SfxItemPool* ) const
return new SvxCharRotateItem( *this );
}
-sal_uInt16 SvxCharRotateItem::GetVersion( sal_uInt16 nFFVer ) const
-{
- return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
-}
-
bool SvxCharRotateItem::GetPresentation(
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/,
@@ -2658,11 +2361,6 @@ SfxPoolItem* SvxCharScaleWidthItem::Clone( SfxItemPool* ) const
}
-sal_uInt16 SvxCharScaleWidthItem::GetVersion( sal_uInt16 nFFVer ) const
-{
- return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
-}
-
bool SvxCharScaleWidthItem::GetPresentation(
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/,
@@ -2717,11 +2415,6 @@ SfxPoolItem* SvxCharReliefItem::Clone( SfxItemPool * ) const
return new SvxCharReliefItem( *this );
}
-sal_uInt16 SvxCharReliefItem::GetVersion( sal_uInt16 nFFVer ) const
-{
- return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
-}
-
static const char* RID_SVXITEMS_RELIEF[] =
{
RID_SVXITEMS_RELIEF_NONE,
@@ -2815,11 +2508,6 @@ SfxPoolItem* SvxScriptSetItem::Clone( SfxItemPool * ) const
return p;
}
-SfxPoolItem* SvxScriptSetItem::Create( SvStream &, sal_uInt16 ) const
-{
- return nullptr;
-}
-
const SfxPoolItem* SvxScriptSetItem::GetItemOfScriptSet(
const SfxItemSet& rSet, sal_uInt16 nId )
{