fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / filter / excel / xltracer.cxx
blob6c7e632aebca7b8b8429a7adc49d1399ad1ede96
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 #include "xltracer.hxx"
21 #include <com/sun/star/beans/PropertyValue.hpp>
22 #include "address.hxx"
24 using ::com::sun::star::uno::Sequence;
25 using ::com::sun::star::beans::PropertyValue;
27 XclTracer::XclTracer( const OUString& rDocUrl )
28 : mbEnabled(false)
29 , maFirstTimes(eTraceLength,true)
31 Sequence< PropertyValue > aConfigData( 1 );
32 aConfigData[ 0 ].Name = "DocumentURL";
33 aConfigData[ 0 ].Value <<= rDocUrl;
36 XclTracer::~XclTracer()
40 void XclTracer::ProcessTraceOnce(XclTracerId eProblem)
42 if( mbEnabled && maFirstTimes[eProblem])
44 maFirstTimes[eProblem] = false;
48 void XclTracer::TraceInvalidAddress( const ScAddress& rPos, const ScAddress& rMaxPos )
50 TraceInvalidRow(rPos.Row(), rMaxPos.Row());
51 TraceInvalidTab(rPos.Tab(), rMaxPos.Tab());
54 void XclTracer::TraceInvalidRow( sal_uInt32 nRow, sal_uInt32 nMaxRow )
56 if(nRow > nMaxRow)
57 ProcessTraceOnce(eRowLimitExceeded);
60 void XclTracer::TraceInvalidTab( SCTAB nTab, SCTAB nMaxTab )
62 if(nTab > nMaxTab)
63 ProcessTraceOnce(eTabLimitExceeded);
66 void XclTracer::TracePrintRange()
68 ProcessTraceOnce( ePrintRange);
71 void XclTracer::TraceDates( sal_uInt16 nNumFmt)
73 // Short Date = 14 and Short Date+Time = 22
74 if(nNumFmt == 14 || nNumFmt == 22)
75 ProcessTraceOnce(eShortDate);
78 void XclTracer::TraceBorderLineStyle( bool bBorderLineStyle)
80 if(bBorderLineStyle)
81 ProcessTraceOnce(eBorderLineStyle);
84 void XclTracer::TraceFillPattern( bool bFillPattern)
86 if(bFillPattern)
87 ProcessTraceOnce(eFillPattern);
90 void XclTracer::TraceFormulaMissingArg()
92 // missing parameter in Formula record
93 ProcessTraceOnce(eFormulaMissingArg);
96 void XclTracer::TracePivotDataSource( bool bExternal)
98 if(bExternal)
99 ProcessTraceOnce(ePivotDataSource);
102 void XclTracer::TracePivotChartExists()
104 // Pivot Charts not currently displayed.
105 ProcessTraceOnce(ePivotChartExists);
108 void XclTracer::TraceChartUnKnownType()
110 ProcessTraceOnce(eChartUnKnownType);
113 void XclTracer::TraceChartOnlySheet()
115 ProcessTraceOnce(eChartOnlySheet);
118 void XclTracer::TraceChartDataTable()
120 // Data table is not supported.
121 ProcessTraceOnce(eChartDataTable);
124 void XclTracer::TraceChartLegendPosition()
126 // If position is set to "not docked or inside the plot area" then
127 // we cannot guarantee the legend position.
128 ProcessTraceOnce(eChartLegendPosition);
131 void XclTracer::TraceUnsupportedObjects()
133 // Called from Excel 5.0 - limited Graphical object support.
134 ProcessTraceOnce(eUnsupportedObject);
137 void XclTracer::TraceObjectNotPrintable()
139 ProcessTraceOnce(eObjectNotPrintable);
142 void XclTracer::TraceDVType( bool bType)
144 // Custom types work if 'Data->validity dialog' is not OKed.
145 if(bType)
146 ProcessTraceOnce(eDVType);
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */