Kaydet (Commit) b1d2bbec authored tarafından Markus Mohrhard's avatar Markus Mohrhard

add warning about bad input

Change-Id: I7018813740460c79d09318770fbdcb24a24a441e
üst 3604dc4f
...@@ -271,6 +271,7 @@ namespace canvas ...@@ -271,6 +271,7 @@ namespace canvas
} }
virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToARGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) SAL_OVERRIDE virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToARGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) SAL_OVERRIDE
{ {
SAL_WARN_IF(deviceColor.getLength() == 0, "canvas", "empty deviceColor argument");
const double* pIn( deviceColor.getConstArray() ); const double* pIn( deviceColor.getConstArray() );
const sal_Size nLen( deviceColor.getLength() ); const sal_Size nLen( deviceColor.getLength() );
ENSURE_ARG_OR_THROW2(nLen%4==0, ENSURE_ARG_OR_THROW2(nLen%4==0,
......
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