Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / source / filter / inc / xltracer.hxx
blob94446fb2744ba284d67e05f2a3a4662ec9a9d450
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 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_XLTRACER_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_XLTRACER_HXX
23 #include <address.hxx>
24 #include <vector>
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
30 eUnKnown , /// unused but allows us to set the correct index
31 eRowLimitExceeded ,
32 eTabLimitExceeded ,
33 ePrintRange ,
34 eShortDate ,
35 eBorderLineStyle ,
36 eFillPattern ,
37 eFormulaMissingArg ,
38 ePivotDataSource ,
39 ePivotChartExists ,
40 eChartUnKnownType ,
41 eChartOnlySheet ,
42 eChartDataTable,
43 eChartLegendPosition,
44 eUnsupportedObject ,
45 eObjectNotPrintable ,
46 eDVType,
47 eTraceLength /// this *should* always be the final entry
50 /** This class wraps an MSFilterTracer to create trace logs for import/export filters. */
51 class XclTracer final
53 public:
54 explicit XclTracer( const OUString& rDocUrl );
55 ~XclTracer();
57 /** Returns true, if tracing is enabled. */
58 bool IsEnabled() const { return mbEnabled; }
60 /** Ensure that particular traces are logged once per document. */
61 void ProcessTraceOnce(XclTracerId eProblem);
63 void TraceInvalidAddress(const ScAddress& rPos, const ScAddress& rMaxPos);
64 void TraceInvalidRow( sal_uInt32 nRow, sal_uInt32 nMaxrow );
65 void TraceInvalidTab( SCTAB nTab, SCTAB nMaxTab);
66 void TracePrintRange();
67 void TraceDates(sal_uInt16 nNumFmt);
68 void TraceBorderLineStyle(bool bBorderLineStyle);
69 void TraceFillPattern(bool bFillPattern);
70 void TraceFormulaMissingArg();
71 void TracePivotDataSource(bool bExternal);
72 void TracePivotChartExists();
73 void TraceChartUnKnownType();
74 void TraceChartOnlySheet();
75 void TraceChartDataTable();
76 void TraceChartLegendPosition();
77 void TraceUnsupportedObjects();
78 void TraceObjectNotPrintable();
79 void TraceDVType(bool bType);
81 private:
82 bool mbEnabled;
83 /** array of flags corresponding to each entry in the XclTracerDetails table. */
84 std::vector<bool> maFirstTimes;
87 #endif
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */