Kaydet (Commit) be1152e0 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

List child type for GL3D bar chart type.

For now there is only one child type.

Change-Id: If39a3e75fdae62f0b20769c21e6a4e235ede941e
üst 56aaa39f
...@@ -199,6 +199,8 @@ ...@@ -199,6 +199,8 @@
// Bubble Chart Subtypes // Bubble Chart Subtypes
#define BMP_BUBBLE_1 (RID_APP_START + 88) #define BMP_BUBBLE_1 (RID_APP_START + 88)
// GL3D Bar Chart subtypes.
#define BMP_GL3D_BAR_ROUNDRECT (RID_APP_START + 106)
//further Images: //further Images:
......
...@@ -97,6 +97,12 @@ Bitmap BMP_BUBBLE_1 ...@@ -97,6 +97,12 @@ Bitmap BMP_BUBBLE_1
{ {
File = "bubble_52x60.png" ; File = "bubble_52x60.png" ;
}; };
Bitmap BMP_GL3D_BAR_ROUNDRECT
{
File = "gl3dbar_roundrect.png";
};
Bitmap BMP_AREAS_2D Bitmap BMP_AREAS_2D
{ {
File = "areas_52x60.png" ; File = "areas_52x60.png" ;
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#include <Bitmaps.hrc> #include <Bitmaps.hrc>
#include <ResId.hxx> #include <ResId.hxx>
#include <svtools/valueset.hxx>
namespace chart { namespace chart {
GL3DBarChartDialogController::GL3DBarChartDialogController() {} GL3DBarChartDialogController::GL3DBarChartDialogController() {}
...@@ -36,6 +38,15 @@ GL3DBarChartDialogController::getTemplateMap() const ...@@ -36,6 +38,15 @@ GL3DBarChartDialogController::getTemplateMap() const
return aMap; return aMap;
} }
void GL3DBarChartDialogController::fillSubTypeList(
ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ )
{
rSubTypeList.Clear();
rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_GL3D_BAR_ROUNDRECT))));
rSubTypeList.SetItemText(1, SchResId(STR_GL3D_BAR).toString());
}
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -23,6 +23,8 @@ public: ...@@ -23,6 +23,8 @@ public:
virtual OUString getName(); virtual OUString getName();
virtual Image getImage(); virtual Image getImage();
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const;
virtual void fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter );
}; };
} }
......
...@@ -144,7 +144,12 @@ String STR_BUBBLE_1 ...@@ -144,7 +144,12 @@ String STR_BUBBLE_1
String STR_TYPE_GL3D_BAR String STR_TYPE_GL3D_BAR
{ {
Text [ en-US ] = "GL 3D Bar"; Text [ en-US ] = "GL3D Bar";
};
String STR_GL3D_BAR
{
Text [ en-US ] = "GL3D Bar Chart";
}; };
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
#define STR_BUBBLE_1 (RID_APP_START + 283) #define STR_BUBBLE_1 (RID_APP_START + 283)
#define STR_TYPE_GL3D_BAR (RID_APP_START + 127) #define STR_TYPE_GL3D_BAR (RID_APP_START + 127)
#define STR_GL3D_BAR (RID_APP_START + 128)
//additional strings //additional strings
#define STR_TEXT_SEPARATOR (RID_APP_START + 20) #define STR_TEXT_SEPARATOR (RID_APP_START + 20)
......
...@@ -179,7 +179,6 @@ uno::Reference< XDiagram > SAL_CALL ChartTypeTemplate::createDiagramByDataSource ...@@ -179,7 +179,6 @@ uno::Reference< XDiagram > SAL_CALL ChartTypeTemplate::createDiagramByDataSource
} }
sal_Bool SAL_CALL ChartTypeTemplate::supportsCategories() sal_Bool SAL_CALL ChartTypeTemplate::supportsCategories()
throw (uno::RuntimeException, std::exception)
{ {
return sal_True; return sal_True;
} }
......
...@@ -92,8 +92,8 @@ protected: ...@@ -92,8 +92,8 @@ protected:
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments ) const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments )
throw (::com::sun::star::uno::RuntimeException, std::exception); throw (::com::sun::star::uno::RuntimeException, std::exception);
/// denotes if the chart needs categories at the first scale /// denotes if the chart needs categories at the first scale
virtual sal_Bool SAL_CALL supportsCategories() virtual sal_Bool SAL_CALL supportsCategories();
throw (::com::sun::star::uno::RuntimeException, std::exception);
virtual void SAL_CALL changeDiagram( virtual void SAL_CALL changeDiagram(
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram ) const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram )
throw (::com::sun::star::uno::RuntimeException, std::exception); throw (::com::sun::star::uno::RuntimeException, std::exception);
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
*/ */
#include "GL3DBarChartTypeTemplate.hxx" #include "GL3DBarChartTypeTemplate.hxx"
#include <servicenames_charttypes.hxx>
#include <macros.hxx>
using namespace com::sun::star; using namespace com::sun::star;
...@@ -21,14 +23,49 @@ GL3DBarChartTypeTemplate::~GL3DBarChartTypeTemplate() {} ...@@ -21,14 +23,49 @@ GL3DBarChartTypeTemplate::~GL3DBarChartTypeTemplate() {}
uno::Reference<chart2::XChartType> GL3DBarChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ ) uno::Reference<chart2::XChartType> GL3DBarChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
{ {
return uno::Reference<chart2::XChartType>(); uno::Reference<chart2::XChartType> xResult;
try
{
uno::Reference<lang::XMultiServiceFactory> xFact(
GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW);
xResult.set(xFact->createInstance(CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR), uno::UNO_QUERY_THROW);
}
catch (const uno::Exception & ex)
{
ASSERT_EXCEPTION( ex );
}
return xResult;
} }
uno::Reference<chart2::XChartType> uno::Reference<chart2::XChartType>
GL3DBarChartTypeTemplate::getChartTypeForNewSeries( GL3DBarChartTypeTemplate::getChartTypeForNewSeries(
const uno::Sequence<uno::Reference<chart2::XChartType> >& /*xOldChartTypes*/ ) const uno::Sequence<uno::Reference<chart2::XChartType> >& xOldChartTypes )
{
uno::Reference<chart2::XChartType> xResult;
try
{
uno::Reference<lang::XMultiServiceFactory> xFact(
GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW);
xResult.set(xFact->createInstance(CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR), uno::UNO_QUERY_THROW);
ChartTypeTemplate::copyPropertiesFromOldToNewCoordianteSystem(xOldChartTypes, xResult);
}
catch (const uno::Exception & ex)
{
ASSERT_EXCEPTION( ex );
}
return xResult;
}
sal_Bool GL3DBarChartTypeTemplate::supportsCategories()
{ {
return uno::Reference<chart2::XChartType>(); return false;
} }
} }
......
...@@ -34,6 +34,8 @@ public: ...@@ -34,6 +34,8 @@ public:
virtual css::uno::Reference<css::chart2::XChartType> SAL_CALL virtual css::uno::Reference<css::chart2::XChartType> SAL_CALL
getChartTypeForNewSeries( getChartTypeForNewSeries(
const css::uno::Sequence<css::uno::Reference<css::chart2::XChartType> >& xOldChartTypes ); const css::uno::Sequence<css::uno::Reference<css::chart2::XChartType> >& xOldChartTypes );
virtual sal_Bool SAL_CALL supportsCategories();
}; };
} }
......
...@@ -2416,6 +2416,9 @@ VSeriesPlotter* VSeriesPlotter::createSeriesPlotter( ...@@ -2416,6 +2416,9 @@ VSeriesPlotter* VSeriesPlotter::createSeriesPlotter(
, sal_Int32 nDimensionCount , sal_Int32 nDimensionCount
, bool bExcludingPositioning ) , bool bExcludingPositioning )
{ {
if (!xChartTypeModel.is())
return NULL;
OUString aChartType = xChartTypeModel->getChartType(); OUString aChartType = xChartTypeModel->getChartType();
VSeriesPlotter* pRet=NULL; VSeriesPlotter* pRet=NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment