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

List:       koffice
Subject:    [Bug 130980] Saving-as Uncompressed OASIS XML files without giving a
From:       David Faure <faure () kde ! org>
Date:       2007-01-19 17:15:27
Message-ID: 20070119171527.6055.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=130980         
faure kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From faure kde org  2007-01-19 18:15 -------
SVN commit 625258 by dfaure:

Revert KoDirectoryStore change, and do url adjustment (when saving as uncompressed) \
                in komainwindow instead, to avoid the "already exists" dialog
BUG: 130980


 M  +14 -0     kofficecore/KoMainWindow.cpp  
 M  +3 -13     store/KoDirectoryStore.cpp  


--- branches/koffice/1.6/koffice/lib/kofficecore/KoMainWindow.cpp #625257:625258
 @ -32,6 +32,7  @
 #include "kkbdaccessextensions.h"
 #include "KoSpeaker.h"
 
+#include <kaboutdata.h>
 #include <kprinter.h>
 #include <kdeversion.h>
 #include <kstdaction.h>
 @ -836,6 +837,14  @
                 break;
             }
 
+            // adjust URL before doing checks on whether the file exists.
+            if ( specialOutputFlag == KoDocument::SaveAsDirectoryStore ) {
+                QString fileName = newURL.fileName();
+                if ( fileName != "content.xml"  ) {
+                    newURL.addPath( "content.xml" );
+                }
+            }
+
             // this file exists and we are not just clicking "Save As" to change \
filter options  // => ask for confirmation
             if ( KIO::NetAccess::exists( newURL, false /*will write*/, this ) && \
!justChangingFilterOptions )  @ -1200,6 +1209,11  @
 
     if ( title.isEmpty() )
         title = fileName;
+    if ( title.isEmpty() ) {
+        // #139905 - breaks message freeze though
+        //const QString programName = instance()->aboutData() ? \
instance()->aboutData()->programName() : instance()->instanceName(); +        //title \
= i18n("%1 unsaved document \
(%2)").arg(programName).arg(KGlobal::locale()->formatDate(QDate::currentDate(), \
true/*short*/)); +    }
     printer.setDocName( title );
     printer.setDocFileName( fileName );
     printer.setDocDirectory( rootView()->koDocument()->url().directory() );
--- branches/koffice/1.6/koffice/lib/store/KoDirectoryStore.cpp #625257:625258
 @ -28,19 +28,9  @
     : m_basePath( path )
 {
     const int pos = path.findRev( '/' );
-    bool stripFileName = false;
-    if (_mode == Read) { // the user clicked on foo/content.xml -> remove filename
-        stripFileName = true;
-    } else {
-        const QString fileName = path.mid(pos+1);
-        stripFileName = fileName == "content.xml";
-    }
-
-    if (stripFileName) {
-        // The parameter must include "maindoc.xml" or "content.xml"
-        if ( pos != -1 && pos != (int)m_basePath.length()-1 )
-            m_basePath = m_basePath.left( pos );
-    }
+    // The parameter must include "maindoc.xml" or "content.xml"
+    if ( pos != -1 && pos != (int)m_basePath.length()-1 )
+        m_basePath = m_basePath.left( pos );
     if ( !m_basePath.endsWith("/") )
         m_basePath += '/';
     m_currentPath = m_basePath;
____________________________________
koffice mailing list
koffice@kde.org
To unsubscribe please visit:
https://mail.kde.org/mailman/listinfo/koffice


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

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