summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-03-27 13:47:15 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-03-29 00:47:19 -0400
commit68e20faf3f05038301269870f61205785227450a (patch)
treeaf8dd587872d26b1354f418d89aa2e12953c2048 /chart2
parent801e399f95a4da6101c8570455860fd537a90b95 (diff)
Start using common symbols for textural UNO property names.
This will make it easier to track all uses of a UNO property name using symbol database lookup, which is much faster and more accurate than grepping. Change-Id: I8c2857504c29bcce01eb8c1f406dcbfb24331510
Diffstat (limited to 'chart2')
-rw-r--r--chart2/inc/unonames.hxx18
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx5
-rw-r--r--chart2/source/controller/dialogs/ChartTypeDialogController.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx13
-rw-r--r--chart2/source/model/main/Diagram.cxx6
-rw-r--r--chart2/source/model/template/GL3DBarChartType.cxx3
-rw-r--r--chart2/source/view/main/ChartView.cxx5
7 files changed, 40 insertions, 15 deletions
diff --git a/chart2/inc/unonames.hxx b/chart2/inc/unonames.hxx
new file mode 100644
index 000000000000..6f800f8d40e2
--- /dev/null
+++ b/chart2/inc/unonames.hxx
@@ -0,0 +1,18 @@
+/* -*- 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 CHART2_UNONAMES_HXX
+#define CHART2_UNONAMES_HXX
+
+#define CHART_UNONAME_SORT_BY_XVALUES "SortByXValues"
+#define CHART_UNONAME_ROUNDED_EDGE "RoundedEdge"
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 5ea89aa06033..3160e3edb330 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -47,6 +47,7 @@
#include <comphelper/InlineContainer.hxx>
#include "WrappedAutomaticPositionProperties.hxx"
#include "CommonConverters.hxx"
+#include <unonames.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/chart2/XTitled.hpp>
@@ -230,7 +231,7 @@ void lcl_AddPropertiesToVector(
//new for XY charts
rOutProperties.push_back(
- Property( "SortByXValues",
+ Property( CHART_UNONAME_SORT_BY_XVALUES,
PROP_DIAGRAM_SORT_BY_X_VALUES,
::getBooleanCppuType(),
beans::PropertyAttribute::BOUND
@@ -447,7 +448,7 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEVOID ));
rOutProperties.push_back(
- Property( "RoundedEdge",
+ Property( CHART_UNONAME_ROUNDED_EDGE,
PROP_DIAGRAM_ROUNDED_EDGE,
::getCppuBooleanType(),
beans::PropertyAttribute::BOUND
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 4ade1fd7a118..031c46806a5d 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -27,6 +27,7 @@
#include "DiagramHelper.hxx"
#include "ControllerLockGuard.hxx"
#include "AxisHelper.hxx"
+#include <unonames.hxx>
#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
#include <com/sun/star/chart2/PieChartOffsetMode.hpp>
@@ -341,8 +342,8 @@ bool ChartTypeDialogController::commitToModel( const ChartTypeParameter& rParame
uno::Reference<beans::XPropertySet> xDiaProp(xDiagram, uno::UNO_QUERY);
if (xDiaProp.is())
{
- xDiaProp->setPropertyValue("SortByXValues" , uno::makeAny(rParameter.bSortByXValues));
- xDiaProp->setPropertyValue("RoundedEdge", uno::makeAny(rParameter.mbRoundedEdge));
+ xDiaProp->setPropertyValue(CHART_UNONAME_SORT_BY_XVALUES, uno::makeAny(rParameter.bSortByXValues));
+ xDiaProp->setPropertyValue(CHART_UNONAME_ROUNDED_EDGE, uno::makeAny(rParameter.mbRoundedEdge));
}
}
return false;
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 104fe0efeaef..5e111b89be8d 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -26,6 +26,7 @@
#include "ControllerLockGuard.hxx"
#include "macros.hxx"
#include "GL3DBarChartDialogController.hxx"
+#include <unonames.hxx>
#include <svtools/controldims.hrc>
@@ -832,8 +833,8 @@ void ChartTypeTabPage::stateChanged( ChangingResource* /*pResource*/ )
try
{
uno::Reference<beans::XPropertySet> xPropSet(xDiagram, uno::UNO_QUERY_THROW);
- xPropSet->getPropertyValue("SortByXValues") >>= aParameter.bSortByXValues;
- xPropSet->getPropertyValue("RoundedEdge") >>= aParameter.mbRoundedEdge;
+ xPropSet->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
+ xPropSet->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= aParameter.mbRoundedEdge;
}
catch ( const uno::Exception& ex )
{
@@ -899,8 +900,8 @@ void ChartTypeTabPage::selectMainType()
try
{
uno::Reference<beans::XPropertySet> xPropSet(xDiagram, uno::UNO_QUERY_THROW);
- xPropSet->getPropertyValue("SortByXValues") >>= aParameter.bSortByXValues;
- xPropSet->getPropertyValue("RoundedEdge") >>= aParameter.mbRoundedEdge;
+ xPropSet->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
+ xPropSet->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= aParameter.mbRoundedEdge;
}
catch ( const uno::Exception& ex )
{
@@ -984,8 +985,8 @@ void ChartTypeTabPage::initializePage()
try
{
uno::Reference<beans::XPropertySet> xPropSet(xDiagram, uno::UNO_QUERY_THROW);
- xPropSet->getPropertyValue("SortByXValues") >>= aParameter.bSortByXValues;
- xPropSet->getPropertyValue("RoundedEdge") >>= aParameter.mbRoundedEdge;
+ xPropSet->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
+ xPropSet->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= aParameter.mbRoundedEdge;
}
catch (const uno::Exception& ex)
{
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 157df268d26d..6c75a3f8170c 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -31,6 +31,8 @@
#include "SceneProperties.hxx"
#include "DisposeHelper.hxx"
#include "BaseGFXHelper.hxx"
+#include <unonames.hxx>
+
#include <basegfx/numeric/ftools.hxx>
#include <rtl/instance.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -104,7 +106,7 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
- Property( "SortByXValues",
+ Property( CHART_UNONAME_SORT_BY_XVALUES,
PROP_DIAGRAM_SORT_BY_X_VALUES,
::getBooleanCppuType(),
beans::PropertyAttribute::BOUND
@@ -199,7 +201,7 @@ void lcl_AddPropertiesToVector(
beans::PropertyAttribute::MAYBEVOID ));
rOutProperties.push_back(
- Property( "RoundedEdge",
+ Property( CHART_UNONAME_ROUNDED_EDGE,
PROP_DIAGRAM_ROUNDED_EDGE,
::getCppuBooleanType(),
beans::PropertyAttribute::MAYBEVOID));
diff --git a/chart2/source/model/template/GL3DBarChartType.cxx b/chart2/source/model/template/GL3DBarChartType.cxx
index 4dc4e46ce140..4e8868ccbae1 100644
--- a/chart2/source/model/template/GL3DBarChartType.cxx
+++ b/chart2/source/model/template/GL3DBarChartType.cxx
@@ -10,6 +10,7 @@
#include "GL3DBarChartType.hxx"
#include <servicenames_charttypes.hxx>
#include <PropertyHelper.hxx>
+#include <unonames.hxx>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -59,7 +60,7 @@ struct InfoHelperInitializer
uno::Sequence<beans::Property> aRet(1);
aRet[0] = beans::Property(
- "RoundedEdge",
+ CHART_UNONAME_ROUNDED_EDGE,
PROP_GL3DCHARTTYPE_ROUNDED_EDGE,
::getCppuBooleanType(),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT);
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 04905675ed6f..ae0929dd180f 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -47,6 +47,7 @@
#include "DataSeriesHelper.hxx"
#include "DateHelper.hxx"
#include "defines.hxx"
+#include <unonames.hxx>
#include <rtl/uuid.h>
#include <comphelper/scopeguard.hxx>
@@ -141,7 +142,7 @@ void debugGL3DOutput( ChartModel& rModel )
{
uno::Reference<beans::XPropertySet> xPropSet(xDiagram, uno::UNO_QUERY_THROW);
bool bRoundedEdge = false;
- xPropSet->getPropertyValue("RoundedEdge") >>= bRoundedEdge;
+ xPropSet->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= bRoundedEdge;
fprintf(stdout, "GL3D: rounded edge = %d\n", bRoundedEdge);
}
@@ -628,7 +629,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
try
{
uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY_THROW );
- xDiaProp->getPropertyValue( "SortByXValues" ) >>= bSortByXValues;
+ xDiaProp->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= bSortByXValues;
xDiaProp->getPropertyValue( "ConnectBars" ) >>= bConnectBars;
xDiaProp->getPropertyValue( "GroupBarsPerAxis" ) >>= bGroupBarsPerAxis;
xDiaProp->getPropertyValue( "IncludeHiddenCells" ) >>= bIncludeHiddenCells;