avmedia/source/gstreamer/gstplayer.cxx | 26 ++++++++++++++-- chart2/source/controller/main/ChartController_Tools.cxx | 26 ++++++++++++---- 2 files changed, 45 insertions(+), 7 deletions(-)
New commits: commit 273f59bdb5f446c119e1de4000e5bc7fb7266ea6 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Jun 28 16:13:59 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Jun 28 18:53:50 2022 +0200 improve debug output for gstreamer backend Change-Id: I9fd7af5726ebbca933d69a38669281f40c6c0319 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136576 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx index bf939c4a603b..49a3a3351ccf 100644 --- a/avmedia/source/gstreamer/gstplayer.cxx +++ b/avmedia/source/gstreamer/gstplayer.cxx @@ -442,6 +442,28 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message ) "error: '" << error->message << "' debug: '" << error_debug << "'"); } + else if ( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_WARNING ) + { + GError* error; + gchar* error_debug; + + gst_message_parse_warning( message, &error, &error_debug ); + SAL_WARN( + "avmedia.gstreamer", + "warning: '" << error->message << "' debug: '" + << error_debug << "'"); + } + else if ( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_INFO ) + { + GError* error; + gchar* error_debug; + + gst_message_parse_info( message, &error, &error_debug ); + SAL_WARN( + "avmedia.gstreamer", + "info: '" << error->message << "' debug: '" + << error_debug << "'"); + } #endif if (!mbUseGtkSink) @@ -612,6 +634,8 @@ void SAL_CALL Player::start() { gst_element_set_state( mpPlaybin, GST_STATE_PLAYING ); } + + SAL_INFO( "avmedia.gstreamer", AVVERSION "start " << mpPlaybin ); } void SAL_CALL Player::stop() @@ -637,8 +661,6 @@ sal_Bool SAL_CALL Player::isPlaying() bRet = GST_STATE_TARGET(mpPlaybin) == GST_STATE_PLAYING; } - SAL_INFO( "avmedia.gstreamer", AVVERSION "isPlaying " << bRet ); - return bRet; } commit ebbf3ccf693d5b6813746e72719e04e1c7cd438d Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Jun 28 14:54:56 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Jun 28 18:53:37 2022 +0200 tdf#117539 Assert after cut and paste operation of a chart stick Change-Id: I314d263dc37a7af3969ba9eb32ac00997457003d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136574 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 40da1941e643..2d67c5ce0a33 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -367,14 +367,30 @@ void ChartController::impl_PasteGraphic( xGraphicShape->SvxShape::setPropertyValue( "Graphic", uno::Any( xGraphic )); awt::Size aGraphicSize( 1000, 1000 ); + bool bGotGraphicSize = false; + try + { + bGotGraphicSize = xGraphicShape->SvxShape::getPropertyValue( "Size100thMM") >>= aGraphicSize; + } + catch (css::beans::UnknownPropertyException& ) + {} auto pChartWindow(GetChartWindow()); // first try size in 100th mm, then pixel size - if( ! ( xGraphicShape->SvxShape::getPropertyValue( "Size100thMM") >>= aGraphicSize ) && - ( ( xGraphicShape->SvxShape::getPropertyValue( "SizePixel") >>= aGraphicSize ) && pChartWindow )) + if( !bGotGraphicSize ) { - ::Size aVCLSize( pChartWindow->PixelToLogic( Size( aGraphicSize.Width, aGraphicSize.Height ))); - aGraphicSize.Width = aVCLSize.getWidth(); - aGraphicSize.Height = aVCLSize.getHeight(); + bool bGotSizePixel = false; + try + { + bGotSizePixel = xGraphicShape->SvxShape::getPropertyValue( "SizePixel") >>= aGraphicSize; + } + catch (css::beans::UnknownPropertyException& ) + {} + if ( bGotSizePixel && pChartWindow ) + { + ::Size aVCLSize( pChartWindow->PixelToLogic( Size( aGraphicSize.Width, aGraphicSize.Height ))); + aGraphicSize.Width = aVCLSize.getWidth(); + aGraphicSize.Height = aVCLSize.getHeight(); + } } xGraphicShape->setSize( aGraphicSize ); xGraphicShape->setPosition( awt::Point( 0, 0 ) );