Version 7.5.1.1, tag libreoffice-7.5.1.1
[LibreOffice.git] / sc / source / filter / inc / xltracer.hxx
blobeef1901398f341cef58933afd4b69ef6a3dcb12c
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 #pragma once
22 #include <address.hxx>
23 #include <vector>
25 // As Trace features become implemented, we can safely delete the enum entry as
26 // we use the member mnID to keep track of the actual trace tag ID value.
27 enum XclTracerId
29 eUnKnown , /// unused but allows us to set the correct index
30 eRowLimitExceeded ,
31 eTabLimitExceeded ,
32 ePrintRange ,
33 eShortDate ,
34 eBorderLineStyle ,
35 eFillPattern ,
36 eFormulaMissingArg ,
37 ePivotDataSource ,
38 ePivotChartExists ,
39 eChartUnKnownType ,
40 eChartOnlySheet ,
41 eChartDataTable,
42 eChartLegendPosition,
43 eUnsupportedObject ,
44 eObjectNotPrintable ,
45 eDVType,
46 eTraceLength /// this *should* always be the final entry
49 /** This class wraps an MSFilterTracer to create trace logs for import/export filters. */
50 class XclTracer final
52 public:
53 explicit XclTracer( std::u16string_view rDocUrl );
54 ~XclTracer();
56 /** Returns true, if tracing is enabled. */
57 bool IsEnabled() const { return mbEnabled; }
59 /** Ensure that particular traces are logged once per document. */
60 void ProcessTraceOnce(XclTracerId eProblem);
62 void TraceInvalidAddress(const ScAddress& rPos, const ScAddress& rMaxPos);
63 void TraceInvalidRow( sal_uInt32 nRow, sal_uInt32 nMaxrow );
64 void TraceInvalidTab( SCTAB nTab, SCTAB nMaxTab);
65 void TracePrintRange();
66 void TraceDates(sal_uInt16 nNumFmt);
67 void TraceBorderLineStyle(bool bBorderLineStyle);
68 void TraceFillPattern(bool bFillPattern);
69 void TraceFormulaMissingArg();
70 void TracePivotDataSource(bool bExternal);
71 void TracePivotChartExists();
72 void TraceChartUnKnownType();
73 void TraceChartOnlySheet();
74 void TraceChartDataTable();
75 void TraceChartLegendPosition();
76 void TraceUnsupportedObjects();
77 void TraceObjectNotPrintable();
78 void TraceDVType(bool bType);
80 private:
81 bool mbEnabled;
82 /** array of flags corresponding to each entry in the XclTracerDetails table. */
83 std::vector<bool> maFirstTimes;
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */