[Libreoffice-commits] core.git: 6 commits - extras/source sc/inc sc/source sc/uiconfig svx/inc svx/source vcl/source

Caolán McNamara caolanm at redhat.com
Sun Feb 24 15:18:28 PST 2013


 extras/source/glade/libreoffice-catalog.xml |    6 
 sc/inc/helpids.h                            |    1 
 sc/inc/sc.hrc                               |    3 
 sc/inc/scabstdlg.hxx                        |    2 
 sc/source/ui/attrdlg/scdlgfact.cxx          |   17 -
 sc/source/ui/attrdlg/scdlgfact.hxx          |    2 
 sc/source/ui/dbgui/asciiopt.hrc             |   31 -
 sc/source/ui/dbgui/csvcontrol.cxx           |    8 
 sc/source/ui/dbgui/csvtablebox.cxx          |    9 
 sc/source/ui/dbgui/scuiasciiopt.cxx         |    3 
 sc/source/ui/inc/csvcontrol.hxx             |    1 
 sc/source/ui/inc/csvtablebox.hxx            |    2 
 sc/source/ui/inc/scuiasciiopt.hxx           |    1 
 sc/source/ui/unoobj/filtuno.cxx             |    2 
 sc/source/ui/view/cellsh2.cxx               |    2 
 sc/source/ui/view/viewfun5.cxx              |    2 
 sc/uiconfig/scalc/ui/textimportcsv.ui       |  452 +++++++++++++++-------------
 svx/inc/svx/txencbox.hxx                    |    1 
 svx/source/dialog/txencbox.cxx              |   15 
 vcl/source/window/dialog.cxx                |   29 -
 20 files changed, 310 insertions(+), 279 deletions(-)

New commits:
commit 4c51313369c8f75674dbea0706a36a19824095f9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Feb 24 21:05:42 2013 +0000

    simplify CreateScImportAsciiDlg
    
    Change-Id: Ibcd9dc854cf15ef0a6cbaba3fdc9e377e1073507

diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index d3fc41a..9c17b88 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1010,9 +1010,6 @@
 #define RID_SCDLG_CHARTCOLROW           (SC_DIALOGS_START + 80)
 #define RID_SCDLG_AREAS                 (SC_DIALOGS_START + 81)
 
-// popup for statusbar controller
-#define RID_SCDLG_ASCII                 (SC_DIALOGS_START + 91)
-
 // popup for drop-mode in navigator
 #define RID_POPUP_DROPMODE              (SC_DIALOGS_START + 92)
 #define RID_DROPMODE_URL                (SC_DIALOGS_START + 93)
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 4113b64..9873658 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -325,7 +325,7 @@ public:
     SC_DLLPUBLIC static ScAbstractDialogFactory*    Create();
 
     virtual     AbstractScImportAsciiDlg * CreateScImportAsciiDlg( Window* pParent, String aDatName, //add for ScImportAsciiDlg
-                                                                    SvStream* pInStream, int nId,
+                                                                    SvStream* pInStream,
                                                                     ScImportAsciiCall eCall) = 0;
 
     virtual     AbstractScTextImportOptionsDlg * CreateScTextImportOptionsDlg(Window* pParent) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index dc62cde..52d9c58 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -647,21 +647,10 @@ bool AbstractScTextImportOptionsDlg_Impl::IsDateConversionSet() const
 
 
 AbstractScImportAsciiDlg * ScAbstractDialogFactory_Impl::CreateScImportAsciiDlg ( Window* pParent, String aDatName,
-                                                    SvStream* pInStream, int nId, ScImportAsciiCall eCall )
+                                                    SvStream* pInStream, ScImportAsciiCall eCall )
 {
-    ScImportAsciiDlg* pDlg=NULL;
-    switch ( nId )
-    {
-        case RID_SCDLG_ASCII :
-            pDlg = new ScImportAsciiDlg( pParent, aDatName,pInStream, eCall );
-            break;
-        default:
-            break;
-    }
-
-    if ( pDlg )
-        return new AbstractScImportAsciiDlg_Impl( pDlg );
-    return 0;
+    ScImportAsciiDlg* pDlg = new ScImportAsciiDlg( pParent, aDatName,pInStream, eCall );
+    return new AbstractScImportAsciiDlg_Impl( pDlg );
 }
 // ScImportAsciiDlg end
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 973a412..59390ed 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -391,7 +391,7 @@ public:
     virtual ~ScAbstractDialogFactory_Impl() {}
 
     virtual     AbstractScImportAsciiDlg * CreateScImportAsciiDlg( Window* pParent, String aDatName, //add for ScImportAsciiDlg
-                                                                    SvStream* pInStream, int nId,
+                                                                    SvStream* pInStream,
                                                                     ScImportAsciiCall eCall);
 
     virtual AbstractScTextImportOptionsDlg * CreateScTextImportOptionsDlg(Window* pParent);
diff --git a/sc/source/ui/dbgui/asciiopt.hrc b/sc/source/ui/dbgui/asciiopt.hrc
index 085b50c..ab36c60 100644
--- a/sc/source/ui/dbgui/asciiopt.hrc
+++ b/sc/source/ui/dbgui/asciiopt.hrc
@@ -20,33 +20,3 @@
 #define BTN_OK                      1
 #define BTN_CANCEL                  2
 #define BTN_HELP                    3
-
-#define FL_FIELDOPT                 4
-#define FT_CHARSET                  5
-#define LB_CHARSET                  6
-#define FT_CUSTOMLANG               7
-#define LB_CUSTOMLANG               8
-#define FT_AT_ROW                   9
-#define NF_AT_ROW                   10
-
-#define FL_SEPOPT                   11
-#define RB_FIXED                    12
-#define RB_SEPARATED                13
-#define CKB_TAB                     14
-#define CKB_COMMA                   15
-#define CKB_OTHER                   16
-#define ED_OTHER                    17
-#define CKB_SEMICOLON               18
-#define CKB_SPACE                   19
-#define CB_ASONCE                   20
-#define CB_TEXTSEP                  21
-#define FT_TEXTSEP                  22
-
-#define FL_OTHER_OPTIONS            23
-#define CB_QUOTED_AS_TEXT           24
-#define CB_DETECT_SPECIAL_NUMBER    25
-
-#define FL_WIDTH                    26
-#define FT_TYPE                     27
-#define LB_TYPE1                    28
-#define CTR_TABLEBOX                29
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index 282345c..c1c2f2d 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -207,7 +207,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException)
         if ( xInputStream.is() )
             pInStream = utl::UcbStreamHelper::CreateStream( xInputStream );
 
-        AbstractScImportAsciiDlg* pDlg = pFact->CreateScImportAsciiDlg( NULL, aPrivDatName, pInStream, RID_SCDLG_ASCII,SC_IMPORTFILE);
+        AbstractScImportAsciiDlg* pDlg = pFact->CreateScImportAsciiDlg( NULL, aPrivDatName, pInStream, SC_IMPORTFILE);
         OSL_ENSURE(pDlg, "Dialog create fail!");
         if ( pDlg->Execute() == RET_OK )
         {
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 1ab57f6..1db8483 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -930,7 +930,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
                     ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
                     OSL_ENSURE( pFact, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pFact is null!" );
                     AbstractScImportAsciiDlg *pDlg = pFact->CreateScImportAsciiDlg(
-                        NULL, String(), &aStream, RID_SCDLG_ASCII,SC_TEXTTOCOLUMNS);
+                        NULL, String(), &aStream, SC_TEXTTOCOLUMNS);
                     OSL_ENSURE( pDlg, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDlg is null!" );
 
                     if ( pDlg->Execute() == RET_OK )
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index cf2c7e5..7275009 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -331,7 +331,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId,
                         ScAbstractDialogFactory::Create();
                     AbstractScImportAsciiDlg *pDlg =
                         pFact->CreateScImportAsciiDlg( NULL, String(), &aStrm,
-                                RID_SCDLG_ASCII, SC_PASTETEXT);
+                                SC_PASTETEXT);
 
                     if (pDlg->Execute() == RET_OK)
                     {
commit 01416aea805f9e17d8d43d6555501774b19c110d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Feb 24 21:00:19 2013 +0000

    now easy to adjust csv dialog to fit on a netbook screen
    
    Change-Id: Id40bf959f160b03a2aa54dd078d66d6e9854863b

diff --git a/sc/uiconfig/scalc/ui/textimportcsv.ui b/sc/uiconfig/scalc/ui/textimportcsv.ui
index 262b614..5a2f1c8 100644
--- a/sc/uiconfig/scalc/ui/textimportcsv.ui
+++ b/sc/uiconfig/scalc/ui/textimportcsv.ui
@@ -1,15 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="lower">1</property>
+    <property name="upper">4294967295</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
   <object class="GtkDialog" id="TextImportCsvDialog">
     <property name="can_focus">False</property>
-    <property name="border_width">5</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Text Import</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <property name="spacing">2</property>
+        <property name="spacing">12</property>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="can_focus">False</property>
@@ -70,13 +79,14 @@
           <object class="GtkBox" id="box1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
             <property name="orientation">vertical</property>
+            <property name="spacing">12</property>
             <child>
               <object class="GtkFrame" id="frame1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="hexpand">True</property>
-                <property name="vexpand">True</property>
                 <property name="label_xalign">0</property>
                 <property name="shadow_type">none</property>
                 <child>
@@ -84,20 +94,21 @@
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="top_padding">6</property>
-                    <property name="bottom_padding">6</property>
                     <property name="left_padding">12</property>
                     <child>
                       <object class="GtkGrid" id="grid1">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="row_spacing">6</property>
+                        <property name="column_spacing">12</property>
                         <child>
-                          <object class="GtkAccelLabel" id="textcharset">
+                          <object class="GtkLabel" id="textcharset">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xpad">6</property>
+                            <property name="xalign">0</property>
                             <property name="label" translatable="yes">Ch_aracter set</property>
                             <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">charset</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -107,11 +118,13 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkAccelLabel" id="textlanguage">
+                          <object class="GtkLabel" id="textlanguage">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
                             <property name="label" translatable="yes">_Language</property>
                             <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">language</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -121,11 +134,13 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkAccelLabel" id="textfromrow">
+                          <object class="GtkLabel" id="textfromrow">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
                             <property name="label" translatable="yes">From ro_w</property>
                             <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">fromrow</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -135,7 +150,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkComboBox" id="charset">
+                          <object class="svxlo-SvxTextEncodingBox" id="charset">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                           </object>
@@ -147,7 +162,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkComboBox" id="language">
+                          <object class="svxcorelo-SvxLanguageBox" id="language">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                           </object>
@@ -162,7 +177,9 @@
                           <object class="GtkSpinButton" id="fromrow">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
+                            <property name="halign">start</property>
                             <property name="invisible_char">●</property>
+                            <property name="adjustment">adjustment1</property>
                           </object>
                           <packing>
                             <property name="left_attach">1</property>
@@ -197,227 +214,247 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="hexpand">True</property>
-                <property name="vexpand">True</property>
                 <property name="label_xalign">0</property>
                 <property name="shadow_type">none</property>
                 <child>
                   <object class="GtkAlignment" id="alignment2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
                     <property name="top_padding">6</property>
-                    <property name="bottom_padding">12</property>
                     <property name="left_padding">12</property>
                     <child>
                       <object class="GtkBox" id="box2">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
                         <property name="orientation">vertical</property>
+                        <property name="spacing">6</property>
                         <child>
-                          <object class="GtkRadioButton" id="tofixedwidth">
-                            <property name="label" translatable="yes">_Fixed width</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="use_underline">True</property>
-                            <property name="xalign">0</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">toseparatedby</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkRadioButton" id="toseparatedby">
-                            <property name="label" translatable="yes">_Separated by</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="use_underline">True</property>
-                            <property name="xalign">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">tofixedwidth</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkGrid" id="grid2">
+                          <object class="GtkBox" id="box6">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="margin_left">20</property>
-                            <child>
-                              <object class="GtkCheckButton" id="tab">
-                                <property name="label" translatable="yes">_Tab</property>
-                                <property name="use_action_appearance">False</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_action_appearance">False</property>
-                                <property name="use_underline">True</property>
-                                <property name="xalign">0</property>
-                                <property name="draw_indicator">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">0</property>
-                                <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkCheckButton" id="semicolon">
-                                <property name="label" translatable="yes">S_emicolon</property>
-                                <property name="use_action_appearance">False</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_action_appearance">False</property>
-                                <property name="use_underline">True</property>
-                                <property name="xalign">0</property>
-                                <property name="draw_indicator">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">0</property>
-                                <property name="top_attach">1</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkCheckButton" id="mergedelimiters">
-                                <property name="label" translatable="yes">Merge _delimiters</property>
-                                <property name="use_action_appearance">False</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_action_appearance">False</property>
-                                <property name="xalign">0</property>
-                                <property name="draw_indicator">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">0</property>
-                                <property name="top_attach">2</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
+                            <property name="hexpand">True</property>
+                            <property name="homogeneous">True</property>
                             <child>
-                              <object class="GtkCheckButton" id="comma">
-                                <property name="label" translatable="yes">_Comma</property>
-                                <property name="use_action_appearance">False</property>
+                              <object class="GtkRadioButton" id="tofixedwidth">
+                                <property name="label" translatable="yes">_Fixed width</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
-                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="xalign">0</property>
                                 <property name="draw_indicator">True</property>
+                                <property name="group">toseparatedby</property>
                               </object>
                               <packing>
-                                <property name="left_attach">1</property>
-                                <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkCheckButton" id="space">
-                                <property name="label" translatable="yes">S_pace</property>
-                                <property name="use_action_appearance">False</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_action_appearance">False</property>
-                                <property name="use_underline">True</property>
-                                <property name="xalign">0</property>
-                                <property name="draw_indicator">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="top_attach">1</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="other">
-                                <property name="label" translatable="yes">_Other</property>
-                                <property name="use_action_appearance">False</property>
+                              <object class="GtkRadioButton" id="toseparatedby">
+                                <property name="label" translatable="yes">_Separated by</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
-                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="xalign">0</property>
+                                <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
+                                <property name="group">tofixedwidth</property>
                               </object>
                               <packing>
-                                <property name="left_attach">2</property>
-                                <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkEntry" id="inputother">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="invisible_char">●</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">3</property>
-                                <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkComboBoxText" id="textdelimiter">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="entry_text_column">0</property>
-                                <property name="id_column">1</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">3</property>
-                                <property name="top_attach">2</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
                               </packing>
                             </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkAlignment" id="alignment5">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="hexpand">True</property>
+                            <property name="left_padding">12</property>
                             <child>
-                              <object class="GtkAccelLabel" id="texttextdelimiter">
+                              <object class="GtkGrid" id="grid2">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">Te_xt delimiter</property>
-                                <property name="use_underline">True</property>
+                                <property name="hexpand">True</property>
+                                <property name="row_spacing">6</property>
+                                <property name="column_spacing">12</property>
+                                <child>
+                                  <object class="GtkCheckButton" id="tab">
+                                    <property name="label" translatable="yes">_Tab</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="mergedelimiters">
+                                    <property name="label" translatable="yes">Merge _delimiters</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="halign">start</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="width">4</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="comma">
+                                    <property name="label" translatable="yes">_Comma</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="other">
+                                    <property name="label" translatable="yes">_Other</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">4</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkEntry" id="inputother">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="max_length">10</property>
+                                    <property name="invisible_char">●</property>
+                                    <property name="width_chars">3</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">5</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="texttextdelimiter">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Te_xt delimiter</property>
+                                    <property name="use_underline">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">4</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="width">1</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBoxText" id="textdelimiter">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="has_entry">True</property>
+                                    <property name="entry_text_column">0</property>
+                                    <property name="id_column">1</property>
+                                    <child internal-child="entry">
+                                      <object class="GtkEntry" id="comboboxtext-entry">
+                                        <property name="can_focus">False</property>
+                                        <property name="invisible_char">●</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">5</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="width">1</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="semicolon">
+                                    <property name="label" translatable="yes">S_emicolon</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">2</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="space">
+                                    <property name="label" translatable="yes">S_pace</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">3</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
                               </object>
-                              <packing>
-                                <property name="left_attach">2</property>
-                                <property name="top_attach">2</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <placeholder/>
-                            </child>
-                            <child>
-                              <placeholder/>
-                            </child>
-                            <child>
-                              <placeholder/>
                             </child>
                           </object>
                           <packing>
@@ -452,7 +489,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="hexpand">True</property>
-                <property name="vexpand">True</property>
                 <property name="label_xalign">0</property>
                 <property name="shadow_type">none</property>
                 <child>
@@ -460,21 +496,19 @@
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="top_padding">6</property>
-                    <property name="bottom_padding">12</property>
                     <property name="left_padding">12</property>
                     <child>
                       <object class="GtkBox" id="box3">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="orientation">vertical</property>
+                        <property name="spacing">6</property>
+                        <property name="homogeneous">True</property>
                         <child>
                           <object class="GtkCheckButton" id="quotedfieldastext">
                             <property name="label" translatable="yes">_Quoted field as text</property>
-                            <property name="use_action_appearance">False</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
-                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="xalign">0.0099999997764825821</property>
                             <property name="draw_indicator">True</property>
@@ -488,11 +522,9 @@
                         <child>
                           <object class="GtkCheckButton" id="detectspecialnumbers">
                             <property name="label" translatable="yes">Detect special _numbers</property>
-                            <property name="use_action_appearance">False</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
-                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="xalign">0</property>
                             <property name="draw_indicator">True</property>
@@ -537,23 +569,25 @@
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="top_padding">6</property>
-                    <property name="bottom_padding">12</property>
                     <property name="left_padding">12</property>
                     <child>
                       <object class="GtkBox" id="box4">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="orientation">vertical</property>
+                        <property name="spacing">6</property>
                         <child>
                           <object class="GtkBox" id="box5">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
+                            <property name="spacing">12</property>
                             <child>
-                              <object class="GtkAccelLabel" id="textcolumntype">
+                              <object class="GtkLabel" id="textcolumntype">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="label" translatable="yes">Column t_ype</property>
                                 <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">columntype</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -580,13 +614,11 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkScrolledWindow" id="scrolledwindowcolumntype">
+                          <object class="sclo-ScCsvTableBox" id="scrolledwindowcolumntype">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="shadow_type">in</property>
-                            <child>
-                              <placeholder/>
-                            </child>
+                            <property name="hexpand">True</property>
+                            <property name="vexpand">True</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -594,6 +626,18 @@
                             <property name="position">1</property>
                           </packing>
                         </child>
+                        <child>
+                          <object class="GtkLabel" id="textalttitle">
+                            <property name="can_focus">False</property>
+                            <property name="no_show_all">True</property>
+                            <property name="label" translatable="yes">Text to Columns</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
                       </object>
                     </child>
                   </object>
@@ -617,7 +661,7 @@
             </child>
           </object>
           <packing>
-            <property name="expand">False</property>
+            <property name="expand">True</property>
             <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
commit 980fe99410477f6a4bd0dc935c9e63fa0aad2b0e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Feb 24 18:44:33 2013 +0000

    be more forgiving on 768 height screens to allow dialogs occupy more height
    
    Change-Id: Ie9e53606d84fb1efd738709de64feecaabff9328

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index c1e58c0..8683ab6 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -633,25 +633,24 @@ long Dialog::Notify( NotifyEvent& rNEvt )
     return nRet;
 }
 
+//What we really want here is something that gives the available width and
+//height of a users screen, taking away the space taken up the OS
+//taskbar, menus, etc.
 Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize)
 {
     long w = rScreenSize.Width();
-    long h = rScreenSize.Height();
+    if (w <= 800)
+        w -= 15;
+    else if (w <= 1024)
+        w -= 65;
+    else
+        w -= 115;
 
-    // fill in holy default values brought to us by product management
-    if (rScreenSize.Width() >= 800)
-        w = 785;
-    if (rScreenSize.Width() >= 1024)
-        w = 920;
-    if (rScreenSize.Width() >= 1280)
-        w = 1050;
-
-    if (rScreenSize.Height() >= 600)
-        h = 550;
-    if (rScreenSize.Height() >= 768)
-        h = 630;
-    if (rScreenSize.Height() >= 1024)
-        h = 875;
+    long h = rScreenSize.Height();
+    if (h <= 768)
+        h -= 50;
+    else
+        h -= 100;
 
     return Size(w, h);
 }
commit 9c43037ccb281df6c0b143b850b1f48e22660e4a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Feb 24 00:04:21 2013 +0000

    suck alternative title out of the .ui
    
    Change-Id: I3983a61c5716679d8d64247d29c4909b16fc2c69

diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 984dea82..93e73d4 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -134,7 +134,6 @@
 #define HID_SC_DROPMODE_COPY                                    "SC_HID_SC_DROPMODE_COPY"
 
 #define HID_SC_FAP_STRUCT                                       "SC_HID_SC_FAP_STRUCT"
-#define HID_SC_ASCII_TABCTR                                     "SC_HID_SC_ASCII_TABCTR"
 
 #define HID_SC_SCENARIO_DELETE                                  "SC_HID_SC_SCENARIO_DELETE"
 #define HID_SC_SCENARIO_EDIT                                    "SC_HID_SC_SCENARIO_EDIT"
diff --git a/sc/source/ui/dbgui/asciiopt.hrc b/sc/source/ui/dbgui/asciiopt.hrc
index 814ccb9..085b50c 100644
--- a/sc/source/ui/dbgui/asciiopt.hrc
+++ b/sc/source/ui/dbgui/asciiopt.hrc
@@ -50,4 +50,3 @@
 #define FT_TYPE                     27
 #define LB_TYPE1                    28
 #define CTR_TABLEBOX                29
-#define STR_TEXTTOCOLUMNS           30
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index 261ecd4..94c8222 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "csvtablebox.hxx"
+#include <vcl/builder.hxx>
 #include <vcl/lstbox.hxx>
 
 // ause
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index c84229a..3c3a53a9 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -249,7 +249,6 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName,
         aColumnUser ( ScResId( SCSTR_COLUMN_USER ) ),
         aTextSepList( ScResId( SCSTR_TEXTSEP ) ),
         mcTextSep   ( ScAsciiOptions::cDefaultTextSep ),
-        maStrTextToColumns( ScResId( STR_TEXTTOCOLUMNS ) ),
         meCall(eCall)
 {
     get(pFtCharSet, "textcharset");
@@ -279,7 +278,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName,
     switch (meCall)
     {
         case SC_TEXTTOCOLUMNS:
-            SetText( maStrTextToColumns );
+            SetText( get<FixedText>("textalttitle")->GetText() );
             break;
         case SC_IMPORTFILE:
             aName.AppendAscii(RTL_CONSTASCII_STRINGPARAM(" - ["));
diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx
index 60db013..b017a56 100644
--- a/sc/source/ui/inc/scuiasciiopt.hxx
+++ b/sc/source/ui/inc/scuiasciiopt.hxx
@@ -75,7 +75,6 @@ class ScImportAsciiDlg : public ModalDialog
     String                      aTextSepList;
     String                      maFieldSeparators;  // selected field separators
     sal_Unicode                 mcTextSep;
-    String                      maStrTextToColumns;
 
     CharSet                     meCharSet;          /// Selected char set.
     bool                        mbCharSetSystem;    /// Is System char set selected?
commit ffea6fc98fe7137cafd88bc191c850caa9717862
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Feb 24 10:42:05 2013 +0000

    add more custom widgets to glade catalog
    
    Change-Id: I1158bf00bfb7e0eabe28e56c3e8430c6b2c68939

diff --git a/extras/source/glade/libreoffice-catalog.xml b/extras/source/glade/libreoffice-catalog.xml
index 93f4dc6..cd3b0fc 100644
--- a/extras/source/glade/libreoffice-catalog.xml
+++ b/extras/source/glade/libreoffice-catalog.xml
@@ -45,6 +45,9 @@
     <glade-widget-class title="Font ListBox" name="svtlo-FontStyleBox"
                         generic-name="FontStyleBox" parent="GtkComboBox"
                         icon-name="widget-gtk-combobox"/>
+    <glade-widget-class title="Text Encoding ListBox" name="svxlo-SvxTextEncodingBox"
+                        generic-name="TextEncodingBox" parent="GtkComboBox"
+                        icon-name="widget-gtk-combobox"/>
     <glade-widget-class title="Font Preview" name="svxlo-SvxFontPrevWindow"
                         generic-name="Font Preview Window" parent="GtkDrawingArea"
                         icon-name="widget-gtk-drawingarea"/>
@@ -54,6 +57,9 @@
     <glade-widget-class title="ValueSet" name="svtlo-ValueSet"
                         generic-name="Set of Value Options" parent="GtkDrawingArea"
                         icon-name="widget-gtk-drawingarea"/>
+    <glade-widget-class title="CsvTableBox" name="sclo-ScCsvTableBox"
+                        generic-name="CSV Table Box" parent="GtkDrawingArea"
+                        icon-name="widget-gtk-drawingarea"/>
     <glade-widget-class title="Table Container" name="svxcorelo-SvxSimpleTableContainer"
                         generic-name="Simple Table Container" parent="GtkTreeView"
                         icon-name="widget-gtk-treeview"/>
commit 3fd9e569d8a4c00020d5ac2db566e1ed7f920a6e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Feb 23 21:11:04 2013 +0000

    add requred custom widget entry points
    
    Change-Id: I611133eda82a5c2f303e5938d47deb3fb295f26e

diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index b452260..fd725d6 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -77,6 +77,14 @@ ScCsvControl::ScCsvControl( Window* pParent, const ScCsvLayoutData& rData, const
 {
 }
 
+ScCsvControl::ScCsvControl( Window* pParent, const ScCsvLayoutData& rData, WinBits nBits ) :
+    Control( pParent, nBits ),
+    mrData( rData ),
+    mpAccessible( NULL ),
+    mbValidGfx( false )
+{
+}
+
 ScCsvControl::~ScCsvControl()
 {
     if( mpAccessible )
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index 9b3738b..261ecd4 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -25,8 +25,8 @@
 
 // ============================================================================
 
-ScCsvTableBox::ScCsvTableBox( Window* pParent, const ResId& rResId ) :
-    ScCsvControl( pParent, maData, rResId ),
+ScCsvTableBox::ScCsvTableBox( Window* pParent, WinBits nBits ) :
+    ScCsvControl( pParent, maData, nBits ),
     maRuler( *this ),
     maGrid( *this ),
     maHScroll( this, WB_HORZ | WB_DRAG ),
@@ -56,6 +56,10 @@ ScCsvTableBox::ScCsvTableBox( Window* pParent, const ResId& rResId ) :
     InitControls();
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeScCsvTableBox(Window *pParent, VclBuilder::stringmap &)
+{
+    return new ScCsvTableBox(pParent, WB_BORDER);
+}
 
 Size ScCsvTableBox::GetOptimalSize() const
 {
diff --git a/sc/source/ui/inc/csvcontrol.hxx b/sc/source/ui/inc/csvcontrol.hxx
index 5b5eb29..afdfed5 100644
--- a/sc/source/ui/inc/csvcontrol.hxx
+++ b/sc/source/ui/inc/csvcontrol.hxx
@@ -268,6 +268,7 @@ private:
 public:
     explicit                    ScCsvControl( ScCsvControl& rParent );
     explicit                    ScCsvControl( Window* pParent, const ScCsvLayoutData& rData, const ResId& rResId );
+    explicit                    ScCsvControl( Window* pParent, const ScCsvLayoutData& rData, WinBits nBits );
     virtual                     ~ScCsvControl();
 
     // event handling ---------------------------------------------------------
diff --git a/sc/source/ui/inc/csvtablebox.hxx b/sc/source/ui/inc/csvtablebox.hxx
index fe4c080..4faff88 100644
--- a/sc/source/ui/inc/csvtablebox.hxx
+++ b/sc/source/ui/inc/csvtablebox.hxx
@@ -66,7 +66,7 @@ private:
 
     // ------------------------------------------------------------------------
 public:
-    explicit                    ScCsvTableBox( Window* pParent, const ResId& rResId );
+    explicit                    ScCsvTableBox( Window* pParent, WinBits nBits );
 
     /** Finishes initialization. Must be called after constructing a new object. */
     void Init();
diff --git a/svx/inc/svx/txencbox.hxx b/svx/inc/svx/txencbox.hxx
index 26efca3..b8b4701 100644
--- a/svx/inc/svx/txencbox.hxx
+++ b/svx/inc/svx/txencbox.hxx
@@ -34,6 +34,7 @@ private:
 
 public:
                         SvxTextEncodingBox( Window* pParent, const ResId& rResId );
+                        SvxTextEncodingBox( Window* pParent, WinBits nBits );
                         ~SvxTextEncodingBox();
 
     /** Fill with all known encodings but exclude those matching one or more
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index 2b37149..ef30407 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.cxx
@@ -24,6 +24,7 @@
 #ifndef DISABLE_DBCONNECTIVITY
 #include "svx/dbcharsethelper.hxx"
 #endif
+#include <vcl/builder.hxx>
 #include <vcl/svapp.hxx>
 #include <rtl/tencinfo.h>
 #include <rtl/locale.h>
@@ -41,6 +42,20 @@ SvxTextEncodingBox::SvxTextEncodingBox( Window* pParent, const ResId& rResId )
     m_pEncTable = new SvxTextEncodingTable;
 }
 
+SvxTextEncodingBox::SvxTextEncodingBox( Window* pParent, WinBits nBits )
+    : ListBox( pParent, nBits )
+{
+    m_pEncTable = new SvxTextEncodingTable;
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxTextEncodingBox(Window *pParent, VclBuilder::stringmap &)
+{
+    WinBits nWinBits = WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE;
+    SvxTextEncodingBox *pListBox = new SvxTextEncodingBox(pParent, nWinBits);
+    pListBox->EnableAutoSize(true);
+    return pListBox;
+}
+
 //------------------------------------------------------------------------
 
 SvxTextEncodingBox::~SvxTextEncodingBox()


More information about the Libreoffice-commits mailing list