calc56: #i112666# broken UNO API tests due to broken method XDiagram::setPosition() and wrongly flagged properties
This commit is contained in:
parent
da291caaae
commit
c4fc6f85c5
2 changed files with 11 additions and 12 deletions
|
@ -239,14 +239,14 @@ void lcl_AddPropertiesToVector(
|
|||
Property( C2U( "DisableComplexChartTypes" ),
|
||||
PROP_DOCUMENT_DISABLE_COMPLEX_CHARTTYPES,
|
||||
::getBooleanCppuType(),
|
||||
beans::PropertyAttribute::BOUND
|
||||
| beans::PropertyAttribute::MAYBEDEFAULT ) );
|
||||
//#i112666# no PropertyChangeEvent is fired on change so far
|
||||
beans::PropertyAttribute::MAYBEDEFAULT ) );
|
||||
rOutProperties.push_back(
|
||||
Property( C2U( "DisableDataTableDialog" ),
|
||||
PROP_DOCUMENT_DISABLE_DATATABLE_DIALOG,
|
||||
::getBooleanCppuType(),
|
||||
beans::PropertyAttribute::BOUND
|
||||
| beans::PropertyAttribute::MAYBEDEFAULT ) );
|
||||
//#i112666# no PropertyChangeEvent is fired on change so far
|
||||
beans::PropertyAttribute::MAYBEDEFAULT ) );
|
||||
}
|
||||
|
||||
const uno::Sequence< Property > & lcl_GetPropertySequence()
|
||||
|
|
|
@ -749,20 +749,19 @@ void SAL_CALL DiagramWrapper::setPosition( const awt::Point& aPosition )
|
|||
Reference< beans::XPropertySet > xProp( this->getInnerPropertySet() );
|
||||
if( xProp.is() )
|
||||
{
|
||||
if( aPosition.X < 0 || aPosition.Y < 0 || aPosition.X > 1 || aPosition.Y > 1 )
|
||||
{
|
||||
DBG_ERROR("DiagramWrapper::setPosition called with a position out of range -> automatic values are taken instead" );
|
||||
uno::Any aEmpty;
|
||||
xProp->setPropertyValue( C2U( "RelativePosition" ), aEmpty );
|
||||
return;
|
||||
}
|
||||
|
||||
awt::Size aPageSize( m_spChart2ModelContact->GetPageSize() );
|
||||
|
||||
chart2::RelativePosition aRelativePosition;
|
||||
aRelativePosition.Anchor = drawing::Alignment_TOP_LEFT;
|
||||
aRelativePosition.Primary = double(aPosition.X)/double(aPageSize.Width);
|
||||
aRelativePosition.Secondary = double(aPosition.Y)/double(aPageSize.Height);
|
||||
if( aRelativePosition.Primary < 0 || aRelativePosition.Secondary < 0 || aRelativePosition.Primary > 1 || aRelativePosition.Secondary > 1 )
|
||||
{
|
||||
DBG_ERROR("DiagramWrapper::setPosition called with a position out of range -> automatic values are taken instead" );
|
||||
uno::Any aEmpty;
|
||||
xProp->setPropertyValue( C2U( "RelativePosition" ), aEmpty );
|
||||
return;
|
||||
}
|
||||
xProp->setPropertyValue( C2U( "RelativePosition" ), uno::makeAny(aRelativePosition) );
|
||||
xProp->setPropertyValue( C2U( "PosSizeExcludeAxes" ), uno::makeAny(false) );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue