[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svtools/source

2023-06-14 Thread Mike Kaganski (via logerrit)
 svtools/source/misc/unitconv.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f7e52df2dde0b80f33123790681e94785154d566
Author: Mike Kaganski 
AuthorDate: Mon Jun 12 12:23:17 2023 +0300
Commit: Michael Stahl 
CommitDate: Wed Jun 14 10:58:08 2023 +0200

tdf#154349: round before converting to an integer

Commit cfff893b9c82843a90aac4ecdb3a3936721b74a0 (Move unit conversion
code to o3tl, and unify on that in more places, 2021-02-14) changed a
custom conversion code in CalcToUnit doing inexact conversion from
points to mm/20 (with "* 10 / 567"), with correct conversion function.
A side effect was, however, that the imprecise arithmetics provided
floating-point values that rounded down to correct integers (or maybe
it was all the chain of calculations down to this function), while
the correctly converted values could round down to a smaller value.

Fix this problem using rounding.

Change-Id: I42e0d56b068832ef309f6b696f661642e62ddacb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152894
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit cf0fe26f95b5435d65623165cf7ba381eaa0738a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152981
Reviewed-by: Michael Stahl 

diff --git a/svtools/source/misc/unitconv.cxx b/svtools/source/misc/unitconv.cxx
index 395c1b4ac810..cb4fdf6901dd 100644
--- a/svtools/source/misc/unitconv.cxx
+++ b/svtools/source/misc/unitconv.cxx
@@ -128,7 +128,7 @@ tools::Long CalcToUnit( float nIn, MapUnit eUnit )
 eUnit == MapUnit::MapCM, "this unit is not implemented" );
 
 if (const auto eTo = MapToO3tlLength(eUnit); eTo != o3tl::Length::invalid)
-return o3tl::convert(nIn, o3tl::Length::pt, eTo);
+return std::round(o3tl::convert(nIn, o3tl::Length::pt, eTo));
 
 return 0;
 }


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svtools/source

2023-05-30 Thread Khaled Hosny (via logerrit)
 svtools/source/misc/sampletext.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 547bfbdbdaaa3b44f76952275bf87453f7c8293a
Author: Khaled Hosny 
AuthorDate: Sun May 28 13:06:42 2023 +0300
Commit: Xisco Fauli 
CommitDate: Tue May 30 16:03:18 2023 +0200

tdf#154547: Improve Hebrew font preview sample text

The Hebrew font preview sample text include Nikkud (vowel marks) which
are optional for modern Hebrew and not all Hebrew fonts have them, and
for fonts lacking them we use a much shorter preview text.

The inclusion of Nikkud is unnecessary and we don’t include vowel marks
in many other scripts (e.g. Arabic where they are more used).

This patch drop the Nikkud marks and leaves the sample text otherwise
unchanged.

Change-Id: Ie4e5abcd74599d25db41c4cdf7e1d3bf997a998c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152350
Tested-by: Jenkins
Reviewed-by: خالد حسني 
(cherry picked from commit da09513ae6221f46ee453943b3669d1d922a4aa3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152319
Reviewed-by: Xisco Fauli 

diff --git a/svtools/source/misc/sampletext.cxx 
b/svtools/source/misc/sampletext.cxx
index abcfde92b7a1..9000f6f73d6c 100644
--- a/svtools/source/misc/sampletext.cxx
+++ b/svtools/source/misc/sampletext.cxx
@@ -232,9 +232,8 @@ OUString makeShortRepresentativeTextForScript(UScriptCode 
eScript)
 case USCRIPT_HEBREW:
 {
 static constexpr OUStringLiteral aHebr =
-u"\u05D0\u05B8\u05DC\u05B6\u05E3\u05BE\u05D1\u05B5"
-"\u05BC\u05D9\u05EA \u05E2\u05B4\u05D1\u05B0"
-"\u05E8\u05B4\u05D9";
+u"\u05D0\u05DC\u05E3\u05BE\u05D1\u05D9\u05EA "
+"\u05E2\u05D1\u05E8\u05D9";
 sSampleText = aHebr;
 break;
 }


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svtools/source

2023-03-09 Thread Ilhan Yesil (via logerrit)
 svtools/source/uno/wizard/wizardpagecontroller.cxx |   26 +
 1 file changed, 22 insertions(+), 4 deletions(-)

New commits:
commit f933248c042e6fa8ed29daf19fd8bba47a5cc3d6
Author: Ilhan Yesil 
AuthorDate: Fri Dec 16 07:30:13 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Thu Mar 9 12:41:57 2023 +

Related: tdf#132110 use the container child size as default size

if the container size wasn't changed

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147382
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 9c978e4c75e342b2345ff4fcbd1b5751627d8baf)

also includes:

tdf#152508 Initiate container request size after call of createPage

As the container's request size of wizard pages can't be changed
directly by the UNO call setPosSize, the UNO caller can set the size
in the callback function createPage, this size will then taken as
request size. This doesn't solve the problem entirely as descriped
in tdf#152508, but the most important is, that the wizard page can
be initialized with an appropriate size at startup.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144287
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Reviewed-by: Michael Weghorn 
(cherry picked from commit aef2ee893c7b76794bc9db869f08bbbea60606a8)

Change-Id: I0bd4843768b727b8b75cbcb7ec92bd2b501b550d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147412
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/svtools/source/uno/wizard/wizardpagecontroller.cxx 
b/svtools/source/uno/wizard/wizardpagecontroller.cxx
index 333d7ce27351..57ed08c6f164 100644
--- a/svtools/source/uno/wizard/wizardpagecontroller.cxx
+++ b/svtools/source/uno/wizard/wizardpagecontroller.cxx
@@ -50,10 +50,28 @@ namespace svt::uno
 try
 {
 // Plug a toplevel SalFrame into the native page which can host 
our awt widgetry
-
m_xWizardPage.set(m_xController->createPage(pParent->CreateChildFrame(), 
i_nPageId), UNO_SET_THROW);
-
-Reference< XWindow > xPageWindow(m_xWizardPage->getWindow(), 
UNO_SET_THROW);
-xPageWindow->setVisible( true );
+css::uno::Reference xChildFrame = 
pParent->CreateChildFrame();
+com::sun::star::awt::Rectangle r0 = xChildFrame->getPosSize();
+m_xWizardPage.set(m_xController->createPage(xChildFrame, 
i_nPageId), UNO_SET_THROW);
+
+css::uno::Reference 
xPageWindow(m_xWizardPage->getWindow(), UNO_SET_THROW);
+
+// If size of page is changed by createPage, then the requested 
size of the container
+// should also be set to this size, to avoid annoying resizings.
+com::sun::star::awt::Rectangle r1 = xChildFrame->getPosSize();
+
+if (r0.Width != r1.Width || r0.Height != r1.Height)
+pParent->set_size_request(r1.Width, r1.Height);
+else
+{
+// tdf#132110 If the parent size wasn't overridden, then use
+// the size of the child if that was set
+com::sun::star::awt::Rectangle aChildRect = 
xPageWindow->getPosSize();
+if (aChildRect.Width && aChildRect.Height)
+pParent->set_size_request(aChildRect.Width, 
aChildRect.Height);
+}
+
+xPageWindow->setVisible(true);
 }
 catch( const Exception& )
 {


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svtools/source

2023-03-09 Thread Caolán McNamara (via logerrit)
 svtools/source/control/valueset.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 73e307eb0c7811b84b6fb72f3241ea91a0b760ff
Author: Caolán McNamara 
AuthorDate: Thu Mar 2 16:51:41 2023 +
Commit: Christian Lohmaier 
CommitDate: Thu Mar 9 12:34:58 2023 +

Resolves: tdf#153787 highlighted entry text overdraws selected entry text

Change-Id: Iabf1d4a672aa508c5143f12169678278186ddd47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148099
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/svtools/source/control/valueset.cxx 
b/svtools/source/control/valueset.cxx
index 96f940555965..0da10bfda9e2 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1515,6 +1515,9 @@ void ValueSet::ImplDrawItemText(vcl::RenderContext& 
rRenderContext, const OUStri
 nTxtOffset += NAME_LINE_HEIGHT+NAME_LINE_OFF_Y;
 
 
rRenderContext.SetTextColor(Application::GetSettings().GetStyleSettings().GetButtonTextColor());
+// tdf#153787 highlighted entry text is drawn in the same Paint as the 
selected text, so can
+// overwrite already rendered text
+rRenderContext.Erase(tools::Rectangle(Point(0, nTxtOffset), 
Point(aWinSize.Width(), aWinSize.Height(;
 rRenderContext.DrawText(Point((aWinSize.Width() - nTxtWidth) / 2, 
nTxtOffset + (NAME_OFFSET / 2)), rText);
 
 rRenderContext.Pop();


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svtools/source

2023-02-20 Thread Caolán McNamara (via logerrit)
 svtools/source/control/tabbar.cxx |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit f02c2912e50df357125c93eaaadfc96f02a05db0
Author: Caolán McNamara 
AuthorDate: Mon Feb 20 15:54:22 2023 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Feb 21 07:49:35 2023 +

Resolves: tdf#153763 first/last buttons in tabbar not responding

Change-Id: Id6e70eca7c2d523643d9e38e8c7402879464bf5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147291
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svtools/source/control/tabbar.cxx 
b/svtools/source/control/tabbar.cxx
index 3e4e2d94cedb..a9579dfb94f8 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -881,13 +881,16 @@ void TabBar::ImplShowPage( sal_uInt16 nPos )
 
 IMPL_LINK( TabBar, ImplClickHdl, weld::Button&, rBtn, void )
 {
-if ((GetPointerState().mnState & (MOUSE_LEFT | MOUSE_MIDDLE | 
MOUSE_RIGHT)) == 0)
+if ( != mpImpl->mxButtonBox->m_xFirstButton.get() &&  != 
mpImpl->mxButtonBox->m_xLastButton.get())
 {
-// like tdf#149482 if we didn't see a mouse up, but find that the 
mouse is no
-// longer pressed at this point, then bail
-mpImpl->mxButtonBox->m_xPrevRepeater->Stop();
-mpImpl->mxButtonBox->m_xNextRepeater->Stop();
-return;
+if ((GetPointerState().mnState & (MOUSE_LEFT | MOUSE_MIDDLE | 
MOUSE_RIGHT)) == 0)
+{
+// like tdf#149482 if we didn't see a mouse up, but find that the 
mouse is no
+// longer pressed at this point, then bail
+mpImpl->mxButtonBox->m_xPrevRepeater->Stop();
+mpImpl->mxButtonBox->m_xNextRepeater->Stop();
+return;
+}
 }
 
 EndEditMode();


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svtools/source

2023-02-18 Thread Khaled Hosny (via logerrit)
 svtools/source/control/ctrltool.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit a36b806c0c4649f7d2a1dd35d2ebea5b2102077e
Author: Khaled Hosny 
AuthorDate: Fri Feb 17 21:32:20 2023 +0200
Commit: خالد حسني 
CommitDate: Sat Feb 18 12:55:26 2023 +

tdf#147739: Medium is not a synonym of normal

For some reason, medium was thought to be a synonym of normal, but that
is not the case. Seems to be from:

commit b05701988492b051b3bb07bb46ae0397e23f032f
Author: th 
Date:   Fri Mar 9 14:44:26 2001 +

#83090# - Extensions for localized sytle names
#77189# - FontAlias should now also work
Extensions for Chinese fontsize numbers

Change-Id: Ic5e463b6e77c0fa88701108597c99c9fa0c6bf4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147258
Tested-by: Jenkins
Reviewed-by: خالد حسني 
(cherry picked from commit 0c9448bb31a32a3bf4004d45c4b1305debf1b5e2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147249
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svtools/source/control/ctrltool.cxx 
b/svtools/source/control/ctrltool.cxx
index 508ee9b9092b..0a406b708c76 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -452,8 +452,6 @@ OUString FontList::GetStyleName(const FontMetric& rInfo) 
const
 aStyleName = maNormal;
 else if (aCompareStyleName == "regular")
 aStyleName = maNormal;
-else if (aCompareStyleName == "medium")
-aStyleName = maNormal;
 else if (aCompareStyleName == "light")
 aStyleName = maLight;
 else if (aCompareStyleName == "lightitalic")
@@ -483,9 +481,6 @@ OUString FontList::GetStyleName(const FontMetric& rInfo) 
const
 aStyleName = SvtResId(STR_SVT_STYLE_EXTRALIGHT);
 else if (aCompareStyleName == "extralightitalic")
 aStyleName = SvtResId(STR_SVT_STYLE_EXTRALIGHT_ITALIC);
-/* Medium is synonym with Normal */
-else if (aCompareStyleName == "mediumitalic")
-aStyleName = maNormalItalic;
 else if (aCompareStyleName == "oblique")
 aStyleName = SvtResId(STR_SVT_STYLE_OBLIQUE);
 else if (aCompareStyleName == "semibold")


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svtools/source

2023-02-16 Thread Caolán McNamara (via logerrit)
 svtools/source/control/valueset.cxx |   33 ++---
 1 file changed, 10 insertions(+), 23 deletions(-)

New commits:
commit de7a636cb5a5527a7e9ab506c3a7829607cd6f11
Author: Caolán McNamara 
AuthorDate: Wed Feb 15 13:18:06 2023 +
Commit: Xisco Fauli 
CommitDate: Thu Feb 16 08:24:39 2023 +

tdf#153633 color description in chart colors options always black

even in dark mode. There are some other visual glitches here, just
erase the rendercontext before drawing to it.

Change-Id: I487375614c654124e116c3e9f28d78bf7f87da4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147072
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/svtools/source/control/valueset.cxx 
b/svtools/source/control/valueset.cxx
index 069379779d61..96f940555965 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -255,16 +255,8 @@ IMPL_LINK(ValueSet, ImplScrollHdl, weld::ScrolledWindow&, 
rScrollWin, void)
 
 void ValueSet::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&)
 {
-if (GetStyle() & WB_FLATVALUESET)
-{
-const StyleSettings& rStyleSettings = 
rRenderContext.GetSettings().GetStyleSettings();
-rRenderContext.SetLineColor();
-rRenderContext.SetFillColor(rStyleSettings.GetFaceColor());
-tools::Long nOffY = maVirDev->GetOutputSizePixel().Height();
-Size aWinSize(GetOutputSizePixel());
-rRenderContext.DrawRect(tools::Rectangle(Point(0, nOffY ), Point( 
aWinSize.Width(), aWinSize.Height(;
-}
-
+
rRenderContext.SetBackground(Application::GetSettings().GetStyleSettings().GetFaceColor());
+rRenderContext.Erase();
 ImplDraw(rRenderContext);
 }
 
@@ -1515,22 +1507,17 @@ void ValueSet::ImplDrawItemText(vcl::RenderContext& 
rRenderContext, const OUStri
 tools::Long nTxtWidth = rRenderContext.GetTextWidth(rText);
 tools::Long nTxtOffset = mnTextOffset;
 
+rRenderContext.Push(vcl::PushFlags::TEXTCOLOR);
+
 // delete rectangle and show text
-if (GetStyle() & WB_FLATVALUESET)
-{
-const StyleSettings& rStyleSettings = 
rRenderContext.GetSettings().GetStyleSettings();
-rRenderContext.SetLineColor();
-rRenderContext.SetFillColor(rStyleSettings.GetFaceColor());
-rRenderContext.DrawRect(tools::Rectangle(Point(0, nTxtOffset), 
Point(aWinSize.Width(), aWinSize.Height(;
-rRenderContext.SetTextColor(rStyleSettings.GetButtonTextColor());
-}
-else
-{
+const bool bFlat(GetStyle() & WB_FLATVALUESET);
+if (!bFlat)
 nTxtOffset += NAME_LINE_HEIGHT+NAME_LINE_OFF_Y;
-
rRenderContext.SetBackground(Application::GetSettings().GetStyleSettings().GetFaceColor());
-rRenderContext.Erase(tools::Rectangle(Point(0, nTxtOffset), 
Point(aWinSize.Width(), aWinSize.Height(;
-}
+
+
rRenderContext.SetTextColor(Application::GetSettings().GetStyleSettings().GetButtonTextColor());
 rRenderContext.DrawText(Point((aWinSize.Width() - nTxtWidth) / 2, 
nTxtOffset + (NAME_OFFSET / 2)), rText);
+
+rRenderContext.Pop();
 }
 
 void ValueSet::StyleUpdated()


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svtools/source

2023-02-14 Thread Caolán McNamara (via logerrit)
 svtools/source/config/miscopt.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 0287cf59e2f6a1f74e4df3ea580970465f996726
Author: Caolán McNamara 
AuthorDate: Tue Feb 14 13:12:38 2023 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Feb 15 04:06:16 2023 +

tdf#153541 notify listeners when any of the icon sizes change

not just the "normal" toolbar, but also the "notebookbar" and
"sidebar" ones. Existing listeners have assume that this is the
case, so match their expectations to get the notebookbar to
track the config when it changes.

Change-Id: Ia6024217ad97374f753e1db6305eda011e42b85d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146984
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svtools/source/config/miscopt.cxx 
b/svtools/source/config/miscopt.cxx
index 2462a5804659..1ea1e3b7e695 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -47,6 +47,8 @@ constexpr OUStringLiteral PROPERTYNAME_SYMBOLSET = 
u"SymbolSet";
 #define PROPERTYHANDLE_SYMBOLSET0
 constexpr OUStringLiteral PROPERTYNAME_ICONTHEME = u"SymbolStyle";
 #define PROPERTYHANDLE_SYMBOLSTYLE  1
+constexpr OUStringLiteral PROPERTYNAME_SIDEBARICONSIZE = u"SidebarIconSize";
+constexpr OUStringLiteral PROPERTYNAME_NOTEBOOKBARICONSIZE = 
u"NotebookbarIconSize";
 
 static std::mutex & GetInitMutex()
 {
@@ -359,6 +361,11 @@ Sequence< OUString > 
SvtMiscOptions_Impl::GetPropertyNames()
 {
 PROPERTYNAME_SYMBOLSET,
 PROPERTYNAME_ICONTHEME,
+// SidebarIconSize and NotebookbarIconSize so
+// notifications for their changes are also broadcast
+// from SvtMiscOptions
+PROPERTYNAME_SIDEBARICONSIZE,
+PROPERTYNAME_NOTEBOOKBARICONSIZE
 };
 }
 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svtools/source

2023-02-14 Thread Caolán McNamara (via logerrit)
 svtools/source/control/tabbar.cxx |   17 +
 1 file changed, 17 insertions(+)

New commits:
commit 2f1b0d9a89ade17c9e42b584669fa8a0892e06b3
Author: Caolán McNamara 
AuthorDate: Mon Feb 13 20:17:51 2023 +
Commit: Michael Stahl 
CommitDate: Tue Feb 14 10:09:51 2023 +

Resolves: tdf#149482 don't insert if the mouse is not still pressed

In repeat callback, if we didn't see a mouse up, but find that the mouse
is no longer pressed at this point, then bail

Change-Id: I6e5d1d7201065fadcc2242fd52323ffb56766383
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146921
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/svtools/source/control/tabbar.cxx 
b/svtools/source/control/tabbar.cxx
index 7daba1791d3e..3e4e2d94cedb 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -881,6 +881,15 @@ void TabBar::ImplShowPage( sal_uInt16 nPos )
 
 IMPL_LINK( TabBar, ImplClickHdl, weld::Button&, rBtn, void )
 {
+if ((GetPointerState().mnState & (MOUSE_LEFT | MOUSE_MIDDLE | 
MOUSE_RIGHT)) == 0)
+{
+// like tdf#149482 if we didn't see a mouse up, but find that the 
mouse is no
+// longer pressed at this point, then bail
+mpImpl->mxButtonBox->m_xPrevRepeater->Stop();
+mpImpl->mxButtonBox->m_xNextRepeater->Stop();
+return;
+}
+
 EndEditMode();
 
 sal_uInt16 nNewPos = mnFirstPos;
@@ -919,6 +928,14 @@ IMPL_LINK( TabBar, ImplClickHdl, weld::Button&, rBtn, void 
)
 
 IMPL_LINK_NOARG(TabBar, ImplAddClickHandler, weld::Button&, void)
 {
+if ((GetPointerState().mnState & (MOUSE_LEFT | MOUSE_MIDDLE | 
MOUSE_RIGHT)) == 0)
+{
+// tdf#149482 if we didn't see a mouse up, but find that the mouse is 
no
+// longer pressed at this point, then bail
+mpImpl->mxButtonBox->m_xAddRepeater->Stop();
+return;
+}
+
 EndEditMode();
 AddTabClick();
 }


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svtools/source

2023-01-23 Thread Caolán McNamara (via logerrit)
 svtools/source/control/ctrlbox.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit d2c028e832a2619d674772a5b4425452cc5b7dd7
Author: Caolán McNamara 
AuthorDate: Fri Jan 20 09:43:39 2023 +
Commit: Michael Stahl 
CommitDate: Mon Jan 23 10:22:49 2023 +

std::abort() during CppunitTest_sw_layoutwriter

seen in fedora distro build. Probably since:

commit 4170b94c443b3bd68b4cc75b8c344ecca3c249b0
Date:   Tue Nov 8 18:27:05 2022 +0100

SwModelTestBase: inherit from UnoApiXmlTest

See original discussion in https://gerrit.libreoffice.org/c/core/+/142465

use an alternative approach to solve this

[_RUN_] testTdf143239::TestBody
Fatal exception: Signal 6
Stack:

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libuno_sal.so.3(+0x48bd8)[0x95428bd8]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libuno_sal.so.3(+0x4fd8c)[0x9542fd8c]
linux-vdso.so.1(__kernel_rt_sigreturn+0x0)[0x955247fc]
/lib64/libc.so.6(+0x8d568)[0x94f2d568]
/lib64/libc.so.6(gsignal+0x20)[0x94ee3e80]
/lib64/libc.so.6(abort+0xf4)[0x94ed0284]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN3psp16PrintFontManager10SubstituteERN3vcl4font17FontSelectPatternERN3rtl8OUStringE+0xbc4)[0x91980de4]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(+0x891ea8)[0x91981ea8]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZNK3vcl4font22PhysicalFontCollection20GetGlyphFallbackFontERNS0_17FontSelectPatternEP19LogicalFontInstanceRN3rtl8OUStringEi+0xd0)[0x9186a7c0]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZNK12OutputDevice10ImplLayoutERKN3rtl8OUStringEiiRK5Pointl13KernArraySpanN4o3tl4spanIKhEE14SalLayoutFlagsPKN3vcl4text15TextLayoutCacheEPK15SalLayoutGlyphs+0x112c)[0x915be0c0]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZNK12OutputDevice12GetTextArrayERKN3rtl8OUStringEP9KernArrayiibPKN3vcl4text15TextLayoutCacheEPK15SalLayoutGlyphs+0x2c4)[0x915bf2b8]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN18ImplFontMetricData20ImplInitTextLineSizeEPK12OutputDevice+0x74)[0x91873da4]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZNK12OutputDevice11ImplNewFontEv+0x1c8)[0x915b7318]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(+0x4c5f70)[0x915b5f70]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZNK12OutputDevice14GetFontCharMapERN5tools5SvRefI11FontCharMapEE+0x34)[0x915b9004]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZNK12OutputDevice9HasGlyphsERKN3vcl4FontESt17basic_string_viewIDsSt11char_traitsIDsEEii+0x90)[0x915b9300]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libsvtlo.so(+0xff560)[0x8cadf560]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libsvtlo.so(_ZN11FontNameBox12CachePreviewEmP5Point+0x288)[0x8cae0168]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libsvtlo.so(+0x100448)[0x8cae0448]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN9Scheduler22CallbackTaskSchedulingEv+0x30c)[0x917b050c]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN14SvpSalInstance12CheckTimeoutEb+0x140)[0x919790a0]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN14SvpSalInstance9ImplYieldEbb+0x98)[0x91979818]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN14SvpSalInstance7DoYieldEbb+0xe0)[0x91979b70]

/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN9Scheduler19ProcessEventsToIdleEv+0x40)[0x917bac84]

/builddir/build/BUILD/libreoffice-7.5.0.2/workdir/LinkTarget/CppunitTest/libtest_sw_layoutwriter.so(+0x5520c)[0x8d87520c]
/lib64/libcppunit-1.15.so.1(+0x1e4dc)[0x9549e4dc]

/builddir/build/BUILD/libreoffice-7.5.0.2/workdir/LinkTarget/Library/unoexceptionprotector.so(+0x107ec)[0x94e107ec]

/lib64/libcppunit-1.15.so.1(_ZN7CppUnit16DefaultProtector7protectERKNS_7FunctorERKNS_16ProtectorContextE+0x3c)[0x9549e1cc]

/lib64/libcppunit-1.15.so.1(_ZN7CppUnit14ProtectorChain7protectERKNS_7FunctorERKNS_16ProtectorContextE+0x320)[0x954969f4]

/lib64/libcppunit-1.15.so.1(_ZN7CppUnit10TestResult7protectERKNS_7FunctorEPNS_4TestERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x80)[0x954a06d0]

/lib64/libcppunit-1.15.so.1(_ZN7CppUnit8TestCase3runEPNS_10TestResultE+0x11c)[0x954a993c]

/lib64/libcppunit-1.15.so.1(_ZN7CppUnit13TestComposite15doRunChildTestsEPNS_10TestResultE+0xe0)[0x9549e980]

/lib64/libcppunit-1.15.so.1(_ZN7CppUnit13TestComposite3runEPNS_10TestResultE+0x58)[0x9549e6a8]


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svtools/source

2022-12-26 Thread Khaled Hosny (via logerrit)
 svtools/source/misc/sampletext.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit ced8585bcb92aa58ca3e24197ff38fb82cc8a703
Author: Khaled Hosny 
AuthorDate: Mon Dec 26 00:25:54 2022 +0200
Commit: خالد حسني 
CommitDate: Mon Dec 26 09:29:57 2022 +

tdf#88484: Show sample text for Abyssinica SIL font

The font sets Arabic Presentation Forms-B bit, probably because it
includes U+FEFF (Zero Width Space) which happens to be in that block but
it isn’t an Arabic code point. Filter this bit out if we already decided
it isn’t an Arabic font.

Change-Id: I9935c793b8a7592eb92db59bc75de65b81ab99fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144819
Tested-by: Jenkins
Reviewed-by: خالد حسني 
(cherry picked from commit 18b39c8c9b35528c8fb172339126b613827d09aa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144796

diff --git a/svtools/source/misc/sampletext.cxx 
b/svtools/source/misc/sampletext.cxx
index a181fdde238c..abcfde92b7a1 100644
--- a/svtools/source/misc/sampletext.cxx
+++ b/svtools/source/misc/sampletext.cxx
@@ -1122,6 +1122,12 @@ namespace
 
 aMasked.set(vcl::UnicodeCoverage::GREEK_EXTENDED, false);
 aMasked.set(vcl::UnicodeCoverage::GREEK_AND_COPTIC, false);
+// tdf#88484
+// Some fonts set the Arabic Presentation Forms-B bit because they
+// support U+FEFF (Zero Width Space) which happens to be in that block
+// but it isn’t an Arabic code point. By the time we reach here we
+// decided this isn’t an Arabic font, so it should be safe.
+aMasked.set(vcl::UnicodeCoverage::ARABIC_PRESENTATION_FORMS_B, false);
 if (aMasked.count() == 1)
 return 
otCoverageToScript(static_cast(find_first(aMasked)));