sc/UIConfig_scalc.mk | 1 sc/source/ui/dbgui/pvfundlg.cxx | 29 ++---- sc/source/ui/dbgui/pvfundlg.src | 48 ----------- sc/source/ui/inc/pvfundlg.hxx | 7 - sc/uiconfig/scalc/ui/showdetaildialog.ui | 132 +++++++++++++++++++++++++++++++ 5 files changed, 148 insertions(+), 69 deletions(-)
New commits: commit 0db94ccc3ffd243af6d3a626a8a211ff106b7d48 Author: Palenik Mihály <palenik.mih...@gmail.com> Date: Mon Aug 4 20:06:46 2014 +0200 Convert RID_SCDLG_DPSHOWDETAIL to .ui Change-Id: If515e8f554f36e4ba203474d08d5ebe9caa023fa Reviewed-on: https://gerrit.libreoffice.org/10739 Reviewed-by: David Tardon <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index 1de1c02..423dd8f 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -153,6 +153,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/sharedfooterdialog \ sc/uiconfig/scalc/ui/sharedheaderdialog \ sc/uiconfig/scalc/ui/showchangesdialog \ + sc/uiconfig/scalc/ui/showdetaildialog \ sc/uiconfig/scalc/ui/showsheetdialog \ sc/uiconfig/scalc/ui/sidebaralignment \ sc/uiconfig/scalc/ui/sidebarnumberformat \ diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index 7aca31e..8813613 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -34,7 +34,7 @@ #include "scresid.hxx" #include "dpobject.hxx" #include "dpsave.hxx" -#include "pvfundlg.hrc" +#include "sc.hrc" #include "globstr.hrc" #include "dputil.hxx" @@ -758,16 +758,11 @@ IMPL_LINK( ScDPSubtotalOptDlg, SelectHdl, ListBox*, pLBox ) } ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient ) : - ModalDialog ( pParent, ScResId( RID_SCDLG_DPSHOWDETAIL ) ), - maFtDims ( this, ScResId( FT_DIMS ) ), - maLbDims ( this, ScResId( LB_DIMS ) ), - maBtnOk ( this, ScResId( BTN_OK ) ), - maBtnCancel ( this, ScResId( BTN_CANCEL ) ), - maBtnHelp ( this, ScResId( BTN_HELP ) ), - + ModalDialog ( pParent, "ShowDetail", "modules/scalc/ui/showdetaildialog.ui" ), mrDPObj(rDPObj) { - FreeResource(); + get(mpLbDims, "dimsTreeview"); + get(mpBtnOk, "ok"); ScDPSaveData* pSaveData = rDPObj.GetSaveData(); long nDimCount = rDPObj.GetDimCount(); @@ -787,27 +782,27 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, sal_u if (pLayoutName) aName = *pLayoutName; } - maLbDims.InsertEntry( aName ); + mpLbDims->InsertEntry( aName ); maNameIndexMap.insert(DimNameIndexMap::value_type(aName, nDim)); } } } - if( maLbDims.GetEntryCount() ) - maLbDims.SelectEntryPos( 0 ); + if( mpLbDims->GetEntryCount() ) + mpLbDims->SelectEntryPos( 0 ); - maLbDims.SetDoubleClickHdl( LINK( this, ScDPShowDetailDlg, DblClickHdl ) ); + mpLbDims->SetDoubleClickHdl( LINK( this, ScDPShowDetailDlg, DblClickHdl ) ); } short ScDPShowDetailDlg::Execute() { - return maLbDims.GetEntryCount() ? ModalDialog::Execute() : static_cast<short>(RET_CANCEL); + return mpLbDims->GetEntryCount() ? ModalDialog::Execute() : static_cast<short>(RET_CANCEL); } OUString ScDPShowDetailDlg::GetDimensionName() const { // Look up the internal dimension name which may be different from the // displayed field name. - OUString aSelectedName = maLbDims.GetSelectEntry(); + OUString aSelectedName = mpLbDims->GetSelectEntry(); DimNameIndexMap::const_iterator itr = maNameIndexMap.find(aSelectedName); if (itr == maNameIndexMap.end()) // This should never happen! @@ -820,8 +815,8 @@ OUString ScDPShowDetailDlg::GetDimensionName() const IMPL_LINK( ScDPShowDetailDlg, DblClickHdl, ListBox*, pLBox ) { - if( pLBox == &maLbDims ) - maBtnOk.Click(); + if( pLBox == mpLbDims ) + mpBtnOk->Click(); return 0; } diff --git a/sc/source/ui/dbgui/pvfundlg.src b/sc/source/ui/dbgui/pvfundlg.src index 14a42ae..fe33cf8 100644 --- a/sc/source/ui/dbgui/pvfundlg.src +++ b/sc/source/ui/dbgui/pvfundlg.src @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "pvfundlg.hrc" +#include "sc.hrc" StringArray SCSTR_DPFUNCLISTBOX { @@ -37,50 +37,4 @@ StringArray SCSTR_DPFUNCLISTBOX }; }; -ModalDialog RID_SCDLG_DPSHOWDETAIL -{ - OutputSize = TRUE; - HelpId = HID_SC_DPSHOWDETAIL; - SVLook = TRUE; - Size = MAP_APPFONT( 200, 116 ); - Moveable = TRUE; - Closeable = FALSE; - FixedText FT_DIMS - { - Pos = MAP_APPFONT( 6, 3 ); - Size = MAP_APPFONT( 132, 24 ); - WordBreak = TRUE; - Text [ en-US ] = "~Choose the field containing the detail you want to show"; - }; - ListBox LB_DIMS - { - HelpID = "sc:ListBox:RID_SCDLG_DPSHOWDETAIL:LB_DIMS"; - Pos = MAP_APPFONT( 6, 30 ); - Size = MAP_APPFONT( 132, 80 ); - TabStop = TRUE; - Border = TRUE; - DropDown = FALSE; - }; - OKButton BTN_OK - { - Pos = MAP_APPFONT( 144, 6 ); - Size = MAP_APPFONT( 50, 14 ); - TabStop = TRUE; - DefButton = TRUE; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT( 144, 23 ); - Size = MAP_APPFONT( 50, 14 ); - TabStop = TRUE; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT( 144, 43 ); - Size = MAP_APPFONT( 50, 14 ); - TabStop = TRUE; - }; - Text [ en-US ] = "Show Detail"; -}; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx index 0681870..986c9e0 100644 --- a/sc/source/ui/inc/pvfundlg.hxx +++ b/sc/source/ui/inc/pvfundlg.hxx @@ -202,11 +202,8 @@ private: DECL_LINK( DblClickHdl, ListBox* ); private: - FixedText maFtDims; - ListBox maLbDims; - OKButton maBtnOk; - CancelButton maBtnCancel; - HelpButton maBtnHelp; + ListBox* mpLbDims; + OKButton* mpBtnOk; typedef ::boost::unordered_map<OUString, long, OUStringHash> DimNameIndexMap; DimNameIndexMap maNameIndexMap; diff --git a/sc/uiconfig/scalc/ui/showdetaildialog.ui b/sc/uiconfig/scalc/ui/showdetaildialog.ui new file mode 100644 index 0000000..a4e7e43 --- /dev/null +++ b/sc/uiconfig/scalc/ui/showdetaildialog.ui @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="ShowDetail"> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Show Detail</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="hexpand">True</property> + <property name="vexpand">True</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="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_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_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_stock">True</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="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Choose the field containing the detail you want to show</property> + <property name="use_underline">True</property> + <property name="wrap">True</property> + <property name="mnemonic_widget">dimsTreeview</property> + <property name="max_width_chars">50</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkTreeView" id="dimsTreeview"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="treeview-selection1"/> + </child> + </object> + <packing> + <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> + </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>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits