chart2/source/view/main/ChartView.cxx | 14 ++++++++++++++ sw/uiconfig/swriter/ui/optredlinepage.ui | 4 ++++ 2 files changed, 18 insertions(+)
New commits: commit 8b23b7b793c5576084cddcd9f41e3e33f45077ca Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Jun 14 15:52:08 2024 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Jun 17 17:28:31 2024 +0200 crashtesting: avoid eventual assert when double inf is cast to sal_Int32 seen on loading forum-mso-en4-604220.xlsx and asserting on export to ods lets assume that an infinite Y position equates to ALIGN_BOTTOM which is the case seen in this example, and assume the same for infinite X and ALIGN_RIGHT if it arises Change-Id: I009a9cd94b7bd9ed66e18f8dbbb9eb91d37eaa65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168892 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> (cherry picked from commit 64da52a94738aa73cbcf2411952914d4e8e0f9ef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168940 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 5d2c2bf6cc90..50264035e316 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1119,6 +1119,20 @@ std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType aNewPosition = RelativePositionHelper::getCenterOfAnchoredObject( awt::Point(static_cast<sal_Int32>(fX),static_cast<sal_Int32>(fY)) , aTitleUnrotatedSize, aRelativePosition.Anchor, fAnglePi ); + + const bool bInfiniteY = std::isinf(aRelativePosition.Secondary); + if (bInfiniteY) + { + SAL_WARN("chart2", "infinite aRelativePosition.Secondary position, using ALIGN_BOTTOM"); + aNewPosition.Y = rRemainingSpace.Y + rRemainingSpace.Height - aTitleSize.Height/2 - nYDistance; + } + + const bool bInfiniteX = std::isinf(aRelativePosition.Primary); + if (bInfiniteX) + { + SAL_WARN("chart2", "infinite aRelativePosition.Primary position, using ALIGN_RIGHT"); + aNewPosition.X = rRemainingSpace.X + rRemainingSpace.Width - aTitleSize.Width/2 - nXDistance; + } } else //auto position { commit 52fd9f6a447509f5ea83abe64ca4a9f9bdb24af9 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sat Jun 15 20:34:27 2024 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Jun 17 17:28:24 2024 +0200 Gtk warnings about missing labels a problem since: commit 164596c00b4361b5b378609f026a1b11ac653970 Date: Tue Nov 14 12:13:21 2023 +0100 resave with newer glade version Change-Id: I2b69229c59ee07939da43b3013f64041c74f5967 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168930 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/uiconfig/swriter/ui/optredlinepage.ui b/sw/uiconfig/swriter/ui/optredlinepage.ui index f3dff70c519b..e20a3fc48024 100644 --- a/sw/uiconfig/swriter/ui/optredlinepage.ui +++ b/sw/uiconfig/swriter/ui/optredlinepage.ui @@ -91,6 +91,7 @@ <property name="receives-default">False</property> <property name="hexpand">True</property> <property name="xalign">0</property> + <property name="label" translatable="no"></property> <property name="draw-indicator">True</property> <child> <placeholder/> @@ -248,6 +249,7 @@ <property name="receives-default">False</property> <property name="hexpand">True</property> <property name="xalign">0</property> + <property name="label" translatable="no"></property> <property name="draw-indicator">True</property> <child> <placeholder/> @@ -405,6 +407,7 @@ <property name="receives-default">False</property> <property name="hexpand">True</property> <property name="xalign">0</property> + <property name="label" translatable="no"></property> <property name="draw-indicator">True</property> <child> <placeholder/> @@ -518,6 +521,7 @@ <property name="receives-default">False</property> <property name="hexpand">True</property> <property name="xalign">0</property> + <property name="label" translatable="no"></property> <property name="draw-indicator">True</property> <child> <placeholder/>