1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 #include "SVGAttrValueWrapper.h"
8
9 #include "SVGAnimatedIntegerPair.h"
10 #include "SVGAnimatedLength.h"
11 #include "SVGAnimatedNumberPair.h"
12 #include "SVGAnimatedOrient.h"
13 #include "SVGAnimatedPreserveAspectRatio.h"
14 #include "SVGAnimatedViewBox.h"
15 #include "SVGLengthList.h"
16 #include "SVGNumberList.h"
17 #include "SVGPathData.h"
18 #include "SVGPointList.h"
19 #include "SVGStringList.h"
20 #include "SVGTransformList.h"
21
22 namespace mozilla {
23
24 /*static*/
ToString(const SVGAnimatedOrient * aOrient,nsAString & aResult)25 void SVGAttrValueWrapper::ToString(const SVGAnimatedOrient* aOrient,
26 nsAString& aResult) {
27 aOrient->GetBaseValueString(aResult);
28 }
29
30 /*static*/
ToString(const SVGAnimatedIntegerPair * aIntegerPair,nsAString & aResult)31 void SVGAttrValueWrapper::ToString(const SVGAnimatedIntegerPair* aIntegerPair,
32 nsAString& aResult) {
33 aIntegerPair->GetBaseValueString(aResult);
34 }
35
36 /*static*/
ToString(const SVGAnimatedLength * aLength,nsAString & aResult)37 void SVGAttrValueWrapper::ToString(const SVGAnimatedLength* aLength,
38 nsAString& aResult) {
39 aLength->GetBaseValueString(aResult);
40 }
41
42 /*static*/
ToString(const SVGLengthList * aLengthList,nsAString & aResult)43 void SVGAttrValueWrapper::ToString(const SVGLengthList* aLengthList,
44 nsAString& aResult) {
45 aLengthList->GetValueAsString(aResult);
46 }
47
48 /*static*/
ToString(const SVGNumberList * aNumberList,nsAString & aResult)49 void SVGAttrValueWrapper::ToString(const SVGNumberList* aNumberList,
50 nsAString& aResult) {
51 aNumberList->GetValueAsString(aResult);
52 }
53
54 /*static*/
ToString(const SVGAnimatedNumberPair * aNumberPair,nsAString & aResult)55 void SVGAttrValueWrapper::ToString(const SVGAnimatedNumberPair* aNumberPair,
56 nsAString& aResult) {
57 aNumberPair->GetBaseValueString(aResult);
58 }
59
60 /*static*/
ToString(const SVGPathData * aPathData,nsAString & aResult)61 void SVGAttrValueWrapper::ToString(const SVGPathData* aPathData,
62 nsAString& aResult) {
63 aPathData->GetValueAsString(aResult);
64 }
65
66 /*static*/
ToString(const SVGPointList * aPointList,nsAString & aResult)67 void SVGAttrValueWrapper::ToString(const SVGPointList* aPointList,
68 nsAString& aResult) {
69 aPointList->GetValueAsString(aResult);
70 }
71
72 /*static*/
ToString(const SVGAnimatedPreserveAspectRatio * aPreserveAspectRatio,nsAString & aResult)73 void SVGAttrValueWrapper::ToString(
74 const SVGAnimatedPreserveAspectRatio* aPreserveAspectRatio,
75 nsAString& aResult) {
76 aPreserveAspectRatio->GetBaseValueString(aResult);
77 }
78
79 /*static*/
ToString(const SVGStringList * aStringList,nsAString & aResult)80 void SVGAttrValueWrapper::ToString(const SVGStringList* aStringList,
81 nsAString& aResult) {
82 aStringList->GetValue(aResult);
83 }
84
85 /*static*/
ToString(const SVGTransformList * aTransformList,nsAString & aResult)86 void SVGAttrValueWrapper::ToString(const SVGTransformList* aTransformList,
87 nsAString& aResult) {
88 aTransformList->GetValueAsString(aResult);
89 }
90
91 /*static*/
ToString(const SVGAnimatedViewBox * aViewBox,nsAString & aResult)92 void SVGAttrValueWrapper::ToString(const SVGAnimatedViewBox* aViewBox,
93 nsAString& aResult) {
94 aViewBox->GetBaseValueString(aResult);
95 }
96
97 } // namespace mozilla
98