LibreOffice Module svgio (master) 1
svgtspannode.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 <svgtspannode.hxx>
21
22namespace svgio::svgreader
23{
25 SvgDocument& rDocument,
26 SvgNode* pParent)
27 : SvgNode(SVGToken::Tspan, rDocument, pParent),
28 maSvgStyleAttributes(*this)
29 {
30 }
31
33 {
34 }
35
37 {
38 // #i125293# Need to support CssStyles in tspan text sections
40 }
41
42 void SvgTspanNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
43 {
44 // call parent
45 SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
46
47 // read style attributes
48 maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
49
50 // read text position attributes
52
53 // parse own
54 switch(aSVGToken)
55 {
56 case SVGToken::Style:
57 {
58 readLocalCssStyle(aContent);
59 break;
60 }
61 default:
62 {
63 break;
64 }
65 }
66 }
67
69 {
71 }
72
73} // end of namespace svgio::svgreader
74
75/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const SvgStyleAttributes * checkForCssStyle(const SvgStyleAttributes &rOriginal) const
helper to evtl. link to css style
Definition: svgnode.cxx:335
virtual double getCurrentFontSizeInherited() const override
return font size of node inherited from parents
Definition: svgnode.cxx:714
virtual void parseAttribute(const OUString &rTokenName, SVGToken aSVGToken, const OUString &aContent)
Definition: svgnode.cxx:534
void readLocalCssStyle(std::u16string_view aContent)
scan helper to read and interpret a local CssStyle to mpLocalCssStyle
Definition: svgnode.cxx:412
void parseStyleAttribute(SVGToken aSVGToken, const OUString &rContent)
local attribute scanner
void parseTextPositionAttributes(SVGToken aSVGToken, std::u16string_view aContent)
virtual const SvgStyleAttributes * getSvgStyleAttributes() const override
SvgTextPositions maSvgTextPositions
variable scan values, dependent of given XAttributeList
virtual ~SvgTspanNode() override
SvgTspanNode(SvgDocument &rDocument, SvgNode *pParent)
SvgStyleAttributes maSvgStyleAttributes
use styles
virtual void parseAttribute(const OUString &rTokenName, SVGToken aSVGToken, const OUString &aContent) override