[ooo-build-commit] .: patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Jan 25 12:38:46 PST 2010


 patches/dev300/apply                          |    1 
 patches/dev300/cws-koheicsvimport-sc-fix.diff |   99 ++++++++++++++++++++++++++
 2 files changed, 100 insertions(+)

New commits:
commit 554ba97976241452abddab0e3825327990d1597f
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Jan 25 15:39:27 2010 -0500

    The CSV dialog parameters should be stored only when OK is pressed.
    
    * patches/dev300/apply:
    * patches/dev300/cws-koheicsvimport-sc-fix.diff: this fixes i#108645,
      a bug reported during testing of koheicsvimport cws.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index d7bce5d..efb4896 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -186,6 +186,7 @@ cws-koheidatapilot03-xmloff.diff,        kohei
 cws-koheicsvimport-filter.diff,    kohei
 cws-koheicsvimport-officecfg.diff, kohei
 cws-koheicsvimport-sc.diff,        kohei
+cws-koheicsvimport-sc-fix.diff, i#108645, kohei
 
 # kohei03 cws
 cws-kohei03-chart2.diff, kohei
diff --git a/patches/dev300/cws-koheicsvimport-sc-fix.diff b/patches/dev300/cws-koheicsvimport-sc-fix.diff
new file mode 100644
index 0000000..09659e1
--- /dev/null
+++ b/patches/dev300/cws-koheicsvimport-sc-fix.diff
@@ -0,0 +1,99 @@
+diff --git sc/inc/scabstdlg.hxx sc/inc/scabstdlg.hxx
+index 97f6513..5506af1 100644
+--- sc/inc/scabstdlg.hxx
++++ sc/inc/scabstdlg.hxx
+@@ -68,6 +68,7 @@ class AbstractScImportAsciiDlg : public VclAbstractDialog  //add for ScImportAsc
+ public:
+     virtual void                        GetOptions( ScAsciiOptions& rOpt ) = 0;
+     virtual void                        SetTextToColumnsMode() = 0;
++    virtual void                        SaveParameters() = 0;
+ };
+ 
+ 
+diff --git sc/source/ui/attrdlg/scdlgfact.cxx sc/source/ui/attrdlg/scdlgfact.cxx
+index 53f52ab..801b2ca 100644
+--- sc/source/ui/attrdlg/scdlgfact.cxx
++++ sc/source/ui/attrdlg/scdlgfact.cxx
+@@ -242,6 +242,11 @@ void AbstractScImportAsciiDlg_Impl::SetTextToColumnsMode()
+     pDlg->SetTextToColumnsMode();
+ }
+ 
++void AbstractScImportAsciiDlg_Impl::SaveParameters()
++{
++    pDlg->SaveParameters();
++}
++
+ // AbstractScImportAsciiDlg_Impl end
+ 
+ //AbstractScAutoFormatDlg_Impl begin
+diff --git sc/source/ui/attrdlg/scdlgfact.hxx sc/source/ui/attrdlg/scdlgfact.hxx
+index 68245f2..117f478 100644
+--- sc/source/ui/attrdlg/scdlgfact.hxx
++++ sc/source/ui/attrdlg/scdlgfact.hxx
+@@ -122,6 +122,7 @@ class AbstractScImportAsciiDlg_Impl : public AbstractScImportAsciiDlg  //add for
+     DECL_ABSTDLG_BASE(AbstractScImportAsciiDlg_Impl, ScImportAsciiDlg)
+     virtual void                        GetOptions( ScAsciiOptions& rOpt );
+     virtual void                        SetTextToColumnsMode();
++    virtual void                        SaveParameters();
+ };
+ 
+ class AbstractScAutoFormatDlg_Impl : public AbstractScAutoFormatDlg  //add for ScAutoFormatDlg
+diff --git sc/source/ui/dbgui/scuiasciiopt.cxx sc/source/ui/dbgui/scuiasciiopt.cxx
+index e18b420..8c075ab 100644
+--- sc/source/ui/dbgui/scuiasciiopt.cxx
++++ sc/source/ui/dbgui/scuiasciiopt.cxx
+@@ -422,11 +422,6 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName,
+ 
+ ScImportAsciiDlg::~ScImportAsciiDlg()
+ {
+-    if (mbFileImport)
+-        save_Separators( maFieldSeparators, aCbTextSep.GetText(), aCkbAsOnce.IsChecked(), 
+-                         aCkbQuotedAsText.IsChecked(), aCkbDetectNumber.IsChecked(), 
+-                         aRbFixed.IsChecked(), aNfRow.GetValue(), aLbCharSet.GetSelectEntryPos(),
+-                         static_cast<sal_Int32>(aLbCustomLang.GetSelectLanguage()) );
+     delete[] mpRowPosArray;
+ }
+ 
+@@ -540,6 +535,18 @@ void ScImportAsciiDlg::SetTextToColumnsMode()
+     aCkbDetectNumber.Disable();
+ }
+ 
++void ScImportAsciiDlg::SaveParameters()
++{
++    if (!mbFileImport)
++        // We save parameters only for file import.
++        return;
++
++    save_Separators( maFieldSeparators, aCbTextSep.GetText(), aCkbAsOnce.IsChecked(), 
++                     aCkbQuotedAsText.IsChecked(), aCkbDetectNumber.IsChecked(), 
++                     aRbFixed.IsChecked(), aNfRow.GetValue(), aLbCharSet.GetSelectEntryPos(),
++                     static_cast<sal_Int32>(aLbCustomLang.GetSelectLanguage()) );
++}
++
+ void ScImportAsciiDlg::SetSelectedCharSet()
+ {
+     meCharSet = aLbCharSet.GetSelectTextEncoding();
+diff --git sc/source/ui/inc/scuiasciiopt.hxx sc/source/ui/inc/scuiasciiopt.hxx
+index 4515a86..be01df5 100644
+--- sc/source/ui/inc/scuiasciiopt.hxx
++++ sc/source/ui/inc/scuiasciiopt.hxx
+@@ -107,6 +107,7 @@ public:
+ 
+     void                        GetOptions( ScAsciiOptions& rOpt );
+     void                        SetTextToColumnsMode();
++    void                        SaveParameters();
+ 
+ private:
+     /** Sets the selected char set data to meCharSet and mbCharSetSystem. */
+diff --git sc/source/ui/unoobj/filtuno.cxx sc/source/ui/unoobj/filtuno.cxx
+index 02d2f9d..54066a3 100644
+--- sc/source/ui/unoobj/filtuno.cxx
++++ sc/source/ui/unoobj/filtuno.cxx
+@@ -179,6 +179,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException)
+         {
+             ScAsciiOptions aOptions;
+             pDlg->GetOptions( aOptions );
++            pDlg->SaveParameters();
+             aFilterOptions = aOptions.WriteToString();
+             nRet = ui::dialogs::ExecutableDialogResults::OK;
+         }


More information about the ooo-build-commit mailing list