Version: 1.2.94 (using KDE KDE 3.1.4) Installed from: Debian testing/unstable Packages OS: Linux Received through the Debian BTS (#200313). Create a simple spreadsheet (just a handful of numbers, nothing complex) and try to export as a gnumeric worksheet. The following message appears on the console: Exporting GNUmeric koffice (filter manager): WARNING: You already asked for some different source. csvfilter: ERROR: Unable to open output file! A "could not save" messagebox appears and no export file is written. Thanks!
Happens here, too, KDE-3.2.3, Koffice-1.3.2. Here's a test case: http://bugs.kde.org/attachment.cgi?id=6912&action=view
Ummh, attachment #6913 [details] is better: http://bugs.kde.org/attachment.cgi?id=6913&action=edit
CVS commit by goutte: - Fix Gnumeric export filter (KDE Bug #66983, Debian BTS #200313) (For the output file, the input file name was asked but refused by the filter system, as the filter uses an import document.) - A XML file without encoding declaration is in UTF-8, so use UTF-8 instead of local encoding - As we produce now an UTF-8 document, declare it explicitely as UTF-8 (as it is the implicit KOffice policy.) Note: as I have not GNumeric installed, I cannot test the file format itself CCMAIL:66983-close@bugs.kde.org M +3 -3 gnumericexport.cc 1.16 --- koffice/filters/kspread/gnumeric/gnumericexport.cc #1.15:1.16 @@ -308,5 +308,5 @@ KoFilter::ConversionStatus GNUMERICExpor /* This could be Made into a function */ - gnumeric_doc.appendChild( gnumeric_doc.createProcessingInstruction( "xml", "version=\"1.0\"" ) ); + gnumeric_doc.appendChild( gnumeric_doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); QDomElement workbook = gnumeric_doc.createElement("gmr:Workbook"); @@ -589,8 +589,8 @@ Hidden="0"/> // Ok, now write to export file - QCString cstr(str.local8Bit()); // I assume people will prefer local8Bit over utf8... Another param ? + const QCString cstr(str.utf8()); gzFile gzfile; - gzfile = gzopen( QFile::encodeName(m_chain->inputFile()), "wb"); + gzfile = gzopen( QFile::encodeName(m_chain->outputFile()), "wb"); if (gzfile==NULL)
CVS commit by goutte: Sync with CVS HEAD (except instance name change): - fix writing (#66983) - generate UTF-8 - no qDebug() CCMAIL:66983@bugs.kde.org M +4 -4 gnumericexport.cc 1.14.2.1 --- koffice/filters/kspread/gnumeric/gnumericexport.cc #1.14:1.14.2.1 @@ -278,5 +278,5 @@ QDomElement GNUMERICExport::GetCellStyle KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const QCString& to ) { - qDebug("Exporting GNUmeric"); + kdDebug(30501) << "Exporting GNUmeric" << endl; QDomDocument gnumeric_doc=QDomDocument("gmr:Workbook"); @@ -308,5 +308,5 @@ KoFilter::ConversionStatus GNUMERICExpor /* This could be Made into a function */ - gnumeric_doc.appendChild( gnumeric_doc.createProcessingInstruction( "xml", "version=\"1.0\"" ) ); + gnumeric_doc.appendChild( gnumeric_doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); QDomElement workbook = gnumeric_doc.createElement("gmr:Workbook"); @@ -589,8 +589,8 @@ Hidden="0"/> // Ok, now write to export file - QCString cstr(str.local8Bit()); // I assume people will prefer local8Bit over utf8... Another param ? + const QCString cstr(str.utf8()); gzFile gzfile; - gzfile = gzopen( QFile::encodeName(m_chain->inputFile()), "wb"); + gzfile = gzopen( QFile::encodeName(m_chain->outputFile()), "wb"); if (gzfile==NULL)