LibreOffice Module sc (master)  1
xltracer.cxx
Go to the documentation of this file.
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 #include <xltracer.hxx>
21 #include <com/sun/star/beans/PropertyValue.hpp>
22 #include <com/sun/star/uno/Sequence.hxx>
23 #include <address.hxx>
24 
25 using ::com::sun::star::uno::Sequence;
26 using ::com::sun::star::beans::PropertyValue;
27 
28 XclTracer::XclTracer(const OUString& rDocUrl)
29  : mbEnabled(false)
30  , maFirstTimes(eTraceLength, true)
31 {
32  Sequence<PropertyValue> aConfigData(1);
33  aConfigData[0].Name = "DocumentURL";
34  aConfigData[0].Value <<= rDocUrl;
35 }
36 
38 
40 {
41  if (mbEnabled && maFirstTimes[eProblem])
42  {
43  maFirstTimes[eProblem] = false;
44  }
45 }
46 
47 void XclTracer::TraceInvalidAddress(const ScAddress& rPos, const ScAddress& rMaxPos)
48 {
49  TraceInvalidRow(rPos.Row(), rMaxPos.Row());
50  TraceInvalidTab(rPos.Tab(), rMaxPos.Tab());
51 }
52 
53 void XclTracer::TraceInvalidRow(sal_uInt32 nRow, sal_uInt32 nMaxRow)
54 {
55  if (nRow > nMaxRow)
57 }
58 
60 {
61  if (nTab > nMaxTab)
63 }
64 
66 
67 void XclTracer::TraceDates(sal_uInt16 nNumFmt)
68 {
69  // Short Date = 14 and Short Date+Time = 22
70  if (nNumFmt == 14 || nNumFmt == 22)
72 }
73 
74 void XclTracer::TraceBorderLineStyle(bool bBorderLineStyle)
75 {
76  if (bBorderLineStyle)
78 }
79 
80 void XclTracer::TraceFillPattern(bool bFillPattern)
81 {
82  if (bFillPattern)
84 }
85 
87 {
88  // missing parameter in Formula record
90 }
91 
92 void XclTracer::TracePivotDataSource(bool bExternal)
93 {
94  if (bExternal)
96 }
97 
99 {
100  // Pivot Charts not currently displayed.
102 }
103 
105 
107 
109 {
110  // Data table is not supported.
112 }
113 
115 {
116  // If position is set to "not docked or inside the plot area" then
117  // we cannot guarantee the legend position.
119 }
120 
122 {
123  // Called from Excel 5.0 - limited Graphical object support.
125 }
126 
128 
129 void XclTracer::TraceDVType(bool bType)
130 {
131  // Custom types work if 'Data->validity dialog' is not OKed.
132  if (bType)
134 }
135 
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void TraceBorderLineStyle(bool bBorderLineStyle)
Definition: xltracer.cxx:74
SCROW Row() const
Definition: address.hxx:262
void TraceFillPattern(bool bFillPattern)
Definition: xltracer.cxx:80
XclTracer(const OUString &rDocUrl)
Definition: xltracer.cxx:28
unused but allows us to set the correct index
Definition: xltracer.hxx:31
~XclTracer()
Definition: xltracer.cxx:37
void TracePivotDataSource(bool bExternal)
Definition: xltracer.cxx:92
void TraceChartLegendPosition()
Definition: xltracer.cxx:114
void TraceDVType(bool bType)
Definition: xltracer.cxx:129
std::vector< bool > maFirstTimes
array of flags corresponding to each entry in the XclTracerDetails table.
Definition: xltracer.hxx:84
XclTracerId
Definition: xltracer.hxx:28
void TracePivotChartExists()
Definition: xltracer.cxx:98
void TraceObjectNotPrintable()
Definition: xltracer.cxx:127
SCTAB Tab() const
Definition: address.hxx:271
void TraceInvalidRow(sal_uInt32 nRow, sal_uInt32 nMaxrow)
Definition: xltracer.cxx:53
void TraceInvalidTab(SCTAB nTab, SCTAB nMaxTab)
Definition: xltracer.cxx:59
void TraceFormulaMissingArg()
Definition: xltracer.cxx:86
bool mbEnabled
Definition: xltracer.hxx:82
void TraceChartOnlySheet()
Definition: xltracer.cxx:106
void ProcessTraceOnce(XclTracerId eProblem)
Ensure that particular traces are logged once per document.
Definition: xltracer.cxx:39
this should always be the final entry
Definition: xltracer.hxx:47
void TraceChartDataTable()
Definition: xltracer.cxx:108
void TraceChartUnKnownType()
Definition: xltracer.cxx:104
void TraceInvalidAddress(const ScAddress &rPos, const ScAddress &rMaxPos)
Definition: xltracer.cxx:47
void TracePrintRange()
Definition: xltracer.cxx:65
void TraceUnsupportedObjects()
Definition: xltracer.cxx:121
void TraceDates(sal_uInt16 nNumFmt)
Definition: xltracer.cxx:67
sal_Int16 SCTAB
Definition: types.hxx:23