diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2011-05-06 06:21:51 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2011-05-06 06:21:51 +0000 |
| commit | a4d0a358424440128cd4c4fb2915ccc4b86f4587 (patch) | |
| tree | 818fc169950e0076d262bd8e633976afaafd7783 /src/xml/rebase-hrefs.h | |
| parent | symbol rendering fix bug:705345 (diff) | |
| download | inkscape-a4d0a358424440128cd4c4fb2915ccc4b86f4587.tar.gz inkscape-a4d0a358424440128cd4c4fb2915ccc4b86f4587.zip | |
Adding initial cut of resource manager.
(bzr r10198)
Diffstat (limited to 'src/xml/rebase-hrefs.h')
| -rw-r--r-- | src/xml/rebase-hrefs.h | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/xml/rebase-hrefs.h b/src/xml/rebase-hrefs.h index b4f288c4d..4cbdec9a5 100644 --- a/src/xml/rebase-hrefs.h +++ b/src/xml/rebase-hrefs.h @@ -9,17 +9,36 @@ struct SPDocument; namespace Inkscape { namespace XML { -gchar *calc_abs_doc_base(gchar const *doc_base); - +std::string calc_abs_doc_base(gchar const *doc_base); + +/** + * Change relative hrefs in doc to be relative to \a new_base instead of doc.base. + * + * (NULL doc base or new_base is interpreted as current working directory.) + * + * @param spns True if doc should contain sodipodi:absref attributes. + */ void rebase_hrefs(SPDocument *doc, gchar const *new_base, bool spns); +/** + * Change relative xlink:href attributes to be relative to \a new_abs_base instead of old_abs_base. + * + * Note that old_abs_base and new_abs_base must each be non-NULL, absolute directory paths. + */ Inkscape::Util::List<AttributeRecord const> rebase_href_attrs( gchar const *old_abs_base, gchar const *new_abs_base, Inkscape::Util::List<AttributeRecord const> attributes); -} -} + +// /** +// * . +// * @return a non-empty replacement href if needed, empty otherwise. +// */ +// std::string rebase_href_attrs( std::string const &oldAbsBase, std::string const &newAbsBase, gchar const *href, gchar const *absref = 0 ); + +} // namespace XML +} // namespace Inkscape #endif /* !REBASE_HREFS_H_SEEN */ |
