Prepare for removal of non-const operator[] from Sequence in avmedia

Change-Id: Iefa86987f6ce43610177b7c4122744d37386ad6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124335
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski
2021-10-28 16:02:46 +03:00
parent ada320547d
commit eee0b76a8c
2 changed files with 15 additions and 16 deletions

View File

@@ -133,18 +133,16 @@ bool MediaItem::GetPresentation( SfxItemPresentation,
bool MediaItem::QueryValue( css::uno::Any& rVal, sal_uInt8 ) const bool MediaItem::QueryValue( css::uno::Any& rVal, sal_uInt8 ) const
{ {
uno::Sequence< uno::Any > aSeq( 10 ); uno::Sequence< uno::Any > aSeq{ uno::Any(m_pImpl->m_URL),
uno::Any(static_cast<sal_uInt32>(m_pImpl->m_nMaskSet)),
aSeq[ 0 ] <<= m_pImpl->m_URL; uno::Any(static_cast< sal_Int32 >( m_pImpl->m_eState )),
aSeq[ 1 ] <<= static_cast<sal_uInt32>(m_pImpl->m_nMaskSet); uno::Any(m_pImpl->m_fTime),
aSeq[ 2 ] <<= static_cast< sal_Int32 >( m_pImpl->m_eState ); uno::Any(m_pImpl->m_fDuration),
aSeq[ 3 ] <<= m_pImpl->m_fTime; uno::Any(m_pImpl->m_nVolumeDB),
aSeq[ 4 ] <<= m_pImpl->m_fDuration; uno::Any(m_pImpl->m_bLoop),
aSeq[ 5 ] <<= m_pImpl->m_nVolumeDB; uno::Any(m_pImpl->m_bMute),
aSeq[ 6 ] <<= m_pImpl->m_bLoop; uno::Any(m_pImpl->m_eZoom),
aSeq[ 7 ] <<= m_pImpl->m_bMute; uno::Any(m_pImpl->m_sMimeType) };
aSeq[ 8 ] <<= m_pImpl->m_eZoom;
aSeq[ 9 ] <<= m_pImpl->m_sMimeType;
rVal <<= aSeq; rVal <<= aSeq;

View File

@@ -415,7 +415,6 @@ void MediaWindowImpl::onURLChanged()
if (mxPlayer.is()) if (mxPlayer.is())
{ {
Resize(); Resize();
uno::Sequence<uno::Any> aArgs( 3 );
uno::Reference<media::XPlayerWindow> xPlayerWindow; uno::Reference<media::XPlayerWindow> xPlayerWindow;
const Point aPoint; const Point aPoint;
const Size aSize(mpChildWindow->GetSizePixel()); const Size aSize(mpChildWindow->GetSizePixel());
@@ -425,9 +424,11 @@ void MediaWindowImpl::onURLChanged()
// tdf#139609 gtk doesn't need the handle, and fetching it is undesirable // tdf#139609 gtk doesn't need the handle, and fetching it is undesirable
if (!pEnvData || pEnvData->toolkit != SystemEnvData::Toolkit::Gtk) if (!pEnvData || pEnvData->toolkit != SystemEnvData::Toolkit::Gtk)
nParentWindowHandle = mpChildWindow->GetParentWindowHandle(); nParentWindowHandle = mpChildWindow->GetParentWindowHandle();
aArgs[0] <<= nParentWindowHandle; uno::Sequence<uno::Any> aArgs{
aArgs[1] <<= awt::Rectangle(aPoint.X(), aPoint.Y(), aSize.Width(), aSize.Height()); uno::Any(nParentWindowHandle),
aArgs[2] <<= reinterpret_cast<sal_IntPtr>(mpChildWindow.get()); uno::Any(awt::Rectangle(aPoint.X(), aPoint.Y(), aSize.Width(), aSize.Height())),
uno::Any(reinterpret_cast<sal_IntPtr>(mpChildWindow.get()))
};
try try
{ {