diff options
author | Armin Le Grand <Armin.Le.Grand@me.com> | 2019-04-18 19:25:06 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2019-04-25 19:59:04 +0200 |
commit | 1e2682235cded9a7cd90e55f0bfc60a1285e9a46 (patch) | |
tree | 17457bc49d6faf37270c8a481b94765f58a5f434 /editeng/source/items/paraitem.cxx | |
parent | 5e4c1e6ba425ce0b75864e4584a846957b032e61 (diff) |
WIP: Further preparations for deeper Item changes
(1) Migrated all still existing binary load/save stuff
in SfxPoolItem to legacy files. Isolated from Item
implementations. Adapted all usages. No more methods
Create/Store needed, also GetVersion removed
(2) Removed operator= for SfxPoolItem. Adapted all
usages. Goal ist to handle Items more as Objects
('Object-Oriented') in the sense to move/handle
instances, not to copy one instance over another one
(which is more and more problematic with hard to copy
content as UNO API stuff or similar). This lead to
much more usages of std::shared_ptr which correlates
well with future plans fr Items (see dev branch).
Next logic step will be to also remove copy constructor
Linux build and corrections done
Fixed Writer test and removed unused defines
Fixed another unused m,acro
Started to unify the AutoFormat stuff
Changes to OUString constructor usages, tests completely
No idea why, but SfxStringItem constructor which
takes a OUString& now insists of not getting ::OUString's
handed in - changed all 'SfxStringItem.*OUString.*".*"'
accordingly
Change-Id: Ibed7358b18fb019994a7490332b9d797a6694c29
Reviewed-on: https://gerrit.libreoffice.org/71075
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'editeng/source/items/paraitem.cxx')
-rw-r--r-- | editeng/source/items/paraitem.cxx | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 3bd1449b7c0e..4cf9750f15ca 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -401,47 +401,6 @@ void SvxAdjustItem::SetEnumValue( sal_uInt16 nVal ) } -sal_uInt16 SvxAdjustItem::GetVersion( sal_uInt16 nFileVersion ) const -{ - return (nFileVersion == SOFFICE_FILEFORMAT_31) - ? 0 : ADJUST_LASTBLOCK_VERSION; -} - - -SfxPoolItem* SvxAdjustItem::Create(SvStream& rStrm, sal_uInt16 nVersion) const -{ - char eAdjustment; - rStrm.ReadChar( eAdjustment ); - SvxAdjustItem *pRet = new SvxAdjustItem( static_cast<SvxAdjust>(eAdjustment), Which() ); - if( nVersion >= ADJUST_LASTBLOCK_VERSION ) - { - sal_Int8 nFlags; - rStrm.ReadSChar( nFlags ); - pRet->bOneBlock = 0 != (nFlags & 0x0001); - pRet->bLastCenter = 0 != (nFlags & 0x0002); - pRet->bLastBlock = 0 != (nFlags & 0x0004); - } - return pRet; -} - - -SvStream& SvxAdjustItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const -{ - rStrm.WriteChar( static_cast<char>(GetAdjust()) ); - if ( nItemVersion >= ADJUST_LASTBLOCK_VERSION ) - { - sal_Int8 nFlags = 0; - if ( bOneBlock ) - nFlags |= 0x0001; - if ( bLastCenter ) - nFlags |= 0x0002; - if ( bLastBlock ) - nFlags |= 0x0004; - rStrm.WriteSChar( nFlags ); - } - return rStrm; -} - // class SvxWidowsItem --------------------------------------------------- SvxWidowsItem::SvxWidowsItem(const sal_uInt8 nL, const sal_uInt16 nId ) : @@ -752,12 +711,6 @@ sal_uInt16 SvxTabStopItem::GetPos( const sal_Int32 nPos ) const } -SvxTabStopItem& SvxTabStopItem::operator=( const SvxTabStopItem& rTSI ) -{ - maTabStops = rTSI.maTabStops; - return *this; -} - bool SvxTabStopItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); @@ -1090,16 +1043,6 @@ SfxPoolItem* SvxScriptSpaceItem::Clone( SfxItemPool * ) const return new SvxScriptSpaceItem( *this ); } -sal_uInt16 SvxScriptSpaceItem::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; -} - bool SvxScriptSpaceItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, @@ -1123,16 +1066,6 @@ SfxPoolItem* SvxHangingPunctuationItem::Clone( SfxItemPool * ) const return new SvxHangingPunctuationItem( *this ); } -sal_uInt16 SvxHangingPunctuationItem::GetVersion( sal_uInt16 nFFVer ) const -{ - DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || - SOFFICE_FILEFORMAT_40==nFFVer || - SOFFICE_FILEFORMAT_50==nFFVer, - "SvxHangingPunctuationItem: Is there a new file format? "); - - return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; -} - bool SvxHangingPunctuationItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, @@ -1156,16 +1089,6 @@ SfxPoolItem* SvxForbiddenRuleItem::Clone( SfxItemPool * ) const return new SvxForbiddenRuleItem( *this ); } -sal_uInt16 SvxForbiddenRuleItem::GetVersion( sal_uInt16 nFFVer ) const -{ - DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || - SOFFICE_FILEFORMAT_40==nFFVer || - SOFFICE_FILEFORMAT_50==nFFVer, - "SvxForbiddenRuleItem: Is there a new file format? "); - - return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; -} - bool SvxForbiddenRuleItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, @@ -1192,11 +1115,6 @@ SfxPoolItem* SvxParaVertAlignItem::Clone( SfxItemPool* ) const return new SvxParaVertAlignItem( *this ); } -sal_uInt16 SvxParaVertAlignItem::GetVersion( sal_uInt16 nFFVer ) const -{ - return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; -} - bool SvxParaVertAlignItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, @@ -1252,16 +1170,6 @@ SfxPoolItem* SvxParaGridItem::Clone( SfxItemPool * ) const return new SvxParaGridItem( *this ); } -sal_uInt16 SvxParaGridItem::GetVersion( sal_uInt16 nFFVer ) const -{ - DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || - SOFFICE_FILEFORMAT_40==nFFVer || - SOFFICE_FILEFORMAT_50==nFFVer, - "SvxParaGridItem: Is there a new file format? "); - - return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; -} - bool SvxParaGridItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, |