[prev in list] [next in list] [prev in thread] [next in thread]
List: calligra-devel
Subject: Can "bool KoStore::open(const QString & _name)" take a path?
From: "Friedrich W. H. Kossebau" <kossebau () kde ! org>
Date: 2012-02-14 23:23:57
Message-ID: 3130157.n36Tn2ngat () klux ! site
[Download RAW message or body]
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
Friedrich
["thumbnailPathTypos.patch" (thumbnailPathTypos.patch)]
diff --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
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic