diff options
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/dialogs/srchxtra.cxx | 31 | ||||
-rw-r--r-- | cui/source/dialogs/srchxtra.hrc | 9 | ||||
-rw-r--r-- | cui/source/dialogs/srchxtra.src | 108 | ||||
-rw-r--r-- | cui/source/inc/cuires.hrc | 3 | ||||
-rw-r--r-- | cui/source/inc/srchxtra.hxx | 24 | ||||
-rw-r--r-- | cui/uiconfig/ui/similaritysearchdialog.ui | 257 |
7 files changed, 276 insertions, 157 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 4e5296727673..9435977de9d1 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -104,6 +104,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/securityoptionsdialog \ cui/uiconfig/ui/select_persona_dialog \ cui/uiconfig/ui/shadowtabpage \ + cui/uiconfig/ui/similaritysearchdialog \ cui/uiconfig/ui/slantcornertabpage \ cui/uiconfig/ui/specialcharacters \ cui/uiconfig/ui/spellingdialog \ diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index 4a6f443e81dd..bbe94bc85f6d 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -248,28 +248,17 @@ SvxSearchSimilarityDialog::SvxSearchSimilarityDialog sal_uInt16 nShorter, sal_uInt16 nLonger ) : - ModalDialog( pParent, CUI_RES( RID_SVXDLG_SEARCHSIMILARITY ) ), - - aFixedLine ( this, CUI_RES( FL_SIMILARITY ) ), - aOtherTxt ( this, CUI_RES( FT_OTHER ) ), - aOtherFld ( this, CUI_RES( NF_OTHER ) ), - aLongerTxt ( this, CUI_RES( FT_LONGER ) ), - aLongerFld ( this, CUI_RES( NF_LONGER ) ), - aShorterTxt ( this, CUI_RES( FT_SHORTER ) ), - aShorterFld ( this, CUI_RES( NF_SHORTER ) ), - aRelaxBox ( this, CUI_RES( CB_RELAX ) ), - - aOKBtn ( this, CUI_RES( BTN_ATTR_OK ) ), - aEscBtn ( this, CUI_RES( BTN_ATTR_CANCEL ) ), - aHelpBtn ( this, CUI_RES( BTN_ATTR_HELP ) ) - + ModalDialog( pParent, "SimilaritySearchDialog", "cui/ui/similaritysearchdialog.ui" ) { - FreeResource(); - - aOtherFld.SetValue( nOther ); - aShorterFld.SetValue( nShorter ); - aLongerFld.SetValue( nLonger ); - aRelaxBox.Check( bRelax ); + get( m_pOtherFld, "otherfld"); + get( m_pLongerFld, "longerfld"); + get( m_pShorterFld, "shorterfld"); + get( m_pRelaxBox, "relaxbox"); + + m_pOtherFld->SetValue( nOther ); + m_pShorterFld->SetValue( nShorter ); + m_pLongerFld->SetValue( nLonger ); + m_pRelaxBox->Check( bRelax ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/srchxtra.hrc b/cui/source/dialogs/srchxtra.hrc index ced02f3b9ac7..6bfe114e7bac 100644 --- a/cui/source/dialogs/srchxtra.hrc +++ b/cui/source/dialogs/srchxtra.hrc @@ -27,15 +27,6 @@ #define LB_ATTR 13 #define FL_ATTR 14 -#define CB_RELAX 15 -#define FT_OTHER 16 -#define NF_OTHER 17 -#define FT_SHORTER 18 -#define NF_SHORTER 19 -#define FT_LONGER 20 -#define NF_LONGER 21 -#define FL_SIMILARITY 22 - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/srchxtra.src b/cui/source/dialogs/srchxtra.src index 9c10335f7ceb..ec032f7d3fda 100644 --- a/cui/source/dialogs/srchxtra.src +++ b/cui/source/dialogs/srchxtra.src @@ -123,114 +123,6 @@ ModalDialog RID_SVXDLG_SEARCHATTR Size = MAP_APPFONT ( 50 , 14 ) ; }; }; - // RID_SVXDLG_SEARCHSIMILARITY ------------------------------------------- -ModalDialog RID_SVXDLG_SEARCHSIMILARITY -{ - HelpId = HID_SEARCHSIMILARITY ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 178 , 76 ) ; - Text [ en-US ] = "Similarity Search" ; - Moveable = TRUE ; - FixedText FT_OTHER - { - Pos = MAP_APPFONT ( 12 , 16 ) ; - Size = MAP_APPFONT ( 70 , 8 ) ; - Text [ en-US ] = "~Exchange characters" ; - }; - NumericField NF_OTHER - { - HelpID = "cui:NumericField:RID_SVXDLG_SEARCHSIMILARITY:NF_OTHER"; - Pos = MAP_APPFONT ( 86 , 14 ) ; - Size = MAP_APPFONT ( 24 , 12 ) ; - Border = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 0 ; - First = 1 ; - Maximum = 30 ; - Last = 30 ; - Value = 1 ; - TabStop = TRUE ; - }; - FixedText FT_LONGER - { - Pos = MAP_APPFONT ( 12 , 30 ) ; - Size = MAP_APPFONT ( 70 , 8 ) ; - Text [ en-US ] = "~Add characters" ; - }; - NumericField NF_LONGER - { - HelpID = "cui:NumericField:RID_SVXDLG_SEARCHSIMILARITY:NF_LONGER"; - Pos = MAP_APPFONT ( 86 , 28 ) ; - Size = MAP_APPFONT ( 24 , 12 ) ; - Border = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 0 ; - First = 1 ; - Maximum = 30 ; - Last = 30 ; - Value = 1 ; - TabStop = TRUE ; - }; - FixedText FT_SHORTER - { - Pos = MAP_APPFONT ( 12 , 46 ) ; - Size = MAP_APPFONT ( 70 , 8 ) ; - Text [ en-US ] = "~Remove characters" ; - }; - NumericField NF_SHORTER - { - HelpID = "cui:NumericField:RID_SVXDLG_SEARCHSIMILARITY:NF_SHORTER"; - Pos = MAP_APPFONT ( 86 , 44 ) ; - Size = MAP_APPFONT ( 24 , 12 ) ; - Border = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 0 ; - First = 1 ; - Maximum = 30 ; - Last = 30 ; - Value = 1 ; - TabStop = TRUE ; - }; - CheckBox CB_RELAX - { - HelpID = "cui:CheckBox:RID_SVXDLG_SEARCHSIMILARITY:CB_RELAX"; - Pos = MAP_APPFONT ( 12 , 60 ) ; - Size = MAP_APPFONT ( 98 , 10 ) ; - Text [ en-US ] = "~Combine" ; - TabStop = TRUE ; - }; - FixedLine FL_SIMILARITY - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Settings" ; - }; - OKButton BTN_ATTR_OK - { - Pos = MAP_APPFONT ( 122 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - DefButton = TRUE ; - }; - CancelButton BTN_ATTR_CANCEL - { - Pos = MAP_APPFONT ( 122 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_ATTR_HELP - { - Pos = MAP_APPFONT ( 122 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; -}; // ********************************************************************** EOF /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index c7ef4780fd31..1a54c25d4326 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -283,9 +283,6 @@ // split cells #define RID_SVX_SPLITCELLDLG ( RID_SVX_START + 43 ) -// searching -#define RID_SVXDLG_SEARCHSIMILARITY (RID_SVX_START + 23) - // customize #define RID_SVXDLG_CUSTOMIZE (RID_SVX_START + 291) #define RID_SVXPAGE_MENUS (RID_SVX_START + 292) diff --git a/cui/source/inc/srchxtra.hxx b/cui/source/inc/srchxtra.hxx index 871dfdbe36a5..3b982ca954dd 100644 --- a/cui/source/inc/srchxtra.hxx +++ b/cui/source/inc/srchxtra.hxx @@ -67,18 +67,10 @@ private: class SvxSearchSimilarityDialog : public ModalDialog { private: - FixedLine aFixedLine; - FixedText aOtherTxt; - NumericField aOtherFld; - FixedText aLongerTxt; - NumericField aLongerFld; - FixedText aShorterTxt; - NumericField aShorterFld; - CheckBox aRelaxBox; - - OKButton aOKBtn; - CancelButton aEscBtn; - HelpButton aHelpBtn; + NumericField* m_pOtherFld; + NumericField* m_pLongerFld; + NumericField* m_pShorterFld; + CheckBox* m_pRelaxBox; public: SvxSearchSimilarityDialog( Window* pParent, @@ -87,10 +79,10 @@ public: sal_uInt16 nShorter, sal_uInt16 nLonger ); - sal_uInt16 GetOther() { return (sal_uInt16)aOtherFld.GetValue(); } - sal_uInt16 GetShorter() { return (sal_uInt16)aShorterFld.GetValue(); } - sal_uInt16 GetLonger() { return (sal_uInt16)aLongerFld.GetValue(); } - sal_Bool IsRelaxed() { return aRelaxBox.IsChecked(); } + sal_uInt16 GetOther() { return (sal_uInt16)m_pOtherFld->GetValue(); } + sal_uInt16 GetShorter() { return (sal_uInt16)m_pShorterFld->GetValue(); } + sal_uInt16 GetLonger() { return (sal_uInt16)m_pLongerFld->GetValue(); } + sal_Bool IsRelaxed() { return m_pRelaxBox->IsChecked(); } }; diff --git a/cui/uiconfig/ui/similaritysearchdialog.ui b/cui/uiconfig/ui/similaritysearchdialog.ui new file mode 100644 index 000000000000..e1e4a7dac1dc --- /dev/null +++ b/cui/uiconfig/ui/similaritysearchdialog.ui @@ -0,0 +1,257 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkAdjustment" id="adjustment1"> + <property name="upper">30</property> + <property name="value">1</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkDialog" id="SimilaritySearchDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Similarity Search</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="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area3"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="layout_style">start</property> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + <property name="image_position">top</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="Selection"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</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="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Exchange characters</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">otherfld</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="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Add characters</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">longerfld</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="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Remove characters</property> + <property name="use_underline">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> + <child> + <object class="GtkCheckButton" id="relaxbox"> + <property name="label" translatable="yes">_Combine</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">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="otherfld"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustment1</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="GtkSpinButton" id="longerfld"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustment1</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> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="shorterfld"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustment1</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Settings</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">ok</action-widget> + <action-widget response="0">cancel</action-widget> + <action-widget response="0">help</action-widget> + </action-widgets> + </object> +</interface> |