xref: /aoo4110/main/sw/source/filter/ww8/tracer.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
25 
26 #ifndef SW_TRACER_HXX
27 #define SW_TRACER_HXX
28 
29 #include <rtl/ustring.hxx>      //rtl::OUString
30 
31 class MSFilterTracer;
32 class SfxMedium;
33 
34 namespace sw
35 {
36     namespace log
37     {
38 
39         enum Problem
40         {
41             ePrinterMetrics = 1,
42             eExtraLeading,
43             eTabStopDistance,
44             eDontUseHTMLAutoSpacing,
45             eAutoWidthFrame,
46             eRowCanSplit,
47             eSpacingBetweenCells,
48             eTabInNumbering,
49             eNegativeVertPlacement,
50             eAutoColorBg,
51             eTooWideAsChar,
52             eAnimatedText,
53             eDontAddSpaceForEqualStyles,
54             eBorderDistOutside,
55             eContainsVisualBasic,
56             eContainsWordBasic
57         };
58 
59         enum Environment
60         {
61             eDocumentProperties,
62             eMacros,
63             eMainText,
64             eSubDoc,
65             eTable
66         };
67 
68         class Tracer
69         {
70         private:
71             MSFilterTracer *mpTrace;
72             rtl::OUString GetContext(Environment eContext) const;
73             rtl::OUString GetDetails(Environment eContext) const;
74         public:
75             Tracer(const SfxMedium &rMedium);
GetTrace() const76             MSFilterTracer *GetTrace() const { return mpTrace; }
77             void EnterEnvironment(Environment eContext);
78             void EnterEnvironment(Environment eContext,
79                 const rtl::OUString &rDetails);
80             void Log(Problem eProblem);
81             void LeaveEnvironment(Environment eContext);
82             ~Tracer();
83         };
84     }
85 }
86 #endif
87 /* vi:set tabstop=4 shiftwidth=4 expandtab: */
88