[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: [PATCH] kspread - csv export filter - allow "None" quote
From: Boris =?iso-8859-15?q?Du=A8ek?= <borisdusek () cmail ! cz>
Date: 2006-04-24 14:34:10
Message-ID: 200604241634.11144.borisdusek () cmail ! cz
[Download RAW message or body]
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
["koffice-svn-branches-3.5-kspread-filter-csv-none-quote-add.patch" (text/x-diff)]
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 @@
-<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ExportDialogUI</class>
<widget class="QWidget">
<property name="name">
@@ -12,6 +12,9 @@
<height>496</height>
</rect>
</property>
+ <property name="caption">
+ <string>ExportDialogUI</string>
+ </property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
@@ -434,6 +437,11 @@
<widget class="QComboBox" row="1" column="1">
<item>
<property name="text">
+ <string>None</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
<string>"</string>
</property>
</item>
@@ -502,6 +510,8 @@
</widget>
</grid>
</widget>
+<customwidgets>
+</customwidgets>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic