View | Details | Raw Unified | Return to issue 108860
Collapse All | Expand All

(-)sc/source/ui/vba/vbavalidation.cxx (-1 / +9 lines)
Lines 21-26 Link Here
21
21
22
22
23
#include "vbavalidation.hxx"
23
#include "vbavalidation.hxx"
24
#include "vbaformatcondition.hxx" //liuchen 2009-11-11
24
#include <com/sun/star/sheet/XSheetCondition.hpp>
25
#include <com/sun/star/sheet/XSheetCondition.hpp>
25
#include <com/sun/star/sheet/ValidationType.hpp>
26
#include <com/sun/star/sheet/ValidationType.hpp>
26
#include <com/sun/star/sheet/ValidationAlertStyle.hpp>
27
#include <com/sun/star/sheet/ValidationAlertStyle.hpp>
Lines 222-228 Link Here
222
	lcl_setValidationProps( m_xRange, xProps );
223
	lcl_setValidationProps( m_xRange, xProps );
223
}
224
}
224
void SAL_CALL 
225
void SAL_CALL 
225
ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const uno::Any& /*Operator*/, const uno::Any& Formula1, const uno::Any& Formula2 ) throw (uno::RuntimeException)
226
ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const uno::Any& Operator, const uno::Any& Formula1, const uno::Any& Formula2 ) throw (uno::RuntimeException)
226
{
227
{
227
	uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) );
228
	uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) );
228
	uno::Reference< sheet::XSheetCondition > xCond( xProps, uno::UNO_QUERY_THROW );
229
	uno::Reference< sheet::XSheetCondition > xCond( xProps, uno::UNO_QUERY_THROW );
Lines 287-292 Link Here
287
288
288
	xProps->setPropertyValue( ALERTSTYLE, uno::makeAny( eStyle ) );
289
	xProps->setPropertyValue( ALERTSTYLE, uno::makeAny( eStyle ) );
289
290
291
	//liuchen 2009-11-11 fix the defect that validation cannot work when the input should be limited between a lower bound and an upper bound
292
	if ( Operator.hasValue() )
293
	{
294
		css::sheet::ConditionOperator conOperator = ScVbaFormatCondition::retrieveAPIOperator( Operator );
295
		xCond->setOperator( conOperator );
296
	}	//liuchen 2009-11-11
297
290
	if ( sFormula1.getLength() )
298
	if ( sFormula1.getLength() )
291
		xCond->setFormula1( sFormula1 );
299
		xCond->setFormula1( sFormula1 );
292
	if ( sFormula2.getLength() )
300
	if ( sFormula2.getLength() )

Return to issue 108860