21#include <unonames.hxx>
22#include <ooo/vba/excel/XlFormatConditionType.hpp>
34 if ( !pFormatConditions )
36 return pFormatConditions;
40 const uno::Reference< uno::XComponentContext > & xContext,
41 const uno::Reference< sheet::XSheetConditionalEntry >& _xSheetConditionalEntry,
42 uno::Reference< excel::XStyle > _xStyle,
43 uno::Reference< excel::XFormatConditions > _xFormatConditions,
44 uno::Reference< css::beans::XPropertySet > _xPropertySet )
46 uno::
Reference< sheet::XSheetCondition >( _xSheetConditionalEntry, css::
uno::UNO_QUERY_THROW ) ),
47 moFormatConditions(
std::move( _xFormatConditions )), mxStyle(
std::move( _xStyle )), mxParentRangePropertySet(
std::move(
_xPropertySet ))
69 pFormatConditions->
Add(_nType, _aOperator, _aFormula1, _aFormula2,
mxStyle);
71 catch (
const uno::Exception&)
77uno::Reference< excel::XInterior > SAL_CALL
83uno::Reference< excel::XFont > SAL_CALL
93sheet::ConditionOperator
96 sheet::ConditionOperator aAPIType = sheet::ConditionOperator_NONE;
99 case excel::XlFormatConditionType::xlExpression:
100 aAPIType = sheet::ConditionOperator_FORMULA;
102 case excel::XlFormatConditionType::xlCellValue:
103 if ( _xSheetCondition.is() && (_xSheetCondition->getOperator() == sheet::ConditionOperator_FORMULA ) )
104 aAPIType = sheet::ConditionOperator_NONE;
115 sal_Int32 nReturnType = 0;
117 nReturnType = excel::XlFormatConditionType::xlExpression;
119 nReturnType = excel::XlFormatConditionType::xlCellValue;
136 catch (uno::Exception& )
145 return "ScVbaFormatCondition";
148uno::Sequence< OUString >
153 "ooo.vba.excel.FormatCondition"
css::uno::Reference< css::sheet::XSheetCondition > mxSheetCondition
virtual sal_Int32 SAL_CALL Operator() override=0
Sequence< OUString > aServiceNames
Reference< XPropertySet > _xPropertySet
#define ERRCODE_BASIC_METHOD_FAILED
constexpr OUStringLiteral SC_UNONAME_CONDFMT