diff options
author | Mathias Bauer <mba@openoffice.org> | 2002-09-06 11:43:40 +0000 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2002-09-06 11:43:40 +0000 |
commit | e270f8047c195798b3ed2a14a6f3e082af5c822b (patch) | |
tree | 3c5f24efdc16b2cd052a0a167c160c7c0ea6b5a7 /sfx2 | |
parent | ede7ff6528a7c19867cba0144ec040bba58454a0 (diff) |
#103035#: complex arguments need at least one member set
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appuno.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 3d498bf9ee9f..114c66781358 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: appuno.cxx,v $ * - * $Revision: 1.72 $ + * $Revision: 1.73 $ * - * last change: $Author: cd $ $Date: 2002-08-29 13:43:59 $ + * last change: $Author: mba $ $Date: 2002-09-06 12:43:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -462,7 +462,9 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else { // complex argument; collect sub items from argument arry and reconstruct complex item - BOOL bRet = TRUE; + // only put item if at least one member was found and had the correct type + // (is this a good idea?! Should we ask for *all* members?) + BOOL bRet = FALSE; for ( sal_uInt16 n=0; n<nCount; n++ ) { const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n]; @@ -475,6 +477,8 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque const char* pName = aStr.GetBuffer(); if ( rProp.Name.compareToAscii( pName ) == COMPARE_EQUAL ) { + // at least one member found ... + bRet = TRUE; #ifdef DBG_UTIL ++nFoundArgs; #endif @@ -482,6 +486,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if ( bConvertTwips ) nSubId |= CONVERT_TWIPS; if (!pItem->PutValue( rProp.Value, nSubId ) ) + // ... but it was not convertable bRet = FALSE; break; } |