Use LocalFileName class for file names inside a package.

This commit is contained in:
Twan van Laarhoven
2020-04-29 23:57:36 +02:00
parent f92c09e87a
commit a1d54f36fc
19 changed files with 143 additions and 93 deletions
+2 -14
View File
@@ -131,18 +131,6 @@ template <> void Writer::handle(const Vector2D& vec) {
handle(String::Format(_("(%.10lf,%.10lf)"), vec.x, vec.y));
}
template <> void Writer::handle(const FileName& value) {
if (clipboard_package() && !value.empty()) {
// use absolute names on clipboard
try {
handle(clipboard_package()->absoluteName(value));
} catch (const Error&) {
// ignore errors
}
} else {
handle(static_cast<const String&>(value));
if (writing_package()) {
writing_package()->referenceFile(value);
}
}
template <> void Writer::handle(const LocalFileName& value) {
handle(value.toStringForWriting());
}