re-enabled user-defined numeric fields for dBase export
[LibreOffice.git] / sc / source / filter / inc / xltracer.hxx
blobc465c86ee1e9185a1a1e4a18c3febc20a63cfcec
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 // ============================================================================
22 #ifndef SC_XLTRACER_HXX
23 #define SC_XLTRACER_HXX
25 #include "global.hxx" // ScAddress
26 #include "xltools.hxx"
28 // As Trace features become implemented, we can safely delete the enum entry as
29 // we use the member mnID to keep track of the actual trace tag ID value.
30 enum XclTracerId
32 eUnKnown , /// unused but allows us to set the correct index
33 eRowLimitExceeded ,
34 eTabLimitExceeded ,
35 ePassword ,
36 ePrintRange ,
37 eShortDate ,
38 eBorderLineStyle ,
39 eFillPattern ,
40 eInvisibleGrid ,
41 eFormattedNote ,
42 eFormulaExtName ,
43 eFormulaMissingArg ,
44 ePivotDataSource ,
45 ePivotChartExists ,
46 eChartUnKnownType ,
47 eChartTrendLines ,
48 eChartErrorBars ,
49 eChartOnlySheet ,
50 eChartRange ,
51 eChartDSName,
52 eChartDataTable,
53 eChartLegendPosition,
54 eChartTextFormatting,
55 eChartEmbeddedObj,
56 eChartAxisAuto,
57 eChartAxisManual,
58 eChartInvalidXY,
59 eUnsupportedObject ,
60 eObjectNotPrintable ,
61 eDVType,
62 eTraceLength /// this *should* always be the final entry
65 struct XclTracerDetails
67 XclTracerId meProblemId; /// Excel Import Trace index.
68 sal_uInt32 mnID; /// actual ID Index trace tag Value
69 const sal_Char* mpContext; /// Context for problem e.g. Limits
70 const sal_Char* mpDetail; /// Context Detail e.g. SheetX
71 const sal_Char* mpProblem; /// Description of problem
75 // ============================================================================
77 /** This class wraps an MSFilterTracer to create trace logs for import/export filters. */
78 class XclTracer
80 public:
81 explicit XclTracer( const String& rDocUrl );
82 virtual ~XclTracer();
84 /** Returns true, if tracing is enabled. */
85 inline bool IsEnabled() const { return mbEnabled; }
87 /** Ensure that particular traces are logged once per document. */
88 void ProcessTraceOnce(XclTracerId eProblem);
90 void TraceInvalidAddress(const ScAddress& rPos, const ScAddress& rMaxPos);
91 void TraceInvalidRow( sal_uInt32 nRow, sal_uInt32 nMaxrow );
92 void TraceInvalidTab( SCTAB nTab, SCTAB nMaxTab);
93 void TracePrintRange();
94 void TraceDates(sal_uInt16 nNumFmt);
95 void TraceBorderLineStyle(bool bBorderLineStyle);
96 void TraceFillPattern(bool bFillPattern);
97 void TraceFormulaMissingArg();
98 void TracePivotDataSource(bool bExternal);
99 void TracePivotChartExists();
100 void TraceChartUnKnownType();
101 void TraceChartOnlySheet();
102 void TraceChartDataTable();
103 void TraceChartLegendPosition();
104 void TraceUnsupportedObjects();
105 void TraceObjectNotPrintable();
106 void TraceDVType(bool bType);
108 private:
109 bool mbEnabled;
110 typedef ::std::vector< bool > BoolVec;
111 /** array of flags corresponding to each entry in the XclTracerDetails table. */
112 BoolVec maFirstTimes;
116 // ============================================================================
118 #endif
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */