summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/condformatuno.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-04-02 15:31:04 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-02 17:31:24 +0200
commit2560c5222c811a3975fdccfd8a4f423e52a15e10 (patch)
treef484cdf180450a337050f123539c91ae949aab3d /sc/source/ui/unoobj/condformatuno.cxx
parent68cec355eb75f1a03dabc5ccb29c97d281de3f32 (diff)
add properties for new databar properties
Change-Id: Icc65283a1e60ea61af917432e3fb577e7b0370a7
Diffstat (limited to 'sc/source/ui/unoobj/condformatuno.cxx')
-rw-r--r--sc/source/ui/unoobj/condformatuno.cxx26
1 files changed, 25 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx
index 745ea4744e5c..a12c32aaa4fe 100644
--- a/sc/source/ui/unoobj/condformatuno.cxx
+++ b/sc/source/ui/unoobj/condformatuno.cxx
@@ -149,7 +149,9 @@ enum DataBarProperties
DataBar_Color,
AxisColor,
NegativeColor,
- DataBarEntries
+ DataBarEntries,
+ MinimumLength,
+ MaximumLength
};
const SfxItemPropertyMapEntry* getDataBarPropSet()
@@ -164,6 +166,8 @@ const SfxItemPropertyMapEntry* getDataBarPropSet()
{OUString("AxisColor"), AxisColor, cppu::UnoType<sal_Int32>::get(), 0, 0},
{OUString("NegativeColor"), NegativeColor, cppu::UnoType<sal_Int32>::get(), 0, 0},
{OUString("DataBarEntries"), DataBarEntries, cppu::UnoType<uno::Sequence< sheet::XDataBarEntry >>::get(), 0, 0 },
+ {OUString("MinimumLength"), MinimumLength, cppu::UnoType<double>::get(), 0, 0 },
+ {OUString("MaximumLength"), MaximumLength, cppu::UnoType<double>::get(), 0, 0 },
{OUString(), 0, css::uno::Type(), 0, 0}
};
return aDataBarPropertyMap_Impl;
@@ -1267,6 +1271,26 @@ void SAL_CALL ScDataBarFormatObj::setPropertyValue(
throw lang::IllegalArgumentException();
}
break;
+ case MinimumLength:
+ {
+ double nLength = 0;
+ if ((aValue >>= nLength) && nLength < 100 && nLength >= 0)
+ {
+ getCoreObject()->GetDataBarData()->mnMinLength = nLength;
+ }
+ else throw lang::IllegalArgumentException();
+ }
+ break;
+ case MaximumLength:
+ {
+ double nLength = 0;
+ if ((aValue >>= nLength) && nLength <= 100 && nLength > 0)
+ {
+ getCoreObject()->GetDataBarData()->mnMaxLength = nLength;
+ }
+ else throw lang::IllegalArgumentException();
+ }
+ break;
}
}