blob: 9f2286d6fc8ea8832971f32bf39a621962196288 [file] [log] [blame]
eseidelb8402f92005-07-09 06:56:18 +00001/*
eseidel044d7d22005-08-11 11:35:23 +00002 Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
3 2004, 2005 Rob Buis <buis@kde.org>
eseidelb8402f92005-07-09 06:56:18 +00004
5 This file is part of the KDE project
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.
21*/
22
eseidel0f4540f2005-10-05 05:36:55 +000023#include "config.h"
eseidel05aeca32006-01-22 14:08:24 +000024#if SVG_SUPPORT
mjs5be25ad2006-02-23 00:33:08 +000025#include <QStringList.h>
eseidelb8402f92005-07-09 06:56:18 +000026
27#include "SVGMatrixImpl.h"
28#include "SVGSVGElementImpl.h"
29#include "SVGLengthListImpl.h"
30
eseideld76e27b2006-02-11 23:54:23 +000031using namespace WebCore;
eseidelb8402f92005-07-09 06:56:18 +000032
33SVGLengthListImpl::SVGLengthListImpl(const SVGStyledElementImpl *context)
34: SVGList<SVGLengthImpl>(context)
35{
36}
37
38SVGLengthListImpl::~SVGLengthListImpl()
39{
40}
41
42void SVGLengthListImpl::parse(const QString &value, const SVGStyledElementImpl *context, LengthMode mode)
43{
eseidel62607d12005-09-01 07:35:57 +000044 QStringList lengths = QStringList::split(' ', value);
45 for(unsigned int i = 0;i < lengths.count();i++)
46 {
47 SVGLengthImpl *length = new SVGLengthImpl(context, mode);
eseideld76e27b2006-02-11 23:54:23 +000048 DOMString str(lengths[i]);
eseidel3fdfa782005-11-21 08:29:43 +000049 length->setValueAsString(str.impl());
eseidel62607d12005-09-01 07:35:57 +000050 appendItem(length);
51 }
eseidelb8402f92005-07-09 06:56:18 +000052}
53
54// vim:ts=4:noet
eseidel05aeca32006-01-22 14:08:24 +000055#endif // SVG_SUPPORT
56