Line data Source code
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 : #ifndef OOX_VML_VMLTEXTBOXCONTEXT_HXX
21 : #define OOX_VML_VMLTEXTBOXCONTEXT_HXX
22 :
23 : #include "oox/core/contexthandler2.hxx"
24 : #include "oox/vml/vmltextbox.hxx"
25 :
26 : namespace oox {
27 : namespace vml {
28 :
29 : // ============================================================================
30 :
31 144 : class TextPortionContext : public ::oox::core::ContextHandler2
32 : {
33 : public:
34 : explicit TextPortionContext(
35 : ::oox::core::ContextHandler2Helper& rParent,
36 : TextBox& rTextBox,
37 : const TextFontModel& rParentFont,
38 : sal_Int32 nElement,
39 : const AttributeList& rAttribs );
40 :
41 : virtual ::oox::core::ContextHandlerRef
42 : onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
43 : virtual void onCharacters( const ::rtl::OUString& rChars );
44 : virtual void onStartElement(const AttributeList& rAttribs);
45 : virtual void onEndElement();
46 :
47 : private:
48 : TextBox& mrTextBox;
49 : TextFontModel maFont;
50 : size_t mnInitialPortions;
51 : };
52 :
53 : // ============================================================================
54 :
55 30 : class TextBoxContext : public ::oox::core::ContextHandler2
56 : {
57 : public:
58 : explicit TextBoxContext(
59 : ::oox::core::ContextHandler2Helper& rParent,
60 : TextBox& rTextBox,
61 : const AttributeList& rAttribs,
62 : const GraphicHelper& graphicHelper );
63 :
64 : virtual ::oox::core::ContextHandlerRef
65 : onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
66 :
67 : private:
68 : TextBox& mrTextBox;
69 : };
70 :
71 : // ============================================================================
72 :
73 : } // namespace vml
74 : } // namespace oox
75 :
76 : #endif
77 :
78 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|