summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2022-02-20 15:26:25 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2022-02-20 20:43:26 +0100
commit0b0d41b48fa7c5aebd42bdce60dab77421743ae1 (patch)
treedfdd98c049f95c9cb620408b3f45c09420de8918
parentac65b4bb7a75ec71294a527bc4139356fcbf0929 (diff)
Fix --disable-avmedia build
Regression from commit 6f938dce6eaa927cfde39491ef7a0bc1d07df66b ("update video pos and size after change if currently playing"). Change-Id: Ib618fcd7347255d0cae352b7fc90aa85a2c14d32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130215 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
-rw-r--r--svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx2
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx14
2 files changed, 11 insertions, 5 deletions
diff --git a/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx b/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
index d362048df3db..891c920aed79 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
@@ -54,7 +54,7 @@ namespace sdr::contact
virtual void ActionChanged() override;
private:
- void updateMediaWindow() const;
+ void updateMediaWindow(bool bShow) const;
#if HAVE_FEATURE_AVMEDIA
std::unique_ptr<sdr::contact::SdrMediaWindow> mpMediaWindow;
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
index 0241fabd5661..777017472bf6 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
@@ -87,12 +87,15 @@ Size ViewObjectContactOfSdrMediaObj::getPreferredSize() const
void ViewObjectContactOfSdrMediaObj::ActionChanged()
{
ViewObjectContactOfSdrObj::ActionChanged();
- if (mpMediaWindow && mpMediaWindow->isVisible())
- updateMediaWindow();
+ updateMediaWindow(false);
}
-void ViewObjectContactOfSdrMediaObj::updateMediaWindow() const
+void ViewObjectContactOfSdrMediaObj::updateMediaWindow(bool bShow) const
{
+#if HAVE_FEATURE_AVMEDIA
+ if (!mpMediaWindow || (!bShow && !mpMediaWindow->isVisible()))
+ return;
+
basegfx::B2DRange aViewRange(getObjectRange());
aViewRange.transform(GetObjectContact().getViewInformation2D().getViewTransformation());
@@ -120,6 +123,9 @@ void ViewObjectContactOfSdrMediaObj::updateMediaWindow() const
// through to gtk which will now accept it as the underlying
// m_pSocket of GtkSalObject::SetPosSize is now visible
mpMediaWindow->setPosSize(aViewRectangle);
+#else
+ (void) bShow;
+#endif
}
void ViewObjectContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& rItem ) const
@@ -137,7 +143,7 @@ void ViewObjectContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& rIte
}
else
{
- updateMediaWindow();
+ updateMediaWindow(true);
}
#else
(void) rItem;