1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 : * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
3 : * ***** BEGIN LICENSE BLOCK *****
4 : * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 : *
6 : * The contents of this file are subject to the Mozilla Public License Version
7 : * 1.1 (the "License"); you may not use this file except in compliance with
8 : * the License. You may obtain a copy of the License at
9 : * http://www.mozilla.org/MPL/
10 : *
11 : * Software distributed under the License is distributed on an "AS IS" basis,
12 : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 : * for the specific language governing rights and limitations under the
14 : * License.
15 : *
16 : * The Original Code is the Mozilla SVG project.
17 : *
18 : * The Initial Developer of the Original Code is Mozilla Japan.
19 : * Portions created by the Initial Developer are Copyright (C) 2011
20 : * the Initial Developer. All Rights Reserved.
21 : *
22 : * Contributor(s):
23 : *
24 : * Alternatively, the contents of this file may be used under the terms of
25 : * either the GNU General Public License Version 2 or later (the "GPL"), or
26 : * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 : * in which case the provisions of the GPL or the LGPL are applicable instead
28 : * of those above. If you wish to allow use of your version of this file only
29 : * under the terms of either the GPL or the LGPL, and not to allow others to
30 : * use your version of this file under the terms of the MPL, indicate your
31 : * decision by deleting the provisions above and replace them with the notice
32 : * and other provisions required by the GPL or the LGPL. If you do not delete
33 : * the provisions above, a recipient may use your version of this file under
34 : * the terms of any one of the MPL, the GPL or the LGPL.
35 : *
36 : * ***** END LICENSE BLOCK ***** */
37 :
38 : #include "SVGAttrValueWrapper.h"
39 : #include "nsSVGAngle.h"
40 : #include "nsSVGIntegerPair.h"
41 : #include "nsSVGLength2.h"
42 : #include "nsSVGNumberPair.h"
43 : #include "nsSVGViewBox.h"
44 : #include "SVGAnimatedPreserveAspectRatio.h"
45 : #include "SVGLengthList.h"
46 : #include "SVGNumberList.h"
47 : #include "SVGPathData.h"
48 : #include "SVGPointList.h"
49 : #include "SVGStringList.h"
50 : #include "SVGTransformList.h"
51 :
52 : using namespace mozilla;
53 :
54 : /*static*/ void
55 0 : SVGAttrValueWrapper::ToString(const nsSVGAngle* aAngle, nsAString& aResult)
56 : {
57 0 : aAngle->GetBaseValueString(aResult);
58 0 : }
59 :
60 : /*static*/ void
61 0 : SVGAttrValueWrapper::ToString(const nsSVGIntegerPair* aIntegerPair,
62 : nsAString& aResult)
63 : {
64 0 : aIntegerPair->GetBaseValueString(aResult);
65 0 : }
66 :
67 : /*static*/ void
68 0 : SVGAttrValueWrapper::ToString(const nsSVGLength2* aLength, nsAString& aResult)
69 : {
70 0 : aLength->GetBaseValueString(aResult);
71 0 : }
72 :
73 : /*static*/ void
74 0 : SVGAttrValueWrapper::ToString(const SVGLengthList* aLengthList,
75 : nsAString& aResult)
76 : {
77 0 : aLengthList->GetValueAsString(aResult);
78 0 : }
79 :
80 : /*static*/ void
81 0 : SVGAttrValueWrapper::ToString(const SVGNumberList* aNumberList,
82 : nsAString& aResult)
83 : {
84 0 : aNumberList->GetValueAsString(aResult);
85 0 : }
86 :
87 : /*static*/ void
88 0 : SVGAttrValueWrapper::ToString(const nsSVGNumberPair* aNumberPair,
89 : nsAString& aResult)
90 : {
91 0 : aNumberPair->GetBaseValueString(aResult);
92 0 : }
93 :
94 : /*static*/ void
95 0 : SVGAttrValueWrapper::ToString(const SVGPathData* aPathData, nsAString& aResult)
96 : {
97 0 : aPathData->GetValueAsString(aResult);
98 0 : }
99 :
100 : /*static*/ void
101 0 : SVGAttrValueWrapper::ToString(const SVGPointList* aPointList,
102 : nsAString& aResult)
103 : {
104 0 : aPointList->GetValueAsString(aResult);
105 0 : }
106 :
107 : /*static*/ void
108 0 : SVGAttrValueWrapper::ToString(
109 : const SVGAnimatedPreserveAspectRatio* aPreserveAspectRatio,
110 : nsAString& aResult)
111 : {
112 0 : aPreserveAspectRatio->GetBaseValueString(aResult);
113 0 : }
114 :
115 : /*static*/ void
116 0 : SVGAttrValueWrapper::ToString(const SVGStringList* aStringList,
117 : nsAString& aResult)
118 : {
119 0 : aStringList->GetValue(aResult);
120 0 : }
121 :
122 : /*static*/ void
123 0 : SVGAttrValueWrapper::ToString(const SVGTransformList* aTransformList,
124 : nsAString& aResult)
125 : {
126 0 : aTransformList->GetValueAsString(aResult);
127 0 : }
128 :
129 : /*static*/ void
130 0 : SVGAttrValueWrapper::ToString(const nsSVGViewBox* aViewBox, nsAString& aResult)
131 : {
132 0 : aViewBox->GetBaseValueString(aResult);
133 0 : }
|