[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/filters/kword/kword1.3/import
From: Nicolas Goutte <nicolasg () snafu ! de>
Date: 2004-08-01 15:44:14
Message-ID: 20040801154414.BAF329191 () office ! kde ! org
[Download RAW message or body]
CVS commit by goutte:
Use KMimetype::findByContent to find the mimetype, as we have already the
content of the file as QByteArray and as anyway the file extension is
without relevance (as it is always ".bin").
M +1 -2 TODO 1.54
M +8 -4 kword13oasisgenerator.cpp 1.49
--- koffice/filters/kword/kword1.3/import/TODO #1.53:1.54
@@ -1,6 +1,5 @@
- OASIS thumbnail needs alpha channel
- OASIS thumbnail seems to need some text property (according to freedesktop.org \
thumbnail spec.)
-- better mime type detected of picture by giving a correct extension to the \
temporary file
-- btter picture numbering (direct at load?) instead of using the pointer to the \
KTempFile +- better picture numbering (direct at load?) instead of using the pointer \
to the KTempFile
...
--- koffice/filters/kword/kword1.3/import/kword13oasisgenerator.cpp #1.48:1.49
@@ -833,5 +833,5 @@ void KWord13OasisGenerator::writePicture
const QString fileName( it.current()->m_tempFile->name() );
const QString oasisName( it.current()->getOasisPictureName() );
- kdDebug(30520) << "Copying... " << it.currentKey() << " => " << oasisName << \
endl; + kdDebug(30520) << "Copying... " << it.currentKey() << endl << " => " \
<< oasisName << endl; QFile file( fileName );
if ( !file.open( IO_ReadOnly ) )
@@ -855,6 +855,10 @@ void KWord13OasisGenerator::writePicture
if ( m_manifestWriter )
{
- // ### TODO: better mime type detection (probably need a correct \
extension for th etemporary file)
- const QString mimeType ( KMimeType::findByPath( fileName, 0, false \
)->name() ); + const QString mimeType ( KMimeType::findByContent( array, 0 \
)->name() ); + if ( mimeType == "application/octet-stream" )
+ {
+ kdWarning(30520) << "Generic mime type for " << it.currentKey() << \
endl; + // ### TODO: try harder to find a mime type
+ }
m_manifestWriter->addManifestEntry( oasisName, mimeType );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic