offapi/com/sun/star/sheet/GeneralFunction.idl | 7 +------ offapi/type_reference/offapi.idl | 3 +-- sc/qa/unit/subsequent_export-test.cxx | 7 +++++++ sc/source/core/data/dpoutput.cxx | 3 +++ sc/source/core/data/dputil.cxx | 3 +++ sc/source/filter/xml/XMLConverter.cxx | 6 ++++++ sc/source/ui/unoobj/dapiuno.cxx | 6 ++++++ sc/source/ui/unoobj/datauno.cxx | 5 +++++ 8 files changed, 32 insertions(+), 8 deletions(-)
New commits: commit 50244309501d738e7314fa79785db139c826f8d7 Author: Eike Rathke <er...@redhat.com> Date: Tue Nov 22 19:50:52 2016 +0100 [API Change] revert incompatible change of enum css::sheet::GeneralFunction Quick solution before 5-3 branch off without reverting everything related. This will need a new constant value type for API instead of the enum and an internal mapping from/to the enum. Kept the GeneralFunction_MEDIAN at all places in uing code so it can be easily grep'ed for. Change-Id: I95256649f16ded08e467003d2924be0ff5efb87f diff --git a/offapi/com/sun/star/sheet/GeneralFunction.idl b/offapi/com/sun/star/sheet/GeneralFunction.idl index a7d3416..ff9615c 100644 --- a/offapi/com/sun/star/sheet/GeneralFunction.idl +++ b/offapi/com/sun/star/sheet/GeneralFunction.idl @@ -93,13 +93,8 @@ published enum GeneralFunction /** variance is calculated based on the entire population. */ - VARP, + VARP - /** - * median of all numerical values is calculated. - * @since LibreOffice 5.3 - */ - MEDIAN }; diff --git a/offapi/type_reference/offapi.idl b/offapi/type_reference/offapi.idl index 04d89e8..c726834 100644 --- a/offapi/type_reference/offapi.idl +++ b/offapi/type_reference/offapi.idl @@ -11492,8 +11492,7 @@ module com { STDEV = 9, STDEVP = 10, VAR = 11, - VARP = 12, - MEDIAN = 13 + VARP = 12 }; /** @deprecated */ published interface XConsolidationDescriptor { interface ::com::sun::star::uno::XInterface; diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 158f26b..9b2441a 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -2968,9 +2968,16 @@ void ScExportTest::testPivotTableMedian() std::vector<ScDPSaveDimension const *>::size_type(1), aDims.size()); const ScDPSaveDimension* pDim = aDims.back(); +#if 0 +// disabled because of css::sheet::GeneralFunction API incompatibility CPPUNIT_ASSERT_EQUAL_MESSAGE( "Function for the data field should be MEDIAN.", sal_uInt16(sheet::GeneralFunction_MEDIAN), pDim->GetFunction()); +#else + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "Function for the data field should be MEDIAN.", + sal_uInt16(sheet::GeneralFunction_NONE), pDim->GetFunction()); +#endif xDocSh2->DoClose(); } diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 39227bf..1bd6a62 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -1547,7 +1547,10 @@ OUString lcl_GetDataFieldName( const OUString& rSourceName, sheet::GeneralFuncti case sheet::GeneralFunction_COUNT: case sheet::GeneralFunction_COUNTNUMS: nStrId = STR_FUN_TEXT_COUNT; break; case sheet::GeneralFunction_AVERAGE: nStrId = STR_FUN_TEXT_AVG; break; +#if 0 +// disabled because of css::sheet::GeneralFunction API incompatibility case sheet::GeneralFunction_MEDIAN: nStrId = STR_FUN_TEXT_MEDIAN; break; +#endif case sheet::GeneralFunction_MAX: nStrId = STR_FUN_TEXT_MAX; break; case sheet::GeneralFunction_MIN: nStrId = STR_FUN_TEXT_MIN; break; case sheet::GeneralFunction_PRODUCT: nStrId = STR_FUN_TEXT_PRODUCT; break; diff --git a/sc/source/core/data/dputil.cxx b/sc/source/core/data/dputil.cxx index b0f868f..d64a5a8d 100644 --- a/sc/source/core/data/dputil.cxx +++ b/sc/source/core/data/dputil.cxx @@ -410,7 +410,10 @@ ScSubTotalFunc ScDPUtil::toSubTotalFunc(css::sheet::GeneralFunction eGenFunc) case sheet::GeneralFunction_SUM: eSubTotal = SUBTOTAL_FUNC_SUM; break; case sheet::GeneralFunction_COUNT: eSubTotal = SUBTOTAL_FUNC_CNT2; break; case sheet::GeneralFunction_AVERAGE: eSubTotal = SUBTOTAL_FUNC_AVE; break; +#if 0 +// disabled because of css::sheet::GeneralFunction API incompatibility case sheet::GeneralFunction_MEDIAN: eSubTotal = SUBTOTAL_FUNC_MED; break; +#endif case sheet::GeneralFunction_MAX: eSubTotal = SUBTOTAL_FUNC_MAX; break; case sheet::GeneralFunction_MIN: eSubTotal = SUBTOTAL_FUNC_MIN; break; case sheet::GeneralFunction_PRODUCT: eSubTotal = SUBTOTAL_FUNC_PROD; break; diff --git a/sc/source/filter/xml/XMLConverter.cxx b/sc/source/filter/xml/XMLConverter.cxx index 9cd60bb..3c16880 100644 --- a/sc/source/filter/xml/XMLConverter.cxx +++ b/sc/source/filter/xml/XMLConverter.cxx @@ -56,8 +56,11 @@ sheet::GeneralFunction ScXMLConverter::GetFunctionFromString( const OUString& sF return sheet::GeneralFunction_PRODUCT; if( IsXMLToken(sFunction, XML_AVERAGE ) ) return sheet::GeneralFunction_AVERAGE; +#if 0 +// disabled because of css::sheet::GeneralFunction API incompatibility if( IsXMLToken(sFunction, XML_MEDIAN ) ) return sheet::GeneralFunction_MEDIAN; +#endif if( IsXMLToken(sFunction, XML_MAX ) ) return sheet::GeneralFunction_MAX; if( IsXMLToken(sFunction, XML_MIN ) ) @@ -111,7 +114,10 @@ void ScXMLConverter::GetStringFromFunction( { case sheet::GeneralFunction_AUTO: sFuncStr = GetXMLToken( XML_AUTO ); break; case sheet::GeneralFunction_AVERAGE: sFuncStr = GetXMLToken( XML_AVERAGE ); break; +#if 0 +// disabled because of css::sheet::GeneralFunction API incompatibility case sheet::GeneralFunction_MEDIAN: sFuncStr = GetXMLToken( XML_MEDIAN ); break; +#endif case sheet::GeneralFunction_COUNT: sFuncStr = GetXMLToken( XML_COUNT ); break; case sheet::GeneralFunction_COUNTNUMS: sFuncStr = GetXMLToken( XML_COUNTNUMS ); break; case sheet::GeneralFunction_MAX: sFuncStr = GetXMLToken( XML_MAX ); break; diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index fe2590b..a09053b 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -184,7 +184,10 @@ GeneralFunction ScDataPilotConversion::FirstFunc( PivotFunc nBits ) if ( nBits & PivotFunc::Sum ) return GeneralFunction_SUM; if ( nBits & PivotFunc::Count ) return GeneralFunction_COUNT; if ( nBits & PivotFunc::Average ) return GeneralFunction_AVERAGE; +#if 0 +// disabled because of css::sheet::GeneralFunction API incompatibility if ( nBits & PivotFunc::Median ) return GeneralFunction_MEDIAN; +#endif if ( nBits & PivotFunc::Max ) return GeneralFunction_MAX; if ( nBits & PivotFunc::Min ) return GeneralFunction_MIN; if ( nBits & PivotFunc::Product ) return GeneralFunction_PRODUCT; @@ -205,7 +208,10 @@ PivotFunc ScDataPilotConversion::FunctionBit( GeneralFunction eFunc ) case GeneralFunction_SUM: nRet = PivotFunc::Sum; break; case GeneralFunction_COUNT: nRet = PivotFunc::Count; break; case GeneralFunction_AVERAGE: nRet = PivotFunc::Average; break; +#if 0 +// disabled because of css::sheet::GeneralFunction API incompatibility case GeneralFunction_MEDIAN: nRet = PivotFunc::Median; break; +#endif case GeneralFunction_MAX: nRet = PivotFunc::Max; break; case GeneralFunction_MIN: nRet = PivotFunc::Min; break; case GeneralFunction_PRODUCT: nRet = PivotFunc::Product; break; diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index 403bb6a4..63c5a86 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -144,7 +144,12 @@ sheet::GeneralFunction ScDataUnoConversion::SubTotalToGeneral( ScSubTotalFunc e case SUBTOTAL_FUNC_AVE: eGeneral = sheet::GeneralFunction_AVERAGE; break; case SUBTOTAL_FUNC_CNT: eGeneral = sheet::GeneralFunction_COUNTNUMS; break; case SUBTOTAL_FUNC_CNT2: eGeneral = sheet::GeneralFunction_COUNT; break; +#if 0 +// disabled because of css::sheet::GeneralFunction API incompatibility case SUBTOTAL_FUNC_MED: eGeneral = sheet::GeneralFunction_MEDIAN; break; +#else + case SUBTOTAL_FUNC_MED: eGeneral = sheet::GeneralFunction_NONE; break; +#endif case SUBTOTAL_FUNC_MAX: eGeneral = sheet::GeneralFunction_MAX; break; case SUBTOTAL_FUNC_MIN: eGeneral = sheet::GeneralFunction_MIN; break; case SUBTOTAL_FUNC_PROD: eGeneral = sheet::GeneralFunction_PRODUCT; break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits