Kaydet (Commit) faf9b82d authored tarafından Noel Grandin's avatar Noel Grandin

makeAny->Any in accessibility..avmedia

Change-Id: I70f2dfa66d7b66738a840e4a7b5c7fb1b8d7b39f
Reviewed-on: https://gerrit.libreoffice.org/33756Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst cd2088f1
......@@ -315,7 +315,7 @@ void AccessibleBrowseBoxBase::setAccessibleName( const OUString& rName )
commitEvent(
AccessibleEventId::NAME_CHANGED,
uno::makeAny( maName ),
uno::Any( maName ),
aOld );
}
......@@ -330,7 +330,7 @@ void AccessibleBrowseBoxBase::setAccessibleDescription( const OUString& rDescrip
commitEvent(
AccessibleEventId::DESCRIPTION_CHANGED,
uno::makeAny( maDescription ),
uno::Any( maDescription ),
aOld );
}
......
......@@ -83,7 +83,7 @@ namespace accessibility
nValue = 2;
break;
}
return makeAny(nValue);
return Any(nValue);
}
sal_Bool SAL_CALL AccessibleCheckBoxCell::setCurrentValue( const Any& )
......
......@@ -330,7 +330,7 @@ void AccessibleGridControl::commitTableEvent(sal_Int16 _nEventId,const Any& _rNe
sal_Int32 nColumnCount = m_aTable.GetColumnCount();
xChild = m_xImpl->m_xTable->getAccessibleChild(nCurrentRow * nColumnCount + nCurrentCol);
}
m_xImpl->m_xTable->commitEvent(_nEventId, makeAny(xChild),_rOldValue);
m_xImpl->m_xTable->commitEvent(_nEventId, Any(xChild),_rOldValue);
}
else if(_nEventId == AccessibleEventId::TABLE_MODEL_CHANGED)
{
......
......@@ -948,21 +948,21 @@ Document::retrieveCharacterAttributes(
//character font name
aAttribs[i].Name = "CharFontName";
aAttribs[i].Handle = -1;
aAttribs[i].Value = css::uno::makeAny( aFont.GetFamilyName() );
aAttribs[i].Value = css::uno::Any( aFont.GetFamilyName() );
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
//character height
aAttribs[i].Name = "CharHeight";
aAttribs[i].Handle = -1;
aAttribs[i].Value = css::uno::makeAny( (sal_Int16)aFont.GetFontHeight() );
aAttribs[i].Value = css::uno::Any( (sal_Int16)aFont.GetFontHeight() );
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
//character posture
aAttribs[i].Name = "CharPosture";
aAttribs[i].Handle = -1;
aAttribs[i].Value = css::uno::makeAny( (sal_Int16)aFont.GetItalic() );
aAttribs[i].Value = css::uno::Any( (sal_Int16)aFont.GetItalic() );
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
......@@ -970,7 +970,7 @@ Document::retrieveCharacterAttributes(
/*
aAttribs[i].Name = "CharRelief";
aAttribs[i].Handle = -1;
aAttribs[i].Value = css::uno::makeAny( (sal_Int16)aFont.GetRelief() );
aAttribs[i].Value = css::uno::Any( (sal_Int16)aFont.GetRelief() );
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
*/
......@@ -978,28 +978,28 @@ Document::retrieveCharacterAttributes(
//character strikeout
aAttribs[i].Name = "CharStrikeout";
aAttribs[i].Handle = -1;
aAttribs[i].Value = css::uno::makeAny( (sal_Int16)aFont.GetStrikeout() );
aAttribs[i].Value = css::uno::Any( (sal_Int16)aFont.GetStrikeout() );
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
//character underline
aAttribs[i].Name = "CharUnderline";
aAttribs[i].Handle = -1;
aAttribs[i].Value = css::uno::makeAny( (sal_Int16)aFont.GetUnderline() );
aAttribs[i].Value = css::uno::Any( (sal_Int16)aFont.GetUnderline() );
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
//character weight
aAttribs[i].Name = "CharWeight";
aAttribs[i].Handle = -1;
aAttribs[i].Value = css::uno::makeAny( (float)aFont.GetWeight() );
aAttribs[i].Value = css::uno::Any( (float)aFont.GetWeight() );
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
//character alignment
aAttribs[i].Name = "ParaAdjust";
aAttribs[i].Handle = -1;
aAttribs[i].Value = css::uno::makeAny( (sal_Int16)m_rEngine.GetTextAlign() );
aAttribs[i].Value = css::uno::Any( (sal_Int16)m_rEngine.GetTextAlign() );
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
......@@ -1601,7 +1601,7 @@ IMPL_LINK(Document, WindowEventHandler, ::VclWindowEvent&, rEvent, void)
css::accessibility::AccessibleEventId::
STATE_CHANGED,
css::uno::Any(),
css::uno::makeAny(
css::uno::Any(
css::accessibility::AccessibleStateType::
FOCUSED));
}
......@@ -1614,7 +1614,7 @@ IMPL_LINK(Document, WindowEventHandler, ::VclWindowEvent&, rEvent, void)
css::accessibility::AccessibleEventId::
STATE_CHANGED,
css::uno::Any(),
css::uno::makeAny(
css::uno::Any(
css::accessibility::AccessibleStateType::
FOCUSED));
*/
......@@ -1636,7 +1636,7 @@ IMPL_LINK(Document, WindowEventHandler, ::VclWindowEvent&, rEvent, void)
xParagraph->notifyEvent(
css::accessibility::AccessibleEventId::
STATE_CHANGED,
css::uno::makeAny(
css::uno::Any(
css::accessibility::AccessibleStateType::
FOCUSED),
css::uno::Any());
......@@ -1651,7 +1651,7 @@ IMPL_LINK(Document, WindowEventHandler, ::VclWindowEvent&, rEvent, void)
xParagraph->notifyEvent(
css::accessibility::AccessibleEventId::
STATE_CHANGED,
css::uno::makeAny(
css::uno::Any(
css::accessibility::AccessibleStateType::
FOCUSED),
css::uno::Any());
......@@ -1765,7 +1765,7 @@ void Document::notifyVisibleRangeChanges(
NotifyAccessibleEvent(
css::accessibility::AccessibleEventId::
CHILD,
css::uno::makeAny(getAccessibleChild(aIt)),
css::uno::Any(getAccessibleChild(aIt)),
css::uno::Any());
}
for (Paragraphs::iterator aIt(m_aVisibleBegin); aIt != m_aVisibleEnd;
......@@ -1777,7 +1777,7 @@ void Document::notifyVisibleRangeChanges(
css::accessibility::AccessibleEventId::
CHILD,
css::uno::Any(),
css::uno::makeAny(getAccessibleChild(aIt)));
css::uno::Any(getAccessibleChild(aIt)));
}
}
......@@ -1868,7 +1868,7 @@ void Document::handleParagraphNotifications()
NotifyAccessibleEvent(
css::accessibility::AccessibleEventId::
CHILD,
css::uno::makeAny(getAccessibleChild(aIt)),
css::uno::Any(getAccessibleChild(aIt)),
css::uno::Any());
}
disposeParagraphs();
......@@ -1956,7 +1956,7 @@ void Document::handleParagraphNotifications()
NotifyAccessibleEvent(
css::accessibility::AccessibleEventId::
CHILD,
css::uno::makeAny(xStrong),
css::uno::Any(xStrong),
css::uno::Any());
css::uno::Reference< css::lang::XComponent > xComponent(
......@@ -2159,7 +2159,7 @@ void Document::handleSelectionChangeNotification()
xParagraph->notifyEvent(
css::accessibility::AccessibleEventId::
STATE_CHANGED,
css::uno::makeAny(
css::uno::Any(
css::accessibility::AccessibleStateType::FOCUSED),
css::uno::Any());
}
......@@ -2182,7 +2182,7 @@ void Document::handleSelectionChangeNotification()
css::accessibility::AccessibleEventId::
STATE_CHANGED,
css::uno::Any(),
css::uno::makeAny(
css::uno::Any(
css::accessibility::AccessibleStateType::FOCUSED));
if (nNewLastPara != m_nSelectionLastPara
|| nNewLastPos != m_nSelectionLastPos)
......@@ -2192,7 +2192,7 @@ void Document::handleSelectionChangeNotification()
css::uno::makeAny< ::sal_Int32 >(
nNewLastPara == m_nSelectionLastPara
? m_nSelectionLastPos : 0),
css::uno::makeAny(nNewLastPos));
css::uno::Any(nNewLastPos));
}
}
m_aFocused = aIt;
......@@ -2388,7 +2388,7 @@ void Document::disposeParagraphs()
// static
css::uno::Any Document::mapFontColor(::Color const & rColor)
{
return css::uno::makeAny(
return css::uno::Any(
static_cast< ::sal_Int32 >(COLORDATA_RGB(rColor.GetColor())));
// FIXME keep transparency?
}
......@@ -2418,7 +2418,7 @@ css::uno::Any Document::mapFontWeight(::FontWeight nWeight)
css::awt::FontWeight::BOLD, // WEIGHT_BOLD
css::awt::FontWeight::ULTRABOLD, // WEIGHT_ULTRABOLD
css::awt::FontWeight::BLACK }; // WEIGHT_BLACK
return css::uno::makeAny(aWeight[nWeight]);
return css::uno::Any(aWeight[nWeight]);
}
// static
......
......@@ -27,19 +27,19 @@ using namespace ::com::sun::star::beans;
CharacterAttributesHelper::CharacterAttributesHelper( const vcl::Font& rFont, sal_Int32 nBackColor, sal_Int32 nColor )
{
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharBackColor" ), makeAny( (sal_Int32) nBackColor ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharColor" ), makeAny( (sal_Int32) nColor ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontCharSet" ), makeAny( (sal_Int16) rFont.GetCharSet() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontFamily" ), makeAny( (sal_Int16) rFont.GetFamilyType() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontName" ), makeAny( rFont.GetFamilyName() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontPitch" ), makeAny( (sal_Int16) rFont.GetPitch() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontStyleName" ), makeAny( rFont.GetStyleName() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharHeight" ), makeAny( (sal_Int16) rFont.GetFontSize().Height() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharScaleWidth" ), makeAny( (sal_Int16) rFont.GetFontSize().Width() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharStrikeout" ), makeAny( (sal_Int16) rFont.GetStrikeout() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharUnderline" ), makeAny( (sal_Int16) rFont.GetUnderline() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharWeight" ), makeAny( (float) rFont.GetWeight() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharPosture" ), makeAny( (sal_Int16)rFont.GetItalic() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharBackColor" ), Any( (sal_Int32) nBackColor ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharColor" ), Any( (sal_Int32) nColor ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontCharSet" ), Any( (sal_Int16) rFont.GetCharSet() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontFamily" ), Any( (sal_Int16) rFont.GetFamilyType() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontName" ), Any( rFont.GetFamilyName() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontPitch" ), Any( (sal_Int16) rFont.GetPitch() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontStyleName" ), Any( rFont.GetStyleName() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharHeight" ), Any( (sal_Int16) rFont.GetFontSize().Height() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharScaleWidth" ), Any( (sal_Int16) rFont.GetFontSize().Width() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharStrikeout" ), Any( (sal_Int16) rFont.GetStrikeout() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharUnderline" ), Any( (sal_Int16) rFont.GetUnderline() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharWeight" ), Any( (float) rFont.GetWeight() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharPosture" ), Any( (sal_Int16)rFont.GetItalic() ) ) );
}
......
......@@ -324,7 +324,7 @@ Sequence< PropertyValue > VCLXAccessibleEdit::getCharacterAttributes( sal_Int32
{
if (aValue.Name == "CharColor")
{
aValue.Value = css::uno::makeAny(static_cast< sal_Int32 >(COLORDATA_RGB(pFontColor->GetColor().GetColor())));
aValue.Value = css::uno::Any(static_cast< sal_Int32 >(COLORDATA_RGB(pFontColor->GetColor().GetColor())));
break;
}
}
......@@ -341,7 +341,7 @@ Sequence< PropertyValue > VCLXAccessibleEdit::getCharacterAttributes( sal_Int32
OutputDevice* pDev = Application::GetDefaultDevice();
if ( pDev )
{
aValue.Value = css::uno::makeAny(static_cast< sal_Int32 >(pDev->GetSettings().GetStyleSettings().GetFieldTextColor().GetColor()));
aValue.Value = css::uno::Any(static_cast< sal_Int32 >(pDev->GetSettings().GetStyleSettings().GetFieldTextColor().GetColor()));
}
}
break;
......
......@@ -316,7 +316,7 @@ void VCLXAccessibleToolBox::implReleaseToolboxItem( ToolBoxItemsMap::iterator& _
if ( _bNotifyRemoval )
{
NotifyAccessibleEvent( AccessibleEventId::CHILD, makeAny( xItemAcc ), Any() );
NotifyAccessibleEvent( AccessibleEventId::CHILD, Any( xItemAcc ), Any() );
}
OToolBoxWindowItem* pWindowItem = nullptr;
......@@ -378,7 +378,7 @@ void VCLXAccessibleToolBox::UpdateItem_Impl( sal_Int32 _nPos)
// TODO: we should make this dependent on the existence of event listeners
// with the current implementation, we always create accessible object
Any aNewChild = makeAny( getAccessibleChild( (sal_Int32)_nPos ) );
Any aNewChild = Any( getAccessibleChild( (sal_Int32)_nPos ) );
NotifyAccessibleEvent( AccessibleEventId::CHILD, Any(), aNewChild );
}
}
......@@ -633,7 +633,7 @@ void VCLXAccessibleToolBox::ProcessWindowChildEvent( const VclWindowEvent& rVclW
{
Reference< XAccessible > xReturn = GetItemWindowAccessible(rVclWindowEvent);
if ( xReturn.is() )
NotifyAccessibleEvent( AccessibleEventId::CHILD, Any(), makeAny(xReturn) );
NotifyAccessibleEvent( AccessibleEventId::CHILD, Any(), Any(xReturn) );
else
HandleSubToolBarEvent( rVclWindowEvent );
}
......
......@@ -215,8 +215,8 @@ void VCLXAccessibleToolBoxItem::SetChild( const Reference< XAccessible >& _xChil
void VCLXAccessibleToolBoxItem::NotifyChildEvent( const Reference< XAccessible >& _xChild, bool _bShow )
{
Any aOld = _bShow ? Any() : makeAny( _xChild );
Any aNew = _bShow ? makeAny( _xChild ) : Any();
Any aOld = _bShow ? Any() : Any( _xChild );
Any aNew = _bShow ? Any( _xChild ) : Any();
NotifyAccessibleEvent( AccessibleEventId::CHILD, aOld, aNew );
}
......@@ -696,12 +696,12 @@ sal_Bool VCLXAccessibleToolBoxItem::setCurrentValue( const Any& aNumber )
Any VCLXAccessibleToolBoxItem::getMaximumValue( )
{
return makeAny((sal_Int32)1);
return Any((sal_Int32)1);
}
Any VCLXAccessibleToolBoxItem::getMinimumValue( )
{
return makeAny((sal_Int32)0);
return Any((sal_Int32)0);
}
......
......@@ -73,7 +73,7 @@ using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::uno::Exception;
using ::com::sun::star::uno::XWeak;
using ::com::sun::star::uno::Type;
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::Any;
using ::com::sun::star::lang::NoSupportException;
using ::com::sun::star::lang::IllegalArgumentException;
using ::com::sun::star::lang::WrappedTargetException;
......@@ -388,7 +388,7 @@ Any SAL_CALL TimeContainerEnumeration::nextElement()
if( maIter == maChildren.end() )
throw NoSuchElementException();
return makeAny( (*maIter++) );
return Any( *maIter++ );
}
......@@ -1972,7 +1972,7 @@ void AnimationNode::fireChangeListener()
{
Reference< XInterface > xSource( static_cast<OWeakObject*>(this), UNO_QUERY );
Sequence< ElementChange > aChanges;
const ChangesEvent aEvent( xSource, makeAny( mxParent.get() ), aChanges );
const ChangesEvent aEvent( xSource, Any( mxParent.get() ), aChanges );
while( aIterator.hasMoreElements() )
{
Reference< XChangesListener > xListener( aIterator.next(), UNO_QUERY );
......
......@@ -417,12 +417,12 @@ CreateStream(uno::Reference<embed::XStorage> const& xStorage,
uno::Reference< beans::XPropertySet > const xStreamProps(xStream,
uno::UNO_QUERY);
if (xStreamProps.is()) { // this is NOT supported in FileSystemStorage
xStreamProps->setPropertyValue("MediaType", uno::makeAny(OUString(
xStreamProps->setPropertyValue("MediaType", uno::Any(OUString(
//FIXME how to detect real media type?
//but currently xmloff has this one hardcoded anyway...
"application/vnd.sun.star.media")));
xStreamProps->setPropertyValue( // turn off compression
"Compressed", uno::makeAny(false));
"Compressed", uno::Any(false));
}
return xStream;
}
......
......@@ -266,7 +266,7 @@ bool MediaWindow::executeMediaURLDialog(vcl::Window*,
// for video link should be the default
xCtrlAcc->setValue(
ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0,
uno::makeAny(true) );
uno::Any(true) );
// disabled for now: TODO: preview?
xCtrlAcc->enableControl(
ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PREVIEW,
......
......@@ -465,9 +465,9 @@ void MediaWindowImpl::onURLChanged()
const Point aPoint;
const Size aSize(mpChildWindow->GetSizePixel());
aArgs[0] = uno::makeAny(mpChildWindow->GetParentWindowHandle());
aArgs[1] = uno::makeAny(awt::Rectangle(aPoint.X(), aPoint.Y(), aSize.Width(), aSize.Height()));
aArgs[2] = uno::makeAny(reinterpret_cast<sal_IntPtr>(mpChildWindow.get()));
aArgs[0] = uno::Any(mpChildWindow->GetParentWindowHandle());
aArgs[1] = uno::Any(awt::Rectangle(aPoint.X(), aPoint.Y(), aSize.Width(), aSize.Height()));
aArgs[2] = uno::Any(reinterpret_cast<sal_IntPtr>(mpChildWindow.get()));
try
{
......
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