diff options
author | Armin Le Grand <alg@apache.org> | 2012-05-04 14:16:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-03-13 11:22:20 +0000 |
commit | eceecd4a3806f64c2e8fb0a3bcdcc43e1384779f (patch) | |
tree | e8c81552d7e3a1374a903cf5ca522a6eb77853e3 /svgio/inc | |
parent | cc22c25de9be13596960b8af6c6f40fc2e3fd27d (diff) |
Related: #i119125# corrected gradient rendering
and added stuff to add Title and Description to primitives for later usage
Conflicts:
drawinglayer/Library_drawinglayer.mk
drawinglayer/inc/drawinglayer/primitive2d/svggradientprimitive2d.hxx
svgio/Package_inc.mk
svx/source/sdr/contact/viewcontactofsdrobj.cxx
Change-Id: I301c9f5f4ae0efc02d937cd3f56018e27c94a630
Diffstat (limited to 'svgio/inc')
-rw-r--r-- | svgio/inc/svgio/svgreader/svgstyleattributes.hxx | 10 | ||||
-rw-r--r-- | svgio/inc/svgio/svgreader/svgtitledescnode.hxx | 55 | ||||
-rw-r--r-- | svgio/inc/svgio/svgreader/svgtoken.hxx | 4 |
3 files changed, 69 insertions, 0 deletions
diff --git a/svgio/inc/svgio/svgreader/svgstyleattributes.hxx b/svgio/inc/svgio/svgreader/svgstyleattributes.hxx index ee1edf5ad67f..81682ab1c243 100644 --- a/svgio/inc/svgio/svgreader/svgstyleattributes.hxx +++ b/svgio/inc/svgio/svgreader/svgstyleattributes.hxx @@ -169,6 +169,8 @@ namespace svgio TextAnchor maTextAnchor; SvgPaint maColor; SvgNumber maOpacity; + rtl::OUString maTitle; + rtl::OUString maDesc; /// link to content. If set, the node can be fetched on demand rtl::OUString maClipPathXLink; @@ -373,6 +375,14 @@ namespace svgio const SvgNumber getOpacity() const { return maOpacity; } void setOpacity(const SvgNumber& rOpacity = SvgNumber()) { maOpacity = rOpacity; } + // Title content + const rtl::OUString& getTitle() const { return maTitle; } + void setTitle(const rtl::OUString& rNew) { maTitle = rNew; } + + // Desc content + const rtl::OUString& getDesc() const { return maDesc; } + void setDesc(const rtl::OUString& rNew) { maDesc = rNew; } + // ClipPathXLink content const rtl::OUString getClipPathXLink() const { return maClipPathXLink; } void setClipPathXLink(const rtl::OUString& rNew) { maClipPathXLink = rNew; } diff --git a/svgio/inc/svgio/svgreader/svgtitledescnode.hxx b/svgio/inc/svgio/svgreader/svgtitledescnode.hxx new file mode 100644 index 000000000000..d84b06dab1b5 --- /dev/null +++ b/svgio/inc/svgio/svgreader/svgtitledescnode.hxx @@ -0,0 +1,55 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVGIO_SVGREADER_SVGTITLEDESCNODE_HXX +#define INCLUDED_SVGIO_SVGREADER_SVGTITLEDESCNODE_HXX + +#include <svgio/svgreader/svgnode.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace svgio +{ + namespace svgreader + { + class SvgTitleDescNode : public SvgNode + { + private: + /// contained chars + rtl::OUString maText; + + public: + SvgTitleDescNode( + SVGToken aType, + SvgDocument& rDocument, + SvgNode* pParent); + virtual ~SvgTitleDescNode(); + + /// add new chars + void concatenate(const rtl::OUString& rChars); + + /// x content, set if found in current context + const rtl::OUString& getText() const { return maText; } + }; + } // end of namespace svgreader +} // end of namespace svgio + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SVGIO_SVGREADER_SVGTITLEDESCNODE_HXX + +// eof diff --git a/svgio/inc/svgio/svgreader/svgtoken.hxx b/svgio/inc/svgio/svgreader/svgtoken.hxx index 0519d9c14680..e1218620a85d 100644 --- a/svgio/inc/svgio/svgreader/svgtoken.hxx +++ b/svgio/inc/svgio/svgreader/svgtoken.hxx @@ -103,6 +103,8 @@ namespace svgio SVGTokenPatternContentUnits, SVGTokenPatternTransform, SVGTokenOpacity, + SVGTokenTitle, + SVGTokenDesc, // AspectRatio and params SVGTokenPreserveAspectRatio, @@ -181,6 +183,8 @@ namespace svgio SVGToken StrToSVGToken(const rtl::OUString& rStr); + const rtl::OUString& getStrTitle(); + const rtl::OUString& getStrDesc(); } // end of namespace svgreader } // end of namespace svgio |