Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
vsd-input.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
11/* Authors:
12 * Fridrich Strba (fridrich.strba@bluewin.ch)
13 *
14 * Copyright (C) 2012 Authors
15 *
16 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
17 */
18
19#include "vsd-input.h"
20
21#include <libvisio/libvisio.h>
22
23#include "extension/input.h"
25#include "extension/system.h"
26
28
29std::unique_ptr<SPDocument> VsdInput::open(Inkscape::Extension::Input *, char const *uri, bool)
30{
31 return rvng_open(uri, libvisio::VisioDocument::isSupported, libvisio::VisioDocument::parse);
32}
33
34#include "clear-n_.h"
35
37{
38 // clang-format off
39 /* VSD */
41 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
42 "<name>" N_("VSD Input") "</name>\n"
43 "<id>org.inkscape.input.vsd</id>\n"
44 "<input>\n"
45 "<extension>.vsd</extension>\n"
46 "<mimetype>application/vnd.visio</mimetype>\n"
47 "<filetypename>" N_("Microsoft Visio Diagram (*.vsd)") "</filetypename>\n"
48 "<filetypetooltip>" N_("File format used by Microsoft Visio 6 and later") "</filetypetooltip>\n"
49 "</input>\n"
50 "</inkscape-extension>", std::make_unique<VsdInput>());
51 /* VDX */
53 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
54 "<name>" N_("VDX Input") "</name>\n"
55 "<id>org.inkscape.input.vdx</id>\n"
56 "<input>\n"
57 "<extension>.vdx</extension>\n"
58 "<mimetype>application/vnd.visio</mimetype>\n"
59 "<filetypename>" N_("Microsoft Visio XML Diagram (*.vdx)") "</filetypename>\n"
60 "<filetypetooltip>" N_("File format used by Microsoft Visio 2010 and later") "</filetypetooltip>\n"
61 "</input>\n"
62 "</inkscape-extension>", std::make_unique<VsdInput>());
63 /* VSDM */
65 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
66 "<name>" N_("VSDM Input") "</name>\n"
67 "<id>org.inkscape.input.vsdm</id>\n"
68 "<input>\n"
69 "<extension>.vsdm</extension>\n"
70 "<mimetype>application/vnd.visio</mimetype>\n"
71 "<filetypename>" N_("Microsoft Visio 2013 drawing (*.vsdm)") "</filetypename>\n"
72 "<filetypetooltip>" N_("File format used by Microsoft Visio 2013 and later") "</filetypetooltip>\n"
73 "</input>\n"
74 "</inkscape-extension>", std::make_unique<VsdInput>());
75 /* VSDX */
77 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
78 "<name>" N_("VSDX Input") "</name>\n"
79 "<id>org.inkscape.input.vsdx</id>\n"
80 "<input>\n"
81 "<extension>.vsdx</extension>\n"
82 "<mimetype>application/vnd.visio</mimetype>\n"
83 "<filetypename>" N_("Microsoft Visio 2013 drawing (*.vsdx)") "</filetypename>\n"
84 "<filetypetooltip>" N_("File format used by Microsoft Visio 2013 and later") "</filetypetooltip>\n"
85 "</input>\n"
86 "</inkscape-extension>", std::make_unique<VsdInput>());
87 // clang-format on
88}
89
90} // namespace Inkscape::Extension::Internal
91
92/*
93 Local Variables:
94 mode:c++
95 c-file-style:"stroustrup"
96 c-file-offsets:((innamespace . 0)(inline-open . 0))
97 indent-tabs-mode:nil
98 fill-column:99
99 End:
100*/
101// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
std::unique_ptr< SPDocument > open(Inkscape::Extension::Input *mod, char const *uri, bool is_importing) override
Open a file.
Definition vsd-input.cpp:29
A way to clear the N_ macro, which is defined as an inline function.
std::unique_ptr< SPDocument > rvng_open(char const *uri, bool(*is_supported)(RVNGInputStream *), bool(*parse)(RVNGInputStream *, RVNGDrawingInterface *))
void build_from_mem(gchar const *buffer, std::unique_ptr< Implementation::Implementation > in_imp)
Create a module from a buffer holding an XML description.
Definition system.cpp:459
Common import dialog for .cdr and .vss files.
This code abstracts the libwpg interfaces into the Inkscape input extension interface.