core.git: avmedia/source include/avmedia svx/source
avmedia/source/framework/mediaitem.cxx | 18 ++ avmedia/source/viewer/mediawindow_impl.cxx | 27 ++- avmedia/source/viewer/mediawindow_impl.hxx |4 include/avmedia/mediaitem.hxx |3 +++ svx/source/svdraw/svdomedia.cxx|1 + svx/source/unodraw/unoshap4.cxx| 12 6 files changed, 64 insertions(+), 1 deletion(-) New commits: commit 134fb4747a80726e808909e6a2d2c9aa950bd6d1 Author: Vladislav Tarakanov AuthorDate: Tue Aug 13 18:11:35 2024 +0400 Commit: Mike Kaganski CommitDate: Wed Aug 14 00:19:23 2024 +0200 tdf#158510 Added fallback for media files in MediaWindowImpl When launching media from Properties -> Media Playback, no sound is currently playing. This is due to the fact that there is no fallback URL defined for MediaWindowImpl. To fix this problem, new methods have been added for setting and getting the fallback URL, passing the path to the presentation folder from "unoshap4.cxx" to "mediawindow_imp.cxx". Because the setURL method starts the media immediately, calls to "setFallbackURL" method must be made BEFORE calling "setURL". Change-Id: I3054c90c648c5839a2eb3fc463eaefbf97500c05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170644 Reviewed-by: Mike Kaganski Tested-by: Jenkins diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx index f7c65766b1f7..f587ced4241a 100644 --- a/avmedia/source/framework/mediaitem.cxx +++ b/avmedia/source/framework/mediaitem.cxx @@ -55,6 +55,7 @@ struct MediaItem::Impl { OUStringm_URL; OUStringm_TempFileURL; +OUStringm_FallbackURL; OUStringm_Referer; OUStringm_sMimeType; AVMediaSetMask m_nMaskSet; @@ -107,6 +108,7 @@ bool MediaItem::operator==( const SfxPoolItem& rItem ) const MediaItem const& rOther(static_cast< const MediaItem& >(rItem)); return m_pImpl->m_nMaskSet == rOther.m_pImpl->m_nMaskSet && m_pImpl->m_URL == rOther.m_pImpl->m_URL +&& m_pImpl->m_FallbackURL == rOther.m_pImpl->m_FallbackURL && m_pImpl->m_Referer == rOther.m_pImpl->m_Referer && m_pImpl->m_sMimeType == rOther.m_pImpl->m_sMimeType && m_pImpl->m_aGraphic == rOther.m_pImpl->m_aGraphic @@ -189,7 +191,11 @@ bool MediaItem::merge(const MediaItem& rMediaItem) const AVMediaSetMask nMaskSet = rMediaItem.getMaskSet(); if( AVMediaSetMask::URL & nMaskSet ) +{ +bChanged = m_pImpl->m_FallbackURL == rMediaItem.getFallbackURL(); +m_pImpl->m_FallbackURL = rMediaItem.getFallbackURL(); bChanged |= setURL(rMediaItem.getURL(), rMediaItem.getTempURL(), rMediaItem.getReferer()); +} if( AVMediaSetMask::MIME_TYPE & nMaskSet ) bChanged |= setMimeType(rMediaItem.getMimeType()); @@ -248,6 +254,18 @@ const OUString& MediaItem::getURL() const return m_pImpl->m_URL; } +bool MediaItem::setFallbackURL(const OUString& rURL) +{ +bool bChanged = rURL != m_pImpl->m_FallbackURL; +if (bChanged) +m_pImpl->m_FallbackURL = rURL; +return bChanged; +} +const OUString& MediaItem::getFallbackURL() const +{ +return m_pImpl->m_FallbackURL; +} + const OUString& MediaItem::getTempURL() const { return m_pImpl->m_TempFileURL; diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index ec7a08ff744f..48476a687d34 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -251,7 +252,19 @@ void MediaWindowImpl::setURL( const OUString& rURL, maFileURL = rURL; } -mxPlayer = createPlayer((!mTempFileURL.isEmpty()) ? mTempFileURL : maFileURL, rReferer, &m_sMimeType ); +OUString mediaURL; +// If the file with the given URL does not exist and a fallback is specified, then use it +if ( rURL.startsWith("file:///") + && !comphelper::DirectoryHelper::fileExists(maFileURL) + && maFallbackFileURL.getLength() > 0 ) +{ +mediaURL = maFallbackFileURL; +} +else +mediaURL = (!mTempFileURL.isEmpty()) ? mTempFileURL : maFileURL; + +mxPlayer = createPlayer(mediaURL, rReferer, &m_sMimeType ); + onURLChanged(); } @@ -260,6 +273,16 @@ const OUString& MediaWindowImpl::getURL() const return maFileURL; } +void MediaWindowImpl::setFallbackURL( const OUString& rURL ) +{ +maFallbackFileURL = rURL; +} + +const OUString& MediaWindowImpl::getFallbackURL() const +{ +return maFallbackFileURL; +} + bool MediaWindowImpl::isValid() const { return mxPlayer.is(); @@ -298,6 +321,7 @@ void MediaWindowImpl::updateMediaItem( MediaItem& rItem ) const rItem.setMute( mxPlaye
core.git: slideshow/source svx/source
slideshow/source/engine/shapes/mediashape.cxx |7 +-- slideshow/source/engine/shapes/viewmediashape.cxx | 17 +++-- slideshow/source/engine/shapes/viewmediashape.hxx |4 +++- slideshow/source/engine/slide/slideimpl.cxx |9 + slideshow/source/inc/slideshowcontext.hxx |1 + svx/source/unodraw/unoshap4.cxx | 11 --- 6 files changed, 33 insertions(+), 16 deletions(-) New commits: commit c658efe24f7a7eb4234c1c64668ea115788272e7 Author: Vladislav Tarakanov AuthorDate: Sun Jul 28 14:26:21 2024 +0400 Commit: Mike Kaganski CommitDate: Sun Jul 28 17:05:53 2024 +0200 tdf#158510 Don't change the initial URL when using fallback The current aURL conversions in the file "unoshap4.cxx" result in the URL obtained when importing the file being replaced with a new one formed from the presentation directory and file name. As a result, the model changes and saving is requested even if no changes were made to the presentation. To fix this problem, we added saving the presentation directory URL into the context for transfer from SlideImpl to ViewMediaShape. Regression after: fe897b36aef28dfe175461c43614e22588fcfd84 Change-Id: Ifda8610d0a4874ffa17e759fd45ddbbd2f934c0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170528 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/slideshow/source/engine/shapes/mediashape.cxx b/slideshow/source/engine/shapes/mediashape.cxx index c81fc87072c0..d45dc7ec7b03 100644 --- a/slideshow/source/engine/shapes/mediashape.cxx +++ b/slideshow/source/engine/shapes/mediashape.cxx @@ -88,6 +88,7 @@ namespace slideshow::internal typedef ::std::vector< ViewMediaShapeSharedPtr > ViewMediaShapeVector; ViewMediaShapeVector maViewMediaShapes; bool mbIsPlaying; +OUString maFallbackDir; }; } @@ -97,7 +98,8 @@ namespace slideshow::internal const SlideShowContext& rContext ) : ExternalShapeBase( xShape, nPrio, rContext ), maViewMediaShapes(), -mbIsPlaying(false) +mbIsPlaying(false), +maFallbackDir(rContext.maFallbackDir) { } @@ -127,7 +129,8 @@ namespace slideshow::internal maViewMediaShapes.push_back( std::make_shared( rNewLayer, getXShape(), - mxComponentContext )); + mxComponentContext, + maFallbackDir )); // push new size to view shape maViewMediaShapes.back()->resize( getBounds() ); diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index 83acbd7e5207..b31d392d8550 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -59,7 +60,8 @@ namespace slideshow::internal { ViewMediaShape::ViewMediaShape( const ViewLayerSharedPtr& rViewLayer, uno::Reference< drawing::XShape > xShape, -uno::Reference< uno::XComponentContext > xContext ) : +uno::Reference< uno::XComponentContext > xContext, +const OUString& aFallbackDir ) : mpViewLayer( rViewLayer ), maWindowOffset( 0, 0 ), maBounds(), @@ -67,7 +69,8 @@ namespace slideshow::internal mxPlayer(), mxPlayerWindow(), mxComponentContext(std::move( xContext )), -mbIsSoundEnabled(true) +mbIsSoundEnabled(true), +maFallbackDir(aFallbackDir) { ENSURE_OR_THROW( mxShape.is(), "ViewMediaShape::ViewMediaShape(): Invalid Shape" ); ENSURE_OR_THROW( mpViewLayer, "ViewMediaShape::ViewMediaShape(): Invalid View" ); @@ -294,6 +297,16 @@ namespace slideshow::internal } else if (xPropSet->getPropertyValue(u"MediaURL"_ustr) >>= aURL) { +if ( maFallbackDir.getLength() && + aURL.startsWith("file:///") && + !comphelper::DirectoryHelper::fileExists(aURL) ) +{ +auto fileNameStartIdx = aURL.l
core.git: svx/source
svx/source/unodraw/unoshap4.cxx | 12 1 file changed, 12 insertions(+) New commits: commit fe897b36aef28dfe175461c43614e22588fcfd84 Author: Vladislav Tarakanov AuthorDate: Fri Jul 12 04:22:21 2024 +0400 Commit: Mike Kaganski CommitDate: Fri Jul 12 14:02:42 2024 +0200 tdf#158510 Launch media from a presentation dir path Added a check for the existence of a file at a given URL. If the specified file could not be found, the path formed from the directory containing the presentation file and the file name is used. Change-Id: Ia4124f4fa5e5cef19c81f325676749a2540e486a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164023 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 19cb3c318986..5f25660c0d3f 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -822,6 +823,17 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr if( rValue >>= aURL ) { bOk = true; +if ( aURL.startsWith("file:///") && !comphelper::DirectoryHelper::fileExists(aURL) ) +{ +comphelper::IEmbeddedHelper* pPersist = GetSdrObject()->getSdrModelFromSdrObject().GetPersist(); +auto fileDirectoryEndIdx = pPersist->getDocumentBaseURL().lastIndexOf("/"); +auto fileNameStartIdx = aURL.lastIndexOf("/"); +if (fileDirectoryEndIdx != -1 && fileNameStartIdx != -1) +{ +aURL = OUString::Concat(pPersist->getDocumentBaseURL().subView(0, fileDirectoryEndIdx + 1)) ++ aURL.subView(fileNameStartIdx + 1); +} +} aItem.setURL( aURL, u""_ustr, referer_ ); } }
core.git: Branch 'libreoffice-24-2' - slideshow/source
slideshow/source/engine/slideoverlaybutton.cxx | 10 +- slideshow/source/engine/slideoverlaybutton.hxx |1 + 2 files changed, 10 insertions(+), 1 deletion(-) New commits: commit f0164f2755be1e759894601d6097ef70e0411f3d Author: Vladislav Tarakanov AuthorDate: Thu Jan 4 20:09:38 2024 +0400 Commit: Samuel Mehrbrodt CommitDate: Mon Feb 5 12:58:07 2024 +0100 tdf#158924 Handle multi-clicks for navigation bar Added handling for navigation bar buttons when many quick clicks have been made. To do this, after processing the first click, the number of clicks in the series is stored in a new variable. Until the entire series of clicks has been processed, the slide switch will not occur. Change-Id: I8f4416a0c7928bb78609be8ff52252782c37f5a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161625 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit ab320f4e11c70b50e5beddf12ad925f192941d9a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162904 diff --git a/slideshow/source/engine/slideoverlaybutton.cxx b/slideshow/source/engine/slideoverlaybutton.cxx index 40ade676b383..987cd11dfb8c 100644 --- a/slideshow/source/engine/slideoverlaybutton.cxx +++ b/slideshow/source/engine/slideoverlaybutton.cxx @@ -170,7 +170,15 @@ bool SlideOverlayButton::handleMouseReleased(const css::awt::MouseEvent& e) && clickPnt.getY() > btnPnt.getY() && clickPnt.getY() < btnPnt.getY() + mxIconBitmap->getSize().Height) { -mClickHandler(clickPnt); +if (mnIgnoreClicksCnt == 0) +{ +mnIgnoreClicksCnt = e.ClickCount - 1; +mClickHandler(clickPnt); +} +else +{ +mnIgnoreClicksCnt--; +} return true; } return false; diff --git a/slideshow/source/engine/slideoverlaybutton.hxx b/slideshow/source/engine/slideoverlaybutton.hxx index db733a2b2cd4..7358743ee3e9 100644 --- a/slideshow/source/engine/slideoverlaybutton.hxx +++ b/slideshow/source/engine/slideoverlaybutton.hxx @@ -96,6 +96,7 @@ private: ViewsVecT maViews; ScreenUpdater& mrScreenUpdater; bool mbVisible = false; +sal_Int32 mnIgnoreClicksCnt = 0; }; }
core.git: slideshow/source
slideshow/source/engine/slideoverlaybutton.cxx | 10 +- slideshow/source/engine/slideoverlaybutton.hxx |1 + 2 files changed, 10 insertions(+), 1 deletion(-) New commits: commit ab320f4e11c70b50e5beddf12ad925f192941d9a Author: Vladislav Tarakanov AuthorDate: Thu Jan 4 20:09:38 2024 +0400 Commit: Samuel Mehrbrodt CommitDate: Mon Feb 5 07:15:06 2024 +0100 tdf#158924 Handle multi-clicks for navigation bar Added handling for navigation bar buttons when many quick clicks have been made. To do this, after processing the first click, the number of clicks in the series is stored in a new variable. Until the entire series of clicks has been processed, the slide switch will not occur. Change-Id: I8f4416a0c7928bb78609be8ff52252782c37f5a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161625 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/slideshow/source/engine/slideoverlaybutton.cxx b/slideshow/source/engine/slideoverlaybutton.cxx index 14b78337e489..2d2cb62ebeba 100644 --- a/slideshow/source/engine/slideoverlaybutton.cxx +++ b/slideshow/source/engine/slideoverlaybutton.cxx @@ -172,7 +172,15 @@ bool SlideOverlayButton::handleMouseReleased(const css::awt::MouseEvent& e) && clickPnt.getY() > btnPnt.getY() && clickPnt.getY() < btnPnt.getY() + mxIconBitmap->getSize().Height) { -mClickHandler(clickPnt); +if (mnIgnoreClicksCnt == 0) +{ +mnIgnoreClicksCnt = e.ClickCount - 1; +mClickHandler(clickPnt); +} +else +{ +mnIgnoreClicksCnt--; +} return true; } return false; diff --git a/slideshow/source/engine/slideoverlaybutton.hxx b/slideshow/source/engine/slideoverlaybutton.hxx index e872a821d3b7..ceec9eed7b59 100644 --- a/slideshow/source/engine/slideoverlaybutton.hxx +++ b/slideshow/source/engine/slideoverlaybutton.hxx @@ -97,6 +97,7 @@ private: ViewsVecT maViews; ScreenUpdater& mrScreenUpdater; bool mbVisible = false; +sal_Int32 mnIgnoreClicksCnt = 0; }; }
core.git: Branch 'distro/collabora/co-23.05' - vcl/unx
vcl/unx/gtk3/gtkframe.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 62bfa279b7395f108bdc093784f81f412f4e107c Author: Vladislav Tarakanov AuthorDate: Thu Jun 22 14:58:06 2023 +0400 Commit: Aron Budea CommitDate: Fri Feb 2 01:13:34 2024 +0100 tdf#155955 - small Calc window size after deleting the configuration file Set the default window size for the case when the configuration file is missing Change-Id: I58391590557678e927fcefd49a8f43511c08e3ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153430 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara (cherry picked from commit be53ee28d7435809e71e7e6b2ce929c87f07ba33) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162883 Tested-by: Jenkins CollaboraOffice Reviewed-by: Aron Budea diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx index d26e3301ffb0..9e7c7c6ad254 100644 --- a/vcl/unx/gtk3/gtkframe.cxx +++ b/vcl/unx/gtk3/gtkframe.cxx @@ -974,6 +974,11 @@ void GtkSalFrame::InitCommon() m_pFixedContainer = GTK_FIXED(gtk_fixed_new()); m_pDrawingArea = GTK_DRAWING_AREA(gtk_drawing_area_new()); #endif +if (GTK_IS_WINDOW(m_pWindow)) +{ +Size aDefWindowSize = calcDefaultSize(); +gtk_window_set_default_size(GTK_WINDOW(m_pWindow), aDefWindowSize.Width(), aDefWindowSize.Height()); +} gtk_widget_set_can_focus(GTK_WIDGET(m_pFixedContainer), true); gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), 1, 1); #if !GTK_CHECK_VERSION(4,0,0)
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sal/rtl
sal/rtl/strtmpl.hxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit ea5dbb6e3dd2fdb84cf68d95174c183aae34488c Author: Vladislav Tarakanov AuthorDate: Thu Jul 20 14:45:51 2023 +0400 Commit: Eike Rathke CommitDate: Fri Jul 21 13:19:08 2023 +0200 tdf#139306 Incorrect nDecPlaces value after clamping nDecPlaces clamping diap changed from +-20 to +-309 and buffer is resized for new value Change-Id: Icb2130891598cf02623bbf5bd0273edab529d124 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153815 Tested-by: Jenkins Reviewed-by: Eike Rathke (cherry picked from commit 9655e14663419780a74deb87f393ce11e03d0843) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154693 diff --git a/sal/rtl/strtmpl.hxx b/sal/rtl/strtmpl.hxx index eece825ec082..bb49cfaf0aa4 100644 --- a/sal/rtl/strtmpl.hxx +++ b/sal/rtl/strtmpl.hxx @@ -1540,7 +1540,7 @@ void doubleToString(rtl_tString** pResult, sal_Int32* pResultCapacity, sal_Int32 // rtl_math_DecimalPlaces_Max was passed with rtl_math_StringFormat_F or // others, but we don't want to allocate/deallocate 2GB just to fill it // with trailing '0' characters.. -nDecPlaces = std::clamp(nDecPlaces, -20, 20); +nDecPlaces = std::clamp(nDecPlaces, -309, 309); sal_Int32 nDigits = nDecPlaces + 1; @@ -1566,9 +1566,9 @@ void doubleToString(rtl_tString** pResult, sal_Int32* pResultCapacity, sal_Int32 sal_Int32 nBuf = (nDigits <= 0 ? std::max(nDecPlaces, std::abs(nExp)) : nDigits + nDecPlaces) + 10 + (pGroups ? std::abs(nDigits) * 2 : 0); -// max(nDigits) = max(nDecPlaces) + 1 + max(nExp) + 1 = 20 + 1 + 308 + 1 = 330 -// max(nBuf) = max(nDigits) + max(nDecPlaces) + 10 + max(nDigits) * 2 = 330 * 3 + 20 + 10 = 1020 -assert(nBuf <= 1024); +// max(nDigits) = max(nDecPlaces) + 1 + max(nExp) + 1 = 309 + 1 + 308 + 1 = 619 +// max(nBuf) = max(nDigits) + max(nDecPlaces) + 10 + max(nDigits) * 2 = 619 * 3 + 309 + 10 = 2176 +assert(nBuf <= 2176); auto* const pBuf = static_cast*>(alloca(nBuf * sizeof(Char_T))); auto* p = pBuf; if (bSign)
[Libreoffice-commits] core.git: sal/rtl
sal/rtl/strtmpl.hxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 3f96f9cdd542bcc05cdd531da3c35bc6f0c2986b Author: Vladislav Tarakanov AuthorDate: Thu Jul 20 14:45:51 2023 +0400 Commit: Eike Rathke CommitDate: Fri Jul 21 00:51:36 2023 +0200 tdf#139306 Incorrect nDecPlaces value after clamping nDecPlaces clamping diap changed from +-20 to +-309 and buffer is resized for new value Change-Id: Icb2130891598cf02623bbf5bd0273edab529d124 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153815 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/sal/rtl/strtmpl.hxx b/sal/rtl/strtmpl.hxx index eece825ec082..bb49cfaf0aa4 100644 --- a/sal/rtl/strtmpl.hxx +++ b/sal/rtl/strtmpl.hxx @@ -1540,7 +1540,7 @@ void doubleToString(rtl_tString** pResult, sal_Int32* pResultCapacity, sal_Int32 // rtl_math_DecimalPlaces_Max was passed with rtl_math_StringFormat_F or // others, but we don't want to allocate/deallocate 2GB just to fill it // with trailing '0' characters.. -nDecPlaces = std::clamp(nDecPlaces, -20, 20); +nDecPlaces = std::clamp(nDecPlaces, -309, 309); sal_Int32 nDigits = nDecPlaces + 1; @@ -1566,9 +1566,9 @@ void doubleToString(rtl_tString** pResult, sal_Int32* pResultCapacity, sal_Int32 sal_Int32 nBuf = (nDigits <= 0 ? std::max(nDecPlaces, std::abs(nExp)) : nDigits + nDecPlaces) + 10 + (pGroups ? std::abs(nDigits) * 2 : 0); -// max(nDigits) = max(nDecPlaces) + 1 + max(nExp) + 1 = 20 + 1 + 308 + 1 = 330 -// max(nBuf) = max(nDigits) + max(nDecPlaces) + 10 + max(nDigits) * 2 = 330 * 3 + 20 + 10 = 1020 -assert(nBuf <= 1024); +// max(nDigits) = max(nDecPlaces) + 1 + max(nExp) + 1 = 309 + 1 + 308 + 1 = 619 +// max(nBuf) = max(nDigits) + max(nDecPlaces) + 10 + max(nDigits) * 2 = 619 * 3 + 309 + 10 = 2176 +assert(nBuf <= 2176); auto* const pBuf = static_cast*>(alloca(nBuf * sizeof(Char_T))); auto* p = pBuf; if (bSign)
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/gtkframe.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit be53ee28d7435809e71e7e6b2ce929c87f07ba33 Author: Vladislav Tarakanov AuthorDate: Thu Jun 22 14:58:06 2023 +0400 Commit: Caolán McNamara CommitDate: Thu Jun 22 18:35:24 2023 +0200 tdf#155955 - small Calc window size after deleting the configuration file Set the default window size for the case when the configuration file is missing Change-Id: I58391590557678e927fcefd49a8f43511c08e3ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153430 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx index ea13a70ad0ca..516ada842a8c 100644 --- a/vcl/unx/gtk3/gtkframe.cxx +++ b/vcl/unx/gtk3/gtkframe.cxx @@ -990,6 +990,11 @@ void GtkSalFrame::InitCommon() #endif m_pDrawingArea = GTK_DRAWING_AREA(gtk_drawing_area_new()); #endif +if (GTK_IS_WINDOW(m_pWindow)) +{ +Size aDefWindowSize = calcDefaultSize(); +gtk_window_set_default_size(GTK_WINDOW(m_pWindow), aDefWindowSize.Width(), aDefWindowSize.Height()); +} gtk_widget_set_can_focus(GTK_WIDGET(m_pFixedContainer), true); gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), 1, 1); #if !GTK_CHECK_VERSION(4,0,0)