Kaydet (Commit) 0db94ccc authored tarafından Palenik Mihály's avatar Palenik Mihály Kaydeden (comit) David Tardon

Convert RID_SCDLG_DPSHOWDETAIL to .ui

Change-Id: If515e8f554f36e4ba203474d08d5ebe9caa023fa
Reviewed-on: https://gerrit.libreoffice.org/10739Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst 922b03f0
......@@ -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 \
......
......@@ -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;
}
......
......@@ -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: */
......@@ -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;
......
<?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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment