[Libreoffice-commits] core.git: filter/source

2021-06-28 Thread Miklos Vajna (via logerrit)
 filter/source/msfilter/rtfutil.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 88f003e1978c4c08c082d12e7856ac4a08710c34
Author: Miklos Vajna 
AuthorDate: Mon Jun 28 20:16:15 2021 +0200
Commit: Miklos Vajna 
CommitDate: Tue Jun 29 08:44:34 2021 +0200

filter: avoid unnecessary string copy

Change-Id: Ie3083bfed3827b66c85946c060149531293bb813
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118033
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/filter/source/msfilter/rtfutil.cxx 
b/filter/source/msfilter/rtfutil.cxx
index 0e840a59862a..633a6df03dc1 100644
--- a/filter/source/msfilter/rtfutil.cxx
+++ b/filter/source/msfilter/rtfutil.cxx
@@ -65,9 +65,9 @@ void WrapOle1InOle2(SvStream& rOle1, sal_uInt32 nOle1Size, 
SvStream& rOle2,
 // AnsiClipboardFormat
 pCompObj->WriteUInt32(0x);
 // Reserved1
-OString aReserved1(rClassName);
-pCompObj->WriteUInt32(aReserved1.getLength() + 1);
-pCompObj->WriteOString(aReserved1);
+const OString& rReserved1(rClassName);
+pCompObj->WriteUInt32(rReserved1.getLength() + 1);
+pCompObj->WriteOString(rReserved1);
 pCompObj->WriteChar(0);
 // UnicodeMarker
 pCompObj->WriteUInt32(0x71B239F4);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/tags/co-21.06.3-1'

2021-06-28 Thread Andras Timar (via logerrit)
Tag 'co-21.06.3-1' created by Andras Timar  at 
2021-06-29 05:46 +

co-21.06.3-1

Changes since co-21.06.2-1-13:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: Changes to 'refs/tags/co-21.06.3-1'

2021-06-28 Thread Christian Lohmaier (via logerrit)
Tag 'co-21.06.3-1' created by Andras Timar  at 
2021-06-29 05:46 +

co-21.06.3-1

Changes since co-2021-branch-point-3:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Changes to 'refs/tags/co-21.06.3-1'

2021-06-28 Thread Adolfo Jayme Barrientos (via logerrit)
Tag 'co-21.06.3-1' created by Andras Timar  at 
2021-06-29 05:46 +

co-21.06.3-1

Changes since co-2021-branch-point-10:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/co-21.06.3-1'

2021-06-28 Thread Andras Timar (via logerrit)
Tag 'co-21.06.3-1' created by Andras Timar  at 
2021-06-29 05:46 +

co-21.06.3-1

Changes since libreoffice-7-1-branch-point-5:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - configure.ac

2021-06-28 Thread Andras Timar (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit af9fc08c876737f17aed2427c2645ca8b82fdaf9
Author: Andras Timar 
AuthorDate: Tue Jun 29 07:45:41 2021 +0200
Commit: Andras Timar 
CommitDate: Tue Jun 29 07:45:41 2021 +0200

Bump version to 21.06.3

Change-Id: I878ce60107717f646dbfc948496c3dc4bfa06675

diff --git a/configure.ac b/configure.ac
index 710e8ca97370..d5b2dc15c0f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[21.06.2.1],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[21.06.3.1],[],[],[https://collaboraoffice.com/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 4 commits - framework/source sc/source sw/qa sw/source vcl/source

2021-06-28 Thread Mike Kaganski (via logerrit)
 framework/source/uielement/toolbarmanager.cxx |2 +
 sc/source/ui/docshell/impex.cxx   |   32 +-
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx|9 ++-
 sw/source/core/layout/wsfrm.cxx   |   18 +++---
 vcl/source/gdi/CommonSalLayout.cxx|6 
 5 files changed, 61 insertions(+), 6 deletions(-)

New commits:
commit 48f969f93e0fc413e799ff538cd4cbbfc4da1ef6
Author: Mike Kaganski 
AuthorDate: Thu Jun 24 16:02:02 2021 +0300
Commit: Andras Timar 
CommitDate: Tue Jun 29 07:06:19 2021 +0200

tdf#143047: When no properties for command, use those from item container

This allows to use the "Label" property defined by user for macro
items, that indeed have no built-in command properties. Thus the
resulting tooltip will be a concatenation of the label and mnemonic
instead of only mnemonic as happened before.

Change-Id: I79d933fecd09ca7d64b7a3e7db0ef194e42c1c55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117787
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 8383175bd3c714c163eac40a00b1e8277d4d5307)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117857
Reviewed-by: Xisco Fauli 

diff --git a/framework/source/uielement/toolbarmanager.cxx 
b/framework/source/uielement/toolbarmanager.cxx
index 4a49c4cce149..cc2452c8edf6 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1410,6 +1410,8 @@ void ToolBarManager::FillToolbar( const Reference< 
XIndexAccess >& rItemContaine
 if (( nType == css::ui::ItemType::DEFAULT ) && 
!aCommandURL.isEmpty() )
 {
 auto aProperties = 
vcl::CommandInfoProvider::GetCommandProperties(aCommandURL, 
m_aModuleIdentifier);
+if (!aProperties.hasElements()) // E.g., user-provided 
macro command?
+aProperties = aProps; // Use existing info, including 
user-provided Label
 OUString 
aString(vcl::CommandInfoProvider::GetLabelForCommand(aProperties));
 
 ToolBoxItemBits nItemBits = ConvertStyleToToolboxItemBits( 
nStyle );
commit 95cb6219bcf245fd6b9066c93745ebba9e2706fb
Author: Michael Stahl 
AuthorDate: Fri Jun 25 10:25:59 2021 +0200
Commit: Andras Timar 
CommitDate: Tue Jun 29 07:06:06 2021 +0200

sw: layout: fix table split loop caused by RemoveFollowFlowLinePending

In no_view.odt, the table 1340 does RemoveFollowFlowLine(), then splits
again, and by the time Split() returns, its flag
m_bRemoveFollowFlowLinePending is set and so in the next
SwTabFrame::MakeAll() it will do the same thing again, until eventually
it hits
layact.cxx:544: LoopControl_1 in SwLayAction::InternalAction

The flag is set during lcl_RecalcSplitLine(), in SwContentFrame::Cut(),
which operates under the assumption that there are no other cells in the
follow flow line that may contain content frames.

This only happens if "Verdana" and "Arial" fonts are available and not
substituted with "DejaVu Sans" etc.

(regression from c4af8b0f106f31b6e79a145bc4ab83bb6a55c808)

Unfortunately this uncovers another pagination bug in testTdf88496
which was hidden by this flag being set from text frames that shouldn't
exist anyway.

Change-Id: I3cc82c13bfc06960b827aefc64f5b5b12520955a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117851
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit a0cd270a99f43049fc099ddd463e57aa243d5b0e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117860
Reviewed-by: Thorsten Behrens 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index aa29afd218e0..1638d93cf878 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -1226,7 +1226,14 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf88496, 
"tdf88496.docx")
 // Switch off repeating header, there is no place for it.
 // Now there are only 3 pages with complete table content
 // instead of a 51-page long table only with header.
-CPPUNIT_ASSERT_EQUAL(3, getPages());
+CPPUNIT_ASSERT_EQUAL(2, getPages());
+// FIXME: this actually has 3 pages but SwWrtShell::SttPg() puts the cursor
+// into the single SwTextFrame in the follow-flow-row at the top of the
+// table but that SwTextFrame 1105 should not exist and the cursor ends up
+// at the end of its master frame 848 instead; the problem is somewhere in
+// SwTextFrame::FormatAdjust() which first determines nNew = 1 but then
+// grows this frame anyway so that the follow is empty, but nothing
+// invalidates 1105 again.
 }
 
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf77417, "tdf77417.docx")
diff --git a/sw/source/core/layout/wsfrm.cxx b/

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/sfx2 include/vcl sfx2/sdi sfx2/source

2021-06-28 Thread homeboy445 (via logerrit)
 cui/Library_cui.mk|1 
 cui/UIConfig_cui.mk   |1 
 cui/source/dialogs/GraphicTestsDialog.cxx |   55 +++
 cui/source/factory/dlgfact.cxx|8 +
 cui/source/factory/dlgfact.hxx|3 
 cui/source/inc/GraphicsTestsDialog.hxx|   24 
 cui/source/options/optgdlg.cxx|8 +
 cui/source/options/optgdlg.hxx|2 
 cui/uiconfig/ui/graphictestdlg.ui |  113 +++
 cui/uiconfig/ui/optviewpage.ui|  146 --
 include/sfx2/sfxdlg.hxx   |2 
 include/sfx2/sfxsids.hrc  |1 
 include/vcl/test/GraphicsRenderTests.hxx  |2 
 sfx2/sdi/appslots.sdi |4 
 sfx2/sdi/sfx.sdi  |   16 +++
 sfx2/source/appl/appserv.cxx  |9 +
 16 files changed, 289 insertions(+), 106 deletions(-)

New commits:
commit df3ed584b025b8a87a8a3042a04ac8c12ebe4f26
Author: homeboy445 
AuthorDate: Thu Jun 17 17:42:41 2021 +0530
Commit: Tomaž Vajngerl 
CommitDate: Tue Jun 29 06:14:59 2021 +0200

Added a UI dialog box for running the VCL backend tests

The UI dialog box will allow the user to run the VCL graphics tests
and will allow them to view the results as well.

Change-Id: Ice289444ff425496a3e400a4c2bc06c307168c62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117384
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 6fdf446f97e9..345f84b7f008 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -138,6 +138,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/dialogs/pastedlg \
 cui/source/dialogs/postdlg \
 cui/source/dialogs/QrCodeGenDialog \
+cui/source/dialogs/GraphicTestsDialog \
 cui/source/dialogs/scriptdlg \
 cui/source/dialogs/SignatureLineDialogBase \
 cui/source/dialogs/SignatureLineDialog \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index c6d9d1584a66..73da8e159f09 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -82,6 +82,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/gallerythemeiddialog \
cui/uiconfig/ui/gallerytitledialog \
cui/uiconfig/ui/galleryupdateprogress \
+   cui/uiconfig/ui/graphictestdlg \
cui/uiconfig/ui/hangulhanjaadddialog \
cui/uiconfig/ui/hangulhanjaeditdictdialog \
cui/uiconfig/ui/hangulhanjaconversiondialog \
diff --git a/cui/source/dialogs/GraphicTestsDialog.cxx 
b/cui/source/dialogs/GraphicTestsDialog.cxx
new file mode 100644
index ..275d33d75886
--- /dev/null
+++ b/cui/source/dialogs/GraphicTestsDialog.cxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+GraphicsTestsDialog::GraphicsTestsDialog(weld::Window* pParent)
+: GenericDialogController(pParent, "cui/ui/graphictestdlg.ui", 
"GraphicTestsDialog")
+, m_xResultLog(m_xBuilder->weld_text_view("gptestresults"))
+, m_xDownloadResults(m_xBuilder->weld_button("gptest_downld"))
+{
+m_xResultLog->set_text("Running tests...");
+m_xDownloadResults->connect_clicked(LINK(this, GraphicsTestsDialog, 
HandleDownloadRequest));
+runGraphicsTestandUpdateLog();
+}
+
+void GraphicsTestsDialog::runGraphicsTestandUpdateLog()
+{
+GraphicsRenderTests TestObject;
+TestObject.run();
+OUString atemp = "--General Info--\nGraphics Backend used : " + 
TestObject.m_aCurGraphicsBackend
+ + "\nPassed Tests : " + 
OUString::number(TestObject.m_aPassed.size())
+ + "\nQuirky Tests : " + 
OUString::number(TestObject.m_aQuirky.size())
+ + "\nFailed Tests : " + 
OUString::number(TestObject.m_aFailed.size())
+ + "\nSkipped Tests : " + 
OUString::number(TestObject.m_aSkipped.size())
+ + "\n\n--Test Details--\n";
+OString writeResults;
+for (const class OString& tests : TestObject.m_aPassed)
+{
+writeResults += tests + " [PASSED]\n";
+}
+for (const class OString& tests : TestObject.m_aQuirky)
+{
+writeResults += tests + " [QUIRKY]\n";
+}
+for (const class OString& tests : TestObject.m_aFailed)
+{
+writeResults += tests + " [FAILED]\n";
+}
+for (const class OString& tests : TestObject.m_aSkipped)
+{
+writeResults += tests + " [SKIPPED]\n";
+}
+m_xResultLog->set_text(atemp + OStringToOUString(writeResults, 
RTL_TEXTENCODING_UTF8));
+}
+
+IMPL_STATIC_LINK_NOARG(GraphicsTestsDialog, HandleDownloadRequest, 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - editeng/source

2021-06-28 Thread Caolán McNamara (via logerrit)
 editeng/source/editeng/impedit.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 433ef82cae097383b5641e987aebf4c5c8d25b4a
Author: Caolán McNamara 
AuthorDate: Wed Jan 13 15:29:41 2021 +
Commit: Andras Timar 
CommitDate: Tue Jun 29 05:46:28 2021 +0200

tdf#139493 EditViewCallbacks might not implement EditViewPopupParent

in which case fallback to the vcl::Window

Change-Id: Idc72f04ce72b1bcd42d80869e0ee86b653343a17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109234
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit efb6e29359a14888fa9ba1c77c5f34a1e37333cd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118041
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index babade9ae2a5..00e278316d89 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -838,7 +838,11 @@ OutputDevice& ImpEditView::GetOutputDevice() const
 weld::Widget* ImpEditView::GetPopupParent(tools::Rectangle& rRect) const
 {
 if (EditViewCallbacks* pCallbacks = getEditViewCallbacks())
-return pCallbacks->EditViewPopupParent();
+{
+weld::Widget* pParent = pCallbacks->EditViewPopupParent();
+if (pParent)
+return pParent;
+}
 return weld::GetPopupParent(*pOutWin, rRect);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2021-06-28 Thread Mike Kaganski (via logerrit)
 sw/source/ui/frmdlg/column.cxx |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 7c95c16deba975b0b282ccea1fbfcfadd7aa28b3
Author: Mike Kaganski 
AuthorDate: Mon Jun 28 23:12:24 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue Jun 29 05:36:06 2021 +0200

tdf#143107 related: ensure correct order of which ids

... discovered after 8aaa28ed43978a9a4a20d62368410a57ec05c23f

Change-Id: I1a14d227414210393c00c395486ede6daa438218
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118053
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 7a2baccac79d..d3d849eb10c0 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -98,10 +98,9 @@ SwColumnDlg::SwColumnDlg(weld::Window* pParent, SwWrtShell& 
rSh)
 m_nSelectionWidth = aRect.Width();
 
 SfxItemSet* pColPgSet = nullptr;
-static sal_uInt16 const aSectIds[] = { RES_COL, RES_COL,
-RES_FRM_SIZE, RES_FRM_SIZE,
-RES_COLUMNBALANCE, 
RES_FRAMEDIR,
-0 };
+static svl::Items const aSectIds;
 
 const SwSection* pCurrSection = m_rWrtShell.GetCurrSection();
 const sal_uInt16 nFullSectCnt = m_rWrtShell.GetFullSelectedSectionCount();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - 3 commits - svx/source sw/source

2021-06-28 Thread Luboš Luňák (via logerrit)
 svx/source/sidebar/nbdtmg.cxx   |2 +-
 sw/source/filter/html/htmlflywriter.cxx |   12 ++--
 sw/source/filter/html/htmlplug.cxx  |   17 +++--
 3 files changed, 10 insertions(+), 21 deletions(-)

New commits:
commit b957f091a0479e224225249528000fa94baf5723
Author: Luboš Luňák 
AuthorDate: Tue Jun 29 02:40:48 2021 +0200
Commit: Luboš Luňák 
CommitDate: Tue Jun 29 02:47:21 2021 +0200

write out image size in html export for 'keep ratio' images

Without this the code was leaving out writing any size to the html
output. Which means the size was the original image size, which may
not be the size used by Writer.

Change-Id: Ia249035a604f0f51f59b3190ebb8975a686533c7

diff --git a/sw/source/filter/html/htmlflywriter.cxx 
b/sw/source/filter/html/htmlflywriter.cxx
index d5189d83a4b9..6f01a5c7008d 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -962,9 +962,9 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& 
aHtml, const SwFrameForma
 sal_uInt8 nPercentHeight = pFSItem->GetHeightPercent();
 
 // Size of the object in Twips without margins
-Size aTwipSz( (nPercentWidth ? 0
+Size aTwipSz( (nPercentWidth && nPercentWidth != 255 ? 0
  : pFSItem->GetWidth()-aTwipSpc.Width()),
-  (nPercentHeight ? 0
+  (nPercentHeight && nPercentHeight != 255 ? 0
   : pFSItem->GetHeight()-aTwipSpc.Height()) );
 
 OSL_ENSURE( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0, "Frame size 
minus spacing < 0!!!???" );
@@ -990,7 +990,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& 
aHtml, const SwFrameForma
 ((nPercentWidth && nPercentWidth!=255) || aPixelSz.Width()) )
 {
 OString sWidth;
-if (nPercentWidth)
+if (nPercentWidth && nPercentWidth != 255)
 sWidth = 
OString::number(static_cast(nPercentWidth)) + "%";
 else
 sWidth = 
OString::number(static_cast(aPixelSz.Width()));
@@ -1001,7 +1001,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& 
aHtml, const SwFrameForma
 ((nPercentHeight && nPercentHeight!=255) || aPixelSz.Height()) )
 {
 OString sHeight;
-if (nPercentHeight)
+if (nPercentHeight && nPercentHeight != 255)
 sHeight = 
OString::number(static_cast(nPercentHeight)) + "%";
 else
 sHeight = 
OString::number(static_cast(aPixelSz.Height()));
commit 60f6342308d1fb03422de255a2007f4785e91b0f
Author: Luboš Luňák 
AuthorDate: Tue Jun 15 15:24:15 2021 +0200
Commit: Luboš Luňák 
CommitDate: Tue Jun 29 02:47:11 2021 +0200

fix a size warning

d7855213ae60d79f converted this incorrectly, the code right above
may set the size as (0,0), and before the commit the invalid size
was only negative.

Change-Id: I198d025f5c02780ae509f97782bc41ac77fa3407

diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 627da9eaee8e..542df1d7414e 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -845,7 +845,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, 
sal_uInt16 nIndex, sal_uInt1
 const Graphic* pGrf = 
pLevelSettings->pBrushItem->GetGraphic();
 Size aSize = pLevelSettings->aSize;
 sal_Int16 eOrient = text::VertOrientation::LINE_CENTER;
-if (!isResetSize  && aFmt.GetGraphicSize()!=Size(0,0))\
+if (!isResetSize  && aFmt.GetGraphicSize()!=Size(0,0))
 aSize = aFmt.GetGraphicSize();
 else if (aSize.IsEmpty() && pGrf)
 aSize = SvxNumberFormat::GetGraphicSizeMM100( pGrf );
diff --git a/sw/source/filter/html/htmlflywriter.cxx 
b/sw/source/filter/html/htmlflywriter.cxx
index 9f249b06d4d3..d5189d83a4b9 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -686,7 +686,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const 
SwFrameFormat &rFrameFormat,
   (nPercentHeight ? 0
   : pFSItem->GetHeight()-aTwipSpc.Height()) );
 
-OSL_ENSURE( !aTwipSz.IsEmpty(), "Frame size minus spacing  < 0!!!???" 
);
+OSL_ENSURE( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0, "Frame size 
minus spacing  < 0!!!???" );
 if( aTwipSz.Width() < 0 )
 aTwipSz.setWidth( 0 );
 if( aTwipSz.Height() < 0 )
@@ -967,7 +967,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& 
aHtml, const SwFrameForma
   (nPercentHeight ? 0
   : pFSItem->GetHeight()-aTwipSpc.Height()) );
 
-OSL_ENSURE( !aTwipSz.IsEmpty(), "Frame size minus spacing < 0!!!???" );
+  

[Libreoffice-commits] core.git: cui/source editeng/source include/editeng include/xmloff offapi/com schema/libreoffice sd/source svx/source sw/qa sw/source writerfilter/source xmloff/source

2021-06-28 Thread Vasily Melenchuk (via logerrit)
 cui/source/tabpages/numpages.cxx|   41 ++-
 editeng/source/items/numitem.cxx|   49 
 include/editeng/numitem.hxx |4 
 include/xmloff/xmltoken.hxx |1 
 offapi/com/sun/star/style/NumberingLevel.idl|   21 +++
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |9 +
 sd/source/ui/dlg/BulletAndPositionDlg.cxx   |   18 +--
 svx/source/sidebar/nbdtmg.cxx   |   10 -
 sw/qa/extras/odfexport/data/listformat.docx |binary
 sw/qa/extras/odfexport/data/listformat.odt  |binary
 sw/qa/extras/odfexport/odfexport.cxx|2 
 sw/qa/extras/odfexport/odfexport2.cxx   |   66 
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx  |8 -
 sw/qa/extras/rtfexport/rtfexport.cxx|2 
 sw/qa/extras/ww8export/ww8export2.cxx   |   18 ---
 sw/qa/extras/ww8export/ww8export3.cxx   |6 -
 sw/qa/python/check_cross_references.py  |   21 ++-
 sw/source/core/doc/number.cxx   |   14 --
 sw/source/filter/ww8/wrtw8num.cxx   |2 
 sw/source/filter/ww8/ww8par3.cxx|4 
 sw/source/ui/misc/outline.cxx   |4 
 writerfilter/source/dmapper/NumberingManager.cxx|   14 +-
 xmloff/source/core/xmltoken.cxx |1 
 xmloff/source/style/xmlnume.cxx |   24 +---
 xmloff/source/style/xmlnumi.cxx |   27 
 xmloff/source/token/tokens.txt  |1 
 26 files changed, 251 insertions(+), 116 deletions(-)

New commits:
commit aa5c6d127559912ad60a63fbd972b78fb8f9691b
Author: Vasily Melenchuk 
AuthorDate: Mon Jun 14 14:27:56 2021 +0300
Commit: Thorsten Behrens 
CommitDate: Tue Jun 29 00:48:36 2021 +0200

new ODF numbered list parameter loext:num-list-format

Instead of style:num-prefix and style:num-suffix new list format
is much more flexible for storing list multilevel numberings.
Now it is possible to have not just prefix/suffix but any random
separators between levels, arbitrary levels order, etc.

Internal LO format for list format is changed: instead of placeholders
like %1, %2, etc we right now use %1%, %2%... Reason: for ODT documents,
having more than 9 levels there is ambiguity in "%10": it is "%1"
followed by "0" suffix, or "%10"?

Aux changes:
* removed zero width space hack: since format string is always defined
this hack is interfering with standard list numbers printing
(see changes in ooxmlexport14.cxx, ww8export3.cxx tests)
* changed cross-references values to lists: they are now including full
list label string: previously this was bit self-contradictory (see
changes in odfexport.cxx and check_cross_references.py tests)

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

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index fbeb40aa4b3d..32063c6f1c5d 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -314,14 +314,8 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, 
NumSelectHdl_Impl, ValueSet*, void)
 {
 SvxNumberFormat aFmt(pActNum->GetLevel(i));
 aFmt.SetNumberingType(eNewType);
-if(cLocalPrefix == ' ')
-aFmt.SetPrefix( "" );
-else
-aFmt.SetPrefix(_pSet->sPrefix);
-if(cLocalSuffix == ' ')
-aFmt.SetSuffix( "" );
-else
-aFmt.SetSuffix(_pSet->sSuffix);
+aFmt.SetListFormat(cLocalPrefix == ' ' ? "" : _pSet->sPrefix,
+   cLocalSuffix == ' ' ? "" : _pSet->sSuffix, i);
 aFmt.SetCharFormatName("");
 aFmt.SetBulletRelSize(100);
 pActNum->SetLevel(i, aFmt);
@@ -459,8 +453,7 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, NumSelectHdl_Impl, 
ValueSet*, void)
 SvxNumberFormat aFmt(pActNum->GetLevel(i));
 aFmt.SetNumberingType( SVX_NUM_CHAR_SPECIAL );
 // #i93908# clear suffix for bullet lists
-aFmt.SetPrefix( OUString() );
-aFmt.SetSuffix( OUString() );
+aFmt.SetListFormat("", "", i);
 aFmt.SetBulletFont(&rActBulletFont);
 aFmt.SetBulletChar(cChar );
 aFmt.SetCharFormatName(sBulletCharFormatName);
@@ -652,8 +645,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl, 
ValueSet*, void)
 if(aFmt.GetNumberingType() == SVX_NUM_CHAR_SPECIAL)

GSoC Weekly Report - #2 - Unit Tests

2021-06-28 Thread Shubham Jain
Hi Everyone!

Weekly Report :
- Added around 2-3 tests.
- I've started working on Calc now and I'll write its tests during this
week.
- I was not able to work for almost the whole week due to my college exams
(as mentioned in my previous report) but I wrote some during the weekend.
- I'll aim to write around 7-8 tests this week (2 are already done).
- Testing if the unittest actually solves the problem is something I'm
still struggling with but I'll try to check all of the tests I've written
during this week or in this weekend.

Thank you
Shubham Jain
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sw/source

2021-06-28 Thread Jan-Marek Glogowski (via logerrit)
 sw/source/core/text/EnhancedPDFExportHelper.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 99ef46fdb2a975e074c66a02328b86edfc05307f
Author: Jan-Marek Glogowski 
AuthorDate: Mon Jun 28 17:10:21 2021 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Mon Jun 28 23:31:06 2021 +0200

tdf#143105 Don't export empty URLs to PDF

They also won't be saved to the ODT if empty.

Change-Id: I7a8480bfc12261b4904981abb75b59752e354b4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118032
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx 
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 778f23046826..639171e1dd37 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1738,7 +1738,9 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
 static_cast( mrSh.GetLayout()->Lower() 
);
 
 OUString aURL( static_cast(pItem)->GetURL() );
-const bool bIntern = !aURL.isEmpty() && '#' == aURL[0];
+if (aURL.isEmpty())
+continue;
+const bool bIntern = '#' == aURL[0];
 
 // Create the destination for internal links:
 sal_Int32 nDestId = -1;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-06-28 Thread Steve Fanning (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f79a8f578ab56d138139b0de131a86dd5d773de7
Author: Steve Fanning 
AuthorDate: Mon Jun 28 22:33:55 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Mon Jun 28 22:33:55 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 1f77c92e446c0b66656b82ae04862528d425a30e
  - Fix minor typos in help examples for Calc's LEFTB function.

Change-Id: I5d8cdf1898f9b5823acc1e3381bbe3abb06551e3
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/118052
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 108566a12aa3..1f77c92e446c 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 108566a12aa32429286de6f6129b63e2d3e27e94
+Subproject commit 1f77c92e446c0b66656b82ae04862528d425a30e
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2021-06-28 Thread Steve Fanning (via logerrit)
 source/text/scalc/01/04060110.xhp |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 1f77c92e446c0b66656b82ae04862528d425a30e
Author: Steve Fanning 
AuthorDate: Mon Jun 28 21:35:58 2021 +0200
Commit: Olivier Hallot 
CommitDate: Mon Jun 28 22:33:55 2021 +0200

Fix minor typos in help examples for Calc's LEFTB function.

Change-Id: I5d8cdf1898f9b5823acc1e3381bbe3abb06551e3
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/118052
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/scalc/01/04060110.xhp 
b/source/text/scalc/01/04060110.xhp
index 26d6abc9f..4049249c3 100644
--- a/source/text/scalc/01/04060110.xhp
+++ b/source/text/scalc/01/04060110.xhp
@@ -392,11 +392,11 @@
 Number_bytes (optional) specifies the number of 
characters you want LEFTB to extract, based on bytes. If this parameter is not 
defined, one character is returned.
 
 
-LEFTB("中国";1) returns " " (1 byte is only half a DBCS 
character and a space character is returned instead).
-LEFTB("中国";2) returns "中" (2 bytes constitute one complete 
DBCS character).
-LEFTB("中国";3) returns "中 " (3 bytes constitute one DBCS 
character and a half; the last character returned is therefore a space 
character).
-LEFTB("中国";4) returns "中国" (4 bytes constitute two complete 
DBCS characters).
-LEFTB("office";3) returns "off" (3 non-DBCS characters each 
consisting of 1 byte).
+=LEFTB("中国";1) returns " " (1 byte is only half a DBCS 
character and a space character is returned instead).
+=LEFTB("中国";2) returns "中" (2 bytes constitute one complete 
DBCS character).
+=LEFTB("中国";3) returns "中 " (3 bytes constitute one DBCS 
character and a half; the last character returned is therefore a space 
character).
+=LEFTB("中国";4) returns "中国" (4 bytes constitute two 
complete DBCS characters).
+=LEFTB("office";3) returns "off" (3 non-DBCS characters 
each consisting of 1 byte).
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa sw/source

2021-06-28 Thread Justin Luth (via logerrit)
 sw/qa/extras/ww8export/data/tdf75748_inheritChapterNumberingC.doc |binary
 sw/qa/extras/ww8export/ww8export3.cxx |6 ++
 sw/source/filter/ww8/ww8par.cxx   |6 +++---
 3 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit e5ac6caf9efa3d3a8cb82dbc59ef00b193facdc4
Author: Justin Luth 
AuthorDate: Sat Jun 26 19:14:17 2021 +0200
Commit: Justin Luth 
CommitDate: Mon Jun 28 21:01:18 2021 +0200

tdf#104239 doc import: fix chose m_pChosenWW8OutlineStyle carefully

I mis-placed the cancel test.
In the previous place, that only worked if the FIRST instance
of the style was bad. My intention was to prevent if ANY
use of the numbering style could cause problems.

tdf#75748 had the document I had been developing the fix for.

Change-Id: I75286b943b7fca56ea43f79a49d68a351f6d0e24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117966
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/sw/qa/extras/ww8export/data/tdf75748_inheritChapterNumberingC.doc 
b/sw/qa/extras/ww8export/data/tdf75748_inheritChapterNumberingC.doc
new file mode 100644
index ..7f393612cab7
Binary files /dev/null and 
b/sw/qa/extras/ww8export/data/tdf75748_inheritChapterNumberingC.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index abbf414dc01d..9ccf3ea19a31 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -822,6 +822,12 @@ 
DECLARE_WW8EXPORT_TEST(testTdf106541_inheritChapterNumberingB, "tdf106541_inheri
 CPPUNIT_ASSERT_EQUAL(OUString("1.1"), getProperty(xPara, 
"ListLabelString"));
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf75748_inheritChapterNumberingC, 
"tdf75748_inheritChapterNumberingC.doc")
+{
+uno::Reference xPara(getParagraph(5, "Inherited from 
Heading 3"), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("II.B.1."), getProperty(xPara, 
"ListLabelString"));
+}
+
 DECLARE_WW8EXPORT_TEST(testTdf104239_chapterNumberTortureTest, 
"tdf104239_chapterNumberTortureTest.doc")
 {
 // There is no point in identifying what the wrong values where in this 
test,
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 04b53252d49d..ede4943fdc10 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5981,9 +5981,6 @@ void SwWW8ImplReader::SetOutlineStyles()
 const SwNumRule* pWW8ListStyle = rSI.GetOutlineNumrule();
 if (pWW8ListStyle != nullptr)
 {
-if (aPreventUseAsChapterNumbering[pWW8ListStyle])
-continue;
-
 std::map::iterator aCountIter
 = aWW8ListStyleCounts.find(pWW8ListStyle);
 if (aCountIter == aWW8ListStyleCounts.end())
@@ -6000,6 +5997,9 @@ void SwWW8ImplReader::SetOutlineStyles()
 int nCurrentMaxCount = 0;
 for (const auto& rEntry : aWW8ListStyleCounts)
 {
+if (aPreventUseAsChapterNumbering[rEntry.first])
+continue;
+
 if (rEntry.second > nCurrentMaxCount)
 {
 nCurrentMaxCount = rEntry.second;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Week #3 update Sidebar

2021-06-28 Thread anshu khare
Hi everyone

In the last week, while implementing, we realized that we were making
templdlg.cxx very complex which will affect the maintainability of code in
the future.
Hence, we decided to change our approach.
To make things simple, we decided that first we will re-factor the code
which is responsible for all the interactions like filter, select etc. by
introducing a new control StyleList and after that we will try to introduce
a new treeview.

In the next week, I will be working towards the refactoring of code. This
will make templdlg.cxx's code much smaller.


Thankyou everyone
Regards
Anshu
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: vcl/source

2021-06-28 Thread Stephan Bergmann (via logerrit)
 vcl/source/uitest/uno/uiobject_uno.cxx |   32 +---
 vcl/source/uitest/uno/uiobject_uno.hxx |   13 -
 2 files changed, 25 insertions(+), 20 deletions(-)

New commits:
commit 4ad110677be8c9b89524a0cbe1690778b3db032e
Author: Stephan Bergmann 
AuthorDate: Mon Jun 28 16:58:45 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Jun 28 20:21:05 2021 +0200

UIObjectUnoObj::executeAction does not need mutable state in UIObjectUnoObj

...as none of the state (now stored in struct Notifier) needs to outlive the
invocation of executeAction.  This change makes mReady monotonic, which 
makes it
easier to reason about (and allows to substantially shrink the range of the
mMutex lock in executeAction).

Change-Id: I0a4dd4a286773fd09c469cb7fd625c124e98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118031
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx 
b/vcl/source/uitest/uno/uiobject_uno.cxx
index fd75b892d0c4..9041dc7f14e0 100644
--- a/vcl/source/uitest/uno/uiobject_uno.cxx
+++ b/vcl/source/uitest/uno/uiobject_uno.cxx
@@ -10,20 +10,36 @@
 #include 
 
 #include 
+#include 
 #include 
+#include 
 #include "uiobject_uno.hxx"
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 
 #include 
 
+class Timer;
+
+namespace {
+
+struct Notifier {
+std::condition_variable cv;
+std::mutex mMutex;
+bool mReady = false;
+
+DECL_LINK( NotifyHdl, Timer*, void );
+};
+
+}
+
 UIObjectUnoObj::UIObjectUnoObj(std::unique_ptr pObj):
 UIObjectBase(m_aMutex),
-mpObj(std::move(pObj)),
-mReady(true)
+mpObj(std::move(pObj))
 {
 }
 
@@ -43,7 +59,7 @@ css::uno::Reference SAL_CALL 
UIObjectUnoObj::getChild(
 return new UIObjectUnoObj(std::move(pObj));
 }
 
-IMPL_LINK_NOARG(UIObjectUnoObj, NotifyHdl, Timer*, void)
+IMPL_LINK_NOARG(Notifier, NotifyHdl, Timer*, void)
 {
 std::scoped_lock lk(mMutex);
 mReady = true;
@@ -102,8 +118,6 @@ void SAL_CALL UIObjectUnoObj::executeAction(const OUString& 
rAction, const css::
 if (!mpObj)
 throw css::uno::RuntimeException();
 
-std::unique_lock lk(mMutex);
-mReady = false;
 auto aIdle = std::make_unique();
 aIdle->SetDebugName("UI Test Idle Handler");
 aIdle->SetPriority(TaskPriority::HIGHEST);
@@ -123,14 +137,18 @@ void SAL_CALL UIObjectUnoObj::executeAction(const 
OUString& rAction, const css::
 mpObj->execute(rAction, aMap);
 };
 
-ExecuteWrapper* pWrapper = new ExecuteWrapper(func, LINK(this, 
UIObjectUnoObj, NotifyHdl));
+Notifier notifier;
+ExecuteWrapper* pWrapper = new ExecuteWrapper(func, LINK(¬ifier, 
Notifier, NotifyHdl));
 aIdle->SetInvokeHandler(LINK(pWrapper, ExecuteWrapper, ExecuteActionHdl));
 {
 SolarMutexGuard aGuard;
 aIdle->Start();
 }
 
-cv.wait(lk, [this]{return mReady;});
+{
+std::unique_lock lk(notifier.mMutex);
+notifier.cv.wait(lk, [¬ifier]{return notifier.mReady;});
+}
 pWrapper->setSignal();
 
 SolarMutexGuard aGuard;
diff --git a/vcl/source/uitest/uno/uiobject_uno.hxx 
b/vcl/source/uitest/uno/uiobject_uno.hxx
index a9f2a294d9e3..47fc54696832 100644
--- a/vcl/source/uitest/uno/uiobject_uno.hxx
+++ b/vcl/source/uitest/uno/uiobject_uno.hxx
@@ -15,14 +15,9 @@
 #include 
 
 #include 
-#include 
-#include 
 
-#include 
 #include 
 
-class Timer;
-
 typedef ::cppu::WeakComponentImplHelper <
 css::ui::test::XUIObject, css::lang::XServiceInfo
 > UIObjectBase;
@@ -55,14 +50,6 @@ public:
 css::uno::Sequence SAL_CALL getSupportedServiceNames() override;
 
 OUString SAL_CALL getHierarchy() override;
-
-private:
-
-DECL_LINK( NotifyHdl, Timer*, void );
-
-std::condition_variable cv;
-std::mutex mMutex;
-bool mReady;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sc/source

2021-06-28 Thread Eike Rathke (via logerrit)
 sc/source/ui/inc/gridwin.hxx   |6 +++
 sc/source/ui/view/gridwin.cxx  |4 ++
 sc/source/ui/view/gridwin4.cxx |   62 +
 sc/source/ui/view/tabview5.cxx |7 
 4 files changed, 79 insertions(+)

New commits:
commit 6e88f3c8eb8d07bfdf8ade18230de7114c5ab362
Author: Eike Rathke 
AuthorDate: Mon Jun 28 17:03:04 2021 +0200
Commit: Eike Rathke 
CommitDate: Mon Jun 28 20:20:35 2021 +0200

Revert "Revert "tdf#124983 In calc make printable page borders initially 
visible""

This reverts commit 0be41797787622ebb5320acb6ec6cb65a7c8cdd4.

Reason for revert: it turned out that the observed heap corruption on 
Windows (see late https://gerrit.libreoffice.org/c/core/+/90101 comments) was 
not due to this change, so the precautionary revert can be reverted again.

Change-Id: I7a343f889fda601939381a8691e82dca147a40c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117987
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 09e46d7a4e21..daf6c35b652c 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -309,6 +309,10 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public 
vcl::Window, public DropTargetHel
 voidInvalidateLOKViewCursor(const tools::Rectangle& 
rCursorRect,
 const Fraction aScaleX, const 
Fraction aScaleY);
 
+Timer   maShowPageBreaksTimer;
+boolbInitialPageBreaks;
+voidSetupInitialPageBreaks(ScDocument& rDoc, SCTAB nTab, bool 
bSetup);
+DECL_LINK(InitiatePageBreaksTimer, Timer*, void);
 protected:
 virtual voidPrePaint(vcl::RenderContext& rRenderContext) override;
 virtual voidPaint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect) override;
@@ -490,6 +494,8 @@ public:
 void updateLOKValListButton(bool bVisible, const ScAddress& rPos) const;
 void updateLOKInputHelp(const OUString& title, const OUString& content) 
const;
 
+void initiatePageBreaks();
+
 protected:
 void ImpCreateOverlayObjects();
 void ImpDestroyOverlayObjects();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index b6412ae36fbb..c2c115c4371c 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -424,6 +424,10 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, 
ScViewData& rData, ScSplitPos
 
 GetOutDev()->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
 EnableRTL( false );
+
+bInitialPageBreaks = true;
+maShowPageBreaksTimer.SetInvokeHandler(LINK(this, ScGridWindow, 
InitiatePageBreaksTimer));
+maShowPageBreaksTimer.SetTimeout(1);
 }
 
 ScGridWindow::~ScGridWindow()
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 9c1ff475449a..f1e53ed61cb8 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -76,6 +76,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 static void lcl_LimitRect( tools::Rectangle& rRect, const tools::Rectangle& 
rVisible )
 {
@@ -1267,6 +1270,30 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
 
 if (mpNoteMarker)
 mpNoteMarker->Draw(); // Above the cursor, in drawing map mode
+
+SetupInitialPageBreaks(rDoc, nTab, bPage&& bInitialPageBreaks);
+}
+
+
+void ScGridWindow::SetupInitialPageBreaks(ScDocument& rDoc, SCTAB nTab, bool 
bSetup)
+{
+// tdf#124983, if option LibreOfficeDev Calc/View/Visual Aids/Page breaks
+// is enabled, breaks should be visible. If the document is opened the 
first
+// time, the breaks are not calculated yet, so for this initialization
+// a timer will be triggered here.
+if (bSetup)
+{
+std::set aColBreaks;
+std::set aRowBreaks;
+rDoc.GetAllColBreaks(aColBreaks, nTab, true, false);
+rDoc.GetAllRowBreaks(aRowBreaks, nTab, true, false);
+if (aColBreaks.size() == 0 || aRowBreaks.size() == 0)
+{
+maShowPageBreaksTimer.SetPriority(TaskPriority::DEFAULT_IDLE);
+maShowPageBreaksTimer.Start();
+bInitialPageBreaks = false;
+}
+}
 }
 
 namespace
@@ -2316,4 +2343,39 @@ void ScGridWindow::DataChanged( const DataChangedEvent& 
rDCEvt )
 Invalidate();
 }
 
+void ScGridWindow::initiatePageBreaks()
+{
+bInitialPageBreaks = true;
+}
+
+IMPL_LINK(ScGridWindow, InitiatePageBreaksTimer, Timer*, pTimer, void)
+{
+if (pTimer == &maShowPageBreaksTimer)
+{
+ScDocument& rDoc = mrViewData.GetDocument();
+const ScViewOptions& rOpts = mrViewData.GetOptions();
+bool bPage = rOpts.GetOption(VOPT_PAGEBREAKS);
+ScDocShell* pDocSh = mrViewData.GetDocShell();
+bool bModified = pDocSh->IsModified();
+// tdf#124983, if option LibreOfficeDev Calc/View/Visual Aids/Page 
breaks
+/

[Libreoffice-commits] core.git: sw/qa sw/source writerfilter/source

2021-06-28 Thread Andrea Gelmini (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx|2 +-
 sw/source/filter/ww8/docxsdrexport.cxx|4 ++--
 writerfilter/source/dmapper/GraphicImport.cxx |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1b052ff4ac5f5d29b69a91d4f14742e555f2a03b
Author: Andrea Gelmini 
AuthorDate: Mon Jun 28 13:29:18 2021 +0200
Commit: Julien Nabet 
CommitDate: Mon Jun 28 19:09:04 2021 +0200

Fix typos

Change-Id: If73e9183dbf6e53291da0348a1ea112d0c669669
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118012
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index 21e3a73f8cfd..bafe3b511730 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -93,7 +93,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf142486_FrameShadow, 
"tdf142486_FrameShadow.odt")
 OUString sText = xViewCursor->getString();
 // Without fix in place, the frame size including shadow width was 
exported as object size. On
 // import the shadow width was added as wrap "distance from text". That 
results in totally
-// different wrapping of the surrouding text.
+// different wrapping of the surrounding text.
 // Here line started with "x" instead of expected "e".
 CPPUNIT_ASSERT(sText.startsWith("e"));
 }
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index 1416c4838904..c85e2581bd96 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -89,7 +89,7 @@ void lclMovePositionWithRotation(awt::Point& aPos, const 
Size& rSize, Degree100
 {
 // code from ImplEESdrWriter::ImplFlipBoundingBox 
(filter/source/msfilter/eschesdo.cxx)
 // TODO: refactor
-// MSO uses left|top of the unrotated object rectangle as position. When 
you rotate that retangle
+// MSO uses left|top of the unrotated object rectangle as position. When 
you rotate that rectangle
 // around its center and build a snap rectangle S from it, then left|top 
of S has to be the
 // position used in LO. This method converts LOs aPos to the position used 
by MSO.
 
@@ -920,7 +920,7 @@ void DocxSdrExport::startDMLAnchorInline(const 
SwFrameFormat* pFrameFormat, cons
 // FixMe: tdf141880. Because LibreOffice currently cannot handle negative 
vertical margins, they
 // were forced to zero on import. Especially bottom margin of inline 
anchored rotated objects are
 // affected. If the object was not changed, it would be better to export 
the original values
-// from grab-Bag. Unfortulately there exists no marker for "not changed", 
so a heuristic is used
+// from grab-Bag. Unfortunately there exists no marker for "not changed", 
so a heuristic is used
 // here: If current left, top and right margins do not differ more than 
1Hmm = 635EMU from the
 // values in grab-Bag, it is likely, that the object was not changed and 
we restore the values
 // from grab-Bag.
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx 
b/writerfilter/source/dmapper/GraphicImport.cxx
index 86a6ebabe3e4..f67966d0008c 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -994,7 +994,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
 m_pImpl->nBottomMargin += aMSOBaseLeftTop.Y + 
aMSOBaseSize.Height
   - (aLOSnapRect.Y + 
aLOSnapRect.Height);
 // tdf#141880 LibreOffice cannot handle 
negative vertical margins.
-// Those cases are catched below at common 
place.
+// Those cases are caught below at common 
place.
 }
 } // end IMPORT_AS_DETECTED_INLINE
 else if ((m_pImpl->nWrap == text::WrapTextMode_PARALLEL
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sc/inc sc/qa sc/source

2021-06-28 Thread Balazs Varga (via logerrit)
 sc/inc/document.hxx|1 
 sc/inc/table.hxx   |1 
 sc/qa/uitest/autofilter/autofilter.py  |   31 +
 sc/qa/uitest/data/autofilter/tdf140462.ods |binary
 sc/source/core/data/documen3.cxx   |   11 ++
 sc/source/core/data/table3.cxx |   24 +-
 sc/source/filter/xml/xmldrani.cxx  |2 +
 7 files changed, 65 insertions(+), 5 deletions(-)

New commits:
commit b92ec0e15311bfd653ccd7282f109273d3a5a002
Author: Balazs Varga 
AuthorDate: Wed Feb 17 15:20:34 2021 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Jun 28 18:17:28 2021 +0200

tdf#140462 sc ODF import: fix empty autofilter columns

(followed a date type autofilter column) by setting
QueryType to ByDate at ODF import.

Change-Id: Ie78cb15885dfb1e40c9e8ac993ff79b19fe17993
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111070
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit f37f159f2e0c7abe45ac7a3eec447f1234ad1662)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117991
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 80592f15b3aa..51130b2fe7cb 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -2063,6 +2063,7 @@ public:
 
 void   Reorder( const sc::ReorderParam& rParam );
 
+void   PrepareQuery( SCTAB nTab, ScQueryParam& rQueryParam );
 SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, 
bool bKeepSub );
 SC_DLLPUBLIC bool  CreateQueryParam( const ScRange& rRange, ScQueryParam& 
rQueryParam );
 void   GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, 
OUString& rStr);
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 5cba3d0af77b..4a02a53f8b88 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -949,6 +949,7 @@ public:
 bool* pbTestEqualCondition = nullptr, const ScInterpreterContext* 
pContext = nullptr,
 sc::TableColumnBlockPositionSet* pBlockPos = nullptr );
 voidTopTenQuery( ScQueryParam& );
+voidPrepareQuery( ScQueryParam& rQueryParam );
 SCSIZE  Query(const ScQueryParam& rQueryParam, bool bKeepSub);
 boolCreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW 
nRow2, ScQueryParam& rQueryParam);
 
diff --git a/sc/qa/uitest/autofilter/autofilter.py 
b/sc/qa/uitest/autofilter/autofilter.py
index 2b36b4dff2e6..b8f2bb3be83f 100644
--- a/sc/qa/uitest/autofilter/autofilter.py
+++ b/sc/qa/uitest/autofilter/autofilter.py
@@ -251,5 +251,36 @@ class AutofilterTest(UITestCase):
 xOkBtn = xFloatWindow.getChild("cancel")
 xOkBtn.executeAction("CLICK", tuple())
 
+self.ui_test.close_doc()
+
+def test_tdf140462(self):
+doc = self.ui_test.load_file(get_url_for_data_file("tdf140462.ods"))
+
+xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "0", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+xTreeList = xCheckListMenu.getChild("check_tree_box")
+self.assertEqual(3, len(xTreeList.getChildren()))
+xOkBtn = xFloatWindow.getChild("cancel")
+xOkBtn.executeAction("CLICK", tuple())
+
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "1", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+xTreeList = xCheckListMenu.getChild("check_list_box")
+self.assertEqual(3, len(xTreeList.getChildren()))
+xOkBtn = xFloatWindow.getChild("cancel")
+xOkBtn.executeAction("CLICK", tuple())
+
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "2", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+xTreeList = xCheckListMenu.getChild("check_list_box")
+self.assertEqual(4, len(xTreeList.getChildren()))
+xOkBtn = xFloatWindow.getChild("cancel")
+xOkBtn.executeAction("CLICK", tuple())
+
 self.ui_test.close_doc()
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/autofilter/tdf140462.ods 
b/sc/qa/uitest/data/autofilter/tdf140462.ods
new file mode 100644
index ..8fe7ed8a9705
Binary files /dev/null and b/sc/qa/uitest/data/autofilter/tdf140462.ods differ
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index c2adce1c3ae7..4291a2b6e03c 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1443,6 +1443,17 @@ void ScDocument::Reorder( const sc::ReorderParam& rPar

[Libreoffice-commits] core.git: sw/qa

2021-06-28 Thread Andrea Gelmini (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 3935b85163336ade4d0555a345c7ba2a9b1fc4d7
Author: Andrea Gelmini 
AuthorDate: Mon Jun 28 13:18:02 2021 +0200
Commit: Andrea Gelmini 
CommitDate: Mon Jun 28 18:06:15 2021 +0200

Remove duplicated include

Change-Id: I0b92374a9d476944e88ac8d08c024f17f689d696
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118010
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index 7f8ba137825b..21e3a73f8cfd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sysui/desktop

2021-06-28 Thread Samuel Mehrbrodt (via logerrit)
 sysui/desktop/macosx/Info.plist.in  |5 +
 sysui/desktop/menus/startcenter.desktop |2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit a31b7ea9e62f6d44685aff28e1412eb43b796847
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jun 24 11:04:05 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 17:53:33 2021 +0200

Add URI handlers for MS Office URI Schemes on Linux/macOS

This was already done for Windows in 
fdd8686987ca4ee693f5f194c8eb482daa69cfef

Change-Id: I2fa43bf2930e9df9fbeb9169d28700ef4bdbaacc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117726
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sysui/desktop/macosx/Info.plist.in 
b/sysui/desktop/macosx/Info.plist.in
index 985ea047b0ea..e50d7a20c4dd 100644
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -1531,6 +1531,11 @@
 CFBundleURLSchemes
 
 vnd.libreoffice.command
+ms-word
+ms-powerpoint
+ms-excel
+ms-visio
+ms-access
 
 
 
diff --git a/sysui/desktop/menus/startcenter.desktop 
b/sysui/desktop/menus/startcenter.desktop
index be551ae27335..6bb33e58266d 100644
--- a/sysui/desktop/menus/startcenter.desktop
+++ b/sysui/desktop/menus/startcenter.desktop
@@ -23,7 +23,7 @@ Icon=startcenter
 Type=Application
 
Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Other;
 Exec=${UNIXBASISROOTNAME} %%FILE%%
-MimeType=application/vnd.openofficeorg.extension;x-scheme-handler/vnd.libreoffice.cmis;x-scheme-handler/vnd.sun.star.webdav;x-scheme-handler/vnd.sun.star.webdavs;x-scheme-handler/vnd.libreoffice.command;
+MimeType=application/vnd.openofficeorg.extension;x-scheme-handler/vnd.libreoffice.cmis;x-scheme-handler/vnd.sun.star.webdav;x-scheme-handler/vnd.sun.star.webdavs;x-scheme-handler/vnd.libreoffice.command;x-scheme-handler/ms-word;x-scheme-handler/ms-powerpoint;x-scheme-handler/ms-excel;x-scheme-handler/ms-visio;x-scheme-handler/ms-access;
 Name=%PRODUCTNAME
 GenericName=Office
 Comment=The office productivity suite compatible to the open and standardized 
ODF document format. Supported by The Document Foundation.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sw/qa sw/source

2021-06-28 Thread Attila Szűcs (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx|   10 ++
 sw/source/filter/ww8/attributeoutputbase.hxx  |2 +-
 sw/source/filter/ww8/docxattributeoutput.cxx  |   14 +-
 sw/source/filter/ww8/docxattributeoutput.hxx  |2 +-
 sw/source/filter/ww8/docxexport.cxx   |4 ++--
 sw/source/filter/ww8/docxexport.hxx   |3 ++-
 sw/source/filter/ww8/rtfattributeoutput.cxx   |2 +-
 sw/source/filter/ww8/rtfattributeoutput.hxx   |4 ++--
 sw/source/filter/ww8/rtfexport.cxx|5 +++--
 sw/source/filter/ww8/rtfexport.hxx|4 ++--
 sw/source/filter/ww8/wrtww8.hxx   |6 --
 sw/source/filter/ww8/ww8atr.cxx   |   16 +---
 sw/source/filter/ww8/ww8attributeoutput.hxx   |2 +-
 14 files changed, 55 insertions(+), 19 deletions(-)

New commits:
commit e99064ce8f4f4ca45e57b18a095b867ca50ab006
Author: Attila Szűcs 
AuthorDate: Thu Feb 25 13:29:46 2021 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Jun 28 17:43:03 2021 +0200

tdf#121666 DOCX export: fix missing page break

When an empty paragraph has both page break and section
break, only the section break was exported to DOCX,
the page break was not, while MSO needs that to show
all page breaks.

The DOC and RTF exports were not changed by this fix
(not sure if the problem are present with them or not).

Co-authored-by: Tibor Nagy (NISZ)

Change-Id: I5deac0390666415e36a541c731dda4bc0a2ad6ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111543
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit d58229d61b8bbf9eb0db841826e361940c7b2a4a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117990
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docx 
b/sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docx
new file mode 100644
index ..195f574d1c5d
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index a9ea821e1700..89ec02bbafed 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -86,6 +86,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121374_sectionHF2, 
"tdf121374_sectionHF2.doc")
 CPPUNIT_ASSERT( xHeaderText->getString().startsWith("virkamatka-anomus") );
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121666_lostPage, 
"tdf121666_lostPage.docx")
+{
+xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:br", "type", 
"page");
+// The second page break is exported too.
+// Before this fix, if a node had both section break and page break, then 
only the section break was exported.
+assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:br", "type", 
"page");
+assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:sectPr/w:type", 
"val", "nextPage");
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf95848, "tdf95848.docx")
 {
 OUString listId;
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx 
b/sw/source/filter/ww8/attributeoutputbase.hxx
index 327f1fa9d26d..4a2929ed8455 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -300,7 +300,7 @@ public:
 /// Write a section break
 /// msword::ColumnBreak or msword::PageBreak
 /// bBreakAfter: the break must be scheduled for insertion in the end of 
current paragraph
-virtual void SectionBreak( sal_uInt8 nC, bool bBreakAfter, const 
WW8_SepInfo* pSectionInfo = nullptr ) = 0;
+virtual void SectionBreak( sal_uInt8 nC, bool bBreakAfter, const 
WW8_SepInfo* pSectionInfo = nullptr, bool bExtraPageBreak = false ) = 0;
 
 // preserve page vertical alignment
 virtual void TextVerticalAdjustment( const 
css::drawing::TextVerticalAdjust) {};
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 3ba079cde7f4..79800cf24cbc 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6522,7 +6522,7 @@ void DocxAttributeOutput::PageBreakBefore( bool bBreak )
 FSNS( XML_w, XML_val ), "false" );
 }
 
-void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, bool bBreakAfter, const 
WW8_SepInfo* pSectionInfo )
+void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, bool bBreakAfter, const 
WW8_SepInfo* pSectionInfo, bool bExtraPageBreak)
 {
 switch ( nC )
 {
@@ -6573,10 +6573,22 @@ void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, 
bool bBreakAfter, const WW
 

[Libreoffice-commits] core.git: sw/uiconfig

2021-06-28 Thread Heiko Tietze (via logerrit)
 sw/uiconfig/swriter/statusbar/statusbar.xml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0707380f05d4cce2d17eb74c4b871dcf17d3ac1f
Author: Heiko Tietze 
AuthorDate: Mon Jun 28 15:18:02 2021 +0200
Commit: Heiko Tietze 
CommitDate: Mon Jun 28 17:37:29 2021 +0200

Resolves tdf#133265 - State indicator as first item

Since I719f8a97a867addcd6a544567b1173e6da0f7db8 made trouble
with unit tests this is another approach to make sure
the document save state is always visible

Change-Id: Ieb171c6f2a8bb038f86fdafac737a4e39963f03d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118022
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sw/uiconfig/swriter/statusbar/statusbar.xml 
b/sw/uiconfig/swriter/statusbar/statusbar.xml
index f85f07daa068..4f55934870c2 100644
--- a/sw/uiconfig/swriter/statusbar/statusbar.xml
+++ b/sw/uiconfig/swriter/statusbar/statusbar.xml
@@ -18,13 +18,13 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 -->
 http://openoffice.org/2001/statusbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+ 
  
  
  
  
  
  
- 
  
  
  
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/headless

2021-06-28 Thread Jan-Marek Glogowski (via logerrit)
 vcl/headless/svpinst.cxx |   51 ---
 1 file changed, 22 insertions(+), 29 deletions(-)

New commits:
commit 64e8c2adbbe13cf082819229b8014ffb28911b76
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jun 27 22:12:14 2021 +
Commit: Jan-Marek Glogowski 
CommitDate: Mon Jun 28 17:36:42 2021 +0200

Test SvpSalYieldMutex like DBG_TESTSOLARMUTEX

Introduce and use DBG_TESTSVPYIELDMUTEX.

Change-Id: I002fa8faf744d69ab00ceeddda4f56b46aec0b34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118015
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 638052611360..b488d54d7527 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -62,6 +62,23 @@
 
 SvpSalInstance* SvpSalInstance::s_pDefaultInstance = nullptr;
 
+#ifndef NDEBUG
+static bool g_CheckedMutex = false;
+
+#define DBG_TESTSVPYIELDMUTEX() \
+do { \
+if (!g_CheckedMutex) \
+{ \
+assert(dynamic_cast(GetYieldMutex()) != nullptr \
+&& "This SvpSalInstance function requires use of 
SvpSalYieldMutex"); \
+g_CheckedMutex = true; \
+} \
+} while(false)
+
+#else // NDEBUG
+#define DBG_TESTSVPYIELDMUTEX() ((void)0)
+#endif
+
 #if !defined(ANDROID) && !defined(IOS)
 
 static void atfork_child()
@@ -158,23 +175,11 @@ void SvpSalInstance::TriggerUserEventProcessing()
 Wakeup();
 }
 
-#ifndef NDEBUG
-static bool g_CheckedMutex = false;
-#endif
-
 void SvpSalInstance::Wakeup(SvpRequest const request)
 {
-#ifndef NDEBUG
-if (!g_CheckedMutex)
-{
-assert(dynamic_cast(GetYieldMutex()) != nullptr
-&& "This SvpSalInstance function requires use of 
SvpSalYieldMutex");
-g_CheckedMutex = true;
-}
-#endif
+DBG_TESTSVPYIELDMUTEX();
 
 ImplSVData* pSVData = ImplGetSVData();
-
 if (pSVData->mpWakeCallback && pSVData->mpPollClosure)
 pSVData->mpWakeCallback(pSVData->mpPollClosure);
 
@@ -309,6 +314,8 @@ std::shared_ptr SvpSalInstance::CreateSalBitmap()
 
 void SvpSalInstance::ProcessEvent( SalUserEvent aEvent )
 {
+DBG_TESTSVPYIELDMUTEX();
+
 aEvent.m_pFrame->CallCallback( aEvent.m_nEvent, aEvent.m_pData );
 if( aEvent.m_nEvent == SalEvent::Resize )
 {
@@ -316,14 +323,7 @@ void SvpSalInstance::ProcessEvent( SalUserEvent aEvent )
 const SvpSalFrame* pSvpFrame = static_cast( 
aEvent.m_pFrame);
 pSvpFrame->PostPaint();
 }
-#ifndef NDEBUG
-if (!g_CheckedMutex)
-{
-assert(dynamic_cast(GetYieldMutex()) != nullptr
-&& "This SvpSalInstance function requires use of 
SvpSalYieldMutex");
-g_CheckedMutex = true;
-}
-#endif
+
 SvpSalYieldMutex *const 
pMutex(static_cast(GetYieldMutex()));
 pMutex->m_NonMainWaitingYieldCond.set();
 }
@@ -448,14 +448,7 @@ void SvpSalInstance::updateMainThread()
 
 bool SvpSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents)
 {
-#ifndef NDEBUG
-if (!g_CheckedMutex)
-{
-assert(dynamic_cast(GetYieldMutex()) != nullptr
-&& "This SvpSalInstance function requires use of 
SvpSalYieldMutex");
-g_CheckedMutex = true;
-}
-#endif
+DBG_TESTSVPYIELDMUTEX();
 
 // first, process current user events
 bool bEvent = DispatchUserEvents(bHandleAllCurrentEvents);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sc/qa sc/source

2021-06-28 Thread Balazs Varga (via logerrit)
 sc/qa/uitest/autofilter/autofilter.py   |   15 
 sc/qa/uitest/data/autofilter/tdf140469.xlsx |binary
 sc/source/filter/inc/autofilterbuffer.hxx   |   10 ++---
 sc/source/filter/oox/autofilterbuffer.cxx   |   51 ++--
 4 files changed, 40 insertions(+), 36 deletions(-)

New commits:
commit 3c61eb1acbc394a184a4e54d86e005b71f2f7182
Author: Balazs Varga 
AuthorDate: Thu Feb 18 18:04:53 2021 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Jun 28 17:27:19 2021 +0200

tdf#140469 XLSX import: apply more than 8 filters

in OOXML autofilter import by removing the artificial
limit (which looked like the limit for conditions
handled by the standard filter in LO, but not for the
autofilter). Now the autofilter popup menu does not
always select all items, if the document contained more
than 8 selected items there.

Change-Id: Iaa6ce15d4b1162ab78dd001734721ae859283d0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/56
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 7ba76115b0e3baefae0ede66848f4340c7c7401b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117989
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/sc/qa/uitest/autofilter/autofilter.py 
b/sc/qa/uitest/autofilter/autofilter.py
index 3905147da08b..2b36b4dff2e6 100644
--- a/sc/qa/uitest/autofilter/autofilter.py
+++ b/sc/qa/uitest/autofilter/autofilter.py
@@ -236,5 +236,20 @@ class AutofilterTest(UITestCase):
 xOkBtn = xFloatWindow.getChild("cancel")
 xOkBtn.executeAction("CLICK", tuple())
 
+self.ui_test.close_doc()
+
+def test_tdf140469(self):
+doc = self.ui_test.load_file(get_url_for_data_file("tdf140469.xlsx"))
+
+xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "1", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+xTreeList = xCheckListMenu.getChild("check_list_box")
+self.assertEqual(9, len(xTreeList.getChildren()))
+xOkBtn = xFloatWindow.getChild("cancel")
+xOkBtn.executeAction("CLICK", tuple())
+
 self.ui_test.close_doc()
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/autofilter/tdf140469.xlsx 
b/sc/qa/uitest/data/autofilter/tdf140469.xlsx
new file mode 100644
index ..3c90c7cfe1b1
Binary files /dev/null and b/sc/qa/uitest/data/autofilter/tdf140469.xlsx differ
diff --git a/sc/source/filter/inc/autofilterbuffer.hxx 
b/sc/source/filter/inc/autofilterbuffer.hxx
index e0270336a10e..3b512f4f98b9 100644
--- a/sc/source/filter/inc/autofilterbuffer.hxx
+++ b/sc/source/filter/inc/autofilterbuffer.hxx
@@ -64,7 +64,7 @@ public:
 virtual voidimportRecord( sal_Int32 nRecId, SequenceInputStream& 
rStrm );
 
 /** Derived classes return converted UNO API filter settings representing 
all filter settings. */
-virtual ApiFilterSettings finalizeImport( sal_Int32 nMaxCount );
+virtual ApiFilterSettings finalizeImport();
 };
 
 
@@ -82,7 +82,7 @@ public:
 virtual voidimportRecord( sal_Int32 nRecId, SequenceInputStream& 
rStrm ) override;
 
 /** Returns converted UNO API filter settings representing all filter 
settings. */
-virtual ApiFilterSettings finalizeImport( sal_Int32 nMaxCount ) override;
+virtual ApiFilterSettings finalizeImport() override;
 
 private:
 
@@ -103,7 +103,7 @@ public:
 virtual voidimportRecord( sal_Int32 nRecId, SequenceInputStream& 
rStrm ) override;
 
 /** Returns converted UNO API filter settings representing all filter 
settings. */
-virtual ApiFilterSettings finalizeImport( sal_Int32 nMaxCount ) override;
+virtual ApiFilterSettings finalizeImport() override;
 
 private:
 double  mfValue;/// Number of items or percentage.
@@ -141,7 +141,7 @@ public:
 virtual voidimportRecord( sal_Int32 nRecId, SequenceInputStream& 
rStrm ) override;
 
 /** Returns converted UNO API filter settings representing all filter 
settings. */
-virtual ApiFilterSettings finalizeImport( sal_Int32 nMaxCount ) override;
+virtual ApiFilterSettings finalizeImport() override;
 
 private:
 /** Appends the passed filter criterion, if it contains valid settings. */
@@ -174,7 +174,7 @@ public:
 
 /** Returns converted UNO API filter settings representing all filter
 settings of this column. */
-ApiFilterSettings   finalizeImport( sal_Int32 nMaxCount );
+ApiFilterSettings   finalizeImport();
 
 private:
 std::shared_ptr< FilterSettingsBase >
diff --git a/sc/source/filter/oox/autofilterbuffer.cxx 
b/sc/source/filter/oox/autofilterbuffer.cxx
index 757981a66ee3..a9ec62c4e655 100644
--- a/sc/source/filter/oox/autofilterbuffer.cxx
+++ b/sc/source/filter/oox/a

[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sc/source

2021-06-28 Thread Tünde Tóth (via logerrit)
 sc/source/ui/view/tabview3.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 76e4e8c07188e85020d301c4997a5d5bf1d3e510
Author: Tünde Tóth 
AuthorDate: Mon Feb 22 16:49:19 2021 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Jun 28 17:14:49 2021 +0200

tdf#140599 calc UI: fix row and column highlight

The row and column headers lost their highlighting
when selection moved over a filtered row.

Change-Id: Ic416a6183710bbc84fe47a8b2de32ca86bafc11f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111371
Tested-by: Jenkins
Tested-by: Balazs Varga 
Reviewed-by: Balazs Varga 
(cherry picked from commit cd6d3a3d434e39c250418ed5547ff3af1b0f7482)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117988
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index bdb78e9c2e98..22c1b768ec11 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -187,7 +187,8 @@ void ScTabView::UpdateAutoFillMark(bool bFromPaste)
 {
 // single selection or cursor
 ScRange aMarkRange;
-bool bMarked = (aViewData.GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE);
+ScMarkType eMarkType = aViewData.GetSimpleArea(aMarkRange);
+bool bMarked = eMarkType == SC_MARK_SIMPLE || eMarkType == 
SC_MARK_SIMPLE_FILTERED;
 
 for (sal_uInt16 i = 0; i < 4; i++)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/osx

2021-06-28 Thread Stephan Bergmann (via logerrit)
 vcl/osx/DataFlavorMapping.cxx |  102 +-
 vcl/osx/DragSource.cxx|   28 +--
 vcl/osx/HtmlFmtFlt.cxx|4 -
 vcl/osx/OSXTransferable.cxx   |   32 ++---
 vcl/osx/a11ywrapper.mm|   58 +++
 vcl/osx/clipboard.cxx |4 -
 vcl/osx/salnativewidgets.cxx  |2 
 7 files changed, 115 insertions(+), 115 deletions(-)

New commits:
commit efab07a370c52e57c4a4adaed1ab90e232caaf0b
Author: Stephan Bergmann 
AuthorDate: Mon Jun 28 16:09:24 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Jun 28 17:09:32 2021 +0200

loplugin:indentation (macOS)

Change-Id: Ia7b33ee93dbb4d27a2387af6e2dd247b5f0b0788
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118026
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/vcl/osx/DataFlavorMapping.cxx b/vcl/osx/DataFlavorMapping.cxx
index 82065b2c88be..feecca3f663e 100644
--- a/vcl/osx/DataFlavorMapping.cxx
+++ b/vcl/osx/DataFlavorMapping.cxx
@@ -186,9 +186,9 @@ DataProviderBaseImpl::DataProviderBaseImpl(id data) :
 DataProviderBaseImpl::~DataProviderBaseImpl()
 {
   if (mSystemData)
-{
+  {
   [mSystemData release];
-}
+  }
 }
 
 namespace {
@@ -233,15 +233,15 @@ Any UniDataProvider::getOOoData()
   Any oOOData;
 
   if (mSystemData)
-{
+  {
   oOOData <<= OUString(static_cast([mSystemData bytes]),
  [mSystemData length],
  RTL_TEXTENCODING_UTF8);
-}
+  }
   else
-{
+  {
   oOOData = mData;
-}
+  }
 
   return oOOData;
 }
@@ -285,17 +285,17 @@ Any ByteSequenceDataProvider::getOOoData()
   Any oOOData;
 
   if (mSystemData)
-{
+  {
   unsigned int flavorDataLength = [mSystemData length];
   Sequence byteSequence;
   byteSequence.realloc(flavorDataLength);
   memcpy(byteSequence.getArray(), [mSystemData bytes], flavorDataLength);
   oOOData <<= byteSequence;
-}
+  }
   else
-{
+  {
   oOOData =  mData;
-}
+  }
 
   return oOOData;
 }
@@ -334,7 +334,7 @@ Any HTMLFormatDataProvider::getOOoData()
   Any oOOData;
 
   if (mSystemData)
-{
+  {
   unsigned int flavorDataLength = [mSystemData length];
   Sequence unkHtmlData;
 
@@ -345,17 +345,17 @@ Any HTMLFormatDataProvider::getOOoData()
   Sequence plainHtml;
 
   if (isHTMLFormat(unkHtmlData))
-{
+  {
   plainHtml = HTMLFormatToTextHtml(unkHtmlData);
   pPlainHtml = &plainHtml;
-}
+  }
 
   oOOData <<= *pPlainHtml;
-}
+  }
   else
-{
+  {
   oOOData = mData;
-}
+  }
 
   return oOOData;
 }
@@ -463,34 +463,34 @@ Any FileListDataProvider::getOOoData()
   Any oOOData;
 
   if (mSystemData)
-{
+  {
   size_t length = [mSystemData count];
   size_t lenSeqRequired = 0;
 
   for (size_t i = 0; i < length; i++)
-{
+  {
   NSString* fname = [mSystemData objectAtIndex: i];
   lenSeqRequired += [fname maximumLengthOfBytesUsingEncoding: 
NSUnicodeStringEncoding] + sizeof(unichar);
-}
+  }
 
   Sequence oOOFileList(lenSeqRequired);
   unichar* pBuffer = reinterpret_cast(oOOFileList.getArray());
   memset(pBuffer, 0, lenSeqRequired);
 
   for (size_t i = 0; i < length; i++)
-{
+  {
   NSString* fname = [mSystemData objectAtIndex: i];
   [fname getCharacters: pBuffer];
   size_t l = [fname length];
   pBuffer += l + 1;
-}
+  }
 
   oOOData <<= oOOFileList;
-}
+  }
   else
-{
+  {
   oOOData = mData;
-}
+  }
 
   return oOOData;
 }
@@ -553,7 +553,7 @@ const NSString* DataFlavorMapper::openOfficeToSystemFlavor( 
const DataFlavor& oO
 
 for( size_t i = 0; i < SIZE_FLAVOR_MAP; ++i )
 {
-   if 
(oOOFlavor.MimeType.startsWith(OUString::createFromAscii(flavorMap[i].OOoFlavor)))
+if 
(oOOFlavor.MimeType.startsWith(OUString::createFromAscii(flavorMap[i].OOoFlavor)))
 {
 if (flavorMap[i].SystemFlavor != nil)
 sysFlavor = flavorMap[i].SystemFlavor;
@@ -594,7 +594,7 @@ DataProviderPtr_t DataFlavorMapper::getDataProvider( const 
NSString* systemFlavo
   Any data = rTransferable->getTransferData(oOOFlavor);
 
   if (isByteSequenceType(data.getValueType()))
-{
+  {
   /*
  the HTMLFormatDataProvider prepends segment information to HTML
  this is useful for exchange with MS Word (which brings this stuff 
from Windows)
@@ -608,29 +608,29 @@ DataProviderPtr_t DataFlavorMapper::getDataProvider( 
const NSString* systemFlavo
   else
   */
   if ([systemFlavor caseInsensitiveCompare: NSPasteboardTypeTIFF] == 
NSOrderedSame)
-{
+  {
   dp = DataProviderPtr_t( new PNGDataProvider( data, 
NSBitmapImageFileTypeTIFF));
-}
+  }
 SAL_WNODEPRECATED_DECLARATIONS_PUSH
   // "'NSF

Re: What is the best fit for hindiVowels import? CHARS_PERSIAN or CHARS_NEPALI

2021-06-28 Thread DaeHyun Sung
Hello, everyone.

I'm DaeHyun Sung from S Korea.
I'm a Korean & LibreOffice Korean Team leader.

I read the source code, "sw/source/filter/ww8/docxattributeoutput.cxx"
https://docs.libreoffice.org/sw/html/docxattributeoutput_8cxx_source.html
https://git.libreoffice.org/core/+/refs/heads/master/sw/source/filter/ww8/docxattributeoutput.cxx

But, In Korean, the usually used enum lists are removed.

6967 case style::NumberingType::HANGUL_CIRCLED_JAMO_KO:
6968 case style::NumberingType::HANGUL_CIRCLED_SYLLABLE_KO:

In Korean environment, many of wordprocessors use both
"style::NumberingType::HANGUL_CIRCLED_JAMO_KO" and
" style::NumberingType::HANGUL_CIRCLED_SYLLABLE_KO"
It uses both MS Word & HWP(Hangul Word Processor)

And I compare with "sw/source/filter/ww8/ww8atr.cxx" and Microsoft's OOXML
manual
https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oe376/a5deef83-bb01-410f-bde0-9c35abe4ca52

that site shows "The mapped numbering format values table."

follows code located at
case style::NumberingType::HANGUL_SYLLABLE_KO: nRet = 24; break;// ganada
case style::NumberingType::HANGUL_JAMO_KO: nRet = 25; break;// chosung
case style::NumberingType::HANGUL_CIRCLED_SYLLABLE_KO: nRet = 24; break;
case style::NumberingType::HANGUL_CIRCLED_JAMO_KO: nRet = 25; break;
case style::NumberingType::NUMBER_HANGUL_KO: nRet = 41; break;
case style::NumberingType::NUMBER_UPPER_KO: nRet = 44; break;

I guess that  "style::NumberingType::HANGUL_CIRCLED_JAMO_KO" means these
characters.
㉠ ㉡ ㉢ ㉣ ㉤ ㉥ ㉦ ㉧ ㉨ ㉩ ㉪ ㉫ ㉬ ㉭  ㈀ ㈁ ㈂ ㈃ ㈄ ㈅ ㈆ ㈇ ㈈ ㈉ ㈊ ㈋ ㈌ ㈍

I guess that "style::NumberingType::HANGUL_CIRCLED_SYLLABLE_KO" means these
Characters.
㉮ ㉯ ㉰ ㉱ ㉲ ㉳ ㉴ ㉵ ㉶ ㉷ ㉸ ㉹ ㉺ ㉻㈎ ㈏ ㈐ ㈑ ㈒ ㈓ ㈔ ㈕ ㈖ ㈗ ㈘ ㈙ ㈚ ㈛

So, I'll check docx(OOXML) file and MS Word's bulletin numbering &
numbering works in Korean.

I think I found a Korean bug on LibreOffice in this email.

Sincerely,
DaeHyun Sung(성대현)


2021년 6월 28일 (월) 오후 8:40, Mark Hung 님이 작성:

> Hi Miklos and Justin,
>
> Miklos Vajna  於 2021年6月28日 週一 下午3:44寫道:
>
>> Hi Justin,
>>
>> On Thu, Jun 24, 2021 at 01:24:44PM +0200, Justin Luth <
>> justin_l...@sil.org> wrote:
>> > DOCX import was provided by commit
>> 9da74fa484772595fa50e188ba2c496a459cbd6b
>> >
>> > Author: Cédric Bosdonnat on Wed Mar 3 14:27:29 2010 +0100
>> > cbosdo03: Fixed issue 109772.
>> > Backported go-oo patch to the CWS
>> >
>> >
>> > DOCX export was provided by commit
>> 91b926d4b9939337f54d6c9f0b940b161dc3437f
>> > Author: Mark Hung on Sun Jan 24 16:36:05 2016 +0800
>> > tdf#84317 convert missing numbering types to OOXML tokens.
>>
>> Thanks for digging into the history of this. Mark is still around.
>>
>> Mark: any input on this?
>>
>>
> I don't remember how I mapped those enums.
> But I think it's reasonable to copy what doc filter does.
> Since I don't know the languages either, I'd prefer to let actual users
> judge about the result.
>
>
> Best regards.
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>


-- 
Korean Open Source Developer, Contributor, Translator.
LibreOffice, KDE, GNOME Contributor.
The Document Foundation Member in Korea.
GNOME Foundation Member in Korea.
Interested in LibreOffice, KDE, GNOME, Web, etc.
LibreOffice – free and open source office suite: https://www.libreoffice.org
Respects your privacy, and gives you back control over your data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sc/inc sc/qa sc/source

2021-06-28 Thread Attila Szűcs (via logerrit)
 sc/inc/document.hxx|5 -
 sc/inc/table.hxx   |7 +
 sc/qa/unit/bugfix-test.cxx |   19 
 sc/qa/unit/data/ods/tdf104502_hiddenColsCountedInPageCount.ods |binary
 sc/source/core/data/documen2.cxx   |4 
 sc/source/core/data/document.cxx   |4 
 sc/source/core/data/table1.cxx |   47 
+++---
 sc/source/ui/unoobj/cursuno.cxx|2 
 8 files changed, 66 insertions(+), 22 deletions(-)

New commits:
commit 30eaa0b7e316129ece585a57460540a6e63e670a
Author: Attila Szűcs 
AuthorDate: Wed Jan 27 17:43:43 2021 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Jun 28 17:06:20 2021 +0200

tdf#104502 sc: skip hidden columns at printing pages

Page calculation counted the hidden columns, resulted
printing blank pages by accident.

Extend GetPrintArea() and GetTableArea() to count pages
without the hidden columns, too.

Co-authored-by: Tibor Nagy (NISZ)

Change-Id: I4817965a675e059cdc8f81ca3bb6e128af874f2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110028
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 2bf3e0d00e3bccb5b250642ee0d3fdbe6cae8ecc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117984
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 832a02410eed..80592f15b3aa 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1456,9 +1456,10 @@ public:
 boolGetDataAreaSubrange(ScRange& rRange) const;
 
 SC_DLLPUBLIC bool   GetCellArea( SCTAB nTab, SCCOL& rEndCol, 
SCROW& rEndRow ) const;
-SC_DLLPUBLIC bool   GetTableArea( SCTAB nTab, SCCOL& rEndCol, 
SCROW& rEndRow ) const;
+SC_DLLPUBLIC bool   GetTableArea( SCTAB nTab, SCCOL& rEndCol, 
SCROW& rEndRow,
+  bool bCalcHiddens = false) const;
 SC_DLLPUBLIC bool   GetPrintArea( SCTAB nTab, SCCOL& rEndCol, 
SCROW& rEndRow,
-  bool bNotes = true ) const;
+  bool bNotes = true, bool 
bCalcHiddens = false) const;
 SC_DLLPUBLIC bool   GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, 
SCROW nEndRow,
  SCCOL& rEndCol ) const;
 SC_DLLPUBLIC bool   GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, 
SCCOL nEndCol,
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index ea13cf9b4071..5cba3d0af77b 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -198,6 +198,8 @@ private:
 
 mutable SCCOL nTableAreaX;
 mutable SCROW nTableAreaY;
+mutable SCCOL nTableAreaVisibleX;
+mutable SCROW nTableAreaVisibleY;
 
 SCTAB   nTab;
 ScDocument& rDocument;
@@ -232,6 +234,7 @@ private:
 boolbLoadingRTL:1;
 boolbPageSizeValid:1;
 mutable boolbTableAreaValid:1;
+mutable boolbTableAreaVisibleValid:1;
 boolbVisible:1;
 boolbStreamValid:1;
 boolbPendingRowHeights:1;
@@ -567,8 +570,8 @@ public:
 voidInvalidatePageBreaks();
 
 boolGetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const;   
 // FALSE = empty
-boolGetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const;
-boolGetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes ) 
const;
+boolGetTableArea( SCCOL& rEndCol, SCROW& rEndRow, bool 
bCalcHiddens = false) const;
+boolGetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes, 
bool bCalcHiddens = false) const;
 boolGetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
 SCCOL& rEndCol ) const;
 boolGetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
index be2a00a94e76..88b48326505e 100644
--- a/sc/qa/unit/bugfix-test.cxx
+++ b/sc/qa/unit/bugfix-test.cxx
@@ -58,6 +58,7 @@ public:
 void testTdf128951();
 void testTdf129789();
 void testTdf130725();
+void testTdf104502_hiddenColsCountedInPageCount();
 
 CPPUNIT_TEST_SUITE(ScFiltersTest);
 CPPUNIT_TEST(testTdf137576_Measureline);
@@ -80,6 +81,7 @@ public:
 CPPUNIT_TEST(testTdf128951);
 CPPUNIT_TEST(testTdf129789);
 CPPUNIT_TEST(testTdf130725);
+CPPUNIT_TEST(testTdf104502_hiddenColsCountedInPageCount);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -716,6 +718,23 @@ void ScFiltersTest::testTdf130725()
 0.0042, xCell->getValue()); // strict equality
 }
 
+void ScFiltersTest::testTdf104502_hiddenColsCountedInPageCount()
+{
+ScDocShellRef xShell = loadDoc(u"tdf104502_hiddenC

[Libreoffice-commits] core.git: vcl/source

2021-06-28 Thread Stephan Bergmann (via logerrit)
 vcl/source/uitest/uno/uiobject_uno.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 2cc76ffcbe1f11f3b10a1a86b00f51e5ef179ac3
Author: Stephan Bergmann 
AuthorDate: Mon Jun 28 15:54:51 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Jun 28 16:57:42 2021 +0200

Remove dubious lone mutex lock

...introduced with 70f89e6b9f89177fc60f9cc9b55a87fdc5c6017f "uitest: move 
the
processing of actions into the idle handler", for no apparent reason.  (This
change will allow to get rid of mMutex as a member of UIObjectUnoObj in a 
later
commit.)

Change-Id: I1964eb1c4a1b4f790e689e55d4af8a0390cb4d5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118024
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx 
b/vcl/source/uitest/uno/uiobject_uno.cxx
index fe7a3d9901d7..fd75b892d0c4 100644
--- a/vcl/source/uitest/uno/uiobject_uno.cxx
+++ b/vcl/source/uitest/uno/uiobject_uno.cxx
@@ -29,9 +29,6 @@ UIObjectUnoObj::UIObjectUnoObj(std::unique_ptr 
pObj):
 
 UIObjectUnoObj::~UIObjectUnoObj()
 {
-{
-std::scoped_lock lk3(mMutex);
-}
 SolarMutexGuard aGuard;
 mpObj.reset();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/source

2021-06-28 Thread Stephan Bergmann (via logerrit)
 vcl/source/uitest/uno/uiobject_uno.cxx |8 +++-
 vcl/source/uitest/uno/uiobject_uno.hxx |3 ---
 2 files changed, 3 insertions(+), 8 deletions(-)

New commits:
commit 936298c38b6f7007097700e5862db00da89d0334
Author: Stephan Bergmann 
AuthorDate: Mon Jun 28 16:01:42 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Jun 28 16:55:05 2021 +0200

No need for these function arguments to be captured in UIObjectUnoObj

The lambda that uses them will never outlive the invocation of
UIObjectUnoObj::executeAction.

Change-Id: Icc5098a99389f7c70b69ca790acb4709f55b4dad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118025
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx 
b/vcl/source/uitest/uno/uiobject_uno.cxx
index 14a50f08c7b7..fe7a3d9901d7 100644
--- a/vcl/source/uitest/uno/uiobject_uno.cxx
+++ b/vcl/source/uitest/uno/uiobject_uno.cxx
@@ -106,18 +106,16 @@ void SAL_CALL UIObjectUnoObj::executeAction(const 
OUString& rAction, const css::
 throw css::uno::RuntimeException();
 
 std::unique_lock lk(mMutex);
-mAction = rAction;
-mPropValues = rPropValues;
 mReady = false;
 auto aIdle = std::make_unique();
 aIdle->SetDebugName("UI Test Idle Handler");
 aIdle->SetPriority(TaskPriority::HIGHEST);
 
-std::function func = [this](){
+std::function func = [&rAction, &rPropValues, this](){
 
 SolarMutexGuard aGuard;
 StringMap aMap;
-for (const auto& rPropVal : std::as_const(mPropValues))
+for (const auto& rPropVal : rPropValues)
 {
 OUString aVal;
 if (!(rPropVal.Value >>= aVal))
@@ -125,7 +123,7 @@ void SAL_CALL UIObjectUnoObj::executeAction(const OUString& 
rAction, const css::
 
 aMap[rPropVal.Name] = aVal;
 }
-mpObj->execute(mAction, aMap);
+mpObj->execute(rAction, aMap);
 };
 
 ExecuteWrapper* pWrapper = new ExecuteWrapper(func, LINK(this, 
UIObjectUnoObj, NotifyHdl));
diff --git a/vcl/source/uitest/uno/uiobject_uno.hxx 
b/vcl/source/uitest/uno/uiobject_uno.hxx
index f2e6d3e2b786..a9f2a294d9e3 100644
--- a/vcl/source/uitest/uno/uiobject_uno.hxx
+++ b/vcl/source/uitest/uno/uiobject_uno.hxx
@@ -63,9 +63,6 @@ private:
 std::condition_variable cv;
 std::mutex mMutex;
 bool mReady;
-
-OUString mAction;
-css::uno::Sequence mPropValues;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/gbuild

2021-06-28 Thread Jan-Marek Glogowski (via logerrit)
 solenv/gbuild/Module.mk |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 3f04160dd2b528e9d34a22c047e5f84282f77565
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jun 27 21:17:56 2021 +
Commit: Jan-Marek Glogowski 
CommitDate: Mon Jun 28 16:37:19 2021 +0200

Allow headless make debugrun

I have not the slightest idea, why I added this code in commit
6cdfe5ebb4f6c06bfa8b0e67e778dd68131c14e3 ("Drop some headless mode
variants"). This prevents running "make debugrun" headless using
SAL_USE_VCLPLUGIN=svp. A HEADLESS variable is just referred in
some make targets, but the environment doesn't affect them.
So just remove that code.

Change-Id: Icdf76bea6c75c7b14c3f01287ceb0fd4a11cb2d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118019
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 761dd539caa5..2ed303b33284 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -228,8 +228,6 @@ check : unitcheck slowcheck
$(call gb_Output_announce_bell)
 
 debugrun :
-   export HEADLESS= && \
-   $(if $(filter svp,$(SAL_USE_VCLPLUGIN)),unset SAL_USE_VCLPLUGIN &&) \
$(call gb_Module_DEBUGRUNCOMMAND)
 
 help :
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sc/qa sc/source

2021-06-28 Thread Balazs Varga (via logerrit)
 sc/qa/unit/data/xlsx/dateAutofilter.xlsx  |binary
 sc/qa/unit/subsequent_export-test.cxx |   25 
 sc/source/filter/excel/excrecds.cxx   |   31 ++
 sc/source/filter/inc/excrecds.hxx |2 -
 sc/source/filter/oox/autofilterbuffer.cxx |2 +
 sc/source/ui/unoobj/datauno.cxx   |1 
 6 files changed, 56 insertions(+), 5 deletions(-)

New commits:
commit ba0641817d42ddd338e63242c64798ace268ff01
Author: Balazs Varga 
AuthorDate: Wed Jan 20 12:11:14 2021 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Jun 28 16:34:00 2021 +0200

tdf#139809 sc ooxml export autofiltered date columns

Export XML_dateGroupItem, XML_year, XML_month, XML_day,
XML_dateTimeGrouping based on the OOXML standard.

Follow up commit of: d101a6f8579df8241dcd8100908868cd7d7c3f8a
(tdf#116818 sc OOXML: import autofiltered date columns)

Note: DOCX round-trip is not lossless here, because
instead of exporting the original yearly and monthly
dataGroupItem filtering, the export contains daily level
dataGroupItem elements for each day.

Change-Id: I456b2240213839725e2b416622986ee4a9cf60d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109699
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit eea523b686b27b4807ab21b62805ce9fbddf74ef)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117983
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/sc/qa/unit/data/xlsx/dateAutofilter.xlsx 
b/sc/qa/unit/data/xlsx/dateAutofilter.xlsx
new file mode 100644
index ..1c836511d0dc
Binary files /dev/null and b/sc/qa/unit/data/xlsx/dateAutofilter.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 4b0d5a0cb265..9b54d779c917 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -211,6 +211,7 @@ public:
 void testTdf95640_ods_to_xlsx();
 void testTdf95640_ods_to_xlsx_with_standard_list();
 void testTdf95640_xlsx_to_xlsx();
+void testDateAutofilterXLSX();
 
 void testRefStringXLSX();
 void testRefStringConfigXLSX();
@@ -390,6 +391,7 @@ public:
 CPPUNIT_TEST(testTdf95640_ods_to_xlsx);
 CPPUNIT_TEST(testTdf95640_ods_to_xlsx_with_standard_list);
 CPPUNIT_TEST(testTdf95640_xlsx_to_xlsx);
+CPPUNIT_TEST(testDateAutofilterXLSX);
 
 CPPUNIT_TEST(testRefStringXLSX);
 CPPUNIT_TEST(testRefStringConfigXLSX);
@@ -4443,6 +4445,29 @@ void ScExportTest::testTdf95640_xlsx_to_xlsx()
 "Low,Medium,High");
 }
 
+void ScExportTest::testDateAutofilterXLSX()
+{
+// XLSX Roundtripping autofilter with date list
+ScDocShellRef xDocSh = loadDoc(u"dateAutofilter.", FORMAT_XLSX);
+CPPUNIT_ASSERT(xDocSh.is());
+
+xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, 
m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX);
+CPPUNIT_ASSERT(pDoc);
+
+assertXPath(pDoc, "//x:autoFilter", "ref", "A1:B4");
+assertXPath(pDoc, 
"//x:autoFilter/x:filterColumn/x:filters/x:dateGroupItem[1]", "day", "02");
+assertXPath(pDoc, 
"//x:autoFilter/x:filterColumn/x:filters/x:dateGroupItem[1]", "month", "03");
+assertXPath(pDoc, 
"//x:autoFilter/x:filterColumn/x:filters/x:dateGroupItem[1]", "year", "2017");
+assertXPath(pDoc, 
"//x:autoFilter/x:filterColumn/x:filters/x:dateGroupItem[1]", 
"dateTimeGrouping", "day");
+
+assertXPath(pDoc, 
"//x:autoFilter/x:filterColumn/x:filters/x:dateGroupItem[2]", "day", "01");
+assertXPath(pDoc, 
"//x:autoFilter/x:filterColumn/x:filters/x:dateGroupItem[2]", "month", "10");
+assertXPath(pDoc, 
"//x:autoFilter/x:filterColumn/x:filters/x:dateGroupItem[2]", "year", "2014");
+assertXPath(pDoc, 
"//x:autoFilter/x:filterColumn/x:filters/x:dateGroupItem[2]", 
"dateTimeGrouping", "day");
+
+xDocSh->DoClose();
+}
+
 void ScExportTest::testTdf88657ODS()
 {
 ScDocShellRef xDocSh = loadDoc("tdf88657.", FORMAT_ODS);
diff --git a/sc/source/filter/excel/excrecds.cxx 
b/sc/source/filter/excel/excrecds.cxx
index 421c0e8f788b..c31c81dba4db 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -24,6 +24,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -781,7 +782,7 @@ void XclExpAutofilter::AddMultiValueEntry( const 
ScQueryEntry& rEntry )
 meType = MultiValue;
 const ScQueryEntry::QueryItemsType& rItems = rEntry.GetQueryItems();
 for (const auto& rItem : rItems)
-maMultiValues.push_back(rItem.maString.getString());
+maMultiValues.push_back( std::make_pair(rItem.maString.getString(), 
rItem.meType == ScQueryEntry::ByDate) );
 }
 
 void XclExpAutofilter::WriteBody( XclExpStream& rStrm )
@@ -839,9 +840,31 @@ void XclExpAutofilter::SaveXml( XclExpXmlStream& rStrm )
 rWorksheet->startElement(XML_filters);
 for (const auto& rMultiValue : maMult

[Libreoffice-commits] core.git: include/vcl

2021-06-28 Thread Stephan Bergmann (via logerrit)
 include/vcl/vclptr.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit db1e25a0f7c4c912bcdb4ad6a98d13928f522529
Author: Stephan Bergmann 
AuthorDate: Fri Jun 25 13:37:57 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Jun 28 16:30:42 2021 +0200

There appears to be no reason for (DBG_UTIL-only) ~VclPtr to be virtual

...ever since it was introduced with 
3ecb9b4bd7dc70664bbb8d7c957ea8dc5015223f
"tdf#99352: assert on stray VclPtrs past DeInit"

Change-Id: I4b87a6bacb53f74ff612a4193cee42145ea04fdb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117878
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx
index 0910257c49f5..3775034ff0c6 100644
--- a/include/vcl/vclptr.hxx
+++ b/include/vcl/vclptr.hxx
@@ -101,7 +101,7 @@ public:
 }
 
 #if defined(DBG_UTIL) && !defined(_WIN32)
-virtual ~VclPtr()
+~VclPtr()
 {
 assert(m_rInnerRef.get() == nullptr || vclmain::isAlive());
 // We can be one of the intermediate counts, but if we are the last
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sw/qa writerfilter/source

2021-06-28 Thread László Németh (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf137655.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx|8 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   18 +++---
 3 files changed, 23 insertions(+), 3 deletions(-)

New commits:
commit 9a7aba939bf6c3e72844d3913106eeca4ac0ef3e
Author: László Németh 
AuthorDate: Mon Jan 25 15:48:46 2021 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Jun 28 16:16:53 2021 +0200

tdf#137655 DOCX table import: fix zero para top margin

when only w:beforeAutospacing=0 was specified, but not
PARA_TOP_MARGIN (see default_spacing = -1 in processing
of LN_CT_Spacing_beforeAutospacing).

Follow-up of commit 61821277ed4974debd05af89cb7284602512088f
(tdf#104354 writerfilter: rewrite Autospacing).

Change-Id: I5fff7a8b62450ebaf8ef6b552ecbb2b1cfb24381
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109914
Tested-by: Jenkins
Reviewed-by: László Németh 
(cherry picked from commit 9e21215d45b2eea31019711282445580fad0d753)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117980
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf137655.docx 
b/sw/qa/extras/ooxmlexport/data/tdf137655.docx
new file mode 100644
index ..d87d434b324d
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf137655.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index aa29afd218e0..39485377a683 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -546,6 +546,14 @@ 
DECLARE_OOXMLEXPORT_TEST(testTdf113258_noBeforeAutospacing, "tdf113258_noBeforeA
  getProperty(xShape->getStart(), 
"ParaTopMargin"));
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf137655, "tdf137655.docx")
+{
+xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+// These were 280.
+assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:p[1]/w:pPr/w:spacing", "before", 
"0");
+assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tr[2]/w:tc[2]/w:p[1]/w:pPr/w:spacing", "before", 
"0");
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf120511_eatenSection, 
"tdf120511_eatenSection.docx")
 {
 xmlDocUniquePtr pXmlDoc = parseLayoutDump();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 7cda0e0df1dc..291924abce81 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1544,12 +1544,23 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
 const bool bAllowAdjustments = 
!GetSettingsTable()->GetDoNotUseHTMLParagraphAutoSpacing();
 sal_Int32 nBeforeAutospacing = -1;
 bool bIsAutoSet = pParaContext && 
pParaContext->isSet(PROP_PARA_TOP_MARGIN_BEFORE_AUTO_SPACING);
+bool bIsZeroAutospacingWithoutTopmargin = false;
+const bool bNoTopmargin = pParaContext && 
!pParaContext->isSet(PROP_PARA_TOP_MARGIN);
 // apply INHERITED autospacing only if top margin is not set
-if ( bIsAutoSet || (pParaContext && 
!pParaContext->isSet(PROP_PARA_TOP_MARGIN)) )
+if ( bIsAutoSet || bNoTopmargin )
+{
 GetAnyProperty(PROP_PARA_TOP_MARGIN_BEFORE_AUTO_SPACING, pPropertyMap) 
>>= nBeforeAutospacing;
+// tdf#137655 only w:beforeAutospacing=0 was specified, but not 
PARA_TOP_MARGIN
+// (see default_spacing = -1 in processing of 
LN_CT_Spacing_beforeAutospacing)
+if ( bNoTopmargin && nBeforeAutospacing == 
ConversionHelper::convertTwipToMM100(-1) )
+{
+nBeforeAutospacing = 0;
+bIsZeroAutospacingWithoutTopmargin = true;
+}
+}
 if ( nBeforeAutospacing > -1 && pParaContext )
 {
-if ( bAllowAdjustments )
+if ( bAllowAdjustments && !bIsZeroAutospacingWithoutTopmargin )
 {
 if ( GetIsFirstParagraphInShape() ||
  (GetIsFirstParagraphInSection() && GetSectionContext() && 
GetSectionContext()->IsFirstSection()) ||
@@ -1561,7 +1572,8 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
 pParaContext->Insert( 
PROP_PARA_TOP_MARGIN_BEFORE_AUTO_SPACING, uno::makeAny( sal_Int32(0) ),true, 
PARA_GRAB_BAG );
 }
 }
-pParaContext->Insert(PROP_PARA_TOP_MARGIN, 
uno::makeAny(nBeforeAutospacing));
+if ( !bIsZeroAutospacingWithoutTopmargin || (m_nTableDepth > 0 && 
m_nTableDepth == m_nTableCellDepth) )
+pParaContext->Insert(PROP_PARA_TOP_MARGIN, 
uno::makeAny(nBeforeAutospacing));
 }
 
 sal_Int32 nAfterAutospacing = -1;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/unx

2021-06-28 Thread Jan-Marek Glogowski (via logerrit)
 vcl/unx/generic/fontmanager/fontconfig.cxx  |3 ---
 vcl/unx/generic/fontmanager/fontmanager.cxx |1 +
 2 files changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 7ef1ec18089aa45e8053c0c73ad71aa3f78b9758
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jun 27 21:02:19 2021 +
Commit: Jan-Marek Glogowski 
CommitDate: Mon Jun 28 16:07:41 2021 +0200

No need to Stop() a Timer before Start()

Start() resets a timer per default, otherwise check IsActive().
Also add a debug name to it.

Change-Id: I1588161bb3fead42c3b26282dfa05d149aa94c52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118020
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx 
b/vcl/unx/generic/fontmanager/fontconfig.cxx
index 8194aef619d2..18a0408d34ae 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -1150,10 +1150,7 @@ void PrintFontManager::Substitute(FontSelectPattern 
&rPattern, OUString& rMissin
 }
 }
 if (!m_aCurrentRequests.empty())
-{
-m_aFontInstallerTimer.Stop();
 m_aFontInstallerTimer.Start();
-}
 }
 rMissingCodes = sStillMissing;
 }
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx 
b/vcl/unx/generic/fontmanager/fontmanager.cxx
index 44471107bd33..67f5868c1c8e 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -119,6 +119,7 @@ PrintFontManager::PrintFontManager()
 {
 m_aFontInstallerTimer.SetInvokeHandler(LINK(this, PrintFontManager, 
autoInstallFontLangSupport));
 m_aFontInstallerTimer.SetTimeout(5000);
+m_aFontInstallerTimer.SetDebugName("PrintFontManager 
m_aFontInstallerTimer");
 }
 
 PrintFontManager::~PrintFontManager()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - comphelper/source desktop/qa desktop/source include/comphelper include/LibreOfficeKit include/sfx2 sfx2/source

2021-06-28 Thread Pranam Lashkari (via logerrit)
 comphelper/source/misc/lok.cxx  |   28 
 desktop/qa/desktop_lib/test_desktop_lib.cxx |4 +++-
 desktop/source/lib/init.cxx |   18 ++
 include/LibreOfficeKit/LibreOfficeKit.h |6 ++
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   10 ++
 include/comphelper/lok.hxx  |4 
 include/sfx2/lokhelper.hxx  |5 -
 include/sfx2/viewsh.hxx |5 +
 sfx2/source/control/unoctitm.cxx|   19 +++
 sfx2/source/view/lokhelper.cxx  |   25 +
 10 files changed, 122 insertions(+), 2 deletions(-)

New commits:
commit 2fb76306afdf50d52ec5021088e7aaa49008b71a
Author: Pranam Lashkari 
AuthorDate: Wed Jun 2 19:06:52 2021 +0530
Commit: Jan Holesovsky 
CommitDate: Mon Jun 28 15:45:35 2021 +0200

LOK: introduced Freemium LOK API

also block the uno commands from deny list

Change-Id: Iee994411891b73b865e6496403682f996d5e9321
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116384
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pranam Lashkari 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117799
Reviewed-by: Jan Holesovsky 

diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index 208fe7bb25df..1ef1ae5766b3 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -10,6 +10,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -38,6 +39,8 @@ static bool g_bLocalRendering(false);
 
 static Compat g_eCompatFlags(Compat::none);
 
+static std::vector g_vFreemiumDenyList;
+
 namespace
 {
 
@@ -288,6 +291,31 @@ void statusIndicatorFinish()
 pStatusIndicatorCallback(pStatusIndicatorCallbackData, 
statusIndicatorCallbackType::Finish, 0);
 }
 
+void setFreemiumDenyList(const char* freemiumDenyList)
+{
+if(!g_vFreemiumDenyList.empty())
+return;
+
+OUString DenyListString(freemiumDenyList, strlen(freemiumDenyList), 
RTL_TEXTENCODING_UTF8);
+
+OUString command = DenyListString.getToken(0, ' ');
+for (size_t i = 1; !command.isEmpty(); i++)
+{
+g_vFreemiumDenyList.emplace_back(command);
+command = DenyListString.getToken(i, ' ');
+}
+}
+
+const std::vector& getFreemiumDenyList()
+{
+return g_vFreemiumDenyList;
+}
+
+bool isCommandFreemiumDenied(const OUString& command)
+{
+return std::find(g_vFreemiumDenyList.begin(), g_vFreemiumDenyList.end(), 
command) != g_vFreemiumDenyList.end();
+}
+
 } // namespace LibreOfficeKit
 
 } // namespace comphelper
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index af9b93620351..28e9ef4ae612 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3186,10 +3186,12 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(59), offsetof(struct 
_LibreOfficeKitDocumentClass, completeFunction));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(60), offsetof(struct 
_LibreOfficeKitDocumentClass, setWindowTextSelection));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(61), offsetof(struct 
_LibreOfficeKitDocumentClass, sendFormFieldEvent));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(62), offsetof(struct 
_LibreOfficeKitDocumentClass, setFreemiumDenyList));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(63), offsetof(struct 
_LibreOfficeKitDocumentClass, setFreemiumView));
 
 // Extending is fine, update this, and add new assert for the offsetof the
 // new method
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(62), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(64), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d97506159e13..a6c61acb48c2 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1077,6 +1077,10 @@ static void doc_postKeyEvent(LibreOfficeKitDocument* 
pThis,
  int nType,
  int nCharCode,
  int nKeyCode);
+static void doc_setFreemiumDenyList(const char* freemiumDenyList);
+
+static void doc_setFreemiumView(int nViewId, bool isFreemium);
+
 static void doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis,
 unsigned nWindowId,
 int nType,
@@ -1360,6 +1364,9 @@ LibLODocument_Impl::LibLODocument_Impl(const 
uno::Reference sendFormFieldEvent = doc_sendFormFieldEvent;
 
+m_pDocumentClass->setFreemiumDenyList = doc_setFreemiumDenyList;
+m_pDocumentClass->setFreemiumView = doc_setFreemiumView;
+
 gDocumentClass = m_pDocumentClass;
 }
 pClass = m_pDocumentCla

[Libreoffice-commits] core.git: winaccessibility/source

2021-06-28 Thread Michael Weghorn (via logerrit)
 winaccessibility/source/UAccCOM/MAccessible.cxx |   79 +++-
 winaccessibility/source/UAccCOM/MAccessible.h   |6 +
 2 files changed, 44 insertions(+), 41 deletions(-)

New commits:
commit 1c1aadc804f4b34b764002c23dc916530d1c7908
Author: Michael Weghorn 
AuthorDate: Mon Jun 28 12:52:30 2021 +0100
Commit: Michael Weghorn 
CommitDate: Mon Jun 28 15:34:10 2021 +0200

wina11y: enum XInterfaceIndex -> enum class XInterfaceType

Convert enum 'XInterfaceIndex' to an
enum class 'XInterfaceType'.

Also, drop the explicitly assigned but unused numerical
values (indexes?) and the unused 'XI_NULL' value from the enum.

Change-Id: Ice6d33e6523b3885836f54bc486bbe90de4c3b95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118018
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 5e0cd681381d..a15e9104b912 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -74,21 +74,20 @@ using namespace 
com::sun::star::accessibility::AccessibleStateType;
 
 namespace {
 
-enum XInterfaceIndex {
-XI_COMPONENT= 0x01,
-XI_TEXT = 0x02,
-XI_TABLE= 0x03,
-XI_EDITABLETEXT = 0x04,
-XI_IMAGE= 0x05,
-XI_SELECTION= 0x06,
-XI_EXTENDEDCOMP = 0x07,
-XI_VALUE= 0x08,
-XI_KEYBINDING   = 0x09,
-XI_ACTION   = 0x0A,
-XI_HYPERTEXT= 0x0B,
-XI_HYPERLINK= 0x0C,
-XI_ATTRIBUTE= 0x0D,
-XI_NULL = -1
+enum class XInterfaceType {
+XI_COMPONENT,
+XI_TEXT,
+XI_TABLE,
+XI_EDITABLETEXT,
+XI_IMAGE,
+XI_SELECTION,
+XI_EXTENDEDCOMP,
+XI_VALUE,
+XI_KEYBINDING,
+XI_ACTION,
+XI_HYPERTEXT,
+XI_HYPERLINK,
+XI_ATTRIBUTE
 };
 
 template 
@@ -2500,33 +2499,33 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CMAccessible::Put_ActionDescription( const OLE
 LEAVE_PROTECTED_BLOCK
 }
 
-bool CMAccessible::GetXInterfaceFromXAccessible(XAccessible* pXAcc, 
XInterface** ppXI, int index)
+bool CMAccessible::GetXInterfaceFromXAccessible(XAccessible* pXAcc, 
XInterface** ppXI, XInterfaceType eType)
 {
-switch(index)
+switch(eType)
 {
-case XI_COMPONENT:
+case XInterfaceType::XI_COMPONENT:
 return queryXInterface(pXAcc, ppXI);
-case XI_TEXT:
+case XInterfaceType::XI_TEXT:
 return queryXInterface(pXAcc, ppXI);
-case XI_EDITABLETEXT:
+case XInterfaceType::XI_EDITABLETEXT:
 return queryXInterface(pXAcc, ppXI);
-case XI_TABLE:
+case XInterfaceType::XI_TABLE:
 return queryXInterface(pXAcc, ppXI);
-case XI_SELECTION:
+case XInterfaceType::XI_SELECTION:
 return queryXInterface(pXAcc, ppXI);
-case XI_EXTENDEDCOMP:
+case XInterfaceType::XI_EXTENDEDCOMP:
 return queryXInterface(pXAcc, ppXI);
-case XI_KEYBINDING:
+case XInterfaceType::XI_KEYBINDING:
 return queryXInterface(pXAcc, ppXI);
-case XI_ACTION:
+case XInterfaceType::XI_ACTION:
 return queryXInterface(pXAcc, ppXI);
-case XI_VALUE:
+case XInterfaceType::XI_VALUE:
 return queryXInterface(pXAcc, ppXI);
-case XI_HYPERTEXT:
+case XInterfaceType::XI_HYPERTEXT:
 return queryXInterface(pXAcc, ppXI);
-case XI_HYPERLINK:
+case XInterfaceType::XI_HYPERLINK:
 return queryXInterface(pXAcc, ppXI);
-case XI_IMAGE:
+case XInterfaceType::XI_IMAGE:
 return queryXInterface(pXAcc, ppXI);
 default:
 return false;
@@ -2553,21 +2552,21 @@ struct AggMapEntry
 {
 const IID* piid;
 AggCreatorFunc* pfnCreateInstance;
-int XIFIndex;
+const XInterfaceType eXInterfaceType;
 };
 
 }
 
 static AggMapEntry g_CMAccessible_AggMap[] = {
-{ &IID_IAccessibleComponent, &createAggInstance, 
XI_COMPONENT },
-{ &IID_IAccessibleText, &createAggInstance, XI_TEXT },
-{ &IID_IAccessibleEditableText, &createAggInstance, 
XI_EDITABLETEXT },
-{ &IID_IAccessibleImage, &createAggInstance, XI_IMAGE },
-{ &IID_IAccessibleTable, &createAggInstance, XI_TABLE },
-{ &IID_IAccessibleAction, &createAggInstance, XI_ACTION },
-{ &IID_IAccessibleValue, &createAggInstance, XI_VALUE },
-{ &IID_IAccessibleHypertext, &createAggInstance, 
XI_HYPERTEXT },
-{ &IID_IAccessibleHyperlink, &createAggInstance, 
XI_HYPERLINK }
+{ &IID_IAccessibleComponent, &createAggInstance, 
XInterfaceType::XI_COMPONENT },
+{ &IID_IAccessibleText, &createAggInstance, 
XInterfaceType::XI_TEXT },
+{ &IID_IAccessibleEditableText, &createAggInstance, 
XInterfaceType::XI_EDITABLETEXT },
+{ &IID_IAccessibleImage, &createAggInstance, 
XInterfaceType::XI_IMAGE },
+{ &IID_IAccessibleTable, &createAggInstance, 
XInterfaceType::XI_TABLE },
+{ &IID_IAccessibleAction, &createAggInstance, 
XInterfaceType::XI_ACTION },
+{ &IID_IA

[Libreoffice-commits] core.git: winaccessibility/source

2021-06-28 Thread Michael Weghorn (via logerrit)
 winaccessibility/source/UAccCOM/MAccessible.cxx |   79 +---
 1 file changed, 31 insertions(+), 48 deletions(-)

New commits:
commit 620223ec2b47133db4faddd1f7cbf0294fb72fa4
Author: Michael Weghorn 
AuthorDate: Mon Jun 28 10:49:50 2021 +0100
Commit: Michael Weghorn 
CommitDate: Mon Jun 28 15:33:40 2021 +0200

wina11y: Convert QUERYXINTERFACE macro to template function

Change-Id: Ia4ecab7ada4df83b773505561569cededef35612
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118005
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index f3c0dbf09493..5e0cd681381d 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -91,6 +91,24 @@ enum XInterfaceIndex {
 XI_NULL = -1
 };
 
+template 
+bool queryXInterface(XAccessible* pXAcc, XInterface** ppXI)
+{
+if (!pXAcc)
+return false;
+
+Reference pRContext = pXAcc->getAccessibleContext();
+if (!pRContext.is())
+return false;
+
+Reference pRXI(pRContext, UNO_QUERY);
+if (!pRXI.is())
+return false;
+
+*ppXI = pRXI.get();
+return true;
+}
+
 }
 
 // IA2 states mapping, and name
@@ -145,25 +163,6 @@ short const UNO_STATES[] =
 
 using namespace com::sun::star::accessibility::AccessibleRole;
 
-
-#define QUERYXINTERFACE(ainterface) \
-{   \
-if(pXAcc == nullptr)\
-return false;   \
-pRContext = pXAcc->getAccessibleContext();  \
-if( !pRContext.is() )   \
-{   \
-return false;   \
-}   \
-Reference pRXI(pRContext,UNO_QUERY);\
-if( !pRXI.is() )\
-{   \
-return false;   \
-}   \
-*ppXI = pRXI.get(); \
-return true;\
-}
-
 #define ISDESTROY() \
 if(m_isDestroy) \
 return S_FALSE;
@@ -2503,51 +2502,35 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CMAccessible::Put_ActionDescription( const OLE
 
 bool CMAccessible::GetXInterfaceFromXAccessible(XAccessible* pXAcc, 
XInterface** ppXI, int index)
 {
-Reference< XAccessibleContext > pRContext;
-
 switch(index)
 {
 case XI_COMPONENT:
-QUERYXINTERFACE(AccessibleComponent)
-break;
+return queryXInterface(pXAcc, ppXI);
 case XI_TEXT:
-QUERYXINTERFACE(AccessibleText)
-break;
+return queryXInterface(pXAcc, ppXI);
 case XI_EDITABLETEXT:
-QUERYXINTERFACE(AccessibleEditableText)
-break;
+return queryXInterface(pXAcc, ppXI);
 case XI_TABLE:
-QUERYXINTERFACE(AccessibleTable)
-break;
+return queryXInterface(pXAcc, ppXI);
 case XI_SELECTION:
-QUERYXINTERFACE(AccessibleSelection)
-break;
+return queryXInterface(pXAcc, ppXI);
 case XI_EXTENDEDCOMP:
-QUERYXINTERFACE(AccessibleExtendedComponent)
-break;
+return queryXInterface(pXAcc, ppXI);
 case XI_KEYBINDING:
-QUERYXINTERFACE(AccessibleKeyBinding)
-break;
+return queryXInterface(pXAcc, ppXI);
 case XI_ACTION:
-QUERYXINTERFACE(AccessibleAction)
-break;
+return queryXInterface(pXAcc, ppXI);
 case XI_VALUE:
-QUERYXINTERFACE(AccessibleValue)
-break;
+return queryXInterface(pXAcc, ppXI);
 case XI_HYPERTEXT:
-QUERYXINTERFACE(AccessibleHypertext)
-break;
+return queryXInterface(pXAcc, ppXI);
 case XI_HYPERLINK:
-QUERYXINTERFACE(AccessibleHyperlink)
-break;
+return queryXInterface(pXAcc, ppXI);
 case XI_IMAGE:
-QUERYXINTERFACE(AccessibleImage)
-break;
+return queryXInterface(pXAcc, ppXI);
 default:
-break;
+return false;
 }
-
-return false;
 }
 
 template static HRESULT
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: winaccessibility/source

2021-06-28 Thread Michael Weghorn (via logerrit)
 winaccessibility/source/UAccCOM/MAccessible.cxx |   15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

New commits:
commit 197d9631b3add45d294f1d7f81cee00a695f36c9
Author: Michael Weghorn 
AuthorDate: Mon Jun 28 08:42:49 2021 +0100
Commit: Michael Weghorn 
CommitDate: Mon Jun 28 15:33:01 2021 +0200

wina11y: Use range-based for loop

Use a const reference instead of a pointer for the iteration.
Drop the extra 'g_CMAccessible_AggMap' entry at the
end that was only used to indicate the end of the
array in the iteration previously.

Change-Id: I411e9274d56ce0ed2658dfbe3d03670e485c4b4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118004
Tested-by: Michael Weghorn 
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index bc911953b19d..f3c0dbf09493 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -2584,8 +2584,7 @@ static AggMapEntry g_CMAccessible_AggMap[] = {
 { &IID_IAccessibleAction, &createAggInstance, XI_ACTION },
 { &IID_IAccessibleValue, &createAggInstance, XI_VALUE },
 { &IID_IAccessibleHypertext, &createAggInstance, 
XI_HYPERTEXT },
-{ &IID_IAccessibleHyperlink, &createAggInstance, 
XI_HYPERLINK },
-{ nullptr, nullptr, 0 },
+{ &IID_IAccessibleHyperlink, &createAggInstance, 
XI_HYPERLINK }
 };
 
 
@@ -2603,16 +2602,15 @@ HRESULT WINAPI CMAccessible::SmartQI(void* /*pv*/, 
REFIID iid, void** ppvObject)
 return E_FAIL;
 }
 
-AggMapEntry * pMap = &g_CMAccessible_AggMap[0];
-while(pMap && pMap->piid)
+for (const AggMapEntry& rEntry : g_CMAccessible_AggMap)
 {
-if (InlineIsEqualGUID(iid, *pMap->piid))
+if (InlineIsEqualGUID(iid, *rEntry.piid))
 {
 SolarMutexGuard g;
 
 XInterface* pXI = nullptr;
 bool bFound = GetXInterfaceFromXAccessible(m_xAccessible.get(),
-&pXI, pMap->XIFIndex);
+&pXI, rEntry.XIFIndex);
 if(!bFound)
 {
 return E_FAIL;
@@ -2625,11 +2623,11 @@ HRESULT WINAPI CMAccessible::SmartQI(void* /*pv*/, 
REFIID iid, void** ppvObject)
 }
 else
 {
-HRESULT hr = pMap->pfnCreateInstance(*this, ppvObject);
+HRESULT hr = rEntry.pfnCreateInstance(*this, ppvObject);
 assert(hr == S_OK);
 if(hr == S_OK)
 {
-m_containedObjects.emplace(*pMap->piid, 
static_cast(*ppvObject));
+m_containedObjects.emplace(*rEntry.piid, 
static_cast(*ppvObject));
 IUNOXWrapper* wrapper = nullptr;
 
static_cast(*ppvObject)->QueryInterface(IID_IUNOXWrapper, 
reinterpret_cast(&wrapper));
 if(wrapper)
@@ -2643,7 +2641,6 @@ HRESULT WINAPI CMAccessible::SmartQI(void* /*pv*/, REFIID 
iid, void** ppvObject)
 }
 return E_FAIL;
 }
-pMap++;
 }
 return E_FAIL;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - configure.ac download.lst external/python3

2021-06-28 Thread Jan-Marek Glogowski (via logerrit)
 configure.ac  |2 +-
 download.lst  |4 ++--
 external/python3/macos-11.patch.0 |   36 
 3 files changed, 3 insertions(+), 39 deletions(-)

New commits:
commit 5a82e48131faa056fd7c16122f414f44e12b5679
Author: Jan-Marek Glogowski 
AuthorDate: Thu Jun 24 08:26:33 2021 +0200
Commit: Caolán McNamara 
CommitDate: Mon Jun 28 15:13:31 2021 +0200

python3: update to 3.8.10

So we don't build 3.8.8rc1 anymore. I didn't look into 3.9.

Change-Id: Ife7d898c913b9b164168b0ef23a055deea55815f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117757
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit c22fc8e1f60bb98a87d22e7ff9bd3290dbb9fe02)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117854
Reviewed-by: Caolán McNamara 

diff --git a/configure.ac b/configure.ac
index 23a1040a6d76..a8e153ab5c6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9680,7 +9680,7 @@ internal)
 SYSTEM_PYTHON=
 PYTHON_VERSION_MAJOR=3
 PYTHON_VERSION_MINOR=8
-PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.8
+PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.10
 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then
 AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in 
download.lst])
 fi
diff --git a/download.lst b/download.lst
index 503c666b1ce6..05b5b8b8e8fc 100644
--- a/download.lst
+++ b/download.lst
@@ -220,8 +220,8 @@ export POPPLER_DATA_SHA256SUM := 
6e2fcef66ec8c44625f94292ccf8af9f1d918b410d5aa69
 export POPPLER_DATA_TARBALL := poppler-data-0.4.10.tar.gz
 export POSTGRESQL_SHA256SUM := 
12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f
 export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2
-export PYTHON_SHA256SUM := 
bd746ed1ad9ccfa9b2a8d13736a5c452025c3600913d78e6ed1df3d767b6
-export PYTHON_TARBALL := Python-3.8.8rc1.tar.xz
+export PYTHON_SHA256SUM := 
6af24a66093dd840bcccf371d4044a3027e655cf24591ce26e48022bc79219d9
+export PYTHON_TARBALL := Python-3.8.10.tar.xz
 export QXP_SHA256SUM := 
e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c
 export QXP_TARBALL := libqxp-0.0.2.tar.xz
 export RAPTOR_SHA256SUM := 
ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed
diff --git a/external/python3/macos-11.patch.0 
b/external/python3/macos-11.patch.0
index 3c42d515f6bd..e2f13ac4c426 100644
--- a/external/python3/macos-11.patch.0
+++ b/external/python3/macos-11.patch.0
@@ -1,27 +1,3 @@
--*- Mode: diff -*-
 configure
-+++ configure
-@@ -9372,6 +9275,9 @@
-   esac
- else
-   case `/usr/bin/arch` in
-+  arm64)
-+  MACOSX_DEFAULT_ARCH="arm64"
-+  ;;
-   i386)
-   MACOSX_DEFAULT_ARCH="x86_64"
-   ;;
 Mac/Tools/pythonw.c
-+++ Mac/Tools/pythonw.c
-@@ -121,6 +121,8 @@
- cpu_types[0] = CPU_TYPE_POWERPC;
- #elif defined(__i386__)
- cpu_types[0] = CPU_TYPE_X86;
-+#elif defined(__arm64__)
-+cpu_types[0] = CPU_TYPE_ARM64;
- #else
- #   error "Unknown CPU"
- #endif
 --- setup.py
 +++ setup.py
 @@ -670,7 +670,10 @@
@@ -36,18 +12,6 @@
  system_include_dirs = ['/usr/include']
  # lib_dirs and inc_dirs are used to search for files;
  # if a file is found in one of those directories, it can
 Modules/_decimal/libmpdec/mpdecimal.h
-+++ Modules/_decimal/libmpdec/mpdecimal.h
-@@ -135,6 +135,9 @@
-   #elif defined(__x86_64__)
- #define CONFIG_64
- #define ASM
-+  #elif defined(__arm64__)
-+#define CONFIG_64
-+#define ANSI
-   #else
- #error "unknown architecture for universal build."
-   #endif
 --- Modules/_posixsubprocess.c
 +++ Modules/_posixsubprocess.c
 @@ -31,6 +31,8 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: uitest/test_main.py

2021-06-28 Thread Jan-Marek Glogowski (via logerrit)
 uitest/test_main.py |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 8a636698795431915ab1f9877a29d6683d3d9f5b
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jun 27 21:06:38 2021 +
Commit: Jan-Marek Glogowski 
CommitDate: Mon Jun 28 15:01:57 2021 +0200

uitest: log the active UITEST_TEST_NAME

From the original commit bff02d54960b55e16d5c1220719bb86dc1fdd205
("uitests - error if UITEST_TEST_NAME not set to anything
useful"), it doesn't look like logging the test_name_limit_found
is needed.

Change-Id: Ibe1e6a5d63a968b06c4c8e8b4979d5b8caf8f54c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118016
Reviewed-by: Noel Grandin 
Reviewed-by: Jan-Marek Glogowski 
Tested-by: Jenkins

diff --git a/uitest/test_main.py b/uitest/test_main.py
index 1904ecbb3476..157d1f424e15 100644
--- a/uitest/test_main.py
+++ b/uitest/test_main.py
@@ -110,10 +110,12 @@ if __name__ == '__main__':
 elif "--dir" in opts:
 test_suite = get_test_suite_for_dir(opts)
 test_name_limit = os.environ.get('UITEST_TEST_NAME', '')
-print(test_name_limit_found)
-if len(test_name_limit) > 0 and not test_name_limit_found:
-print("UITEST_TEST_NAME '%s' does not match any test" % 
test_name_limit)
-sys.exit(1)
+if len(test_name_limit) > 0:
+if not test_name_limit_found:
+print("UITEST_TEST_NAME '%s' does not match any test" % 
test_name_limit)
+sys.exit(1)
+else:
+print("UITEST_TEST_NAME '%s' active" % test_name_limit)
 elif "--file" in opts:
 test_suite = unittest.TestSuite()
 add_tests_for_file(opts['--file'], test_suite)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2021-06-28 Thread Jan-Marek Glogowski (via logerrit)
 sw/source/core/doc/docdesc.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3c6b33a3cf982c78b64a1a72bf9b2e7bd07495c3
Author: Jan-Marek Glogowski 
AuthorDate: Mon Jun 28 01:31:03 2021 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Mon Jun 28 14:57:43 2021 +0200

Fix uninitialised conditional jump

Since we just handle one specific case, just initialize the
variable to something different, instead of checking the
GetFirstRedoInfo result.

From valgrind:

==10566== Conditional jump or move depends on uninitialised value(s)
==10566==at 0x270E4451: SwDoc::ChgPageDesc(unsigned long, SwPageDesc 
const&) (docdesc.cxx:431)
==10566==by 0x272E341F: SwFEShell::ChgPageDesc(unsigned long, 
SwPageDesc const&) (fedesc.cxx:122)
...

Change-Id: Ib95f81297959a535a08dc399f72b68c15e621a27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118017
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 6b63e7a300c3..c51c5cde92ef 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -426,7 +426,7 @@ void SwDoc::ChgPageDesc( size_t i, const SwPageDesc &rChged 
)
 }
 else
 {
-SwUndoId nBeingUndone;
+SwUndoId nBeingUndone(SwUndoId::EMPTY);
 GetIDocumentUndoRedo().GetFirstRedoInfo(nullptr, &nBeingUndone);
 if (SwUndoId::HEADER_FOOTER == nBeingUndone)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa

2021-06-28 Thread Andrea Gelmini (via logerrit)
 0 files changed

New commits:
commit 2a4098742ae15dd575aa4f02b00d0845db3d5afb
Author: Andrea Gelmini 
AuthorDate: Mon Jun 28 13:23:59 2021 +0200
Commit: Andrea Gelmini 
CommitDate: Mon Jun 28 14:40:57 2021 +0200

Removed executable bits on doc files

Change-Id: Icbf1a9a6fed698345b8faabf3443216240c65069
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118011
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini 

diff --git a/sw/qa/extras/ww8export/data/tdf104239_chapterNumberTortureTest.doc 
b/sw/qa/extras/ww8export/data/tdf104239_chapterNumberTortureTest.doc
old mode 100755
new mode 100644
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/oox offapi/com offapi/UnoApi_offapi.mk oox/source oox/util solenv/bin solenv/clang-format writerfilter/inc writerfilter/source

2021-06-28 Thread Noel Grandin (via logerrit)
 include/oox/shape/ShapeContextHandler.hxx|   63 +--
 offapi/UnoApi_offapi.mk  |2 
 offapi/com/sun/star/xml/sax/FastShapeContextHandler.idl  |   33 ---
 offapi/com/sun/star/xml/sax/XFastShapeContextHandler.idl |   62 --
 oox/source/shape/ShapeContextHandler.cxx |   61 --
 oox/util/oox.component   |4 
 solenv/bin/native-code.py|1 
 solenv/clang-format/excludelist  |2 
 writerfilter/inc/ooxml/OOXMLDocument.hxx |6 -
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx  |8 -
 writerfilter/source/ooxml/OOXMLDocumentImpl.hxx  |6 -
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx|5 -
 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx|3 
 13 files changed, 54 insertions(+), 202 deletions(-)

New commits:
commit 6701329f5b7d9c39fbd00f2f735dcd375992aa8e
Author: Noel Grandin 
AuthorDate: Mon Jun 28 11:02:56 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 28 14:30:53 2021 +0200

[API CHANGE] drop ShapeContextHandler service and interface

There is zero chance an extension is using this, because it is so
intimately tired together with the oox and writerfilter interactions.

I'm removing this so I can expose the ShapeContextHandler and then
override it's implementation in a more fashion without jumping through
UNO hoops.

Change-Id: I79ef30247f4642303dfdb92bbf8f6e6226234829
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117996
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/oox/source/shape/ShapeContextHandler.hxx 
b/include/oox/shape/ShapeContextHandler.hxx
similarity index 68%
rename from oox/source/shape/ShapeContextHandler.hxx
rename to include/oox/shape/ShapeContextHandler.hxx
index d9b171f045b0..5655cc25acf2 100644
--- a/oox/source/shape/ShapeContextHandler.hxx
+++ b/include/oox/shape/ShapeContextHandler.hxx
@@ -16,18 +16,19 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_OOX_SOURCE_SHAPE_SHAPECONTEXTHANDLER_HXX
-#define INCLUDED_OOX_SOURCE_SHAPE_SHAPECONTEXTHANDLER_HXX
+#pragma once
 
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 namespace oox::shape {
 
@@ -45,9 +46,8 @@ public:
 }
 };
 
-class ShapeContextHandler:
-public ::cppu::WeakImplHelper< css::xml::sax::XFastShapeContextHandler,
-css::lang::XServiceInfo >
+class OOX_DLLPUBLIC ShapeContextHandler:
+public ::cppu::WeakImplHelper< css::xml::sax::XFastContextHandler >
 {
 public:
 explicit ShapeContextHandler
@@ -55,15 +55,6 @@ public:
 
 virtual ~ShapeContextHandler() override;
 
-// css::lang::XServiceInfo:
-virtual OUString SAL_CALL getImplementationName() override;
-
-virtual sal_Bool SAL_CALL supportsService
-(const OUString & ServiceName) override;
-
-virtual css::uno::Sequence< OUString > SAL_CALL
-getSupportedServiceNames() override;
-
 // css::xml::sax::XFastContextHandler:
 virtual void SAL_CALL startFastElement
 (::sal_Int32 Element,
@@ -93,35 +84,29 @@ public:
 
 virtual void SAL_CALL characters(const OUString & aChars) override;
 
-// css::xml::sax::XFastShapeContextHandler:
-virtual css::uno::Reference< css::drawing::XShape > SAL_CALL getShape() 
override;
-
-virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL 
getDrawPage() override;
+css::uno::Reference< css::drawing::XShape > getShape();
 
-virtual void SAL_CALL setDrawPage
-(const css::uno::Reference< css::drawing::XDrawPage > & the_value) 
override;
+css::uno::Reference< css::drawing::XDrawPage > getDrawPage();
+void setDrawPage(const css::uno::Reference< css::drawing::XDrawPage > & 
the_value);
 
-virtual css::uno::Reference< css::frame::XModel > SAL_CALL getModel() 
override;
+css::uno::Reference< css::frame::XModel > getModel();
+void setModel(const css::uno::Reference< css::frame::XModel > & the_value);
 
-virtual void SAL_CALL setModel
-(const css::uno::Reference< css::frame::XModel > & the_value) override;
+OUString getRelationFragmentPath();
+void setRelationFragmentPath(const OUString & the_value);
 
-virtual OUString SAL_CALL getRelationFragmentPath() override;
-virtual void SAL_CALL setRelationFragmentPath
-(const OUString & the_value) override;
+sal_Int32 getStartToken();
+void setStartToken( sal_Int32 _starttoken );
 
-virtual ::sal_Int32 SAL_CALL getStartToken() override;
-virtual void SAL_CALL setStartToken( ::sal_Int32 _starttoken ) override;
+css::awt::Point getPosition();
+void setPosition(const css::awt::Point& 

mailto:libreoffice@lists.freedesktop.org

2021-06-28 Thread Joseph C. O'Connor
mailto:libreoffice@lists.freedesktop.org

Hello Sir/Madam:

I knowingly submit a request to be placed on the LibreOffice email list.

By far not an Expert Developer. I have noticed over the years I could very well 
have a nack at Debugging. Along a similar line l am a Licensed Professional 
Surveyor with a keen sense towards details.

That said, I'm most interested in Geo Python. I would be interested in 
especially working on LibreBase (DBMS/SQL) and LibreWriter I've already know of 
Logic stream lining that could be undertaken.

I'm currently working on a Project I'm calling PyCOGO. I see possible 
intergretion with OpenStreetMap.

I feel I have some thing to offer. Time Management has always been an interest 
of mine. LibreOffice could help me find a channel for that interest.

Joseph O'Connor
Lead
DigitalClimae (dot) US
Open Source Advocate

Thank You for your time.

Sent from ProtonMail mobile___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Review of 'Improve wrap margins in docx filters'

2021-06-28 Thread Regina Henschel

Hi Miklos,

thank you for looking at it.

Kind regards
Regina

Miklos Vajna schrieb am 28.06.2021 um 09:52:

Hi Regina,

On Wed, Jun 16, 2021 at 06:55:47PM +0200, Regina Henschel 
 wrote:

this is about patch https://gerrit.libreoffice.org/c/core/+/115668

 From my point of view, the patch is now ready. But it is quite big and has
deeper changes, so I would appreciate it if you take a look at the patch.

There are still parts missing, but they can be added later. It is missing
e.g. consideration of border thicknesses of frames, calculation of suitable
wrap polygons, better fit of our wrap types to those of MSOffice,
calculation of correct positions for child elements of rotated groups.


Right, it took me some time to look at it, updated the gerrit change
now. :-)

Regards,

Miklos



___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: vcl/qa

2021-06-28 Thread panoskorovesis (via logerrit)
 vcl/qa/cppunit/svm/data/floattransparent.svm |binary
 vcl/qa/cppunit/svm/svmtest.cxx   |   58 ++-
 2 files changed, 56 insertions(+), 2 deletions(-)

New commits:
commit 0aa7ee7827fc77b5b4c0479402bfbd9a4e5d9e84
Author: panoskorovesis 
AuthorDate: Wed Jun 23 10:54:23 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Mon Jun 28 13:55:44 2021 +0200

Add FloatTransparent cppunit test to vcl.

The test draws a transparent, along with a second metafile
and tests their attributes.

Change-Id: I42b6ff6eec29fecdafc7f634551c894a16b63173
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117694
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/qa/cppunit/svm/data/floattransparent.svm 
b/vcl/qa/cppunit/svm/data/floattransparent.svm
new file mode 100644
index ..802fa7078219
Binary files /dev/null and b/vcl/qa/cppunit/svm/data/floattransparent.svm differ
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index abe76a85e606..953f97d0b8b6 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -180,7 +180,7 @@ class SvmTest : public test::BootstrapFixture, public 
XmlTestTools
 void checkTransparent(const GDIMetaFile& rMetaFile);
 void testTransparent();
 
-//void checkFloatTransparent(const GDIMetaFile& rMetaFile);
+void checkFloatTransparent(const GDIMetaFile& rMetaFile);
 void testFloatTransparent();
 
 void checkEPS(const GDIMetaFile& rMetaFile);
@@ -2032,8 +2032,62 @@ void SvmTest::testTransparent()
 checkTransparent(readFile(u"transparent.svm"));
 }
 
+void SvmTest::checkFloatTransparent(const GDIMetaFile& rMetaFile)
+{
+xmlDocUniquePtr pDoc = dumpMeta(rMetaFile);
+
+assertXPathAttrs(pDoc, "/metafile/floattransparent[1]", {
+{"x", "1"},
+{"y", "2"},
+{"width", "3"},
+{"height", "4"},
+{"transparent", "true"}
+});
+
+assertXPathAttrs(pDoc, "/metafile/floattransparent[1]/gradient[1]", {
+{"style", "Linear"},
+{"startcolor", "#ff"},
+{"endcolor", "#00"},
+{"angle", "0"},
+{"border", "0"},
+{"offsetx", "50"},
+{"offsety", "50"},
+{"startintensity", "100"},
+{"endintensity", "100"},
+{"steps", "0"}
+});
+
+assertXPathAttrs(pDoc, 
"/metafile/floattransparent[1]/metafile[1]/point[1]", {
+{"x", "1"},
+{"y", "8"}
+});
+
+assertXPathAttrs(pDoc, 
"/metafile/floattransparent[1]/metafile[1]/point[2]", {
+{"x", "2"},
+{"y", "7"}
+});
+}
+
 void SvmTest::testFloatTransparent()
-{}
+{
+GDIMetaFile aGDIMetaFile;
+ScopedVclPtrInstance pVirtualDev;
+setupBaseVirtualDevice(*pVirtualDev, aGDIMetaFile);
+
+GDIMetaFile aGDIMetaFile1;
+ScopedVclPtrInstance pVirtualDev1;
+setupBaseVirtualDevice(*pVirtualDev1, aGDIMetaFile1);
+
+pVirtualDev1->DrawPixel(Point(1, 8));
+pVirtualDev1->DrawPixel(Point(2, 7));
+
+Gradient aGradient(GradientStyle::Linear, COL_WHITE, COL_BLACK);
+
+pVirtualDev->DrawTransparent(aGDIMetaFile1, Point(1, 2), Size(3, 4), 
aGradient);
+
+checkFloatTransparent(writeAndReadStream(aGDIMetaFile));
+checkFloatTransparent(readFile(u"floattransparent.svm"));
+}
 
 void SvmTest::checkEPS(const GDIMetaFile& rMetaFile)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/qa vcl/source

2021-06-28 Thread panoskorovesis (via logerrit)
 vcl/qa/cppunit/svm/data/eps.svm |binary
 vcl/qa/cppunit/svm/svmtest.cxx  |   77 ++--
 vcl/source/gdi/mtfxmldump.cxx   |   59 ++
 3 files changed, 133 insertions(+), 3 deletions(-)

New commits:
commit d1eb1e6e487fad489b7c80b68613290da6edfe8a
Author: panoskorovesis 
AuthorDate: Wed Jun 23 13:52:32 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Mon Jun 28 13:55:01 2021 +0200

Add EPS cppunit test to vcl.

The test creates an EPS along with a second metafile and
tests their attributes. mtfxmldump.cxx was edited to support
EPS.

Change-Id: I43495304aaf191e1a8ad034b96ff59de085a0630
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117702
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/qa/cppunit/svm/data/eps.svm b/vcl/qa/cppunit/svm/data/eps.svm
new file mode 100644
index ..33b923a14adc
Binary files /dev/null and b/vcl/qa/cppunit/svm/data/eps.svm differ
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index c260a974282d..abe76a85e606 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -183,7 +183,7 @@ class SvmTest : public test::BootstrapFixture, public 
XmlTestTools
 //void checkFloatTransparent(const GDIMetaFile& rMetaFile);
 void testFloatTransparent();
 
-//void checkEPS(const GDIMetaFile& rMetaFile);
+void checkEPS(const GDIMetaFile& rMetaFile);
 void testEPS();
 
 void checkRefPoint(const GDIMetaFile& rMetaFile);
@@ -2035,8 +2035,81 @@ void SvmTest::testTransparent()
 void SvmTest::testFloatTransparent()
 {}
 
+void SvmTest::checkEPS(const GDIMetaFile& rMetaFile)
+{
+xmlDocUniquePtr pDoc = dumpMeta(rMetaFile);
+
+assertXPathAttrs(pDoc, "/metafile/eps[1]", {
+{"x", "1"},
+{"y", "8"},
+{"width", "2"},
+{"height", "7"}
+});
+
+assertXPathAttrs(pDoc, "/metafile/eps[1]/gfxlink[1]", {
+{"width", "3"},
+{"height", "6"},
+{"type", "EpsBuffer"},
+{"userid", "12345"},
+{"datasize", "3"},
+{"data", "616263"},
+{"native", "false"},
+{"emf", "false"},
+{"validmapmode", "true"}
+});
+
+assertXPathAttrs(pDoc, "/metafile/eps[1]/gfxlink[1]/prefmapmode[1]", {
+{"mapunit", "Map100thInch"},
+{"x", "0"},
+{"y", "1"},
+{"scalex", "(1/2)"},
+{"scaley", "(2/3)"}
+});
+
+assertXPathAttrs(pDoc, "/metafile/eps[1]/metafile[1]/point[1]", {
+{"x", "1"},
+{"y", "8"}
+});
+
+assertXPathAttrs(pDoc, "/metafile/eps[1]/metafile[1]/point[2]", {
+{"x", "2"},
+{"y", "7"}
+});
+}
+
 void SvmTest::testEPS()
-{}
+{
+GDIMetaFile aGDIMetaFile;
+ScopedVclPtrInstance pVirtualDev;
+setupBaseVirtualDevice(*pVirtualDev, aGDIMetaFile);
+
+sal_uInt32 nDataSize = 3;
+std::unique_ptr pBuffer (new sal_uInt8[nDataSize]);
+pBuffer[0] = 'a';
+pBuffer[1] = 'b';
+pBuffer[2] = 'c';
+
+MapMode aMapMode1(MapUnit::Map100thInch);
+aMapMode1.SetOrigin(Point(0, 1));
+aMapMode1.SetScaleX(Fraction(1, 2));
+aMapMode1.SetScaleY(Fraction(2, 3));
+
+GDIMetaFile aGDIMetaFile1;
+ScopedVclPtrInstance pVirtualDev1;
+setupBaseVirtualDevice(*pVirtualDev1, aGDIMetaFile1);
+
+pVirtualDev1->DrawPixel(Point(1, 8));
+pVirtualDev1->DrawPixel(Point(2, 7));
+
+GfxLink aGfxLink(std::move(pBuffer), nDataSize, GfxLinkType::EpsBuffer);
+aGfxLink.SetPrefMapMode(aMapMode1);
+aGfxLink.SetUserId(12345);
+aGfxLink.SetPrefSize(Size(3, 6));
+pVirtualDev->DrawEPS(Point(1, 8), Size(2, 7), aGfxLink, &aGDIMetaFile1);
+
+checkEPS(writeAndReadStream(aGDIMetaFile));
+checkEPS(readFile(u"eps.svm"));
+}
 
 void SvmTest::checkRefPoint(const GDIMetaFile& rMetaFile)
 {
diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx
index 0b9ba2c2ef20..64df808a 100644
--- a/vcl/source/gdi/mtfxmldump.cxx
+++ b/vcl/source/gdi/mtfxmldump.cxx
@@ -452,6 +452,27 @@ OUString 
convertComplexTestLayoutFlags(ComplexTextLayoutFlags eComplexTestLayout
 }
 }
 
+OUString convertGfxLinkTypeToString(GfxLinkType eGfxLinkType)
+{
+switch(eGfxLinkType)
+{
+case GfxLinkType::EpsBuffer: return "EpsBuffer";
+case GfxLinkType::NativeBmp: return "NativeBmp";
+case GfxLinkType::NativeGif: return "NativeGif";
+case GfxLinkType::NativeJpg: return "NativeJpg";
+case GfxLinkType::NativeMet: return "NativeMet";
+case GfxLinkType::NativeMov: return "NativeMov";
+case GfxLinkType::NativePct: return "NativePct";
+case GfxLinkType::NativePdf: return "NativePdf";
+case GfxLinkType::NativePng: return "NativePng";
+case GfxLinkType::NativeSvg: return "NativeSvg";
+case GfxLinkType::NativeTif: return "NativeTif";
+case GfxLinkType::NativeWmf: return "NativeWmf";
+case GfxLinkType::NONE

Re: What is the best fit for hindiVowels import? CHARS_PERSIAN or CHARS_NEPALI

2021-06-28 Thread Mark Hung
Hi Miklos and Justin,

Miklos Vajna  於 2021年6月28日 週一 下午3:44寫道:

> Hi Justin,
>
> On Thu, Jun 24, 2021 at 01:24:44PM +0200, Justin Luth 
> wrote:
> > DOCX import was provided by commit
> 9da74fa484772595fa50e188ba2c496a459cbd6b
> >
> > Author: Cédric Bosdonnat on Wed Mar 3 14:27:29 2010 +0100
> > cbosdo03: Fixed issue 109772.
> > Backported go-oo patch to the CWS
> >
> >
> > DOCX export was provided by commit
> 91b926d4b9939337f54d6c9f0b940b161dc3437f
> > Author: Mark Hung on Sun Jan 24 16:36:05 2016 +0800
> > tdf#84317 convert missing numbering types to OOXML tokens.
>
> Thanks for digging into the history of this. Mark is still around.
>
> Mark: any input on this?
>
>
I don't remember how I mapped those enums.
But I think it's reasonable to copy what doc filter does.
Since I don't know the languages either, I'd prefer to let actual users
judge about the result.


Best regards.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sc/uiconfig

2021-06-28 Thread Caolán McNamara (via logerrit)
 sc/uiconfig/scalc/ui/headerfootercontent.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4a6ddaadd75ae21cc251f461327a5f472241a41e
Author: Caolán McNamara 
AuthorDate: Mon Jun 28 11:15:09 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 28 13:26:51 2021 +0200

open menu down in direction shown by arrow

Change-Id: I23eb6cfcca552b66ed287f09516f3936aa975c88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118007
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/uiconfig/scalc/ui/headerfootercontent.ui 
b/sc/uiconfig/scalc/ui/headerfootercontent.ui
index a7b33287f4c3..74ba39a8b53d 100644
--- a/sc/uiconfig/scalc/ui/headerfootercontent.ui
+++ b/sc/uiconfig/scalc/ui/headerfootercontent.ui
@@ -338,7 +338,7 @@
 imageBTN_FILE
 True
 popup
-up
+down
 False
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/unx

2021-06-28 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 456244d885be8f66024cfc91dce56baec97d556d
Author: Caolán McNamara 
AuthorDate: Mon Jun 28 10:41:05 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 28 13:26:34 2021 +0200

gtk4: protect signal_selected with SolarMutex

Change-Id: Ie296e3f64607bfc00dbedb204f09be97b143892e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118003
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 95d98aff0a59..9e00cd6d62b3 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -9745,6 +9745,7 @@ public:
 const gchar* pStr = g_variant_get_string(pParameter, &nLength);
 OString aStr(pStr, nLength);
 GtkInstanceMenuButton* pThis = 
static_cast(widget);
+SolarMutexGuard aGuard;
 pThis->signal_selected(aStr);
 }
 #else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/unx

2021-06-28 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   22 --
 1 file changed, 22 deletions(-)

New commits:
commit d647a91ac1a0f8f230dc1cbf141f1ded2cc367f2
Author: Caolán McNamara 
AuthorDate: Mon Jun 28 10:25:20 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 28 13:26:07 2021 +0200

drop some unneeded ifdefs

Change-Id: I3e323ed5afb2245b28e42992e2ff00a153a8873c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117998
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index b6fbf5eae2d3..95d98aff0a59 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -8843,28 +8843,19 @@ namespace {
 
 void do_grab(GtkWidget* pWidget)
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 GdkDisplay *pDisplay = gtk_widget_get_display(pWidget);
 GdkSeat* pSeat = gdk_display_get_default_seat(pDisplay);
 gdk_seat_grab(pSeat, widget_get_surface(pWidget),
   GDK_SEAT_CAPABILITY_ALL, true, nullptr, nullptr, nullptr, 
nullptr);
-#else
-(void)pWidget;
-#endif
 }
 
 void do_ungrab(GtkWidget* pWidget)
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 GdkDisplay *pDisplay = gtk_widget_get_display(pWidget);
 GdkSeat* pSeat = gdk_display_get_default_seat(pDisplay);
 gdk_seat_ungrab(pSeat);
-#else
-(void)pWidget;
-#endif
 }
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
 GtkPositionType show_menu_older_gtk(GtkWidget* pMenuButton, GtkWindow* pMenu)
 {
 //place the toplevel just below its launcher button
@@ -8947,11 +8938,9 @@ GtkPositionType show_menu_older_gtk(GtkWidget* 
pMenuButton, GtkWindow* pMenu)
 
 return ePosUsed;
 }
-#endif
 
 bool show_menu_newer_gtk(GtkWidget* pComboBox, GtkWindow* pMenu)
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 static auto window_move_to_rect = reinterpret_cast(
 
dlsym(nullptr, "gdk_window_move_to_rect"));
@@ -8991,11 +8980,6 @@ bool show_menu_newer_gtk(GtkWidget* pComboBox, 
GtkWindow* pMenu)
 0, 0);
 
 return true;
-#else
-(void)pComboBox;
-(void)pMenu;
-return true;
-#endif
 }
 
 GtkPositionType show_menu(GtkWidget* pMenuButton, GtkWindow* pMenu)
@@ -9018,21 +9002,15 @@ GtkPositionType show_menu(GtkWidget* pMenuButton, 
GtkWindow* pMenu)
 pFrame->BlockTooltip();
 }
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
 // try with gdk_window_move_to_rect, but if that's not available, try 
without
 if (!show_menu_newer_gtk(pMenuButton, pMenu))
 ePosUsed = show_menu_older_gtk(pMenuButton, pMenu);
 gtk_widget_show_all(GTK_WIDGET(pMenu));
-#else
-show_menu_newer_gtk(pMenuButton, pMenu);
-gtk_widget_show(GTK_WIDGET(pMenu));
-#endif
 gtk_widget_grab_focus(GTK_WIDGET(pMenu));
 do_grab(GTK_WIDGET(pMenu));
 
 return ePosUsed;
 }
-
 #endif
 
 /* four types of uses of this
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - offapi/com sc/qa sc/source

2021-06-28 Thread Balazs Varga (via logerrit)
 offapi/com/sun/star/sheet/FilterFieldValue.idl |7 +++
 sc/qa/uitest/autofilter/autofilter.py  |   31 +
 sc/qa/uitest/data/autofilter/tdf116818.xlsx|binary
 sc/source/filter/inc/autofilterbuffer.hxx  |4 +-
 sc/source/filter/oox/autofilterbuffer.cxx  |   45 +
 sc/source/filter/oox/autofiltercontext.cxx |2 -
 sc/source/ui/unoobj/datauno.cxx|   21 ++-
 7 files changed, 98 insertions(+), 12 deletions(-)

New commits:
commit 9d10e0adb903bd8470dbda981e9a2524ab1f3a64
Author: Balazs Varga 
AuthorDate: Wed Jan 13 16:17:30 2021 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Jun 28 13:25:01 2021 +0200

tdf#116818 sc,offapi,XLSX import: fix autofiltered date columns

by importing dateGroupItem.

Add property IsDateValue to com::sun::star::sheet::FilterFieldValue.

Note: ODS import/export and XLSX export haven't been supported, yet.

To check/show the fix manually, run the test with

$ (cd sc && make -srj8 UITest_autofilter 
UITEST_TEST_NAME="autofilter.AutofilterTest.test_tdf116818" 
SAL_USE_VCLPLUGIN=gen)

Change-Id: I033f1915c710589ff11fe97e9b39e45251976dfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109233
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 0e751d0cb816197f15a2448ec36c57df17387e40)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117979
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/offapi/com/sun/star/sheet/FilterFieldValue.idl 
b/offapi/com/sun/star/sheet/FilterFieldValue.idl
index 5d1b40837476..2e3ba927dc97 100644
--- a/offapi/com/sun/star/sheet/FilterFieldValue.idl
+++ b/offapi/com/sun/star/sheet/FilterFieldValue.idl
@@ -29,6 +29,13 @@ struct FilterFieldValue
 /** specifies a string value for the condition.
  */
 string StringValue;
+
+/** specifies whether the TableFilterFieldValue::StringValue
+is a string value or a date value.
+
+@since LibreOffice 7.2
+ */
+boolean IsDateValue;
 };
 
 }; }; }; };
diff --git a/sc/qa/uitest/autofilter/autofilter.py 
b/sc/qa/uitest/autofilter/autofilter.py
index 78a5887a6c4c..3905147da08b 100644
--- a/sc/qa/uitest/autofilter/autofilter.py
+++ b/sc/qa/uitest/autofilter/autofilter.py
@@ -205,5 +205,36 @@ class AutofilterTest(UITestCase):
 self.assertTrue(is_row_hidden(document, 1))
 self.assertFalse(is_row_hidden(document, 2))
 
+self.ui_test.close_doc()
+
+def test_tdf116818(self):
+doc = self.ui_test.load_file(get_url_for_data_file("tdf116818.xlsx"))
+
+xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "0", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+xTreeList = xCheckListMenu.getChild("check_tree_box")
+self.assertEqual(3, len(xTreeList.getChildren()))
+xOkBtn = xFloatWindow.getChild("cancel")
+xOkBtn.executeAction("CLICK", tuple())
+
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "1", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+xTreeList = xCheckListMenu.getChild("check_list_box")
+self.assertEqual(5, len(xTreeList.getChildren()))
+xOkBtn = xFloatWindow.getChild("cancel")
+xOkBtn.executeAction("CLICK", tuple())
+
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "2", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+xTreeList = xCheckListMenu.getChild("check_list_box")
+self.assertEqual(3, len(xTreeList.getChildren()))
+xOkBtn = xFloatWindow.getChild("cancel")
+xOkBtn.executeAction("CLICK", tuple())
+
 self.ui_test.close_doc()
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/autofilter/tdf116818.xlsx 
b/sc/qa/uitest/data/autofilter/tdf116818.xlsx
new file mode 100644
index ..060615cc0444
Binary files /dev/null and b/sc/qa/uitest/data/autofilter/tdf116818.xlsx differ
diff --git a/sc/source/filter/inc/autofilterbuffer.hxx 
b/sc/source/filter/inc/autofilterbuffer.hxx
index 469aacdce399..e0270336a10e 100644
--- a/sc/source/filter/inc/autofilterbuffer.hxx
+++ b/sc/source/filter/inc/autofilterbuffer.hxx
@@ -48,7 +48,7 @@ struct ApiFilterSettings
 
 void appendField( bool bAnd, sal_Int32 nOperator, double fValue );
 void appendField( bool bAnd, sal_Int32 nOperator, const OUString& rValue );
-void appendField( bool bAnd, const std::vector& rValues );
+void appendField( bool bAnd, const std::vector>& 
rValues );
 };
 
 /** Base class fo

[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sw/qa sw/source

2021-06-28 Thread László Németh (via logerrit)
 sw/qa/extras/uiwriter/uiwriter2.cxx |   57 
 sw/source/core/doc/docnum.cxx   |3 +
 2 files changed, 59 insertions(+), 1 deletion(-)

New commits:
commit be76b5c8a6599af6bbe93f7a5f4a612766048e4d
Author: László Németh 
AuthorDate: Wed Jan 6 18:10:39 2021 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Jun 28 13:15:36 2021 +0200

tdf#39721 sw change tracking: fix move down

When moving list items by Move Down (see Bullets
and Numbering toolbar) to a non-content node (e.g.
tables, images or end of the document), tracked
deletions of the inserted paragraphs reappeared
as non-deleted text.

Note: disable unit test on Windows because of
a not reproducable problem of the Jenkins build
(moreover, reverting the patch, and modifying the
unit test according to the revert has still resulted
the same problem on the Windows test machine).

Change-Id: I3fb49061a81f832e1070da0f78cf7c5b3bd7d2c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/10
Tested-by: Jenkins
Reviewed-by: László Németh 
(cherry picked from commit b5ab4836c03e9428aff6a48843f2a054ceff0f85)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117978
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 185187cfbccc..c7f20c586327 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -602,6 +602,63 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912)
 CPPUNIT_ASSERT_EQUAL(OUString("foo"), pWrtShell->GetCursor()->GetText());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf39721)
+{
+// FIXME: disabled on Windows because of a not reproducable problem (not 
related to the patch)
+#if !defined(_WIN32)
+// check move down with redlining
+load(DATA_DIRECTORY, "tdf39721.fodt");
+
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+
+//turn on red-lining and show changes
+SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | 
RedlineFlags::ShowDelete
+  | 
RedlineFlags::ShowInsert);
+CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+   pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+CPPUNIT_ASSERT_MESSAGE(
+"redlines should be visible",
+
IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+// store original text of the document for checking Undo
+OUString sOrigText(pTextDoc->getText()->getString());
+
+// first paragraph is "Lorem ipsum" with deleted "m ips"
+CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum"), 
getParagraph(1)->getString());
+
+// move down first paragraph with change tracking
+dispatchCommand(mxComponent, ".uno:MoveDown", {});
+
+// deletion isn't rejected
+CPPUNIT_ASSERT_EQUAL(OUString("Loremm"), getParagraph(3)->getString());
+
+// Undo and repeat it with the second paragraph
+dispatchCommand(mxComponent, ".uno:Undo", {});
+
+CPPUNIT_ASSERT_EQUAL(sOrigText, pTextDoc->getText()->getString());
+
+// second paragraph is "dolor sit" with deleted "lor "
+CPPUNIT_ASSERT_EQUAL(OUString("dolor sit"), getParagraph(2)->getString());
+
+// move down second paragraph with change tracking
+SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+
+pWrtShell->Up(/*bSelect=*/false);
+pWrtShell->Down(/*bSelect=*/false);
+
+dispatchCommand(mxComponent, ".uno:MoveDown", {});
+
+// This was "dolor sit" (rejecting tracked deletion)
+CPPUNIT_ASSERT_EQUAL(OUString("dolsit"), getParagraph(4)->getString());
+
+dispatchCommand(mxComponent, ".uno:Undo", {});
+
+CPPUNIT_ASSERT_EQUAL(sOrigText, pTextDoc->getText()->getString());
+#endif
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf54819)
 {
 load(DATA_DIRECTORY, "tdf54819.fodt");
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index d84574375112..620c5a2034d7 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -2141,6 +2141,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, tools::Long 
const nOffset,
 rOrigPam.GetPoint()->nContent.Assign( rOrigPam.GetContentNode(), 0 
);
 
 bool bDelLastPara = !aInsPos.nNode.GetNode().IsContentNode();
+sal_uLong nOrigIdx = aIdx.GetIndex();
 
 /* When copying to a non-content node Copy will
insert a paragraph before that node and insert before
@@ -2195,7 +2196,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, tools::Long 
const nOffset,
 {
 SwPaM pam(*pRedline, nullptr);
 sal_uLong const nCurrentOffset(
-aIdx.GetIndex() + 1 

[Libreoffice-commits] core.git: 2 commits - vcl/unx

2021-06-28 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |  111 +--
 1 file changed, 97 insertions(+), 14 deletions(-)

New commits:
commit 5d5b503c62b975af8435a7b6deb648081b561e60
Author: Caolán McNamara 
AuthorDate: Mon Jun 28 10:21:59 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 28 13:07:00 2021 +0200

gtk4: gtk_grab_add/gtk_grab_remove doesn't exist in gtk4

in the public api anyway, fudge this for now

Change-Id: I44fff4e1dffb390664234ace7337c8ffaff6df90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117997
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index b242c381c34f..b6fbf5eae2d3 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -2669,6 +2669,7 @@ private:
 gulong m_nDragGetSignalId;
 
 #if GTK_CHECK_VERSION(4, 0, 0)
+int m_nGrabCount;
 GtkEventController* m_pFocusController;
 GtkEventController* m_pClickController;
 GtkEventController* m_pMotionController;
@@ -3220,6 +3221,7 @@ public:
 , m_nDragDataDeleteignalId(0)
 , m_nDragGetSignalId(0)
 #if GTK_CHECK_VERSION(4, 0, 0)
+, m_nGrabCount(0)
 , m_pFocusController(nullptr)
 , m_pClickController(nullptr)
 , m_pMotionController(nullptr)
@@ -3879,23 +3881,27 @@ public:
 
 virtual void grab_add() override
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
+#if GTK_CHECK_VERSION(4, 0, 0)
+++m_nGrabCount;
+#else
 gtk_grab_add(m_pWidget);
 #endif
 }
 
 virtual bool has_grab() const override
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
-return gtk_widget_has_grab(m_pWidget);
+#if GTK_CHECK_VERSION(4, 0, 0)
+return m_nGrabCount != 0;
 #else
-return false;
+return gtk_widget_has_grab(m_pWidget);
 #endif
 }
 
 virtual void grab_remove() override
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
+#if GTK_CHECK_VERSION(4, 0, 0)
+--m_nGrabCount;
+#else
 gtk_grab_remove(m_pWidget);
 #endif
 }
commit 2e138cfb208aba034291896149266b2f67c5654c
Author: Caolán McNamara 
AuthorDate: Mon Jun 28 09:48:30 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 28 13:06:45 2021 +0200

gtk4: add key-pressed/key-released support

Change-Id: If06e8ce0d351a4761622d3824add29ebe9383210
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117995
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 50d15d75b943..b242c381c34f 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -2591,12 +2591,16 @@ protected:
 
 void localizeDecimalSeparator()
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 // tdf#128867 if localize decimal separator is active we will always
 // need to be able to change the output of the decimal key press
 if (!m_nKeyPressSignalId && 
Application::GetSettings().GetMiscSettings().GetEnableLocalizedDecimalSep())
+{
+#if GTK_CHECK_VERSION(4, 0, 0)
+m_nKeyPressSignalId = g_signal_connect(get_key_controller(), 
"key-pressed", G_CALLBACK(signalKeyPressed), this);
+#else
 m_nKeyPressSignalId = g_signal_connect(m_pWidget, 
"key-press-event", G_CALLBACK(signalKey), this);
 #endif
+}
 }
 
 void ensure_drag_begin_end()
@@ -2669,6 +2673,7 @@ private:
 GtkEventController* m_pClickController;
 GtkEventController* m_pMotionController;
 GtkEventController* m_pDragController;
+GtkEventController* m_pKeyController;
 #endif
 
 rtl::Reference m_xDropTarget;
@@ -2681,12 +2686,28 @@ private:
 pThis->signal_size_allocate(allocation->width, allocation->height);
 }
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
+#if GTK_CHECK_VERSION(4, 0, 0)
+static gboolean signalKeyPressed(GtkEventControllerKey*, guint keyval, 
guint keycode, GdkModifierType state, gpointer widget)
+{
+LocalizeDecimalSeparator(keyval);
+GtkInstanceWidget* pThis = static_cast(widget);
+return pThis->signal_key_press(keyval, keycode, state);
+}
+
+static gboolean signalKeyReleased(GtkEventControllerKey*, guint keyval, 
guint keycode, GdkModifierType state, gpointer widget)
+{
+LocalizeDecimalSeparator(keyval);
+GtkInstanceWidget* pThis = static_cast(widget);
+return pThis->signal_key_release(keyval, keycode, state);
+}
+#else
 static gboolean signalKey(GtkWidget*, GdkEventKey* pEvent, gpointer widget)
 {
 LocalizeDecimalSeparator(pEvent->keyval);
 GtkInstanceWidget* pThis = static_cast(widget);
-return pThis->signal_key(pEvent);
+if (pEvent->type == GDK_KEY_PRESS)
+return pThis->signal_key_press(pEvent);
+return pThis->signal_key_release(pEvent);
 }
 #endif
 
@@ -3203,6 +3224,7 @@ public:
 , m_pClickController(nullptr)
 , m_pMotionController(nullptr)
 , m_pDragController(nul

[Libreoffice-commits] core.git: oox/source

2021-06-28 Thread Noel Grandin (via logerrit)
 oox/source/shape/ShapeContextHandler.cxx |   67 ++-
 oox/source/shape/ShapeContextHandler.hxx |4 +
 2 files changed, 35 insertions(+), 36 deletions(-)

New commits:
commit d1a9c3cb443a292aec3037dad0350732c414ff35
Author: Noel Grandin 
AuthorDate: Mon Jun 28 10:15:06 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 28 12:40:45 2021 +0200

store actual type in ShapeFragmentHandler::mxFilterBase

instead of storing the base-class and then down-casting

Change-Id: I13c600903637216abb4547433f24fc9b84afde8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117993
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/oox/source/shape/ShapeContextHandler.cxx 
b/oox/source/shape/ShapeContextHandler.cxx
index 1513ad8d6507..7cd7251c4aaf 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -49,7 +49,7 @@ ShapeContextHandler::ShapeContextHandler(uno::Reference< 
uno::XComponentContext
 {
 try
 {
-mxFilterBase.set( new ShapeFilterBase(context) );
+mxShapeFilterBase.set( new ShapeFilterBase(context) );
 }
 catch( uno::Exception& )
 {
@@ -64,7 +64,7 @@ uno::Reference const & 
ShapeContextHandler::getLo
 {
 if (!mxLockedCanvasContext.is())
 {
-FragmentHandler2Ref rFragmentHandler(new 
ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath));
+FragmentHandler2Ref rFragmentHandler(new 
ShapeFragmentHandler(*mxShapeFilterBase, msRelationFragmentPath));
 
 switch (nElement & 0x)
 {
@@ -91,7 +91,7 @@ uno::Reference const & 
ShapeContextHandler::getCh
 case XML_chart:
 {
 std::unique_ptr pFragmentHandler(
-new ShapeFragmentHandler(*mxFilterBase, 
msRelationFragmentPath));
+new ShapeFragmentHandler(*mxShapeFilterBase, 
msRelationFragmentPath));
 mpShape = 
std::make_shared("com.sun.star.drawing.OLE2Shape" );
 mxChartShapeContext.set(new 
ChartGraphicDataContext(*pFragmentHandler, mpShape, true));
 break;
@@ -108,7 +108,7 @@ uno::Reference const & 
ShapeContextHandler::getWp
 {
 if (!mxWpsContext.is())
 {
-FragmentHandler2Ref rFragmentHandler(new 
ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath));
+FragmentHandler2Ref rFragmentHandler(new 
ShapeFragmentHandler(*mxShapeFilterBase, msRelationFragmentPath));
 ShapePtr pMasterShape;
 
 uno::Reference xShape;
@@ -139,7 +139,7 @@ uno::Reference const & 
ShapeContextHandler::getWp
 {
 if (!mxWpgContext.is())
 {
-FragmentHandler2Ref rFragmentHandler(new 
ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath));
+FragmentHandler2Ref rFragmentHandler(new 
ShapeFragmentHandler(*mxShapeFilterBase, msRelationFragmentPath));
 
 switch (getBaseToken(nElement))
 {
@@ -159,7 +159,7 @@ ShapeContextHandler::getGraphicShapeContext(::sal_Int32 
Element )
 {
 if (! mxGraphicShapeContext.is())
 {
-auto pFragmentHandler = 
std::make_shared(*mxFilterBase, msRelationFragmentPath);
+auto pFragmentHandler = 
std::make_shared(*mxShapeFilterBase, 
msRelationFragmentPath);
 ShapePtr pMasterShape;
 
 switch (Element & 0x)
@@ -187,11 +187,11 @@ ShapeContextHandler::getDrawingShapeContext()
 {
 if (!mxDrawingFragmentHandler.is())
 {
-mpDrawing = std::make_shared( *mxFilterBase, 
mxDrawPage, oox::vml::VMLDRAWING_WORD );
+mpDrawing = std::make_shared( *mxShapeFilterBase, 
mxDrawPage, oox::vml::VMLDRAWING_WORD );
 mxDrawingFragmentHandler.set
   (static_cast
(new oox::vml::DrawingFragment
-( *mxFilterBase, msRelationFragmentPath, *mpDrawing )));
+( *mxShapeFilterBase, msRelationFragmentPath, *mpDrawing )));
 }
 else
 {
@@ -203,7 +203,7 @@ ShapeContextHandler::getDrawingShapeContext()
 mxDrawingFragmentHandler.set
   (static_cast
(new oox::vml::DrawingFragment
-( *mxFilterBase, msRelationFragmentPath, *mpDrawing )));
+( *mxShapeFilterBase, msRelationFragmentPath, *mpDrawing )));
 }
 }
 return mxDrawingFragmentHandler;
@@ -214,7 +214,7 @@ ShapeContextHandler::getDiagramShapeContext()
 {
 if (!mxDiagramShapeContext.is())
 {
-auto pFragmentHandler = 
std::make_shared(*mxFilterBase, msRelationFragmentPath);
+auto pFragmentHandler = 
std::make_shared(*mxShapeFilterBase, 
msRelationFragmentPath);
 mpShape = std::make_shared();
 mxDiagramShapeContext.set(new 
DiagramGraphicDataContext(*pFragmentHandler, mpShape));
 }
@@ -261,7 +261,7 @@ void SAL_CALL ShapeContextHandler::startFastElement
 (::sal_Int32 Element,
  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
 {
-mxFilterBase->filter(maMediaDescriptor);

[Libreoffice-commits] core.git: 2 commits - vcl/unx

2021-06-28 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/customcellrenderer.cxx |   27 +
 vcl/unx/gtk3/gtkinst.cxx|   38 +---
 2 files changed, 58 insertions(+), 7 deletions(-)

New commits:
commit 15ee306cda425323cb2d58bd88f84686ebc8848c
Author: Caolán McNamara 
AuthorDate: Mon Jun 28 09:17:46 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 28 12:35:39 2021 +0200

gtk4: implement focus in/out for IMHandler

Change-Id: Id8183b18622a26c0b61c3165b364ecc1d3e3e5bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117994
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 036fca44169c..50d15d75b943 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -16608,6 +16608,9 @@ class IMHandler
 {
 private:
 GtkInstanceDrawingArea* m_pArea;
+#if GTK_CHECK_VERSION(4, 0, 0)
+GtkEventController* m_pFocusController;
+#endif
 GtkIMContext* m_pIMContext;
 OUString m_sPreeditText;
 gulong m_nFocusInSignalId;
@@ -16618,10 +16621,21 @@ public:
 IMHandler(GtkInstanceDrawingArea* pArea)
 : m_pArea(pArea)
 , m_pIMContext(gtk_im_multicontext_new())
-, m_nFocusInSignalId(g_signal_connect(m_pArea->getWidget(), 
"focus-in-event", G_CALLBACK(signalFocusIn), this))
-, m_nFocusOutSignalId(g_signal_connect(m_pArea->getWidget(), 
"focus-out-event", G_CALLBACK(signalFocusOut), this))
 , m_bExtTextInput(false)
 {
+GtkWidget* pWidget = m_pArea->getWidget();
+
+#if GTK_CHECK_VERSION(4, 0, 0)
+m_pFocusController = gtk_event_controller_focus_new();
+gtk_widget_add_controller(pWidget, m_pFocusController);
+
+m_nFocusInSignalId = g_signal_connect(m_pFocusController, "enter", 
G_CALLBACK(signalFocusIn), this);
+m_nFocusOutSignalId = g_signal_connect(m_pFocusController, "leave", 
G_CALLBACK(signalFocusOut), this);
+#else
+m_nFocusInSignalId = g_signal_connect(pWidget, "focus-in-event", 
G_CALLBACK(signalFocusIn), this);
+m_nFocusOutSignalId = g_signal_connect(pWidget, "focus-out-event", 
G_CALLBACK(signalFocusOut), this);
+#endif
+
 g_signal_connect(m_pIMContext, "preedit-start", 
G_CALLBACK(signalIMPreeditStart), this);
 g_signal_connect(m_pIMContext, "preedit-end", 
G_CALLBACK(signalIMPreeditEnd), this);
 g_signal_connect(m_pIMContext, "commit", G_CALLBACK(signalIMCommit), 
this);
@@ -16629,7 +16643,6 @@ public:
 g_signal_connect(m_pIMContext, "retrieve-surrounding", 
G_CALLBACK(signalIMRetrieveSurrounding), this);
 g_signal_connect(m_pIMContext, "delete-surrounding", 
G_CALLBACK(signalIMDeleteSurrounding), this);
 
-GtkWidget* pWidget = m_pArea->getWidget();
 if (!gtk_widget_get_realized(pWidget))
 gtk_widget_realize(pWidget);
 im_context_set_client_widget(m_pIMContext, pWidget);
@@ -16645,26 +16658,43 @@ public:
 gtk_im_context_focus_out(m_pIMContext);
 }
 
+#if GTK_CHECK_VERSION(4, 0, 0)
+static void signalFocusIn(GtkEventControllerFocus*, gpointer im_handler)
+#else
 static gboolean signalFocusIn(GtkWidget*, GdkEvent*, gpointer im_handler)
+#endif
 {
 IMHandler* pThis = static_cast(im_handler);
 pThis->signalFocus(true);
+#if !GTK_CHECK_VERSION(4, 0, 0)
 return false;
+#endif
 }
 
+#if GTK_CHECK_VERSION(4, 0, 0)
+static void signalFocusOut(GtkEventControllerFocus*, gpointer im_handler)
+#else
 static gboolean signalFocusOut(GtkWidget*, GdkEvent*, gpointer im_handler)
+#endif
 {
 IMHandler* pThis = static_cast(im_handler);
 pThis->signalFocus(false);
+#if !GTK_CHECK_VERSION(4, 0, 0)
 return false;
+#endif
 }
 
 ~IMHandler()
 {
 EndExtTextInput();
 
+#if GTK_CHECK_VERSION(4, 0, 0)
+g_signal_handler_disconnect(m_pFocusController, m_nFocusOutSignalId);
+g_signal_handler_disconnect(m_pFocusController, m_nFocusInSignalId);
+#else
 g_signal_handler_disconnect(m_pArea->getWidget(), m_nFocusOutSignalId);
 g_signal_handler_disconnect(m_pArea->getWidget(), m_nFocusInSignalId);
+#endif
 
 if (gtk_widget_has_focus(m_pArea->getWidget()))
 gtk_im_context_focus_out(m_pIMContext);
@@ -22144,6 +22174,8 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "modules/scalc/ui/formatcellsdialog.ui" &&
 rUIFile != "modules/scalc/ui/goalseekdlg.ui" &&
 rUIFile != "modules/scalc/ui/groupdialog.ui" &&
+rUIFile != "modules/scalc/ui/headerfootercontent.ui" &&
+rUIFile != "modules/scalc/ui/headerfooterdialog.ui" &&
 rUIFile != "modules/scalc/ui/inputstringdialog.ui" &&
 rUIFile != "modules/scalc/ui/insertname.ui" &&
 rUIFile != "modules/scalc/ui/insertcells.ui" &&
commit f8f0e4067b09d1d8b5aebc7b28db3b7565606b27
Author: Caolán McNamara 
AuthorDate: Sun J

[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sc/qa sc/source

2021-06-28 Thread Tibor Nagy (via logerrit)
 sc/qa/uitest/validity/tdf138134.py |   63 +
 sc/source/ui/view/output.cxx   |   11 ++
 2 files changed, 74 insertions(+)

New commits:
commit abe18073010ac88f5ccf8d1a0d60b9e17539e0b4
Author: Tibor Nagy 
AuthorDate: Tue Nov 24 13:46:45 2020 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Jun 28 12:32:06 2021 +0200

tdf#138134 sc: remove red circle of updated formula

Recalculation of formulas didn't remove the red validation
circle around the formula cells despite their new valid value.

Note: to check/show the fix manually, run the test with

$ (cd sc && make -srj8 UITest_validity 
UITEST_TEST_NAME="tdf138134.DetectiveCircle.test_delete_circle_at_formula" 
SAL_USE_VCLPLUGIN=gen)

(if needed, by adding

import time
time.sleep(5)

to the called function of sc/qa/uitest/validity/tdf138134.py)

Co-authored-by: Attila Szűcs (NISZ)

Change-Id: Ieda4449b1ef07a3cb536881e99130d967c1bb175
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106502
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 0478bdb68e8945cc76dc04c6f7040526656329a8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117977
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/sc/qa/uitest/validity/tdf138134.py 
b/sc/qa/uitest/validity/tdf138134.py
new file mode 100644
index ..6d660019d15e
--- /dev/null
+++ b/sc/qa/uitest/validity/tdf138134.py
@@ -0,0 +1,63 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.calc import enter_text_to_cell
+from libreoffice.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+class DetectiveCircle(UITestCase):
+
+def test_delete_circle_at_formula(self):
+calc_doc = self.ui_test.create_doc_in_start_center("calc")
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+enter_text_to_cell(gridwin, "A1", "1")
+enter_text_to_cell(gridwin, "A2", "3")
+enter_text_to_cell(gridwin, "A3", "=SUM(A1:A2)")
+
+#Select the cells to be validated
+gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A3"}))
+#Apply Data > Validity ... > Whole Numbers
+self.ui_test.execute_dialog_through_command(".uno:Validation")
+xDialog = self.xUITest.getTopFocusWindow()
+xTabs = xDialog.getChild("tabcontrol")
+select_pos(xTabs, "0")
+xallow = xDialog.getChild("allow")
+xallowempty = xDialog.getChild("allowempty")
+xdata = xDialog.getChild("data")
+xmin = xDialog.getChild("min")
+xmax = xDialog.getChild("max")
+
+props = {"TEXT": "Whole Numbers"}
+actionProps = mkPropertyValues(props)
+xallow.executeAction("SELECT", actionProps)
+xallowempty.executeAction("CLICK", tuple())
+propsA = {"TEXT": "equal"}
+actionPropsA = mkPropertyValues(propsA)
+xdata.executeAction("SELECT", actionPropsA)
+xmin.executeAction("TYPE", mkPropertyValues({"TEXT":"5"}))
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+self.xUITest.executeCommand(".uno:ShowInvalid")
+
+detectiveCircle1 = 
document.Sheets.getByName("Sheet1").DrawPage.getCount()
+#There should be 1 detective circle object!
+self.assertEqual(detectiveCircle1, 1)
+
+enter_text_to_cell(gridwin, "A1", "2")
+
+detectiveCircle2 = 
document.Sheets.getByName("Sheet1").DrawPage.getCount()
+#There should not be a detective circle object!
+self.assertEqual(detectiveCircle2, 0)
+
+self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 4205db5c8fae..382792f88782 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -56,6 +56,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -1830,6 +1832,15 @@ void ScOutputData::FindChanged()
 nCol2 = std::max(rPos.Col(), nCol2);
 nRow1 = std::min(rPos.Row(), nRow1);
 nRow2 = std::max(rPos.Row(), nRow2);
+
+const SfxUInt32Item* pItem = mpDoc->GetAttr(rPos, 
ATTR_VALIDDATA);
+const ScValidationData* pData = 
mpDoc->GetValidationEntry(pItem->GetValue());
+if (pData)
+   

[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - chart2/qa include/oox oox/source sc/source

2021-06-28 Thread Balazs Varga (via logerrit)
 chart2/qa/extras/chart2export.cxx |   30 
 chart2/qa/extras/data/xlsx/tdf128621.xlsx |binary
 include/oox/export/chartexport.hxx|2 
 include/oox/export/drawingml.hxx  |   10 ++
 include/oox/token/relationship.hxx|1 
 oox/source/export/chartexport.cxx |  108 ++
 oox/source/export/drawingml.cxx   |   69 +++
 oox/source/token/relationship.inc |1 
 oox/source/token/tokens.txt   |1 
 sc/source/filter/excel/xeescher.cxx   |2 
 sc/source/filter/excel/xestream.cxx   |2 
 sc/source/filter/inc/xcl97rec.hxx |5 -
 sc/source/filter/xcl97/xcl97rec.cxx   |   17 +---
 13 files changed, 228 insertions(+), 20 deletions(-)

New commits:
commit c1898ecc7c15d435111a23060b0f7caf58344530
Author: Balazs Varga 
AuthorDate: Fri Dec 11 20:31:28 2020 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Jun 28 12:24:51 2021 +0200

tdf#128621 OOXML Chart: export embedded shapes in chart

Use ShapeExport to export additional shapes (userShapes)
in Chart.

Change-Id: Ic70a7f84c4ac028b6f09a69bec2cf4949944b16c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107605
Tested-by: Jenkins
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 3184cfc493c6931725dce1de19ac958067b1fd25)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117976
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index d92e06cdc01c..d0cd3be67d66 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -185,6 +185,7 @@ public:
 void testTdf138204();
 void testTdf138181();
 void testCustomShapeText();
+void testuserShapesXLSX();
 
 CPPUNIT_TEST_SUITE(Chart2ExportTest);
 CPPUNIT_TEST(testErrorBarXLSX);
@@ -332,6 +333,7 @@ public:
 CPPUNIT_TEST(testTdf138204);
 CPPUNIT_TEST(testTdf138181);
 CPPUNIT_TEST(testCustomShapeText);
+CPPUNIT_TEST(testuserShapesXLSX);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -3056,6 +3058,34 @@ void Chart2ExportTest::testCustomShapeText()
 CPPUNIT_ASSERT(!xRange->getString().isEmpty());
 }
 
+void Chart2ExportTest::testuserShapesXLSX()
+{
+load("/chart2/qa/extras/data/xlsx/", "tdf128621.xlsx");
+reload("Calc Office Open XML");
+
+Reference< chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, 
mxComponent);
+CPPUNIT_ASSERT(xChartDoc.is());
+
+// test that the custom shape exists
+Reference xDrawPageSupplier(xChartDoc, 
UNO_QUERY_THROW);
+Reference xDrawPage(xDrawPageSupplier->getDrawPage(), 
UNO_SET_THROW);
+Reference xCustomShape(xDrawPage->getByIndex(1), 
UNO_QUERY_THROW);
+CPPUNIT_ASSERT(xCustomShape.is());
+// test type of shape
+CPPUNIT_ASSERT(xCustomShape->getShapeType().endsWith("CustomShape"));
+// test custom shape position
+awt::Point aPosition = xCustomShape->getPosition();
+CPPUNIT_ASSERT_DOUBLES_EQUAL(1356, aPosition.X, 300);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(9107, aPosition.Y, 300);
+// test custom shape size
+awt::Size aSize = xCustomShape->getSize();
+CPPUNIT_ASSERT_DOUBLES_EQUAL(9520, aSize.Width, 300);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(1805, aSize.Height, 300);
+// test custom shape text
+Reference< text::XText > xRange(xCustomShape, uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT(!xRange->getString().isEmpty());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/xlsx/tdf128621.xlsx 
b/chart2/qa/extras/data/xlsx/tdf128621.xlsx
new file mode 100644
index ..93a6822da951
Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf128621.xlsx differ
diff --git a/include/oox/export/chartexport.hxx 
b/include/oox/export/chartexport.hxx
index b900c68b51a2..b6ed39c72dbb 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -140,6 +141,7 @@ private:
   const OUString* pSubText = nullptr );
 void exportPlotArea( const css::uno::Reference<
  css::chart::XChartDocument >& rChartDoc );
+void exportAdditionalShapes( const 
css::uno::Reference& rChartDoc );
 void exportFill( const css::uno::Reference< css::beans::XPropertySet >& 
xPropSet );
 void exportSolidFill(const css::uno::Reference& 
xPropSet);
 void exportGradientFill( const css::uno::Reference< 
css::beans::XPropertySet >& xPropSet );
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 00049fd94103..8c4ccd0bd224 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -141,6 +141,8 @@ private:
 static int mnImageCounter;
 static int mnWdpImag

[Libreoffice-commits] core.git: external/harfbuzz

2021-06-28 Thread Stephan Bergmann (via logerrit)
 external/harfbuzz/UnpackedTarball_harfbuzz.mk |4 
 1 file changed, 4 insertions(+)

New commits:
commit 76bf22074a9bb5d6ef177783e5baa41760aa27e9
Author: Stephan Bergmann 
AuthorDate: Mon Jun 28 10:01:45 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Jun 28 11:57:36 2021 +0200

Mark external/harfbuzz/Wunused-but-set-variable.patch as fixed upstream

Change-Id: Iefc8f4f6ff93ec1a11256724b1881689d5eb56d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117992
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk 
b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
index 49119e30861b..cff8d91369e2 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -17,6 +17,10 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0))
 
 # icu-65-api-macros-with-semicolon.patch.1
 #   See http://site.icu-project.org/download/65  Migration Issues
+# Wunused-but-set-variable.patch
+#   Independently fixed upstream in a similar way with
+#   

 "Define
+#   HB_UNUSED for clang"
 $(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
 external/harfbuzz/ubsan.patch \
 external/harfbuzz/icu-65-api-macros-with-semicolon.patch.1 \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sysui/desktop

2021-06-28 Thread Samuel Mehrbrodt (via logerrit)
 sysui/desktop/macosx/Info.plist.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3c7871626186c07dcd2ad874d70ea53aa8ae29aa
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jun 28 08:18:49 2021 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Jun 28 11:54:40 2021 +0200

Tabs to spaces

Change-Id: I1d46cd91082549eebfafe4f7e16d3b6d4e2fe9ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117964
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sysui/desktop/macosx/Info.plist.in 
b/sysui/desktop/macosx/Info.plist.in
index 1bdf4eb02ea2..985ea047b0ea 100644
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -1539,7 +1539,7 @@
 CFBundleURLSchemes
 
 vnd.sun.star.webdav
-   vnd.sun.star.webdavs
+vnd.sun.star.webdavs
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - 2 commits - sc/source vcl/source

2021-06-28 Thread Noel Grandin (via logerrit)
 sc/source/ui/view/gridwin.cxx |4 ++--
 vcl/source/window/winproc.cxx |2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 054b0df6ac77864146bab8654bcc99f049a39057
Author: Noel Grandin 
AuthorDate: Mon Jun 14 13:53:51 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 10:57:40 2021 +0200

tdf#142393 crash on filter by color dropdownlist (gen)

the frame/window can become disposed during the early stages of this
method

Change-Id: I974cbeefa75a3b5274e397a6da70db8b7cf73528
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117157
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 3c0938c9bb63fa65ea44439b4e838ed0d9fa1260)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117550
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 424b8b6cdbfa..cb4c6cd35d9e 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -510,6 +510,8 @@ bool ImplHandleMouseEvent( const VclPtr& 
xWindow, MouseNotifyEvent
 pMouseDownWin->ImplGetFrameData()->mbStartDragCalled  = true;
 }
 
+if (xWindow->isDisposed())
+return true;
 // test for mouseleave and mouseenter
 VclPtr pMouseMoveWin = pWinFrameData->mpMouseMoveWin;
 if ( pChild != pMouseMoveWin )
commit f9957621c060dbf1d35d913930419153d8ae7696
Author: Samuel Mehrbrodt 
AuthorDate: Wed May 19 14:21:27 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 10:57:26 2021 +0200

tdf#76258 Fix color filter popup position

Should be next to autofilter popup

Change-Id: I2ca00fd078d18f8f5c7318115789ffe633a87dc3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115803
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 950eb673b9ad4bc380b13281af577fc8c6842007)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116603
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index b8d89317c271..02a8d9e8f370 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -904,8 +904,8 @@ void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode 
eMode)
 }
 i++;
 }
-
-sal_uInt16 nSelected = pColorMenu->Execute(this, 
mpAutoFilterPopup->GetPosPixel());
+Point pos(mpAutoFilterPopup->GetSizePixel().getWidth(), 150);
+sal_uInt16 nSelected = pColorMenu->Execute(this, pos);
 pColorMenu.disposeAndClear();
 mpAutoFilterPopup->terminateAllPopupMenus();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - 2 commits - sc/qa sc/source

2021-06-28 Thread Caolán McNamara (via logerrit)
 sc/qa/unit/data/xlsx/autofilter-colors.xlsx |binary
 sc/qa/unit/subsequent_export-test.cxx   |   29 +++
 sc/source/core/data/table3.cxx  |6 +
 sc/source/filter/excel/excrecds.cxx |   33 +++-
 sc/source/filter/excel/xestyle.cxx  |  115 +---
 sc/source/filter/excel/xlstyle.cxx  |7 +
 sc/source/filter/inc/excrecds.hxx   |4 
 sc/source/filter/inc/xestyle.hxx|9 ++
 sc/source/filter/inc/xlstyle.hxx|1 
 9 files changed, 192 insertions(+), 12 deletions(-)

New commits:
commit 11a12f3237e240ea4c2b403f0ca25d25fca3b121
Author: Caolán McNamara 
AuthorDate: Sun May 30 17:18:01 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 10:56:51 2021 +0200

crashtesting: on export of fdo84621-4.ods to xls

Change-Id: I0553a7584347e0fc3ebcba6f99e974b9b1d341a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116412
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 156fad36377ba369065bacad863a31c808314069)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116606
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 8c9153f302d9..481d74e83f6e 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -3488,6 +3488,9 @@ bool ScTable::HasRowHeader( SCCOL nStartCol, SCROW 
nStartRow, SCCOL nEndCol, SCR
 
 void ScTable::GetFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, 
ScFilterEntries& rFilterEntries )
 {
+if (nCol >= aCol.size())
+return;
+
 sc::ColumnBlockConstPosition aBlockPos;
 aCol[nCol].InitBlockPosition(aBlockPos);
 aCol[nCol].GetFilterEntries(aBlockPos, nRow1, nRow2, rFilterEntries);
@@ -3496,6 +3499,9 @@ void ScTable::GetFilterEntries( SCCOL nCol, SCROW nRow1, 
SCROW nRow2, ScFilterEn
 void ScTable::GetFilteredFilterEntries(
 SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, 
ScFilterEntries& rFilterEntries )
 {
+if (nCol >= aCol.size())
+return;
+
 sc::ColumnBlockConstPosition aBlockPos;
 aCol[nCol].InitBlockPosition(aBlockPos);
 
commit c178cf53c10944d84dfe63d15f0703db4a5eb5b6
Author: Samuel Mehrbrodt 
AuthorDate: Wed May 19 11:05:27 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 10:56:36 2021 +0200

tdf#76258 Add OOXML export for color filter

Change-Id: I4c0e2fbe27de6d48a33aba230c35d3b74854e27e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115789
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit b8cfea65ddcba33572e9687022de3c813711e298)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116605
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/qa/unit/data/xlsx/autofilter-colors.xlsx 
b/sc/qa/unit/data/xlsx/autofilter-colors.xlsx
new file mode 100644
index ..e4f8e67b202d
Binary files /dev/null and b/sc/qa/unit/data/xlsx/autofilter-colors.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index d2e1087acf55..ff2a2613d466 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -202,6 +202,8 @@ public:
 void testTdf95640_ods_to_xlsx_with_standard_list();
 void testTdf95640_xlsx_to_xlsx();
 void testAutofilterColorsODF();
+void testAutofilterColorsOOXML();
+void testAutofilterColorsStyleOOXML();
 
 void testRefStringXLSX();
 void testRefStringConfigXLSX();
@@ -339,6 +341,8 @@ public:
 CPPUNIT_TEST(testTdf95640_ods_to_xlsx_with_standard_list);
 CPPUNIT_TEST(testTdf95640_xlsx_to_xlsx);
 CPPUNIT_TEST(testAutofilterColorsODF);
+CPPUNIT_TEST(testAutofilterColorsOOXML);
+CPPUNIT_TEST(testAutofilterColorsStyleOOXML);
 
 CPPUNIT_TEST(testRefStringXLSX);
 CPPUNIT_TEST(testRefStringConfigXLSX);
@@ -4070,6 +4074,31 @@ void ScExportTest::testAutofilterColorsODF()
 assertXPath(pDoc, 
"//table:filter/table:filter-and/table:filter-condition[2][@loext:data-type='text-color']");
 }
 
+void ScExportTest::testAutofilterColorsOOXML()
+{
+ScDocShellRef xDocSh = loadDoc(u"autofilter-colors.", FORMAT_XLSX);
+CPPUNIT_ASSERT(xDocSh.is());
+
+xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory,
+ "xl/tables/table1.xml", 
FORMAT_XLSX);
+CPPUNIT_ASSERT(pDoc);
+
+assertXPath(pDoc, "/x:table/x:autoFilter/x:filterColumn/x:colorFilter", 
"dxfId", "4");
+}
+
+void ScExportTest::testAutofilterColorsStyleOOXML()
+{
+ScDocShellRef xDocSh = loadDoc(u"autofilter-colors.", FORMAT_XLSX);
+CPPUNIT_ASSERT(xDocSh.is());
+
+xmlDocPtr pDoc
+= XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, 
"xl/styles.xml", FORMAT_XLSX);
+CPPUNIT_ASSERT(pDoc);
+
+assertXPath(pDoc, 
"/x:

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sc/source

2021-06-28 Thread Samuel Mehrbrodt (via logerrit)
 sc/source/core/data/column3.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit c58c7293748c3620413bb8252a74359179e49855
Author: Samuel Mehrbrodt 
AuthorDate: Wed May 19 16:22:52 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 10:55:46 2021 +0200

tdf#76258 Skip automatic colors in color filter popup

Change-Id: Ic8ed4b2a503c347895668b18744c9fee02d92e81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115815
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit ade343ea8b498efb88473a0a3879c2711d7dd33c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116604
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index cc3eee96f2cd..4ee065ad92aa 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2415,11 +2415,13 @@ class FilterEntriesHandler
 ScAddress aPos(rColumn.GetCol(), nRow, rColumn.GetTab());
 const SvxColorItem* pColor = rColumn.GetDoc()->GetAttr(aPos, 
ATTR_FONT_COLOR);
 Color textColor = pColor->GetValue();
+if (textColor != COL_AUTO)
+mrFilterEntries.addTextColor(textColor);
 
 const SvxBrushItem* pBrush = rColumn.GetDoc()->GetAttr(aPos, 
ATTR_BACKGROUND);
 Color backgroundColor = pBrush->GetColor();
-mrFilterEntries.addTextColor(textColor);
-mrFilterEntries.addBackgroundColor(backgroundColor);
+if (backgroundColor != COL_AUTO)
+mrFilterEntries.addBackgroundColor(backgroundColor);
 
 if (rCell.hasString())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - offapi/com offapi/UnoApi_offapi.mk

2021-06-28 Thread Samuel Mehrbrodt (via logerrit)
 offapi/UnoApi_offapi.mk|2 +-
 offapi/com/sun/star/sheet/FilterFieldType.idl  |   10 +-
 offapi/com/sun/star/sheet/FilterFieldValue.idl |2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 25e8f02f5a6fd32cc31bb14ab34cb1302b89f2b8
Author: Samuel Mehrbrodt 
AuthorDate: Mon May 17 13:19:59 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 10:54:57 2021 +0200

Fix types and order

Change-Id: Icd98c02a3bdc361423f668173bf6feb5f5b11e4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115703
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 5c682a5e24337ac022fb3eba585583b16718d246)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116602
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index c360c7e5f270..250ca702194c 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -3412,8 +3412,8 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/sheet,\
FillDirection \
FillMode \
FilterConnection \
-   FilterFieldValue \
FilterFieldType \
+   FilterFieldValue \
FilterOperator \
FilterOperator2 \
FormulaLanguage \
diff --git a/offapi/com/sun/star/sheet/FilterFieldType.idl 
b/offapi/com/sun/star/sheet/FilterFieldType.idl
index 0a5113c7a075..59a9807379e6 100644
--- a/offapi/com/sun/star/sheet/FilterFieldType.idl
+++ b/offapi/com/sun/star/sheet/FilterFieldType.idl
@@ -18,19 +18,19 @@ module com {  module sun {  module star {  module sheet {
 constants FilterFieldType
 {
/** Filter by numeric value */
-   const short NUMERIC = 0;
+   const long NUMERIC = 0;
 
/** Filter by string value */
-   const short STRING = 1;
+   const long STRING = 1;
 
/** Filter by date */
-   const short DATE = 2;
+   const long DATE = 2;
 
/** Filter by text color */
-   const short TEXT_COLOR = 3;
+   const long TEXT_COLOR = 3;
 
/** Filter by background color */
-   const short BACKGROUND_COLOR = 4;
+   const long BACKGROUND_COLOR = 4;
 };
 
 }; }; }; };
diff --git a/offapi/com/sun/star/sheet/FilterFieldValue.idl 
b/offapi/com/sun/star/sheet/FilterFieldValue.idl
index 12e9b8ba62e8..a8930ee0f6ac 100644
--- a/offapi/com/sun/star/sheet/FilterFieldValue.idl
+++ b/offapi/com/sun/star/sheet/FilterFieldValue.idl
@@ -45,7 +45,7 @@ struct FilterFieldValue
 @see com::sun::star::sheet::FilterFieldType
 @since LibreOffice 7.2
  */
-short FilterType;
+long FilterType;
 
 /** The color which is used for filtering
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - offapi/com offapi/UnoApi_offapi.mk sc/source

2021-06-28 Thread Samuel Mehrbrodt (via logerrit)
 offapi/UnoApi_offapi.mk|1 
 offapi/com/sun/star/sheet/FilterFieldType.idl  |   40 +
 offapi/com/sun/star/sheet/FilterFieldValue.idl |   24 
 sc/source/filter/inc/autofilterbuffer.hxx  |   23 +++
 sc/source/filter/oox/autofilterbuffer.cxx  |   74 +++--
 sc/source/filter/oox/autofiltercontext.cxx |5 +
 sc/source/ui/unoobj/datauno.cxx|   26 
 7 files changed, 189 insertions(+), 4 deletions(-)

New commits:
commit 594989639f120ed058cfc2bd5defc161ad67d474
Author: Samuel Mehrbrodt 
AuthorDate: Thu May 6 09:12:05 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 10:54:22 2021 +0200

tdf#76258 Add OOXML import for color filter

Change-Id: I74cf4f56e0adf1cb8af8e6e932c14b30cce67c71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115168
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 3c8b248b5a7395b174fc265e3237bd79aeb2455f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116600
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 12ab8e2057e9..c360c7e5f270 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -3413,6 +3413,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/sheet,\
FillMode \
FilterConnection \
FilterFieldValue \
+   FilterFieldType \
FilterOperator \
FilterOperator2 \
FormulaLanguage \
diff --git a/offapi/com/sun/star/sheet/FilterFieldType.idl 
b/offapi/com/sun/star/sheet/FilterFieldType.idl
new file mode 100644
index ..0a5113c7a075
--- /dev/null
+++ b/offapi/com/sun/star/sheet/FilterFieldType.idl
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __com_sun_star_sheet_FilterFieldType_idl__
+#define __com_sun_star_sheet_FilterFieldType_idl__
+
+module com {  module sun {  module star {  module sheet {
+
+/**
+ * @since LibreOffice 7.2
+ */
+constants FilterFieldType
+{
+   /** Filter by numeric value */
+   const short NUMERIC = 0;
+
+   /** Filter by string value */
+   const short STRING = 1;
+
+   /** Filter by date */
+   const short DATE = 2;
+
+   /** Filter by text color */
+   const short TEXT_COLOR = 3;
+
+   /** Filter by background color */
+   const short BACKGROUND_COLOR = 4;
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sheet/FilterFieldValue.idl 
b/offapi/com/sun/star/sheet/FilterFieldValue.idl
index 5d1b40837476..12e9b8ba62e8 100644
--- a/offapi/com/sun/star/sheet/FilterFieldValue.idl
+++ b/offapi/com/sun/star/sheet/FilterFieldValue.idl
@@ -19,6 +19,8 @@ struct FilterFieldValue
 {
 /** selects whether the TableFilterFieldValue::NumericValue
 or the TableFilterFieldValue::StringValue is used.
+
+@deprecated - Use FilterType instead.
  */
 boolean IsNumeric;
 
@@ -29,6 +31,28 @@ struct FilterFieldValue
 /** specifies a string value for the condition.
  */
 string StringValue;
+
+/** Which field should be used for filtering:
+
+
+com::sun::star::sheet::FilterFieldType::NUMERIC -> 
NumericValue
+com::sun::star::sheet::FilterFieldType::STRING -> 
StringValue
+com::sun::star::sheet::FilterFieldType::DATE -> 
StringValue
+com::sun::star::sheet::FilterFieldType::TEXT_COLOR -> 
ColorValue
+com::sun::star::sheet::FilterFieldType::BACKGROUND_COLOR -> 
ColorValue
+
+
+@see com::sun::star::sheet::FilterFieldType
+@since LibreOffice 7.2
+ */
+short FilterType;
+
+/** The color which is used for filtering
+
+@since LibreOffice 7.2
+ */
+com::sun::star::util::Color ColorValue;
+
 };
 
 }; }; }; };
diff --git a/sc/source/filter/inc/autofilterbuffer.hxx 
b/sc/source/filter/inc/autofilterbuffer.hxx
index ae8e8b4fa2a0..cf3593de5e63 100644
--- a/sc/source/filter/inc/autofilterbuffer.hxx
+++ b/sc/source/filter/inc/autofilterbuffer.hxx
@@ -24,6 +24,7 @@
 #include 
 #include "workbookhelper.hxx"
 #include 
+#include 
 
 namespace com { namespace sun { namespace star {
 namespace sheet { class XDatabaseRange; }
@@ -49,6 +50,7 @@ struct ApiFilterSettings
 void appendField( bool bAnd, sal_Int32 nOperator, double fValue );
 void appendField( bool bAnd, sal_Int32 nOperator, const OUString& rValue );
 void appendField( bool bAnd, const std::vector& rValues );
+void appendField( bool bAnd, css::util::Color aColor, bool 
bIsBackgroundColor );
 };
 
 /** Base class for specif

[Libreoffice-commits] core.git: basegfx/source basic/source canvas/source chart2/source compilerplugins/clang connectivity/source cppu/source cui/source dbaccess/source desktop/source desktop/unx edit

2021-06-28 Thread Noel Grandin (via logerrit)
 basegfx/source/polygon/b2dlinegeometry.cxx  |8 
 basic/source/classes/sbunoobj.cxx   |4 
 basic/source/comp/scanner.cxx   |2 
 basic/source/runtime/methods.cxx|   16 
 canvas/source/opengl/ogl_canvascustomsprite.cxx |2 
 chart2/source/controller/dialogs/DataBrowser.cxx|8 
 chart2/source/tools/ChartTypeHelper.cxx |2 
 compilerplugins/clang/indentation.cxx   |  140 +
 compilerplugins/clang/test/indentation.cxx  |   10 
 connectivity/source/drivers/evoab2/NCatalog.cxx |5 
 connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx|   24 
 connectivity/source/parse/sqlnode.cxx   |2 
 cppu/source/typelib/typelib.cxx |2 
 cui/source/dialogs/cuigaldlg.cxx|2 
 cui/source/options/optdict.cxx  |2 
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx  |   20 
 dbaccess/source/core/dataaccess/documentcontainer.cxx   |2 
 dbaccess/source/core/dataaccess/documentdefinition.cxx  |2 
 dbaccess/source/ui/browser/formadapter.cxx  |4 
 dbaccess/source/ui/browser/sbagrid.cxx  |  121 ++--
 dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx|2 
 desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx|2 
 desktop/source/deployment/misc/dp_misc.cxx  |2 
 desktop/source/deployment/registry/executable/dp_executable.cxx |2 
 desktop/source/deployment/registry/package/dp_package.cxx   |2 
 desktop/unx/source/start.c  |2 
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |2 
 editeng/source/editeng/impedit4.cxx |5 
 editeng/source/misc/svxacorr.cxx|2 
 filter/source/msfilter/msvbahelper.cxx  |   18 
 filter/source/msfilter/svdfppt.cxx  |2 
 filter/source/odfflatxml/OdfFlatXml.cxx |   46 -
 filter/source/svg/svgwriter.cxx |   18 
 filter/source/xsltdialog/xmlfiltertestdialog.cxx|8 
 filter/source/xsltfilter/LibXSLTTransformer.cxx |6 
 filter/source/xsltfilter/XSLTFilter.cxx |  100 ++--
 formula/source/core/api/token.cxx   |4 
 fpicker/source/office/iodlg.cxx |2 
 framework/source/jobs/jobdata.cxx   |8 
 framework/source/layoutmanager/layoutmanager.cxx|4 
 framework/source/recording/dispatchrecorder.cxx |9 
 hwpfilter/source/drawing.h  |2 
 hwpfilter/source/hcode.cxx  |   18 
 hwpfilter/source/hiodev.cxx |2 
 hwpfilter/source/hwpfile.cxx|2 
 hwpfilter/source/hwpread.cxx|   46 -
 hwpfilter/source/hwpreader.cxx  |   13 
 hwpfilter/source/lexer.cxx  |  102 ++--
 i18npool/source/breakiterator/breakiterator_th.cxx  |   20 
 i18npool/source/breakiterator/breakiterator_unicode.cxx |  244 
+-
 i18npool/source/localedata/LocaleNode.cxx   |5 
 i18nutil/source/utility/widthfolding.cxx|  140 ++---
 idl/source/objects/object.cxx   |4 
 idlc/source/astscope.cxx|2 
 l10ntools/source/cfgmerge.cxx   |2 
 l10ntools/source/helpmerge.cxx  |2 
 l10ntools/source/xrmmerge.cxx   |2 
 lotuswordpro/source/filter/lwppara.cxx  |   18 
 oox/source/export/chartexport.cxx   |2 
 oox/source/ppt/pptshapecontext.cxx  |6 
 reportdesign/source/ui/report/ReportController.cxx  |2 
 sal/osl/all/log.cxx |   32 -
 sal/osl/unx/file_stat.cxx   |   10 
 sal/qa/osl/file/osl_File.cxx|2 
 sc/qa/extras/check_data_pilot_table.cxx |2 
 sc/source/core/data/documen2.cxx|2 
 sc/source/core/data/postit.cxx  |4 
 sc/source/core/data/table1.cxx  |4 

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - oox/source sd/qa

2021-06-28 Thread Tibor Nagy (via logerrit)
 oox/source/ppt/pptshape.cxx |   25 -
 sd/qa/unit/import-tests.cxx |4 ++--
 2 files changed, 18 insertions(+), 11 deletions(-)

New commits:
commit 65070087508f176a2a65a0cfbe628ab2994e824f
Author: Tibor Nagy 
AuthorDate: Wed Jun 16 11:02:48 2021 +0200
Commit: László Németh 
CommitDate: Mon Jun 28 10:41:09 2021 +0200

tdf#142646 PPTX import: count repeating slide names

instead of using the default slide name "Slide n".

PPTX slides are named after their titles. Now repeating
titles got a number instead of using the default slide
name "Slide n". E.g. "Title", "Title", "Title" will be
slide names "Title", "Title (2)", Title (3)", and not
"Title", "Slide 2", "Slide 3".

Follow-up to commit I98511c3c9a59598ea113e7387db5202d7f8a7cd4
"tdf#103347: PTX import: fix duplicated slide name"

Change-Id: I449d6f7d7599291b3dae7df65ad6ff86a4269fb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117317
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 253bee65bc24d999c3629a4d503d0fa01b355cfc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117972
Tested-by: Jenkins

diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 1756ad9e32ab..563454aaaf66 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -339,6 +339,7 @@ void PPTShape::addShape(
 {
 try
 {
+sal_Int32 nCount = 1;
 OUString aTitleText;
 Reference xText(xShape, UNO_QUERY_THROW);
 aTitleText = xText->getString();
@@ -349,17 +350,23 @@ void PPTShape::addShape(
   // just a magic value, but we don't want to set 
slide names which are too long
   aTitleText.getLength() < 64;
 // check duplicated title name
-for (sal_uInt32 nPage = 0; bUseTitleAsSlideName && nPage < 
nMaxPages; ++nPage)
-{
-Reference 
xDrawPage(xDrawPages->getByIndex(nPage), uno::UNO_QUERY);
-Reference xNamed(xDrawPage, 
UNO_QUERY_THROW);
-if ( xNamed->getName() == aTitleText )
-bUseTitleAsSlideName = false;
-}
-if ( bUseTitleAsSlideName )
+if (bUseTitleAsSlideName)
 {
+for (sal_uInt32 nPage = 0; nPage < nMaxPages; ++nPage)
+{
+Reference 
xDrawPage(xDrawPages->getByIndex(nPage), uno::UNO_QUERY);
+Reference xNamed(xDrawPage, 
UNO_QUERY_THROW);
+OUString sRest;
+if (xNamed->getName().startsWith(aTitleText, 
&sRest)
+&& (sRest.isEmpty()
+|| (sRest.startsWith(" (") && 
sRest.endsWith(")")
+&& sRest.copy(2, sRest.getLength() - 
3).toInt32() > 0)))
+nCount++;
+}
 Reference 
xName(rSlidePersist.getPage(), UNO_QUERY_THROW);
-xName->setName(aTitleText);
+xName->setName(
+aTitleText
++ (nCount == 1 ? OUString("") : " (" + 
OUString::number(nCount) + ")"));
 }
 }
 catch (uno::Exception&)
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 8d7b5333f720..ad013f280180 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -3449,11 +3449,11 @@ void SdImportTest::testTdf103347()
 
 uno::Reference 
xPage2(xDoc->getDrawPages()->getByIndex(1), uno::UNO_QUERY);
 uno::Reference xNamed2(xPage2, uno::UNO_QUERY_THROW);
-CPPUNIT_ASSERT_EQUAL(OUString("page2"), xNamed2->getName());
+CPPUNIT_ASSERT_EQUAL(OUString("Hello (2)"), xNamed2->getName());
 
 uno::Reference 
xPage3(xDoc->getDrawPages()->getByIndex(2), uno::UNO_QUERY);
 uno::Reference xNamed3(xPage3, uno::UNO_QUERY_THROW);
-CPPUNIT_ASSERT_EQUAL(OUString("page3"), xNamed3->getName());
+CPPUNIT_ASSERT_EQUAL(OUString("Hello (3)"), xNamed3->getName());
 
 xDocShRef->DoClose();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSoC - Weekly Report - #3 - Table styles

2021-06-28 Thread Balázs Sántha
Dear Community!

Last week I was working on a problem, which causes the loss of table style
when copying a table, or drag&drop it. Drag&Drop is working with copying
and after pasting the table. Found two interesting functions, which are
called during these operations, but couldn't solve the problem yet. I
started to extend the SwAttrSet too, because if this tablestyle name
property would be supported, copying the tables' attributes (which are
already done) would copy this property too. My mentor suggested, to search
for a simpler solution, which would get the information through the
position of the node/table. This week I will work on this too.
Furthermore, I worked on to be able to build Alex Ivan's branch, got some
improvements, but run into a problem that my gcc is probably too new, so I
wanted to install an older gcc (4.8.5), but because found no repository for
this, had to compile+build for myself. This havent succeeded yet, because
the build got errors again. I searched numerous hours to solve that without
success, so I plan to write to this list, maybe someone could help me with
this.
Furthermore I did some tests, about the optimization of the current import
of table styles. Until this, the "ApplyParagraphPropertiesFromTablestyles"
function was the main focus, but the test docx documents didn't verify
this. (found out, the test documents had no table styles applied on tables,
so the perf issue comes from something else this case). This week I plan to
finish this tests, and with the help of my mentor, based on this results,
continue the work!

If you have any questions, ideas, thoughts or suggestions, please share
with me!

Regards,
Balázs Sántha, santhab
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - framework/source

2021-06-28 Thread Mike Kaganski (via logerrit)
 framework/source/uielement/toolbarmanager.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit e51ad28ba22105c60be246f02e7951b986f35150
Author: Mike Kaganski 
AuthorDate: Thu Jun 24 16:02:02 2021 +0300
Commit: Xisco Fauli 
CommitDate: Mon Jun 28 10:18:14 2021 +0200

tdf#143047: When no properties for command, use those from item container

This allows to use the "Label" property defined by user for macro
items, that indeed have no built-in command properties. Thus the
resulting tooltip will be a concatenation of the label and mnemonic
instead of only mnemonic as happened before.

Change-Id: I79d933fecd09ca7d64b7a3e7db0ef194e42c1c55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117787
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 8383175bd3c714c163eac40a00b1e8277d4d5307)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117857
Reviewed-by: Xisco Fauli 

diff --git a/framework/source/uielement/toolbarmanager.cxx 
b/framework/source/uielement/toolbarmanager.cxx
index 53d456f235c5..69dcd3d7a158 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1014,6 +1014,8 @@ void ToolBarManager::FillToolbar( const Reference< 
XIndexAccess >& rItemContaine
 if (( nType == css::ui::ItemType::DEFAULT ) && 
!aCommandURL.isEmpty() )
 {
 auto aProperties = 
vcl::CommandInfoProvider::GetCommandProperties(aCommandURL, 
m_aModuleIdentifier);
+if (!aProperties.hasElements()) // E.g., user-provided 
macro command?
+aProperties = aProps; // Use existing info, including 
user-provided Label
 OUString 
aString(vcl::CommandInfoProvider::GetLabelForCommand(aProperties));
 
 ToolBoxItemBits nItemBits = ConvertStyleToToolboxItemBits( 
nStyle );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - framework/source

2021-06-28 Thread Mike Kaganski (via logerrit)
 framework/source/uielement/toolbarmanager.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit caa0bccff18c2a6b67b97a3617109bdd7455dd2a
Author: Mike Kaganski 
AuthorDate: Thu Jun 24 16:02:02 2021 +0300
Commit: Xisco Fauli 
CommitDate: Mon Jun 28 10:17:50 2021 +0200

tdf#143047: When no properties for command, use those from item container

This allows to use the "Label" property defined by user for macro
items, that indeed have no built-in command properties. Thus the
resulting tooltip will be a concatenation of the label and mnemonic
instead of only mnemonic as happened before.

Change-Id: I79d933fecd09ca7d64b7a3e7db0ef194e42c1c55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117787
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 8383175bd3c714c163eac40a00b1e8277d4d5307)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117856
Reviewed-by: Xisco Fauli 

diff --git a/framework/source/uielement/toolbarmanager.cxx 
b/framework/source/uielement/toolbarmanager.cxx
index ad52608c5b0c..0bd0d627ff9d 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1416,6 +1416,8 @@ void ToolBarManager::FillToolbar( const Reference< 
XIndexAccess >& rItemContaine
 if (( nType == css::ui::ItemType::DEFAULT ) && 
!aCommandURL.isEmpty() )
 {
 auto aProperties = 
vcl::CommandInfoProvider::GetCommandProperties(aCommandURL, 
m_aModuleIdentifier);
+if (!aProperties.hasElements()) // E.g., user-provided 
macro command?
+aProperties = aProps; // Use existing info, including 
user-provided Label
 OUString 
aString(vcl::CommandInfoProvider::GetLabelForCommand(aProperties));
 
 ToolBoxItemBits nItemBits = ConvertStyleToToolboxItemBits( 
nStyle );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/inc vcl/jsdialog vcl/source

2021-06-28 Thread Szymon Kłos (via logerrit)
 vcl/inc/jsdialog/jsdialogbuilder.hxx |1 +
 vcl/jsdialog/enabled.cxx |8 +++-
 vcl/jsdialog/executor.cxx|6 ++
 vcl/jsdialog/jsdialogbuilder.cxx |   28 +++-
 vcl/source/window/window.cxx |3 +++
 5 files changed, 44 insertions(+), 2 deletions(-)

New commits:
commit a135076e65deb79b8cfc73011d3aebd42b4d4166
Author: Szymon Kłos 
AuthorDate: Fri Jun 25 10:22:15 2021 +0200
Commit: Szymon Kłos 
CommitDate: Mon Jun 28 10:13:02 2021 +0200

jsdialog: handle toolbox menus toggling

Change-Id: I85881531f041cbd5402ac8de2a96b2c7150cbba8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117839
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index fdd952f93968..c8282783b3e3 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -564,6 +564,7 @@ public:
   bool bTakeOwnership);
 
 virtual void set_menu_item_active(const OString& rIdent, bool bActive) 
override;
+virtual void set_item_sensitive(const OString& rIdent, bool bSensitive) 
override;
 };
 
 class JSTextView : public JSWidget
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index fbb111f59289..dfadee95019c 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -62,7 +62,13 @@ bool isBuilderEnabled(const OUString& rUIFile, bool bMobile)
 
 bool isBuilderEnabledForPopup(const OUString& rUIFile)
 {
-if (rUIFile == "svx/ui/colorwindow.ui" || rUIFile == 
"modules/scalc/ui/floatinglinestyle.ui")
+if (rUIFile == "svx/ui/colorwindow.ui" || rUIFile == 
"modules/scalc/ui/floatinglinestyle.ui"
+|| rUIFile == "svx/ui/textcharacterspacingcontrol.ui"
+|| rUIFile == "svx/ui/currencywindow.ui"
+|| rUIFile == "modules/scalc/ui/floatingborderstyle.ui"
+|| rUIFile == "svx/ui/textunderlinecontrol.ui" || rUIFile == 
"svx/ui/numberingwindow.ui"
+|| rUIFile == "svx/ui/paralinespacingcontrol.ui"
+|| rUIFile == "svx/ui/floatinglineproperty.ui" || rUIFile == 
"svx/ui/floatinglinestyle.ui")
 return true;
 
 return false;
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 28148b0f1578..bddf849d503f 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -236,6 +236,12 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 *pToolbar, OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US));
 return true;
 }
+else if (sAction == "togglemenu")
+{
+pToolbar->set_menu_item_active(
+OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US), true);
+return true;
+}
 }
 }
 else if (sControlType == "edit")
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index c58eaf00e3fd..7e42f40f421c 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -306,11 +306,16 @@ void JSDialogNotifyIdle::clearQueue() { 
m_aMessageQueue.clear(); }
 JSDialogSender::~JSDialogSender()
 {
 sendClose();
-mpIdleNotify->Stop();
+
+if (mpIdleNotify)
+mpIdleNotify->Stop();
 }
 
 void JSDialogSender::sendFullUpdate(bool bForce)
 {
+if (!mpIdleNotify)
+return;
+
 if (bForce)
 mpIdleNotify->forceUpdate();
 
@@ -320,6 +325,9 @@ void JSDialogSender::sendFullUpdate(bool bForce)
 
 void JSDialogSender::sendClose()
 {
+if (!mpIdleNotify)
+return;
+
 mpIdleNotify->clearQueue();
 mpIdleNotify->sendMessage(jsdialog::MessageType::Close, nullptr);
 flush();
@@ -327,6 +335,9 @@ void JSDialogSender::sendClose()
 
 void JSDialogSender::sendUpdate(VclPtr pWindow, bool bForce)
 {
+if (!mpIdleNotify)
+return;
+
 if (bForce)
 mpIdleNotify->forceUpdate();
 
@@ -336,12 +347,18 @@ void JSDialogSender::sendUpdate(VclPtr 
pWindow, bool bForce)
 
 void JSDialogSender::sendAction(VclPtr pWindow, 
std::unique_ptr pData)
 {
+if (!mpIdleNotify)
+return;
+
 mpIdleNotify->sendMessage(jsdialog::MessageType::Action, pWindow, 
std::move(pData));
 mpIdleNotify->Start();
 }
 
 void JSDialogSender::sendPopup(VclPtr pWindow, OUString 
sParentId, OUString sCloseId)
 {
+if (!mpIdleNotify)
+return;
+
 std::unique_ptr pData = std::make_unique();
 (*pData)[PARENT_ID] = sParentId;
 (*pData)[CLOSE_ID] = sCloseId;
@@ -351,6 +368,9 @@ void JSDialogSender::sendPopup(VclPtr pWindow, 
OUString sParentId,
 
 void JSDialogSender::sendClosePopup(vcl::LOKWindowId nWindowId)
 {
+if (!mpIdleNotify)
+return;
+
 std::unique_ptr pData = std::make_unique();
 (*pData)[WINDOW_ID] = OUString::number(nWindowId);
 mpIdleNot

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/vcl vcl/inc vcl/jsdialog vcl/source

2021-06-28 Thread Szymon Kłos (via logerrit)
 include/vcl/menubtn.hxx  |3 
 vcl/inc/jsdialog/jsdialogbuilder.hxx |   35 -
 vcl/inc/salvtables.hxx   |4 -
 vcl/jsdialog/enabled.cxx |2 
 vcl/jsdialog/jsdialogbuilder.cxx |  132 ---
 vcl/source/control/menubtn.cxx   |   17 
 vcl/source/window/toolbox2.cxx   |8 +-
 7 files changed, 166 insertions(+), 35 deletions(-)

New commits:
commit 59812ab6f584173596a4ec96cc29d5f0fa3b561f
Author: Szymon Kłos 
AuthorDate: Thu Jun 24 14:31:45 2021 +0200
Commit: Szymon Kłos 
CommitDate: Mon Jun 28 10:12:48 2021 +0200

jsdialog: toolbox popups

unify menubutton popups and toolbox dropdowns

Change-Id: I61c0c33a17d96f03d6513507bda6d5c8edbc55dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117786
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/include/vcl/menubtn.hxx b/include/vcl/menubtn.hxx
index 8e7c259221c5..ccbd23a041f8 100644
--- a/include/vcl/menubtn.hxx
+++ b/include/vcl/menubtn.hxx
@@ -79,6 +79,7 @@ public:
 PopupMenu*  GetPopupMenu() const { return mpMenu; }
 
 voidSetPopover(Window* pWindow);
+Window* GetPopover() { return mpFloatingWindow.get(); }
 
 OString const & GetCurItemIdent() const { return msCurItemIdent; }
 
@@ -89,8 +90,6 @@ public:
 
 void SetCurItemId();
 
-void DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) override;
-
 };
 
 #endif // INCLUDED_VCL_MENUBTN_HXX
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 4e6324a15fcb..fdd952f93968 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -9,9 +9,10 @@
 
 #pragma once
 
+#include 
+#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -28,6 +29,9 @@
 #include 
 
 #define ACTION_TYPE "action_type"
+#define PARENT_ID "parent_id"
+#define WINDOW_ID "id"
+#define CLOSE_ID "close_id"
 
 class ToolBox;
 class ComboBox;
@@ -45,7 +49,8 @@ enum MessageType
 FullUpdate,
 WidgetUpdate,
 Close,
-Action
+Action,
+Popup
 };
 }
 
@@ -101,6 +106,7 @@ class JSDialogNotifyIdle : public Idle
 bool m_bForce;
 
 std::deque m_aMessageQueue;
+osl::Mutex m_aQueueMutex;
 
 public:
 JSDialogNotifyIdle(VclPtr aNotifierWindow, 
VclPtr aContentWindow,
@@ -120,6 +126,9 @@ private:
 std::unique_ptr generateCloseMessage() const;
 std::unique_ptr
 generateActionMessage(VclPtr pWindow, 
std::unique_ptr pData) const;
+std::unique_ptr
+generatePopupMessage(VclPtr pWindow, OUString sParentId, 
OUString sCloseId) const;
+std::unique_ptr generateClosePopupMessage(OUString 
sWindowId) const;
 };
 
 class JSDialogSender
@@ -140,6 +149,8 @@ public:
 void sendClose();
 virtual void sendUpdate(VclPtr pWindow, bool bForce = false);
 virtual void sendAction(VclPtr pWindow, 
std::unique_ptr pData);
+virtual void sendPopup(VclPtr pWindow, OUString sParentId, 
OUString sCloseId);
+virtual void sendClosePopup(vcl::LOKWindowId nWindowId);
 void flush() { mpIdleNotify->Invoke(); }
 
 protected:
@@ -287,6 +298,10 @@ public:
 virtual void sendFullUpdate(bool bForce = false) = 0;
 
 virtual void sendAction(std::unique_ptr pData) = 0;
+
+virtual void sendPopup(vcl::Window* pPopup, OUString sParentId, OUString 
sCloseId) = 0;
+
+virtual void sendClosePopup(vcl::LOKWindowId nWindowId) = 0;
 };
 
 template 
@@ -394,6 +409,18 @@ public:
 if (!m_bIsFreezed && m_pSender && pData)
 m_pSender->sendAction(BaseInstanceClass::m_xWidget, 
std::move(pData));
 }
+
+virtual void sendPopup(vcl::Window* pPopup, OUString sParentId, OUString 
sCloseId) override
+{
+if (!m_bIsFreezed && m_pSender)
+m_pSender->sendPopup(pPopup, sParentId, sCloseId);
+}
+
+virtual void sendClosePopup(vcl::LOKWindowId nWindowId) override
+{
+if (!m_bIsFreezed && m_pSender)
+m_pSender->sendClosePopup(nWindowId);
+}
 };
 
 class JSDialog : public JSWidget
@@ -530,9 +557,13 @@ public:
 
 class JSToolbar : public JSWidget
 {
+std::map m_pPopovers;
+
 public:
 JSToolbar(JSDialogSender* pSender, ::ToolBox* pToolbox, 
SalInstanceBuilder* pBuilder,
   bool bTakeOwnership);
+
+virtual void set_menu_item_active(const OString& rIdent, bool bActive) 
override;
 };
 
 class JSTextView : public JSWidget
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 0a7299af56bf..bbe49cdc0dd4 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1172,7 +1172,7 @@ public:
 
 class SalInstanceToolbar : public SalInstanceWidget, public virtual 
weld::Toolbar
 {
-private:
+protected:
 VclPtr m_xToolBox;
 std::map> m_aFloats;
 std::map> m_aMenus;
@@ -1815,7 +1815,7 @@ public:
 
 class SalInstanceMenuButton : public SalInstanceButton, public virtual 
weld::MenuButton
 {
-private:

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 2 commits - include/vcl svx/source vcl/jsdialog

2021-06-28 Thread Szymon Kłos (via logerrit)
 include/vcl/jsdialog/executor.hxx |2 ++
 include/vcl/weld.hxx  |2 ++
 svx/source/tbxctrls/tbcontrl.cxx  |6 +-
 vcl/jsdialog/executor.cxx |   12 
 vcl/jsdialog/jsdialogbuilder.cxx  |8 ++--
 5 files changed, 27 insertions(+), 3 deletions(-)

New commits:
commit 111ad7f47e4512b2d9efeda058f601bd4b61a861
Author: Szymon Kłos 
AuthorDate: Mon Jun 21 17:21:11 2021 +0200
Commit: Szymon Kłos 
CommitDate: Mon Jun 28 10:12:33 2021 +0200

Don't steal focus from popup in online

To avoid closing the popup when it is first time activated.

Change-Id: I23abd691ecc271b46f1bfba041f247208200ba7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117595
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 445e557bb57e..8f8055352695 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3849,7 +3849,11 @@ 
ColorListBox::ColorListBox(std::unique_ptr pControl, weld::Win
 IMPL_LINK(ColorListBox, ToggleHdl, weld::ToggleButton&, rButton, void)
 {
 if (rButton.get_active())
-getColorWindow()->GrabFocus();
+{
+ColorWindow* pColorWindow = getColorWindow();
+if (pColorWindow && !comphelper::LibreOfficeKit::isActive())
+pColorWindow->GrabFocus();
+}
 }
 
 ColorListBox::~ColorListBox()
commit 653c2ff3e76e8f83d39d6e0f034aa7834ac7a7c1
Author: Szymon Kłos 
AuthorDate: Thu Jun 17 11:50:26 2021 +0200
Commit: Szymon Kłos 
CommitDate: Mon Jun 28 10:12:19 2021 +0200

jsdialog: handle popover close

Change-Id: I8b5afe7438c57cfe0553475131bed1e3c4921f46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117373
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/include/vcl/jsdialog/executor.hxx 
b/include/vcl/jsdialog/executor.hxx
index 713afaff9082..46455e985735 100644
--- a/include/vcl/jsdialog/executor.hxx
+++ b/include/vcl/jsdialog/executor.hxx
@@ -54,6 +54,8 @@ public:
 {
 rSpinButton.signal_value_changed();
 }
+
+static void trigger_closed(weld::Popover& rPopover) { 
rPopover.signal_closed(); }
 };
 
 namespace jsdialog
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index c3d335db3f7f..70d91ee6ca96 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -2257,6 +2257,8 @@ public:
 
 class VCL_DLLPUBLIC Popover : virtual public Container
 {
+friend class ::LOKTrigger;
+
 private:
 Link m_aCloseHdl;
 
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 9cce1546c77f..28148b0f1578 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -402,6 +402,18 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 }
 }
 }
+else if (sControlType == "popover")
+{
+auto pPopover = dynamic_cast(pWidget);
+if (pPopover)
+{
+if (sAction == "close")
+{
+LOKTrigger::trigger_closed(*pPopover);
+return true;
+}
+}
+}
 else if (sControlType == "radiobutton")
 {
 auto pRadioButton = dynamic_cast(pWidget);
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 5fb8ea82539e..3dbbe8160976 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -909,7 +909,7 @@ std::unique_ptr 
JSInstanceBuilder::weld_menu_button(const OStr
 std::unique_ptr JSInstanceBuilder::weld_popover(const OString& 
id)
 {
 DockingWindow* pDockingWindow = m_xBuilder->get(id);
-std::unique_ptr pRet(
+std::unique_ptr pWeldWidget(
 pDockingWindow ? new JSPopover(this, pDockingWindow, this, false) : 
nullptr);
 if (pDockingWindow)
 {
@@ -927,7 +927,11 @@ std::unique_ptr 
JSInstanceBuilder::weld_popover(const OString& id
 initializeSender(GetNotifierWindow(), GetContentWindow(), 
GetTypeOfJSON());
 }
 }
-return pRet;
+
+if (pWeldWidget)
+RememberWidget("__POPOVER__", pWeldWidget.get());
+
+return pWeldWidget;
 }
 
 weld::MessageDialog* JSInstanceBuilder::CreateMessageDialog(weld::Widget* 
pParent,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/vcl vcl/inc vcl/jsdialog vcl/source

2021-06-28 Thread Szymon Kłos (via logerrit)
 include/vcl/menubtn.hxx  |2 +
 vcl/inc/jsdialog/enabled.hxx |1 
 vcl/inc/jsdialog/jsdialogbuilder.hxx |   18 +-
 vcl/jsdialog/enabled.cxx |   10 +
 vcl/jsdialog/executor.cxx|   20 +++
 vcl/jsdialog/jsdialogbuilder.cxx |   59 ++-
 vcl/source/control/menubtn.cxx   |   18 ++
 vcl/source/window/builder.cxx|4 +-
 8 files changed, 128 insertions(+), 4 deletions(-)

New commits:
commit dcbecb4b7bc3e0ec2d64f003d732d0ac0c9d7903
Author: Szymon Kłos 
AuthorDate: Tue Jun 15 13:10:00 2021 +0200
Commit: Szymon Kłos 
CommitDate: Mon Jun 28 10:11:57 2021 +0200

jsdialog: dump and activate popup windows

Change-Id: I4eb49a81d12ac37f50c6595eeec6d472fdbe6d82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117251
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/include/vcl/menubtn.hxx b/include/vcl/menubtn.hxx
index f32270161b8d..8e7c259221c5 100644
--- a/include/vcl/menubtn.hxx
+++ b/include/vcl/menubtn.hxx
@@ -89,6 +89,8 @@ public:
 
 void SetCurItemId();
 
+void DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) override;
+
 };
 
 #endif // INCLUDED_VCL_MENUBTN_HXX
diff --git a/vcl/inc/jsdialog/enabled.hxx b/vcl/inc/jsdialog/enabled.hxx
index 1b2ec56ce84e..fec96f1f34a6 100644
--- a/vcl/inc/jsdialog/enabled.hxx
+++ b/vcl/inc/jsdialog/enabled.hxx
@@ -14,6 +14,7 @@
 namespace jsdialog
 {
 bool isBuilderEnabled(const OUString& rUIFile, bool bMobile);
+bool isBuilderEnabledForPopup(const OUString& rUIFile);
 bool isBuilderEnabledForSidebar(const OUString& rUIFile);
 bool isInterimBuilderEnabledForNotebookbar(const OUString& rUIFile);
 }
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 7594edbdc1ed..4e6324a15fcb 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -194,6 +194,8 @@ class JSInstanceBuilder : public SalInstanceBuilder, public 
JSDialogSender
 std::string m_sTypeOfJSON;
 bool m_bHasTopLevelDialog;
 bool m_bIsNotebookbar;
+/// When LOKNotifier is set by jsdialogs code we need to release it
+VclPtr m_aWindowToRelease;
 
 friend VCL_DLLPUBLIC bool jsdialog::ExecuteAction(sal_uInt64 nWindowId, 
const OString& rWidget,
   StringMap& rData);
@@ -205,8 +207,9 @@ class JSInstanceBuilder : public SalInstanceBuilder, public 
JSDialogSender
 void RememberWidget(const OString& id, weld::Widget* pWidget);
 static weld::Widget* FindWeldWidgetsMap(sal_uInt64 nWindowId, const 
OString& rWidget);
 
-/// used for dialogs
-JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIRoot, const 
OUString& rUIFile);
+/// used for dialogs or popups
+JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIRoot, const 
OUString& rUIFile,
+  bool bPopup = false);
 /// used for sidebar panels
 JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIRoot, const 
OUString& rUIFile,
   sal_uInt64 nLOKWindowId);
@@ -230,6 +233,8 @@ public:
 static JSInstanceBuilder* CreateSidebarBuilder(weld::Widget* pParent, 
const OUString& rUIRoot,
const OUString& rUIFile,
sal_uInt64 nLOKWindowId = 
0);
+static JSInstanceBuilder* CreatePopupBuilder(weld::Widget* pParent, const 
OUString& rUIRoot,
+ const OUString& rUIFile);
 
 virtual ~JSInstanceBuilder() override;
 virtual std::unique_ptr weld_message_dialog(const 
OString& id) override;
@@ -254,6 +259,7 @@ public:
 virtual std::unique_ptr weld_radio_button(const 
OString& id) override;
 virtual std::unique_ptr weld_frame(const OString& id) 
override;
 virtual std::unique_ptr weld_menu_button(const OString& 
id) override;
+virtual std::unique_ptr weld_popover(const OString& id) 
override;
 
 static weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent,
 VclMessageType 
eMessageType,
@@ -626,6 +632,14 @@ public:
 virtual void set_label(const OUString& rText) override;
 virtual void set_image(VirtualDevice* pDevice) override;
 virtual void set_image(const css::uno::Reference& 
rImage) override;
+virtual void set_active(bool active) override;
+};
+
+class JSPopover : public JSWidget
+{
+public:
+JSPopover(JSDialogSender* pSender, DockingWindow* pPopover, 
SalInstanceBuilder* pBuilder,
+  bool bTakeOwnership);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index da0174c81a8f..92f29674d00e 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -13,6 +13,7 @@ namesp

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sc/source

2021-06-28 Thread Andreas Heinisch (via logerrit)
 sc/source/ui/dbgui/scuiasciiopt.cxx |   10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit d043e092d9115629f1394ae0b6c25d899460f127
Author: Andreas Heinisch 
AuthorDate: Thu Jun 24 10:19:16 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Jun 28 10:11:24 2021 +0200

tdf#58250 - Show custom unicode separator in the csv import dialog

Change-Id: I5924ba3c5b0b96a744e2c2e63632b383b371e485
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117766
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 
(cherry picked from commit 8712d2cb78808bd17399605a70862d7920e63c9a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117858
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx 
b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 6757aab5572a..b66403492961 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -644,13 +644,9 @@ void ScImportAsciiDlg::SaveParameters()
 
 void ScImportAsciiDlg::SetSeparators()
 {
-OString sString(OUStringToOString(maFieldSeparators,
-RTL_TEXTENCODING_MS_1252));
-const char *aSep = sString.getStr();
-sal_Int32 len = maFieldSeparators.getLength();
-for (int i = 0; i < len; ++i)
+for (sal_Int32 i = 0; i < maFieldSeparators.getLength(); ++i)
 {
-switch( aSep[i] )
+switch (maFieldSeparators[i])
 {
 case '\t':  mxCkbTab->set_active(true);break;
 case ';':   mxCkbSemicolon->set_active(true);  break;
@@ -658,7 +654,7 @@ void ScImportAsciiDlg::SetSeparators()
 case ' ':   mxCkbSpace->set_active(true);  break;
 default:
 mxCkbOther->set_active(true);
-mxEdOther->set_text(mxEdOther->get_text() + 
OUStringChar(aSep[i]));
+mxEdOther->set_text(mxEdOther->get_text() + 
OUStringChar(maFieldSeparators[i]));
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - basic/qa basic/source

2021-06-28 Thread baltasarq (via logerrit)
 basic/qa/vba_tests/booltypename.vb |   37 +
 basic/source/comp/exprnode.cxx |   14 +++---
 basic/source/comp/symtbl.cxx   |2 ++
 basic/source/inc/filefmt.hxx   |3 +++
 basic/source/runtime/runtime.cxx   |2 ++
 5 files changed, 51 insertions(+), 7 deletions(-)

New commits:
commit e7c5b2412446b4a5158b35745742389186856984
Author: baltasarq 
AuthorDate: Tue Jun 22 12:55:21 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Jun 28 10:09:20 2021 +0200

tdf#142460: properly handle boolean values in string pool

This makes sure that results of comparison of literals have proper boolean 
type,
and that this type is properly stored to/read from the string pool.

This introduces a new non-standard "type" character used in the pool: 'b'. 
It is
not a proper type character used in Basic (unlike '%'/'&'/'!'/'@'), but we 
have
to use this trick locally, because we need to pass the type that has no own 
type
character.

The change should be backward-compatible: older versions reading the value 
should
just ignore the 'b', and read the value as double.

Change-Id: Ibd4a70b366331342346eb171c8ed3c7026279596
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117655
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 5eedb3beeaeed88de0d1ebd041a9f15ceea7e78c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117862
Reviewed-by: Xisco Fauli 

diff --git a/basic/qa/vba_tests/booltypename.vb 
b/basic/qa/vba_tests/booltypename.vb
new file mode 100644
index ..8c1fd17c211b
--- /dev/null
+++ b/basic/qa/vba_tests/booltypename.vb
@@ -0,0 +1,37 @@
+'
+' This file is part of the LibreOffice project.
+'
+' This Source Code Form is subject to the terms of the Mozilla Public
+' License, v. 2.0. If a copy of the MPL was not distributed with this
+' file, You can obtain one at http://mozilla.org/MPL/2.0/.
+'
+
+Option VBASupport 1
+Option Explicit
+
+Function doUnitTest() As String
+TestUtil.TestInit
+verify_testTypeNameBoolean
+doUnitTest = TestUtil.GetResult()
+End Function
+
+Sub verify_testTypeNameBoolean()
+On Error GoTo errorHandler
+
+TestUtil.AssertEqual(TypeName 1>2,   "Boolean",  "TypeName 1>2")
+TestUtil.AssertEqual(TypeName 2.0>1.0,   "Boolean",  "TypeName 2.0>1.0")
+TestUtil.AssertEqual(TypeName "A">"B",   "Boolean",  "TypeName 
""A"">""B""")
+
+TestUtil.AssertEqual(Str(2>1), "True",  "Str(2>1)")
+TestUtil.AssertEqual(Str(1>2), "False", "Str(1>2)")
+
+TestUtil.AssertEqual(Str(2.0>1.0), "True",  "Str(2.0>1.0)")
+TestUtil.AssertEqual(Str(1.0>2.0), "False", "Str(1.0>2.0)")
+
+TestUtil.AssertEqual(Str("B">"A"), "True",  "Str(""B"">""A"")")
+TestUtil.AssertEqual(Str("A">"B"), "False", "Str(""A"">""B"")")
+
+Exit Sub
+errorHandler:
+TestUtil.ReportErrorHandler("verify_testTypeNameBoolean", Err, Error$, Erl)
+End Sub
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx
index 4192ceb8d49d..17bdbca25258 100644
--- a/basic/source/comp/exprnode.cxx
+++ b/basic/source/comp/exprnode.cxx
@@ -262,7 +262,7 @@ void SbiExprNode::FoldConstantsBinaryNode(SbiParser* 
pParser)
 }
 else
 {
-eType = SbxDOUBLE;
+eType = SbxBOOL;
 eNodeType = SbxNUMVAL;
 int eRes = rr.compareTo( rl );
 switch( eTok )
@@ -365,22 +365,22 @@ void SbiExprNode::FoldConstantsBinaryNode(SbiParser* 
pParser)
 nVal = nl - nr; break;
 case EQ:
 nVal = ( nl == nr ) ? SbxTRUE : SbxFALSE;
-eType = SbxINTEGER; break;
+eType = SbxBOOL; break;
 case NE:
 nVal = ( nl != nr ) ? SbxTRUE : SbxFALSE;
-eType = SbxINTEGER; break;
+eType = SbxBOOL; break;
 case LT:
 nVal = ( nl <  nr ) ? SbxTRUE : SbxFALSE;
-eType = SbxINTEGER; break;
+eType = SbxBOOL; break;
 case GT:
 nVal = ( nl >  nr ) ? SbxTRUE : SbxFALSE;
-eType = SbxINTEGER; break;
+eType = SbxBOOL; break;
 case LE:
 nVal = ( nl <= nr ) ? SbxTRUE : SbxFALSE;
-eType = SbxINTEGER; break;
+eType = SbxBOOL; break;
 case GE:
 nVal = ( nl >= nr ) ? SbxTRUE : SbxFALSE;
-eType = SbxINTEGER; break;
+eType = SbxBOOL; break;
 case IDIV:
 if( !lr )
 {
diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx
index d9e7fcae6abc..ed245a364874 100644
--- a/basic/source/comp/symtbl.cxx
+++ b/basic/source/comp/symtbl.cxx
@@ -66,6 +66,8 @@ short SbiStringPool::Add( double n, SbxDataType t )
 char buf[40]{};
 switch( t )
 {
+// tdf#142460 - properly han

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/vcl vcl/source

2021-06-28 Thread merttumer (via logerrit)
 include/vcl/outdev.hxx |2 
 vcl/source/outdev/textline.cxx |  101 +++--
 2 files changed, 100 insertions(+), 3 deletions(-)

New commits:
commit 2cf427b9e986beadc638e40e0819f0526a9a7f93
Author: merttumer 
AuthorDate: Wed Jun 16 21:04:33 2021 +0300
Commit: Michael Meeks 
CommitDate: Mon Jun 28 10:07:35 2021 +0200

Cache a static wavy line as bitmap and reuse it

DrawWaveLine is cpu costly so render it as big as
possible so we can only crop it
Edit:
1) Moved the Cache class to textline.cxx file
as it is local to that
2) Provided a custom hash method for the unordered_map
to avoid double hashing the key. Used boost:hash_combine
for hashing.
3) changed unordered_map to o3tl::lru_map

Change-Id: I0ab191f7bb72ccd5074c78858de9831c1a462b7b
Signed-off-by: merttumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117362
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117967

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index ec40d6f46294..ac5fa932a5b0 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -878,6 +878,8 @@ private:
 SAL_DLLPRIVATE void ImplDrawPolyPolygonWithB2DPolyPolygon(const 
basegfx::B2DPolyPolygon& rB2DPolyPoly);
 ///@}
 
+SAL_DLLPRIVATE void ImplDrawWaveLineBezier(long nStartX, long 
nStartY, long nEndX, long nEndY, long nWaveHeight, double fOrientation, long 
nLineWidth);
+
 
 /** @name Curved shape functions
  */
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 09ee52f6339a..7b1ca2dede0b 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -33,10 +34,70 @@
 
 #include 
 #include 
+#include 
+#include 
 
 #define UNDERLINE_LAST  LINESTYLE_BOLDWAVE
 #define STRIKEOUT_LAST  STRIKEOUT_X
 
+struct WavyLineCache final
+{
+WavyLineCache () : m_aItems( 10 ) {}
+
+bool find( Color aLineColor, size_t nLineWidth, size_t nWaveHeight, size_t 
nWordWidth, BitmapEx& rOutput )
+{
+Key aKey = { nWaveHeight, aLineColor.mValue };
+auto item = m_aItems.find( aKey );
+if ( item == m_aItems.end() )
+return false;
+// needs update
+if ( item->second.m_aLineWidth != nLineWidth || 
item->second.m_aWordWidth < nWordWidth )
+{
+return false;
+}
+rOutput = item->second.m_Bitmap;
+return true;
+}
+
+void insert( const BitmapEx& aBitmap, const Color& aLineColor, const 
size_t nLineWidth, const size_t nWaveHeight, const size_t nWordWidth, BitmapEx& 
rOutput )
+{
+Key aKey = { nWaveHeight, aLineColor.mValue };
+m_aItems.insert( std::pair< Key, WavyLineCacheItem>( aKey, { 
nLineWidth, nWordWidth, aBitmap } ) );
+rOutput = aBitmap;
+}
+
+private:
+struct WavyLineCacheItem
+{
+size_t m_aLineWidth;
+size_t m_aWordWidth;
+BitmapEx m_Bitmap;
+};
+
+struct Key
+{
+size_t m_aFirst;
+size_t m_aSecond;
+bool operator ==( const Key& rOther ) const
+{
+return ( m_aFirst == rOther.m_aFirst && m_aSecond == 
rOther.m_aSecond );
+}
+};
+
+struct Hash
+{
+size_t operator() ( const Key& rKey ) const
+{
+size_t aSeed = 0;
+boost::hash_combine(aSeed, rKey.m_aFirst);
+boost::hash_combine(aSeed, rKey.m_aSecond);
+return aSeed;
+}
+};
+
+o3tl::lru_map< Key, WavyLineCacheItem, Hash > m_aItems;
+};
+
 void OutputDevice::ImplInitTextLineSize()
 {
 mpFontInstance->mxFontMetric->ImplInitTextLineSize( this );
@@ -1001,6 +1062,43 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, 
const Point& rEndPos, to
 nLineWidth = 0;
 }
 
+if ( fOrientation == 0.0 )
+{
+static vcl::DeleteOnDeinit< WavyLineCache > snLineCache( new 
WavyLineCache() );
+if ( !snLineCache.get() )
+return;
+WavyLineCache& rLineCache = *snLineCache.get();
+BitmapEx aWavylinebmp;
+if ( !rLineCache.find( GetLineColor(), nLineWidth, nWaveHeight, nEndX 
- nStartX, aWavylinebmp ) )
+{
+size_t nWordLength = nEndX - nStartX;
+// start with something big to avoid updating it frequently
+nWordLength = nWordLength < 1024 ? 1024 : nWordLength;
+ScopedVclPtrInstance< VirtualDevice > pVirtDev( *this, 
DeviceFormat::DEFAULT,
+   
DeviceFormat::DEFAULT );
+pVirtDev->SetAntialiasing( AntialiasingFlags::Enable );
+pVirtDev->SetOutputSizePixel( Size( nWordLength, nWaveHeight * 2 
), false );
+pVirtDev->SetLineColor( GetLineColor() )

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sc/inc sc/source

2021-06-28 Thread Samuel Mehrbrodt (via logerrit)
 sc/inc/queryentry.hxx  |2 ++
 sc/source/core/tool/queryentry.cxx |   19 +++
 sc/source/ui/dbgui/filtdlg.cxx |9 +
 3 files changed, 30 insertions(+)

New commits:
commit ecffe9d86ac942c970b92c4f4e76dd44834ce88f
Author: Samuel Mehrbrodt 
AuthorDate: Tue May 11 11:52:30 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 09:56:33 2021 +0200

tdf#76258 Skip color items in filter dialog for now

Change-Id: Iada39f065dbb9b975ada90bcc4135c39b9710def
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115393
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 518d0d8283b6d732cffa102c6b7c2fe01d1ec348)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116601
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/inc/queryentry.hxx b/sc/inc/queryentry.hxx
index 848e55c3016d..4ded8551a342 100644
--- a/sc/inc/queryentry.hxx
+++ b/sc/inc/queryentry.hxx
@@ -81,7 +81,9 @@ struct SC_DLLPUBLIC ScQueryEntry
 const Item& GetQueryItem() const;
 Item& GetQueryItem();
 void SetQueryByTextColor(Color color);
+bool IsQueryByTextColor() const;
 void SetQueryByBackgroundColor(Color color);
+bool IsQueryByBackgroundColor() const;
 voidClear();
 ScQueryEntry&   operator=( const ScQueryEntry& r );
 booloperator==( const ScQueryEntry& r ) const;
diff --git a/sc/source/core/tool/queryentry.cxx 
b/sc/source/core/tool/queryentry.cxx
index 581939748f86..075fa12f04d5 100644
--- a/sc/source/core/tool/queryentry.cxx
+++ b/sc/source/core/tool/queryentry.cxx
@@ -128,6 +128,16 @@ void ScQueryEntry::SetQueryByTextColor(Color color)
 rItem.maColor = color;
 }
 
+bool ScQueryEntry::IsQueryByTextColor() const
+{
+if (maQueryItems.size() != 1)
+return false;
+
+const Item& rItem = maQueryItems[0];
+return eOp == SC_EQUAL &&
+rItem.meType == ByTextColor;
+}
+
 void ScQueryEntry::SetQueryByBackgroundColor(Color color)
 {
 eOp = SC_EQUAL;
@@ -139,6 +149,15 @@ void ScQueryEntry::SetQueryByBackgroundColor(Color color)
 rItem.maColor = color;
 }
 
+bool ScQueryEntry::IsQueryByBackgroundColor() const
+{
+if (maQueryItems.size() != 1)
+return false;
+const Item& rItem = maQueryItems[0];
+return eOp == SC_EQUAL &&
+rItem.meType == ByBackgroundColor;
+}
+
 const ScQueryEntry::Item& ScQueryEntry::GetQueryItem() const
 {
 if (maQueryItems.size() > 1)
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 9ee84fc714cd..8882d9139c89 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -218,6 +218,11 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
 aValStr = aStrNotEmpty;
 maCondLbArr[i]->set_sensitive(false);
 }
+else if (rEntry.IsQueryByTextColor() || 
rEntry.IsQueryByBackgroundColor())
+{
+// No support for color filters in filter dialog currently
+continue;
+}
 else
 {
 OUString aQueryStr = rItem.maString.getString();
@@ -1113,6 +1118,10 @@ void ScFilterDlg::RefreshEditRow( size_t nOffset )
 aValStr = aStrNotEmpty;
 maCondLbArr[i]->set_sensitive(false);
 }
+else if (rEntry.IsQueryByTextColor() || 
rEntry.IsQueryByBackgroundColor())
+{
+continue;
+}
 else
 {
 aValStr = aQueryStr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - include/vcl vcl/source

2021-06-28 Thread Samuel Mehrbrodt (via logerrit)
 include/vcl/settings.hxx|1 +
 vcl/source/app/settings.cxx |   14 ++
 vcl/source/window/menu.cxx  |6 --
 3 files changed, 19 insertions(+), 2 deletions(-)

New commits:
commit 907e2344e03463542e5a6c30f3057ec6fc07bda1
Author: Samuel Mehrbrodt 
AuthorDate: Tue May 11 09:28:12 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 09:55:44 2021 +0200

tdf#76258 Use correct icon size for color filter popup colors

Change-Id: Icda5ee2cc4c02d6da5cc3f45c30416ad503eaa20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115378
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 5b01ad53aba40956a164500c4267990f7d2d8dd7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116593
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 75894432f05d..44bc36271366 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -518,6 +518,7 @@ public:
 
 voidSetToolbarIconSize( ToolbarIconSize nSize 
);
 ToolbarIconSize GetToolbarIconSize() const;
+SizeGetToolbarIconSizePixel() const;
 
 /** Set the icon theme to use. */
 voidSetIconTheme(const OUString&);
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index a621f6c61fd4..719062d8c581 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -1916,6 +1916,20 @@ StyleSettings::GetToolbarIconSize() const
 return mxData->mnToolbarIconSize;
 }
 
+Size StyleSettings::GetToolbarIconSizePixel() const
+{
+switch (GetToolbarIconSize())
+{
+case ToolbarIconSize::Large:
+return Size(24, 24);
+case ToolbarIconSize::Size32:
+return Size(32, 32);
+case ToolbarIconSize::Small:
+default:
+return Size(16, 16);
+}
+}
+
 const DialogStyle&
 StyleSettings::GetDialogStyle() const
 {
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 918910444a70..38780b020f2a 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1013,10 +1013,12 @@ OUString Menu::GetItemText( sal_uInt16 nItemId ) const
 
 void Menu::SetItemColor(sal_uInt16 nItemId, const Color& rColor)
 {
-Bitmap aBmp(Size(50, 50), 24);
+StyleSettings aSettings = Application::GetSettings().GetStyleSettings();
+auto iconSize = aSettings.GetToolbarIconSizePixel();
+Bitmap aBmp(iconSize, 24);
 BitmapWriteAccess aBmpAccess(aBmp);
 aBmpAccess.SetFillColor(rColor);
-aBmpAccess.FillRect(tools::Rectangle(0, 0, 49, 49));
+aBmpAccess.FillRect(tools::Rectangle(0, 0, iconSize.Width() - 1, 
iconSize.Height() - 1));
 BitmapEx aBmpEx(aBmp);
 Image aImage(aBmpEx);
 SetItemImage(nItemId, aImage);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sc/source

2021-06-28 Thread Samuel Mehrbrodt (via logerrit)
 sc/source/core/data/column3.cxx  |8 ++--
 sc/source/core/data/table3.cxx   |   20 ++--
 sc/source/ui/cctrl/checklistmenu.cxx |2 --
 sc/source/ui/inc/checklistmenu.hxx   |   12 ++--
 sc/source/ui/view/gridwin.cxx|   27 +--
 5 files changed, 43 insertions(+), 26 deletions(-)

New commits:
commit 7a249a23e73564e72916ad877a49ae2d6484ff6b
Author: Samuel Mehrbrodt 
AuthorDate: Mon May 10 16:55:53 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 09:55:12 2021 +0200

tdf#76258 Various fixes for color filter

Change-Id: Ifb4114597efcb7a957d2e42867d1bdc8abfe7730
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115340
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 69b376d21dfe43482f67ece137421a7487f0cbae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116590
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 196369e54da8..cc3eee96f2cd 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2418,12 +2418,12 @@ class FilterEntriesHandler
 
 const SvxBrushItem* pBrush = rColumn.GetDoc()->GetAttr(aPos, 
ATTR_BACKGROUND);
 Color backgroundColor = pBrush->GetColor();
+mrFilterEntries.addTextColor(textColor);
+mrFilterEntries.addBackgroundColor(backgroundColor);
 
 if (rCell.hasString())
 {
 mrFilterEntries.push_back(ScTypedStrData(aStr));
-mrFilterEntries.addTextColor(textColor);
-mrFilterEntries.addBackgroundColor(backgroundColor);
 return;
 }
 
@@ -2446,8 +2446,6 @@ class FilterEntriesHandler
 if (!aErr.isEmpty())
 {
 mrFilterEntries.push_back(ScTypedStrData(aErr));
-mrFilterEntries.addTextColor(textColor);
-mrFilterEntries.addBackgroundColor(backgroundColor);
 return;
 }
 }
@@ -2475,8 +2473,6 @@ class FilterEntriesHandler
 }
 // maybe extend ScTypedStrData enum is also an option here
 mrFilterEntries.push_back(ScTypedStrData(aStr, fVal, 
ScTypedStrData::Value,bDate));
-mrFilterEntries.addTextColor(textColor);
-mrFilterEntries.addBackgroundColor(backgroundColor);
 }
 
 public:
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 60357a32d634..8c9153f302d9 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2809,31 +2809,31 @@ bool ScTable::ValidQuery(
 {
 for (const auto& rItem : rItems)
 {
-if (aEval.isQueryByValue(rItem, nCol, nRow, aCell))
+if (rItem.meType == ScQueryEntry::ByTextColor)
 {
-std::pair aThisRes =
-aEval.compareByValue(aCell, nCol, nRow, rEntry, rItem, 
pContext);
+std::pair aThisRes
+= aEval.compareByTextColor(nCol, nRow, nTab, rItem);
 aRes.first |= aThisRes.first;
 aRes.second |= aThisRes.second;
 }
-else if (aEval.isQueryByString(rEntry, rItem, nCol, nRow, 
aCell))
+else if (rItem.meType == ScQueryEntry::ByBackgroundColor)
 {
 std::pair aThisRes =
-aEval.compareByString(aCell, nRow, rEntry, rItem, 
pContext);
+aEval.compareByBackgroundColor(nCol, nRow, nTab, 
rItem);
 aRes.first |= aThisRes.first;
 aRes.second |= aThisRes.second;
 }
-if (rItem.meType == ScQueryEntry::ByTextColor)
+else if (aEval.isQueryByValue(rItem, nCol, nRow, aCell))
 {
-std::pair aThisRes
-= aEval.compareByTextColor(nCol, nRow, nTab, rItem);
+std::pair aThisRes =
+aEval.compareByValue(aCell, nCol, nRow, rEntry, rItem, 
pContext);
 aRes.first |= aThisRes.first;
 aRes.second |= aThisRes.second;
 }
-if (rItem.meType == ScQueryEntry::ByBackgroundColor)
+else if (aEval.isQueryByString(rEntry, rItem, nCol, nRow, 
aCell))
 {
 std::pair aThisRes =
-aEval.compareByBackgroundColor(nCol, nRow, nTab, 
rItem);
+aEval.compareByString(aCell, nRow, rEntry, rItem, 
pContext);
 aRes.first |= aThisRes.first;
 aRes.second |= aThisRes.second;
 }
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx

[Libreoffice-commits] core.git: vcl/unx

2021-06-28 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/customcellrenderer.cxx |   37 
 1 file changed, 5 insertions(+), 32 deletions(-)

New commits:
commit f9514beb9bfed51aee69227797e74504afed31c6
Author: Caolán McNamara 
AuthorDate: Sun Jun 27 21:09:38 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 28 09:53:43 2021 +0200

use the standard macros to generate custom_cell_renderer_get_type

Change-Id: Ie0c15c0d97616d1b5a6afcdc72cba7247e22d999
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117959
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/customcellrenderer.cxx 
b/vcl/unx/gtk3/customcellrenderer.cxx
index 43c6a6f03dc1..69e2395df4de 100644
--- a/vcl/unx/gtk3/customcellrenderer.cxx
+++ b/vcl/unx/gtk3/customcellrenderer.cxx
@@ -25,40 +25,13 @@ enum
 };
 }
 
-static gpointer custom_cell_renderer_parent_class;
+G_DEFINE_TYPE(CustomCellRenderer, custom_cell_renderer, 
GTK_TYPE_CELL_RENDERER_TEXT)
 
-static void custom_cell_renderer_class_init(CustomCellRendererClass* klass);
-
-static void custom_cell_renderer_init(GTypeInstance* instance, gpointer)
-{
-new (&CUSTOM_CELL_RENDERER(instance)->device) VclPtr;
-}
-
-GType custom_cell_renderer_get_type()
+static void custom_cell_renderer_init(CustomCellRenderer* self)
 {
-static GType type = 0;
-
-if (!type)
-{
-static const GTypeInfo tinfo = {
-sizeof(CustomCellRendererClass),
-nullptr, /* base init */
-nullptr, /* base finalize */
-reinterpret_cast(custom_cell_renderer_class_init), 
/* class init */
-nullptr, /* class finalize */
-nullptr, /* class data */
-sizeof(CustomCellRenderer), /* instance size */
-0, /* nb preallocs */
-&custom_cell_renderer_init, /* instance init */
-nullptr /* value table */
-};
-
-// inherit from GtkCellRendererText so we can set the "text" property 
and get a11y support for that
-type = g_type_register_static(GTK_TYPE_CELL_RENDERER_TEXT, 
"CustomCellRenderer", &tinfo,
-  GTypeFlags(0));
-}
-
-return type;
+new (&self->device) VclPtr;
+// prevent loplugin:unreffun firing on macro generated function
+(void)custom_cell_renderer_get_instance_private(self);
 }
 
 static void custom_cell_renderer_get_property(GObject* object, guint param_id, 
GValue* value,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/clang vcl/Library_vclplug_gtk3_kde5.mk vcl/Library_vclplug_gtk3.mk vcl/Library_vclplug_gtk4.mk vcl/unx

2021-06-28 Thread Caolán McNamara (via logerrit)
 compilerplugins/clang/reservedid.cxx   |2 
 vcl/Library_vclplug_gtk3.mk|1 
 vcl/Library_vclplug_gtk3_kde5.mk   |1 
 vcl/Library_vclplug_gtk4.mk|1 
 vcl/unx/gtk3/customcellrenderer.cxx|  303 ++
 vcl/unx/gtk3/customcellrenderer.hxx|   49 ++
 vcl/unx/gtk3/gtkinst.cxx   |  352 +
 vcl/unx/gtk3_kde5/gtk3_kde5_customcellrenderer.cxx |   12 
 vcl/unx/gtk4/customcellrenderer.cxx|   12 
 9 files changed, 402 insertions(+), 331 deletions(-)

New commits:
commit 879fc58cd4f54e72499fedce64d23bc969f943c0
Author: Caolán McNamara 
AuthorDate: Sun Jun 27 19:40:50 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 28 09:53:28 2021 +0200

split out customcellrenderer code

Change-Id: Ia2803f6eab14ee7aeb697fb039f4e6dbdefa25e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117958
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/compilerplugins/clang/reservedid.cxx 
b/compilerplugins/clang/reservedid.cxx
index eac62a5b9671..9f11ef5a9ced 100644
--- a/compilerplugins/clang/reservedid.cxx
+++ b/compilerplugins/clang/reservedid.cxx
@@ -197,6 +197,8 @@ bool ReservedId::VisitNamedDecl(NamedDecl const * decl) {
 // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h
 && s != "_ADOUser"
 // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h
+&& s != "_CustomCellRenderer" // 
vcl/unx/gtk3/customcellrenderer.hxx
+&& s != "_CustomCellRendererClass" // 
vcl/unx/gtk3/customcellrenderer.cxx
 && s != "_FcPattern" // vcl/inc/unx/fc_fontoptions.hxx
 && s != "_GdkDisplay"
 // vcl/unx/gtk/xid_fullscreen_on_all_monitors.c
diff --git a/vcl/Library_vclplug_gtk3.mk b/vcl/Library_vclplug_gtk3.mk
index 4e7f838903a1..09374b635284 100644
--- a/vcl/Library_vclplug_gtk3.mk
+++ b/vcl/Library_vclplug_gtk3.mk
@@ -100,6 +100,7 @@ $(eval $(call 
gb_Library_add_exception_objects,vclplug_gtk3,\
 vcl/unx/gtk3/fpicker/SalGtkFilePicker \
 vcl/unx/gtk3/fpicker/SalGtkFolderPicker \
 vcl/unx/gtk3/fpicker/SalGtkPicker \
+vcl/unx/gtk3/customcellrenderer \
 vcl/unx/gtk3/gtkdata \
 vcl/unx/gtk3/gtkinst \
 vcl/unx/gtk3/gtksys \
diff --git a/vcl/Library_vclplug_gtk3_kde5.mk b/vcl/Library_vclplug_gtk3_kde5.mk
index ab804e76a697..45b046a72fda 100644
--- a/vcl/Library_vclplug_gtk3_kde5.mk
+++ b/vcl/Library_vclplug_gtk3_kde5.mk
@@ -102,6 +102,7 @@ $(eval $(call 
gb_Library_add_exception_objects,vclplug_gtk3_kde5,\
vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkutil \
vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkvalue \
vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkwrapper \
+   vcl/unx/gtk3_kde5/gtk3_kde5_customcellrenderer \
vcl/unx/gtk3_kde5/gtk3_kde5_gtkdata \
vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst \
vcl/unx/gtk3_kde5/gtk3_kde5_gtksys \
diff --git a/vcl/Library_vclplug_gtk4.mk b/vcl/Library_vclplug_gtk4.mk
index 8b2d55d9d944..09520c4dba9d 100644
--- a/vcl/Library_vclplug_gtk4.mk
+++ b/vcl/Library_vclplug_gtk4.mk
@@ -85,6 +85,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gtk4,\
 vcl/unx/gtk4/fpicker/SalGtkFolderPicker \
 vcl/unx/gtk4/fpicker/SalGtkPicker \
 vcl/unx/gtk4/convert3to4 \
+vcl/unx/gtk4/customcellrenderer \
 vcl/unx/gtk4/gtkdata \
 vcl/unx/gtk4/gtkinst \
 vcl/unx/gtk4/gtksys \
diff --git a/vcl/unx/gtk3/customcellrenderer.cxx 
b/vcl/unx/gtk3/customcellrenderer.cxx
new file mode 100644
index ..43c6a6f03dc1
--- /dev/null
+++ b/vcl/unx/gtk3/customcellrenderer.cxx
@@ -0,0 +1,303 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "customcellrenderer.hxx"
+#if !GTK_CHECK_VERSION(4, 0, 0)
+#include 
+#endif
+
+namespace
+{
+struct _CustomCellRendererClass : public GtkCellRendererTextClass
+{
+};
+
+enum
+{
+PROP_ID = 1,
+PROP_INSTANCE_TREE_VIEW = 10001
+};
+}
+
+static gpointer custom_cell_renderer_parent_class;
+
+static void custom_cell_renderer_class_init(CustomCellRendererClass* klass);
+
+static void custom_cell_renderer_init(GTypeInstance* instance, gpointer)
+{
+new (&CUSTOM_CELL_RENDERER(instance)->device) VclPtr;
+}
+
+GType custom_cell_renderer_get_type()
+{
+static GType type = 0;
+
+if (!type)
+{
+static const GTypeInfo tinfo = {
+sizeof(CustomCellRendererClass),
+nullptr, /* base init */
+nullptr, /* base finalize */
+reinterpret_cast(custom_cell_renderer_class_init), 
/* class init */
+

[Libreoffice-commits] core.git: tools/source

2021-06-28 Thread Caolán McNamara (via logerrit)
 tools/source/generic/poly.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 228cb26a6a1afe668dd17471bedf0ab52f133d5a
Author: Caolán McNamara 
AuthorDate: Sun Jun 27 19:08:36 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 28 09:53:10 2021 +0200

ofz#35504 Integer-overflow

Change-Id: I7a462b821f286411d759b5259461fcdbf1741859
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117955
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 1f60337cffa1..2575d262a68a 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -255,7 +255,7 @@ ImplPolygon::ImplPolygon( const tools::Rectangle& rBound, 
const Point& rStart, c
 }
 
 
-if( ( nRadX > 32 ) && ( nRadY > 32 ) && ( nRadX + nRadY ) < 8192 )
+if (nRadX > 32 && nRadY > 32 && o3tl::saturating_add(nRadX, nRadY) < 
8192)
 nPoints >>= 1;
 
 // compute threshold
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Review of 'Improve wrap margins in docx filters'

2021-06-28 Thread Miklos Vajna
Hi Regina,

On Wed, Jun 16, 2021 at 06:55:47PM +0200, Regina Henschel 
 wrote:
> this is about patch https://gerrit.libreoffice.org/c/core/+/115668
> 
> From my point of view, the patch is now ready. But it is quite big and has
> deeper changes, so I would appreciate it if you take a look at the patch.
> 
> There are still parts missing, but they can be added later. It is missing
> e.g. consideration of border thicknesses of frames, calculation of suitable
> wrap polygons, better fit of our wrap types to those of MSOffice,
> calculation of correct positions for child elements of rotated groups.

Right, it took me some time to look at it, updated the gerrit change
now. :-)

Regards,

Miklos
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - 2 commits - include/vcl include/xmloff schema/libreoffice sc/inc sc/qa sc/source vcl/source xmloff/source

2021-06-28 Thread Samuel Mehrbrodt (via logerrit)
 include/vcl/menu.hxx|4 +
 include/xmloff/xmltoken.hxx |1 
 sc/inc/filterentries.hxx|   10 ++
 sc/inc/queryentry.hxx   |   14 +++-
 sc/inc/strings.hrc  |2 
 sc/qa/unit/data/ods/autofilter-colors.ods   |binary
 sc/qa/unit/subsequent_export-test.cxx   |   17 
 sc/source/core/data/column3.cxx |   28 ++--
 sc/source/core/data/table3.cxx  |   36 ++
 sc/source/core/tool/queryentry.cxx  |   24 +++
 sc/source/filter/xml/XMLExportDatabaseRanges.cxx|   26 ++-
 sc/source/filter/xml/xmlfilti.cxx   |9 ++
 sc/source/ui/cctrl/checklistmenu.cxx|4 -
 sc/source/ui/inc/gridwin.hxx|   13 +++
 sc/source/ui/view/gridwin.cxx   |   41 
 schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng |   14 +++-
 vcl/source/window/menu.cxx  |   12 +++
 xmloff/source/core/xmltoken.cxx |1 
 xmloff/source/token/tokens.txt  |1 
 19 files changed, 242 insertions(+), 15 deletions(-)

New commits:
commit 1f201fd6ae64c97102a60dfdecda25e1dd32d49a
Author: Samuel Mehrbrodt 
AuthorDate: Wed Apr 28 16:25:42 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 09:51:30 2021 +0200

tdf#76258 Add ODF import/export

XML looks like:



Change-Id: Idcddf0ce436da69567e5a7e9dfd7d796dc872586
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114812
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit e2bdd31c0231444f1ba1463bffb5656c230c3073)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115898
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index a0e52903060a..5421a90da5cb 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -1889,6 +1889,7 @@ namespace xmloff { namespace token {
 XML_TEXT_BACKGROUND_COLOR,
 XML_TEXT_BLINKING,
 XML_TEXT_BOX,
+XML_TEXT_COLOR,
 XML_TEXT_COMBINE,
 XML_TEXT_COMBINE_END_CHAR,
 XML_TEXT_COMBINE_START_CHAR,
diff --git a/sc/qa/unit/data/ods/autofilter-colors.ods 
b/sc/qa/unit/data/ods/autofilter-colors.ods
new file mode 100644
index ..d5a88e9299fb
Binary files /dev/null and b/sc/qa/unit/data/ods/autofilter-colors.ods differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 61f6a46eba19..d2e1087acf55 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -201,6 +201,7 @@ public:
 void testTdf95640_ods_to_xlsx();
 void testTdf95640_ods_to_xlsx_with_standard_list();
 void testTdf95640_xlsx_to_xlsx();
+void testAutofilterColorsODF();
 
 void testRefStringXLSX();
 void testRefStringConfigXLSX();
@@ -337,6 +338,7 @@ public:
 CPPUNIT_TEST(testTdf95640_ods_to_xlsx);
 CPPUNIT_TEST(testTdf95640_ods_to_xlsx_with_standard_list);
 CPPUNIT_TEST(testTdf95640_xlsx_to_xlsx);
+CPPUNIT_TEST(testAutofilterColorsODF);
 
 CPPUNIT_TEST(testRefStringXLSX);
 CPPUNIT_TEST(testRefStringConfigXLSX);
@@ -4048,11 +4050,26 @@ void 
ScExportTest::testConditionalFormatContainsTextXLSX()
 CPPUNIT_ASSERT(xDocSh.is());
 
 xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, 
"xl/worksheets/sheet1.xml", FORMAT_XLSX);
+
 CPPUNIT_ASSERT(pDoc);
 
 assertXPathContent(pDoc, "//x:conditionalFormatting/x:cfRule/x:formula", 
"NOT(ISERROR(SEARCH(\"test\",A1)))");
 }
 
+void ScExportTest::testAutofilterColorsODF()
+{
+ScDocShellRef xDocSh = loadDoc(u"autofilter-colors.", FORMAT_ODS);
+CPPUNIT_ASSERT(xDocSh.is());
+
+xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, 
"content.xml", FORMAT_ODS);
+CPPUNIT_ASSERT(pDoc);
+
+assertXPath(pDoc, 
"//table:filter/table:filter-and/table:filter-condition[1]", "value", 
"#e8f2a1");
+assertXPath(pDoc, 
"//table:filter/table:filter-and/table:filter-condition[1][@loext:data-type='background-color']");
+assertXPath(pDoc, 
"//table:filter/table:filter-and/table:filter-condition[2]", "value", 
"#3465a4");
+assertXPath(pDoc, 
"//table:filter/table:filter-and/table:filter-condition[2][@loext:data-type='text-color']");
+}
+
 void ScExportTest::testConditionalFormatPriorityCheckXLSX()
 {
 ScDocShellRef xDocSh = loadDoc("conditional_fmt_checkpriority.", 
FORMAT_XLSX);
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx 
b/sc/source/filter/xml/XM

[Libreoffice-commits] core.git: oox/source sw/qa sw/source writerfilter/qa writerfilter/source

2021-06-28 Thread Regina Henschel (via logerrit)
 oox/source/export/drawingml.cxx  |
4 
 sw/qa/extras/ooxmlexport/data/tdf142486_FrameShadow.odt  
|binary
 sw/qa/extras/ooxmlexport/data/tdf142486_LeftMarginShadowLeft.docx
|binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx |
4 
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx   |
2 
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx   |   
31 
 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx|
4 
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx|
7 
 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx|   
22 
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |
2 
 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx|   
14 
 sw/source/filter/ww8/docxsdrexport.cxx   |  
476 +++---
 writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx   |   
60 +
 writerfilter/qa/cppunittests/dmapper/data/tdf142304GroupPosition.docx
|binary
 writerfilter/qa/cppunittests/dmapper/data/tdf142305SquareWrapMargin.docx 
|binary
 writerfilter/qa/cppunittests/dmapper/data/tdf142305StrokeGlowMargin.docx 
|binary
 writerfilter/source/dmapper/GraphicImport.cxx|  
290 --
 writerfilter/source/dmapper/GraphicImport.hxx|
2 
 18 files changed, 671 insertions(+), 247 deletions(-)

New commits:
commit 3262fc5ef3bde5b158909d11ccb008161ea95519
Author: Regina Henschel 
AuthorDate: Sat May 15 23:40:34 2021 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jun 28 09:49:00 2021 +0200

tdf#142304 a.o. Improve wrap margins in docx filters

LO uses the bounding box of the shape in case of type 'Parallel'. Word
uses in the corresponding wrap 'square' a box based on the full size
of the shape. That will be very different in some cases, e.g. for an
arc. And Word exchanges width and height in case of rotation angle in
[45°;135°[ and [225°; 315°[. To get the same appearance as in Word,
the wrap margins are suitable expanded on import.

Word puts the additional space needed for fat strokes into effectExtent
in case of wrap 'inline', so there is no need to add the half strokes
width in addition. Word determines the area for the shape depending
on rotation angle. Both are now considered. Total same appearance is
not possible because it would need negative vertical wrap margins,
which are currently faulty in LO, see tdf#141880.

Patch solves in addition tdf#142486, tdf#142305

The export to Word would require negative values in effectExtent in
some cases. They are allowed in OOXML but not supported in Word. My
idea is to switch to wrap mode 'Tight' if needed. But export of wrap
has so many bad parts, that it needs separate work and is not
included here.

Handling of border width for export of own frames is missing.

Unittest changes

testDmlTextshapeB and TestDmlTextshape in ooxmlexport6.cxx are set to
current values. Import and Export still have large errors with these
shapes and correct value from file is unknown. So an exact value is
pointless. Only the original problem needs to be still fixed, which
is the case.

testWpsOnly in ooxmlexport10.cxx. I have removed the test for
LeftMargin equals 0. The test makes no sense, because the original
file has distL=114300.

testTdf124600 in ooxmlimport2.cxx.
I have added a tolerance. It would fail with Expected: 2029,
Actual:2028, likely a rounding problem somewhere.

testTdf124600 in ooxmlimport2.cxx
Word refers to outer edge of the border for align='left', LO aligns
at snap rectangle. The different intepretations become visible if a
thick line is used. LO needs a margin to get the same rendering as in
Word. So an expected value of 0 is wrong and I have disabled the test
for now. ToDo: tdf#142798. Get the correct margin and activate the
test then.

testTextframeGradient in ooxmlexport2.cxx. I didn't find any reference
for a default value. The test is not reliable, I get both 316 and 318
as actual value. Handling of shadow in VML shapes is buggy, the values
for margin and shadow are wrong anyway. Reports are e.g. tdf#142486,
tdf#142558. For now I have added a tolerance of 2.

testDMLGroupShapeChildPosition in ooxmlexport6.cxx. The accuracy has
become better. After reload we get the same values as before.

testEffectExtent in ooxmlexport.cxx. tdf#142805. I have disabled the
test, because the image is not loaded at all, and therefore it makes
no sense to test a margin of it. And you can only test the sum of
distL and effectExtent l, because LO has only one pr

Re: What is the best fit for hindiVowels import? CHARS_PERSIAN or CHARS_NEPALI

2021-06-28 Thread Miklos Vajna
Hi Justin,

On Thu, Jun 24, 2021 at 01:24:44PM +0200, Justin Luth  
wrote:
> DOCX import was provided by commit 9da74fa484772595fa50e188ba2c496a459cbd6b
> 
> Author: Cédric Bosdonnat on Wed Mar 3 14:27:29 2010 +0100
>     cbosdo03: Fixed issue 109772.
>     Backported go-oo patch to the CWS
> 
> 
> DOCX export was provided by commit 91b926d4b9939337f54d6c9f0b940b161dc3437f
> Author: Mark Hung on Sun Jan 24 16:36:05 2016 +0800
>     tdf#84317 convert missing numbering types to OOXML tokens.

Thanks for digging into the history of this. Mark is still around.

Mark: any input on this?

Thanks,

Miklos
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/qa sw/source

2021-06-28 Thread Michael Stahl (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx |9 -
 sw/source/core/layout/wsfrm.cxx|   18 ++
 2 files changed, 22 insertions(+), 5 deletions(-)

New commits:
commit 583ca42c3f83058aa6ccfff1063aef373d98e4c8
Author: Michael Stahl 
AuthorDate: Fri Jun 25 10:25:59 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 09:40:54 2021 +0200

sw: layout: fix table split loop caused by RemoveFollowFlowLinePending

In no_view.odt, the table 1340 does RemoveFollowFlowLine(), then splits
again, and by the time Split() returns, its flag
m_bRemoveFollowFlowLinePending is set and so in the next
SwTabFrame::MakeAll() it will do the same thing again, until eventually
it hits
layact.cxx:544: LoopControl_1 in SwLayAction::InternalAction

The flag is set during lcl_RecalcSplitLine(), in SwContentFrame::Cut(),
which operates under the assumption that there are no other cells in the
follow flow line that may contain content frames.

This only happens if "Verdana" and "Arial" fonts are available and not
substituted with "DejaVu Sans" etc.

(regression from c4af8b0f106f31b6e79a145bc4ab83bb6a55c808)

Unfortunately this uncovers another pagination bug in testTdf88496
which was hidden by this flag being set from text frames that shouldn't
exist anyway.

Change-Id: I3cc82c13bfc06960b827aefc64f5b5b12520955a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117851
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit a0cd270a99f43049fc099ddd463e57aa243d5b0e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117860
Reviewed-by: Thorsten Behrens 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index aa29afd218e0..1638d93cf878 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -1226,7 +1226,14 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf88496, 
"tdf88496.docx")
 // Switch off repeating header, there is no place for it.
 // Now there are only 3 pages with complete table content
 // instead of a 51-page long table only with header.
-CPPUNIT_ASSERT_EQUAL(3, getPages());
+CPPUNIT_ASSERT_EQUAL(2, getPages());
+// FIXME: this actually has 3 pages but SwWrtShell::SttPg() puts the cursor
+// into the single SwTextFrame in the follow-flow-row at the top of the
+// table but that SwTextFrame 1105 should not exist and the cursor ends up
+// at the end of its master frame 848 instead; the problem is somewhere in
+// SwTextFrame::FormatAdjust() which first determines nNew = 1 but then
+// grows this frame anyway so that the follow is empty, but nothing
+// invalidates 1105 again.
 }
 
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf77417, "tdf77417.docx")
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 438eaaef79fd..184ee0d6c9a8 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -45,6 +45,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1160,6 +1161,7 @@ void SwContentFrame::Cut()
 }
 }
 
+SwTabFrame* pMasterTab(nullptr);
 pFrame = GetIndNext();
 if( pFrame )
 {
@@ -1240,11 +1242,9 @@ void SwContentFrame::Cut()
 if ( IsInTab() )
 {
 SwTabFrame* pThisTab = FindTabFrame();
-SwTabFrame* pMasterTab = pThisTab && pThisTab->IsFollow() ? 
pThisTab->FindMaster() : nullptr;
-if ( pMasterTab )
+if (pThisTab && pThisTab->IsFollow())
 {
-pMasterTab->InvalidatePos_();
-pMasterTab->SetRemoveFollowFlowLinePending( true );
+pMasterTab = pThisTab->FindMaster();
 }
 }
 }
@@ -1253,7 +1253,17 @@ void SwContentFrame::Cut()
 SwLayoutFrame *pUp = GetUpper();
 RemoveFromLayout();
 if ( !pUp )
+{
+assert(!pMasterTab);
 return;
+}
+
+if (pMasterTab
+&& 
!pMasterTab->GetFollow()->GetFirstNonHeadlineRow()->ContainsContent())
+{   // only do this if there's no content in other cells of the row!
+pMasterTab->InvalidatePos_();
+pMasterTab->SetRemoveFollowFlowLinePending(true);
+}
 
 SwSectionFrame *pSct = nullptr;
 if ( !pUp->Lower() &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sw/qa sw/source

2021-06-28 Thread Michael Stahl (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx |9 -
 sw/source/core/layout/wsfrm.cxx|   18 ++
 2 files changed, 22 insertions(+), 5 deletions(-)

New commits:
commit 7e3efa231c6e9b7944c63f3ac67cf12dc396aabf
Author: Michael Stahl 
AuthorDate: Fri Jun 25 10:25:59 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 28 09:40:39 2021 +0200

sw: layout: fix table split loop caused by RemoveFollowFlowLinePending

In no_view.odt, the table 1340 does RemoveFollowFlowLine(), then splits
again, and by the time Split() returns, its flag
m_bRemoveFollowFlowLinePending is set and so in the next
SwTabFrame::MakeAll() it will do the same thing again, until eventually
it hits
layact.cxx:544: LoopControl_1 in SwLayAction::InternalAction

The flag is set during lcl_RecalcSplitLine(), in SwContentFrame::Cut(),
which operates under the assumption that there are no other cells in the
follow flow line that may contain content frames.

This only happens if "Verdana" and "Arial" fonts are available and not
substituted with "DejaVu Sans" etc.

(regression from c4af8b0f106f31b6e79a145bc4ab83bb6a55c808)

Unfortunately this uncovers another pagination bug in testTdf88496
which was hidden by this flag being set from text frames that shouldn't
exist anyway.

Change-Id: I3cc82c13bfc06960b827aefc64f5b5b12520955a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117851
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit a0cd270a99f43049fc099ddd463e57aa243d5b0e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117859
Reviewed-by: Thorsten Behrens 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 548558bd6eed..d999827899a4 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -1234,7 +1234,14 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf88496, 
"tdf88496.docx")
 // Switch off repeating header, there is no place for it.
 // Now there are only 3 pages with complete table content
 // instead of a 51-page long table only with header.
-CPPUNIT_ASSERT_EQUAL(3, getPages());
+CPPUNIT_ASSERT_EQUAL(2, getPages());
+// FIXME: this actually has 3 pages but SwWrtShell::SttPg() puts the cursor
+// into the single SwTextFrame in the follow-flow-row at the top of the
+// table but that SwTextFrame 1105 should not exist and the cursor ends up
+// at the end of its master frame 848 instead; the problem is somewhere in
+// SwTextFrame::FormatAdjust() which first determines nNew = 1 but then
+// grows this frame anyway so that the follow is empty, but nothing
+// invalidates 1105 again.
 }
 
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf77417, "tdf77417.docx")
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 4e8fb2e1fa1f..e7118b2516e5 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -46,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1171,6 +1172,7 @@ void SwContentFrame::Cut()
 }
 }
 
+SwTabFrame* pMasterTab(nullptr);
 pFrame = GetIndNext();
 if( pFrame )
 {
@@ -1251,11 +1253,9 @@ void SwContentFrame::Cut()
 if ( IsInTab() )
 {
 SwTabFrame* pThisTab = FindTabFrame();
-SwTabFrame* pMasterTab = pThisTab && pThisTab->IsFollow() ? 
pThisTab->FindMaster() : nullptr;
-if ( pMasterTab )
+if (pThisTab && pThisTab->IsFollow())
 {
-pMasterTab->InvalidatePos_();
-pMasterTab->SetRemoveFollowFlowLinePending( true );
+pMasterTab = pThisTab->FindMaster();
 }
 }
 }
@@ -1264,7 +1264,17 @@ void SwContentFrame::Cut()
 SwLayoutFrame *pUp = GetUpper();
 RemoveFromLayout();
 if ( !pUp )
+{
+assert(!pMasterTab);
 return;
+}
+
+if (pMasterTab
+&& 
!pMasterTab->GetFollow()->GetFirstNonHeadlineRow()->ContainsContent())
+{   // only do this if there's no content in other cells of the row!
+pMasterTab->InvalidatePos_();
+pMasterTab->SetRemoveFollowFlowLinePending(true);
+}
 
 SwSectionFrame *pSct = nullptr;
 if ( !pUp->Lower() &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svx/qa svx/source

2021-06-28 Thread Regényi Balázs (via logerrit)
 svx/qa/unit/customshapes.cxx  |   24 +++---
 svx/source/customshapes/EnhancedCustomShape2d.cxx |3 +-
 2 files changed, 14 insertions(+), 13 deletions(-)

New commits:
commit 2ffdd37067926ddb841c6055205f267b96706945
Author: Regényi Balázs 
AuthorDate: Sat Jan 16 13:48:44 2021 +0100
Commit: László Németh 
CommitDate: Mon Jun 28 09:35:18 2021 +0200

tdf#139549 DOCX import: document got modified at import time

Regression of bda05ba1736b74727872579b65b3fa14e3d8
"tdf#41466 DOCX import: fix VML v:shape/v:textbox".

Co-authored-by: Tünde Tóth

Change-Id: I8762aa8a710c3a37290e1db854b8cc86db6757b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109436
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 830c0074c757..b7b0788c4bba 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -610,9 +610,9 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf127785_Mirror)
 const sal_Int32 nWidthV = aBoundRectV.Width;
 const sal_Int32 nLeftV = aBoundRectV.X;
 const sal_Int32 nTopV = aBoundRectV.Y;
-if (abs(nHeightV - 4149) > 5 || abs(nWidthV - 3819) > 5)
+if (abs(nHeightV - 8000) > 10 || abs(nWidthV - 8000) > 10)
 sErrors += "Flip vertical wrong size.";
-if (abs(nLeftV - 3155) > 5 || abs(nTopV - 3736) > 5)
+if (abs(nLeftV - 1000) > 10 || abs(nTopV - 2000) > 10)
 sErrors += " Flip vertical wrong position.";
 
 uno::Reference xShapeH(getShape(1));
@@ -624,9 +624,9 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf127785_Mirror)
 const sal_Int32 nWidthH = aBoundRectH.Width;
 const sal_Int32 nLeftH = aBoundRectH.X;
 const sal_Int32 nTopH = aBoundRectH.Y;
-if (abs(nHeightH - 4149) > 5 || abs(nWidthH - 3819) > 5)
+if (abs(nHeightH - 8000) > 10 || abs(nWidthH - 8000) > 10)
 sErrors += " Flip horizontal wrong size.";
-if (abs(nLeftH - 15026) > 5 || abs(nTopH - 4115) > 5)
+if (abs(nLeftH - 13000) > 10 || abs(nTopH - 2000) > 10)
 sErrors += " Flip horizontal wrong position.";
 
 CPPUNIT_ASSERT_EQUAL(OUString(), sErrors);
@@ -689,13 +689,13 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, 
testTdf127785_Asymmetric)
 const sal_Int32 nTop = aBoundRect.Y;
 const sal_Int32 nRight = aBoundRect.X + aBoundRect.Width - 1;
 const sal_Int32 nBottom = aBoundRect.Y + aBoundRect.Height - 1;
-if (abs(nLeft - 10034) > 5)
+if (abs(nLeft - 9000) > 10)
 sErrors += "wrong left";
-if (abs(nRight - 12973) > 5)
+if (abs(nRight - 19000) > 10)
 sErrors += " wrong right";
-if (abs(nTop - 7892) > 5)
+if (abs(nTop - 3000) > 10)
 sErrors += " wrong top";
-if (abs(nBottom - 14884) > 5)
+if (abs(nBottom - 18000) > 10)
 sErrors += " wrong bottom";
 
 CPPUNIT_ASSERT_EQUAL(OUString(), sErrors);
@@ -722,13 +722,13 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, 
testTdf127785_TextRotateAngle)
 const sal_Int32 nTop = aBoundRect.Y;
 const sal_Int32 nRight = aBoundRect.X + aBoundRect.Width - 1;
 const sal_Int32 nBottom = aBoundRect.Y + aBoundRect.Height - 1;
-if (abs(nLeft - 5054) > 5)
+if (abs(nLeft - 2000) > 10)
 sErrors += "wrong left";
-if (abs(nRight - 6374) > 5)
+if (abs(nRight - 14000) > 10)
 sErrors += " wrong right";
-if (abs(nTop - 4516) > 5)
+if (abs(nTop - 3000) > 10)
 sErrors += " wrong top";
-if (abs(nBottom - 8930) > 5)
+if (abs(nBottom - 9000) > 10)
 sErrors += " wrong bottom";
 
 CPPUNIT_ASSERT_EQUAL(OUString(), sErrors);
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx 
b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 046f5a783c31..154f2df08c9e 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2864,9 +2864,10 @@ SdrObjectUniquePtr EnhancedCustomShape2d::CreatePathObj( 
bool bLineGeometryNeede
 SdrPathObj* pObj(rCandidate.first.get());
 const drawing::LineStyle 
eLineStyle(pObj->GetMergedItem(XATTR_LINESTYLE).GetValue());
 const drawing::FillStyle 
eFillStyle(pObj->GetMergedItem(XATTR_FILLSTYLE).GetValue());
+const auto pText = pObj->getActiveText();
 
 // #i40600# if bLineGeometryNeededOnly is set, linestyle does not 
matter
-if(bLineGeometryNeededOnly || (drawing::LineStyle_NONE != 
eLineStyle) || (drawing::FillStyle_NONE != eFillStyle))
+if(pText || bLineGeometryNeededOnly || (drawing::LineStyle_NONE != 
eLineStyle) || (drawing::FillStyle_NONE != eFillStyle))
 vNewList.push_back(std::move(rCandidate));
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2021-06-28 Thread Miklos Vajna (via logerrit)
 sw/source/filter/html/htmltab.cxx|  140 +--
 sw/source/filter/html/htmltabw.cxx   |   34 
 sw/source/filter/inc/wrtswtbl.hxx|   52 ++---
 sw/source/filter/writer/wrtswtbl.cxx |   40 +-
 4 files changed, 133 insertions(+), 133 deletions(-)

New commits:
commit 67a56b7159158cea076df9aa258a36b02e115ec3
Author: Miklos Vajna 
AuthorDate: Mon Jun 28 08:24:22 2021 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jun 28 09:16:49 2021 +0200

sw: prefix members of HTMLTableColumn, HTMLTableContext, SwWriteTableCol ...

... and SwWriteTableRow

See tdf#94879 for motivation.

Change-Id: I74edd0d6864fd7c2731d904c8bf7cfbd309a226c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117965
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 699a44a89f42..a1177b711d8e 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -114,57 +114,57 @@ struct HTMLTableOptions
 
 class HTMLTableContext
 {
-SwHTMLNumRuleInfo aNumRuleInfo; // Numbering valid before the table
+SwHTMLNumRuleInfo m_aNumRuleInfo; // Numbering valid before the table
 
-SwTableNode *pTableNd;  // table node
-SwFrameFormat *pFrameFormat;// the Fly frame::Frame, containing 
the table
-std::unique_ptr pPos;   // position behind the table
+SwTableNode *m_pTableNd;  // table node
+SwFrameFormat *m_pFrameFormat;// the Fly frame::Frame, containing 
the table
+std::unique_ptr m_pPos;   // position behind the table
 
-size_t nContextStAttrMin;
-size_t nContextStMin;
+size_t m_nContextStAttrMin;
+size_t m_nContextStMin;
 
-boolbRestartPRE : 1;
-boolbRestartXMP : 1;
-boolbRestartListing : 1;
+boolm_bRestartPRE : 1;
+boolm_bRestartXMP : 1;
+boolm_bRestartListing : 1;
 
 HTMLTableContext(const HTMLTableContext&) = delete;
 HTMLTableContext& operator=(const HTMLTableContext&) = delete;
 
 public:
 
-std::shared_ptr xAttrTab;// attributes
+std::shared_ptr m_xAttrTab;// attributes
 
 HTMLTableContext( SwPosition *pPs, size_t nCntxtStMin,
size_t nCntxtStAttrMin ) :
-pTableNd( nullptr ),
-pFrameFormat( nullptr ),
-pPos( pPs ),
-nContextStAttrMin( nCntxtStAttrMin ),
-nContextStMin( nCntxtStMin ),
-bRestartPRE( false ),
-bRestartXMP( false ),
-bRestartListing( false ),
-xAttrTab(std::make_shared())
+m_pTableNd( nullptr ),
+m_pFrameFormat( nullptr ),
+m_pPos( pPs ),
+m_nContextStAttrMin( nCntxtStAttrMin ),
+m_nContextStMin( nCntxtStMin ),
+m_bRestartPRE( false ),
+m_bRestartXMP( false ),
+m_bRestartListing( false ),
+m_xAttrTab(std::make_shared())
 {
-memset(xAttrTab.get(), 0, sizeof(HTMLAttrTable));
+memset(m_xAttrTab.get(), 0, sizeof(HTMLAttrTable));
 }
 
-void SetNumInfo( const SwHTMLNumRuleInfo& rInf ) { aNumRuleInfo.Set(rInf); 
}
-const SwHTMLNumRuleInfo& GetNumInfo() const { return aNumRuleInfo; };
+void SetNumInfo( const SwHTMLNumRuleInfo& rInf ) { 
m_aNumRuleInfo.Set(rInf); }
+const SwHTMLNumRuleInfo& GetNumInfo() const { return m_aNumRuleInfo; };
 
 void SavePREListingXMP( SwHTMLParser& rParser );
 void RestorePREListingXMP( SwHTMLParser& rParser );
 
-SwPosition *GetPos() const { return pPos.get(); }
+SwPosition *GetPos() const { return m_pPos.get(); }
 
-void SetTableNode( SwTableNode *pNd ) { pTableNd = pNd; }
-SwTableNode *GetTableNode() const { return pTableNd; }
+void SetTableNode( SwTableNode *pNd ) { m_pTableNd = pNd; }
+SwTableNode *GetTableNode() const { return m_pTableNd; }
 
-void SetFrameFormat( SwFrameFormat *pFormat ) { pFrameFormat = pFormat; }
-SwFrameFormat *GetFrameFormat() const { return pFrameFormat; }
+void SetFrameFormat( SwFrameFormat *pFormat ) { m_pFrameFormat = pFormat; }
+SwFrameFormat *GetFrameFormat() const { return m_pFrameFormat; }
 
-size_t GetContextStMin() const { return nContextStMin; }
-size_t GetContextStAttrMin() const { return nContextStAttrMin; }
+size_t GetContextStMin() const { return m_nContextStMin; }
+size_t GetContextStAttrMin() const { return m_nContextStAttrMin; }
 };
 
 }
@@ -336,35 +336,35 @@ public:
 // Column of a HTML table
 class HTMLTableColumn
 {
-bool bIsEndOfGroup;
+bool m_bIsEndOfGroup;
 
-sal_uInt16 nWidth;  // options of 
-bool bRelWidth;
+sal_uInt16 m_nWidth;  // options of 
+bool m_bRelWidth;
 
-SvxAdjust eAdjust;
-sal_Int16 eVertOri;
+SvxAdjust m_eAdjust;
+sal_Int16 m_eVertOri;
 
-SwFrameFormat *aFrameFormats[6];
+SwFrameFormat *m_aFrameFormats[6];
 
 static

[Libreoffice-commits] core.git: oox/source sd/qa

2021-06-28 Thread Tibor Nagy (via logerrit)
 oox/source/ppt/pptshape.cxx |   25 -
 sd/qa/unit/import-tests.cxx |4 ++--
 2 files changed, 18 insertions(+), 11 deletions(-)

New commits:
commit 253bee65bc24d999c3629a4d503d0fa01b355cfc
Author: Tibor Nagy 
AuthorDate: Wed Jun 16 11:02:48 2021 +0200
Commit: László Németh 
CommitDate: Mon Jun 28 09:01:58 2021 +0200

tdf#142646 PPTX import: count repeating slide names

instead of using the default slide name "Slide n".

PPTX slides are named after their titles. Now repeating
titles got a number instead of using the default slide
name "Slide n". E.g. "Title", "Title", "Title" will be
slide names "Title", "Title (2)", Title (3)", and not
"Title", "Slide 2", "Slide 3".

Follow-up to commit I98511c3c9a59598ea113e7387db5202d7f8a7cd4
"tdf#103347: PTX import: fix duplicated slide name"

Change-Id: I449d6f7d7599291b3dae7df65ad6ff86a4269fb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117317
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 7f3786c41992..8b25523e5c3d 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -432,6 +432,7 @@ void PPTShape::addShape(
 {
 try
 {
+sal_Int32 nCount = 1;
 OUString aTitleText;
 Reference xText(xShape, UNO_QUERY_THROW);
 aTitleText = xText->getString();
@@ -442,17 +443,23 @@ void PPTShape::addShape(
   // just a magic value, but we don't want to set 
slide names which are too long
   aTitleText.getLength() < 64;
 // check duplicated title name
-for (sal_uInt32 nPage = 0; bUseTitleAsSlideName && nPage < 
nMaxPages; ++nPage)
-{
-Reference 
xDrawPage(xDrawPages->getByIndex(nPage), uno::UNO_QUERY);
-Reference xNamed(xDrawPage, 
UNO_QUERY_THROW);
-if ( xNamed->getName() == aTitleText )
-bUseTitleAsSlideName = false;
-}
-if ( bUseTitleAsSlideName )
+if (bUseTitleAsSlideName)
 {
+for (sal_uInt32 nPage = 0; nPage < nMaxPages; ++nPage)
+{
+Reference 
xDrawPage(xDrawPages->getByIndex(nPage), uno::UNO_QUERY);
+Reference xNamed(xDrawPage, 
UNO_QUERY_THROW);
+OUString sRest;
+if (xNamed->getName().startsWith(aTitleText, 
&sRest)
+&& (sRest.isEmpty()
+|| (sRest.startsWith(" (") && 
sRest.endsWith(")")
+&& sRest.copy(2, sRest.getLength() - 
3).toInt32() > 0)))
+nCount++;
+}
 Reference 
xName(rSlidePersist.getPage(), UNO_QUERY_THROW);
-xName->setName(aTitleText);
+xName->setName(
+aTitleText
++ (nCount == 1 ? OUString("") : " (" + 
OUString::number(nCount) + ")"));
 }
 }
 catch (uno::Exception&)
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 7637700eac1f..8723c0ee53b8 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -3449,11 +3449,11 @@ void SdImportTest::testTdf103347()
 
 uno::Reference 
xPage2(xDoc->getDrawPages()->getByIndex(1), uno::UNO_QUERY);
 uno::Reference xNamed2(xPage2, uno::UNO_QUERY_THROW);
-CPPUNIT_ASSERT_EQUAL(OUString("page2"), xNamed2->getName());
+CPPUNIT_ASSERT_EQUAL(OUString("Hello (2)"), xNamed2->getName());
 
 uno::Reference 
xPage3(xDoc->getDrawPages()->getByIndex(2), uno::UNO_QUERY);
 uno::Reference xNamed3(xPage3, uno::UNO_QUERY_THROW);
-CPPUNIT_ASSERT_EQUAL(OUString("page3"), xNamed3->getName());
+CPPUNIT_ASSERT_EQUAL(OUString("Hello (3)"), xNamed3->getName());
 
 xDocShRef->DoClose();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits