1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #include <xltracer.hxx>
21 #include <com/sun/star/beans/PropertyValue.hpp>
22 #include <com/sun/star/uno/Sequence.hxx>
23 #include <address.hxx>
25 XclTracer::XclTracer(std::u16string_view
/*rDocUrl*/)
27 , maFirstTimes(eTraceLength
, true)
31 XclTracer::~XclTracer() {}
33 void XclTracer::ProcessTraceOnce(XclTracerId eProblem
)
35 if (mbEnabled
&& maFirstTimes
[eProblem
])
37 maFirstTimes
[eProblem
] = false;
41 void XclTracer::TraceInvalidAddress(const ScAddress
& rPos
, const ScAddress
& rMaxPos
)
43 TraceInvalidRow(rPos
.Row(), rMaxPos
.Row());
44 TraceInvalidTab(rPos
.Tab(), rMaxPos
.Tab());
47 void XclTracer::TraceInvalidRow(sal_uInt32 nRow
, sal_uInt32 nMaxRow
)
50 ProcessTraceOnce(eRowLimitExceeded
);
53 void XclTracer::TraceInvalidTab(SCTAB nTab
, SCTAB nMaxTab
)
56 ProcessTraceOnce(eTabLimitExceeded
);
59 void XclTracer::TracePrintRange() { ProcessTraceOnce(ePrintRange
); }
61 void XclTracer::TraceDates(sal_uInt16 nNumFmt
)
63 // Short Date = 14 and Short Date+Time = 22
64 if (nNumFmt
== 14 || nNumFmt
== 22)
65 ProcessTraceOnce(eShortDate
);
68 void XclTracer::TraceBorderLineStyle(bool bBorderLineStyle
)
71 ProcessTraceOnce(eBorderLineStyle
);
74 void XclTracer::TraceFillPattern(bool bFillPattern
)
77 ProcessTraceOnce(eFillPattern
);
80 void XclTracer::TraceFormulaMissingArg()
82 // missing parameter in Formula record
83 ProcessTraceOnce(eFormulaMissingArg
);
86 void XclTracer::TracePivotDataSource(bool bExternal
)
89 ProcessTraceOnce(ePivotDataSource
);
92 void XclTracer::TracePivotChartExists()
94 // Pivot Charts not currently displayed.
95 ProcessTraceOnce(ePivotChartExists
);
98 void XclTracer::TraceChartUnKnownType() { ProcessTraceOnce(eChartUnKnownType
); }
100 void XclTracer::TraceChartOnlySheet() { ProcessTraceOnce(eChartOnlySheet
); }
102 void XclTracer::TraceChartDataTable()
104 // Data table is not supported.
105 ProcessTraceOnce(eChartDataTable
);
108 void XclTracer::TraceChartLegendPosition()
110 // If position is set to "not docked or inside the plot area" then
111 // we cannot guarantee the legend position.
112 ProcessTraceOnce(eChartLegendPosition
);
115 void XclTracer::TraceUnsupportedObjects()
117 // Called from Excel 5.0 - limited Graphical object support.
118 ProcessTraceOnce(eUnsupportedObject
);
121 void XclTracer::TraceObjectNotPrintable() { ProcessTraceOnce(eObjectNotPrintable
); }
123 void XclTracer::TraceDVType(bool bType
)
125 // Custom types work if 'Data->validity dialog' is not OKed.
127 ProcessTraceOnce(eDVType
);
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */