summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorVarun Dhall <varun.dhall@studentpartner.com>2017-07-26 01:13:31 +0530
committerMichael Stahl <mstahl@redhat.com>2017-08-07 23:23:02 +0200
commit1e4b1e4a1aca3b333820b0a865997e6f62e80064 (patch)
tree475d33289c60666bc8cce4e8e6484fdf7a70f6d9 /editeng
parent3e177ed2468e535a943dd271f242eca412346f3a (diff)
Removing unused SfxItemPool serialisation from editeng
Change-Id: I051201c272b7acdd48d54cc0c230f8b432196188 Reviewed-on: https://gerrit.libreoffice.org/40429 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editdoc.cxx20
-rw-r--r--editeng/source/editeng/editdoc.hxx2
-rw-r--r--editeng/source/editeng/editobj.cxx172
-rw-r--r--editeng/source/editeng/editobj2.hxx1
-rw-r--r--editeng/source/items/bulitem.cxx118
-rw-r--r--editeng/source/items/flditem.cxx36
-rw-r--r--editeng/source/items/frmitems.cxx308
-rw-r--r--editeng/source/items/justifyitem.cxx8
-rw-r--r--editeng/source/items/numitem.cxx12
-rw-r--r--editeng/source/items/optitems.cxx19
-rw-r--r--editeng/source/items/paraitem.cxx221
-rw-r--r--editeng/source/items/textitem.cxx325
-rw-r--r--editeng/source/items/writingmodeitem.cxx12
13 files changed, 0 insertions, 1254 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index c324c8c35708..e443e81f53d1 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -3084,24 +3084,4 @@ EditEngineItemPool::~EditEngineItemPool()
ClearDefaults();
}
-SvStream& EditEngineItemPool::Store( SvStream& rStream ) const
-{
- // for a 3.1 export a hack has to be installed, as in there is a BUG in
- // SfxItemSet::Load, but not subsequently after 3.1.
-
- // The selected range must be kept after Store, because itemsets are not
- // stored until then...
-
- long nVersion = rStream.GetVersion();
- bool b31Format = nVersion && ( nVersion <= SOFFICE_FILEFORMAT_31 );
-
- EditEngineItemPool* pThis = const_cast<EditEngineItemPool*>(this);
- if ( b31Format )
- pThis->SetStoringRange( 3997, 4022 );
- else
- pThis->SetStoringRange( EE_ITEMS_START, EE_ITEMS_END );
-
- return SfxItemPool::Store( rStream );
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index a2a8549ec632..40cbcd1ea720 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -839,8 +839,6 @@ public:
EditEngineItemPool(bool bPersistenRefCounts);
protected:
virtual ~EditEngineItemPool() override;
-public:
- virtual SvStream& Store(SvStream& rStream) const override;
};
#endif // INCLUDED_EDITENG_SOURCE_EDITENG_EDITDOC_HXX
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 50e516351503..0148fb280624 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -1106,178 +1106,6 @@ public:
}
-void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
-{
- rOStream.WriteUInt16( 603 ); // nVer
-
- rOStream.WriteBool( bOwnerOfPool );
-
- // First store the pool, later only the Surrogate
- if ( bOwnerOfPool )
- {
- GetPool()->SetFileFormatVersion( SOFFICE_FILEFORMAT_50 );
- GetPool()->Store( rOStream );
- }
-
- // Store Current text encoding ...
- rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( osl_getThreadTextEncoding() );
- rOStream.WriteUInt16( eEncoding );
-
- // The number of paragraphs ...
- size_t nParagraphs = aContents.size();
- // FIXME: this truncates, check usage of stream and if it can be changed,
- // i.e. is not persistent, adapt this and reader.
- sal_uInt16 nParagraphs_Stream = static_cast<sal_uInt16>(nParagraphs);
- rOStream.WriteUInt16( nParagraphs_Stream );
-
- sal_Unicode nUniChar = CH_FEATURE;
- char cFeatureConverted = OString(&nUniChar, 1, eEncoding).toChar();
-
- // The individual paragraphs ...
- for (size_t nPara = 0; nPara < nParagraphs_Stream; ++nPara)
- {
- const ContentInfo& rC = *aContents[nPara].get();
-
- // Symbols?
- bool bSymbolPara = false;
- if (rC.GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SfxItemState::SET)
- {
- const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(rC.GetParaAttribs().Get(EE_CHAR_FONTINFO));
- if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
- {
- bSymbolPara = true;
- }
- }
-
- // eEncoding for Text, RTL_TEXTENCODING_SYMBOL for Symbols
- OStringBuffer aBuffer(OUStringToOString(rC.GetText(), bSymbolPara ? RTL_TEXTENCODING_SYMBOL : eEncoding));
-
- for (size_t nA = 0; nA < rC.maCharAttribs.size(); ++nA)
- {
- const XEditAttribute& rAttr = *rC.maCharAttribs[nA].get();
-
- if (rAttr.GetItem()->Which() == EE_CHAR_FONTINFO)
- {
- const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(*rAttr.GetItem());
- if ( ( !bSymbolPara && ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) )
- || ( bSymbolPara && ( rFontItem.GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) )
- {
- // Not correctly converted
- OUString aPart = rC.GetText().copy( rAttr.GetStart(), rAttr.GetEnd() - rAttr.GetStart() );
- OString aNew(OUStringToOString(aPart, rFontItem.GetCharSet()));
- aBuffer.remove(rAttr.GetStart(), rAttr.GetEnd() - rAttr.GetStart());
- aBuffer.insert(rAttr.GetStart(), aNew);
- }
-
- // Convert StarSymbol back to StarBats
- FontToSubsFontConverter hConv = CreateFontToSubsFontConverter( rFontItem.GetFamilyName(), FontToSubsFontFlags::EXPORT | FontToSubsFontFlags::ONLYOLDSOSYMBOLFONTS );
- if ( hConv )
- {
- // Don't create a new Attrib with StarBats font, MBR changed the
- // SvxFontItem::Store() to store StarBats instead of StarSymbol!
- for (sal_Int32 nChar = rAttr.GetStart(); nChar < rAttr.GetEnd(); ++nChar)
- {
- sal_Unicode cOld = rC.GetText()[ nChar ];
- char cConv = OUStringToOString(OUString(ConvertFontToSubsFontChar(hConv, cOld)), RTL_TEXTENCODING_SYMBOL).toChar();
- if ( cConv )
- aBuffer[nChar] = cConv;
- }
- }
- }
- }
-
- // Convert StarSymbol back to StarBats
- // StarSymbol as paragraph attribute or in StyleSheet?
-
- FontToSubsFontConverter hConv = nullptr;
- if (rC.GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SfxItemState::SET)
- {
- hConv = CreateFontToSubsFontConverter( static_cast<const SvxFontItem&>(rC.GetParaAttribs().Get( EE_CHAR_FONTINFO )).GetFamilyName(), FontToSubsFontFlags::EXPORT | FontToSubsFontFlags::ONLYOLDSOSYMBOLFONTS );
- }
- if ( hConv )
- {
- for ( sal_Int32 nChar = 0; nChar < rC.GetText().getLength(); nChar++ )
- {
- const ContentInfo::XEditAttributesType& rAttribs = rC.maCharAttribs;
- if ( std::none_of(rAttribs.begin(), rAttribs.end(),
- FindAttribByChar(EE_CHAR_FONTINFO, nChar)) )
- {
- sal_Unicode cOld = rC.GetText()[ nChar ];
- char cConv = OUStringToOString(OUString(ConvertFontToSubsFontChar(hConv, cOld)), RTL_TEXTENCODING_SYMBOL).toChar();
- if ( cConv )
- aBuffer[nChar] = cConv;
- }
- }
- }
-
-
- // Convert CH_FEATURE to CH_FEATURE_OLD
- OString aText = aBuffer.makeStringAndClear().replace(cFeatureConverted, CH_FEATURE_OLD);
- write_uInt16_lenPrefixed_uInt8s_FromOString(rOStream, aText);
-
- // StyleName and Family...
- write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, rC.GetStyle(), eEncoding);
- rOStream.WriteUInt16( (sal_uInt16)rC.GetFamily() );
-
- // Paragraph attributes ...
- rC.GetParaAttribs().Store( rOStream );
-
- // The number of attributes ...
- size_t nAttribs = rC.maCharAttribs.size();
- rOStream.WriteUInt16( nAttribs );
-
- // And the individual attributes
- // Items as Surrogate => always 8 bytes per Attribute
- // Which = 2; Surregat = 2; Start = 2; End = 2;
- for (size_t nAttr = 0; nAttr < nAttribs; ++nAttr)
- {
- const XEditAttribute& rX = *rC.maCharAttribs[nAttr].get();
-
- rOStream.WriteUInt16( rX.GetItem()->Which() );
- GetPool()->StoreSurrogate(rOStream, rX.GetItem());
- assert(rX.GetStart() >= 0 && rX.GetStart() <= rX.GetEnd());
- if (rX.GetEnd() > SAL_MAX_UINT16)
- {
- //TODO!
- SAL_WARN(
- "editeng",
- "position " << rX.GetEnd() << " > SAL_MAX_UINT16");
- }
- rOStream.WriteUInt16( rX.GetStart() );
- rOStream.WriteUInt16( rX.GetEnd() );
- }
- }
-
- rOStream.WriteUInt16( nMetric );
-
- rOStream.WriteUInt16( (sal_uInt16)nUserType );
- rOStream.WriteUInt32( nObjSettings );
-
- rOStream.WriteBool( bVertical );
- rOStream.WriteBool( bIsTopToBottomVert );
- rOStream.WriteUInt16( static_cast<sal_uInt16>(nScriptType) );
-
- rOStream.WriteBool( bStoreUnicodeStrings );
- if ( bStoreUnicodeStrings )
- {
- for ( size_t nPara = 0; nPara < nParagraphs_Stream; nPara++ )
- {
- const ContentInfo& rC = *aContents[nPara].get();
- sal_uInt16 nL = rC.GetText().getLength();
- rOStream.WriteUInt16( nL );
- // FIXME this isn't endian safe, but presumably this is just used for copy/paste?
- rOStream.WriteBytes(rC.GetText().getStr(), nL*sizeof(sal_Unicode));
-
- // StyleSheetName must be Unicode too!
- // Copy/Paste from EA3 to BETA or from BETA to EA3 not possible, not needed...
- // If needed, change nL back to sal_uLong and increase version...
- nL = rC.GetStyle().getLength();
- rOStream.WriteUInt16( nL );
- rOStream.WriteBytes(rC.GetStyle().getStr(), nL*sizeof(sal_Unicode));
- }
- }
-}
-
void EditTextObjectImpl::CreateData( SvStream& rIStream )
{
rIStream.ReadUInt16( nVersion );
diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx
index 21e91dcec7b8..71ca353acae6 100644
--- a/editeng/source/editeng/editobj2.hxx
+++ b/editeng/source/editeng/editobj2.hxx
@@ -201,7 +201,6 @@ private:
const OUString& rNewName, SfxStyleFamily eNewFamily );
public:
- void StoreData( SvStream& rOStream ) const;
void CreateData( SvStream& rIStream );
EditTextObjectImpl( EditTextObject* pFront, SfxItemPool* pPool );
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index c9b419f5c3a8..951e6b6be85b 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -99,62 +99,6 @@ SvxBulletItem::SvxBulletItem( sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich )
SetDefaults_Impl();
}
-SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich )
- : SfxPoolItem(_nWhich)
- , pGraphicObject(nullptr)
- , nStart(0)
- , nStyle(SvxBulletStyle::ABC_BIG)
- , nScale(0)
-{
- sal_uInt16 nTmp1;
- rStrm.ReadUInt16( nTmp1 );
- nStyle = static_cast<SvxBulletStyle>(nTmp1);
-
- if( nStyle != SvxBulletStyle::BMP )
- aFont = CreateFont( rStrm, BULITEM_VERSION );
- else
- {
- // Safe Load with Test on empty Bitmap
- Bitmap aBmp;
- sal_uInt64 const nOldPos = rStrm.Tell();
- // Ignore Errorcode when reading Bitmap,
- // see comment in SvxBulletItem::Store()
- bool bOldError = rStrm.GetError() != ERRCODE_NONE;
- ReadDIB(aBmp, rStrm, true);
-
- if ( !bOldError && rStrm.GetError() )
- {
- rStrm.ResetError();
- }
-
- if( aBmp.IsEmpty() )
- {
- rStrm.Seek( nOldPos );
- nStyle = SvxBulletStyle::NONE;
- }
- else
- pGraphicObject.reset( new GraphicObject( aBmp ) );
- }
-
- sal_Int32 nTmp(0);
- rStrm.ReadInt32( nTmp ); nWidth = nTmp;
- rStrm.ReadUInt16( nStart );
- sal_uInt8 nTmpInt8(0);
- rStrm.ReadUChar( nTmpInt8 ); // used to be nJustify
-
- char cTmpSymbol(0);
- rStrm.ReadChar( cTmpSymbol );
- //convert single byte to unicode
- cSymbol = OUString(&cTmpSymbol, 1, aFont.GetCharSet()).toChar();
-
- rStrm.ReadUInt16( nScale );
-
- // UNICODE: rStrm >> aPrevText;
- aPrevText = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet());
-
- // UNICODE: rStrm >> aFollowText;
- aFollowText = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet());
-}
SvxBulletItem::SvxBulletItem( const SvxBulletItem& rItem) : SfxPoolItem( rItem )
{
@@ -182,12 +126,6 @@ SfxPoolItem* SvxBulletItem::Clone( SfxItemPool * /*pPool*/ ) const
}
-SfxPoolItem* SvxBulletItem::Create( SvStream& rStrm, sal_uInt16 /*nVersion*/ ) const
-{
- return new SvxBulletItem( rStrm, Which() );
-}
-
-
void SvxBulletItem::SetDefaultFont_Impl()
{
aFont = OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_SYSTEM, GetDefaultFontFlags::NONE );
@@ -267,62 +205,6 @@ bool SvxBulletItem::operator==( const SfxPoolItem& rItem ) const
}
-SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const
-{
- // Correction for empty bitmap
- if( ( nStyle == SvxBulletStyle::BMP ) &&
- ( !pGraphicObject || ( GraphicType::NONE == pGraphicObject->GetType() ) || ( GraphicType::Default == pGraphicObject->GetType() ) ) )
- {
- const_cast< SvxBulletItem* >( this )->pGraphicObject.reset();
- const_cast< SvxBulletItem* >( this )->nStyle = SvxBulletStyle::NONE;
- }
-
- rStrm.WriteUInt16( static_cast<sal_uInt16>(nStyle) );
-
- if( nStyle != SvxBulletStyle::BMP )
- StoreFont( rStrm, aFont );
- else
- {
- sal_uInt64 const _nStart = rStrm.Tell();
-
- // Small preliminary estimate of the size ...
- sal_uInt16 nFac = ( rStrm.GetCompressMode() != SvStreamCompressFlags::NONE ) ? 3 : 1;
- const Bitmap aBmp( pGraphicObject->GetGraphic().GetBitmap() );
- sal_uLong nBytes = aBmp.GetSizeBytes();
- if ( nBytes < sal_uLong(0xFF00*nFac) )
- {
- WriteDIB(aBmp, rStrm, false, true);
- }
-
- sal_uInt64 const nEnd = rStrm.Tell();
- // Item can not write with an overhead more than 64K or SfxMultiRecord
- // will crash. Then prefer to forego on the bitmap, it is only
- // important for the outliner and only for <= 5.0.
- // When reading, the stream-operator makes note of the bitmap and the
- // fact that there is none. This is now the case how it works with
- // large bitmap created from another file format, which do not occupy a
- // 64K chunk, but if a bitmap > 64K is used, the SvxNumBulletItem will
- // have problem loading it, but does not crash.
-
- if ( (nEnd-_nStart) > 0xFF00 )
- rStrm.Seek( _nStart );
- }
- rStrm.WriteInt32( nWidth );
- rStrm.WriteUInt16( nStart );
- rStrm.WriteUChar( 0 ); // used to be nJustify
- rStrm.WriteChar( OUStringToOString(OUString(cSymbol), aFont.GetCharSet()).toChar() );
- rStrm.WriteUInt16( nScale );
-
- // UNICODE: rStrm << aPrevText;
- rStrm.WriteUniOrByteString(aPrevText, rStrm.GetStreamCharSet());
-
- // UNICODE: rStrm << aFollowText;
- rStrm.WriteUniOrByteString(aFollowText, rStrm.GetStreamCharSet());
-
- return rStrm;
-}
-
-
OUString SvxBulletItem::GetFullText() const
{
OUStringBuffer aStr(aPrevText);
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 7612621b6678..c2bdb37ccbd8 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -304,42 +304,6 @@ SfxPoolItem* SvxFieldItem::Clone( SfxItemPool* ) const
}
-SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- SvxFieldData* pData = nullptr;
- SvPersistStream aPStrm( GetClassManager(), &rStrm );
- aPStrm >> pData;
-
- if( aPStrm.IsEof() )
- aPStrm.SetError( SVSTREAM_GENERALERROR );
-
- if ( aPStrm.GetError() == ERRCODE_IO_NOFACTORY )
- aPStrm.ResetError(); // Actually a code for that not all were read Attr ...
-
- return new SvxFieldItem( pData, Which() );
-}
-
-
-SvStream& SvxFieldItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const
-{
- DBG_ASSERT( mxField.get(), "SvxFieldItem::Store: Field?!" );
- SvPersistStream aPStrm( GetClassManager(), &rStrm );
- // The reset error in the above Create method did not exist in 3.1,
- // therefore newer items can not be saved for 3.x-exports!
- if ( ( rStrm.GetVersion() <= SOFFICE_FILEFORMAT_31 ) && mxField.get() &&
- mxField->GetClassId() == 50 /* SdrMeasureField */ )
- {
- // SvxFieldData not enough, because not registered on ClassMgr.
- SvxURLField aDummyData;
- WriteSvPersistBase( aPStrm , &aDummyData );
- }
- else
- WriteSvPersistBase( aPStrm, mxField.get() );
-
- return rStrm;
-}
-
-
bool SvxFieldItem::operator==( const SfxPoolItem& rItem ) const
{
assert(SfxPoolItem::operator==(rItem));
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index ff1d7f839c04..dc506afa7d4e 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -162,21 +162,6 @@ SfxPoolItem* SvxPaperBinItem::Clone( SfxItemPool* ) const
}
-SvStream& SvxPaperBinItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteUChar( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxPaperBinItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- sal_Int8 nBin;
- rStrm.ReadSChar( nBin );
- return new SvxPaperBinItem( Which(), nBin );
-}
-
-
bool SvxPaperBinItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -349,14 +334,6 @@ bool SvxSizeItem::GetPresentation
}
-SvStream& SvxSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteInt32( aSize.Width() );
- rStrm.WriteInt32( aSize.Height() );
- return rStrm;
-}
-
-
void SvxSizeItem::ScaleMetrics( long nMult, long nDiv )
{
aSize.Width() = Scale( aSize.Width(), nMult, nDiv );
@@ -370,18 +347,6 @@ bool SvxSizeItem::HasMetrics() const
}
-SfxPoolItem* SvxSizeItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- sal_Int32 nWidth(0), nHeight(0);
- rStrm.ReadInt32( nWidth ).ReadInt32( nHeight );
-
- SvxSizeItem* pAttr = new SvxSizeItem( Which() );
- pAttr->SetSize(Size(nWidth, nHeight));
-
- return pAttr;
-}
-
-
SvxLRSpaceItem::SvxLRSpaceItem( const sal_uInt16 nId ) :
SfxPoolItem( nId ),
@@ -676,124 +641,6 @@ bool SvxLRSpaceItem::GetPresentation
}
-/** @attention BulletFI: Before v501 in the Outliner the bullet was not on the position of
- the FI, so in older documents one must set FI to 0.
- */
-#define BULLETLR_MARKER 0x599401FE
-
-
-SvStream& SvxLRSpaceItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
-{
- short nSaveFI = nFirstLineOfst;
- const_cast<SvxLRSpaceItem*>(this)->SetTextFirstLineOfst( 0 ); // nLeftMargin is manipulated together with this, see Create()
-
- sal_uInt16 nMargin = 0;
- if( nLeftMargin > 0 )
- nMargin = sal_uInt16( nLeftMargin );
- rStrm.WriteUInt16( nMargin );
- rStrm.WriteUInt16( nPropLeftMargin );
- if( nRightMargin > 0 )
- nMargin = sal_uInt16( nRightMargin );
- else
- nMargin = 0;
- rStrm.WriteUInt16( nMargin );
- rStrm.WriteUInt16( nPropRightMargin );
- rStrm.WriteInt16( nFirstLineOfst );
- rStrm.WriteUInt16( nPropFirstLineOfst );
- if( nTxtLeft > 0 )
- nMargin = sal_uInt16( nTxtLeft );
- else
- nMargin = 0;
- rStrm.WriteUInt16( nMargin );
- if( nItemVersion >= LRSPACE_AUTOFIRST_VERSION )
- {
- sal_Int8 nAutoFirst = bAutoFirst ? 1 : 0;
- if( nItemVersion >= LRSPACE_NEGATIVE_VERSION &&
- ( nLeftMargin < 0 || nRightMargin < 0 || nTxtLeft < 0 ) )
- nAutoFirst |= 0x80;
- rStrm.WriteSChar( nAutoFirst );
-
- // From 6.0 onwards, do not write Magic numbers...
- DBG_ASSERT( rStrm.GetVersion() <= SOFFICE_FILEFORMAT_50, "Change File format SvxLRSpaceItem!" );
- rStrm.WriteUInt32( BULLETLR_MARKER );
- rStrm.WriteInt16( nSaveFI );
-
- if( 0x80 & nAutoFirst )
- {
- rStrm.WriteInt32( nLeftMargin );
- rStrm.WriteInt32( nRightMargin );
- }
- }
-
- const_cast<SvxLRSpaceItem*>(this)->SetTextFirstLineOfst( nSaveFI );
-
- return rStrm;
-}
-
-
-SfxPoolItem* SvxLRSpaceItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
-{
- sal_uInt16 left, prpleft, right, prpright, prpfirstline, txtleft;
- short firstline;
- sal_Int8 autofirst = 0;
-
- if ( nVersion >= LRSPACE_AUTOFIRST_VERSION )
- {
- rStrm.ReadUInt16( left ).ReadUInt16( prpleft ).ReadUInt16( right ).ReadUInt16( prpright ).ReadInt16( firstline ). ReadUInt16( prpfirstline ).ReadUInt16( txtleft ).ReadSChar( autofirst );
-
- sal_uInt64 const nPos = rStrm.Tell();
- sal_uInt32 nMarker;
- rStrm.ReadUInt32( nMarker );
- if ( nMarker == BULLETLR_MARKER )
- {
- rStrm.ReadInt16( firstline );
- if ( firstline < 0 )
- left = left + static_cast<sal_uInt16>(firstline); // see below: txtleft = ...
- }
- else
- rStrm.Seek( nPos );
- }
- else if ( nVersion == LRSPACE_TXTLEFT_VERSION )
- {
- rStrm.ReadUInt16( left ).ReadUInt16( prpleft ).ReadUInt16( right ).ReadUInt16( prpright ).ReadInt16( firstline ). ReadUInt16( prpfirstline ).ReadUInt16( txtleft );
- }
- else if ( nVersion == LRSPACE_16_VERSION )
- {
- rStrm.ReadUInt16( left ).ReadUInt16( prpleft ).ReadUInt16( right ).ReadUInt16( prpright ).ReadInt16( firstline ). ReadUInt16( prpfirstline );
- }
- else
- {
- sal_Int8 nL, nR, nFL;
- rStrm.ReadUInt16( left ).ReadSChar( nL ).ReadUInt16( right ).ReadSChar( nR ).ReadInt16( firstline ).ReadSChar( nFL );
- prpleft = (sal_uInt16)nL;
- prpright = (sal_uInt16)nR;
- prpfirstline = (sal_uInt16)nFL;
- }
-
- txtleft = firstline >= 0 ? left : left - firstline;
- SvxLRSpaceItem* pAttr = new SvxLRSpaceItem( Which() );
-
- pAttr->nLeftMargin = left;
- pAttr->nPropLeftMargin = prpleft;
- pAttr->nRightMargin = right;
- pAttr->nPropRightMargin = prpright;
- pAttr->nFirstLineOfst = firstline;
- pAttr->nPropFirstLineOfst = prpfirstline;
- pAttr->nTxtLeft = txtleft;
- pAttr->bAutoFirst = autofirst & 0x01;
- if( nVersion >= LRSPACE_NEGATIVE_VERSION && ( autofirst & 0x80 ) )
- {
- sal_Int32 nMargin;
- rStrm.ReadInt32( nMargin );
- pAttr->nLeftMargin = nMargin;
- pAttr->nTxtLeft = firstline >= 0 ? nMargin : nMargin - firstline;
- rStrm.ReadInt32( nMargin );
- pAttr->nRightMargin = nMargin;
- }
- return pAttr;
-}
-
-
sal_uInt16 SvxLRSpaceItem::GetVersion( sal_uInt16 nFileVersion ) const
{
return (nFileVersion == SOFFICE_FILEFORMAT_31)
@@ -1030,39 +877,6 @@ bool SvxULSpaceItem::GetPresentation
}
-SvStream& SvxULSpaceItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteUInt16( GetUpper() )
- .WriteUInt16( GetPropUpper() )
- .WriteUInt16( GetLower() )
- .WriteUInt16( GetPropLower() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxULSpaceItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
-{
- sal_uInt16 upper, lower, nPL = 0, nPU = 0;
-
- if ( nVersion == ULSPACE_16_VERSION )
- rStrm.ReadUInt16( upper ).ReadUInt16( nPU ).ReadUInt16( lower ).ReadUInt16( nPL );
- else
- {
- sal_Int8 nU, nL;
- rStrm.ReadUInt16( upper ).ReadSChar( nU ).ReadUInt16( lower ).ReadSChar( nL );
- nPL = (sal_uInt16)nL;
- nPU = (sal_uInt16)nU;
- }
-
- SvxULSpaceItem* pAttr = new SvxULSpaceItem( Which() );
- pAttr->SetUpperValue( upper );
- pAttr->SetLowerValue( lower );
- pAttr->SetPropUpper( nPU );
- pAttr->SetPropLower( nPL );
- return pAttr;
-}
-
-
sal_uInt16 SvxULSpaceItem::GetVersion( sal_uInt16 /*nFileVersion*/ ) const
{
return ULSPACE_16_VERSION;
@@ -1101,21 +915,6 @@ SfxPoolItem* SvxPrintItem::Clone( SfxItemPool* ) const
}
-SvStream& SvxPrintItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteSChar( (sal_Int8)GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxPrintItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- sal_Int8 bIsPrint;
- rStrm.ReadSChar( bIsPrint );
- return new SvxPrintItem( Which(), bIsPrint != 0 );
-}
-
-
bool SvxPrintItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -1139,21 +938,6 @@ SfxPoolItem* SvxOpaqueItem::Clone( SfxItemPool* ) const
}
-SvStream& SvxOpaqueItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteSChar( (sal_Int8)GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxOpaqueItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- sal_Int8 bIsOpaque;
- rStrm.ReadSChar( bIsOpaque );
- return new SvxOpaqueItem( Which(), bIsOpaque != 0 );
-}
-
-
bool SvxOpaqueItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -1251,29 +1035,6 @@ bool SvxProtectItem::GetPresentation
}
-SvStream& SvxProtectItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- sal_Int8 cProt = 0;
- if( IsPosProtected() ) cProt |= 0x01;
- if( IsSizeProtected() ) cProt |= 0x02;
- if( IsContentProtected() ) cProt |= 0x04;
- rStrm.WriteSChar( cProt );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxProtectItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- sal_Int8 cFlags;
- rStrm.ReadSChar( cFlags );
- SvxProtectItem* pAttr = new SvxProtectItem( Which() );
- pAttr->SetPosProtect( ( cFlags & 0x01 ) != 0 );
- pAttr->SetSizeProtect( ( cFlags & 0x02 ) != 0 );
- pAttr->SetContentProtect( ( cFlags & 0x04 ) != 0 );
- return pAttr;
-}
-
-
void SvxProtectItem::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("SvxProtectItem"));
@@ -2605,39 +2366,6 @@ bool SvxBoxInfoItem::GetPresentation
}
-SvStream& SvxBoxInfoItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- sal_Int8 cFlags = 0;
-
- if ( IsTable() )
- cFlags |= 0x01;
- if ( IsDist() )
- cFlags |= 0x02;
- if ( IsMinDist() )
- cFlags |= 0x04;
- rStrm.WriteSChar( cFlags )
- .WriteUInt16( GetDefDist() );
- const SvxBorderLine* pLine[ 2 ];
- pLine[ 0 ] = GetHori();
- pLine[ 1 ] = GetVert();
-
- for( int i = 0; i < 2; i++ )
- {
- const SvxBorderLine* l = pLine[ i ];
- if( l )
- {
- rStrm.WriteChar( (char) i );
- WriteColor( rStrm, l->GetColor() );
- rStrm.WriteInt16( l->GetOutWidth() )
- .WriteInt16( l->GetInWidth() )
- .WriteInt16( l->GetDistance() );
- }
- }
- rStrm.WriteChar( (char) 2 );
- return rStrm;
-}
-
-
void SvxBoxInfoItem::ScaleMetrics( long nMult, long nDiv )
{
if ( pHori ) pHori->ScaleMetrics( nMult, nDiv );
@@ -2652,42 +2380,6 @@ bool SvxBoxInfoItem::HasMetrics() const
}
-SfxPoolItem* SvxBoxInfoItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- sal_Int8 cFlags;
- sal_uInt16 _nDefDist;
- rStrm.ReadSChar( cFlags ).ReadUInt16( _nDefDist );
-
- SvxBoxInfoItem* pAttr = new SvxBoxInfoItem( Which() );
-
- pAttr->SetTable ( ( cFlags & 0x01 ) != 0 );
- pAttr->SetDist ( ( cFlags & 0x02 ) != 0 );
- pAttr->SetMinDist( ( cFlags & 0x04 ) != 0 );
- pAttr->SetDefDist( _nDefDist );
-
- while( true )
- {
- sal_Int8 cLine;
- rStrm.ReadSChar( cLine );
-
- if( cLine > 1 )
- break;
- short nOutline, nInline, nDistance;
- Color aColor;
- ReadColor( rStrm, aColor ).ReadInt16( nOutline ).ReadInt16( nInline ).ReadInt16( nDistance );
- SvxBorderLine aBorder( &aColor );
- aBorder.GuessLinesWidths(SvxBorderLineStyle::NONE, nOutline, nInline, nDistance);
-
- switch( cLine )
- {
- case 0: pAttr->SetLine( &aBorder, SvxBoxInfoItemLine::HORI ); break;
- case 1: pAttr->SetLine( &aBorder, SvxBoxInfoItemLine::VERT ); break;
- }
- }
- return pAttr;
-}
-
-
void SvxBoxInfoItem::ResetFlags()
{
nValidFlags = static_cast<SvxBoxInfoItemValidFlags>(0x7F); // all valid except Disable
diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx
index 540d4f244150..70189308800a 100644
--- a/editeng/source/items/justifyitem.cxx
+++ b/editeng/source/items/justifyitem.cxx
@@ -389,14 +389,6 @@ SfxPoolItem* SvxJustifyMethodItem::Clone( SfxItemPool* ) const
}
-SfxPoolItem* SvxJustifyMethodItem::Create( SvStream& rStream, sal_uInt16 ) const
-{
- sal_uInt16 nVal;
- rStream.ReadUInt16( nVal );
- return new SvxJustifyMethodItem( (SvxCellJustifyMethod)nVal, Which() );
-}
-
-
sal_uInt16 SvxJustifyMethodItem::GetValueCount() const
{
return (sal_uInt16)SvxCellJustifyMethod::Distribute + 1; // Last Enum value + 1
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index cad0f43c6070..2b6a62f1c9a5 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -908,12 +908,6 @@ SvxNumBulletItem::SvxNumBulletItem(SvxNumRule const & rRule, sal_uInt16 _nWhich
{
}
-SfxPoolItem* SvxNumBulletItem::Create(SvStream &rStream, sal_uInt16 /*nItemVersion*/ ) const
-{
- SvxNumRule aNumRule( rStream );
- return new SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET );
-}
-
SvxNumBulletItem::SvxNumBulletItem(const SvxNumBulletItem& rCopy) :
SfxPoolItem(rCopy.Which())
{
@@ -939,12 +933,6 @@ sal_uInt16 SvxNumBulletItem::GetVersion( sal_uInt16 /*nFileVersion*/ ) const
return NUMITEM_VERSION_03;
}
-SvStream& SvxNumBulletItem::Store(SvStream &rStream, sal_uInt16 /*nItemVersion*/ )const
-{
- pNumRule->Store(rStream);
- return rStream;
-}
-
bool SvxNumBulletItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
rVal <<= SvxCreateNumRule( pNumRule.get() );
diff --git a/editeng/source/items/optitems.cxx b/editeng/source/items/optitems.cxx
index 89b6fdaf5fb9..913bb679103e 100644
--- a/editeng/source/items/optitems.cxx
+++ b/editeng/source/items/optitems.cxx
@@ -126,23 +126,4 @@ bool SfxHyphenRegionItem::GetPresentation
}
-SfxPoolItem* SfxHyphenRegionItem::Create(SvStream& rStrm, sal_uInt16 ) const
-{
- sal_uInt8 _nMinLead, _nMinTrail;
- rStrm.ReadUChar( _nMinLead ).ReadUChar( _nMinTrail );
- SfxHyphenRegionItem* pAttr = new SfxHyphenRegionItem( Which() );
- pAttr->GetMinLead() = _nMinLead;
- pAttr->GetMinTrail() = _nMinTrail;
- return pAttr;
-}
-
-
-SvStream& SfxHyphenRegionItem::Store( SvStream& rStrm, sal_uInt16 ) const
-{
- rStrm.WriteUChar( GetMinLead() )
- .WriteUChar( GetMinTrail() );
- return rStrm;
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index dde08b33510c..9396ae3a212a 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -240,39 +240,6 @@ bool SvxLineSpacingItem::GetPresentation
}
-SfxPoolItem* SvxLineSpacingItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_Int8 nPropSpace;
- short nInterSpace;
- sal_uInt16 nHeight;
- sal_Int8 nRule, nInterRule;
-
- rStrm.ReadSChar( nPropSpace )
- .ReadInt16( nInterSpace )
- .ReadUInt16( nHeight )
- .ReadSChar( nRule )
- .ReadSChar( nInterRule );
-
- SvxLineSpacingItem* pAttr = new SvxLineSpacingItem( nHeight, Which() );
- pAttr->SetInterLineSpace( nInterSpace );
- pAttr->SetPropLineSpace( nPropSpace );
- pAttr->SetLineSpaceRule( (SvxLineSpaceRule)nRule );
- pAttr->SetInterLineSpaceRule( (SvxInterLineSpaceRule)nInterRule );
- return pAttr;
-}
-
-
-SvStream& SvxLineSpacingItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteSChar( GetPropLineSpace() )
- .WriteInt16( GetInterLineSpace() )
- .WriteUInt16( GetLineHeight() )
- .WriteSChar( (char) GetLineSpaceRule() )
- .WriteSChar( (char) GetInterLineSpaceRule() );
- return rStrm;
-}
-
-
sal_uInt16 SvxLineSpacingItem::GetValueCount() const
{
return (sal_uInt16)SvxSpecialLineSpace::End; // SvxSpecialLineSpace::TwoLines + 1
@@ -509,21 +476,6 @@ SfxPoolItem* SvxWidowsItem::Clone( SfxItemPool * ) const
}
-SfxPoolItem* SvxWidowsItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_Int8 nLines;
- rStrm.ReadSChar( nLines );
- return new SvxWidowsItem( nLines, Which() );
-}
-
-
-SvStream& SvxWidowsItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteSChar( GetValue() );
- return rStrm;
-}
-
-
bool SvxWidowsItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -570,21 +522,6 @@ SfxPoolItem* SvxOrphansItem::Clone( SfxItemPool * ) const
}
-SfxPoolItem* SvxOrphansItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_Int8 nLines;
- rStrm.ReadSChar( nLines );
- return new SvxOrphansItem( nLines, Which() );
-}
-
-
-SvStream& SvxOrphansItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteSChar( GetValue() );
- return rStrm;
-}
-
-
bool SvxOrphansItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -752,31 +689,6 @@ bool SvxHyphenZoneItem::GetPresentation
}
-SfxPoolItem* SvxHyphenZoneItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_Int8 _bHyphen, _bHyphenPageEnd;
- sal_Int8 _nMinLead, _nMinTrail, _nMaxHyphens;
- rStrm.ReadSChar( _bHyphen ).ReadSChar( _bHyphenPageEnd ).ReadSChar( _nMinLead ).ReadSChar( _nMinTrail ).ReadSChar( _nMaxHyphens );
- SvxHyphenZoneItem* pAttr = new SvxHyphenZoneItem( false, Which() );
- pAttr->SetHyphen( _bHyphen != 0 );
- pAttr->SetPageEnd( _bHyphenPageEnd != 0 );
- pAttr->GetMinLead() = _nMinLead;
- pAttr->GetMinTrail() = _nMinTrail;
- pAttr->GetMaxHyphens() = _nMaxHyphens;
- return pAttr;
-}
-
-
-SvStream& SvxHyphenZoneItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteSChar( (sal_Int8) IsHyphen() )
- .WriteSChar( (sal_Int8) IsPageEnd() )
- .WriteSChar( GetMinLead() )
- .WriteSChar( GetMinTrail() )
- .WriteSChar( GetMaxHyphens() );
- return rStrm;
-}
-
// class SvxTabStop ------------------------------------------------------
SvxTabStop::SvxTabStop()
@@ -1053,83 +965,6 @@ bool SvxTabStopItem::GetPresentation
}
-SfxPoolItem* SvxTabStopItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- sal_Int8 nTabs;
- rStrm.ReadSChar( nTabs );
- SvxTabStopItem* pAttr =
- new SvxTabStopItem( 0, 0, SvxTabAdjust::Default, Which() );
-
- for ( sal_Int8 i = 0; i < nTabs; i++ )
- {
- sal_Int32 nPos(0);
- sal_Int8 eAdjust;
- unsigned char cDecimal, cFill;
- rStrm.ReadInt32( nPos ).ReadSChar( eAdjust ).ReadUChar( cDecimal ).ReadUChar( cFill );
- if( !i || SvxTabAdjust::Default != (SvxTabAdjust)eAdjust )
- pAttr->Insert( SvxTabStop
- ( nPos, (SvxTabAdjust)eAdjust, sal_Unicode(cDecimal), sal_Unicode(cFill) ) );
- }
- return pAttr;
-}
-
-
-SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const
-{
- // Default-Tabs are only expanded for the default Attribute. For complete
- // backward compatibility (<=304) all tabs have to be expanded, this makes
- // the files grow large in size. All only SWG!
-
- const SfxItemPool *pPool = SfxItemPool::GetStoringPool();
- const bool bStoreDefTabs = pPool
- && pPool->GetName() == "SWG"
- && ::IsDefaultItem( this );
-
- const short nTabs = Count();
- sal_uInt16 nCount = 0, nDefDist = 0;
- sal_Int32 nNew = 0;
-
- if( bStoreDefTabs )
- {
- const SvxTabStopItem& rDefTab = static_cast<const SvxTabStopItem &>(
- pPool->GetDefaultItem( pPool->GetWhich( SID_ATTR_TABSTOP, false ) ) );
- nDefDist = sal_uInt16( rDefTab.maTabStops.front().GetTabPos() );
- const sal_Int32 nPos = nTabs > 0 ? (*this)[nTabs-1].GetTabPos() : 0;
- nCount = (sal_uInt16)(nPos / nDefDist);
- nNew = (nCount + 1) * nDefDist;
-
- if( nNew <= nPos + 50 )
- nNew += nDefDist;
-
- sal_Int32 lA3Width = SvxPaperInfo::GetPaperSize(PAPER_A3).Width();
- nCount = (sal_uInt16)(nNew < lA3Width ? ( lA3Width - nNew ) / nDefDist + 1 : 0);
- }
-
- rStrm.WriteSChar( nTabs + nCount );
- for ( short i = 0; i < nTabs; i++ )
- {
- const SvxTabStop& rTab = (*this)[ i ];
- rStrm.WriteInt32( rTab.GetTabPos() )
- .WriteSChar( (char)rTab.GetAdjustment() )
- .WriteUChar( rTab.GetDecimal() )
- .WriteUChar( rTab.GetFill() );
- }
-
- if ( bStoreDefTabs )
- for( ; nCount; --nCount )
- {
- SvxTabStop aSwTabStop(nNew, SvxTabAdjust::Default);
- rStrm.WriteInt32( aSwTabStop.GetTabPos() )
- .WriteSChar( (char)aSwTabStop.GetAdjustment() )
- .WriteUChar( aSwTabStop.GetDecimal() )
- .WriteUChar( aSwTabStop.GetFill() );
- nNew += nDefDist;
- }
-
- return rStrm;
-}
-
-
bool SvxTabStopItem::Insert( const SvxTabStop& rTab )
{
sal_uInt16 nTabPos = GetPos(rTab);
@@ -1165,21 +1000,6 @@ SfxPoolItem* SvxFormatSplitItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxFormatSplitItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteSChar( (sal_Int8)GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxFormatSplitItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- sal_Int8 bIsSplit;
- rStrm.ReadSChar( bIsSplit );
- return new SvxFormatSplitItem( bIsSplit != 0, Which() );
-}
-
-
bool SvxFormatSplitItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -1280,13 +1100,6 @@ SfxPoolItem* SvxScriptSpaceItem::Clone( SfxItemPool * ) const
return new SvxScriptSpaceItem( GetValue(), Which() );
}
-SfxPoolItem* SvxScriptSpaceItem::Create(SvStream & rStrm, sal_uInt16) const
-{
- bool bFlag;
- rStrm.ReadCharAsBool( bFlag );
- return new SvxScriptSpaceItem( bFlag, Which() );
-}
-
sal_uInt16 SvxScriptSpaceItem::GetVersion( sal_uInt16 nFFVer ) const
{
DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
@@ -1320,13 +1133,6 @@ SfxPoolItem* SvxHangingPunctuationItem::Clone( SfxItemPool * ) const
return new SvxHangingPunctuationItem( GetValue(), Which() );
}
-SfxPoolItem* SvxHangingPunctuationItem::Create(SvStream & rStrm, sal_uInt16) const
-{
- bool bValue;
- rStrm.ReadCharAsBool( bValue );
- return new SvxHangingPunctuationItem( bValue, Which() );
-}
-
sal_uInt16 SvxHangingPunctuationItem::GetVersion( sal_uInt16 nFFVer ) const
{
DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
@@ -1360,13 +1166,6 @@ SfxPoolItem* SvxForbiddenRuleItem::Clone( SfxItemPool * ) const
return new SvxForbiddenRuleItem( GetValue(), Which() );
}
-SfxPoolItem* SvxForbiddenRuleItem::Create(SvStream & rStrm, sal_uInt16) const
-{
- bool bValue;
- rStrm.ReadCharAsBool( bValue );
- return new SvxForbiddenRuleItem( bValue, Which() );
-}
-
sal_uInt16 SvxForbiddenRuleItem::GetVersion( sal_uInt16 nFFVer ) const
{
DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
@@ -1403,19 +1202,6 @@ SfxPoolItem* SvxParaVertAlignItem::Clone( SfxItemPool* ) const
return new SvxParaVertAlignItem( GetValue(), Which() );
}
-SfxPoolItem* SvxParaVertAlignItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- sal_uInt16 nVal;
- rStrm.ReadUInt16( nVal );
- return new SvxParaVertAlignItem( (Align)nVal, Which() );
-}
-
-SvStream& SvxParaVertAlignItem::Store( SvStream & rStrm, sal_uInt16 ) const
-{
- rStrm.WriteUInt16( (sal_uInt16)GetValue() );
- return rStrm;
-}
-
sal_uInt16 SvxParaVertAlignItem::GetVersion( sal_uInt16 nFFVer ) const
{
return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
@@ -1476,13 +1262,6 @@ SfxPoolItem* SvxParaGridItem::Clone( SfxItemPool * ) const
return new SvxParaGridItem( GetValue(), Which() );
}
-SfxPoolItem* SvxParaGridItem::Create(SvStream & rStrm, sal_uInt16) const
-{
- bool bFlag;
- rStrm.ReadCharAsBool( bFlag );
- return new SvxParaGridItem( bFlag, Which() );
-}
-
sal_uInt16 SvxParaGridItem::GetVersion( sal_uInt16 nFFVer ) const
{
DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 220c99e417a5..4dbd8d708f88 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1109,13 +1109,6 @@ SfxPoolItem* SvxFontWidthItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxFontWidthItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteUInt16( GetWidth() ).WriteUInt16( GetProp() );
- return rStrm;
-}
-
-
void SvxFontWidthItem::ScaleMetrics( long nMult, long nDiv )
{
nWidth = (sal_uInt16)Scale( nWidth, nMult, nDiv );
@@ -1128,20 +1121,6 @@ bool SvxFontWidthItem::HasMetrics() const
}
-SfxPoolItem* SvxFontWidthItem::Create( SvStream& rStrm,
- sal_uInt16 /*nVersion*/ ) const
-{
- sal_uInt16 nS;
- sal_uInt16 nP;
-
- rStrm.ReadUInt16( nS );
- rStrm.ReadUInt16( nP );
- SvxFontWidthItem* pItem = new SvxFontWidthItem( 0, nP, Which() );
- pItem->SetWidthValue( nS );
- return pItem;
-}
-
-
bool SvxFontWidthItem::operator==( const SfxPoolItem& rItem ) const
{
assert(SfxPoolItem::operator==(rItem));
@@ -1631,21 +1610,6 @@ SfxPoolItem* SvxAutoKernItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxAutoKernItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteBool( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxAutoKernItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt8 nState;
- rStrm.ReadUChar( nState );
- return new SvxAutoKernItem( nState, Which() );
-}
-
-
bool SvxAutoKernItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -1677,21 +1641,6 @@ SfxPoolItem* SvxWordLineModeItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxWordLineModeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteBool( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxWordLineModeItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- bool bValue;
- rStrm.ReadCharAsBool( bValue );
- return new SvxWordLineModeItem( bValue, Which() );
-}
-
-
bool SvxWordLineModeItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -1767,21 +1716,6 @@ SfxPoolItem* SvxPropSizeItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxPropSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteUInt16( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxPropSizeItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt16 nSize;
- rStrm.ReadUInt16( nSize );
- return new SvxPropSizeItem( nSize, Which() );
-}
-
-
bool SvxPropSizeItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -1826,17 +1760,6 @@ SfxPoolItem* SvxBackgroundColorItem::Clone( SfxItemPool * ) const
return new SvxBackgroundColorItem(*this);
}
-SvStream& SvxBackgroundColorItem::Store(SvStream& rStrm, sal_uInt16) const
-{
- GetValue().Write(rStrm);
- return rStrm;
-}
-
-SfxPoolItem* SvxBackgroundColorItem::Create(SvStream& rStrm, sal_uInt16 ) const
-{
- return new SvxBackgroundColorItem( rStrm, Which() );
-}
-
bool SvxBackgroundColorItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
@@ -2010,24 +1933,6 @@ SfxPoolItem* SvxCharSetColorItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxCharSetColorItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteUChar( GetSOStoreTextEncoding(GetCharSet()) );
- WriteColor( rStrm, GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxCharSetColorItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt8 cSet;
- Color aColor;
- rStrm.ReadUChar( cSet );
- ReadColor( rStrm, aColor );
- return new SvxCharSetColorItem( aColor, (rtl_TextEncoding)cSet, Which() );
-}
-
-
bool SvxCharSetColorItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -2054,13 +1959,6 @@ SfxPoolItem* SvxKerningItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxKerningItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteInt16( GetValue() );
- return rStrm;
-}
-
-
void SvxKerningItem::ScaleMetrics( long nMult, long nDiv )
{
SetValue( (sal_Int16)Scale( GetValue(), nMult, nDiv ) );
@@ -2073,14 +1971,6 @@ bool SvxKerningItem::HasMetrics() const
}
-SfxPoolItem* SvxKerningItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- short nValue;
- rStrm.ReadInt16( nValue );
- return new SvxKerningItem( nValue, Which() );
-}
-
-
bool SvxKerningItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -2157,21 +2047,6 @@ SfxPoolItem* SvxCaseMapItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxCaseMapItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteUChar( (sal_uInt8)GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxCaseMapItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt8 cMap;
- rStrm.ReadUChar( cMap );
- return new SvxCaseMapItem( (SvxCaseMap)cMap, Which() );
-}
-
-
bool SvxCaseMapItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -2282,31 +2157,6 @@ SfxPoolItem* SvxEscapementItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxEscapementItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- short _nEsc = GetEsc();
- if( SOFFICE_FILEFORMAT_31 == rStrm.GetVersion() )
- {
- if( DFLT_ESC_AUTO_SUPER == _nEsc )
- _nEsc = DFLT_ESC_SUPER;
- else if( DFLT_ESC_AUTO_SUB == _nEsc )
- _nEsc = DFLT_ESC_SUB;
- }
- rStrm.WriteUChar( GetProportionalHeight() )
- .WriteInt16( _nEsc );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt8 _nProp;
- short _nEsc;
- rStrm.ReadUChar( _nProp ).ReadInt16( _nEsc );
- return new SvxEscapementItem( _nEsc, _nProp, Which() );
-}
-
-
sal_uInt16 SvxEscapementItem::GetValueCount() const
{
return (sal_uInt16)SvxEscapement::End; // SvxEscapement::Subscript + 1
@@ -2448,21 +2298,6 @@ SfxPoolItem* SvxLanguageItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxLanguageItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteUInt16( (sal_uInt16)GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxLanguageItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt16 nValue;
- rStrm.ReadUInt16( nValue );
- return new SvxLanguageItem( LanguageType(nValue), Which() );
-}
-
-
bool SvxLanguageItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -2531,21 +2366,6 @@ SfxPoolItem* SvxNoLinebreakItem::Clone( SfxItemPool* ) const
}
-SvStream& SvxNoLinebreakItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteBool( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxNoLinebreakItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- bool bValue;
- rStrm.ReadCharAsBool( bValue );
- return new SvxNoLinebreakItem( bValue, Which() );
-}
-
-
bool SvxNoLinebreakItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -2572,21 +2392,6 @@ SfxPoolItem* SvxNoHyphenItem::Clone( SfxItemPool* ) const
}
-SvStream& SvxNoHyphenItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteBool( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxNoHyphenItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- bool bValue;
- rStrm.ReadCharAsBool( bValue );
- return new SvxNoHyphenItem( bValue, Which() );
-}
-
-
bool SvxNoHyphenItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -2620,21 +2425,6 @@ SfxPoolItem* SvxBlinkItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxBlinkItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteBool( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxBlinkItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt8 nState;
- rStrm.ReadUChar( nState );
- return new SvxBlinkItem( nState, Which() );
-}
-
-
bool SvxBlinkItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -2666,22 +2456,6 @@ SfxPoolItem* SvxEmphasisMarkItem::Clone( SfxItemPool * ) const
}
-SvStream& SvxEmphasisMarkItem::Store( SvStream& rStrm,
- sal_uInt16 /*nItemVersion*/ ) const
-{
- rStrm.WriteUInt16( GetValue() );
- return rStrm;
-}
-
-
-SfxPoolItem* SvxEmphasisMarkItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- sal_uInt16 nValue;
- rStrm.ReadUInt16( nValue );
- return new SvxEmphasisMarkItem( (FontEmphasisMark)nValue, Which() );
-}
-
-
bool SvxEmphasisMarkItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -2898,20 +2672,6 @@ bool SvxTwoLinesItem::GetPresentation( SfxItemPresentation /*ePres*/,
}
-SfxPoolItem* SvxTwoLinesItem::Create( SvStream & rStrm, sal_uInt16 /*nVer*/) const
-{
- bool _bOn;
- sal_Unicode cStart, cEnd;
- rStrm.ReadCharAsBool( _bOn ).ReadUtf16( cStart ).ReadUtf16( cEnd );
- return new SvxTwoLinesItem( _bOn, cStart, cEnd, Which() );
-}
-
-SvStream& SvxTwoLinesItem::Store(SvStream & rStrm, sal_uInt16 /*nIVer*/) const
-{
- rStrm.WriteBool( GetValue() ).WriteUInt16( GetStartBracket() ).WriteUInt16( GetEndBracket() );
- return rStrm;
-}
-
sal_uInt16 SvxTwoLinesItem::GetVersion( sal_uInt16 nFFVer ) const
{
DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
@@ -2937,19 +2697,6 @@ SfxPoolItem* SvxTextRotateItem::Clone(SfxItemPool*) const
return new SvxTextRotateItem(GetValue(), Which());
}
-SfxPoolItem* SvxTextRotateItem::Create(SvStream& rStrm, sal_uInt16) const
-{
- sal_uInt16 nVal;
- rStrm.ReadUInt16(nVal);
- return new SvxTextRotateItem(nVal, Which());
-}
-
-SvStream& SvxTextRotateItem::Store(SvStream & rStrm, sal_uInt16) const
-{
- rStrm.WriteUInt16(GetValue());
- return rStrm;
-}
-
sal_uInt16 SvxTextRotateItem::GetVersion(sal_uInt16 nFFVer) const
{
return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
@@ -3040,21 +2787,6 @@ SfxPoolItem* SvxCharRotateItem::Clone( SfxItemPool* ) const
return new SvxCharRotateItem( GetValue(), IsFitToLine(), Which() );
}
-SfxPoolItem* SvxCharRotateItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- sal_uInt16 nVal;
- bool b;
- rStrm.ReadUInt16( nVal ).ReadCharAsBool( b );
- return new SvxCharRotateItem( nVal, b, Which() );
-}
-
-SvStream& SvxCharRotateItem::Store( SvStream & rStrm, sal_uInt16 ) const
-{
- bool bFlag = IsFitToLine();
- rStrm.WriteUInt16( GetValue() ).WriteBool( bFlag );
- return rStrm;
-}
-
sal_uInt16 SvxCharRotateItem::GetVersion( sal_uInt16 nFFVer ) const
{
return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
@@ -3149,44 +2881,6 @@ SfxPoolItem* SvxCharScaleWidthItem::Clone( SfxItemPool* ) const
return new SvxCharScaleWidthItem( GetValue(), Which() );
}
-SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, sal_uInt16 ) const
-{
- sal_uInt16 nVal;
- rStrm.ReadUInt16( nVal );
- SvxCharScaleWidthItem* pItem = new SvxCharScaleWidthItem( nVal, Which() );
-
- if ( Which() == EE_CHAR_FONTWIDTH )
- {
- // Was a SvxFontWidthItem in 5.2
- // sal_uInt16 nFixWidth, sal_uInt16 nPropWidth.
- // nFixWidth has never been used...
- rStrm.ReadUInt16( nVal );
- sal_uInt16 nTest;
- rStrm.ReadUInt16( nTest );
- if ( nTest == 0x1234 )
- pItem->SetValue( nVal );
- else
- rStrm.SeekRel( -2*(long)sizeof(sal_uInt16) );
- }
-
- return pItem;
-}
-
-SvStream& SvxCharScaleWidthItem::Store( SvStream& rStream, sal_uInt16 nVer ) const
-{
- SvStream& rRet = SfxUInt16Item::Store( rStream, nVer );
- if ( Which() == EE_CHAR_FONTWIDTH )
- {
- // see comment in Create()....
- rRet.SeekRel( -1*(long)sizeof(sal_uInt16) );
- rRet.WriteUInt16( 0 );
- rRet.WriteUInt16( GetValue() );
- // Really ugly, but not a problem for reading the doc in 5.2
- rRet.WriteUInt16( 0x1234 );
- }
- return rRet;
-}
-
sal_uInt16 SvxCharScaleWidthItem::GetVersion( sal_uInt16 nFFVer ) const
{
@@ -3247,20 +2941,6 @@ SfxPoolItem* SvxCharReliefItem::Clone( SfxItemPool * ) const
return new SvxCharReliefItem( *this );
}
-SfxPoolItem* SvxCharReliefItem::Create(SvStream & rStrm, sal_uInt16) const
-{
- sal_uInt16 nVal;
- rStrm.ReadUInt16( nVal );
- return new SvxCharReliefItem( (FontRelief)nVal, Which() );
-}
-
-SvStream& SvxCharReliefItem::Store(SvStream & rStrm, sal_uInt16 /*nIVer*/) const
-{
- FontRelief nVal = GetValue();
- rStrm.WriteUInt16( (sal_uInt16)nVal );
- return rStrm;
-}
-
sal_uInt16 SvxCharReliefItem::GetVersion( sal_uInt16 nFFVer ) const
{
return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
@@ -3578,11 +3258,6 @@ SfxPoolItem* SvxRsidItem::Clone( SfxItemPool * ) const
return new SvxRsidItem( *this );
}
-SfxPoolItem* SvxRsidItem::Create(SvStream& rIn, sal_uInt16 ) const
-{
- return new SvxRsidItem( rIn, Which() );
-}
-
void SvxRsidItem::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("SvxRsidItem"));
diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx
index c3a53475d635..749eac131e05 100644
--- a/editeng/source/items/writingmodeitem.cxx
+++ b/editeng/source/items/writingmodeitem.cxx
@@ -48,18 +48,6 @@ SfxPoolItem* SvxWritingModeItem::Clone( SfxItemPool * ) const
return new SvxWritingModeItem( *this );
}
-SfxPoolItem* SvxWritingModeItem::Create( SvStream & , sal_uInt16 ) const
-{
- OSL_FAIL("SvxWritingModeItem should not be streamed!");
- return nullptr;
-}
-
-SvStream& SvxWritingModeItem::Store( SvStream & rStrm, sal_uInt16 ) const
-{
- OSL_FAIL("SvxWritingModeItem should not be streamed!");
- return rStrm;
-}
-
sal_uInt16 SvxWritingModeItem::GetVersion( sal_uInt16 /*nFVer*/ ) const
{
return USHRT_MAX;