summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-02-03 11:38:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-02-04 09:21:00 +0000
commitf79bfd0ac541e98ee32e089cdf94a18989ff83eb (patch)
treebd6ed28268838d9dcdd9991923e585b2179ba750 /chart2
parentbe88126e80b1f6b9a3090ba4617d9a87dfb0a0bd (diff)
convert chart type dialog to .ui
Change-Id: I6da39b06629e3913048a48490f45863de24c4f15
Diffstat (limited to 'chart2')
-rw-r--r--chart2/AllLangResTarget_chartcontroller.mk1
-rw-r--r--chart2/UIConfig_chart2.mk1
-rw-r--r--chart2/source/controller/dialogs/ResourceIds.hrc1
-rw-r--r--chart2/source/controller/dialogs/dlg_ChartType.cxx21
-rw-r--r--chart2/source/controller/dialogs/dlg_ChartType.src50
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.src1
-rw-r--r--chart2/source/controller/inc/HelpIds.hrc1
-rw-r--r--chart2/source/controller/inc/dlg_ChartType.hxx5
-rw-r--r--chart2/uiconfig/ui/charttypedialog.ui82
9 files changed, 90 insertions, 73 deletions
diff --git a/chart2/AllLangResTarget_chartcontroller.mk b/chart2/AllLangResTarget_chartcontroller.mk
index c5ca48db6180..fd12cb78b873 100644
--- a/chart2/AllLangResTarget_chartcontroller.mk
+++ b/chart2/AllLangResTarget_chartcontroller.mk
@@ -39,7 +39,6 @@ $(eval $(call gb_SrsTarget_add_files,chart2/res,\
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,chart2/res,\
chart2/source/controller/dialogs/Bitmaps.src \
- chart2/source/controller/dialogs/dlg_ChartType.src \
chart2/source/controller/dialogs/dlg_CreationWizard.src \
chart2/source/controller/dialogs/tp_PointGeometry.src \
chart2/source/controller/menus/ShapeContextMenu.src \
diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk
index c40bac7888f9..d9ef7d7cb3e6 100644
--- a/chart2/UIConfig_chart2.mk
+++ b/chart2/UIConfig_chart2.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
chart2/uiconfig/ui/3dviewdialog \
chart2/uiconfig/ui/attributedialog \
chart2/uiconfig/ui/chardialog \
+ chart2/uiconfig/ui/charttypedialog \
chart2/uiconfig/ui/datarangedialog \
chart2/uiconfig/ui/dlg_DataLabel \
chart2/uiconfig/ui/dlg_InsertErrorBars \
diff --git a/chart2/source/controller/dialogs/ResourceIds.hrc b/chart2/source/controller/dialogs/ResourceIds.hrc
index 415f6cf9b268..9dbe6537ad6d 100644
--- a/chart2/source/controller/dialogs/ResourceIds.hrc
+++ b/chart2/source/controller/dialogs/ResourceIds.hrc
@@ -25,7 +25,6 @@
//for Bimaps see Bimaps.hrc
//-----------------------------------------------------------------------------
//Dialog Ids:
-#define DLG_DIAGRAM_TYPE 743
#define DLG_CHART_WIZARD 902
#define DLG_DATA_SOURCE 901
#define DLG_DATA_DESCR 836
diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx
index 0ad8d370f115..ea9a4966193a 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx
@@ -25,6 +25,7 @@
#include "tp_ChartType.hxx"
#include "macros.hxx"
#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <vcl/layout.hxx>
using namespace ::com::sun::star;
@@ -36,21 +37,13 @@ using namespace ::com::sun::star::chart2;
ChartTypeDialog::ChartTypeDialog( Window* pParent
, const uno::Reference< frame::XModel >& xChartModel
, const uno::Reference< uno::XComponentContext >& xContext )
- : ModalDialog( pParent, SchResId( DLG_DIAGRAM_TYPE ))
- , m_aFL( this, SchResId( FL_BUTTONS ) )
- , m_aBtnOK( this, SchResId( BTN_OK ) )
- , m_aBtnCancel( this, SchResId( BTN_CANCEL ) )
- , m_aBtnHelp( this, SchResId( BTN_HELP ) )
- , m_pChartTypeTabPage(0)
- , m_xChartModel(xChartModel)
- , m_xCC( xContext )
+ : ModalDialog( pParent, "ChartTypeDialog",
+ "modules/schart/ui/charttypedialog.ui")
+ , m_pChartTypeTabPage(0)
+ , m_xChartModel(xChartModel)
+ , m_xCC( xContext )
{
- FreeResource();
-
- this->SetText(SCH_RESSTR(STR_PAGE_CHARTTYPE));
-
- //don't create the tabpages before FreeResource, otherwise the help ids are not matched correctly
- m_pChartTypeTabPage = new ChartTypeTabPage(this,uno::Reference< XChartDocument >::query(m_xChartModel),m_xCC,true/*live update*/,true/*hide title description*/);
+ m_pChartTypeTabPage = new ChartTypeTabPage(get_content_area(),uno::Reference< XChartDocument >::query(m_xChartModel),m_xCC,true/*live update*/,true/*hide title description*/);
m_pChartTypeTabPage->initializePage();
m_pChartTypeTabPage->Show();
}
diff --git a/chart2/source/controller/dialogs/dlg_ChartType.src b/chart2/source/controller/dialogs/dlg_ChartType.src
deleted file mode 100644
index 1b423edf8271..000000000000
--- a/chart2/source/controller/dialogs/dlg_ChartType.src
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "dlg_ChartType.hrc"
-#include "dlg_CreationWizard.hrc"
-#include "HelpIds.hrc"
-
-// for BUTTONS_OK_CANCEL_HELP_STACKED
-#include "CommonResources.hrc"
-
-#define CHART_TYPE_DLG_HEIGHT (CHART_WIZARD_PAGEHEIGHT+18)
-#define CHART_TYPE_DLG_WIDTH (CHART_WIZARD_PAGEWIDTH - 7)
-
-ModalDialog DLG_DIAGRAM_TYPE
-{
- HelpID = HID_DIAGRAM_TYPE ;
-
- Size = MAP_APPFONT ( CHART_TYPE_DLG_WIDTH , CHART_TYPE_DLG_HEIGHT ) ;
-
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Moveable = TRUE ;
- Closeable = TRUE ;
-
- FixedLine FL_BUTTONS
- {
- Pos = MAP_APPFONT ( 0 , CHART_TYPE_DLG_HEIGHT-24 ) ;
- Size = MAP_APPFONT ( CHART_TYPE_DLG_WIDTH , 8 ) ;
- };
-
- BUTTONS_OK_CANCEL_HELP( CHART_TYPE_DLG_WIDTH-161 ,CHART_TYPE_DLG_HEIGHT-17 , 53, 0 )
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/tp_ChartType.src b/chart2/source/controller/dialogs/tp_ChartType.src
index 1a70c45f4e70..2942578838a4 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.src
+++ b/chart2/source/controller/dialogs/tp_ChartType.src
@@ -57,7 +57,6 @@
TabPage TP_CHARTTYPE
{
Hide = TRUE ;
- HelpID = HID_DIAGRAM_TYPE;
SVLook = TRUE ;
Size = MAP_APPFONT ( CHART_WIZARD_PAGEWIDTH , CHART_WIZARD_PAGEHEIGHT ) ;
diff --git a/chart2/source/controller/inc/HelpIds.hrc b/chart2/source/controller/inc/HelpIds.hrc
index 089a601b00ee..be61cdb5f10d 100644
--- a/chart2/source/controller/inc/HelpIds.hrc
+++ b/chart2/source/controller/inc/HelpIds.hrc
@@ -55,7 +55,6 @@
#define HID_SCH_LEGEND_SHOW "CHART2_HID_SCH_LEGEND_SHOW"
#define HID_SCH_DATA_SERIES_LABEL "CHART2_HID_SCH_DATA_SERIES_LABEL"
-#define HID_DIAGRAM_TYPE "CHART2_HID_DIAGRAM_TYPE"
#define HID_DIAGRAM_DATA "CHART2_HID_DIAGRAM_DATA"
#define HID_INSERT_STATISTICS "CHART2_HID_INSERT_STATISTICS"
diff --git a/chart2/source/controller/inc/dlg_ChartType.hxx b/chart2/source/controller/inc/dlg_ChartType.hxx
index 8e952b3eaa87..7716ac97fee4 100644
--- a/chart2/source/controller/inc/dlg_ChartType.hxx
+++ b/chart2/source/controller/inc/dlg_ChartType.hxx
@@ -43,11 +43,6 @@ public:
~ChartTypeDialog();
private:
- FixedLine m_aFL;
- OKButton m_aBtnOK;
- CancelButton m_aBtnCancel;
- HelpButton m_aBtnHelp;
-
ChartTypeTabPage* m_pChartTypeTabPage;
::com::sun::star::uno::Reference<
diff --git a/chart2/uiconfig/ui/charttypedialog.ui b/chart2/uiconfig/ui/charttypedialog.ui
new file mode 100644
index 000000000000..9dddb55f748a
--- /dev/null
+++ b/chart2/uiconfig/ui/charttypedialog.ui
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkDialog" id="ChartTypeDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Chart Type</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="orientation">vertical</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="layout_style">end</property>
+ <child>
+ <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_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="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="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>
+ <placeholder/>
+ </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>