[Libreoffice-commits] core.git: Branch 'feature/calc-group-interpreter' - 5 commits - sc/inc sc/qa sc/source

Kohei Yoshida kohei.yoshida at gmail.com
Fri Jun 28 16:49:34 PDT 2013


 sc/inc/calcmacros.hxx            |   24 ++++++++
 sc/inc/column.hxx                |    4 +
 sc/inc/document.hxx              |    5 +
 sc/inc/dpcache.hxx               |    2 
 sc/inc/dpfilteredcache.hxx       |    2 
 sc/inc/dpitemdata.hxx            |    2 
 sc/inc/dpmacros.hxx              |   23 --------
 sc/inc/dpnumgroupinfo.hxx        |    2 
 sc/inc/dpobject.hxx              |    2 
 sc/inc/dptabdat.hxx              |    2 
 sc/inc/dptabres.hxx              |    2 
 sc/inc/mtvelements.hxx           |    3 -
 sc/inc/pivot.hxx                 |    2 
 sc/inc/scmatrix.hxx              |    3 +
 sc/inc/table.hxx                 |    5 +
 sc/qa/unit/ucalc.cxx             |   19 ++++++
 sc/source/core/data/column2.cxx  |   40 ++++++++++++++
 sc/source/core/data/documen9.cxx |    3 -
 sc/source/core/data/document.cxx |   11 +++
 sc/source/core/data/dptabsrc.cxx |    2 
 sc/source/core/data/table1.cxx   |   10 +++
 sc/source/core/tool/interpr1.cxx |   65 ----------------------
 sc/source/core/tool/scmatrix.cxx |  111 +++++++++++++++++++++++++++++++++++++++
 sc/source/ui/dbgui/fieldwnd.cxx  |    2 
 24 files changed, 245 insertions(+), 101 deletions(-)

New commits:
commit 8fa433e962b7e0779bd6f430b74be0d4d96d9c27
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Jun 28 19:37:50 2013 -0400

    Add tests for matrix's min and max values, and fix one bug.
    
    Apparently numeric_limits<type>::min() is not to be used for signed types.
    
    Change-Id: Ia9730328562905459eb1d3e5cfd1a023c644e219

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 9fc681e..d05b7eb 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -2498,6 +2498,25 @@ void Test::testMatrix()
     CPPUNIT_ASSERT_EQUAL(1.5, pMat->GetDouble(0, 1));
     CPPUNIT_ASSERT_EQUAL(1.5, pMat->GetDouble(1, 0));
     CPPUNIT_ASSERT_MESSAGE("PutEmpty() call failed.", pMat->IsEmpty(1, 1));
+
+    // Max and min values.
+    pMat = new ScMatrix(2, 2, 0.0);
+    pMat->PutDouble(-10, 0, 0);
+    pMat->PutDouble(-12, 0, 1);
+    pMat->PutDouble(-8, 1, 0);
+    pMat->PutDouble(-25, 1, 1);
+    CPPUNIT_ASSERT_EQUAL(-25.0, pMat->GetMinValue(false));
+    CPPUNIT_ASSERT_EQUAL(-8.0, pMat->GetMaxValue(false));
+    pMat->PutString("Test", 0, 0);
+    CPPUNIT_ASSERT_EQUAL(0.0, pMat->GetMaxValue(true)); // text as zero.
+    CPPUNIT_ASSERT_EQUAL(-8.0, pMat->GetMaxValue(false)); // ignore text.
+    pMat->PutBoolean(true, 0, 0);
+    CPPUNIT_ASSERT_EQUAL(1.0, pMat->GetMaxValue(false));
+    pMat = new ScMatrix(2, 2, 10.0);
+    pMat->PutBoolean(false, 0, 0);
+    pMat->PutDouble(12.5, 1, 1);
+    CPPUNIT_ASSERT_EQUAL(0.0, pMat->GetMinValue(false));
+    CPPUNIT_ASSERT_EQUAL(12.5, pMat->GetMaxValue(false));
 }
 
 void Test::testEnterMixedMatrix()
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index bf3ea63..b0bef2e 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -940,7 +940,7 @@ public:
 
 struct MaxOp
 {
-    static double init() { return std::numeric_limits<double>::min(); }
+    static double init() { return -std::numeric_limits<double>::max(); }
     static double compare(double left, double right)
     {
         return std::max(left, right);
commit c6725f9a65d020294de22dd3de475ccf157e9e77
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Jun 28 17:54:34 2013 -0400

    Better to calculate max and min value of matrix *in* the matrix itself.
    
    Change-Id: I410b345ac32550a188aa356e133ef8e0e9b13d9f

diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index 66b271b..d6ac279 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -349,6 +349,9 @@ public:
     IterateResult Product(bool bTextAsZero) const;
     size_t Count(bool bCountStrings) const;
 
+    double GetMaxValue( bool bTextAsZero ) const;
+    double GetMinValue( bool bTextAsZero ) const;
+
     // All other matrix functions  MatMult, MInv, ...  are in ScInterpreter
     // to be numerically safe.
 
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index ce0ce41..44a32c2 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -3728,39 +3728,7 @@ void ScInterpreter::ScMin( bool bTextAsZero )
             {
                 ScMatrixRef pMat = GetMatrix();
                 if (pMat)
-                {
-                    SCSIZE nC, nR;
-                    nFuncFmtType = NUMBERFORMAT_NUMBER;
-                    pMat->GetDimensions(nC, nR);
-                    if (pMat->IsNumeric())
-                    {
-                        for (SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++)
-                            for (SCSIZE nMatRow = 0; nMatRow < nR; nMatRow++)
-                            {
-                                nVal = pMat->GetDouble(nMatCol,nMatRow);
-                                if (nMin > nVal) nMin = nVal;
-                            }
-                    }
-                    else
-                    {
-                        for (SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++)
-                        {
-                            for (SCSIZE nMatRow = 0; nMatRow < nR; nMatRow++)
-                            {
-                                if (!pMat->IsString(nMatCol,nMatRow))
-                                {
-                                    nVal = pMat->GetDouble(nMatCol,nMatRow);
-                                    if (nMin > nVal) nMin = nVal;
-                                }
-                                else if ( bTextAsZero )
-                                {
-                                    if ( nMin > 0.0 )
-                                        nMin = 0.0;
-                                }
-                            }
-                         }
-                    }
-                }
+                    nMin = pMat->GetMinValue(bTextAsZero);
             }
             break;
             case svString :
@@ -3854,36 +3822,7 @@ void ScInterpreter::ScMax( bool bTextAsZero )
                 if (pMat)
                 {
                     nFuncFmtType = NUMBERFORMAT_NUMBER;
-                    SCSIZE nC, nR;
-                    pMat->GetDimensions(nC, nR);
-                    if (pMat->IsNumeric())
-                    {
-                        for (SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++)
-                            for (SCSIZE nMatRow = 0; nMatRow < nR; nMatRow++)
-                            {
-                                nVal = pMat->GetDouble(nMatCol,nMatRow);
-                                if (nMax < nVal) nMax = nVal;
-                            }
-                    }
-                    else
-                    {
-                        for (SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++)
-                        {
-                            for (SCSIZE nMatRow = 0; nMatRow < nR; nMatRow++)
-                            {
-                                if (!pMat->IsString(nMatCol,nMatRow))
-                                {
-                                    nVal = pMat->GetDouble(nMatCol,nMatRow);
-                                    if (nMax < nVal) nMax = nVal;
-                                }
-                                else if ( bTextAsZero )
-                                {
-                                    if ( nMax < 0.0 )
-                                        nMax = 0.0;
-                                }
-                            }
-                        }
-                    }
+                    nMax = pMat->GetMaxValue(bTextAsZero);
                 }
             }
             break;
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 26fe7d3..bf3ea63 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -223,6 +223,9 @@ public:
     ScMatrix::IterateResult Product(bool bTextAsZero) const;
     size_t Count(bool bCountStrings) const;
 
+    double GetMaxValue( bool bTextAsZero ) const;
+    double GetMinValue( bool bTextAsZero ) const;
+
 #if DEBUG_MATRIX
     void Dump() const;
 #endif
@@ -935,6 +938,90 @@ public:
     }
 };
 
+struct MaxOp
+{
+    static double init() { return std::numeric_limits<double>::min(); }
+    static double compare(double left, double right)
+    {
+        return std::max(left, right);
+    }
+
+    static double boolValue(
+        mdds::mtv::boolean_element_block::const_iterator it,
+        mdds::mtv::boolean_element_block::const_iterator itEnd)
+    {
+        // If the array has at least one true value, the maximum value is 1.
+        it = std::find(it, itEnd, true);
+        return it == itEnd ? 0.0 : 1.0;
+    }
+};
+
+struct MinOp
+{
+    static double init() { return std::numeric_limits<double>::max(); }
+    static double compare(double left, double right)
+    {
+        return std::min(left, right);
+    }
+
+    static double boolValue(
+        mdds::mtv::boolean_element_block::const_iterator it,
+        mdds::mtv::boolean_element_block::const_iterator itEnd)
+    {
+        // If the array has at least one false value, the minimum value is 0.
+        it = std::find(it, itEnd, false);
+        return it == itEnd ? 1.0 : 0.0;
+    }
+};
+
+template<typename _Op>
+class CalcMaxMinValue : std::unary_function<MatrixImplType::element_block_type, void>
+{
+    double mfVal;
+    bool mbTextAsZero;
+public:
+    CalcMaxMinValue( bool bTextAsZero ) :
+        mfVal(_Op::init()),
+        mbTextAsZero(bTextAsZero) {}
+
+    double getValue() const { return mfVal; }
+
+    void operator() (const MatrixImplType::element_block_node_type& node)
+    {
+        using namespace mdds::mtv;
+
+        switch (node.type)
+        {
+            case mdds::mtm::element_numeric:
+            {
+                numeric_element_block::const_iterator it = numeric_element_block::begin(*node.data);
+                numeric_element_block::const_iterator itEnd = numeric_element_block::end(*node.data);
+                for (; it != itEnd; ++it)
+                    mfVal = _Op::compare(mfVal, *it);
+            }
+            break;
+            case mdds::mtm::element_boolean:
+            {
+                boolean_element_block::const_iterator it = boolean_element_block::begin(*node.data);
+                boolean_element_block::const_iterator itEnd = boolean_element_block::end(*node.data);
+                double fVal = _Op::boolValue(it, itEnd);
+                mfVal = _Op::compare(mfVal, fVal);
+            }
+            break;
+            case mdds::mtm::element_string:
+            case mdds::mtm::element_empty:
+            {
+                // empty elements are treated as empty strings.
+                if (mbTextAsZero)
+                    mfVal = _Op::compare(mfVal, 0.0);
+            }
+            break;
+            default:
+                ;
+        }
+    }
+};
+
 }
 
 ScMatrix::IterateResult ScMatrixImpl::Sum(bool bTextAsZero) const
@@ -966,6 +1053,20 @@ size_t ScMatrixImpl::Count(bool bCountStrings) const
     return aFunc.getCount();
 }
 
+double ScMatrixImpl::GetMaxValue( bool bTextAsZero ) const
+{
+    CalcMaxMinValue<MaxOp> aFunc(bTextAsZero);
+    maMat.walk(aFunc);
+    return aFunc.getValue();
+}
+
+double ScMatrixImpl::GetMinValue( bool bTextAsZero ) const
+{
+    CalcMaxMinValue<MinOp> aFunc(bTextAsZero);
+    maMat.walk(aFunc);
+    return aFunc.getValue();
+}
+
 #if DEBUG_MATRIX
 void ScMatrixImpl::Dump() const
 {
@@ -1308,6 +1409,16 @@ size_t ScMatrix::Count(bool bCountStrings) const
     return pImpl->Count(bCountStrings);
 }
 
+double ScMatrix::GetMaxValue( bool bTextAsZero ) const
+{
+    return pImpl->GetMaxValue(bTextAsZero);
+}
+
+double ScMatrix::GetMinValue( bool bTextAsZero ) const
+{
+    return pImpl->GetMinValue(bTextAsZero);
+}
+
 #if DEBUG_MATRIX
 void ScMatrix::Dump() const
 {
commit 73b2e440f13c28b7a475f35b07c3ce34081f705b
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Jun 28 16:38:19 2013 -0400

    This is not needed.
    
    Change-Id: I382b9d485b7bb58656561c4790580c9bc6339889

diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index db733f7..2bd4744 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -698,9 +698,6 @@ void ScDocument::ApplyAsianEditSettings( ScEditEngineDefaulter& rEngine )
 
 void ScDocument::RebuildFormulaGroups()
 {
-    if (!ScInterpreter::GetGlobalConfig().mbOpenCLEnabled)
-        return;
-
     SCTAB nTab;
     for (nTab=0; nTab < static_cast<SCTAB>(maTabs.size()); nTab++)
         if (maTabs[nTab])
commit 3a1cc5b357813995bfc7ec630a9a2f58e0499c07
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Jun 28 15:49:43 2013 -0400

    Add a convenient way to dump formula group states for a single column.
    
    Useful when debugging.
    
    Change-Id: I4e408ad9a3dc2046557d152fcd067c1b0c5645c0

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 13a0651..e1c37ca 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -518,6 +518,10 @@ public:
 
     void FormulaCellsUndecided( SCROW nRow1, SCROW nRow2 );
 
+#if DEBUG_COLUMN_STORAGE
+    void DumpFormulaGroups() const;
+#endif
+
 private:
 
     sc::CellStoreType::iterator GetPositionToInsert( SCROW nRow );
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 3d12935..f51f058 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -36,6 +36,7 @@
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include "typedstrdata.hxx"
 #include "compressedarray.hxx"
+#include "calcmacros.hxx"
 #include <tools/fract.hxx>
 #include <tools/gen.hxx>
 
@@ -1990,6 +1991,10 @@ public:
      */
     bool HasBroadcaster( SCTAB nTab, SCCOL nCol ) const;
 
+#if DEBUG_COLUMN_STORAGE
+    void DumpFormulaGroups( SCTAB nTab, SCCOL nCol ) const;
+#endif
+
 private: // CLOOK-Impl-methods
 
     /**
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 41dd35e..b3a5dbc 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -32,6 +32,7 @@
 #include "types.hxx"
 #include "cellvalue.hxx"
 #include "formula/types.hxx"
+#include "calcmacros.hxx"
 
 #include <set>
 #include <map>
@@ -851,6 +852,10 @@ public:
 
     void SetFormulaResults( SCCOL nCol, SCROW nRow, const double* pResults, size_t nLen );
 
+#if DEBUG_COLUMN_STORAGE
+    void DumpFormulaGroups( SCCOL nCol ) const;
+#endif
+
     /** Replace behaves differently to the Search; adjust the rCol and rRow accordingly.
 
         'Replace' replaces at the 'current' position, but in order to achieve
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 55fb97a..d4e9eab 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1547,6 +1547,46 @@ void ScColumn::FormulaCellsUndecided( SCROW /*nRow1*/, SCROW /*nRow2*/ )
 {
 }
 
+#if DEBUG_COLUMN_STORAGE
+
+namespace {
+
+struct FormulaGroupDumper : std::unary_function<sc::CellStoreType::value_type, void>
+{
+    void operator() (const sc::CellStoreType::value_type& rNode) const
+    {
+        if (rNode.type != sc::element_type_formula)
+            return;
+
+        sc::formula_block::const_iterator it = sc::formula_block::begin(*rNode.data);
+        sc::formula_block::const_iterator itEnd = sc::formula_block::end(*rNode.data);
+
+        for (; it != itEnd; ++it)
+        {
+            const ScFormulaCell& rCell = **it;
+            if (!rCell.IsShared())
+                continue;
+
+            if (rCell.GetSharedTopRow() != rCell.aPos.Row())
+                continue;
+
+            SCROW nLen = rCell.GetSharedLength();
+            cout << "  * group: start=" << rCell.aPos.Row() << ", length=" << nLen << endl;
+            std::advance(it, nLen-1);
+        }
+    }
+};
+
+}
+
+void ScColumn::DumpFormulaGroups() const
+{
+    cout << "-- formua groups" << endl;
+    std::for_each(maCells.begin(), maCells.end(), FormulaGroupDumper());
+    cout << "--" << endl;
+}
+#endif
+
 void ScColumn::CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol) const
 {
     rDestCol.maCellTextAttrs.set_empty(nRow1, nRow2); // Empty the destination range first.
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 9e0c4af..7b062b4 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2262,6 +2262,17 @@ bool ScDocument::HasBroadcaster( SCTAB nTab, SCCOL nCol ) const
     return pTab->HasBroadcaster(nCol);
 }
 
+#if DEBUG_COLUMN_STORAGE
+void ScDocument::DumpFormulaGroups( SCTAB nTab, SCCOL nCol ) const
+{
+    const ScTable* pTab = FetchTable(nTab);
+    if (!pTab)
+        return;
+
+    pTab->DumpFormulaGroups(nCol);
+}
+#endif
+
 bool ScDocument::TableExists( SCTAB nTab ) const
 {
     return ValidTab(nTab) && static_cast<size_t>(nTab) < maTabs.size() && maTabs[nTab];
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index dcd0344..02c8952 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -2221,6 +2221,16 @@ void ScTable::SetFormulaResults( SCCOL nCol, SCROW nRow, const double* pResults,
     aCol[nCol].SetFormulaResults(nRow, pResults, nLen);
 }
 
+#if DEBUG_COLUMN_STORAGE
+void ScTable::DumpFormulaGroups( SCCOL nCol ) const
+{
+    if (!ValidCol(nCol))
+        return;
+
+    aCol[nCol].DumpFormulaGroups();
+}
+#endif
+
 const SvtBroadcaster* ScTable::GetBroadcaster( SCCOL nCol, SCROW nRow ) const
 {
     if (!ValidColRow(nCol, nRow))
commit 46ad889488f711621fa4991b9d829edb1dcccc29
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Jun 28 15:22:05 2013 -0400

    Start moving all these DEBUG_FOO into calcmacros.hxx.
    
    This header was formerly dpmacros.hxx, now renamed to calcmacros.hxx.
    
    Change-Id: I2ed768b7c5678f5216b1e93df2c0cede0c548be4

diff --git a/sc/inc/dpmacros.hxx b/sc/inc/calcmacros.hxx
similarity index 86%
rename from sc/inc/dpmacros.hxx
rename to sc/inc/calcmacros.hxx
index 72659cc..03ca590 100644
--- a/sc/inc/dpmacros.hxx
+++ b/sc/inc/calcmacros.hxx
@@ -7,9 +7,10 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef __SC_DPMACROS_HXX__
-#define __SC_DPMACROS_HXX__
+#ifndef SC_CALCMACROS_HXX
+#define SC_CALCMACROS_HXX
 
+#define DEBUG_COLUMN_STORAGE 0
 #define DEBUG_PIVOT_TABLE 0
 
 #if DEBUG_PIVOT_TABLE
diff --git a/sc/inc/dpcache.hxx b/sc/inc/dpcache.hxx
index 5a75463..707749c 100644
--- a/sc/inc/dpcache.hxx
+++ b/sc/inc/dpcache.hxx
@@ -21,7 +21,7 @@
 
 #include "global.hxx"
 #include "dpnumgroupinfo.hxx"
-#include "dpmacros.hxx"
+#include "calcmacros.hxx"
 #include "tools/date.hxx"
 
 #include <boost/noncopyable.hpp>
diff --git a/sc/inc/dpfilteredcache.hxx b/sc/inc/dpfilteredcache.hxx
index c65b95c..bff1e18 100644
--- a/sc/inc/dpfilteredcache.hxx
+++ b/sc/inc/dpfilteredcache.hxx
@@ -24,7 +24,7 @@
 #include "osl/mutex.hxx"
 #include "global.hxx"
 #include "dpitemdata.hxx"
-#include "dpmacros.hxx"
+#include "calcmacros.hxx"
 
 #include <vector>
 #include <boost/unordered_set.hpp>
diff --git a/sc/inc/dpitemdata.hxx b/sc/inc/dpitemdata.hxx
index 9137e2a..823a6c1 100644
--- a/sc/inc/dpitemdata.hxx
+++ b/sc/inc/dpitemdata.hxx
@@ -16,7 +16,7 @@
 #include "sal/types.h"
 #include "tools/solar.h"
 #include "rtl/ustring.hxx"
-#include "dpmacros.hxx"
+#include "calcmacros.hxx"
 #include "dpglobal.hxx"
 
 /**
diff --git a/sc/inc/dpnumgroupinfo.hxx b/sc/inc/dpnumgroupinfo.hxx
index 523b792..6989fff 100644
--- a/sc/inc/dpnumgroupinfo.hxx
+++ b/sc/inc/dpnumgroupinfo.hxx
@@ -11,7 +11,7 @@
 #define __SC_DPNUMGROUPINFO_HXX__
 
 #include "scdllapi.h"
-#include "dpmacros.hxx"
+#include "calcmacros.hxx"
 
 struct ScDPNumGroupInfo
 {
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 735b033..bbd3ba8 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -26,7 +26,7 @@
 #include "dpoutput.hxx"
 #include "dptypes.hxx"
 #include "pivot.hxx"
-#include "dpmacros.hxx"
+#include "calcmacros.hxx"
 
 #include <com/sun/star/sheet/XDimensionsSupplier.hpp>
 
diff --git a/sc/inc/dptabdat.hxx b/sc/inc/dptabdat.hxx
index 22a8ffb..3239a80 100644
--- a/sc/inc/dptabdat.hxx
+++ b/sc/inc/dptabdat.hxx
@@ -24,7 +24,7 @@
 #include "dpoutput.hxx"
 #include "dpfilteredcache.hxx"
 #include "dpcache.hxx"
-#include "dpmacros.hxx"
+#include "calcmacros.hxx"
 
 #include "svl/zforlist.hxx"
 
diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx
index e6289be..cab2da8 100644
--- a/sc/inc/dptabres.hxx
+++ b/sc/inc/dptabres.hxx
@@ -22,7 +22,7 @@
 
 #include "global.hxx"
 #include "dpfilteredcache.hxx"
-#include "dpmacros.hxx"
+#include "calcmacros.hxx"
 
 #include <tools/string.hxx>
 #include <com/sun/star/sheet/MemberResult.hpp>
diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
index 0ebf8be..ad65418 100644
--- a/sc/inc/mtvelements.hxx
+++ b/sc/inc/mtvelements.hxx
@@ -14,8 +14,7 @@
 #include "formulacell.hxx"
 #include "svl/broadcast.hxx"
 #include "editeng/editobj.hxx"
-
-#define DEBUG_COLUMN_STORAGE 0
+#include "calcmacros.hxx"
 
 #if DEBUG_COLUMN_STORAGE
 #ifdef NDEBUG
diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx
index 85e19e0..12ed637 100644
--- a/sc/inc/pivot.hxx
+++ b/sc/inc/pivot.hxx
@@ -40,7 +40,7 @@
 #include "global.hxx"
 #include "address.hxx"
 #include "dpglobal.hxx"
-#include "dpmacros.hxx"
+#include "calcmacros.hxx"
 
 #include <vector>
 #include <boost/ptr_container/ptr_vector.hpp>
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index c38ee38..76ec9f5 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -45,7 +45,7 @@
 #include "dpitemdata.hxx"
 #include "dputil.hxx"
 #include "dpresfilter.hxx"
-#include "dpmacros.hxx"
+#include "calcmacros.hxx"
 
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/sheet/DataPilotFieldFilter.hpp>
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 2abc85c..8ee257a 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -46,7 +46,7 @@
 
 #include "pvlaydlg.hxx"
 #include "dpuiglobal.hxx"
-#include "dpmacros.hxx"
+#include "calcmacros.hxx"
 #include "AccessibleDataPilotControl.hxx"
 #include "scresid.hxx"
 #include "pivot.hrc"


More information about the Libreoffice-commits mailing list