diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-18 22:56:17 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-19 00:30:12 -0400 |
commit | 2bc52ff76deccee1cab1808108b5e4b25c1cc644 (patch) | |
tree | 455eab2d57215d325e362236933d1ec4ab512231 | |
parent | a012bc60f2b3933d9148c2dd595df691a7834ad4 (diff) |
Remove debug statements..
Change-Id: I10e0ef90ea7bfd92b46a54dc3d3feff90e50f724
-rw-r--r-- | sc/inc/dpmacros.hxx | 2 | ||||
-rw-r--r-- | sc/inc/dpresfilter.hxx | 12 | ||||
-rw-r--r-- | sc/source/core/data/dpresfilter.cxx | 10 | ||||
-rw-r--r-- | sc/source/core/data/dptabres.cxx | 42 | ||||
-rw-r--r-- | sc/source/core/data/dptabsrc.cxx | 44 |
5 files changed, 3 insertions, 107 deletions
diff --git a/sc/inc/dpmacros.hxx b/sc/inc/dpmacros.hxx index ce91b06b63b0..79aafafe0f6d 100644 --- a/sc/inc/dpmacros.hxx +++ b/sc/inc/dpmacros.hxx @@ -29,7 +29,7 @@ #ifndef __SC_DPMACROS_HXX__ #define __SC_DPMACROS_HXX__ -#define DEBUG_PIVOT_TABLE 1 +#define DEBUG_PIVOT_TABLE 0 #if DEBUG_PIVOT_TABLE #include <iostream> diff --git a/sc/inc/dpresfilter.hxx b/sc/inc/dpresfilter.hxx index 9d4617d08a7a..a151bd3da4bd 100644 --- a/sc/inc/dpresfilter.hxx +++ b/sc/inc/dpresfilter.hxx @@ -12,14 +12,10 @@ #include "dpitemdata.hxx" +#include <map> #include <vector> #include <boost/noncopyable.hpp> -#if DEBUG_PIVOT_TABLE -#include <map> -#endif - -#include <boost/unordered_map.hpp> namespace com { namespace sun { namespace star { namespace sheet { struct DataPilotFieldFilter; @@ -59,14 +55,8 @@ private: struct MemberNode; struct DimensionNode; -#if DEBUG_PIVOT_TABLE - // To keep the entries sorted in the tree dump. typedef std::map<ScDPItemData, MemberNode*> MembersType; typedef std::map<OUString, DimensionNode*> DimensionsType; -#else - typedef boost::unordered_map<ScDPItemData, MemberNode*, ScDPItemData::Hash> MembersType; - typedef boost::unordered_map<OUString, DimensionNode*, OUStringHash> DimensionsType; -#endif struct DimensionNode : boost::noncopyable { diff --git a/sc/source/core/data/dpresfilter.cxx b/sc/source/core/data/dpresfilter.cxx index fbb74c1d6417..9a23233948f5 100644 --- a/sc/source/core/data/dpresfilter.cxx +++ b/sc/source/core/data/dpresfilter.cxx @@ -85,13 +85,12 @@ ScDPResultFilterSet::~ScDPResultFilterSet() } void ScDPResultFilterSet::add( - const std::vector<ScDPResultFilter>& rFilters, long nCol, long nRow, double fVal) + const std::vector<ScDPResultFilter>& rFilters, long /*nCol*/, long /*nRow*/, double fVal) { // TODO: I'll work on the col / row to value node mapping later. MemberNode* pMemNode = mpRoot; - fprintf(stdout, "(row=%ld; col=%ld; value=%g) : ", nRow, nCol, fVal); std::vector<ScDPResultFilter>::const_iterator itFilter = rFilters.begin(), itFilterEnd = rFilters.end(); for (; itFilter != itFilterEnd; ++itFilter) { @@ -102,12 +101,6 @@ void ScDPResultFilterSet::add( if (maPrimaryDimName.isEmpty()) maPrimaryDimName = filter.maDimName; - printf("%s: ", rtl::OUStringToOString(filter.maDimName, RTL_TEXTENCODING_UTF8).getStr()); - if (filter.maValue.IsValue()) - printf("%g ", filter.maValue.GetValue()); - else - printf("'%s' ", rtl::OUStringToOString(filter.maValue.GetString(), RTL_TEXTENCODING_UTF8).getStr()); - // See if this dimension exists. DimensionsType& rDims = pMemNode->maChildDimensions; DimensionsType::iterator itDim = rDims.find(filter.maDimName); @@ -146,7 +139,6 @@ void ScDPResultFilterSet::add( } pMemNode->maValues.push_back(fVal); - printf("\n"); } void ScDPResultFilterSet::swap(ScDPResultFilterSet& rOther) diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index 379f5c1a7d4c..7cc25bc3073b 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -55,48 +55,6 @@ using ::std::vector; using ::std::pair; using ::com::sun::star::uno::Sequence; -#include <stdio.h> -#include <string> -#include <sys/time.h> - -namespace { - -class stack_printer -{ -public: - explicit stack_printer(const char* msg) : - msMsg(msg) - { - fprintf(stdout, "%s: --begin\n", msMsg.c_str()); - mfStartTime = getTime(); - } - - ~stack_printer() - { - double fEndTime = getTime(); - fprintf(stdout, "%s: --end (duration: %g sec)\n", msMsg.c_str(), (fEndTime - mfStartTime)); - } - - void printTime(int line) const - { - double fEndTime = getTime(); - fprintf(stdout, "%s: --(%d) (duration: %g sec)\n", msMsg.c_str(), line, (fEndTime - mfStartTime)); - } - -private: - double getTime() const - { - timeval tv; - gettimeofday(&tv, NULL); - return tv.tv_sec + tv.tv_usec / 1000000.0; - } - - ::std::string msMsg; - double mfStartTime; -}; - -} - namespace { sal_uInt16 nFuncStrIds[12] = // passend zum enum ScSubTotalFunc diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index 5c0d519cce44..8efadd5544ea 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -69,48 +69,6 @@ using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Any; using ::com::sun::star::sheet::DataPilotFieldAutoShowInfo; -#include <stdio.h> -#include <string> -#include <sys/time.h> - -namespace { - -class stack_printer -{ -public: - explicit stack_printer(const char* msg) : - msMsg(msg) - { - fprintf(stdout, "%s: --begin\n", msMsg.c_str()); - mfStartTime = getTime(); - } - - ~stack_printer() - { - double fEndTime = getTime(); - fprintf(stdout, "%s: --end (duration: %g sec)\n", msMsg.c_str(), (fEndTime - mfStartTime)); - } - - void printTime(int line) const - { - double fEndTime = getTime(); - fprintf(stdout, "%s: --(%d) (duration: %g sec)\n", msMsg.c_str(), line, (fEndTime - mfStartTime)); - } - -private: - double getTime() const - { - timeval tv; - gettimeofday(&tv, NULL); - return tv.tv_sec + tv.tv_usec / 1000000.0; - } - - ::std::string msMsg; - double mfStartTime; -}; - -} - // ----------------------------------------------------------------------- #define SC_MINCOUNT_LIMIT 1000000 @@ -424,7 +382,6 @@ long ScDPSource::GetSourceDim(long nDim) uno::Sequence< uno::Sequence<sheet::DataResult> > SAL_CALL ScDPSource::getResults() throw(uno::RuntimeException) { - stack_printer __stack_printer__("ScDPSource::getResults"); CreateRes_Impl(); // create pColResRoot and pRowResRoot if ( bResultOverflow ) // set in CreateRes_Impl @@ -453,7 +410,6 @@ uno::Sequence< uno::Sequence<sheet::DataResult> > SAL_CALL ScDPSource::getResult pColResRoot, aFilterCxt, aSeq, pResData->GetRowStartMeasure()); maResFilterSet.swap(aFilterCxt.maFilterSet); // Keep this data for GETPIVOTDATA. - maResFilterSet.dump(); return aSeq; } |