summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorTamás Zolnai <zolnaitamas2000@gmail.com>2016-11-23 04:50:02 +0000
committerTamás Zolnai <tamas.zolnai@collabora.com>2016-11-23 11:20:45 +0000
commitf8daf04a1d06f870202a1f1868b59ce90adde0e4 (patch)
tree66ceebb312e984693670ff2a7f87178ce0b60f58 /sc/inc
parentbe052dfbde2ed071791d271d6c7d8101b128979b (diff)
[API Change]: Create new GeneralFunction2 for adding median
New functionality added to pivot table became fully broken with Eike's revertion: 50244309501d738e7314fa79785db139c826f8d7 This commit fixes this problem. Reviewed-on: https://gerrit.libreoffice.org/31096 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit c0d4aadf08c16f2d79508367c631366f7a856346) GeneralFunction is not an enum anymore Reviewed-on: https://gerrit.libreoffice.org/31103 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 5b7b2c8649596299c8f00b8b3b5056d272e25ccd) Change-Id: I67cfc63305bb9b2edeed2abd26d729fbf650579f Reviewed-on: https://gerrit.libreoffice.org/31099 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/dapiuno.hxx13
-rw-r--r--sc/inc/dpobject.hxx2
-rw-r--r--sc/inc/dpoutput.hxx1
-rw-r--r--sc/inc/dpsave.hxx4
-rw-r--r--sc/inc/dptabsrc.hxx7
-rw-r--r--sc/inc/dputil.hxx1
-rw-r--r--sc/inc/miscuno.hxx2
-rw-r--r--sc/inc/unonames.hxx4
8 files changed, 19 insertions, 15 deletions
diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx
index 915d9d90d40e..c8f7e88a72a1 100644
--- a/sc/inc/dapiuno.hxx
+++ b/sc/inc/dapiuno.hxx
@@ -41,7 +41,6 @@
#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
#include <com/sun/star/sheet/DataPilotFieldReference.hpp>
#include <com/sun/star/sheet/DataPilotFieldSortInfo.hpp>
-#include <com/sun/star/sheet/GeneralFunction.hpp>
#include <com/sun/star/sheet/XDataPilotDataLayoutFieldSupplier.hpp>
#include <com/sun/star/sheet/XDataPilotDescriptor.hpp>
#include <com/sun/star/sheet/XDataPilotField.hpp>
@@ -70,8 +69,8 @@ class ScDataPilotItemObj;
class ScDataPilotConversion
{
public:
- static css::sheet::GeneralFunction FirstFunc( PivotFunc nBits );
- static PivotFunc FunctionBit( css::sheet::GeneralFunction eFunc );
+ static sal_Int16 FirstFunc( PivotFunc nBits );
+ static PivotFunc FunctionBit( sal_Int16 eFunc );
static void FillGroupInfo(
css::sheet::DataPilotFieldGroupInfo& rInfo,
@@ -551,10 +550,10 @@ public:
// only called from property-functions:
css::sheet::DataPilotFieldOrientation getOrientation() const;
void setOrientation(css::sheet::DataPilotFieldOrientation Orientation);
- css::sheet::GeneralFunction getFunction() const;
- void setFunction(css::sheet::GeneralFunction Function);
- css::uno::Sequence< css::sheet::GeneralFunction > getSubtotals() const;
- void setSubtotals(const css::uno::Sequence< css::sheet::GeneralFunction >& rFunctions);
+ sal_Int16 getFunction() const;
+ void setFunction(sal_Int16 Function);
+ css::uno::Sequence< sal_Int16 > getSubtotals() const;
+ void setSubtotals(const css::uno::Sequence< sal_Int16 >& rFunctions);
void setCurrentPage(const OUString& sPage);
void setUseCurrentPage(bool bUse);
const css::sheet::DataPilotFieldAutoShowInfo* getAutoShowInfo();
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index befd3233f1a1..2f144c5c7786 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -186,7 +186,7 @@ public:
bool ParseFilters(
OUString& rDataFieldName,
std::vector<css::sheet::DataPilotFieldFilter>& rFilters,
- std::vector<css::sheet::GeneralFunction>& rFilterFuncs,
+ std::vector<sal_Int16>& rFilterFuncs,
const OUString& rFilterList );
void GetMemberResultNames(ScDPUniqueStringSet& rNames, long nDimension);
diff --git a/sc/inc/dpoutput.hxx b/sc/inc/dpoutput.hxx
index 78bd6a6b1006..9f9fdcf308a5 100644
--- a/sc/inc/dpoutput.hxx
+++ b/sc/inc/dpoutput.hxx
@@ -23,7 +23,6 @@
#include <com/sun/star/sheet/XDimensionsSupplier.hpp>
#include <com/sun/star/sheet/DataResult.hpp>
#include <com/sun/star/sheet/MemberResult.hpp>
-#include <com/sun/star/sheet/GeneralFunction.hpp>
#include <com/sun/star/sheet/DataPilotOutputRangeType.hpp>
#include "global.hxx"
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index a264ce77b535..663bcb2d724d 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -98,13 +98,13 @@ private:
bool bIsDataLayout;
bool bDupFlag;
sal_uInt16 nOrientation;
- sal_uInt16 nFunction; // enum GeneralFunction, for data dimensions
+ sal_uInt16 nFunction; // GeneralFunction2, for data dimensions
long nUsedHierarchy;
sal_uInt16 nShowEmptyMode; //! at level
bool bRepeatItemLabels; //! at level
bool bSubTotalDefault; //! at level
long nSubTotalCount;
- sal_uInt16* pSubTotalFuncs; // enum GeneralFunction
+ sal_uInt16* pSubTotalFuncs; // GeneralFunction2
css::sheet::DataPilotFieldReference* pReferenceValue;
css::sheet::DataPilotFieldSortInfo* pSortInfo; // (level)
css::sheet::DataPilotFieldAutoShowInfo* pAutoShowInfo; // (level)
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
index 3fca6ce07cc7..48c0714e915a 100644
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -28,7 +28,6 @@
#include <com/sun/star/sheet/XDataPilotResults.hpp>
#include <com/sun/star/sheet/XDataPilotMemberResults.hpp>
#include <com/sun/star/sheet/MemberResult.hpp>
-#include <com/sun/star/sheet/GeneralFunction.hpp>
#include <com/sun/star/sheet/DataPilotFieldAutoShowInfo.hpp>
#include <com/sun/star/sheet/DataPilotFieldLayoutInfo.hpp>
#include <com/sun/star/sheet/DataPilotFieldLayoutMode.hpp>
@@ -307,7 +306,7 @@ class ScDPDimension : public cppu::WeakImplHelper<
ScDPSource* pSource;
long nDim; // dimension index (== column ID)
rtl::Reference<ScDPHierarchies> mxHierarchies;
- sal_uInt16 nFunction; // enum GeneralFunction
+ sal_uInt16 nFunction; // enum GeneralFunction2
OUString aName; // if empty, take from source
std::unique_ptr<OUString> mpLayoutName;
std::unique_ptr<OUString> mpSubtotalName;
@@ -538,7 +537,7 @@ private:
long nHier;
long nLev;
rtl::Reference<ScDPMembers> mxMembers;
- css::uno::Sequence<css::sheet::GeneralFunction> aSubTotals;
+ css::uno::Sequence<sal_Int16> aSubTotals;
css::sheet::DataPilotFieldSortInfo aSortInfo; // stored user settings
css::sheet::DataPilotFieldAutoShowInfo aAutoShowInfo; // stored user settings
css::sheet::DataPilotFieldLayoutInfo aLayoutInfo; // stored user settings
@@ -614,7 +613,7 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw(css::uno::RuntimeException, std::exception) override;
- css::uno::Sequence<css::sheet::GeneralFunction> getSubTotals() const;
+ css::uno::Sequence<sal_Int16> getSubTotals() const;
bool getShowEmpty() const { return bShowEmpty;}
bool getRepeatItemLabels() const { return bRepeatItemLabels; }
diff --git a/sc/inc/dputil.hxx b/sc/inc/dputil.hxx
index 29c7036e0d0e..525e67363c9a 100644
--- a/sc/inc/dputil.hxx
+++ b/sc/inc/dputil.hxx
@@ -51,6 +51,7 @@ public:
static OUString getDisplayedMeasureName(const OUString& rName, ScSubTotalFunc eFunc);
static ScSubTotalFunc toSubTotalFunc(css::sheet::GeneralFunction eGenFunc);
+ static ScSubTotalFunc toSubTotalFunc(sal_Int16 eGenFunc);
};
#endif
diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx
index e453a0a57a3e..d939d77a6759 100644
--- a/sc/inc/miscuno.hxx
+++ b/sc/inc/miscuno.hxx
@@ -154,6 +154,8 @@ public:
AnyToInterface( const css::uno::Any& rAny );
static bool GetBoolProperty( const css::uno::Reference< css::beans::XPropertySet>& xProp,
const OUString& rName, bool bDefault = false );
+ static sal_Int16 GetShortProperty( const css::uno::Reference< css::beans::XPropertySet>& xProp,
+ const OUString& rName, sal_Int16 nDefault );
static sal_Int32 GetLongProperty( const css::uno::Reference< css::beans::XPropertySet>& xProp,
const OUString& rName );
static sal_Int32 GetEnumProperty( const css::uno::Reference< css::beans::XPropertySet>& xProp,
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index e7ff39cbf595..469183d18b78 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -249,7 +249,9 @@
// data pilot field
#define SC_UNONAME_FUNCTION "Function"
+#define SC_UNONAME_FUNCTION2 "Function2"
#define SC_UNONAME_SUBTOTALS "Subtotals"
+#define SC_UNONAME_SUBTOTALS2 "Subtotals2"
#define SC_UNONAME_SELPAGE "SelectedPage"
#define SC_UNONAME_USESELPAGE "UseSelectedPage"
#define SC_UNONAME_HASREFERENCE "HasReference"
@@ -582,9 +584,11 @@
#define SC_UNO_DP_ORIENTATION "Orientation"
#define SC_UNO_DP_POSITION "Position"
#define SC_UNO_DP_FUNCTION "Function"
+#define SC_UNO_DP_FUNCTION2 "Function2"
#define SC_UNO_DP_USEDHIERARCHY "UsedHierarchy"
#define SC_UNO_DP_FILTER "Filter"
#define SC_UNO_DP_SUBTOTAL "SubTotals"
+#define SC_UNO_DP_SUBTOTAL2 "SubTotals2"
#define SC_UNO_DP_SHOWEMPTY "ShowEmpty"
#define SC_UNO_DP_REPEATITEMLABELS "RepeatItemLabels"
#define SC_UNO_DP_ISVISIBLE "IsVisible"