offapi/com/sun/star/sheet/DatabaseRange.idl | 7 ++++++ oox/source/token/properties.txt | 30 ++++++++++++++-------------- sc/inc/unonames.hxx | 1 sc/source/filter/oox/tablebuffer.cxx | 10 ++++++++- sc/source/ui/unoobj/datauno.cxx | 9 ++++++++ 5 files changed, 41 insertions(+), 16 deletions(-)
New commits: commit b2ead407c70f71974a1eac79df09072ff8bd0cc2 Author: Eike Rathke <[email protected]> Date: Thu Apr 23 19:06:11 2015 +0200 set DatabaseRange TotalsRow if Table TotalsRows Change-Id: I740aa0dc8c49eda456df1a5dee264edc6bb3e403 diff --git a/sc/source/filter/oox/tablebuffer.cxx b/sc/source/filter/oox/tablebuffer.cxx index 1e111b5..d70c8c5 100644 --- a/sc/source/filter/oox/tablebuffer.cxx +++ b/sc/source/filter/oox/tablebuffer.cxx @@ -91,8 +91,16 @@ void Table::finalizeImport() createDatabaseRangeObject( maDBRangeName, maModel.maRange ), UNO_SET_THROW); maDestRange = xDatabaseRange->getDataArea(); - // get formula token index of the database range PropertySet aPropSet( xDatabaseRange ); + + if (maModel.mnTotalsRows > 0) + { + SAL_WARN_IF( maModel.mnTotalsRows > 1, "sc.filter", + "Table TotalsRows > 1 not supported: " << maModel.mnTotalsRows); + aPropSet.setProperty( PROP_TotalsRow, true); + } + + // get formula token index of the database range if( !aPropSet.getProperty( mnTokenIndex, PROP_TokenIndex ) ) mnTokenIndex = -1; } commit 1d6a35b2a3c3f8ba487dd8ab994f70c969dc8f74 Author: Eike Rathke <[email protected]> Date: Thu Apr 23 19:02:33 2015 +0200 this should be sorted and unique, no? Change-Id: Ic310a81aedc35b9a64ab60cadae30343a6115d60 diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index d1f8ea0..dfef4dc 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -7,7 +7,6 @@ Adjust AdjustContrast AdjustLuminance AdjustmentValues -Address Align AnchorPosition AnchorType @@ -110,8 +109,8 @@ CrossoverPosition CrossoverValue CursorPositionX CursorPositionY -CurveStyle CurveName +CurveStyle CustomShapeGeometry D3DSceneAmbientColor D3DSceneLightColor2 @@ -121,10 +120,10 @@ D3DSceneLightOn2 D3DScenePerspective D3DSceneShadeMode DDELinks -DatabaseRanges DataTableHBorder -DataTableVBorder DataTableOutline +DataTableVBorder +DatabaseRanges Decoration DefaultScrollValue DefaultSpinValue @@ -156,8 +155,8 @@ Expansion ExternalData ExternalDocLinks ExternalLinks -ExtrapolateForward ExtrapolateBackward +ExtrapolateForward FileFormat FillBitmapMode FillBitmapName @@ -199,8 +198,8 @@ FormulaConvention FrameIsAutomaticHeight Function GapwidthSequence -Geometry3D GenerateVbaEvents +Geometry3D GradientName Graphic GraphicColorMode @@ -318,10 +317,10 @@ MissingValueTreatment Model ModifyPasswordHash MoveProtect +MovingAveragePeriod MultiLine MultiPageValue MultiSelection -MovingAveragePeriod Name NamedRanges NegativeError @@ -332,8 +331,8 @@ NumberingLevel NumberingRules NumberingType Offset -Opaque OpCodeMap +Opaque Orientation OutputPosition OverlapSequence @@ -357,10 +356,10 @@ Path PercentageNumberFormat PersistName Perspective -PolygonKind -PolynomialDegree PolyPolygon PolyPolygonBezier +PolygonKind +PolynomialDegree Position PositionBottom PositionLeft @@ -484,8 +483,8 @@ StartWith StartingAngle State StringItemList -Subtotals SubViewSize +Subtotals Suffix Surround SwapXAndYAxis @@ -534,8 +533,8 @@ TransitionType Transparency TriState Type -UnnamedDatabaseRanges URL +UnnamedDatabaseRanges Url UseFilterCriteriaSource UseRegularExpressions @@ -547,12 +546,12 @@ Value VaryColorsByPoint VertJustify VertJustifyMethod -VerticalAlign -VerticalSplitMode -VerticalSplitPositionTwips VertOrient VertOrientPosition VertOrientRelation +VerticalAlign +VerticalSplitMode +VerticalSplitPositionTwips ViewBox Visible VisibleFlag commit 561b47421f1c223724003ff1f2e9908dcd942d84 Author: Eike Rathke <[email protected]> Date: Thu Apr 23 18:59:03 2015 +0200 add TotalsRow to properties index Change-Id: I1929e27d850144639db3826a0ec60a3085771296 diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index f1ef48b..d1f8ea0 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -525,6 +525,7 @@ TokenIndex TopBorder TopBorderDistance TopMargin +TotalsRow Transformation TransitionDirection TransitionFadeColor commit 58a1522798deb51d2dddd2a20788158e3867aa2d Author: Eike Rathke <[email protected]> Date: Thu Apr 23 18:10:19 2015 +0200 add css::sheet::DatabaseRange property TotalsRow Change-Id: Ica3b93ff25c936c0109ab3259c8a8015fcfb99eb diff --git a/offapi/com/sun/star/sheet/DatabaseRange.idl b/offapi/com/sun/star/sheet/DatabaseRange.idl index 77fc61f..585fcd3 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 b35c7ba..d937775 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 8951fe5..af24ed4 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; } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
