Hi,
reading through OD* writing filters I see two variants to open a file at a
specifc path for writing. Do both result in the same?
Filterkpr2odf::convert(...) has:
//Save the preview picture
output->enterDirectory("Thumbnails");
output->open("thumbnail.png");
...
output->leaveDirectory();
Words13OasisGenerator::writePreviewFile() has:
m_store->open("Thumbnails/thumbnail.png");
And is the attached patch fixing typos in the path and file name in
Filterkpr2odf::convert(...) okay to commit? Have not tested it, missing a kpr
file, simply looks worthwhile to fix.
Cheers
Friedrichdiff --git a/filters/stage/kpr2odf/Filterkpr2odf.cpp b/filters/stage/kpr2odf/Filterkpr2odf.cpp
index 694f2ab..abc9e53 100644
--- a/filters/stage/kpr2odf/Filterkpr2odf.cpp
+++ b/filters/stage/kpr2odf/Filterkpr2odf.cpp
@@ -119,12 +119,12 @@ KoFilter::ConversionStatus Filterkpr2odf::convert(const QByteArray& from, const
KoXmlWriter* manifest = odfWriter.manifestWriter(KoXmlNS::presentation.toUtf8());
//Save the preview picture
output->enterDirectory("Thumbnails");
- output->open("thubnail.png");
+ output->open("thumbnail.png");
output->write(*preview);
output->close();
output->leaveDirectory();
- manifest->addManifestEntry("Thubnails/", "");
- manifest->addManifestEntry("Thubnails/thubnail.png", "");
+ manifest->addManifestEntry("Thumbnails/", "");
+ manifest->addManifestEntry("Thumbnails/thumbnail.png", "");
delete preview;
//Write the Pictures directory and its children, also fill the m_pictures hash
_______________________________________________
calligra-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/calligra-devel