summaryrefslogtreecommitdiff
path: root/sc/inc/pivot.hxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-11-30 12:23:25 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-12-04 07:17:12 +0000
commit16155fdc39c004dc924a3b6919eb7c86da23c119 (patch)
tree830f6318bba8ffa50399b574b5a54810e5c69c03 /sc/inc/pivot.hxx
parent68dad00d0d548f94ae943fa585eb614cb6714d66 (diff)
re-base on ALv2 code. Includes:
Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
Diffstat (limited to 'sc/inc/pivot.hxx')
-rw-r--r--sc/inc/pivot.hxx136
1 files changed, 53 insertions, 83 deletions
diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx
index a4cee2cb8816..1c4350b364d4 100644
--- a/sc/inc/pivot.hxx
+++ b/sc/inc/pivot.hxx
@@ -1,30 +1,22 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
+/*
+ * This file is part of the LibreOffice project.
*
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
+ * This file incorporates work covered by the following license notice:
*
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
/*
IMPORTANT:
Strictly adhere to the following sequence when creating a pivot table:
@@ -59,54 +51,6 @@
#include <com/sun/star/sheet/DataPilotFieldLayoutInfo.hpp>
#include <com/sun/star/sheet/DataPilotFieldAutoShowInfo.hpp>
-struct ScDPLabelData;
-
-// -----------------------------------------------------------------------
-
-struct PivotField
-{
- SCCOL nCol; /// 0-based dimension index (not source column index)
- long mnOriginalDim; /// >= 0 for duplicated field.
- sal_uInt16 nFuncMask;
- sal_uInt8 mnDupCount;
- ::com::sun::star::sheet::DataPilotFieldReference maFieldRef;
-
- explicit PivotField( SCCOL nNewCol = 0, sal_uInt16 nNewFuncMask = PIVOT_FUNC_NONE );
- PivotField( const PivotField& r );
-
- long getOriginalDim() const;
- bool operator==( const PivotField& r ) const;
-};
-
-// -----------------------------------------------------------------------
-
-typedef boost::ptr_vector<ScDPLabelData> ScDPLabelDataVec;
-
-struct ScPivotParam
-{
- SCCOL nCol; // cursor position /
- SCROW nRow; // or start of destination area
- SCTAB nTab;
- ScDPLabelDataVec maLabelArray;
- ::std::vector<PivotField> maPageFields;
- ::std::vector<PivotField> maColFields;
- ::std::vector<PivotField> maRowFields;
- ::std::vector<PivotField> maDataFields;
- bool bIgnoreEmptyRows;
- bool bDetectCategories;
- bool bMakeTotalCol;
- bool bMakeTotalRow;
-
- ScPivotParam();
- ScPivotParam( const ScPivotParam& r );
- ~ScPivotParam();
-
- ScPivotParam& operator= ( const ScPivotParam& r );
- bool operator== ( const ScPivotParam& r ) const;
- void SetLabelData(const ScDPLabelDataVec& r);
-};
-
-//------------------------------------------------------------------------
struct ScDPName
{
@@ -163,23 +107,50 @@ struct ScDPLabelData
::rtl::OUString SC_DLLPUBLIC getDisplayName() const;
};
-// ============================================================================
+typedef boost::ptr_vector<ScDPLabelData> ScDPLabelDataVector;
struct ScPivotField
{
- SCCOL nCol;
+ SCCOL nCol; /// 0-based dimension index (not source column index)
+ long mnOriginalDim; /// >= 0 for duplicated field.
sal_uInt16 nFuncMask;
- sal_uInt16 nFuncCount;
+ sal_uInt8 mnDupCount;
::com::sun::star::sheet::DataPilotFieldReference maFieldRef;
- explicit ScPivotField( SCCOL nNewCol = 0, sal_uInt16 nNewFuncMask = PIVOT_FUNC_NONE );
+ explicit ScPivotField( SCCOL nNewCol = 0, sal_uInt16 nNewFuncMask = PIVOT_FUNC_NONE );
+ ScPivotField( const ScPivotField& r );
+ long getOriginalDim() const;
bool operator==( const ScPivotField& r ) const;
};
-// ============================================================================
+typedef ::std::vector< ScPivotField > ScPivotFieldVector;
+
+struct ScPivotParam
+{
+ SCCOL nCol; // Cursor Position /
+ SCROW nRow; // or start of destination area
+ SCTAB nTab;
+ ScDPLabelDataVector maLabelArray;
+ ScPivotFieldVector maPageFields;
+ ScPivotFieldVector maColFields;
+ ScPivotFieldVector maRowFields;
+ ScPivotFieldVector maDataFields;
+ bool bIgnoreEmptyRows;
+ bool bDetectCategories;
+ bool bMakeTotalCol;
+ bool bMakeTotalRow;
+
+ ScPivotParam();
+ ScPivotParam( const ScPivotParam& r );
+ ~ScPivotParam();
+
+ ScPivotParam& operator= ( const ScPivotParam& r );
+ bool operator== ( const ScPivotParam& r ) const;
+ void SetLabelData(const ScDPLabelDataVector& r);
+};
-struct ScDPFuncData
+struct ScPivotFuncData
{
SCCOL mnCol;
long mnOriginalDim;
@@ -187,16 +158,15 @@ struct ScDPFuncData
sal_uInt8 mnDupCount;
::com::sun::star::sheet::DataPilotFieldReference maFieldRef;
- explicit ScDPFuncData( SCCOL nNewCol, sal_uInt16 nNewFuncMask );
- explicit ScDPFuncData(
- SCCOL nNewCol, long nOriginalDim, sal_uInt16 nNewFuncMask, sal_uInt8 nDupCount,
+ explicit ScPivotFuncData( SCCOL nCol, sal_uInt16 nFuncMask );
+ explicit ScPivotFuncData(
+ SCCOL nCol, long nOriginalDim, sal_uInt16 nFuncMask, sal_uInt8 nDupCount,
const ::com::sun::star::sheet::DataPilotFieldReference& rFieldRef );
- bool operator== (const ScDPFuncData& r) const;
+ bool operator== (const ScPivotFuncData& r) const;
};
-// ============================================================================
-
+typedef ::std::vector< ScPivotFuncData > ScPivotFuncDataVector;
typedef std::vector<ScDPName> ScDPNameVec;
#endif