diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-20 20:52:11 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-25 22:50:48 -0400 |
commit | be89276e63a29f4e066c7991cdecc97c20794e7c (patch) | |
tree | 8aebcc53cac140eaa4ed36faff535533fe9302cc | |
parent | 349a5b72bf2bc627a79967d61ff7dc07a4ac90b2 (diff) |
Add a new chart type "GL 3D Bar" (working name).
Change-Id: I0b0a65bf4f9365a8d522e3c439afe19797b2fdd5
-rw-r--r-- | chart2/Library_chartcontroller.mk | 1 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/Bitmaps.hrc | 9 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/Bitmaps.src | 5 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx | 41 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx | 32 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/Strings_ChartTypes.src | 5 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/tp_ChartType.cxx | 2 | ||||
-rw-r--r-- | chart2/source/inc/Strings.hrc | 7 |
8 files changed, 94 insertions, 8 deletions
diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk index 6a4907feaf85..86c2a04299cc 100644 --- a/chart2/Library_chartcontroller.mk +++ b/chart2/Library_chartcontroller.mk @@ -87,6 +87,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty \ chart2/source/controller/dialogs/ChangingResource \ chart2/source/controller/dialogs/ChartTypeDialogController \ + chart2/source/controller/dialogs/GL3DBarChartDialogController \ chart2/source/controller/dialogs/DataBrowser \ chart2/source/controller/dialogs/DataBrowserModel \ chart2/source/controller/dialogs/DialogModel \ diff --git a/chart2/source/controller/dialogs/Bitmaps.hrc b/chart2/source/controller/dialogs/Bitmaps.hrc index 6f99effce516..b5fc1e736cc2 100644 --- a/chart2/source/controller/dialogs/Bitmaps.hrc +++ b/chart2/source/controller/dialogs/Bitmaps.hrc @@ -39,10 +39,11 @@ #define IMG_TYPE_NET (RID_APP_START + 8) #define IMG_TYPE_STOCK (RID_APP_START + 9) #define IMG_TYPE_COLUMN_LINE (RID_APP_START + 10) -#define IMG_STEP_START (RID_APP_START + 11) -#define IMG_STEP_END (RID_APP_START + 12) -#define IMG_STEP_CENTER_X (RID_APP_START + 13) -#define IMG_STEP_CENTER_Y (RID_APP_START + 14) +#define IMG_TYPE_GL3D_BAR (RID_APP_START + 11) +#define IMG_STEP_START (RID_APP_START + 12) +#define IMG_STEP_END (RID_APP_START + 13) +#define IMG_STEP_CENTER_X (RID_APP_START + 14) +#define IMG_STEP_CENTER_Y (RID_APP_START + 15) //Chart Subtypes diff --git a/chart2/source/controller/dialogs/Bitmaps.src b/chart2/source/controller/dialogs/Bitmaps.src index 802de334552d..c0888440c4ec 100644 --- a/chart2/source/controller/dialogs/Bitmaps.src +++ b/chart2/source/controller/dialogs/Bitmaps.src @@ -68,6 +68,11 @@ Image IMG_TYPE_BUBBLE ImageBitmap = Bitmap { File = "typebubble_16.png" ; }; MaskColor = STD_MASKCOLOR; }; +Image IMG_TYPE_GL3D_BAR +{ + ImageBitmap = Bitmap { File = "typegl3dbar_16.png" ; }; + MaskColor = STD_MASKCOLOR; +}; Image IMG_STEP_START { ImageBitmap = Bitmap { File = "step_start_30.png" ; }; diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx new file mode 100644 index 000000000000..907c8f4ea2e0 --- /dev/null +++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx @@ -0,0 +1,41 @@ +/* -*- 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/. + */ + +#include "GL3DBarChartDialogController.hxx" +#include <Strings.hrc> +#include <Bitmaps.hrc> +#include <ResId.hxx> + +namespace chart { + +GL3DBarChartDialogController::GL3DBarChartDialogController() {} + +GL3DBarChartDialogController::~GL3DBarChartDialogController() {} + +OUString GL3DBarChartDialogController::getName() +{ + return SchResId(STR_TYPE_GL3D_BAR).toString(); +} + +Image GL3DBarChartDialogController::getImage() +{ + return Image(SchResId(IMG_TYPE_GL3D_BAR)); +} + +const tTemplateServiceChartTypeParameterMap& +GL3DBarChartDialogController::getTemplateMap() const +{ + static tTemplateServiceChartTypeParameterMap aMap( + "com.sun.star.chart2.template.GL3DBarRoundedRectangle", ChartTypeParameter(1)); + return aMap; +} + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx new file mode 100644 index 000000000000..72aac01bfc47 --- /dev/null +++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx @@ -0,0 +1,32 @@ +/* -*- 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/. + */ + +#ifndef INCLUDED_CHART2_GL3DBARCHARTDIALOGCONTROLLER_HXX +#define INCLUDED_CHART2_GL3DBARCHARTDIALOGCONTROLLER_HXX + +#include "ChartTypeDialogController.hxx" + +namespace chart { + +class GL3DBarChartDialogController : public ChartTypeDialogController +{ +public: + GL3DBarChartDialogController(); + virtual ~GL3DBarChartDialogController(); + + virtual OUString getName(); + virtual Image getImage(); + virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const; +}; + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/dialogs/Strings_ChartTypes.src b/chart2/source/controller/dialogs/Strings_ChartTypes.src index 86ed516f3ab5..3ece3a3a95b3 100644 --- a/chart2/source/controller/dialogs/Strings_ChartTypes.src +++ b/chart2/source/controller/dialogs/Strings_ChartTypes.src @@ -142,6 +142,9 @@ String STR_BUBBLE_1 Text [ en-US ] = "Bubble Chart" ; }; - +String STR_TYPE_GL3D_BAR +{ + Text [ en-US ] = "GL 3D Bar"; +}; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index d0106482abaa..e4141a8ac855 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -25,6 +25,7 @@ #include "res_BarGeometry.hxx" #include "ControllerLockGuard.hxx" #include "macros.hxx" +#include "GL3DBarChartDialogController.hxx" #include <svtools/controldims.hrc> @@ -726,6 +727,7 @@ ChartTypeTabPage::ChartTypeTabPage(Window* pParent m_aChartTypeDialogControllerList.push_back(new StockChartDialogController() ); } m_aChartTypeDialogControllerList.push_back(new CombiColumnLineChartDialogController() ); + m_aChartTypeDialogControllerList.push_back(new GL3DBarChartDialogController()); ::std::vector< ChartTypeDialogController* >::const_iterator aIter = m_aChartTypeDialogControllerList.begin(); const ::std::vector< ChartTypeDialogController* >::const_iterator aEnd = m_aChartTypeDialogControllerList.end(); diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc index 15c1ca81283b..f102f40fa8de 100644 --- a/chart2/source/inc/Strings.hrc +++ b/chart2/source/inc/Strings.hrc @@ -64,8 +64,10 @@ #define STR_TYPE_BUBBLE (RID_APP_START + 282) #define STR_BUBBLE_1 (RID_APP_START + 283) +#define STR_TYPE_GL3D_BAR (RID_APP_START + 127) + //additional strings -#define STR_TEXT_SEPARATOR (RID_APP_START + 20) +#define STR_TEXT_SEPARATOR (RID_APP_START + 20) //SchStatisticTabPage and SchDataStatisticsDlg //see Strings_Statistic.src @@ -94,7 +96,7 @@ #define STR_INVALID_TIME_UNIT (RID_APP_START + 292) -//for range didalog +//for range dialog #define STR_DATA_ROLE_LABEL (RID_APP_START + 241) #define STR_DATA_ROLE_X (RID_APP_START + 242) #define STR_DATA_ROLE_Y (RID_APP_START + 243) @@ -272,7 +274,6 @@ #define STR_BUTTON_UP (RID_APP_START + 500) #define STR_BUTTON_DOWN (RID_APP_START + 501) - // ids must not exceed RID_APP_START + 499 // ids >= RID_APP_START + 500 are defined in glob.hrc |