Version: (using KDE KDE 3.5.3) Start new document, save-as, do not enter any filename, just click on save.
Following the steps given above I get a dialog which says "Please specify the filename to save to." which sounds reasonable. Could this be a bug in the polish translation?
My mistake, sort of, choose the uncompressed XML OASIS format and then do not enter any filename.
Ah, now I see. :-) The same happens with kspread. So I'm moving this bug to product koffice. Bug 56834 seems related. Confirming with KOffice 1.5.2.
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;
You need to log in before you can comment on or make changes to this bug.