From koffice-devel Mon Apr 24 14:34:10 2006 From: Boris =?iso-8859-15?q?Du=A8ek?= Date: Mon, 24 Apr 2006 14:34:10 +0000 To: koffice-devel Subject: Re: [PATCH] kspread - csv export filter - allow "None" quote Message-Id: <200604241634.11144.borisdusek () cmail ! cz> X-MARC-Message: https://marc.info/?l=koffice-devel&m=114588941029528 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_jHOTE4pYqWbrjPa" --Boundary-00=_jHOTE4pYqWbrjPa Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Sorry, forgot one small thing in constructor, here is the corrected patch. Regards, Boris Dusek On Monday 24 April 2006 16:15, you wrote: > Hi, > > attached patch (to be applied from top-level koffice dir against latest > svn) adds an option to csv export filter in kspread to not quote cells. I > also moved the "None" option to be the default, since I think that is what > most people want, but you can revert it of course. > > Regards, > Boris Dusek > > P.S. If you reply, please add me to CC, I am not on the list --Boundary-00=_jHOTE4pYqWbrjPa Content-Type: text/x-diff; charset="iso-8859-15"; name="koffice-svn-branches-3.5-kspread-filter-csv-none-quote-add.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="koffice-svn-branches-3.5-kspread-filter-csv-none-quote-add.patch" Index: filters/kspread/csv/csvexport.cc =================================================================== --- filters/kspread/csv/csvexport.cc (revision 533315) +++ filters/kspread/csv/csvexport.cc (working copy) @@ -89,7 +89,7 @@ text = cell->strOutText(); } - if ( !text.isEmpty() ) + if ( !text.isEmpty() && !textQuote.isNull() ) { if ( text.find( textQuote ) != -1 ) { Index: filters/kspread/csv/csvexportdialog.cpp =================================================================== --- filters/kspread/csv/csvexportdialog.cpp (revision 533315) +++ filters/kspread/csv/csvexportdialog.cpp (working copy) @@ -51,7 +51,7 @@ : KDialogBase( parent, 0, true, QString::null, Ok | Cancel, No, true ), m_dialog( new ExportDialogUI( this ) ), m_delimiter( "," ), - m_textquote('"') + m_textquote() { kapp->restoreOverrideCursor(); @@ -212,7 +212,10 @@ void CSVExportDialog::textquoteSelected( const QString & mark ) { - m_textquote = mark[0]; + if (mark == i18n ("None")) + m_textquote = QChar (); + else + m_textquote = mark[0]; } void CSVExportDialog::selectionOnlyChanged( bool on ) Index: filters/kspread/csv/exportdialogui.ui =================================================================== --- filters/kspread/csv/exportdialogui.ui (revision 533315) +++ filters/kspread/csv/exportdialogui.ui (working copy) @@ -1,4 +1,4 @@ - + ExportDialogUI @@ -12,6 +12,9 @@ 496 + + ExportDialogUI + unnamed @@ -434,6 +437,11 @@ + None + + + + " @@ -502,6 +510,8 @@ + + kcombobox.h --Boundary-00=_jHOTE4pYqWbrjPa Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel --Boundary-00=_jHOTE4pYqWbrjPa--