SVGAttrValueWrapper.cpp 2.6 KB

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