LCOV - code coverage report
Current view: top level - sc/source/filter/inc - xltracer.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 1 100.0 %
Date: 2015-06-13 12:38:46 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_SC_SOURCE_FILTER_INC_XLTRACER_HXX
      21             : #define INCLUDED_SC_SOURCE_FILTER_INC_XLTRACER_HXX
      22             : 
      23             : #include "global.hxx"
      24             : #include "xltools.hxx"
      25             : 
      26             : // As Trace features become implemented, we can safely delete the enum entry as
      27             : // we use the member mnID to keep track of the actual trace tag ID value.
      28             : enum XclTracerId
      29             : {
      30             :     eUnKnown  ,          /// unused but allows us to set the correct index
      31             :     eRowLimitExceeded ,
      32             :     eTabLimitExceeded ,
      33             :     ePassword ,
      34             :     ePrintRange ,
      35             :     eShortDate ,
      36             :     eBorderLineStyle ,
      37             :     eFillPattern ,
      38             :     eInvisibleGrid ,
      39             :     eFormattedNote ,
      40             :     eFormulaExtName ,
      41             :     eFormulaMissingArg ,
      42             :     ePivotDataSource ,
      43             :     ePivotChartExists ,
      44             :     eChartUnKnownType ,
      45             :     eChartTrendLines ,
      46             :     eChartErrorBars ,
      47             :     eChartOnlySheet ,
      48             :     eChartRange ,
      49             :     eChartDSName,
      50             :     eChartDataTable,
      51             :     eChartLegendPosition,
      52             :     eChartTextFormatting,
      53             :     eChartEmbeddedObj,
      54             :     eChartAxisAuto,
      55             :     eChartAxisManual,
      56             :     eChartInvalidXY,
      57             :     eUnsupportedObject ,
      58             :     eObjectNotPrintable ,
      59             :     eDVType,
      60             :     eTraceLength         /// this *should* always be the final entry
      61             : };
      62             : 
      63             : struct XclTracerDetails
      64             : {
      65             :     XclTracerId                 meProblemId;    /// Excel Import Trace index.
      66             :     sal_uInt32                  mnID;           /// actual ID Index trace tag Value
      67             :     const sal_Char*             mpContext;      /// Context for problem e.g. Limits
      68             :     const sal_Char*             mpDetail;       /// Context Detail e.g. SheetX
      69             :     const sal_Char*             mpProblem;      /// Description of problem
      70             : };
      71             : 
      72             : /** This class wraps an MSFilterTracer to create trace logs for import/export filters. */
      73             : class XclTracer
      74             : {
      75             : public:
      76             :     explicit                    XclTracer( const OUString& rDocUrl );
      77             :     virtual                     ~XclTracer();
      78             : 
      79             :     /** Returns true, if tracing is enabled. */
      80          23 :     inline bool                 IsEnabled() const { return mbEnabled; }
      81             : 
      82             :     /** Ensure that particular traces are logged once per document. */
      83             :     void                        ProcessTraceOnce(XclTracerId eProblem);
      84             : 
      85             :     void                        TraceInvalidAddress(const ScAddress& rPos, const ScAddress& rMaxPos);
      86             :     void                        TraceInvalidRow( sal_uInt32 nRow, sal_uInt32 nMaxrow );
      87             :     void                        TraceInvalidTab( SCTAB nTab, SCTAB nMaxTab);
      88             :     void                        TracePrintRange();
      89             :     void                        TraceDates(sal_uInt16 nNumFmt);
      90             :     void                        TraceBorderLineStyle(bool bBorderLineStyle);
      91             :     void                        TraceFillPattern(bool bFillPattern);
      92             :     void                        TraceFormulaMissingArg();
      93             :     void                        TracePivotDataSource(bool bExternal);
      94             :     void                        TracePivotChartExists();
      95             :     void                        TraceChartUnKnownType();
      96             :     void                        TraceChartOnlySheet();
      97             :     void                        TraceChartDataTable();
      98             :     void                        TraceChartLegendPosition();
      99             :     void                        TraceUnsupportedObjects();
     100             :     void                        TraceObjectNotPrintable();
     101             :     void                        TraceDVType(bool bType);
     102             : 
     103             : private:
     104             :     bool                        mbEnabled;
     105             :     typedef ::std::vector< bool >     BoolVec;
     106             :     /** array of flags corresponding to each entry in the XclTracerDetails table. */
     107             :     BoolVec                     maFirstTimes;
     108             : };
     109             : 
     110             : #endif
     111             : 
     112             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11