From 40a32467139758d3f37445004caf50f19b6eeb6e Mon Sep 17 00:00:00 2001 From: Manal Alhassoun Date: Wed, 10 Jul 2013 12:29:04 +0300 Subject: insertgriddlg.ui and insertaxisdlg.ui widgets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib5b84806189b44ca1b4c74c958d0fafa86030c36 Reviewed-on: https://gerrit.libreoffice.org/4799 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- chart2/AllLangResTarget_chartcontroller.mk | 1 - chart2/UIConfig_chart2.mk | 2 + chart2/source/controller/dialogs/ResourceIds.hrc | 1 - .../controller/dialogs/dlg_InsertAxis_Grid.cxx | 98 +++---- .../controller/dialogs/dlg_InsertAxis_Grid.hrc | 40 --- .../controller/dialogs/dlg_InsertAxis_Grid.src | 91 ------- .../source/controller/inc/dlg_InsertAxis_Grid.hxx | 21 +- chart2/uiconfig/ui/insertaxisdlg.ui | 282 +++++++++++++++++++++ chart2/uiconfig/ui/insertgriddlg.ui | 282 +++++++++++++++++++++ 9 files changed, 614 insertions(+), 204 deletions(-) create mode 100644 chart2/uiconfig/ui/insertaxisdlg.ui create mode 100644 chart2/uiconfig/ui/insertgriddlg.ui (limited to 'chart2') diff --git a/chart2/AllLangResTarget_chartcontroller.mk b/chart2/AllLangResTarget_chartcontroller.mk index 8e6d8527e068..3532030c4c42 100644 --- a/chart2/AllLangResTarget_chartcontroller.mk +++ b/chart2/AllLangResTarget_chartcontroller.mk @@ -32,7 +32,6 @@ $(eval $(call gb_SrsTarget_add_files,chart2/res,\ chart2/source/controller/dialogs/dlg_CreationWizard.src \ chart2/source/controller/dialogs/dlg_DataEditor.src \ chart2/source/controller/dialogs/dlg_DataSource.src \ - chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src \ chart2/source/controller/dialogs/dlg_InsertDataLabel.src \ chart2/source/controller/dialogs/dlg_InsertErrorBars.src \ chart2/source/controller/dialogs/dlg_InsertLegend.src \ diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk index 48d1561e7b9a..91d101b08104 100644 --- a/chart2/UIConfig_chart2.mk +++ b/chart2/UIConfig_chart2.mk @@ -30,6 +30,8 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/schart,\ )) $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\ + chart2/uiconfig/ui/insertaxisdlg \ + chart2/uiconfig/ui/insertgriddlg \ chart2/uiconfig/ui/smoothlinesdlg \ chart2/uiconfig/ui/steppedlinesdlg \ )) diff --git a/chart2/source/controller/dialogs/ResourceIds.hrc b/chart2/source/controller/dialogs/ResourceIds.hrc index ed625bb44532..09aa8d25174a 100644 --- a/chart2/source/controller/dialogs/ResourceIds.hrc +++ b/chart2/source/controller/dialogs/ResourceIds.hrc @@ -28,7 +28,6 @@ #define DLG_DIAGRAM_TYPE 743 #define DLG_CHART_WIZARD 902 #define DLG_DATA_SOURCE 901 -#define DLG_AXIS_OR_GRID 839 #define DLG_DATA_DESCR 836 #define DLG_LEGEND 835 #define DLG_TITLE 834 diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx index bc60d24a1a2d..a31f5148a095 100644 --- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx @@ -18,7 +18,6 @@ */ #include "dlg_InsertAxis_Grid.hxx" -#include "dlg_InsertAxis_Grid.hrc" #include "ResId.hxx" #include "chartview/ChartSfxItemIds.hxx" @@ -53,72 +52,59 @@ InsertAxisOrGridDialogData::InsertAxisOrGridDialogData() SchAxisDlg::SchAxisDlg( Window* pWindow , const InsertAxisOrGridDialogData& rInput, sal_Bool bAxisDlg ) - : - ModalDialog( pWindow, SchResId( DLG_AXIS_OR_GRID )), - - aFlPrimary( this, SchResId( FL_PRIMARY_AXIS )), - aFlPrimaryGrid( this, SchResId( FL_PRIMARY_GRID )), - aCbPrimaryX( this, SchResId( CB_X_PRIMARY )), - aCbPrimaryY( this, SchResId( CB_Y_PRIMARY )), - aCbPrimaryZ( this, SchResId( CB_Z_PRIMARY )), - - aFlSecondary( this, SchResId( FL_SECONDARY_AXIS )), - aFlSecondaryGrid( this, SchResId( FL_SECONDARY_GRID )), - aCbSecondaryX( this, SchResId( CB_X_SECONDARY )), - aCbSecondaryY( this, SchResId( CB_Y_SECONDARY )), - aCbSecondaryZ( this, SchResId( CB_Z_SECONDARY )), - - aPbOK( this, SchResId( BTN_OK )), - aPbCancel( this, SchResId( BTN_CANCEL )), - aPbHelp( this, SchResId( BTN_HELP )) - + : ModalDialog(pWindow, + bAxisDlg ? + OString("InsertAxisDialog") : + OString("InsertGridDialog"), + bAxisDlg ? + OUString("modules/schart/ui/insertaxisdlg.ui") : + OUString("modules/schart/ui/insertgriddlg.ui")) //rOutAttrs( rInAttrs ) { - FreeResource(); + get(m_pCbPrimaryX, "primaryX"); + get(m_pCbPrimaryY, "primaryY"); + get(m_pCbPrimaryZ, "primaryZ"); + get(m_pCbSecondaryX, "secondaryX"); + get(m_pCbSecondaryY, "secondaryY"); + get(m_pCbSecondaryZ, "secondaryZ"); + if(!bAxisDlg) { SetHelpId( HID_INSERT_GRIDS ); - SetText( ObjectNameProvider::getName(OBJECTTYPE_GRID,true) ); - - aCbPrimaryX.SetHelpId( HID_SCH_CB_XGRID ); - aCbPrimaryY.SetHelpId( HID_SCH_CB_YGRID ); - aCbPrimaryZ.SetHelpId( HID_SCH_CB_ZGRID ); - aCbSecondaryX.SetHelpId( HID_SCH_CB_SECONDARY_XGRID ); - aCbSecondaryY.SetHelpId( HID_SCH_CB_SECONDARY_YGRID ); - aCbSecondaryZ.SetHelpId( HID_SCH_CB_SECONDARY_ZGRID ); - - aFlPrimary.Hide(); - aFlSecondary.Hide(); - aFlPrimaryGrid.Show(); - aFlSecondaryGrid.Show(); + + m_pCbPrimaryX->SetHelpId( HID_SCH_CB_XGRID ); + m_pCbPrimaryY->SetHelpId( HID_SCH_CB_YGRID ); + m_pCbPrimaryZ->SetHelpId( HID_SCH_CB_ZGRID ); + m_pCbSecondaryX->SetHelpId( HID_SCH_CB_SECONDARY_XGRID ); + m_pCbSecondaryY->SetHelpId( HID_SCH_CB_SECONDARY_YGRID ); + m_pCbSecondaryZ->SetHelpId( HID_SCH_CB_SECONDARY_ZGRID ); } else { - SetText( ObjectNameProvider::getName(OBJECTTYPE_AXIS,true) ); //todo: remove if secondary z axis are possible somewhere { - aCbSecondaryZ.Hide(); + m_pCbSecondaryZ->Hide(); Size aSize( GetSizePixel() ); - aSize.Height() -= ( aCbSecondaryZ.GetPosPixel().Y() - aCbSecondaryY.GetPosPixel().Y() ); + aSize.Height() -= ( m_pCbSecondaryZ->GetPosPixel().Y() - m_pCbSecondaryY->GetPosPixel().Y() ); SetSizePixel(aSize); } } - aCbPrimaryX.Check( rInput.aExistenceList[0] ); - aCbPrimaryY.Check( rInput.aExistenceList[1] ); - aCbPrimaryZ.Check( rInput.aExistenceList[2] ); - aCbSecondaryX.Check( rInput.aExistenceList[3] ); - aCbSecondaryY.Check( rInput.aExistenceList[4] ); - aCbSecondaryZ.Check( rInput.aExistenceList[5] ); - - aCbPrimaryX.Enable( rInput.aPossibilityList[0] ); - aCbPrimaryY.Enable( rInput.aPossibilityList[1] ); - aCbPrimaryZ.Enable( rInput.aPossibilityList[2] ); - aCbSecondaryX.Enable( rInput.aPossibilityList[3] ); - aCbSecondaryY.Enable( rInput.aPossibilityList[4] ); - aCbSecondaryZ.Enable( rInput.aPossibilityList[5] ); + m_pCbPrimaryX->Check( rInput.aExistenceList[0] ); + m_pCbPrimaryY->Check( rInput.aExistenceList[1] ); + m_pCbPrimaryZ->Check( rInput.aExistenceList[2] ); + m_pCbSecondaryX->Check( rInput.aExistenceList[3] ); + m_pCbSecondaryY->Check( rInput.aExistenceList[4] ); + m_pCbSecondaryZ->Check( rInput.aExistenceList[5] ); + + m_pCbPrimaryX->Enable( rInput.aPossibilityList[0] ); + m_pCbPrimaryY->Enable( rInput.aPossibilityList[1] ); + m_pCbPrimaryZ->Enable( rInput.aPossibilityList[2] ); + m_pCbSecondaryX->Enable( rInput.aPossibilityList[3] ); + m_pCbSecondaryY->Enable( rInput.aPossibilityList[4] ); + m_pCbSecondaryZ->Enable( rInput.aPossibilityList[5] ); } SchAxisDlg::~SchAxisDlg() @@ -127,12 +113,12 @@ SchAxisDlg::~SchAxisDlg() void SchAxisDlg::getResult( InsertAxisOrGridDialogData& rOutput ) { - rOutput.aExistenceList[0]=aCbPrimaryX.IsChecked(); - rOutput.aExistenceList[1]=aCbPrimaryY.IsChecked(); - rOutput.aExistenceList[2]=aCbPrimaryZ.IsChecked(); - rOutput.aExistenceList[3]=aCbSecondaryX.IsChecked(); - rOutput.aExistenceList[4]=aCbSecondaryY.IsChecked(); - rOutput.aExistenceList[5]=aCbSecondaryZ.IsChecked(); + rOutput.aExistenceList[0]=m_pCbPrimaryX->IsChecked(); + rOutput.aExistenceList[1]=m_pCbPrimaryY->IsChecked(); + rOutput.aExistenceList[2]=m_pCbPrimaryZ->IsChecked(); + rOutput.aExistenceList[3]=m_pCbSecondaryX->IsChecked(); + rOutput.aExistenceList[4]=m_pCbSecondaryY->IsChecked(); + rOutput.aExistenceList[5]=m_pCbSecondaryZ->IsChecked(); } SchGridDlg::SchGridDlg( Window* pParent, const InsertAxisOrGridDialogData& rInput ) diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.hrc b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.hrc index 86b3c4203600..e69de29bb2d1 100644 --- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.hrc +++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.hrc @@ -1,40 +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 "ResourceIds.hrc" - -#define FL_PRIMARY_AXIS 1 -#define FL_SECONDARY_AXIS 2 - -#define FL_PRIMARY_GRID 3 -#define FL_SECONDARY_GRID 4 - -#define CB_X_PRIMARY 1 -#define CB_Y_PRIMARY 2 -#define CB_Z_PRIMARY 3 - -#define CB_X_SECONDARY 4 -#define CB_Y_SECONDARY 5 -#define CB_Z_SECONDARY 6 - -#define BTN_OK 1 -#define BTN_CANCEL 2 -#define BTN_HELP 3 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src index 13c7fa344a51..e69de29bb2d1 100644 --- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src +++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src @@ -1,91 +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_InsertAxis_Grid.hrc" -#include "HelpIds.hrc" -#include "CommonResources.hrc" -#include "res_SecondaryAxisCheckBoxes.hrc" - -ModalDialog DLG_AXIS_OR_GRID -{ - HelpID = HID_INSERT_AXIS ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 160 , 113 ) ; - Moveable = TRUE ; - - FixedLine FL_PRIMARY_AXIS - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 92 , 8 ) ; - Text [ en-US ] = "Axes" ; - }; - FixedLine FL_PRIMARY_GRID - { - Hide = TRUE ; - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 92 , 8 ) ; - Text [ en-US ] = "Major grids" ; - }; - CheckBox CB_X_PRIMARY - { - HelpID = HID_SCH_CB_XAXIS; - - Pos = MAP_APPFONT ( 12 , 14 ); - Size = MAP_APPFONT ( 80 , 10 ); - TabStop = TRUE; - Text [ en-US ] = "~X axis"; - }; - CheckBox CB_Y_PRIMARY - { - HelpID = HID_SCH_CB_YAXIS; - - Pos = MAP_APPFONT ( 12 , 28 ); - Size = MAP_APPFONT ( 80 , 10 ); - TabStop = TRUE; - Text [ en-US ] = "~Y axis"; - }; - CheckBox CB_Z_PRIMARY - { - HelpID = HID_SCH_CB_ZAXIS; - - Pos = MAP_APPFONT ( 12 , 42 ); - Size = MAP_APPFONT ( 80 , 10 ); - TabStop = TRUE; - Text [ en-US ] = "~Z axis"; - }; - - FixedLine FL_SECONDARY_AXIS - { - Pos = MAP_APPFONT ( 6 , 58 ) ; - Size = MAP_APPFONT ( 92 , 8 ) ; - Text [ en-US ] = "Secondary axes" ; - }; - FixedLine FL_SECONDARY_GRID - { - Hide = TRUE ; - Pos = MAP_APPFONT ( 6 , 58 ) ; - Size = MAP_APPFONT ( 92 , 8 ) ; - Text [ en-US ] = "Minor grids" ; - }; - SECONDARYAXISCHECKBOXES( 12, 69, 0, 14 ) - BUTTONS_OK_CANCEL_HELP_STACKED(104) -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx index 082fa2560b98..37c9589d79fc 100644 --- a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx +++ b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx @@ -48,21 +48,12 @@ struct InsertAxisOrGridDialogData class SchAxisDlg : public ModalDialog { protected: - FixedLine aFlPrimary; - FixedLine aFlPrimaryGrid; - CheckBox aCbPrimaryX; - CheckBox aCbPrimaryY; - CheckBox aCbPrimaryZ; - - FixedLine aFlSecondary; - FixedLine aFlSecondaryGrid; - CheckBox aCbSecondaryX; - CheckBox aCbSecondaryY; - CheckBox aCbSecondaryZ; - - OKButton aPbOK; - CancelButton aPbCancel; - HelpButton aPbHelp; + CheckBox* m_pCbPrimaryX; + CheckBox* m_pCbPrimaryY; + CheckBox* m_pCbPrimaryZ; + CheckBox* m_pCbSecondaryX; + CheckBox* m_pCbSecondaryY; + CheckBox* m_pCbSecondaryZ; public: SchAxisDlg( Window* pParent, const InsertAxisOrGridDialogData& rInput, sal_Bool bAxisDlg=true ); diff --git a/chart2/uiconfig/ui/insertaxisdlg.ui b/chart2/uiconfig/ui/insertaxisdlg.ui new file mode 100644 index 000000000000..9c686f43d1fd --- /dev/null +++ b/chart2/uiconfig/ui/insertaxisdlg.ui @@ -0,0 +1,282 @@ + + + + + False + 5 + Axes + dialog + + + False + 12 + + + False + vertical + start + + + gtk-ok + True + True + True + True + True + False + True + + + False + True + 0 + + + + + gtk-cancel + True + True + True + False + True + + + False + True + 1 + + + + + gtk-help + True + True + True + False + True + top + + + False + True + 2 + + + + + False + True + end + 0 + + + + + True + False + vertical + + + True + False + True + True + 0 + none + + + True + False + 6 + 12 + + + True + False + True + vertical + 6 + + + _X axis + True + True + False + False + True + 0 + True + + + False + True + 0 + + + + + _Y axis + True + True + False + False + True + 0 + True + + + False + True + 1 + + + + + _Z axis + True + True + False + False + True + 0 + True + + + False + True + 2 + + + + + + + + + True + False + True + Axes + + + + + + + + False + True + 0 + + + + + True + False + True + True + 0 + none + + + True + False + 6 + 12 + + + True + False + True + vertical + 6 + + + X _axis + True + True + False + False + True + 0 + True + + + False + True + 0 + + + + + Y ax_is + True + True + False + False + True + 0 + True + + + False + True + 1 + + + + + Z axi_s + True + True + False + False + True + 0 + True + + + False + True + 2 + + + + + + + + + True + False + True + Secondary axes + + + + + + + + False + True + 1 + + + + + False + True + 1 + + + + + + ok + cancel + help + + + diff --git a/chart2/uiconfig/ui/insertgriddlg.ui b/chart2/uiconfig/ui/insertgriddlg.ui new file mode 100644 index 000000000000..bbf6e90c29ce --- /dev/null +++ b/chart2/uiconfig/ui/insertgriddlg.ui @@ -0,0 +1,282 @@ + + + + + False + 5 + Grids + dialog + + + False + 12 + + + False + vertical + start + + + gtk-ok + True + True + True + True + True + False + True + + + False + True + 0 + + + + + gtk-cancel + True + True + True + False + True + + + False + True + 1 + + + + + gtk-help + True + True + True + False + True + top + + + False + True + 2 + + + + + False + True + end + 0 + + + + + True + False + vertical + + + True + False + True + True + 0 + none + + + True + False + 6 + 12 + + + True + False + True + vertical + 6 + + + _X axis + True + True + False + False + True + 0 + True + + + False + True + 0 + + + + + _Y axis + True + True + False + False + True + 0 + True + + + False + True + 1 + + + + + _Z axis + True + True + False + False + True + 0 + True + + + False + True + 2 + + + + + + + + + True + False + True + Major grids + + + + + + + + False + True + 0 + + + + + True + False + True + True + 0 + none + + + True + False + 6 + 12 + + + True + False + True + vertical + 6 + + + X _axis + True + True + False + False + True + 0 + True + + + False + True + 0 + + + + + Y ax_is + True + True + False + False + True + 0 + True + + + False + True + 1 + + + + + Z axi_s + True + True + False + False + True + 0 + True + + + False + True + 2 + + + + + + + + + True + False + True + Minor grids + + + + + + + + False + True + 1 + + + + + False + True + 1 + + + + + + ok + cancel + help + + + -- cgit