[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source chart2/uiconfig

2014-07-24 Thread Katarina Behrens
 chart2/source/controller/dialogs/dlg_ChartType.cxx|2 -
 chart2/source/controller/dialogs/tp_ChartType.cxx |7 ++--
 chart2/source/controller/dialogs/tp_ChartType.hxx |2 -
 chart2/source/controller/dialogs/tp_PointGeometry.cxx |2 -
 chart2/uiconfig/ui/tp_ChartType.ui|   27 +-
 5 files changed, 21 insertions(+), 19 deletions(-)

New commits:
commit 935a11d018d440318affab5b67feac625d181b66
Author: Katarina Behrens bu...@bubli.org
Date:   Sun Jul 20 19:44:37 2014 +0200

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 caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx 
b/chart2/source/controller/dialogs/dlg_ChartType.cxx
index 49620c7..4acb338 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::ReferenceXChartDocument::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 0e313b6..00defcf 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 4d3229a..81557a4 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 voidinitializePage() SAL_OVERRIDE;
diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx 
b/chart2/source/controller/dialogs/tp_PointGeometry.cxx
index 68a20d9..779eedb 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 cc4452b..18cbdc1 100644
--- a/chart2/uiconfig/ui/tp_ChartType.ui
+++ b/chart2/uiconfig/ui/tp_ChartType.ui
@@ -47,7 +47,7 @@
 property name=spacing6/property
 child
   object class=GtkLabel id=FT_CAPTION_FOR_WIZARD
-property name=visibleTrue/property
+property 

[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source chart2/uiconfig

2014-07-14 Thread Markus Mohrhard
 chart2/source/controller/dialogs/DialogModel.cxx   |4 ++
 chart2/source/controller/dialogs/tp_DataSource.cxx |   29 -
 chart2/source/controller/dialogs/tp_DataSource.hxx |2 -
 chart2/uiconfig/ui/tp_DataSource.ui|   24 +
 4 files changed, 6 insertions(+), 53 deletions(-)

New commits:
commit 2bd5cb9f62450916267ad4c6d50ebff2d824e7c0
Author: Markus Mohrhard markus.mohrh...@collabora.co.uk
Date:   Sun Jun 22 04:12:04 2014 +0200

show the property mapping sequences by default

Change-Id: I32417ed53e491a66f700e77ae0fff2154fa5441c
Reviewed-on: https://gerrit.libreoffice.org/10073
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/chart2/source/controller/dialogs/DialogModel.cxx 
b/chart2/source/controller/dialogs/DialogModel.cxx
index 4cab7d9..e18c7d3 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -502,6 +502,10 @@ DialogModel::tRolesWithRanges 
DialogModel::getRolesWithRanges(
 // add missing optional roles
 aRoles = xChartType-getSupportedOptionalRoles();
 addMissingRoles(aResult, aRoles);
+
+// add missing property roles
+aRoles = xChartType-getSupportedPropertyRoles();
+addMissingRoles(aResult, aRoles);
 }
 }
 catch( const uno::Exception  ex )
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx 
b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 8a83c5b..99903a2 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -28,7 +28,6 @@
 #include tp_DataSourceControls.hxx
 #include ControllerLockGuard.hxx
 #include DataSourceHelper.hxx
-#include dlg_PropertyMapping.hxx
 #include com/sun/star/sheet/XRangeSelection.hpp
 #include com/sun/star/table/XCellRange.hpp
 #include com/sun/star/chart2/XChartType.hpp
@@ -217,7 +216,6 @@ DataSourceTabPage::DataSourceTabPage(
 get(m_pFT_DATALABELS  ,FT_DATALABELS);
 get(m_pEDT_CATEGORIES ,EDT_CATEGORIES);
 get(m_pIMB_RANGE_CAT  ,IMB_RANGE_CAT);
-get(m_pBtn_AddMapping ,BTN_ADD_MAPPING);
 
 m_pFT_CAPTION-Show(!bHideDescription);
 
@@ -247,9 +245,6 @@ DataSourceTabPage::DataSourceTabPage(
 m_pEDT_RANGE-SetStyle( m_pEDT_RANGE-GetStyle() | WB_FORCECTRLBACKGROUND 
);
 m_pEDT_CATEGORIES-SetStyle( m_pEDT_CATEGORIES-GetStyle() | 
WB_FORCECTRLBACKGROUND );
 
-// mapped properties
-m_pBtn_AddMapping-SetClickHdl( LINK( this, DataSourceTabPage, 
AddMappingHdl ));
-
 // set symbol font for arrows
 // note: StarSymbol is substituted to OpenSymbol for OOo
 Font aSymbolFont( m_pBTN_UP-GetFont());
@@ -469,12 +464,6 @@ void DataSourceTabPage::fillRoleListBox()
 }
 
 m_pLB_ROLE-SetUpdateMode( true );
-
-if(pSeriesEntry-m_xChartType
--getSupportedPropertyRoles().getLength() == 0)
-m_pBtn_AddMapping-Disable();
-else
-m_pBtn_AddMapping-Enable();
 }
 }
 
@@ -764,24 +753,6 @@ IMPL_LINK( DataSourceTabPage, RangeUpdateDataHdl, Edit*, 
pEdit )
 return 0;
 }
 
-IMPL_LINK_NOARG( DataSourceTabPage, AddMappingHdl )
-{
-SeriesEntry * pSeriesEntry = dynamic_cast SeriesEntry * ( 
m_pLB_SERIES-FirstSelected());
-if(!pSeriesEntry)
-return 0;
-
-PropertyMappingDlg aDlg(this, pSeriesEntry-m_xChartType);
-short aRet = aDlg.Execute();
-if(aRet == RET_OK)
-{
-OUString aNewMappingName = 
DialogModel::ConvertRoleFromUIToInternal(aDlg.getSelectedEntry());
-if(!aNewMappingName.isEmpty())
-m_pLB_ROLE-InsertEntry( lcl_GetRoleLBEntry( aNewMappingName, 
OUString()));
-}
-
-return 0;
-}
-
 void DataSourceTabPage::listeningFinished(
 const OUString  rNewRange )
 {
diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx 
b/chart2/source/controller/dialogs/tp_DataSource.hxx
index b89d4d4..496333e 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.hxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.hxx
@@ -82,7 +82,6 @@ protected:
 DECL_LINK( RangeUpdateDataHdl, Edit* );
 DECL_LINK( UpButtonClickedHdl, void* );
 DECL_LINK( DownButtonClickedHdl, void* );
-DECL_LINK( AddMappingHdl, void* );
 
 //  RangeSelectionListenerParent 
 virtual void listeningFinished( const OUString  rNewRange ) SAL_OVERRIDE;
@@ -137,7 +136,6 @@ private:
 FixedText* m_pFT_DATALABELS;//used for xy charts
 Edit*  m_pEDT_CATEGORIES;
 PushButton*m_pIMB_RANGE_CAT;
-PushButton*m_pBtn_AddMapping;
 
 OUString   m_aFixedTextRange;
 
diff --git a/chart2/uiconfig/ui/tp_DataSource.ui 
b/chart2/uiconfig/ui/tp_DataSource.ui
index a067a6f..f7bed1d 100644
--- a/chart2/uiconfig/ui/tp_DataSource.ui
+++ b/chart2/uiconfig/ui/tp_DataSource.ui
@@ -1,6 +1,7 @@
 ?xml version=1.0 encoding=UTF-8?
+!--