[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    [Calligra] 664cfaa Fix: converting from SVG to ODG using koconverter
From:       Cyrille Berger <cberger () cberger ! net>
Date:       2010-12-11 19:02:53
Message-ID: 20101211190254.01DC3A60B3 () git ! kde ! org
[Download RAW message or body]

commit 664cfaa967730d5dc0e6aa0043f95abd331856b0
branch master
Author: Cyrille Berger <cberger@cberger.net>
Date:   Sat Dec 11 19:59:44 2010 +0100

    Fix: converting from SVG to ODG using koconverter
    
    Details: when no mimetype is specified, saveNativeFormat save using the 1.x file \
format, setOutputMimeType ensure the mimetype selected by the user is used  
    Please review for inclusion in branch/koffice/2.3
    
    CCMAIL: koffice-devel@kde.org

diff --git a/libs/main/KoDocument.cpp b/libs/main/KoDocument.cpp
index dc524ab..634db01 100644
--- a/libs/main/KoDocument.cpp
+++ b/libs/main/KoDocument.cpp
@@ -854,6 +854,7 @@ bool KoDocument::saveNativeFormat(const QString & file)
     // OLD: bool oasis = d->specialOutputFlag == SaveAsOASIS;
     // OLD: QCString mimeType = oasis ? nativeOasisMimeType() : \
nativeFormatMimeType();  QByteArray mimeType = d->outputMimeType;
+    kDebug(30003) << "KoDocument::savingTo mimeType=" << mimeType;
     QByteArray nativeOasisMime = nativeOasisMimeType();
     bool oasis = !mimeType.isEmpty() && (mimeType == nativeOasisMime || mimeType == \
nativeOasisMime + "-template" || \
mimeType.startsWith("application/vnd.oasis.opendocument"));  
diff --git a/libs/main/KoFilterChain.cpp b/libs/main/KoFilterChain.cpp
index 5c21c39..f091a54 100644
--- a/libs/main/KoFilterChain.cpp
+++ b/libs/main/KoFilterChain.cpp
@@ -345,7 +345,8 @@ void KoFilterChain::finalizeIO()
     // Note: m_*input*Document as we already called manageIO()
     if (m_inputDocument &&
             static_cast<KoFilterManager::Direction>(filterManagerDirection()) == \
                KoFilterManager::Export) {
-        kDebug(30500) << "Saving the output document to the export file";
+        kDebug(30500) << "Saving the output document to the export file " << \
m_chainLinks.current()->to(); +        \
m_inputDocument->setOutputMimeType(m_chainLinks.current()->to());  \
m_inputDocument->saveNativeFormat(filterManagerExportFile());  m_inputFile = \
filterManagerExportFile();  }
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic