summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Behrens <bubli@bubli.org>2014-07-20 19:44:37 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-07-24 12:32:21 +0000
commit935a11d018d440318affab5b67feac625d181b66 (patch)
tree682e952672698ab07a48c8debe8e21e1decc1a98
parent3012156bab9dc0504a61fa7062f8e7cbd677bad4 (diff)
fdo#81547: prevent crash by reading relevant .ui file
instead of no longer existing resource. Additionally, tweak widget visibility so that only relevant widgets are shown in Data series properties -> Layout tab. This is achieved by setting initial status of most of the widgets in .ui file to hidden, as *ResourceGroup::showControls() methods will take care of showing them when appropriate Change-Id: Iacbc689fb410b30515e433bcf4a96c087047ca73 Reviewed-on: https://gerrit.libreoffice.org/10496 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--chart2/source/controller/dialogs/dlg_ChartType.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx7
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.hxx2
-rw-r--r--chart2/source/controller/dialogs/tp_PointGeometry.cxx2
-rw-r--r--chart2/uiconfig/ui/tp_ChartType.ui27
5 files changed, 21 insertions, 19 deletions
diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx
index 49620c783c9d..4acb3382866e 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx
@@ -47,7 +47,7 @@ ChartTypeDialog::ChartTypeDialog( Window* pParent
uno::Reference<XChartDocument>::query(m_xChartModel),
m_xCC,
true/*live update*/,
- true/*hide title description*/);
+ false/*don't show title description*/);
m_pChartTypeTabPage->initializePage();
m_pChartTypeTabPage->Show();
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 0e313b6916f8..00defcfeeec0 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -678,7 +678,7 @@ IMPL_LINK_NOARG(GeometryResourceGroup, GeometryChangeHdl)
ChartTypeTabPage::ChartTypeTabPage(Window* pParent
, const uno::Reference< XChartDocument >& xChartModel
, const uno::Reference< uno::XComponentContext >& xContext
- , bool bDoLiveUpdate, bool bHideDescription)
+ , bool bDoLiveUpdate, bool bShowDescription)
: OWizardPage(pParent, "tp_ChartType",
"modules/schart/ui/tp_ChartType.ui")
, m_pDim3DLookResourceGroup( new Dim3DLookResourceGroup(this) )
@@ -702,9 +702,9 @@ ChartTypeTabPage::ChartTypeTabPage(Window* pParent
m_pSubTypeList->set_width_request(aSize.Width());
m_pSubTypeList->set_height_request(aSize.Height());
- if( bHideDescription )
+ if( bShowDescription )
{
- m_pFT_ChooseType->Hide();
+ m_pFT_ChooseType->Show();
}
else
{
@@ -914,6 +914,7 @@ void ChartTypeTabPage::selectMainType()
void ChartTypeTabPage::showAllControls( ChartTypeDialogController& rTypeController )
{
+ m_pMainTypeList->Show();
m_pSubTypeList->Show();
bool bShow = rTypeController.shouldShow_3DLookControl();
diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx
index 4d3229a94096..81557a421db8 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.hxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.hxx
@@ -53,7 +53,7 @@ public:
::com::sun::star::chart2::XChartDocument >& xChartModel
, const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& xContext
- , bool bDoLiveUpdate, bool bHideDescription = false );
+ , bool bDoLiveUpdate, bool bShowDescription = true );
virtual ~ChartTypeTabPage();
virtual void initializePage() SAL_OVERRIDE;
diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx
index 68a20d907367..779eedb51f87 100644
--- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx
@@ -31,7 +31,7 @@ namespace chart
{
SchLayoutTabPage::SchLayoutTabPage(Window* pWindow,const SfxItemSet& rInAttrs)
- : SfxTabPage(pWindow, SchResId(TP_LAYOUT), rInAttrs)
+ : SfxTabPage(pWindow, "tp_ChartType", "modules/schart/ui/tp_ChartType.ui", rInAttrs)
, m_pGeometryResources(0)
{
m_pGeometryResources = new BarGeometryResources( this );
diff --git a/chart2/uiconfig/ui/tp_ChartType.ui b/chart2/uiconfig/ui/tp_ChartType.ui
index cc4452ba6f0a..18cbdc11af43 100644
--- a/chart2/uiconfig/ui/tp_ChartType.ui
+++ b/chart2/uiconfig/ui/tp_ChartType.ui
@@ -47,7 +47,7 @@
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="FT_CAPTION_FOR_WIZARD">
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Choose a chart type</property>
@@ -76,7 +76,7 @@
<property name="row_spacing">6</property>
<child>
<object class="svtlo-ValueSet" id="subtype:border">
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
</object>
@@ -100,7 +100,7 @@
<child>
<object class="GtkCheckButton" id="3dlook">
<property name="label" translatable="yes">_3D Look</property>
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
@@ -119,7 +119,7 @@
</child>
<child>
<object class="GtkComboBoxText" id="3dscheme">
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">False</property>
<items>
<item translatable="yes">Simple</item>
@@ -193,7 +193,7 @@
<child>
<object class="GtkCheckButton" id="stack">
<property name="label" translatable="yes">_Stack series</property>
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
@@ -220,7 +220,7 @@
<child>
<object class="GtkRadioButton" id="ontop">
<property name="label" translatable="yes">On top</property>
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
@@ -239,7 +239,7 @@
<child>
<object class="GtkRadioButton" id="percent">
<property name="label" translatable="yes">Percent</property>
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
@@ -257,7 +257,7 @@
<child>
<object class="GtkRadioButton" id="deep">
<property name="label" translatable="yes">Deep</property>
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
@@ -289,7 +289,7 @@
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="linetypeft">
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Line type</property>
@@ -306,7 +306,7 @@
</child>
<child>
<object class="GtkComboBoxText" id="linetype">
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">False</property>
<items>
<item translatable="yes">Straight</item>
@@ -324,7 +324,7 @@
<child>
<object class="GtkButton" id="properties">
<property name="label" translatable="yes">Properties...</property>
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
@@ -347,7 +347,7 @@
<child>
<object class="GtkCheckButton" id="sort">
<property name="label" translatable="yes">_Sort by X values</property>
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
@@ -419,6 +419,7 @@
<child>
<object class="GtkCheckButton" id="rounded-edge">
<property name="label" translatable="yes">Rounded edge</property>
+ <property name="visible">False</property>
<property name="can_focus">True</property>
<property name="no_show_all">True</property>
</object>
@@ -447,7 +448,7 @@
</child>
<child>
<object class="GtkTreeView" id="charttype:border">
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">True</property>
<property name="vexpand">True</property>
<child internal-child="selection">