[Libreoffice-commits] core.git: 7 commits - editeng/source filter/source include/svx sc/source svl/source svx/inc svx/source sw/source
Michael Stahl
mstahl at redhat.com
Wed Nov 18 11:45:27 PST 2015
editeng/source/editeng/eerdll.cxx | 6 ++-
filter/source/msfilter/svdfppt.cxx | 6 ++-
include/svx/sxenditm.hxx | 6 +++
sc/source/core/data/patattr.cxx | 2 -
svl/source/items/itempool.cxx | 62 +++++++++++++++---------------------
svx/inc/sxlayitm.hxx | 2 +
svx/source/svdraw/svdattr.cxx | 38 ++++++++++++++++++++++
sw/source/core/unocore/unoframe.cxx | 7 ++--
sw/source/filter/xml/swxml.cxx | 3 +
9 files changed, 88 insertions(+), 44 deletions(-)
New commits:
commit b1adb498bb0a5ff091c9d1d82332a4c43c57979b
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Nov 18 17:09:19 2015 +0100
svl: replace some legacy SFX_ASSERT in SfxItemPool
Almost all of these look obviously disastrous.
Change-Id: I30e4e3039bafb10eaff4f2413b7a4aaae1f584c1
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index b0eb941..d8a19b9 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -107,7 +107,7 @@ const SfxPoolItem* SfxItemPool::GetPoolDefaultItem( sal_uInt16 nWhich ) const
pRet = pImp->mpSecondary->GetPoolDefaultItem( nWhich );
else
{
- SFX_ASSERT( false, nWhich, "unknown WhichId - cannot get pool default" );
+ assert(false && "unknown WhichId - cannot get pool default");
pRet = nullptr;
}
return pRet;
@@ -277,8 +277,8 @@ void SfxItemPool::SetDefaults( SfxPoolItem **pDefaults )
"these are not static" );
for ( sal_uInt16 n = 0; n <= pImp->mnEnd - pImp->mnStart; ++n )
{
- SFX_ASSERT( (*( pImp->ppStaticDefaults + n ))->Which() == n + pImp->mnStart,
- n + pImp->mnStart, "static defaults not sorted" );
+ assert(((*(pImp->ppStaticDefaults + n))->Which() == n + pImp->mnStart)
+ && "static defaults not sorted" );
(*( pImp->ppStaticDefaults + n ))->SetKind( SFX_ITEMS_STATICDEFAULT );
DBG_ASSERT( !(pImp->maPoolItems[n]), "defaults with setitems with items?!" );
}
@@ -339,8 +339,7 @@ void SfxItemPool::ReleaseDefaults
for ( sal_uInt16 n = 0; n < nCount; ++n )
{
- SFX_ASSERT( IsStaticDefaultItem( *(pDefaults+n) ),
- n, "this is not a static Default" );
+ assert(IsStaticDefaultItem(*(pDefaults+n)));
(*( pDefaults + n ))->SetRefCount( 0 );
if ( bDelete )
{ delete *( pDefaults + n ); *(pDefaults + n) = nullptr; }
@@ -610,7 +609,7 @@ void SfxItemPool::SetPoolDefaultItem(const SfxPoolItem &rItem)
pImp->mpSecondary->SetPoolDefaultItem(rItem);
else
{
- SFX_ASSERT( false, rItem.Which(), "unknown WhichId - cannot set pool default" );
+ assert(false && "unknown WhichId - cannot set pool default");
}
}
@@ -634,7 +633,7 @@ void SfxItemPool::ResetPoolDefaultItem( sal_uInt16 nWhichId )
pImp->mpSecondary->ResetPoolDefaultItem(nWhichId);
else
{
- SFX_ASSERT( false, nWhichId, "unknown WhichId - cannot set pool default" );
+ assert(false && "unknown WhichId - cannot reset pool default");
}
}
@@ -659,18 +658,17 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
if ( USHRT_MAX == nIndex ||
IsItemFlag_Impl( nIndex, SfxItemPoolFlags::NOT_POOLABLE ) )
{
- SFX_ASSERT( USHRT_MAX != nIndex || rItem.Which() != nWhich ||
- !IsDefaultItem(&rItem) || rItem.GetKind() == SFX_ITEMS_DELETEONIDLE,
- nWhich, "a non Pool Item is Defaul?!" );
+ assert((USHRT_MAX != nIndex || rItem.Which() != nWhich ||
+ !IsDefaultItem(&rItem) || rItem.GetKind() == SFX_ITEMS_DELETEONIDLE)
+ && "a non Pool Item is Default?!");
SfxPoolItem *pPoolItem = rItem.Clone(pImp->mpMaster);
pPoolItem->SetWhich(nWhich);
AddRef( *pPoolItem );
return *pPoolItem;
}
- SFX_ASSERT( !pImp->ppStaticDefaults ||
- typeid(rItem) == typeid(GetDefaultItem(nWhich)), nWhich,
- "SFxItemPool: wrong item type in Put" );
+ assert(!pImp->ppStaticDefaults ||
+ typeid(rItem) == typeid(GetDefaultItem(nWhich)));
SfxPoolItemArray_Impl* pItemArr = pImp->maPoolItems[nIndex];
if (!pItemArr)
@@ -741,18 +739,14 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
// 3. not found, so clone to insert into the pointer array.
SfxPoolItem* pNewItem = rItem.Clone(pImp->mpMaster);
pNewItem->SetWhich(nWhich);
-#ifdef DBG_UTIL
- SFX_ASSERT( typeid(rItem) == typeid(*pNewItem), nWhich, "unequal types in Put(): no Clone()?" )
+ assert(typeid(rItem) == typeid(*pNewItem) && "SfxItemPool::Put(): unequal types, no Clone() override?");
if (dynamic_cast<const SfxSetItem*>(&rItem) == nullptr)
{
- SFX_ASSERT( !IsItemFlag(nWhich, SfxItemPoolFlags::POOLABLE) ||
- rItem == *pNewItem,
- nWhich, "unequal items in Put(): no operator==?" );
- SFX_ASSERT( !IsItemFlag(*pNewItem, SfxItemPoolFlags::POOLABLE) ||
- *pNewItem == rItem,
- nWhich, "unequal items in Put(): no operator==?" );
+ assert((!IsItemFlag(nWhich, SfxItemPoolFlags::POOLABLE) || rItem == *pNewItem)
+ && "SfxItemPool::Put(): unequal items: no operator== override?");
+ assert((!IsItemFlag(*pNewItem, SfxItemPoolFlags::POOLABLE) || *pNewItem == rItem)
+ && "SfxItemPool::Put(): unequal items: no operator== override?");
}
-#endif
AddRef( *pNewItem, pImp->nInitRefCount );
// 4. finally insert into the pointer array
@@ -794,8 +788,7 @@ void SfxPoolItemArray_Impl::ReHash()
void SfxItemPool::Remove( const SfxPoolItem& rItem )
{
- SFX_ASSERT( !IsPoolDefaultItem(&rItem), rItem.Which(),
- "where's the Pool Default coming from here?" );
+ assert(!IsPoolDefaultItem(&rItem) && "cannot remove Pool Default");
// Find correct Secondary Pool
const sal_uInt16 nWhich = rItem.Which();
@@ -814,9 +807,8 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
sal_uInt16 nIndex = bSID ? USHRT_MAX : GetIndex_Impl(nWhich);
if ( bSID || IsItemFlag_Impl( nIndex, SfxItemPoolFlags::NOT_POOLABLE ) )
{
- SFX_ASSERT( USHRT_MAX != nIndex ||
- !IsDefaultItem(&rItem), rItem.Which(),
- "a non Pool Item is Default?!" );
+ assert((USHRT_MAX != nIndex || !IsDefaultItem(&rItem)) &&
+ "a non Pool Item is Default?!");
if ( 0 == ReleaseRef(rItem) )
{
SfxPoolItem *pItem = &(SfxPoolItem &)rItem;
@@ -825,7 +817,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
return;
}
- SFX_ASSERT( rItem.GetRefCount(), rItem.Which(), "RefCount == 0, Remove impossible" );
+ assert(rItem.GetRefCount() && "RefCount == 0, Remove impossible");
// Static Defaults are just there
if ( rItem.GetKind() == SFX_ITEMS_STATICDEFAULT &&
@@ -834,7 +826,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
// Find Item in own Pool
SfxPoolItemArray_Impl* pItemArr = pImp->maPoolItems[nIndex];
- SFX_ASSERT( pItemArr, rItem.Which(), "removing Item not in Pool" );
+ assert(pItemArr && "removing Item not in Pool");
SfxPoolItemArray_Impl::PoolItemPtrToIndexMap::iterator it;
it = pItemArr->maPtrToIndex.find(const_cast<SfxPoolItem *>(&rItem));
@@ -849,7 +841,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
ReleaseRef( *p );
else
{
- SFX_ASSERT( false, rItem.Which(), "removing Item without ref" );
+ assert(false && "removing Item without ref");
}
// FIXME: Hack, for as long as we have problems with the Outliner
@@ -869,7 +861,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
}
// not found
- SFX_ASSERT( false, rItem.Which(), "removing Item not in Pool" );
+ assert(false && "removing Item not in Pool");
}
@@ -952,7 +944,7 @@ const SfxPoolItem *SfxItemPool::GetItem2(sal_uInt16 nWhich, sal_uInt32 nOfst) co
{
if ( pImp->mpSecondary )
return pImp->mpSecondary->GetItem2( nWhich, nOfst );
- SFX_ASSERT( false, nWhich, "unknown WhichId - cannot resolve surrogate" );
+ assert(false && "unknown WhichId - cannot resolve surrogate");
return nullptr;
}
@@ -973,7 +965,7 @@ sal_uInt32 SfxItemPool::GetItemCount2(sal_uInt16 nWhich) const
{
if ( pImp->mpSecondary )
return pImp->mpSecondary->GetItemCount2( nWhich );
- SFX_ASSERT( false, nWhich, "unknown WhichId - cannot resolve surrogate" );
+ assert(false && "unknown WhichId - cannot resolve surrogate");
return 0;
}
@@ -1010,7 +1002,7 @@ sal_uInt16 SfxItemPool::GetSlotId( sal_uInt16 nWhich, bool bDeep ) const
{
if ( pImp->mpSecondary && bDeep )
return pImp->mpSecondary->GetSlotId(nWhich);
- SFX_ASSERT( false, nWhich, "unknown WhichId - cannot get slot-id" );
+ assert(false && "unknown WhichId - cannot get slot-id");
return 0;
}
@@ -1045,7 +1037,7 @@ sal_uInt16 SfxItemPool::GetTrueSlotId( sal_uInt16 nWhich, bool bDeep ) const
{
if ( pImp->mpSecondary && bDeep )
return pImp->mpSecondary->GetTrueSlotId(nWhich);
- SFX_ASSERT( false, nWhich, "unknown WhichId - cannot get slot-id" );
+ assert(false && "unknown WhichId - cannot get slot-id");
return 0;
}
return pItemInfos[nWhich - pImp->mnStart]._nSID;
commit 479df22d0b4b0e0393fcf621e7380b38415bcef8
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Nov 18 20:26:56 2015 +0100
svx: SdrLayerNameItem etc. missing Clone overrides
Change-Id: I26ca8070d9c9607a475267ef8780f9013dfd4dcf
diff --git a/svx/inc/sxlayitm.hxx b/svx/inc/sxlayitm.hxx
index 4cbc108..2c2fb6b 100644
--- a/svx/inc/sxlayitm.hxx
+++ b/svx/inc/sxlayitm.hxx
@@ -29,6 +29,7 @@ public:
SdrLayerIdItem(sal_uInt16 nId=0): SfxUInt16Item(SDRATTR_LAYERID,nId) {}
SdrLayerIdItem(SvStream& rIn): SfxUInt16Item(SDRATTR_LAYERID,rIn) {}
SdrLayerID GetValue() const { return (SdrLayerID)SfxUInt16Item::GetValue(); }
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
class SdrLayerNameItem: public SfxStringItem {
@@ -36,6 +37,7 @@ public:
SdrLayerNameItem() : SfxStringItem() { SetWhich(SDRATTR_LAYERNAME); }
SdrLayerNameItem(const OUString& rStr) : SfxStringItem(SDRATTR_LAYERNAME,rStr) {}
SdrLayerNameItem(SvStream& rIn) : SfxStringItem(SDRATTR_LAYERNAME,rIn) {}
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
#endif
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 05fe6fe..5f0978d 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -2277,5 +2277,14 @@ SfxPoolItem* SdrCustomShapeReplacementURLItem::Clone( SfxItemPool*) const
return new SdrCustomShapeReplacementURLItem(*this);
}
+SfxPoolItem* SdrLayerIdItem::Clone(SfxItemPool* /*pPool*/) const
+{
+ return new SdrLayerIdItem(*this);
+}
+
+SfxPoolItem* SdrLayerNameItem::Clone(SfxItemPool* /*pPool*/) const
+{
+ return new SdrLayerNameItem(*this);
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 392c871cde43e9f5006fecff731628c569f24b10
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Nov 18 18:06:05 2015 +0100
sw: use the proper item SwFormatEditInReadonly
Change-Id: I09f3c5cc9e98639bf2b7c4cb37197cb9fb819c82
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index fe19720..4b3a8ed 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -87,6 +87,7 @@
#include <editeng/brushitem.hxx>
#include <editeng/protitem.hxx>
#include <fmtornt.hxx>
+#include <fmteiro.hxx>
#include <fmturl.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/ulspitem.hxx>
@@ -1007,9 +1008,9 @@ bool SwFrameProperties_Impl::AnyToItemSet(SwDoc *pDoc, SfxItemSet& rSet, SfxItem
const ::uno::Any* pEdit;
if(GetProperty(RES_EDIT_IN_READONLY, 0, pEdit))
{
- SfxBoolItem aBool(RES_EDIT_IN_READONLY);
- ((SfxPoolItem&)aBool).PutValue(*pEdit, 0);
- rSet.Put(aBool);
+ SwFormatEditInReadonly item(RES_EDIT_IN_READONLY);
+ item.PutValue(*pEdit, 0);
+ rSet.Put(item);
}
return bRet;
}
commit be8eac8bc0d713ba6633fccd29b3a2ec6ee99baa
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Nov 18 18:00:37 2015 +0100
sw: use the proper item SwFormatRowSplit
Change-Id: Ie7b0d7f7d4549afbd9152d6afb0d0b6078e24bd9
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 1812e51..63be8a3 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -65,6 +65,7 @@
#include <poolfmt.hxx>
#include <numrule.hxx>
#include <paratr.hxx>
+#include <fmtrowsplt.hxx>
#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
@@ -946,7 +947,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
}
// Fix #i58251#: Unfortunately is the static default different to SO7 behaviour,
// so we have to set a dynamic default after importing SO7
- rDoc.SetDefault( SfxBoolItem( RES_ROW_SPLIT, false ) );
+ rDoc.SetDefault(SwFormatRowSplit(false));
}
rDoc.PropagateOutlineRule();
commit 2224d88f6b354afbfb26bd7bc9870ba6575647f8
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Nov 18 17:49:27 2015 +0100
editeng: wrong default item for EE_PARA_FORBIDDENRULES
Change-Id: Idad6192fd1e3049913fac3dd906264fde6d1914e
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 56d451d..fad7bb1 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -38,6 +38,7 @@
#include <editeng/emphasismarkitem.hxx>
#include <editeng/scriptspaceitem.hxx>
#include <editeng/hngpnctitem.hxx>
+#include <editeng/forbiddenruleitem.hxx>
#include <editeng/numdef.hxx>
#include <svl/itempool.hxx>
#include <svl/grabbagitem.hxx>
@@ -107,7 +108,7 @@ SfxPoolItem** GlobalEditData::GetDefItems()
ppDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR );
ppDefItems[1] = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS );
ppDefItems[2] = new SvxHangingPunctuationItem(false, EE_PARA_HANGINGPUNCTUATION);
- ppDefItems[3] = new SfxBoolItem( EE_PARA_FORBIDDENRULES, true );
+ ppDefItems[3] = new SvxForbiddenRuleItem(true, EE_PARA_FORBIDDENRULES);
ppDefItems[4] = new SvxScriptSpaceItem( true, EE_PARA_ASIANCJKSPACING );
ppDefItems[5] = new SvxNumBulletItem( aDefaultNumRule, EE_PARA_NUMBULLET );
ppDefItems[6] = new SfxBoolItem( EE_PARA_HYPHENATE, false );
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 0074004..dfe321c 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -55,6 +55,7 @@
#include <svx/svdetc.hxx>
#include <editeng/bulletitem.hxx>
#include <editeng/hngpnctitem.hxx>
+#include <editeng/forbiddenruleitem.hxx>
#include <svx/polysc3d.hxx>
#include <svx/extrud3d.hxx>
#include <svx/svdoashp.hxx>
@@ -6164,7 +6165,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
}
if ( GetAttrib( PPT_ParaAttr_AsianLB_1, nVal, nDestinationInstance ) )
- rSet.Put( SfxBoolItem( EE_PARA_FORBIDDENRULES, nVal != 0 ) );
+ rSet.Put(SvxForbiddenRuleItem(nVal != 0, EE_PARA_FORBIDDENRULES));
if ( GetAttrib( PPT_ParaAttr_AsianLB_3, nVal, nDestinationInstance ) )
rSet.Put(SvxHangingPunctuationItem(nVal != 0, EE_PARA_HANGINGPUNCTUATION));
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 05b8ceb..ea53285 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -810,7 +810,7 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& r
rEditSet.Put( SvxPostureItem ( eCtlItalic, EE_CHAR_ITALIC_CTL ) );
rEditSet.Put( SvxContourItem ( bOutline, EE_CHAR_OUTLINE ) );
rEditSet.Put( SvxShadowedItem ( bShadow, EE_CHAR_SHADOW ) );
- rEditSet.Put( SfxBoolItem ( EE_PARA_FORBIDDENRULES, bForbidden ) );
+ rEditSet.Put( SvxForbiddenRuleItem(bForbidden, EE_PARA_FORBIDDENRULES) );
rEditSet.Put( SvxEmphasisMarkItem( eEmphasis, EE_CHAR_EMPHASISMARK ) );
rEditSet.Put( SvxCharReliefItem( eRelief, EE_CHAR_RELIEF ) );
rEditSet.Put( SvxLanguageItem ( eLang, EE_CHAR_LANGUAGE ) );
commit 68484613834c788bd5f9db83abc23dd1807072c7
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Nov 18 17:32:11 2015 +0100
editeng: wrong default item for EE_PARA_HANGINGPUNCTUATION
Change-Id: Ib23b5847625964c701bda23d7c58ad32c6024c9b
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 5de7b32..56d451d 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -37,6 +37,7 @@
#include <editeng/flditem.hxx>
#include <editeng/emphasismarkitem.hxx>
#include <editeng/scriptspaceitem.hxx>
+#include <editeng/hngpnctitem.hxx>
#include <editeng/numdef.hxx>
#include <svl/itempool.hxx>
#include <svl/grabbagitem.hxx>
@@ -105,7 +106,7 @@ SfxPoolItem** GlobalEditData::GetDefItems()
ppDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR );
ppDefItems[1] = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS );
- ppDefItems[2] = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, false );
+ ppDefItems[2] = new SvxHangingPunctuationItem(false, EE_PARA_HANGINGPUNCTUATION);
ppDefItems[3] = new SfxBoolItem( EE_PARA_FORBIDDENRULES, true );
ppDefItems[4] = new SvxScriptSpaceItem( true, EE_PARA_ASIANCJKSPACING );
ppDefItems[5] = new SvxNumBulletItem( aDefaultNumRule, EE_PARA_NUMBULLET );
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index dadaad7..0074004 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -54,6 +54,7 @@
#include "svx/xattr.hxx"
#include <svx/svdetc.hxx>
#include <editeng/bulletitem.hxx>
+#include <editeng/hngpnctitem.hxx>
#include <svx/polysc3d.hxx>
#include <svx/extrud3d.hxx>
#include <svx/svdoashp.hxx>
@@ -6165,7 +6166,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
if ( GetAttrib( PPT_ParaAttr_AsianLB_1, nVal, nDestinationInstance ) )
rSet.Put( SfxBoolItem( EE_PARA_FORBIDDENRULES, nVal != 0 ) );
if ( GetAttrib( PPT_ParaAttr_AsianLB_3, nVal, nDestinationInstance ) )
- rSet.Put( SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, nVal != 0 ) );
+ rSet.Put(SvxHangingPunctuationItem(nVal != 0, EE_PARA_HANGINGPUNCTUATION));
if ( GetAttrib( PPT_ParaAttr_BiDi, nVal, nDestinationInstance ) )
rSet.Put( SvxFrameDirectionItem( nVal == 1 ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ) );
commit 79f4b7a7c462f37ec87ce666334f2435cfde0968
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Nov 18 17:30:39 2015 +0100
svx: SdrEdgeNode1HorzDistItem etc. missing Clone overrides
Change-Id: I2bc2de3c3a71dd54e432905c129a3dbd5395f6ab
diff --git a/include/svx/sxenditm.hxx b/include/svx/sxenditm.hxx
index 033ecfd..87cd2ac 100644
--- a/include/svx/sxenditm.hxx
+++ b/include/svx/sxenditm.hxx
@@ -29,6 +29,7 @@ public:
SdrEdgeNode1HorzDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE1HORZDIST,rIn) {}
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;
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
class SVX_DLLPUBLIC SdrEdgeNode1VertDistItem: public SdrMetricItem {
@@ -37,6 +38,7 @@ public:
SdrEdgeNode1VertDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE1VERTDIST,rIn) {}
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;
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
class SVX_DLLPUBLIC SdrEdgeNode2HorzDistItem: public SdrMetricItem {
@@ -45,6 +47,7 @@ public:
SdrEdgeNode2HorzDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE2HORZDIST,rIn) {}
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;
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
class SVX_DLLPUBLIC SdrEdgeNode2VertDistItem: public SdrMetricItem {
@@ -53,18 +56,21 @@ public:
SdrEdgeNode2VertDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE2VERTDIST,rIn) {}
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;
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
class SdrEdgeNode1GlueDistItem: public SdrMetricItem {
public:
SdrEdgeNode1GlueDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE1GLUEDIST,nVal) {}
SdrEdgeNode1GlueDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE1GLUEDIST,rIn) {}
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
class SdrEdgeNode2GlueDistItem: public SdrMetricItem {
public:
SdrEdgeNode2GlueDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE2GLUEDIST,nVal) {}
SdrEdgeNode2GlueDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE2GLUEDIST,rIn) {}
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
#endif
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 6fff974..05fe6fe 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -1655,6 +1655,11 @@ bool SdrEdgeNode1HorzDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemb
return true;
}
+SfxPoolItem* SdrEdgeNode1HorzDistItem::Clone(SfxItemPool* /*pPool*/) const
+{
+ return new SdrEdgeNode1HorzDistItem(*this);
+}
+
bool SdrEdgeNode1VertDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= (sal_Int32)GetValue();
@@ -1671,6 +1676,11 @@ bool SdrEdgeNode1VertDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemb
return true;
}
+SfxPoolItem* SdrEdgeNode1VertDistItem::Clone(SfxItemPool* /*pPool*/) const
+{
+ return new SdrEdgeNode1VertDistItem(*this);
+}
+
bool SdrEdgeNode2HorzDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= (sal_Int32)GetValue();
@@ -1687,6 +1697,11 @@ bool SdrEdgeNode2HorzDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemb
return true;
}
+SfxPoolItem* SdrEdgeNode2HorzDistItem::Clone(SfxItemPool* /*pPool*/) const
+{
+ return new SdrEdgeNode2HorzDistItem(*this);
+}
+
bool SdrEdgeNode2VertDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= (sal_Int32)GetValue();
@@ -1703,6 +1718,20 @@ bool SdrEdgeNode2VertDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemb
return true;
}
+SfxPoolItem* SdrEdgeNode2VertDistItem::Clone(SfxItemPool* /*pPool*/) const
+{
+ return new SdrEdgeNode2VertDistItem(*this);
+}
+
+SfxPoolItem* SdrEdgeNode1GlueDistItem::Clone(SfxItemPool* /*pPool*/) const
+{
+ return new SdrEdgeNode1GlueDistItem(*this);
+}
+
+SfxPoolItem* SdrEdgeNode2GlueDistItem::Clone(SfxItemPool* /*pPool*/) const
+{
+ return new SdrEdgeNode2GlueDistItem(*this);
+}
SfxPoolItem* SdrMeasureKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureKindItem(*this); }
More information about the Libreoffice-commits
mailing list