diff options
Diffstat (limited to 'sc/source/ui/unoobj/dapiuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/dapiuno.cxx | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index f72141717159..42ed9179e6aa 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -108,6 +108,7 @@ const SfxItemPropertyMapEntry* lcl_GetDataPilotDescriptorBaseMap() { {MAP_CHAR_LEN(SC_UNO_COLGRAND), 0, &getBooleanCppuType(), 0, 0 }, {MAP_CHAR_LEN(SC_UNO_DRILLDOWN), 0, &getBooleanCppuType(), 0, 0 }, + {MAP_CHAR_LEN(SC_UNO_GRANDTOTAL_NAME),0,&getCppuType((rtl::OUString*)0), beans::PropertyAttribute::MAYBEVOID, 0 }, {MAP_CHAR_LEN(SC_UNO_IGNEMPROWS), 0, &getBooleanCppuType(), 0, 0 }, {MAP_CHAR_LEN(SC_UNO_IMPORTDESC), 0, &getCppuType((uno::Sequence<beans::PropertyValue>*)0), 0, 0 }, {MAP_CHAR_LEN(SC_UNO_RPTEMPTY), 0, &getBooleanCppuType(), 0, 0 }, @@ -343,8 +344,6 @@ ScDataPilotTableObj* ScDataPilotTablesObj::GetObjectByIndex_Impl( sal_Int32 nInd if ( pColl ) { // count tables on this sheet - // api only handles sheet data at this time - //! allow all data sources!!! sal_Int32 nFound = 0; sal_uInt16 nCount = pColl->GetCount(); for (sal_uInt16 i=0; i<nCount; i++) @@ -494,8 +493,6 @@ sal_Int32 SAL_CALL ScDataPilotTablesObj::getCount() throw(RuntimeException) if ( pColl ) { // count tables on this sheet - // api only handles sheet data at this time - //! allow all data sources!!! sal_uInt16 nFound = 0; sal_uInt16 nCount = pColl->GetCount(); @@ -557,8 +554,6 @@ Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames() if ( pColl ) { // count tables on this sheet - // api only handles sheet data at this time - //! allow all data sources!!! sal_uInt16 nFound = 0; sal_uInt16 nCount = pColl->GetCount(); @@ -600,9 +595,6 @@ sal_Bool SAL_CALL ScDataPilotTablesObj::hasByName( const OUString& aName ) sal_uInt16 nCount = pColl->GetCount(); for (sal_uInt16 i=0; i<nCount; i++) { - // api only handles sheet data at this time - //! allow all data sources!!! - ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab && pDPObj->GetName() == aNamStr ) @@ -824,6 +816,12 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp { aNewData.SetDrillDown(::cppu::any2bool( aValue )); } + else if ( aNameString.EqualsAscii( SC_UNO_GRANDTOTAL_NAME ) ) + { + rtl::OUString aStrVal; + if ( aValue >>= aStrVal ) + aNewData.SetGrandTotalName(aStrVal); + } else if ( aNameString.EqualsAscii( SC_UNO_IMPORTDESC ) ) { uno::Sequence<beans::PropertyValue> aArgSeq; @@ -967,6 +965,12 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope { aRet = ::cppu::bool2any( aNewData.GetDrillDown() ); } + else if ( aNameString.EqualsAscii( SC_UNO_GRANDTOTAL_NAME ) ) + { + const rtl::OUString* pGrandTotalName = aNewData.GetGrandTotalName(); + if (pGrandTotalName) + aRet <<= *pGrandTotalName; // same behavior as in ScDPSource + } else if ( aNameString.EqualsAscii( SC_UNO_IMPORTDESC ) ) { const ScImportSourceDesc* pImportDesc = pDPObject->GetImportSourceDesc(); |