diff options
author | Denis Bitouzé <dbitouze@wanadoo.fr> | 2021-02-25 18:23:07 +0000 |
---|---|---|
committer | Denis Bitouzé <dbitouze@wanadoo.fr> | 2021-02-25 18:23:07 +0000 |
commit | c6101f91d071883b48b1b4b51e5eba0f36d9a78d (patch) | |
tree | 1bf7f5a881d7a4f5c5bf59d0b2821943dd822372 /Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.hpp | |
parent | 07ee7222e389b0777456b427a55c22d0e6ffd267 (diff) |
French translation for tlmgr updated
git-svn-id: svn://tug.org/texlive/trunk@57912 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.hpp')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.hpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.hpp deleted file mode 100644 index c8ab6bd61a1..00000000000 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/************************************************************************* -** AttributeExtractor.hpp ** -** ** -** This file is part of dvisvgm -- a fast DVI to SVG converter ** -** Copyright (C) 2005-2021 Martin Gieseking <martin.gieseking@uos.de> ** -** ** -** This program is free software; you can redistribute it and/or ** -** modify it under the terms of the GNU General Public License as ** -** published by the Free Software Foundation; either version 3 of ** -** the License, or (at your option) any later version. ** -** ** -** This program is distributed in the hope that it will be useful, but ** -** WITHOUT ANY WARRANTY; without even the implied warranty of ** -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** -** GNU General Public License for more details. ** -** ** -** You should have received a copy of the GNU General Public License ** -** along with this program; if not, see <http://www.gnu.org/licenses/>. ** -*************************************************************************/ - -#pragma once - -#include <set> -#include <string> -#include "OptimizerModule.hpp" -#include "../XMLNode.hpp" - -/** Moves common attributes of adjacent elements to enclosing groups. */ -class AttributeExtractor : public OptimizerModule { - using Attribute = XMLElement::Attribute; - - /** Represents a range of adjacent nodes where all elements have a common attribute. */ - struct AttributeRun { - public: - AttributeRun (const Attribute &attr, XMLElement *first); - XMLNode* first () {return _first;} - XMLNode* last () {return _last;} - int length () const {return _length;} - - private: - int _length; ///< run length excluding non-element nodes - XMLNode *_first, *_last; ///< first and last node in run - }; - - public: - void execute (XMLElement*, XMLElement *context) override {execute(context, true);}; - const char* info () const override; - static bool groupable (const XMLElement &elem); - static bool inheritable (const Attribute &attrib); - static bool extractable (const Attribute &attr, XMLElement &element); - - protected: - void execute (XMLElement *context, bool recurse); - XMLNode* extractAttribute (XMLElement *elem); - bool extracted (const Attribute &attr) const; - - private: - std::set<std::string> _extractedAttributes; - static constexpr int MIN_RUN_LENGTH = 3; -}; - |