chart2/Library_chartcontroller.mk | 1 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx | 16 +-- chart2/source/controller/dialogs/Bitmaps.hrc | 9 +- chart2/source/controller/dialogs/Bitmaps.src | 5 + chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx | 41 ++++++++++ chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx | 32 +++++++ chart2/source/controller/dialogs/Strings_ChartTypes.src | 5 - chart2/source/controller/dialogs/res_ErrorBar.cxx | 6 - chart2/source/controller/dialogs/tp_ChartType.cxx | 10 +- chart2/source/controller/inc/res_ErrorBar.hxx | 2 chart2/source/controller/main/ControllerCommandDispatch.cxx | 2 chart2/source/inc/Strings.hrc | 7 - icon-themes/galaxy/chart2/res/typegl3dbar_16.png |binary 13 files changed, 111 insertions(+), 25 deletions(-)
New commits: commit b16d99d61698f0983ad84c2c0b97ce0d43f79cf4 Author: Kohei Yoshida <[email protected]> Date: Thu Mar 20 20:53:42 2014 -0400 Image for the new chart type. Change-Id: Idba626c947cc7875bdcdf13677f2161c4d5b68c5 diff --git a/icon-themes/galaxy/chart2/res/typegl3dbar_16.png b/icon-themes/galaxy/chart2/res/typegl3dbar_16.png new file mode 100644 index 0000000..ada848c Binary files /dev/null and b/icon-themes/galaxy/chart2/res/typegl3dbar_16.png differ commit 20ef92a550d88c6b6b831330d14a23c275c26a9e Author: Kohei Yoshida <[email protected]> Date: Thu Mar 20 20:52:11 2014 -0400 Add a new chart type "GL 3D Bar" (working name). Change-Id: I0b0a65bf4f9365a8d522e3c439afe19797b2fdd5 diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk index 6a4907f..86c2a04 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 6f99eff..b5fc1e7 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 802de33..c088844 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 0000000..907c8f4 --- /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 0000000..72aac01 --- /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 86ed516..3ece3a3 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 0c78e59..987f934 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 15c1ca8..f102f40 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 commit daf0b93c52af435bdec37b9e46489fce42678ab6 Author: Kohei Yoshida <[email protected]> Date: Thu Mar 20 17:41:16 2014 -0400 Better to associate true for "enable" and false for "disable". The code reads better this way, and certainly is easier on human brain to process their logic. Change-Id: I3150fca3385931b9fe01ad13cb11fab410331349 diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index b6242a4..dea17aa 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -149,8 +149,8 @@ enum PROP_DOCUMENT_ADDITIONAL_SHAPES, PROP_DOCUMENT_UPDATE_ADDIN, PROP_DOCUMENT_NULL_DATE, - PROP_DOCUMENT_DISABLE_COMPLEX_CHARTTYPES, - PROP_DOCUMENT_DISABLE_DATATABLE_DIALOG + PROP_DOCUMENT_ENABLE_COMPLEX_CHARTTYPES, + PROP_DOCUMENT_ENABLE_DATATABLE_DIALOG }; void lcl_AddPropertiesToVector( @@ -224,14 +224,14 @@ void lcl_AddPropertiesToVector( beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( "DisableComplexChartTypes", - PROP_DOCUMENT_DISABLE_COMPLEX_CHARTTYPES, + Property( "EnableComplexChartTypes", + PROP_DOCUMENT_ENABLE_COMPLEX_CHARTTYPES, ::getBooleanCppuType(), //#i112666# no PropertyChangeEvent is fired on change so far beans::PropertyAttribute::MAYBEDEFAULT ) ); rOutProperties.push_back( - Property( "DisableDataTableDialog", - PROP_DOCUMENT_DISABLE_DATATABLE_DIALOG, + Property( "EnableDataTableDialog", + PROP_DOCUMENT_ENABLE_DATATABLE_DIALOG, ::getBooleanCppuType(), //#i112666# no PropertyChangeEvent is fired on change so far beans::PropertyAttribute::MAYBEDEFAULT ) ); @@ -1531,8 +1531,8 @@ const std::vector< WrappedProperty* > ChartDocumentWrapper::createWrappedPropert aWrappedProperties.push_back( new WrappedAdditionalShapesProperty( *this ) ); aWrappedProperties.push_back( new WrappedRefreshAddInAllowedProperty( *this ) ); aWrappedProperties.push_back( new WrappedIgnoreProperty("NullDate",Any() ) ); // i99104 - aWrappedProperties.push_back( new WrappedIgnoreProperty("DisableComplexChartTypes", uno::makeAny( sal_False ) ) ); - aWrappedProperties.push_back( new WrappedIgnoreProperty("DisableDataTableDialog", uno::makeAny( sal_False ) ) ); + aWrappedProperties.push_back( new WrappedIgnoreProperty("EnableComplexChartTypes", uno::makeAny(sal_True) ) ); + aWrappedProperties.push_back( new WrappedIgnoreProperty("EnableDataTableDialog", uno::makeAny(sal_True) ) ); return aWrappedProperties; } diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index 7c25681..2803f37 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -97,7 +97,7 @@ ErrorBarResources::ErrorBarResources( VclBuilderContainer* pParent, Dialog * pPa m_pParentDialog( pParentDialog ), m_pCurrentRangeChoosingField( 0 ), m_bHasInternalDataProvider( true ), - m_bDisableDataTableDialog( false ) + m_bEnableDataTableDialog( true ) { pParent->get(m_pRbNone,"RB_NONE"); pParent->get(m_pRbConst, "RB_CONST"); @@ -181,7 +181,7 @@ void ErrorBarResources::SetChartDocumentForRangeChoosing( { try { - xProps->getPropertyValue( "DisableDataTableDialog" ) >>= m_bDisableDataTableDialog; + xProps->getPropertyValue("EnableDataTableDialog") >>= m_bEnableDataTableDialog; } catch( const uno::Exception& e ) { @@ -231,7 +231,7 @@ void ErrorBarResources::UpdateControlStates() m_pLbFunction->Enable( bIsFunction ); // range buttons - m_pRbRange->Enable( !m_bHasInternalDataProvider || !m_bDisableDataTableDialog ); + m_pRbRange->Enable( !m_bHasInternalDataProvider || m_bEnableDataTableDialog ); bool bShowRange = ( m_pRbRange->IsChecked()); bool bCanChooseRange = ( bShowRange && diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 63df637..0c78e59 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -696,13 +696,13 @@ ChartTypeTabPage::ChartTypeTabPage(Window* pParent m_pSubTypeList->SetColCount(4); m_pSubTypeList->SetLineCount(1); - bool bDisableComplexChartTypes = false; + bool bEnableComplexChartTypes = true; uno::Reference< beans::XPropertySet > xProps( m_xChartModel, uno::UNO_QUERY ); if ( xProps.is() ) { try { - xProps->getPropertyValue( "DisableComplexChartTypes" ) >>= bDisableComplexChartTypes; + xProps->getPropertyValue("EnableComplexChartTypes") >>= bEnableComplexChartTypes; } catch( const uno::Exception& e ) { @@ -715,13 +715,13 @@ ChartTypeTabPage::ChartTypeTabPage(Window* pParent m_aChartTypeDialogControllerList.push_back(new PieChartDialogController() ); m_aChartTypeDialogControllerList.push_back(new AreaChartDialogController() ); m_aChartTypeDialogControllerList.push_back(new LineChartDialogController() ); - if ( !bDisableComplexChartTypes ) + if (bEnableComplexChartTypes) { m_aChartTypeDialogControllerList.push_back(new XYChartDialogController() ); m_aChartTypeDialogControllerList.push_back(new BubbleChartDialogController() ); } m_aChartTypeDialogControllerList.push_back(new NetChartDialogController() ); - if ( !bDisableComplexChartTypes ) + if (bEnableComplexChartTypes) { m_aChartTypeDialogControllerList.push_back(new StockChartDialogController() ); } diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx index 83cc4d1..de97253 100644 --- a/chart2/source/controller/inc/res_ErrorBar.hxx +++ b/chart2/source/controller/inc/res_ErrorBar.hxx @@ -119,7 +119,7 @@ private: boost::scoped_ptr< RangeSelectionHelper > m_apRangeSelectionHelper; Edit * m_pCurrentRangeChoosingField; bool m_bHasInternalDataProvider; - bool m_bDisableDataTableDialog; + bool m_bEnableDataTableDialog; DECL_LINK( CategoryChosen, void * ); DECL_LINK( SynchronizePosAndNeg, void * ); diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index 07fdf49..f7e6e5e 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -538,7 +538,7 @@ void ControllerCommandDispatch::updateCommandAvailability() { try { - xProps->getPropertyValue( "DisableDataTableDialog" ) >>= bDisableDataTableDialog; + xProps->getPropertyValue( "EnableDataTableDialog" ) >>= bDisableDataTableDialog; } catch( const uno::Exception& e ) { _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
