summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-04-23 18:10:19 +0200
committerEike Rathke <erack@redhat.com>2015-04-23 19:10:18 +0200
commit58a1522798deb51d2dddd2a20788158e3867aa2d (patch)
tree436c64ce3b501234bdc2937db431cd1b2988a962
parent4d7b194dd5910f19652e9fa997efbd947b20e570 (diff)
add css::sheet::DatabaseRange property TotalsRow
Change-Id: Ica3b93ff25c936c0109ab3259c8a8015fcfb99eb
-rw-r--r--offapi/com/sun/star/sheet/DatabaseRange.idl7
-rw-r--r--sc/inc/unonames.hxx1
-rw-r--r--sc/source/ui/unoobj/datauno.cxx9
3 files changed, 17 insertions, 0 deletions
diff --git a/offapi/com/sun/star/sheet/DatabaseRange.idl b/offapi/com/sun/star/sheet/DatabaseRange.idl
index 77fc61fe6f5b..585fcd308f66 100644
--- a/offapi/com/sun/star/sheet/DatabaseRange.idl
+++ b/offapi/com/sun/star/sheet/DatabaseRange.idl
@@ -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;
};
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index b35c7ba34e63..d937775769c0 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -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"
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 8951fe51a8c1..af24ed43c6fc 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -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;
}