summaryrefslogtreecommitdiffstats
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-07-28 00:56:04 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-07-28 00:59:13 +0200
commit88f5d4ce866f6d574a34d706d2d71dc71aaa66e8 (patch)
tree85fe727e5d7a8812ac1a48cdb24c84127e730000 /chart2
parentRevert "provide a few more common property names" (diff)
downloadcore-88f5d4ce866f6d574a34d706d2d71dc71aaa66e8.tar.gz
core-88f5d4ce866f6d574a34d706d2d71dc71aaa66e8.zip
use common fill property names in chart2
Change-Id: I9445344efc70d872fdb9c9a8cc49838210861a7b
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/sidebar/ChartAreaPanel.cxx20
-rw-r--r--chart2/source/model/main/DataPointProperties.cxx47
2 files changed, 57 insertions, 10 deletions
diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
index f002a31fc1dd..640404a48eed 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
@@ -255,7 +255,7 @@ void ChartAreaPanel::setFillTransparence(const XFillTransparenceItem& rItem)
if (!xPropSet.is())
return;
- xPropSet->setPropertyValue("Transparency", css::uno::makeAny(rItem.GetValue()));
+ xPropSet->setPropertyValue("FillTransparence", css::uno::makeAny(rItem.GetValue()));
}
void ChartAreaPanel::setFillFloatTransparence(
@@ -268,7 +268,7 @@ void ChartAreaPanel::setFillFloatTransparence(
if (!rItem.IsEnabled())
{
- xPropSet->setPropertyValue("TransparencyGradientName", css::uno::makeAny(OUString()));
+ xPropSet->setPropertyValue("FillTransparenceGradientName", css::uno::makeAny(OUString()));
return;
}
@@ -276,7 +276,7 @@ void ChartAreaPanel::setFillFloatTransparence(
css::uno::Any aGradientVal;
rItem.QueryValue(aGradientVal, MID_FILLGRADIENT);
OUString aNewName = PropertyHelper::addTransparencyGradientUniqueNameToTable(aGradientVal, css::uno::Reference<css::lang::XMultiServiceFactory>(mxModel, css::uno::UNO_QUERY_THROW), aName);
- xPropSet->setPropertyValue("TransparencyGradientName", css::uno::makeAny(aNewName));
+ xPropSet->setPropertyValue("FillTransparenceGradientName", css::uno::makeAny(aNewName));
}
void ChartAreaPanel::setFillStyle(const XFillStyleItem& rItem)
@@ -298,7 +298,7 @@ void ChartAreaPanel::setFillStyleAndColor(const XFillStyleItem* pStyleItem,
if (pStyleItem)
xPropSet->setPropertyValue("FillStyle", css::uno::makeAny(pStyleItem->GetValue()));
- xPropSet->setPropertyValue("Color", css::uno::makeAny(rColorItem.GetValue()));
+ xPropSet->setPropertyValue("FillColor", css::uno::makeAny(rColorItem.GetValue()));
}
void ChartAreaPanel::setFillStyleAndGradient(const XFillStyleItem* pStyleItem,
@@ -311,7 +311,7 @@ void ChartAreaPanel::setFillStyleAndGradient(const XFillStyleItem* pStyleItem,
if (pStyleItem)
xPropSet->setPropertyValue("FillStyle", css::uno::makeAny(pStyleItem->GetValue()));
- xPropSet->setPropertyValue("GradientName", css::uno::makeAny(rGradientItem.GetValue()));
+ xPropSet->setPropertyValue("FillGradientName", css::uno::makeAny(rGradientItem.GetValue()));
}
void ChartAreaPanel::setFillStyleAndHatch(const XFillStyleItem* pStyleItem,
@@ -324,7 +324,7 @@ void ChartAreaPanel::setFillStyleAndHatch(const XFillStyleItem* pStyleItem,
if (pStyleItem)
xPropSet->setPropertyValue("FillStyle", css::uno::makeAny(pStyleItem->GetValue()));
- xPropSet->setPropertyValue("HatchName", css::uno::makeAny(rHatchItem.GetValue()));
+ xPropSet->setPropertyValue("FillHatchName", css::uno::makeAny(rHatchItem.GetValue()));
}
void ChartAreaPanel::setFillStyleAndBitmap(const XFillStyleItem* pStyleItem,
@@ -355,18 +355,18 @@ void ChartAreaPanel::updateData()
updateFillStyle(false, true, &aFillStyleItem);
sal_uInt16 nFillTransparence = 0;
- xPropSet->getPropertyValue("Transparency") >>= nFillTransparence;
+ xPropSet->getPropertyValue("FillTransparence") >>= nFillTransparence;
SfxUInt16Item aTransparenceItem(0, nFillTransparence);
updateFillTransparence(false, true, &aTransparenceItem);
OUString aGradientName;
- xPropSet->getPropertyValue("GradientName") >>= aGradientName;
+ xPropSet->getPropertyValue("FillGradientName") >>= aGradientName;
XGradient xGradient = getXGradientForName(mxModel, aGradientName);
XFillGradientItem aGradientItem(aGradientName, xGradient);
updateFillGradient(false, true, &aGradientItem);
OUString aHatchName;
- xPropSet->getPropertyValue("HatchName") >>= aHatchName;
+ xPropSet->getPropertyValue("FillHatchName") >>= aHatchName;
XHatch xHatch = getXHatchFromName(mxModel, aHatchName);
XFillHatchItem aHatchItem(aHatchName, xHatch);
updateFillHatch(false, true, &aHatchItem);
@@ -392,7 +392,7 @@ void ChartAreaPanel::updateData()
delete pBitmapItem;
OUString aFillFloatTransparenceName;
- xPropSet->getPropertyValue("TransparencyGradientName") >>= aFillFloatTransparenceName;
+ xPropSet->getPropertyValue("FillTransparenceGradientName") >>= aFillFloatTransparenceName;
XFillFloatTransparenceItem aFillFloatTransparenceItem;
if (!aFillFloatTransparenceName.isEmpty())
aFillFloatTransparenceItem.SetEnabled(true);
diff --git a/chart2/source/model/main/DataPointProperties.cxx b/chart2/source/model/main/DataPointProperties.cxx
index ab1116f423f5..064261d50562 100644
--- a/chart2/source/model/main/DataPointProperties.cxx
+++ b/chart2/source/model/main/DataPointProperties.cxx
@@ -59,12 +59,27 @@ void DataPointProperties::AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
+ Property( "FillColor",
+ PROP_DATAPOINT_COLOR,
+ cppu::UnoType<sal_Int32>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEVOID // "maybe auto"
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
+
+ rOutProperties.push_back(
Property( "Transparency",
PROP_DATAPOINT_TRANSPARENCY,
cppu::UnoType<sal_Int16>::get(),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT ));
+ rOutProperties.push_back(
+ Property( "FillTransparence",
+ PROP_DATAPOINT_TRANSPARENCY,
+ cppu::UnoType<sal_Int16>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
+
// Fill Properties
rOutProperties.push_back(
Property( "FillStyle",
@@ -82,6 +97,14 @@ void DataPointProperties::AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEVOID ));
rOutProperties.push_back(
+ Property( "FillTransparenceGradientName",
+ PROP_DATAPOINT_TRANSPARENCY_GRADIENT_NAME,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT
+ | beans::PropertyAttribute::MAYBEVOID ));
+
+ rOutProperties.push_back(
Property( "GradientName",
PROP_DATAPOINT_GRADIENT_NAME,
cppu::UnoType<OUString>::get(),
@@ -90,6 +113,14 @@ void DataPointProperties::AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEVOID ));
rOutProperties.push_back(
+ Property( "FillGradientName",
+ PROP_DATAPOINT_GRADIENT_NAME,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT
+ | beans::PropertyAttribute::MAYBEVOID ));
+
+ rOutProperties.push_back(
beans::Property( "GradientStepCount",
PROP_DATAPOINT_GRADIENT_STEPCOUNT,
cppu::UnoType<sal_Int16>::get(),
@@ -97,6 +128,13 @@ void DataPointProperties::AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEVOID ));
rOutProperties.push_back(
+ beans::Property( "FillGradientStepCount",
+ PROP_DATAPOINT_GRADIENT_STEPCOUNT,
+ cppu::UnoType<sal_Int16>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEVOID ));
+
+ rOutProperties.push_back(
Property( "HatchName",
PROP_DATAPOINT_HATCH_NAME,
cppu::UnoType<OUString>::get(),
@@ -105,12 +143,21 @@ void DataPointProperties::AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEVOID ));
rOutProperties.push_back(
+ Property( "FillHatchName",
+ PROP_DATAPOINT_HATCH_NAME,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT
+ | beans::PropertyAttribute::MAYBEVOID ));
+
+ rOutProperties.push_back(
Property( "FillBitmapName",
PROP_DATAPOINT_FILL_BITMAP_NAME,
cppu::UnoType<OUString>::get(),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT
| beans::PropertyAttribute::MAYBEVOID ));
+
rOutProperties.push_back(
Property( "FillBackground",
PROP_DATAPOINT_FILL_BACKGROUND,