diff options
-rw-r--r-- | sc/UI_scalc.mk | 1 | ||||
-rw-r--r-- | sc/inc/helpids.h | 1 | ||||
-rw-r--r-- | sc/inc/sc.hrc | 6 | ||||
-rw-r--r-- | sc/inc/scabstdlg.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 21 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/inc/lbseldlg.hxx | 17 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/lbseldlg.cxx | 44 | ||||
-rw-r--r-- | sc/source/ui/src/miscdlgs.src | 49 | ||||
-rw-r--r-- | sc/source/ui/src/scstring.src | 10 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh2.cxx | 6 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/selectrange.ui | 75 |
12 files changed, 64 insertions, 178 deletions
diff --git a/sc/UI_scalc.mk b/sc/UI_scalc.mk index 9b8f7a4f2aa5..60850afe35cb 100644 --- a/sc/UI_scalc.mk +++ b/sc/UI_scalc.mk @@ -17,6 +17,7 @@ $(eval $(call gb_UI_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/insertsheet \ sc/uiconfig/scalc/ui/printeroptions \ sc/uiconfig/scalc/ui/sheetprintpage \ + sc/uiconfig/scalc/ui/selectrange \ sc/uiconfig/scalc/ui/sortcriteriapage \ sc/uiconfig/scalc/ui/sortkey \ sc/uiconfig/scalc/ui/sortoptionspage \ diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h index 96be5124c1cc..6f210c8327bf 100644 --- a/sc/inc/helpids.h +++ b/sc/inc/helpids.h @@ -95,7 +95,6 @@ #define HID_SC_NAVIGATOR "SC_HID_SC_NAVIGATOR" -#define HID_SC_SELENTRY_LIST "SC_HID_SC_SELENTRY_LIST" #define HID_SC_GROUP_COLS "SC_HID_SC_GROUP_COLS" #define HID_SC_GROUP_ROWS "SC_HID_SC_GROUP_ROWS" diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 08365fad5a6a..0b460be51964 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -716,8 +716,8 @@ #define SCSTR_MODIFY (STR_START + 19) #define SCSTR_SHOWTABLE (STR_START + 20) #define SCSTR_HIDDENTABLES (STR_START + 21) -#define SCSTR_SELECTDB (STR_START + 22) -#define SCSTR_AREAS (STR_START + 23) + + #define SCSTR_TABLE (STR_START + 24) #define SCSTR_NAME (STR_START + 25) #define SCSTR_INSTABLE (STR_START + 26) @@ -1035,7 +1035,7 @@ #define RID_SCDLG_ROW_OPT (SC_DIALOGS_START + 107) // derivations from RID_SCDLG_SELENTRY -#define RID_SCDLG_SELECTDB (SC_DIALOGS_START + 108) + #define RID_SCDLG_SHOW_TAB (SC_DIALOGS_START + 109) // derivations from RID_SCDLG_GROUP diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 50f3aa08f344..14de680f3354 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -395,11 +395,7 @@ public: SCTAB nTabCount, bool bFromFile) = 0; virtual AbstractScSelEntryDlg * CreateScSelEntryDlg ( Window* pParent, // add for ScSelEntryDlg - sal_uInt16 nResId, - const String& aTitle, - const String& aLbTitle, - const std::vector<String> &rEntryList, - int nId ) = 0; + const std::vector<String> &rEntryList ) = 0; virtual AbstractScLinkedAreaDlg * CreateScLinkedAreaDlg ( Window* pParent, int nId) = 0; //add for ScLinkedAreaDlg virtual AbstractScMetricInputDlg * CreateScMetricInputDlg ( Window* pParent, //add for ScMetricInputDlg diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 0c4304075392..9ca906acd12a 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -1000,25 +1000,10 @@ AbstractScInsertTableDlg * ScAbstractDialogFactory_Impl::CreateScInsertTableDlg( // add for ScSelEntryDlg begin AbstractScSelEntryDlg * ScAbstractDialogFactory_Impl::CreateScSelEntryDlg ( Window* pParent, - sal_uInt16 nResId, - const String& aTitle, - const String& aLbTitle, - const std::vector<String> &rEntryList, - int nId ) + const std::vector<String> &rEntryList ) { - ScSelEntryDlg * pDlg=NULL; - switch ( nId ) - { - case RID_SCDLG_SELECTDB : - pDlg = new ScSelEntryDlg( pParent, nResId,aTitle, aLbTitle, rEntryList ); - break; - default: - break; - } - - if ( pDlg ) - return new AbstractScSelEntryDlg_Impl( pDlg ); - return 0; + ScSelEntryDlg * pDlg = new ScSelEntryDlg( pParent, rEntryList ); + return new AbstractScSelEntryDlg_Impl( pDlg ); } // add for ScSelEntryDlg end diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 55d11513b44e..65298a374202 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -462,11 +462,7 @@ public: SCTAB nTabCount, bool bFromFile); virtual AbstractScSelEntryDlg * CreateScSelEntryDlg ( Window* pParent, // add for ScSelEntryDlg - sal_uInt16 nResId, - const String& aTitle, - const String& aLbTitle, - const std::vector<String> &rEntryList, - int nId ); + const std::vector<String> &rEntryList ); virtual AbstractScLinkedAreaDlg * CreateScLinkedAreaDlg ( Window* pParent, //add for ScLinkedAreaDlg int nId); diff --git a/sc/source/ui/inc/lbseldlg.hxx b/sc/source/ui/inc/lbseldlg.hxx index f244c8d645b2..6d749ae1febc 100644 --- a/sc/source/ui/inc/lbseldlg.hxx +++ b/sc/source/ui/inc/lbseldlg.hxx @@ -34,23 +34,14 @@ class ScSelEntryDlg : public ModalDialog { private: - FixedLine aFlLbTitle; - ListBox aLb; - OKButton aBtnOk; - CancelButton aBtnCancel; - HelpButton aBtnHelp; + ListBox* m_pLb; DECL_LINK( DblClkHdl, void * ); public: - ScSelEntryDlg( Window* pParent, - sal_uInt16 nResId, - const String& aTitle, - const String& aLbTitle, - const std::vector<String> &rEntryList ); - ~ScSelEntryDlg(); - - String GetSelectEntry() const; + ScSelEntryDlg(Window* pParent, const std::vector<String> &rEntryList); + + OUString GetSelectEntry() const; }; diff --git a/sc/source/ui/miscdlgs/lbseldlg.cxx b/sc/source/ui/miscdlgs/lbseldlg.cxx index 5d22ce9c32cf..1708b2d44db4 100644 --- a/sc/source/ui/miscdlgs/lbseldlg.cxx +++ b/sc/source/ui/miscdlgs/lbseldlg.cxx @@ -30,43 +30,29 @@ #include "scresid.hxx" #include "miscdlgs.hrc" - //================================================================== -ScSelEntryDlg::ScSelEntryDlg( Window* pParent, - sal_uInt16 nResId, - const String& aTitle, - const String& aLbTitle, - const std::vector<String> &rEntryList ) : - ModalDialog ( pParent, ScResId( nResId ) ), - // - aFlLbTitle ( this, ScResId( FL_ENTRYLIST ) ), - aLb ( this, ScResId( LB_ENTRYLIST ) ), - aBtnOk ( this, ScResId( BTN_OK ) ), - aBtnCancel ( this, ScResId( BTN_CANCEL ) ), - aBtnHelp ( this, ScResId( BTN_HELP ) ) +ScSelEntryDlg::ScSelEntryDlg(Window* pParent, const std::vector<String> &rEntryList) + : ModalDialog(pParent, "SelectRangeDialog", "modules/scalc/ui/selectrange.ui") { - SetText( aTitle ); - aFlLbTitle.SetText( aLbTitle ); - aLb.Clear(); - aLb.SetDoubleClickHdl( LINK( this, ScSelEntryDlg, DblClkHdl ) ); + get(m_pLb, "treeview"); + m_pLb->SetDropDownLineCount(8); + m_pLb->set_width_request(m_pLb->approximate_char_width() * 32); + m_pLb->SetDoubleClickHdl( LINK( this, ScSelEntryDlg, DblClkHdl ) ); std::vector<String>::const_iterator pIter; for ( pIter = rEntryList.begin(); pIter != rEntryList.end(); ++pIter ) - aLb.InsertEntry(*pIter); - - if ( aLb.GetEntryCount() > 0 ) - aLb.SelectEntryPos( 0 ); + m_pLb->InsertEntry(*pIter); - //------------- - FreeResource(); + if ( m_pLb->GetEntryCount() > 0 ) + m_pLb->SelectEntryPos( 0 ); } //------------------------------------------------------------------------ -String ScSelEntryDlg::GetSelectEntry() const +OUString ScSelEntryDlg::GetSelectEntry() const { - return aLb.GetSelectEntry(); + return m_pLb->GetSelectEntry(); } //------------------------------------------------------------------------ @@ -78,12 +64,4 @@ IMPL_LINK_NOARG_INLINE_START(ScSelEntryDlg, DblClkHdl) } IMPL_LINK_NOARG_INLINE_END(ScSelEntryDlg, DblClkHdl) -//------------------------------------------------------------------------ - -ScSelEntryDlg::~ScSelEntryDlg() -{ -} - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src index 665baf620225..e3ab40603e44 100644 --- a/sc/source/ui/src/miscdlgs.src +++ b/sc/source/ui/src/miscdlgs.src @@ -911,55 +911,6 @@ ModalDialog RID_SCDLG_ROW_OPT }; }; - - // RID_SCDLG_SELENTRY als Basis fuer RID_SCDLG_SELECTDB und RID_SCDLG_SHOW_TAB - // gibt es nicht mehr, weil die beiden jetzt unterschiedlich sind - -ModalDialog RID_SCDLG_SELECTDB -{ - HelpId = CMD_SID_SELECT_DB ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 168 , 100 ) ; - Text [ en-US ] = "Select" ; - Moveable = TRUE ; - Closeable = FALSE ; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 112 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 112 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 112 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - ListBox LB_ENTRYLIST - { - // HelpID aus Zeiten, als noch abgeleitet wurde - HelpId = HID_SC_SELENTRY_LIST ; - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 91 , 80 ) ; - TabStop = TRUE ; - Sort = TRUE ; - }; - FixedLine FL_ENTRYLIST - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; - }; -}; - ModalDialog RID_SCDLG_SHOW_TAB { HelpId = CMD_FID_TABLE_SHOW ; diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src index 23ee913d1500..c15288d9cf78 100644 --- a/sc/source/ui/src/scstring.src +++ b/sc/source/ui/src/scstring.src @@ -245,16 +245,6 @@ String SCSTR_HIDDENTABLES Text [ en-US ] = "Hidden Sheets" ; }; -String SCSTR_SELECTDB -{ - Text [ en-US ] = "Select Database Range" ; -}; - -String SCSTR_AREAS -{ - Text [ en-US ] = "Ranges" ; -}; - String SCSTR_TABLE { Text [ en-US ] = "Sheet" ; diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 45c94903bfb7..4cbd4254f898 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -716,11 +716,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); AbstractScSelEntryDlg* pDlg = pFact->CreateScSelEntryDlg( pTabViewShell->GetDialogParent(), - RID_SCDLG_SELECTDB, - String(ScResId(SCSTR_SELECTDB)), - String(ScResId(SCSTR_AREAS)), - aList, - RID_SCDLG_SELECTDB); + aList ); OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { diff --git a/sc/uiconfig/scalc/ui/selectrange.ui b/sc/uiconfig/scalc/ui/selectrange.ui index 6f46771c0a83..2a4a7d99c7bd 100644 --- a/sc/uiconfig/scalc/ui/selectrange.ui +++ b/sc/uiconfig/scalc/ui/selectrange.ui @@ -3,26 +3,26 @@ <!-- interface-requires gtk+ 3.0 --> <object class="GtkDialog" id="SelectRangeDialog"> <property name="can_focus">False</property> - <property name="border_width">5</property> + <property name="border_width">6</property> <property name="title" translatable="yes">Select Database Range</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="SelectRange"> <property name="can_focus">False</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> <property name="orientation">vertical</property> <property name="layout_style">start</property> <child> - <object class="GtkButton" id="ok1"> + <object class="GtkButton" id="ok"> <property name="label">gtk-ok</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> @@ -32,12 +32,11 @@ </packing> </child> <child> - <object class="GtkButton" id="cancel1"> + <object class="GtkButton" id="cancel"> <property name="label">gtk-cancel</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> @@ -47,12 +46,11 @@ </packing> </child> <child> - <object class="GtkButton" id="help1"> + <object class="GtkButton" id="help"> <property name="label">gtk-help</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> @@ -70,46 +68,51 @@ </packing> </child> <child> - <object class="GtkBox" id="box1"> + <object class="GtkFrame" id="frame1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="orientation">vertical</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="GtkLabel" id="selectRange"> + <object class="GtkAlignment" id="alignment1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Ranges</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkScrolledWindow" id="scrolledwindow1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="shadow_type">in</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> <child> - <object class="GtkTreeView" id="treeview1"> + <object class="GtkScrolledWindow" id="scrolledwindow1"> <property name="visible">True</property> <property name="can_focus">True</property> - <child internal-child="selection"> - <object class="GtkTreeSelection" id="treeview-selection1"/> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkTreeView" id="treeview"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> </child> </object> </child> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> + </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">Ranges</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> </child> </object> <packing> - <property name="expand">False</property> + <property name="expand">True</property> <property name="fill">True</property> <property name="position">1</property> </packing> @@ -117,9 +120,9 @@ </object> </child> <action-widgets> - <action-widget response="0">ok1</action-widget> - <action-widget response="0">cancel1</action-widget> - <action-widget response="0">help1</action-widget> + <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> |