Kaydet (Commit) 58a15227 authored tarafından Eike Rathke's avatar Eike Rathke

add css::sheet::DatabaseRange property TotalsRow

Change-Id: Ica3b93ff25c936c0109ab3259c8a8015fcfb99eb
üst 4d7b194d
......@@ -111,6 +111,13 @@ published service DatabaseRange
@since OOo 3.0
*/
[optional, readonly, property] long TokenIndex;
/** specifies whether this range includes a bottom row of totals.
@since LibreOffice 5.0
*/
[optional, property] boolean TotalsRow;
};
......
......@@ -309,6 +309,7 @@
#define SC_UNONAME_CONRES "ConnectionResource"
#define SC_UNONAME_TOKENINDEX "TokenIndex"
#define SC_UNONAME_ISSHAREDFMLA "IsSharedFormula"
#define SC_UNONAME_TOTALSROW "TotalsRow"
// text fields
#define SC_UNONAME_ANCTYPE "AnchorType"
......
......@@ -122,6 +122,7 @@ static const SfxItemPropertyMapEntry* lcl_GetDBRangePropertyMap()
{OUString(SC_UNONAME_STRIPDAT), 0, cppu::UnoType<bool>::get(), 0, 0},
{OUString(SC_UNONAME_TOKENINDEX),0, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::READONLY, 0 },
{OUString(SC_UNONAME_USEFLTCRT),0, cppu::UnoType<bool>::get(), 0, 0},
{OUString(SC_UNONAME_TOTALSROW),0, cppu::UnoType<bool>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aDBRangePropertyMap_Impl;
......@@ -2082,6 +2083,8 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
else if (aString == SC_UNONAME_CONRES )
{
}
else if ( aString == SC_UNONAME_TOTALSROW )
aNewData.SetTotals( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
else
bDo = false;
......@@ -2161,6 +2164,12 @@ uno::Any SAL_CALL ScDatabaseRangeObj::getPropertyValue( const OUString& aPropert
// get index for use in formula tokens (read-only)
aRet <<= static_cast<sal_Int32>(GetDBData_Impl()->GetIndex());
}
else if (aString == SC_UNONAME_TOTALSROW )
{
bool bTotals(GetDBData_Impl()->HasTotals());
ScUnoHelpFunctions::SetBoolInAny( aRet, bTotals );
}
}
return aRet;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment