update emoji autocorrect entries from po-files
[LibreOffice.git] / writerfilter / source / dmapper / LoggedResources.hxx
blob2361fe00ee0a36b796acde8dd0659103e266742f
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 #ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_LOGGEDRESOURCES_HXX
21 #define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_LOGGEDRESOURCES_HXX
23 #include <dmapper/resourcemodel.hxx>
24 #include "TagLogger.hxx"
27 namespace writerfilter
30 #ifdef DEBUG_WRITERFILTER
31 class LoggedResourcesHelper
33 public:
34 explicit LoggedResourcesHelper(const std::string & sPrefix);
35 virtual ~LoggedResourcesHelper();
37 void startElement(const std::string & sElement);
38 static void endElement(const std::string & sElement);
39 static void chars(const OUString & rChars);
40 static void chars(const std::string & rChars);
41 static void attribute(const std::string & rName, const std::string & rValue);
42 static void attribute(const std::string & rName, sal_uInt32 nValue);
44 private:
45 std::string msPrefix;
47 #endif
49 class LoggedStream : public Stream
51 public:
52 explicit LoggedStream(const std::string & sPrefix);
53 virtual ~LoggedStream();
55 void startSectionGroup() SAL_OVERRIDE;
56 void endSectionGroup() SAL_OVERRIDE;
57 void startParagraphGroup() SAL_OVERRIDE;
58 void endParagraphGroup() SAL_OVERRIDE;
59 void startCharacterGroup() SAL_OVERRIDE;
60 void endCharacterGroup() SAL_OVERRIDE;
61 void startShape(css::uno::Reference<css::drawing::XShape> const& xShape) SAL_OVERRIDE;
62 void endShape() SAL_OVERRIDE;
63 void text(const sal_uInt8 * data, size_t len) SAL_OVERRIDE;
64 void utext(const sal_uInt8 * data, size_t len) SAL_OVERRIDE;
65 void positionOffset(const OUString& rText, bool bVertical) SAL_OVERRIDE;
66 void align(const OUString& rText, bool bVertical) SAL_OVERRIDE;
67 void positivePercentage(const OUString& rText) SAL_OVERRIDE;
68 void props(writerfilter::Reference<Properties>::Pointer_t ref) SAL_OVERRIDE;
69 void table(Id name, writerfilter::Reference<Table>::Pointer_t ref) SAL_OVERRIDE;
70 void substream(Id name, writerfilter::Reference<Stream>::Pointer_t ref) SAL_OVERRIDE;
71 void info(const std::string & info) SAL_OVERRIDE;
73 protected:
74 virtual void lcl_startSectionGroup() = 0;
75 virtual void lcl_endSectionGroup() = 0;
76 virtual void lcl_startParagraphGroup() = 0;
77 virtual void lcl_endParagraphGroup() = 0;
78 virtual void lcl_startCharacterGroup() = 0;
79 virtual void lcl_endCharacterGroup() = 0;
80 virtual void lcl_startShape(css::uno::Reference<css::drawing::XShape> const& xShape) = 0;
81 virtual void lcl_endShape() = 0;
82 virtual void lcl_text(const sal_uInt8 * data, size_t len) = 0;
83 virtual void lcl_utext(const sal_uInt8 * data, size_t len) = 0;
84 virtual void lcl_positionOffset(const OUString& /*rText*/, bool /*bVertical*/) { }
85 virtual css::awt::Point getPositionOffset() SAL_OVERRIDE { return css::awt::Point(); }
86 virtual void lcl_align(const OUString& /*rText*/, bool /*bVertical*/) { }
87 virtual void lcl_positivePercentage(const OUString& /*rText*/) { }
88 virtual void lcl_props(writerfilter::Reference<Properties>::Pointer_t ref) = 0;
89 virtual void lcl_table(Id name, writerfilter::Reference<Table>::Pointer_t ref) = 0;
90 virtual void lcl_substream(Id name, writerfilter::Reference<Stream>::Pointer_t ref) = 0;
91 virtual void lcl_info(const std::string & info) = 0;
93 #ifdef DEBUG_WRITERFILTER
94 LoggedResourcesHelper mHelper;
95 #endif
98 class LoggedProperties : public Properties
100 public:
101 explicit LoggedProperties(const std::string & sPrefix);
102 virtual ~LoggedProperties();
104 void attribute(Id name, Value & val) SAL_OVERRIDE;
105 void sprm(Sprm & sprm) SAL_OVERRIDE;
107 protected:
108 virtual void lcl_attribute(Id name, Value & val) = 0;
109 virtual void lcl_sprm(Sprm & sprm) = 0;
111 #ifdef DEBUG_WRITERFILTER
112 LoggedResourcesHelper mHelper;
113 #endif
116 class LoggedTable : public Table
118 public:
119 explicit LoggedTable(const std::string & sPrefix);
120 virtual ~LoggedTable();
122 void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) SAL_OVERRIDE;
124 protected:
125 virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) = 0;
127 #ifdef DEBUG_WRITERFILTER
128 LoggedResourcesHelper mHelper;
129 #endif
133 #endif // INCLUDED_WRITERFILTER_SOURCE_DMAPPER_LOGGEDRESOURCES_HXX
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */