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

List:       kde-commits
Subject:    koffice/libs/main
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2009-04-15 19:46:45
Message-ID: 1239824805.461004.5567.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 954456 by zachmann:

o Fix: set the correct mime type when selecting a predefined template.
  If the template is of type .otp the preselected file type was also otp
  but should be odp.



 M  +4 -1      KoDocument.cpp  


--- trunk/koffice/libs/main/KoDocument.cpp #954455:954456
@@ -2582,7 +2582,10 @@
     setModified(false);
 
     if (ok) {
-        setMimeTypeAfterLoading(KMimeType::findByUrl(url, 0, true)->name());
+        QString mimeType = KMimeType::findByUrl( url, 0, true )->name();
+        // in case this is a open document template remove the -template from the end
+        mimeType.remove( QRegExp( "(-template)$" ) );
+        setMimeTypeAfterLoading(mimeType);
         deleteOpenPane();
         resetURL();
         setEmpty();
[prev in list] [next in list] [prev in thread] [next in thread] 

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