[Libreoffice-commits] core.git: editeng/source include/editeng sd/source svx/source

2019-06-26 Thread Stephan Bergmann (via logerrit)
 editeng/source/uno/unoipset.cxx  |   19 +++
 include/editeng/unoipset.hxx |4 ++--
 sd/source/ui/unoidl/unopback.cxx |4 ++--
 svx/source/unodraw/unoshape.cxx  |4 ++--
 4 files changed, 17 insertions(+), 14 deletions(-)

New commits:
commit f50b72ed6c70d553d86d471ac80ffeff976c8c30
Author: Stephan Bergmann 
AuthorDate: Mon Jun 24 13:14:12 2019 +0200
Commit: Thorsten Behrens 
CommitDate: Wed Jun 26 11:50:04 2019 +0200

Index on WID+memberID in SvxItemPropertySet::aCombineList

...instead of just WID.  For example when loading
caolan/sdrobject_getmergeditemset_null_ptr_dereference.sample (from the
crashtestdata files) under UBSan,

> #4  0x7fffeeacde54 in 
SvxItemPropertySet::getPropertyValue(SfxItemPropertySimpleEntry const*) const 
(this=0x607001a356d0, pMap=0x604000ec2e60) at 
/home/sbergman/lo/core/editeng/source/uno/unoipset.cxx:219
> #5  0x7fffda713cb9 in SvxShape::_getPropertyValue(rtl::OUString 
const&) (this=0x6150015d7980, PropertyName="CharUnderlineColor") at 
/home/sbergman/lo/core/svx/source/unodraw/unoshape.cxx:1775
> #6  0x7fffda70dbe9 in SvxShape::getPropertyValue(rtl::OUString 
const&) (this=0x6150015d7980, PropertyName="CharUnderlineColor") at 
/home/sbergman/lo/core/svx/source/unodraw/unoshape.cxx:1721
> #7  0x7fffda713f3e in non-virtual thunk to 
SvxShape::getPropertyValue(rtl::OUString const&) () at 
/home/sbergman/lo/core/instdir/program/libsvxcorelo.so
> #8  0x7fff19e8cfa6 in SwXShape::_getPropAtAggrObj(rtl::OUString 
const&) (this=0x61183540, _rPropertyName="CharUnderlineColor") at 
/home/sbergman/lo/core/sw/source/core/unocore/unodraw.cxx:1735
> #9  0x7fff19e8b511 in SwXShape::getPropertyValue(rtl::OUString 
const&) (this=0x61183540, rPropertyName="CharUnderlineColor") at 
/home/sbergman/lo/core/sw/source/core/unocore/unodraw.cxx:1665
[...]

would first store an Any with value sal_Int32 -1 (representing an RGBA
255/255/255/255 color) in aCombineList for property CharUnderlineColor with
WID = EE_CHAR_UNDERLINE = 4027 and member-ID = MID_TL_COLOR = 2, but then 
read
back out that Any for property CharUnderline with the same WID but 
member-ID =
MID_TL_STYLE = 1 and use it at

> include/svl/eitem.hxx:47:20: runtime error: load of value 4294967295, 
which is not a valid value for type 'FontLineStyle'
>  #0 in SfxEnumItem::SetValue(FontLineStyle) at 
include/svl/eitem.hxx:47:20
>  #1 in SvxTextLineItem::PutValue(com::sun::star::uno::Any const&, 
unsigned char) at editeng/source/items/textitem.cxx:1016:13
>  #2 in SvxItemPropertySet::setPropertyValue(SfxItemPropertySimpleEntry 
const*, com::sun::star::uno::Any const&, SfxItemSet&, bool) at 
editeng/source/uno/unoipset.cxx:178:19
>  #3 in SvxItemPropertySet_setPropertyValue(SfxItemPropertySimpleEntry 
const*, com::sun::star::uno::Any const&, SfxItemSet&) at 
svx/source/unodraw/unoshape.cxx:4119:5
>  #4 in 
SvxItemPropertySet_ObtainSettingsFromPropertySet(SvxItemPropertySet const&, 
SfxItemSet&, 
com::sun::star::uno::Reference const&, 
SfxItemPropertyMap const*) at svx/source/unodraw/unoshape.cxx:638:29
>  #5 in SvxShape::ObtainSettingsFromPropertySet(SvxItemPropertySet const&) 
at svx/source/unodraw/unoshape.cxx:656:9
>  #6 in SvxShape::Create(SdrObject*, SvxDrawPage*) at 
svx/source/unodraw/unoshape.cxx:413:5
>  #7 in SvxShapeText::Create(SdrObject*, SvxDrawPage*) at 
svx/source/unodraw/unoshape.cxx:3867:15
>  #8 in 
SvxDrawPage::add(com::sun::star::uno::Reference
 const&) at svx/source/unodraw/unopage.cxx:234:13
>  #9 in 
SwXDrawPage::add(com::sun::star::uno::Reference
 const&) at sw/source/core/unocore/unodraw.cxx:597:19
>  #10 in 
SwXShape::attach(com::sun::star::uno::Reference
 const&) at sw/source/core/unocore/unodraw.cxx:2056:22
[...]

Change-Id: Ic0cf34440507c768b13d1b5b957425d6a43271ac
Reviewed-on: https://gerrit.libreoffice.org/74635
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 8c76af4c45f6..aa6f310c1987 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -37,6 +37,7 @@ using namespace ::com::sun::star;
 struct SvxIDPropertyCombine
 {
 sal_uInt16  nWID;
+sal_uInt8   memberId;
 uno::AnyaAny;
 };
 
@@ -54,21 +55,23 @@ SvxItemPropertySet::~SvxItemPropertySet()
 }
 
 
-uno::Any* SvxItemPropertySet::GetUsrAnyForID(sal_uInt16 nWID) const
+uno::Any* SvxItemPropertySet::GetUsrAnyForID(SfxItemPropertySimpleEntry const 
& entry) const
 {
 for (auto const & pActual : aCombineList)
 {
-if( pActual->nWID == nWID )
+if( pActual->nWID == entry.nWID && pActual->memberId == 
entry.nMemberId )
 return >aAny;
 }
 return nullptr;
 }
 
 
-void SvxItemPropertySet::AddUsrAnyForID(const uno::Any& rAny, sal_uInt16 nWID)
+void 

[Libreoffice-commits] core.git: editeng/source include/editeng sd/source svx/source

2015-09-22 Thread Noel Grandin
 editeng/source/editeng/editeng.cxx  |5 -
 editeng/source/editeng/impedit.hxx  |6 --
 editeng/source/editeng/impedit3.cxx |   11 ---
 editeng/source/outliner/outlin2.cxx |5 -
 include/editeng/editeng.hxx |1 -
 include/editeng/outliner.hxx|3 ---
 sd/source/ui/view/outlview.cxx  |1 -
 svx/source/svdraw/svdedxv.cxx   |2 --
 8 files changed, 34 deletions(-)

New commits:
commit c439d55042c5815b57987238b0e074869004196d
Author: Noel Grandin 
Date:   Tue Sep 22 11:16:30 2015 +0200

remove unused Link<> field

Change-Id: If6c5719adf5240e12e798f72b25c5c19a09bc0f6
Reviewed-on: https://gerrit.libreoffice.org/18769
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 39bf7c6..64c5738 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1529,11 +1529,6 @@ void EditEngine::SetImportHdl( const 
Link& rLink )
 pImpEditEngine->aImportHdl = rLink;
 }
 
-void EditEngine::SetChainingEventHdl( const Link<>& rLink )
-{
-pImpEditEngine->SetChainingEventHdl( rLink );
-}
-
 Link EditEngine::GetImportHdl() const
 {
 return pImpEditEngine->aImportHdl;
diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index 3931f61..4e6d038 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -495,8 +495,6 @@ private:
 Link   maBeginDropHdl;
 Link   maEndDropHdl;
 
-Link<>  aChainingHdlLink;
-
 rtl::Reference xForbiddenCharsTable;
 
 boolbKernAsianPunctuation:1;
@@ -837,8 +835,6 @@ public:
 voidSetModifyHdl( const Link& rLink ) { 
aModifyHdl = rLink; }
 Link GetModifyHdl() const { return aModifyHdl; }
 
-voidSetChainingEventHdl( const Link<>& rLink )  { 
aChainingHdlLink = rLink; }
-
 boolIsInSelectionMode() { return bInSelection; }
 
 voidIndentBlock( EditView* pView, bool bRight );
@@ -871,8 +867,6 @@ public:
 inline ESelection CreateESel( const EditSelection& rSel );
 inline EditSelection  CreateSel( const ESelection& rSel );
 
-voidCallChainingEventHdl();
-
 voidSetStyleSheetPool( SfxStyleSheetPool* pSPool );
 SfxStyleSheetPool*  GetStyleSheetPool() const { return pStylePool; }
 
diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index 0427a23..540b8e7 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -4066,17 +4066,6 @@ void ImpEditEngine::CallStatusHdl()
 }
 }
 
-void ImpEditEngine::CallChainingEventHdl()
-{
-// XXX: We don't use this method any more at the moment.
-// only if it's the right ImpEditEngine (with right info on changes in 
text)
-if ( aChainingHdlLink.IsSet() /* && aStatus.GetStatusWord() */)
-{
-aChainingHdlLink.Call(  );
-
-}
-}
-
 ContentNode* ImpEditEngine::GetPrevVisNode( ContentNode* pCurNode )
 {
 const ParaPortion* pPortion = FindParaPortion( pCurNode );
diff --git a/editeng/source/outliner/outlin2.cxx 
b/editeng/source/outliner/outlin2.cxx
index 087c0c3..2d16ba5 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -128,11 +128,6 @@ void Outliner::SetNotifyHdl( const Link& 
rLink )
 pEditEngine->SetNotifyHdl( Link() );
 }
 
-void Outliner::SetChainingEventHdl( const Link<>& rLink )
-{
-pEditEngine->SetChainingEventHdl( rLink );
-}
-
 void Outliner::SetStatusEventHdl( const Link& rLink )
 {
 pEditEngine->SetStatusEventHdl( rLink );
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index eadf0f5..d9aee4b 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -372,7 +372,6 @@ public:
 voidSetStatusEventHdl( const Link& rLink );
 Link GetStatusEventHdl() const;
 
-voidSetChainingEventHdl( const Link<>& rLink );
 voidSetNotifyHdl( const Link& rLink );
 Link  GetNotifyHdl() const;
 
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index d273020..16ab77c 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -802,9 +802,6 @@ public:
 voidSetStatusEventHdl( const Link& rLink );
 Link GetStatusEventHdl() const;
 
-voidSetChainingEventHdl( const Link<>& rLink );
-
-
 voidDraw( OutputDevice* pOutDev, const Rectangle& rOutRect );
 void