Re: Odd Behavior from .docx file

2020-10-09 Thread Mike Kaganski

On 10.10.2020 8:24, Ilmari Lauhakangas wrote:

Robert Steinmetz AIA kirjoitti 9.10.2020 klo 20.53:
I received a .docx file from a customer. I loaded it into Libre Office 
7 and saved a copy as a .odt file. I need to reformat it and edit it. 
However whenever I add any thing or edit anything it it changes the 
text from black to a sort of gold color and noting I do can make it 
change back, except undoing all of my edits.


Any idea what is going on?


You have reached the developer mailing list. Bug reports belong 
elsewhere: https://wiki.documentfoundation.org/QA/BugReport


(but this is not a bug, just track changes mode [1])

[1] 
https://help.libreoffice.org/latest/en-US/text/shared/guide/redlining.html


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


Re: Odd Behavior from .docx file

2020-10-09 Thread Ilmari Lauhakangas

Robert Steinmetz AIA kirjoitti 9.10.2020 klo 20.53:
I received a .docx file from a customer. I loaded it into Libre Office 7 
and saved a copy as a .odt file. I need to reformat it and edit it. 
However whenever I add any thing or edit anything it it changes the text 
from black to a sort of gold color and noting I do can make it change 
back, except undoing all of my edits.


Any idea what is going on?


You have reached the developer mailing list. Bug reports belong 
elsewhere: https://wiki.documentfoundation.org/QA/BugReport


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


Odd Behavior from .docx file

2020-10-09 Thread Robert Steinmetz AIA
I received a .docx file from a customer. I loaded it into Libre Office 7 
and saved a copy as a .odt file. I need to reformat it and edit it. 
However whenever I add any thing or edit anything it it changes the text 
from black to a sort of gold color and noting I do can make it change 
back, except undoing all of my edits.


Any idea what is going on?
--

Robert Steinmetz AIA
Principal
Steinmetz & Associates

New Orleans & Atlanta

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


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

2020-10-09 Thread Seth Chaiklin (via logerrit)
 source/text/swriter/menu/submenu_more_breaks.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e54fcde8fbbd2efaf2c5846a2d3f50b06c107929
Author: Seth Chaiklin 
AuthorDate: Sat Oct 10 01:55:37 2020 +0200
Commit: Seth Chaiklin 
CommitDate: Sat Oct 10 02:10:15 2020 +0200

remove an extra "text" in link name

Change-Id: Ifac832bff8a4e45eb8a11fbba27ddb682040f33b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/103987
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/source/text/swriter/menu/submenu_more_breaks.xhp 
b/source/text/swriter/menu/submenu_more_breaks.xhp
index c8242217f..784a58474 100644
--- a/source/text/swriter/menu/submenu_more_breaks.xhp
+++ b/source/text/swriter/menu/submenu_more_breaks.xhp
@@ -21,7 +21,7 @@
 
 
 
-More Breaks
+More 
Breaks
 Submenu with additional line, column, and page 
breaks
 
 Insert Manual Row Break
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa sc/source sd/qa sd/source svx/sdi sw/qa sw/source

2020-10-09 Thread Mert Tumer (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   25 +
 sc/source/ui/app/scmod.cxx   |4 +++-
 sd/qa/unit/uiimpress.cxx |   18 ++
 sd/source/ui/view/drviewse.cxx   |9 -
 svx/sdi/svx.sdi  |2 +-
 sw/qa/extras/uiwriter/uiwriter.cxx   |   20 
 sw/source/uibase/uiview/view0.cxx|6 +-
 7 files changed, 80 insertions(+), 4 deletions(-)

New commits:
commit 7aaa9ef2e5edaf468f116449776433e98fb1a2f3
Author: Mert Tumer 
AuthorDate: Thu Oct 8 13:37:07 2020 +0300
Commit: Mert Tumer 
CommitDate: Fri Oct 9 21:30:26 2020 +0200

Added optional parameter Enabled for uno:SpellOnline

Change-Id: I3578b0a002ea2cdcc7893972607f26732ce545ea
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103982
Tested-by: Jenkins

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 8a0c9f2f637f..8c03a19902d5 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -110,6 +111,7 @@ public:
 void testSheetGeometryDataInvariance();
 void testSheetGeometryDataCorrectness();
 void testDeleteCellMultilineContent();
+void testSpellOnlineParameter();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
@@ -154,6 +156,7 @@ public:
 CPPUNIT_TEST(testSheetGeometryDataInvariance);
 CPPUNIT_TEST(testSheetGeometryDataCorrectness);
 CPPUNIT_TEST(testDeleteCellMultilineContent);
+CPPUNIT_TEST(testSpellOnlineParameter);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1632,6 +1635,28 @@ void ScTiledRenderingTest::testFilterDlg()
 SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
 }
 
+void ScTiledRenderingTest::testSpellOnlineParameter()
+{
+ScModelObj* pModelObj = createDoc("empty.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+bool bSet = pDoc->GetDocOptions().IsAutoSpell();
+
+uno::Sequence params =
+{
+comphelper::makePropertyValue("Enable", uno::makeAny(!bSet)),
+};
+dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell());
+
+// set the same state as now and we don't expect any change (no-toggle)
+params =
+{
+comphelper::makePropertyValue("Enable", uno::makeAny(!bSet)),
+};
+dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell());
+}
+
 void ScTiledRenderingTest::testVbaRangeCopyPaste()
 {
 comphelper::LibreOfficeKit::setActive();
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 7f272e131192..688e52d3f54a 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -343,7 +343,9 @@ void ScModule::Execute( SfxRequest& rReq )
 {
 bool bSet;
 const SfxPoolItem* pItem;
-if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( 
nSlot, true, &pItem ) )
+if (pReqArgs->HasItem(FN_PARAM_1, &pItem))
+bSet = static_cast(pItem)->GetValue();
+else if ( pReqArgs && SfxItemState::SET == 
pReqArgs->GetItemState( nSlot, true, &pItem ) )
 bSet = static_cast(pItem)->GetValue();
 else
 {   // Toggle
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 56d1f8fc789b..fbd23a24eda0 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -379,6 +379,24 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf134053)
 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Dot length", 706, fDotLength, 12);
 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Dash length", 2822, fDashLength, 12);
 }
+
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testSpellOnlineParameter)
+{
+mxComponent = 
loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/empty.fodp"));
+auto pImpressDocument = 
dynamic_cast(mxComponent.get());
+bool bSet = pImpressDocument->GetDoc()->GetOnlineSpell();
+
+uno::Sequence params(
+comphelper::InitPropertySequence({ { "Enable", uno::makeAny(!bSet) } 
}));
+dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell());
+
+// set the same state as now and we don't expect any change (no-toggle)
+params = comphelper::InitPropertySequence({ { "Enable", 
uno::makeAny(!bSet) } });
+dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab:

[Libreoffice-commits] core.git: cui/inc

2020-10-09 Thread Andrea Gelmini (via logerrit)
 cui/inc/toolbarmode.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e116efdeff09e8ce9a45d459af53216015cd5347
Author: Andrea Gelmini 
AuthorDate: Wed Oct 7 23:02:30 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Oct 9 21:26:33 2020 +0200

Fix typo

Change-Id: I25b9d697de27d9d4222a0e0e59f28f8a3457b469
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104075
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/inc/toolbarmode.hrc b/cui/inc/toolbarmode.hrc
index 25de3b569cdf..7e7510b08eda 100644
--- a/cui/inc/toolbarmode.hrc
+++ b/cui/inc/toolbarmode.hrc
@@ -25,7 +25,7 @@ const std::tuple 
TOOLBARMODES_ARRAY[] =
 { NC_("RID_CUI_TOOLBARMODES", "The Tabbed user interface is the most 
similar to the Ribbons used by Microsoft. It organize functions in tabs and 
makes the main menu obsolete."), "notebookbar.ui", "notebookbar.png"},
 { NC_("RID_CUI_TOOLBARMODES", "The Tabbed Compact variant aims to be 
familiar with Microsoft's interface having at the same time a short interface 
for small screen sizes."), "notebookbar_compact.ui",  
"notebookbar_compact.png"},
 { NC_("RID_CUI_TOOLBARMODES", "The Groupedbar Compact variant provides 
access to functions in groups with most frequently used features in icons and 
less often used in a dropdown menu. The compact variant favors vertical 
size."), "notebookbar_groupedbar_compact.ui", 
"notebookbar_groupedbar_compact.png"},
-{ NC_("RID_CUI_TOOLBARMODES", "The Groupedbar interface provides access to 
functions in groups with most frequently used features in icons and less often 
used in a dropdown menu. The full variant favors functions and is slighly 
larger than other variants."), "notebookbar_groupedbar_full.ui", 
"notebookbar_groupedbar_full.png"},
+{ NC_("RID_CUI_TOOLBARMODES", "The Groupedbar interface provides access to 
functions in groups with most frequently used features in icons and less often 
used in a dropdown menu. The full variant favors functions and is slightly 
larger than other variants."), "notebookbar_groupedbar_full.ui", 
"notebookbar_groupedbar_full.png"},
 { NC_("RID_CUI_TOOLBARMODES", "The Contextual Single interface shows 
functions in a single line toolbar with contextual depending content."), 
"notebookbar_single.ui", "notebookbar_single.png"},
 { NC_("RID_CUI_TOOLBARMODES", "The Contextual Groups interface focus on 
beginners. It exposes to the most frequently used functions on groups with the 
core action as large icon and a couple of small additional features. All 
functions have a label. Depending on the context an additional section provides 
access to those functions."), "notebookbar_groups.ui", 
"notebookbar_groups.png"},
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svtools svtools/source

2020-10-09 Thread Caolán McNamara (via logerrit)
 include/svtools/stringtransfer.hxx |   15 +++
 svtools/source/misc/stringtransfer.cxx |   17 +++--
 2 files changed, 10 insertions(+), 22 deletions(-)

New commits:
commit 58ace895761c304020f92a2aded57cb6b9e83dd1
Author: Caolán McNamara 
AuthorDate: Fri Oct 9 16:28:51 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 9 21:23:21 2020 +0200

inherit OStringTransferable from TransferDataContainer

so it can be used as an argument to

weld: :CustomWeld::SetDragDataTransferrable
Change-Id: Ibb58be6871a8719504d33d02bf7104213105be99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104126
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/svtools/stringtransfer.hxx 
b/include/svtools/stringtransfer.hxx
index dcb5bda5dec4..ab192f99f18d 100644
--- a/include/svtools/stringtransfer.hxx
+++ b/include/svtools/stringtransfer.hxx
@@ -27,14 +27,16 @@
 
 namespace svt
 {
-
-
 //= OStringTransferable
-
-class UNLESS_MERGELIBS(SVT_DLLPUBLIC) OStringTransferable final : public 
TransferableHelper
+class UNLESS_MERGELIBS(SVT_DLLPUBLIC) OStringTransferable final : public 
TransferDataContainer
 {
 public:
-OStringTransferable(const OUString& _rContent);
+OStringTransferable(const OUString& rContent);
+
+void UpdateData(const OUString& rContent)
+{
+m_sContent = rContent;
+}
 
 private:
 // TransferableHelper overridables
@@ -46,7 +48,6 @@ namespace svt
 
 
 //= OStringTransfer
-
 class OStringTransfer
 {
 public:
@@ -66,10 +67,8 @@ namespace svt
 SVT_DLLPUBLIC static void   StartStringDrag( const OUString& 
_rContent, vcl::Window* _pWindow, sal_Int8 _nDragSourceActions );
 };
 
-
 }   // namespace svt
 
-
 #endif // INCLUDED_SVTOOLS_STRINGTRANSFER_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/misc/stringtransfer.cxx 
b/svtools/source/misc/stringtransfer.cxx
index 14e805fc60c9..29273e495bbb 100644
--- a/svtools/source/misc/stringtransfer.cxx
+++ b/svtools/source/misc/stringtransfer.cxx
@@ -33,21 +33,17 @@ namespace svt
 
 
 //= OStringTransferable
-
-
-OStringTransferable::OStringTransferable(const OUString& _rContent)
-:TransferableHelper()
-,m_sContent( _rContent )
+OStringTransferable::OStringTransferable(const OUString& rContent)
+: TransferDataContainer()
+, m_sContent(rContent)
 {
 }
 
-
 void OStringTransferable::AddSupportedFormats()
 {
 AddFormat(SotClipboardFormatId::STRING);
 }
 
-
 bool OStringTransferable::GetData( const DataFlavor& _rFlavor, const 
OUString& /*rDestDoc*/ )
 {
 SotClipboardFormatId nFormat = SotExchange::GetFormat( _rFlavor );
@@ -57,17 +53,13 @@ namespace svt
 return false;
 }
 
-
 //= OStringTransfer
-
-
 void OStringTransfer::CopyString( const OUString& _rContent, vcl::Window* 
_pWindow )
 {
 rtl::Reference pTransferable = new 
OStringTransferable( _rContent );
 pTransferable->CopyToClipboard( _pWindow );
 }
 
-
 bool OStringTransfer::PasteString( OUString& _rContent, vcl::Window* 
_pWindow )
 {
 TransferableDataHelper aClipboardData = 
TransferableDataHelper::CreateFromSystemClipboard( _pWindow );
@@ -88,15 +80,12 @@ namespace svt
 return false;
 }
 
-
 void OStringTransfer::StartStringDrag( const OUString& _rContent, 
vcl::Window* _pWindow, sal_Int8 _nDragSourceActions )
 {
 rtl::Reference pTransferable = new 
OStringTransferable( _rContent );
 pTransferable->StartDrag(_pWindow, _nDragSourceActions);
 }
 
-
 }   // namespace svt
 
-
 /* 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: sw/qa

2020-10-09 Thread Andrea Gelmini (via logerrit)
 0 files changed

New commits:
commit 5e73f925e06fce59743ffa8fef64b0ae694b9916
Author: Andrea Gelmini 
AuthorDate: Tue Oct 6 14:52:17 2020 +0200
Commit: Julien Nabet 
CommitDate: Fri Oct 9 20:55:19 2020 +0200

Removed executable bits on odt file

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

diff --git a/sw/qa/extras/uiwriter/data3/tdf107893.odt 
b/sw/qa/extras/uiwriter/data3/tdf107893.odt
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/vcl

2020-10-09 Thread Andrea Gelmini (via logerrit)
 include/vcl/weld.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4bdf40c5b7e9749b72b2a7ae6c33509bb3dad82a
Author: Andrea Gelmini 
AuthorDate: Tue Oct 6 21:10:38 2020 +0200
Commit: Julien Nabet 
CommitDate: Fri Oct 9 20:55:34 2020 +0200

Fix typo

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

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index aab0dd469b55..433322aae085 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -2247,7 +2247,7 @@ public:
 virtual std::unique_ptr weld_menu_button(const OString& id) = 
0;
 virtual std::unique_ptr weld_frame(const OString& id) = 0;
 /* bUserManagedScrolling of true means that the automatic scrolling of the 
window is disabled
-   and the owner must specifically listen to adjustment changes and react 
appropiately to them.
+   and the owner must specifically listen to adjustment changes and react 
appropriately to them.
 */
 virtual std::unique_ptr weld_scrolled_window(const 
OString& id,
  bool 
bUserManagedScrolling = false)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


promo

2020-10-09 Thread Petr Valach

Zdravím,

jedna z forem propagace je televize, rozhlas. Napadlo vás, že by stálo 
za to se nabídnout v tomto směru? Věřím, že Veselovský z DVTV by mohl 
mít zájem. Dáme dohromady nějaký mejlík? Šel by si někdo sednout do 
horkého křesla?

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


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

2020-10-09 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_layoutwriter.mk |1 
 sw/qa/extras/layout/layout.cxx| 2335 -
 sw/qa/extras/layout/layout2.cxx   | 2377 ++
 3 files changed, 2391 insertions(+), 2322 deletions(-)

New commits:
commit dc48cf9ff19bd2aec78c9389776ef9f31fda09de
Author: Miklos Vajna 
AuthorDate: Fri Oct 9 17:10:28 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri Oct 9 18:40:49 2020 +0200

CppunitTest_sw_layoutwriter: split this into two

Fixes:

C:\lo\master\sw\qa\extras\layout\layout.cxx : fatal error C1128: number
of sections exceeded object file format limit: compile with /bigobj

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

diff --git a/sw/CppunitTest_sw_layoutwriter.mk 
b/sw/CppunitTest_sw_layoutwriter.mk
index a7e88dbf91c8..7e00738cd268 100644
--- a/sw/CppunitTest_sw_layoutwriter.mk
+++ b/sw/CppunitTest_sw_layoutwriter.mk
@@ -15,6 +15,7 @@ $(eval $(call 
gb_CppunitTest_use_common_precompiled_header,sw_layoutwriter))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sw_layoutwriter, \
 sw/qa/extras/layout/layout \
+sw/qa/extras/layout/layout2 \
 ))
 
 # note: this links msword only for the reason to have an order dependency,
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 3c18aee28a6e..98ee25b5a134 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -51,7 +51,6 @@ class SwLayoutWriter : public SwModelTestBase
 protected:
 void CheckRedlineFootnotesHidden();
 void CheckRedlineSectionsHidden();
-void CheckRedlineCharAttributesHidden();
 
 SwDoc* createDoc(const char* pName = nullptr);
 };
@@ -96,6 +95,19 @@ void SwLayoutWriter::CheckRedlineFootnotesHidden()
 assertXPath(pXmlDoc, "/root/page[1]/ftncont/ftn[2]/txt[1]/Text[1]", 
"Portion", "mo");
 }
 
+void SwLayoutWriter::CheckRedlineSectionsHidden()
+{
+discardDumpedLayout();
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/merged", 
"paraPropsNodeIndex", "12");
+assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "nType", 
"PortionType::Para");
+assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "Portion", 
"folah");
+assertXPath(pXmlDoc, "/root/page[1]/body/section[1]/txt[1]/merged", 
"paraPropsNodeIndex", "20");
+assertXPath(pXmlDoc, "/root/page[1]/body/section[1]/txt[1]/Text[1]", 
"nType",
+"PortionType::Para");
+assertXPath(pXmlDoc, "/root/page[1]/body/section[1]/txt[1]/Text[1]", 
"Portion", "folah");
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFootnotes)
 {
 createDoc("redline_footnotes.odt");
@@ -2036,19 +2048,6 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, 
testRedlineFlysAtFlys)
 assertXPath(pXmlDoc, "/root/page[1]/body/txt[3]/Text[2]", "Portion", "az");
 }
 
-void SwLayoutWriter::CheckRedlineSectionsHidden()
-{
-discardDumpedLayout();
-xmlDocUniquePtr pXmlDoc = parseLayoutDump();
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/merged", 
"paraPropsNodeIndex", "12");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "nType", 
"PortionType::Para");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "Portion", 
"folah");
-assertXPath(pXmlDoc, "/root/page[1]/body/section[1]/txt[1]/merged", 
"paraPropsNodeIndex", "20");
-assertXPath(pXmlDoc, "/root/page[1]/body/section[1]/txt[1]/Text[1]", 
"nType",
-"PortionType::Para");
-assertXPath(pXmlDoc, "/root/page[1]/body/section[1]/txt[1]/Text[1]", 
"Portion", "folah");
-}
-
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineSections)
 {
 createDoc("redline_sections.fodt");
@@ -2197,2314 +2196,6 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineTables)
 assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "Portion", 
"foar");
 }
 
-// this mainly tests that splitting portions across redlines in SwAttrIter 
works
-void SwLayoutWriter::CheckRedlineCharAttributesHidden()
-{
-discardDumpedLayout();
-xmlDocUniquePtr pXmlDoc = parseLayoutDump();
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/merged", 
"paraPropsNodeIndex", "9");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "nType", 
"PortionType::Para");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "Portion", 
"foobaz");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/merged", 
"paraPropsNodeIndex", "10");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/Text[1]", "nType", 
"PortionType::Para");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/Text[1]", "Portion", 
"foobaz");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[3]/merged", 
"paraPropsNodeIndex", "11");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[3]/Text[1]", "nType", 
"PortionType::Text");
-assertXPath(pXmlDoc, "/root

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

2020-10-09 Thread Alain Romedenne (via logerrit)
 source/text/shared/02/01170103.xhp |   36 -
 source/text/shared/02/01170202.xhp |  143 -
 2 files changed, 114 insertions(+), 65 deletions(-)

New commits:
commit 8968f31fbb6dedd29d37bfb296b9d857c6d6bc5a
Author: Alain Romedenne 
AuthorDate: Wed Sep 23 16:29:07 2020 +0200
Commit: Olivier Hallot 
CommitDate: Fri Oct 9 18:32:07 2020 +0200

tdf#92183 Database form events refresher

- h2 tags introduced
- vetoable routines that can be interrupted have been precised
- Added routine/interface API information as help index entries

- text/sbasic/shared/01170103.xhp page overlap with 
text/shared/02/01170103.xhp may have to be tackled later

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

diff --git a/source/text/shared/02/01170103.xhp 
b/source/text/shared/02/01170103.xhp
index 69e9607fa..24a83972e 100644
--- a/source/text/shared/02/01170103.xhp
+++ b/source/text/shared/02/01170103.xhp
@@ -31,7 +31,7 @@
 events; controls
 macros; assigning to events in forms
 
-Events
+Events
   On the 
Events tab page you can link macros to events that occur in a 
form's control fields.
 
 When the event 
occurs, the linked macro will be called. To assign a macro to an event, press 
the ... button. The Assign Action dialog opens.
@@ -40,51 +40,53 @@
 
 Depending on 
the control, different events are available. Only the available events for the 
selected control and context are listed on the Events tab 
page.The following events are defined:
 
-Approve 
actionrenamed from Before commencing, issue 97356
+Approve actionrenamed from Before commencing, 
issue 97356
   This event takes place before an action is triggered by clicking the 
control. For example, clicking a "Submit" button initiates 
a send action; however, the actual "send" process is started only when the 
When initiating event occurs. The Approve action 
event allows you to kill the process. If the linked method sends back FALSE, 
When initiating will not be executed.
 
-Execute 
actionrenamed from When initiated, issue 97356
+Execute actionrenamed from When initiated, 
issue 97356
   The Execute action event occurs when an action is 
started. For example, if you have a "Submit" button in 
your form, the send process represents the action to be initiated.
 
-Changed
+Changed
   The Changed event takes place when the control loses the 
focus and the content of the control has changed since it lost the 
focus.
 
-Text 
modified
+Text modified
   The Text modified event takes place if you enter or modify 
a text in an input field.
 
-Item 
status changed
+Item status changed
   The Item status changed event takes 
place if the status of the control field has changed. The Item 
status changed event takes place if the status of the control field has 
changed.
 
-When 
receiving focus
+When receiving focus
   The When receiving focus event takes place if a control 
field receives the focus.
 
-When 
losing focus
+When losing focus
   The When losing focus event takes place if a control field 
loses the focus.
 
-Key 
pressed
+Key pressed
   The Key pressed event occurs when the user presses any key 
while the control has the focus. This event may be linked to a macro 
for checking entries.
 
-Key 
released
+Key released
   The Key released event occurs when the user releases any 
key while the control has the focus.
 
-Mouse 
inside
+Mouse inside
   The Mouse inside event takes place if the mouse is inside 
the control field.
 
-Mouse 
moved while key pressed
+Mouse moved while key pressed
   The Mouse moved while key pressed event takes place when 
the mouse is dragged while a key is pressed. An example is when, during 
drag-and-drop, an additional key determines the mode (move or copy).
 
-Mouse 
moved
+Mouse moved
   The Mouse moved event occurs if the mouse moves over the 
control.
 
-Mouse 
button pressed
+Mouse button pressed
   The Mouse button pressed event occurs if the mouse button 
is pressed while the mouse pointer is on the control.
   Note that this 
event is also used for notifying requests for a popup context menu on the 
control.
 
-Mouse 
button released
+Mouse button released
   The Mouse button released event occurs if the mouse button 
is released while the mouse pointer is on the control.
 
-Mouse 
outside
+Mouse outside
   The Mouse outside event takes place when the mouse is 
outside the control field.
-
+
+
+
 
 
diff --git a/source/text/shared/02/01170202.xhp 
b/source/text/shared/02/01170202.xhp
index 65dfee343..dd5533faf 100644
--- a/source/text/shared/02/01170202.xhp
+++ b/source/text/shared/02/01170202.xhp
@@ -22,17 +22,18 @@

 
   
- Events
+ Database Form Events
  /text/shared/02/01170202.xhp
   


   
-forms; events
- events;in forms
-
-Events
- The Events tab p

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

2020-10-09 Thread Caolán McNamara (via logerrit)
 sc/source/ui/view/editsh.cxx |   15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 7c9a40f7cf996ab2ad15d595a262698435be42e0
Author: Caolán McNamara 
AuthorDate: Fri Oct 9 15:34:27 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 9 18:08:30 2020 +0200

EditView may not have a Window

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

diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 83e4adaf815f..e076c762be1d 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -298,8 +298,8 @@ void ScEditShell::Execute( SfxRequest& rReq )
 pTopView->Paste();
 }
 
-if (pTopView)
-pTopView->GetWindow()->GrabFocus();
+if (vcl::Window* pViewWindow = pTopView ? 
pTopView->GetWindow() : nullptr)
+pViewWindow->GrabFocus();
 }
 break;
 
@@ -310,7 +310,8 @@ void ScEditShell::Execute( SfxRequest& rReq )
 if (pTopView)
 {
 pTopView->Paste();
-pTopView->GetWindow()->GrabFocus();
+if (vcl::Window* pViewWindow = pTopView ? 
pTopView->GetWindow() : nullptr)
+pViewWindow->GrabFocus();
 }
 }
 break;
@@ -458,8 +459,8 @@ void ScEditShell::Execute( SfxRequest& rReq )
 
 }
 
-if (pTopView)
-pTopView->GetWindow()->GrabFocus();
+if (vcl::Window* pViewWindow = pTopView ? 
pTopView->GetWindow() : nullptr)
+pViewWindow->GrabFocus();
 }
 break;
 
@@ -492,8 +493,8 @@ void ScEditShell::Execute( SfxRequest& rReq )
 }
 pDlg.disposeAndClear();
 
-if (pTopView)
-pTopView->GetWindow()->GrabFocus();
+if (vcl::Window* pViewWindow = pTopView ? 
pTopView->GetWindow() : nullptr)
+pViewWindow->GrabFocus();
 }
 break;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Caolán McNamara (via logerrit)
 sc/source/ui/view/editsh.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 5744ed4ff9f2fab5073c5f8b3153b18109cb5594
Author: Caolán McNamara 
AuthorDate: Fri Oct 9 15:38:02 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 9 18:08:43 2020 +0200

EditView->GetWindow()->GetClipboard() is the same as GetSystemClipboard()

so we don't really need the intermediate vcl::Window to get that

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

diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index e076c762be1d..f3b2060c651f 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -640,8 +640,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
 const SvxFieldData* pField = pEditView->GetFieldAtCursor();
 if (const SvxURLField* pURLField = dynamic_cast(pField))
 {
-uno::Reference 
xClipboard
-= pEditView->GetWindow()->GetClipboard();
+uno::Reference 
xClipboard = GetSystemClipboard();
 
 if (comphelper::LibreOfficeKit::isActive())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Alain Romedenne (via logerrit)
 source/auxiliary/sbasic.tree  |1 +
 source/media/helpimg/sbasic/Defxxx_statements.svg |5 +++--
 source/text/sbasic/shared/03101100.xhp|7 ---
 source/text/sbasic/shared/03101120.xhp|3 +--
 source/text/sbasic/shared/03102000.xhp|2 +-
 5 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit 090116c2791f65e2871b0211ba78f6a4a742dba7
Author: Alain Romedenne 
AuthorDate: Mon Oct 5 15:33:49 2020 +0200
Commit: Olivier Hallot 
CommitDate: Fri Oct 9 18:02:44 2020 +0200

tdf#134xxx DefErr syntax diagram

- toc update
- prefix dupe usage fixed - letter 'k'
- DefErr diagram

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

diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree
index 1db5006a2..6e3c33ff4 100644
--- a/source/auxiliary/sbasic.tree
+++ b/source/auxiliary/sbasic.tree
@@ -120,6 +120,7 @@
 DefCur 
Statement
 DefDate 
Statement
 DefDbl 
Statement
+DefErr 
Statement
 DefInt 
Statement
 DefLng 
Statement
 DefObj 
Statement
diff --git a/source/media/helpimg/sbasic/Defxxx_statements.svg 
b/source/media/helpimg/sbasic/Defxxx_statements.svg
index c438bf408..769d856d4 100644
--- a/source/media/helpimg/sbasic/Defxxx_statements.svg
+++ b/source/media/helpimg/sbasic/Defxxx_statements.svg
@@ -1,4 +1,4 @@
-http://www.w3.org/2000/svg";>
+http://www.w3.org/2000/svg";>
 
 

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

2020-10-09 Thread László Németh (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx|   11 +++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 9b4bda5361f7ed06b07ab8dd59aeb77278c73195
Author: László Németh 
AuthorDate: Fri Oct 9 13:05:55 2020 +0200
Commit: László Németh 
CommitDate: Fri Oct 9 17:37:43 2020 +0200

tdf#136955 DOCX import: fix shape paragraph margins

based on bad style inheritance, in the case of not
first paragraphs of shapes.

Regression from commit dc0300eac3b755bc207cd1fe87217f4ebaeb9f58
(tdf#118521 DOCX import: fix paragraph margin from paragraph style),
revealing the problematic m_sCurrentParaStyleName, see also
commit 8920d865ee148518bf71f71ce1866b24cc17c07e for more information.

Follow-up of commit c04ee66c7cfeb725d637b0f9ec3e3b1f8776bfe9
(tdf#134784 DOCX import: fix shape paragraph margins).

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index e45d99c6d2d7..6e4560493d87 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -813,6 +813,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf134784, "tdf134784.docx")
 CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xParagraph, 
"ParaTopMargin"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf136955, "tdf134784.docx")
+{
+uno::Reference textbox(getShape(1), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(3, getParagraphs(textbox));
+uno::Reference xParagraph = getParagraphOfText(2, 
textbox);
+
+// These weren't zero (values inherited from style of the previous 
paragraph in the main text)
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xParagraph, 
"ParaBottomMargin"));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xParagraph, 
"ParaTopMargin"));
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf104348_contextMargin, 
"tdf104348_contextMargin.docx")
 {
 // tdf#104348 shows that ContextMargin belongs with Top/Bottom handling
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index f16d5fa794d5..f6ede7c143b4 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -785,7 +785,7 @@ OUString DomainMapper_Impl::GetCurrentParaStyleName()
 // use saved currParaStyleName as a fallback, in case no particular para 
style name applied.
 // tdf#134784 except in the case of first paragraph of shapes to avoid bad 
fallback.
 // TODO fix this "highly inaccurate" m_sCurrentParaStyleName
-if ( !m_bIsFirstParaInShape )
+if ( !IsInShape() )
 sName = m_sCurrentParaStyleName;
 
 PropertyMapPtr pParaContext = GetTopContextOfType(CONTEXT_PARAGRAPH);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: autogen.sh

2020-10-09 Thread Tor Lillqvist (via logerrit)
 autogen.sh |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 6d680b67632b14ce14e761558c07652b7e6782ea
Author: Tor Lillqvist 
AuthorDate: Fri Oct 9 17:05:51 2020 +0300
Commit: Tor Lillqvist 
CommitDate: Fri Oct 9 17:27:24 2020 +0200

Enable building for WSL (Linux) on WSL

Change-Id: I47a81a730735ff8c315a57a78c418da2b771e838
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104123
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/autogen.sh b/autogen.sh
index beda712747ce..1779de77e6f3 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -300,9 +300,14 @@ if (defined $ENV{NOCONFIGURE}) {
 # When running a shell script from Perl on WSL, weirdly named
 # environment variables like the "ProgramFiles(x86)" one don't get
 # imported by the shell. So export it as PROGRAMFILESX86 instead.
-if (`wslsys 2>/dev/null` ne "") {
+my $building_for_linux = 0;
+foreach my $arg (@args) {
+$building_for_linux = 1 if ($arg =~ /--host=x86_64.*linux/);
+}
+if (`wslsys 2>/dev/null` ne "" && !$building_for_linux) {
 if (!$ENV{"ProgramFiles(x86)"}) {
-print STDERR "To build on WSL, you need to set the WSLENV 
environment variable in the Control Panel to 'ProgramFiles(x86)'\n";
+print STDERR "To build for Windows on WSL, you need to set the 
WSLENV environment variable in the Control Panel to 'ProgramFiles(x86)'\n";
+print STDERR "If you actually do want to build for WSL (Linux) on 
WSL, pass a --host=x86_64-pc-linux-gnu option\n";
 exit (1);
 }
 $ENV{"PROGRAMFILESX86"} = $ENV{"ProgramFiles(x86)"};
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Stephan Bergmann (via logerrit)
 dev/null|binary
 sw/qa/extras/uiwriter/uiwriter3.cxx |   48 
 2 files changed, 48 deletions(-)

New commits:
commit 3273170cf63b37f415b21f560e300847bfd2ecde
Author: Stephan Bergmann 
AuthorDate: Fri Oct 9 11:01:55 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 9 17:06:35 2020 +0200

Revert "tdf#136728 : sw_uiwriter: Add unittest"

This reverts commit 1da5f05be97b2cf4fa59adff6a77bdb70927202b.  It not only
failed on Windows (for reasons that have apparently been left unidentified 
and
been worked around with a

  #if !defined(_WIN32) // FIXME: For some reason, jenkins win build hangs 
here

instead), but also caused CppunitTest_sw_uiwriter to livelock with an ever
growing

> [...]
> warn:vcl.schedule:152:152:vcl/source/app/svapp.cxx:469: 
ProcessEventsToIdle: 197000
> warn:vcl.schedule:152:152:vcl/source/app/svapp.cxx:469: 
ProcessEventsToIdle: 198000
> warn:vcl.schedule:152:152:vcl/source/app/svapp.cxx:469: 
ProcessEventsToIdle: 199000
> warn:vcl.schedule:152:152:vcl/source/app/svapp.cxx:469: 
ProcessEventsToIdle: 20
> warn:vcl.schedule:152:152:vcl/source/app/svapp.cxx:469: 
ProcessEventsToIdle: 201000
> warn:vcl.schedule:152:152:vcl/source/app/svapp.cxx:469: 
ProcessEventsToIdle: 202000
> warn:vcl.schedule:152:152:vcl/source/app/svapp.cxx:469: 
ProcessEventsToIdle: 203000
> warn:vcl.schedule:152:152:vcl/source/app/svapp.cxx:469: 
ProcessEventsToIdle: 204000
> warn:vcl.schedule:152:152:vcl/source/app/svapp.cxx:469: 
ProcessEventsToIdle: 205000
> warn:vcl.schedule:152:152:vcl/source/app/svapp.cxx:469: 
ProcessEventsToIdle: 206000
> warn:vcl.schedule:152:152:vcl/source/app/svapp.cxx:469: 
ProcessEventsToIdle: 207000
> warn:vcl.schedule:152:152:vcl/source/app/svapp.cxx:469: 
ProcessEventsToIdle: 208000
> [...]

in (slow) Linux ASan+UBSan builds, see the comments at
 and
 "tdf#136728 : 
sw_uiwriter:
Add unittest".  So until the underlying issue has been identified and 
solved,
temporarily remove the test again to get builds unstuck.

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

diff --git a/sw/qa/extras/uiwriter/data3/tdf136728.odt 
b/sw/qa/extras/uiwriter/data3/tdf136728.odt
deleted file mode 100644
index a343938ed59f..
Binary files a/sw/qa/extras/uiwriter/data3/tdf136728.odt and /dev/null differ
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index dc98dfffd686..eb42824287d9 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -73,54 +73,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf129382)
 CPPUNIT_ASSERT_EQUAL(8, getShapes());
 }
 
-CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf136728)
-{
-#if !defined(_WIN32) // FIXME: For some reason, jenkins win build hangs here
-
-load(DATA_DIRECTORY, "tdf136728.odt");
-
-SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
-CPPUNIT_ASSERT(pTextDoc);
-
-CPPUNIT_ASSERT_EQUAL(39, getPages());
-
-dispatchCommand(mxComponent, ".uno:SelectAll", {});
-
-SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
-rtl::Reference xTransfer = new SwTransferable(*pWrtShell);
-xTransfer->Cut();
-Scheduler::ProcessEventsToIdle();
-
-CPPUNIT_ASSERT_EQUAL(1, getPages());
-
-TransferableDataHelper aHelper(xTransfer.get());
-SwTransferable::Paste(*pWrtShell, aHelper);
-Scheduler::ProcessEventsToIdle();
-
-CPPUNIT_ASSERT_EQUAL(39, getPages());
-
-dispatchCommand(mxComponent, ".uno:JumpToNextTable", {});
-
-dispatchCommand(mxComponent, ".uno:DeleteTable", {});
-Scheduler::ProcessEventsToIdle();
-
-CPPUNIT_ASSERT_EQUAL(1, getPages());
-
-SwTransferable::Paste(*pWrtShell, aHelper);
-Scheduler::ProcessEventsToIdle();
-
-CPPUNIT_ASSERT_EQUAL(39, getPages());
-
-dispatchCommand(mxComponent, ".uno:JumpToNextTable", {});
-
-dispatchCommand(mxComponent, ".uno:DeleteTable", {});
-Scheduler::ProcessEventsToIdle();
-
-// Without the fix in place, this test would have crashed here
-CPPUNIT_ASSERT_EQUAL(1, getPages());
-#endif
-}
-
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134227)
 {
 load(DATA_DIRECTORY, "tdf134227.docx");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Stephan Bergmann (via logerrit)
 solenv/gdb/boost/util/printing.py   |5 -
 solenv/gdb/libreoffice/util/printing.py |5 -
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit f9d9a21d0271d3ddc689dfe12983ec6c96d8ccbc
Author: Stephan Bergmann 
AuthorDate: Fri Oct 9 15:25:06 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 9 17:04:24 2020 +0200

Adapt solenv/gdb/ to old Python

After 4a899a5f8a72ea29a6919316afe3627de9f33e95 "Fix Python deprecation 
warnings"e.g. 

started to complain

> Traceback (most recent call last):
>   File 
"/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir/program/libuno_sal.so.3-gdb.py",
 line 23, in 
> module = importlib.import_module('libreoffice.' + mod)
>   File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in 
import_module
> __import__(name)
>   File 
"/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/solenv/gdb/libreoffice/sal.py",
 line 14, in 
> from libreoffice.util import printing
>   File 
"/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/solenv/gdb/libreoffice/util/printing.py",
 line 10, in 
> from collections.abc import Mapping
> ImportError: No module named abc

etc. when lode's bin/kill-wrapper calls gdb to obtain backtraces of hung
processes.

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

diff --git a/solenv/gdb/boost/util/printing.py 
b/solenv/gdb/boost/util/printing.py
index 85a91c9340a4..22bf29f8030a 100644
--- a/solenv/gdb/boost/util/printing.py
+++ b/solenv/gdb/boost/util/printing.py
@@ -19,7 +19,10 @@
 # along with this program.  If not, see .
 
 
-from collections.abc import Mapping
+try:
+from collections.abc import Mapping
+except:
+from collections import Mapping
 import gdb
 import re
 import six
diff --git a/solenv/gdb/libreoffice/util/printing.py 
b/solenv/gdb/libreoffice/util/printing.py
index 30e311678025..a31e353cfa4d 100644
--- a/solenv/gdb/libreoffice/util/printing.py
+++ b/solenv/gdb/libreoffice/util/printing.py
@@ -7,7 +7,10 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-from collections.abc import Mapping
+try:
+from collections.abc import Mapping
+except:
+from collections import Mapping
 import gdb
 import re
 import six
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/platform/com_MSC_defs.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 396b12ec0b6c47a31e5f65784597bc3cf2803733
Author: Stephan Bergmann 
AuthorDate: Fri Oct 9 14:06:10 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 9 15:43:41 2020 +0200

Split off REAL_BUILD_CC_FLAGS from REAL_BUILD_CC

...same as is done with REAL_CC and REAL_CC_FLAGS in
solenv/gbuild/platform/com_MSC_class.mk.  Otherwise, my clang-cl build 
(where
CC and those REAL*_CC vars derived from it contains the executable plus a 
bunch
of command line arguments) would fail in ExternalProject_libgpg-error with

> Error: could not create process ""C:/llvm/inst/bin/clang.exe 
--driver-mode=cl -FIIntrin.h -fmsc-version=1927 -Qunused-arguments 
--target=x86_64-pc-windows-mscv -fansi-escape-codes -fcolor-diagnostics  
-ferror-limit=0"  -nologo -EHsc -MDd -Gy -Ob1 -Oxs -Oy-  
-IC:/lo-clang/core/include -IC:/PROGRA~2/WI3CF2~1/10/Include/10.0.18362.0/ucrt 
-IC:/PROGRA~2/WI3CF2~1/10/include 
-IC:/PROGRA~2/MIB055~1/2019/COMMUN~1/VC/Tools/MSVC/1427~1.291/Include 
-IC:/PROGRA~2/WI3CF2~1/10/Include/10.0.18362.0/um 
-IC:/PROGRA~2/WI3CF2~1/10/Include/10.0.18362.0/shared 
-IC:/java/ADOPTO~1.NET/x64/JDK-15~1/include/win32 
-IC:/java/ADOPTO~1.NET/x64/JDK-15~1/include-Zi -FS -I. -I. 
-Femkheader.exe ./mkheader.c -link -debug -LIBPATH:. 
-LIBPATH:C:/java/ADOPTO~1.NET/x64/JDK-15~1/lib 
-LIBPATH:C:/PROGRA~2/MIB055~1/2019/COMMUN~1/VC/Tools/MSVC/1427~1.291/lib/x64 
-LIBPATH:C:/PROGRA~2/WI3CF2~1/10/lib/x64 
-LIBPATH:C:/PROGRA~2/WI3CF2~1/10/lib/10.0.18362.0/um/x64 
-LIBPATH:C:/PROGRA~2/WI3CF2~1/10/lib/10.0.18362.0/ucrt/
 x64 -LIBPATH:C:/PROGRA~2/WI3CF2~1/NETFXSDK/4.8//Lib/um/x64": 2

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

diff --git a/solenv/gbuild/platform/com_MSC_defs.mk 
b/solenv/gbuild/platform/com_MSC_defs.mk
index 5a02731bac7b..892faf76931b 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -365,7 +365,7 @@ endef
 # we explicitly have to replace cygwin with mingw32 for the host, but the 
build must stay cygwin, or cmd.exe processes will be spawned
 gb_WIN_GPG_WINDRES_target := $(if $(filter INTEL,$(CPUNAME)),pe-i386,pe-x86-64)
 gb_WIN_GPG_platform_switches := --build=$(BUILD_PLATFORM) --host=$(subst 
cygwin,mingw32,$(HOST_PLATFORM))
-gb_WIN_GPG_cross_setup_exports = export REAL_BUILD_CC="$(CC_FOR_BUILD)" \
+gb_WIN_GPG_cross_setup_exports = export REAL_BUILD_CC="$(filter-out 
-%,$(CC_FOR_BUILD))" REAL_BUILD_CC_FLAGS="$(filter -%,$(CC_FOR_BUILD))" \
 && export CC_FOR_BUILD="$(call 
gb_Executable_get_target_for_build,gcc-wrapper) $(if 
$(verbose),--wrapper-print-cmdline) --wrapper-env-prefix=REAL_BUILD_ 
$(SOLARINC) -L$(subst ;, -L,$(ILIB_FOR_BUILD))" \
 && export RC='windres -O COFF --target=$(gb_WIN_GPG_WINDRES_target) 
--preprocessor='\''$(call gb_Executable_get_target_for_build,cpp) -+ 
-DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\'
 
___
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' - sc/qa sc/source sd/qa sd/source svx/sdi sw/qa sw/source

2020-10-09 Thread Mert Tumer (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   25 +
 sc/source/ui/app/scmod.cxx   |4 +++-
 sd/qa/unit/uiimpress.cxx |   17 +
 sd/source/ui/view/drviewse.cxx   |9 -
 svx/sdi/svx.sdi  |2 +-
 sw/qa/extras/uiwriter/uiwriter.cxx   |   19 +++
 sw/source/uibase/uiview/view0.cxx|6 +-
 7 files changed, 78 insertions(+), 4 deletions(-)

New commits:
commit d90a404a078b9fc1baa98ec0eb3d6a90f869b336
Author: Mert Tumer 
AuthorDate: Thu Oct 8 13:37:07 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Oct 9 15:37:51 2020 +0200

Added optional parameter Enabled for uno:SpellOnline

Change-Id: I3578b0a002ea2cdcc7893972607f26732ce545ea
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104083
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 4962ebc5fb68..33a15349b70b 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -110,6 +111,7 @@ public:
 void testSheetGeometryDataCorrectness();
 void testDeleteCellMultilineContent();
 void testFunctionDlg();
+void testSpellOnlineParameter();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
@@ -155,6 +157,7 @@ public:
 CPPUNIT_TEST(testSheetGeometryDataCorrectness);
 CPPUNIT_TEST(testDeleteCellMultilineContent);
 CPPUNIT_TEST(testFunctionDlg);
+CPPUNIT_TEST(testSpellOnlineParameter);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1684,6 +1687,28 @@ void ScTiledRenderingTest::testFunctionDlg()
 SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
 }
 
+void ScTiledRenderingTest::testSpellOnlineParameter()
+{
+ScModelObj* pModelObj = createDoc("empty.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+bool bSet = pDoc->GetDocOptions().IsAutoSpell();
+
+uno::Sequence params =
+{
+comphelper::makePropertyValue("Enable", uno::makeAny(!bSet)),
+};
+lcl_dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell());
+
+// set the same state as now and we don't expect any change (no-toggle)
+params =
+{
+comphelper::makePropertyValue("Enable", uno::makeAny(!bSet)),
+};
+lcl_dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell());
+}
+
 void ScTiledRenderingTest::testVbaRangeCopyPaste()
 {
 comphelper::LibreOfficeKit::setActive();
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 739d13322051..59fc059bf5ef 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -342,7 +342,9 @@ void ScModule::Execute( SfxRequest& rReq )
 {
 bool bSet;
 const SfxPoolItem* pItem;
-if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( 
nSlot, true, &pItem ) )
+if (pReqArgs->HasItem(FN_PARAM_1, &pItem))
+bSet = static_cast(pItem)->GetValue();
+else if ( pReqArgs && SfxItemState::SET == 
pReqArgs->GetItemState( nSlot, true, &pItem ) )
 bSet = static_cast(pItem)->GetValue();
 else
 {   // Toggle
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index ce7a310bc289..738b09a3fd7d 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -275,6 +275,23 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testPageFillGradient)
 CPPUNIT_ASSERT_EQUAL(OUString("ff"), 
aGradient.GetStartColor().AsRGBHexString());
 CPPUNIT_ASSERT_EQUAL(OUString("ff"), 
aGradient.GetEndColor().AsRGBHexString());
 }
+
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testSpellOnlineParameter)
+{
+mxComponent = 
loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/empty.fodp"));
+auto pImpressDocument = 
dynamic_cast(mxComponent.get());
+bool bSet = pImpressDocument->GetDoc()->GetOnlineSpell();
+
+uno::Sequence 
params(comphelper::InitPropertySequence({{"Enable", uno::makeAny(!bSet)}}));
+dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell());
+
+// set the same state as now and we don't expect any change (no-toggle)
+params = comphelper::InitPropertySequence({{"Enable", 
uno::makeAny(!bSet)}});
+dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim

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

2020-10-09 Thread Caolán McNamara (via logerrit)
 filter/source/msfilter/msdffimp.cxx |   21 +
 filter/source/msfilter/svdfppt.cxx  |   14 +++---
 2 files changed, 16 insertions(+), 19 deletions(-)

New commits:
commit 643ecd7c36f04da6d9b833855f37971c9cef3d79
Author: Caolán McNamara 
AuthorDate: Fri Oct 9 11:45:44 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 9 15:11:20 2020 +0200

ofz: Invalid-enum-value

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

diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index a647709367af..bd29942a6931 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -911,7 +911,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& 
rSet, const MSO_SPT eSh
 sal_Int32 nLineWidth = static_cast(GetPropertyValue( 
DFF_Prop_lineWidth, 9525 ));
 
 // support LineCap
-const MSO_LineCap 
eLineCap(static_cast(GetPropertyValue(DFF_Prop_lineEndCapStyle, 
mso_lineEndCapFlat)));
+auto eLineCap = GetPropertyValue(DFF_Prop_lineEndCapStyle, 
mso_lineEndCapFlat);
 
 switch(eLineCap)
 {
@@ -933,7 +933,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& 
rSet, const MSO_SPT eSh
 }
 }
 
-MSO_LineDashing eLineDashing = 
static_cast(GetPropertyValue( DFF_Prop_lineDashing, 
mso_lineSolid ));
+auto eLineDashing = GetPropertyValue( DFF_Prop_lineDashing, 
mso_lineSolid);
 if (eLineDashing == mso_lineSolid || nLineWidth < 0)
 rSet.Put(XLineStyleItem( drawing::LineStyle_SOLID ) );
 else
@@ -1063,9 +1063,9 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& 
rSet, const MSO_SPT eSh
 
 if ( IsProperty( DFF_Prop_lineStartArrowhead ) )
 {
-MSO_LineEnd eLineEnd = 
static_cast(GetPropertyValue( DFF_Prop_lineStartArrowhead, 0 ));
-MSO_LineEndWidtheWidth = 
static_cast(GetPropertyValue( DFF_Prop_lineStartArrowWidth, 
mso_lineMediumWidthArrow ));
-MSO_LineEndLength   eLength = 
static_cast(GetPropertyValue( DFF_Prop_lineStartArrowLength, 
mso_lineMediumLenArrow ));
+auto eLineEnd = GetPropertyValue(DFF_Prop_lineStartArrowhead, 
0);
+auto eWidth = GetPropertyValue(DFF_Prop_lineStartArrowWidth, 
mso_lineMediumWidthArrow);
+auto eLength = GetPropertyValue(DFF_Prop_lineStartArrowLength, 
mso_lineMediumLenArrow);
 
 sal_Int32   nArrowWidth;
 boolbArrowCenter;
@@ -1576,7 +1576,7 @@ void DffPropertyReader::ApplyCustomShapeTextAttributes( 
SfxItemSet& rSet ) const
 rSet.Put( makeSdrTextUpperDistItem( nTextTop ) );
 rSet.Put( makeSdrTextLowerDistItem( nTextBottom ) );
 
-rSet.Put( makeSdrTextWordWrapItem( 
static_cast(GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare 
)) != mso_wrapNone ) );
+rSet.Put( makeSdrTextWordWrapItem( GetPropertyValue(DFF_Prop_WrapText, 
mso_wrapSquare) != mso_wrapNone ) );
 rSet.Put( makeSdrTextAutoGrowHeightItem( ( GetPropertyValue( 
DFF_Prop_FitTextToShape, 0 ) & 2 ) != 0 ) );
 }
 
@@ -5116,9 +5116,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
 pImpRec->nShapeId   = rObjData.nShapeId;
 pImpRec->eShapeType = rObjData.eShapeType;
 
-MSO_WrapMode eWrapMode( static_cast(GetPropertyValue(
-DFF_Prop_WrapText,
-mso_wrapSquare )) 
);
+auto eWrapMode = GetPropertyValue(DFF_Prop_WrapText, mso_wrapSquare);
 rObjData.bClientAnchor = maShapeRecords.SeekToContent( rSt,
 DFF_msofbtClientAnchor,
 SEEK_FROM_CURRENT_AND_RESTART );
@@ -5342,7 +5340,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
 aSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
 }
 
-switch ( static_cast(GetPropertyValue( 
DFF_Prop_WrapText, mso_wrapSquare )) )
+switch (GetPropertyValue(DFF_Prop_WrapText, mso_wrapSquare))
 {
 case mso_wrapNone :
 aSet.Put( makeSdrTextAutoGrowWidthItem( true ) );
@@ -5371,8 +5369,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
 // read text anchor
 if ( IsProperty( DFF_Prop_anchorText ) )
 {
-MSO_Anchor eTextAnchor =
-static_cast(GetPropertyValue( 
DFF_Prop_anchorText, 0 ));
+auto eTextAnchor = GetPropertyValue(DFF_Prop_anchorText, 0);
 
 SdrTextVertAdjust eTVA = SDRTEXTVERTADJUST_CENTER;
 bool bTVASet(false);
diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter

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

2020-10-09 Thread Mark Hung (via logerrit)
 sw/source/core/text/portxt.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 54e1e5f597705a1244701c75233a2c3a68a7d844
Author: Mark Hung 
AuthorDate: Thu Oct 8 21:37:22 2020 +0800
Commit: Mark Hung 
CommitDate: Fri Oct 9 14:43:23 2020 +0200

tdf#130314 fix incorrect logic in last commit

Previous commit ( ac76f9e8ad8b ) contains a logical
mistake. Change && to || there.

Change-Id: Id982ce6f22b0022316b564029f813da9072b71e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104089
Tested-by: Jenkins
Reviewed-by: Mark Hung 

diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 559c3bea0ad8..0959ef314948 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -582,7 +582,7 @@ TextFrameIndex SwTextPortion::GetSpaceCnt(const 
SwTextSizeInfo &rInf,
 return TextFrameIndex(0);
 }
 
-if ( InExpGrp() && PortionType::InputField == GetWhichPor() )
+if ( InExpGrp() || PortionType::InputField == GetWhichPor() )
 {
 if( !IsBlankPortion() && !InNumberGrp() && !IsCombinedPortion() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Caolán McNamara (via logerrit)
 lotuswordpro/source/filter/lwpparaborderoverride.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1064ff57880dc6d35deb4ddc9aa83d2a5273aa4a
Author: Caolán McNamara 
AuthorDate: Fri Oct 9 09:45:45 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 9 14:06:22 2020 +0200

ofz: Invalid-enum-value

extend

commit 9d1c8e66f7020fa0150b23bd450e514f848bd20b
Date:   Tue Apr 5 12:35:54 2016 +0200

UBSan: Restrict BorderWidthType values to valid range on input

to the other assignment to m_eRightType

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

diff --git a/lotuswordpro/source/filter/lwpparaborderoverride.cxx 
b/lotuswordpro/source/filter/lwpparaborderoverride.cxx
index 4d372ae5b763..c0919cd7a265 100644
--- a/lotuswordpro/source/filter/lwpparaborderoverride.cxx
+++ b/lotuswordpro/source/filter/lwpparaborderoverride.cxx
@@ -152,7 +152,7 @@ void LwpParaBorderOverride::Read(LwpObjectStream *pStrm)
 
 if( pStrm->CheckExtra() )
 {
-m_eRightType = 
static_cast(pStrm->QuickReaduInt16());
+m_eRightType = readBorderWidthType(pStrm);
 m_nRightWidth = pStrm->QuickReaduInt32();
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/gcc-wrappers

2020-10-09 Thread Stephan Bergmann (via logerrit)
 solenv/gcc-wrappers/wrapper.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 22d7f7b3a5d9bde58a3b6e59f5c9117faaea4673
Author: Stephan Bergmann 
AuthorDate: Fri Oct 9 11:13:47 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 9 14:03:26 2020 +0200

Be more verbose why gcc-wrapper could not create process

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

diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx
index 56936155fa47..abc0ed2864fc 100644
--- a/solenv/gcc-wrappers/wrapper.cxx
+++ b/solenv/gcc-wrappers/wrapper.cxx
@@ -262,7 +262,8 @@ int startprocess(string command, string args, bool verbose)
 &si, // Startup Info
 &pi) // Process Information
 ) {
-cerr << "Error: could not create process" << endl;
+auto const e = GetLastError();
+cerr << "Error: could not create process \"" << cmdlineBuf << "\": 
" << e << endl;
 exit(1);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Caolán McNamara (via logerrit)
 filter/source/graphicfilter/icgm/class1.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit ff8a2eda2542c59d9aed38008ea62f1f01101983
Author: Caolán McNamara 
AuthorDate: Fri Oct 9 10:12:58 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 9 13:45:35 2020 +0200

ofz: Invalid-enum-value

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

diff --git a/filter/source/graphicfilter/icgm/class1.cxx 
b/filter/source/graphicfilter/icgm/class1.cxx
index ec8cd9246cdb..289e28db428f 100644
--- a/filter/source/graphicfilter/icgm/class1.cxx
+++ b/filter/source/graphicfilter/icgm/class1.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 
 #include 
 
@@ -197,7 +198,13 @@ void CGM::ImplDoClass1()
 }
 break;
 case 0x0f : /*Character Coding Announcer*/
-pElement->eCharacterCodingA = 
static_cast(ImplGetUI16());
+{
+auto nCharacterCoding = ImplGetUI16();
+if (nCharacterCoding <= CCA_EXT_8)
+pElement->eCharacterCodingA = 
static_cast(nCharacterCoding);
+else
+SAL_WARN("filter.icgm", "CharacterCoding " << nCharacterCoding 
<< " requested, but legal max is " << CCA_EXT_8);
+}
 break;
 case 0x10 : /*Name Precision */break;   // NS
 case 0x11 : /*Maximum VDC Extent */break;   // NS
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Caolán McNamara (via logerrit)
 filter/source/msfilter/svdfppt.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1d7f4d01bd9db38667edd03bb1aa7b66df5d6ada
Author: Caolán McNamara 
AuthorDate: Fri Oct 9 09:39:42 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 9 13:44:56 2020 +0200

ofz: Invalid-enum-value

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

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 5d29ed9a3a4f..8a4db2499371 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -932,7 +932,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, 
DffObjData& rObjData, Svx
 eTHA = SDRTEXTHORZADJUST_BLOCK;
 
 // read text anchor
-MSO_Anchor eTextAnchor = 
static_cast(GetPropertyValue( DFF_Prop_anchorText, mso_anchorTop ));
+auto eTextAnchor = GetPropertyValue(DFF_Prop_anchorText, 
mso_anchorTop);
 
 switch( eTextAnchor )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


New Defects reported by Coverity Scan for LibreOffice

2020-10-09 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

2 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)


** CID 1467972:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/table/swnewtable.cxx: 2188 in 
SwTable::ConvertSubtableBox(unsigned short, unsigned short)()



*** CID 1467972:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/table/swnewtable.cxx: 2188 in 
SwTable::ConvertSubtableBox(unsigned short, unsigned short)()
2182 {
2183 lastSize.SetHeightSizeType(SwFrameSize::Minimum);
2184 }
2185 pNewLine->GetFrameFormat()->SetFormatAttr(lastSize);
2186 }
2187 SfxPoolItem const* pRowBrush(nullptr);
>>> CID 1467972:  Error handling issues  (CHECKED_RETURN)
>>> Calling "GetItemState" without checking return value (as is done 
>>> elsewhere 54 out of 56 times).
2188 rSubLineFormat.GetItemState(RES_BACKGROUND, true, &pRowBrush);
2189 GetTabLines().insert(GetTabLines().begin() + nRow + i, 
pNewLine);
2190 for (size_t j = 0; j < pSourceLine->GetTabBoxes().size(); ++j)
2191 {
2192 if (j == nBox)
2193 {

** CID 1467971:  Uninitialized members  (UNINIT_CTOR)
/writerfilter/source/dmapper/DomainMapper_Impl.cxx: 347 in 
writerfilter::dmapper::DomainMapper_Impl::DomainMapper_Impl(writerfilter::dmapper::DomainMapper
 &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, 
writerfilter::dmapper::SourceDocumentType, const utl::MediaDescriptor &)()



*** CID 1467971:  Uninitialized members  (UNINIT_CTOR)
/writerfilter/source/dmapper/DomainMapper_Impl.cxx: 347 in 
writerfilter::dmapper::DomainMapper_Impl::DomainMapper_Impl(writerfilter::dmapper::DomainMapper
 &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, 
writerfilter::dmapper::SourceDocumentType, const utl::MediaDescriptor &)()
341 getTableManager( ).startLevel();
342 m_bUsingEnhancedFields = !utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Filter::Microsoft::Import::ImportWWFieldsAsEnhancedFields::get(m_xComponentContext);
343 
344 m_pSdtHelper = new SdtHelper(*this);
345 
346 m_aRedlines.push(std::vector());
>>> CID 1467971:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_bFrameDirectionSet" is not initialized in 
>>> this constructor nor in any functions that it calls.
347 }
348 
349 
350 DomainMapper_Impl::~DomainMapper_Impl()
351 {
352 ChainTextFrames();



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D9-ff_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiIfvVZU-2BEbYf42r6-2BCIyoflP8f8QWMYJFlnycAt5eyKmwh8c5wz8PvRStXqBZgoMXhcNJFVxvT3DpH4SjXB6PdRNbkVYBRrz4yfRFcFiLbr-2FYtNgViR-2Frt7h68r4HuCzwMjadBkxVIf9so34JTcps4EsliuDw3KamsmSnvWa0IhCPI-2FJIZYho-2F-2B0MZZQP8Zpf

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


Re: calc: jumbo sheets on windows (never gonna happen)

2020-10-09 Thread Michael Stahl

On 09.10.20 12:19, Mike Kaganski wrote:

On 09.10.2020 13:09, Luboš Luňák wrote:

On Friday 09 of October 2020, Michael Stahl wrote:

...

On 09/10/2020 11:01, Michael Stahl wrote:

POSIX provides ssize_t for this purpose but likely it doesn't exist on
MSVC...

...

afaik the only relevant 32-bit platform left is Windows, and it's
already rather restricted with big files because of how it handles
embedded objects; you'll run out of VM at ~250 math formulas iirc, due
to wasteful implementation of native OLE.

so we could use a platform-dependent type for this and say, use 32-bit
platform at your own risk...


  I'm not sure if that's me or you misunderstanding, but this is not 
about

32bit Windows, it's about all Windows. Telling 90+% of our usebase to use
their platform at their own risk is probably a really bad idea, even 
if that

platform is Windows >:).


That *would* be 32-bit-Windows-specific, *if* use (s)size_t, as Michael 
suggested. (I agree with the type having different semantics, though.)


my actual suggestion was:

> is std::make_signed_t an option?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-10-09 Thread Caolán McNamara (via logerrit)
 filter/source/msfilter/msdffimp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ffeb99b7c37cff3c446a8ae2cf745b121c9b5ce6
Author: Caolán McNamara 
AuthorDate: Fri Oct 9 09:35:34 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 9 12:34:30 2020 +0200

ofz: Invalid-enum-value

on examining the oss-fuzz stats I see this one as...
"Created: Dec 15, 2019", "Reliably Reproduces: YES", but no bug
auto-filed for it

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

diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index 314675319449..a647709367af 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1047,7 +1047,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& 
rSet, const MSO_SPT eSh
 MSO_LineJoin eLineJointDefault = mso_lineJoinMiter;
 if ( eShapeType == mso_sptMin )
 eLineJointDefault = mso_lineJoinRound;
-MSO_LineJoin eLineJoint = static_cast(GetPropertyValue( 
DFF_Prop_lineJoinStyle, eLineJointDefault ));
+auto eLineJoint = GetPropertyValue(DFF_Prop_lineJoinStyle, 
eLineJointDefault);
 css::drawing::LineJoint eXLineJoint( css::drawing::LineJoint_MITER );
 if ( eLineJoint == mso_lineJoinBevel )
 eXLineJoint = css::drawing::LineJoint_BEVEL;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Caolán McNamara (via logerrit)
 vcl/source/gdi/jobset.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 6f827c2f927bb7e3d75b9e8b00be09299494db7f
Author: Caolán McNamara 
AuthorDate: Fri Oct 9 10:05:42 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 9 12:27:22 2020 +0200

ofz: Invalid-enum-value

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

diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index a861169c9698..efe5f4972985 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -273,7 +273,14 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& 
rJobSetup )
 rJobData.SetOrientation( 
static_cast(SVBT16ToUInt16( pOldJobData->nOrientation )) );
 rJobData.SetDuplexMode( DuplexMode::Unknown );
 rJobData.SetPaperBin( SVBT16ToUInt16( pOldJobData->nPaperBin ) 
);
-rJobData.SetPaperFormat( static_cast(SVBT16ToUInt16( 
pOldJobData->nPaperFormat )) );
+sal_uInt16 nPaperFormat = 
SVBT16ToUInt16(pOldJobData->nPaperFormat);
+if (nPaperFormat < NUM_PAPER_ENTRIES)
+rJobData.SetPaperFormat(static_cast(nPaperFormat));
+else
+{
+SAL_WARN("vcl", "Parsing error: " << nPaperFormat <<
+ " paper format, but legal max is " << 
NUM_PAPER_ENTRIES);
+}
 rJobData.SetPaperWidth( static_cast(SVBT32ToUInt32( 
pOldJobData->nPaperWidth )) );
 rJobData.SetPaperHeight( static_cast(SVBT32ToUInt32( 
pOldJobData->nPaperHeight )) );
 if ( rJobData.GetDriverDataLen() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: calc: jumbo sheets on windows (never gonna happen)

2020-10-09 Thread Mike Kaganski

On 09.10.2020 13:09, Luboš Luňák wrote:

On Friday 09 of October 2020, Michael Stahl wrote:

...

On 09/10/2020 11:01, Michael Stahl wrote:

POSIX provides ssize_t for this purpose but likely it doesn't exist on
MSVC...

...

afaik the only relevant 32-bit platform left is Windows, and it's
already rather restricted with big files because of how it handles
embedded objects; you'll run out of VM at ~250 math formulas iirc, due
to wasteful implementation of native OLE.

so we could use a platform-dependent type for this and say, use 32-bit
platform at your own risk...


  I'm not sure if that's me or you misunderstanding, but this is not about
32bit Windows, it's about all Windows. Telling 90+% of our usebase to use
their platform at their own risk is probably a really bad idea, even if that
platform is Windows >:).


That *would* be 32-bit-Windows-specific, *if* use (s)size_t, as Michael 
suggested. (I agree with the type having different semantics, though.)



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


Re: calc: jumbo sheets on windows (never gonna happen)

2020-10-09 Thread Luboš Luňák
On Friday 09 of October 2020, Michael Stahl wrote:
> On 09.10.20 11:10, Stephan Bergmann wrote:
> > On 09/10/2020 11:01, Michael Stahl wrote:
> >> POSIX provides ssize_t for this purpose but likely it doesn't exist on
> >> MSVC...

 That's not what (s)size_t is. Those are for representing size of in-memory 
objects, which I perceive as something slightly different. You could have a 
platform with 32bit size_t and 64bit coordinates.

> > Would that be a useful abstraction for "accumulat[ing] things like
> > row-heights and other things", or would a more explicit "must be at
> > least 64-bit wide" type be more appropriate there.

 I'm afraid we'll end up needing to define it as a very generic type. If we go 
with row-heights-and-similar, such code shouldn't call any int/long code. But 
can we guarantee that? There's a good chance it'd cascade and spread all over 
the place.

 FWIW my personal opinion is that the normal type to use should be just 
plain 'int', unless there are special requirements. Sticking a specific 
precision all over the place is exactly how we've arrived to code full 
of 'sal_Int16' and 'sal_Int32'. But with our largest platform deciding that 
the native type on 64bit should be 32bit, the plain and simple 'int' indeed 
doesn't work out. 'loint', anyone :-/ ?

> afaik the only relevant 32-bit platform left is Windows, and it's
> already rather restricted with big files because of how it handles
> embedded objects; you'll run out of VM at ~250 math formulas iirc, due
> to wasteful implementation of native OLE.
>
> so we could use a platform-dependent type for this and say, use 32-bit
> platform at your own risk...

 I'm not sure if that's me or you misunderstanding, but this is not about 
32bit Windows, it's about all Windows. Telling 90+% of our usebase to use 
their platform at their own risk is probably a really bad idea, even if that 
platform is Windows >:).

-- 
 Luboš Luňák
 l.lu...@collabora.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-10-09 Thread Caolán McNamara (via logerrit)
 vcl/source/gdi/region.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b8fc9bbe7a37b12d10f22133480b878c83f69085
Author: Caolán McNamara 
AuthorDate: Fri Oct 9 09:55:15 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 9 11:59:39 2020 +0200

ofz: Invalid-enum-value

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

diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index c79b3a1b4657..ac4bd8a75863 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -1536,9 +1536,9 @@ SvStream& ReadRegion(SvStream& rIStrm, vcl::Region& 
rRegion)
 rIStrm.ReadUInt16( nTmp16 );
 
 enum RegionType { REGION_NULL, REGION_EMPTY, REGION_RECTANGLE, 
REGION_COMPLEX };
-RegionType meStreamedType = static_cast(nTmp16);
+auto eStreamedType = nTmp16;
 
-switch(meStreamedType)
+switch (eStreamedType)
 {
 case REGION_NULL:
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Caolán McNamara (via logerrit)
 sw/source/core/table/swnewtable.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8008bae17d8a105e8c33a43a5f27c1e09b25ade3
Author: Caolán McNamara 
AuthorDate: Fri Oct 9 08:57:09 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 9 11:27:26 2020 +0200

cid#1467972 silence Unchecked return value

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

diff --git a/sw/source/core/table/swnewtable.cxx 
b/sw/source/core/table/swnewtable.cxx
index 005b9ec40c3b..0b284e573671 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -2185,7 +2185,7 @@ void SwTable::ConvertSubtableBox(sal_uInt16 const nRow, 
sal_uInt16 const nBox)
 pNewLine->GetFrameFormat()->SetFormatAttr(lastSize);
 }
 SfxPoolItem const* pRowBrush(nullptr);
-rSubLineFormat.GetItemState(RES_BACKGROUND, true, &pRowBrush);
+(void)rSubLineFormat.GetItemState(RES_BACKGROUND, true, &pRowBrush);
 GetTabLines().insert(GetTabLines().begin() + nRow + i, pNewLine);
 for (size_t j = 0; j < pSourceLine->GetTabBoxes().size(); ++j)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Caolán McNamara (via logerrit)
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7a1b860ba5c5d422524b86245421453f35a5ff56
Author: Caolán McNamara 
AuthorDate: Fri Oct 9 08:55:25 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 9 11:26:28 2020 +0200

cid#1467971 Uninitialized scalar field

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

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 2fcd6ba2e362..f16d5fa794d5 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -266,6 +266,7 @@ DomainMapper_Impl::DomainMapper_Impl(
 m_nStartGenericField(0),
 m_bTextInserted(false),
 m_sCurrentPermId(0),
+m_bFrameDirectionSet(false),
 m_pLastSectionContext( ),
 m_pLastCharacterContext(),
 m_sCurrentParaStyleName(),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: calc: jumbo sheets on windows (never gonna happen)

2020-10-09 Thread Michael Stahl

On 09.10.20 11:10, Stephan Bergmann wrote:

On 09/10/2020 11:01, Michael Stahl wrote:

On 08.10.20 21:13, Noel Grandin wrote:
As some point we are going to have to deal with this "long" stuff, it 
really is not a great thing to have one 64-bit platform operating at 
half the bit-size of the other platform.


Here is one option:

(a) create some new typedef, something like the old sal_Long, aliased 
to "long"

(b) replace "long" with typedef in stages (so no functional change).
(c) switch the typedef of sal_Long to point to sal_Int64 and fix 
fallout.


Then rolling back (even if temporarily) is easy and the "flag day" is 
a 2 line change.


POSIX provides ssize_t for this purpose but likely it doesn't exist on 
MSVC...


Would that be a useful abstraction for "accumulat[ing] things like 
row-heights and other things", or would a more explicit "must be at 
least 64-bit wide" type be more appropriate there.


afaik the only relevant 32-bit platform left is Windows, and it's 
already rather restricted with big files because of how it handles 
embedded objects; you'll run out of VM at ~250 math formulas iirc, due 
to wasteful implementation of native OLE.


so we could use a platform-dependent type for this and say, use 32-bit 
platform at your own risk...

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


Re: calc: jumbo sheets on windows (never gonna happen)

2020-10-09 Thread Stephan Bergmann

On 09/10/2020 11:01, Michael Stahl wrote:

On 08.10.20 21:13, Noel Grandin wrote:
As some point we are going to have to deal with this "long" stuff, it 
really is not a great thing to have one 64-bit platform operating at 
half the bit-size of the other platform.


Here is one option:

(a) create some new typedef, something like the old sal_Long, aliased 
to "long"

(b) replace "long" with typedef in stages (so no functional change).
(c) switch the typedef of sal_Long to point to sal_Int64 and fix fallout.

Then rolling back (even if temporarily) is easy and the "flag day" is 
a 2 line change.


POSIX provides ssize_t for this purpose but likely it doesn't exist on 
MSVC...


Would that be a useful abstraction for "accumulat[ing] things like 
row-heights and other things", or would a more explicit "must be at 
least 64-bit wide" type be more appropriate there.


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


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - external/mariadb-connector-c

2020-10-09 Thread Julien Nabet (via logerrit)
 external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 2db12ad6f3bd5103bed80db9798b88d81f2b59e6
Author: Julien Nabet 
AuthorDate: Tue Oct 6 21:04:59 2020 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 9 11:09:46 2020 +0200

Related tdf#135202: declare libmariadb/secure/win_crypt in mk file for 
MariaDB

Change-Id: Ib9634d9e88d7e97a5c03ff4d8b7808c598c3b8bf

(cherry picked from commit cab3476aea0fc980951bf6e729879ecdc0d0e9b7)

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

diff --git a/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk 
b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
index b0c62e1b160e..89d4bfbe954e 100644
--- a/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
@@ -67,6 +67,7 @@ $(eval $(call 
gb_StaticLibrary_add_generated_cobjects,mariadb-connector-c,\
UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_socket \
$(if $(filter $(OS),WNT), \
UnpackedTarball/mariadb-connector-c/libmariadb/win32_errmsg \
+   UnpackedTarball/mariadb-connector-c/libmariadb/secure/win_crypt 
\
UnpackedTarball/mariadb-connector-c/win-iconv/win_iconv) \
 ))
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Luboš Luňák (via logerrit)
 vcl/skia/salbmp.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit f62846d54ef9d4eb447cf405b74b6f47599d6d69
Author: Luboš Luňák 
AuthorDate: Thu Oct 8 15:58:21 2020 +0200
Commit: Luboš Luňák 
CommitDate: Fri Oct 9 11:08:14 2020 +0200

32bpp SKIA_USE_BITMAP32 bitmaps always need kPremul_SkAlphaType

I'm not sure if kOpaque_SkAlphaType would guarantee 255 in the alpha,
so better be safe. This should be a rare case anyway.

Change-Id: Iadec97a83621403a56f62ac07e238d8e98a3a905
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104090
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index 531c9661be64..d1cd76b61d5f 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -995,18 +995,18 @@ void SkiaSalBitmap::EnsureBitmapData()
 // Try to fill mBuffer from mImage.
 assert(mImage->colorType() == kN32_SkColorType);
 SkiaZone zone;
-// Use kUnpremul_SkAlphaType to make Skia convert from premultiplied alpha 
when reading
-// from the SkImage, in case there is any alpha involved. If converting to 
bpp<32 formats,
-// we will ignore the alpha when converting to mBuffer. Unless bpp==32 and 
SKIA_USE_BITMAP32,
-// in which case keep the format, since SKIA_USE_BITMAP32 implies 
premultiplied alpha.
+// If the source image has no alpha, then use no alpha (faster to 
convert), otherwise
+// use kUnpremul_SkAlphaType to make Skia convert from premultiplied alpha 
when reading
+// from the SkImage (the alpha will be ignored if converting to bpp<32 
formats, but
+// the color channels must be unpremultiplied. Unless bpp==32 and 
SKIA_USE_BITMAP32,
+// in which case use kPremul_SkAlphaType, since SKIA_USE_BITMAP32 implies 
premultiplied alpha.
 SkAlphaType alphaType = kUnpremul_SkAlphaType;
+if (mImage->imageInfo().alphaType() == kOpaque_SkAlphaType)
+alphaType = kOpaque_SkAlphaType;
 #if SKIA_USE_BITMAP32
 if (mBitCount == 32)
 alphaType = kPremul_SkAlphaType;
 #endif
-// But if the source image has no alpha, then use no alpha (faster to 
convert).
-if (mImage->imageInfo().alphaType() == kOpaque_SkAlphaType)
-alphaType = kOpaque_SkAlphaType;
 SkBitmap bitmap;
 if (!bitmap.tryAllocPixels(SkImageInfo::MakeS32(mSize.Width(), 
mSize.Height(), alphaType)))
 abort();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: calc: jumbo sheets on windows (never gonna happen)

2020-10-09 Thread Michael Stahl

On 08.10.20 21:13, Noel Grandin wrote:


As some point we are going to have to deal with this "long" stuff, it 
really is not a great thing to have one 64-bit platform operating at 
half the bit-size of the other platform.


Here is one option:

(a) create some new typedef, something like the old sal_Long, aliased to 
"long"

(b) replace "long" with typedef in stages (so no functional change).
(c) switch the typedef of sal_Long to point to sal_Int64 and fix fallout.

Then rolling back (even if temporarily) is easy and the "flag day" is a 
2 line change.


POSIX provides ssize_t for this purpose but likely it doesn't exist on 
MSVC...


is std::make_signed_t an option?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: calc: jumbo sheets on windows (never gonna happen)

2020-10-09 Thread Luboš Luňák
On Friday 09 of October 2020, Thorsten Behrens wrote:
> Mike Kaganski wrote:
> > What is the intended goal of "catching" these, when it's known that they
> > would happen in quite "legal" cases -
>
> Not sure I get the question - Lubos commented that trying to render a
> 2 billion pixel rect is probably invalid, i.e. catching that /
> isolating those changes to Calc should be possible. And I agree.

 Nobody is going to render a 2 billion pixel rect. But the screen-sized rect 
to render may start at 2 billion position in the spreadsheet coordinate 
space.

-- 
 Luboš Luňák
 l.lu...@collabora.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-10-09 Thread Attila Szűcs (via logerrit)
 sc/source/core/data/table4.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b69ea390ff475f58b8f0da3abf0c158021aba4d2
Author: Attila Szűcs 
AuthorDate: Thu Oct 8 16:05:29 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 9 10:52:02 2020 +0200

Clean-up: Initialized a variable to something.

To make sure it will have a legal value, even in cases when it won't be 
used.
Without it, code analysing tools may idetify it as an issue.

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

diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 11570e3153a4..427169b3b4e9 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -967,7 +967,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 //  Analyse
 
 FillCmd eFillCmd;
-FillDateCmd eDateCmd;
+FillDateCmd eDateCmd = {};
 double nInc;
 sal_uInt16 nMinDigits;
 ScUserListData* pListData = nullptr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Regényi Balázs (via logerrit)
 oox/source/export/shapes.cxx  |   36 +++---
 sw/qa/extras/ooxmlexport/data/tdf99810-lost-arrow.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx |   10 +
 3 files changed, 33 insertions(+), 13 deletions(-)

New commits:
commit 7b2f0094f86266c64972d3e505a28b2d4e5caef6
Author: Regényi Balázs 
AuthorDate: Tue Oct 6 15:52:18 2020 +0200
Commit: László Németh 
CommitDate: Fri Oct 9 10:31:20 2020 +0200

tdf#99810 DOCX export: fix lost arrow shape

by saving connector shape as shape element
wps:wps instead of the invalid wps:cxnSp.

Co-author-by: Szabolcs Tóth

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

diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 215d56595ebc..00a44d3fccfa 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1309,19 +1309,29 @@ ShapeExport& ShapeExport::WriteConnectorShape( const 
Reference< XShape >& xShape
 aRect.setHeight( aStartPoint.Y - aEndPoint.Y );
 }
 
-pFS->startElementNS(mnXmlNamespace, XML_cxnSp);
+// tdf#99810 connector shape (cxnSp) is not valid with namespace 'wps'
+const auto nShapeNode = (mnXmlNamespace == XML_wps ? XML_wsp : XML_cxnSp);
+pFS->startElementNS(mnXmlNamespace, nShapeNode);
 
-// non visual shape properties
-pFS->startElementNS(mnXmlNamespace, XML_nvCxnSpPr);
-pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
-  XML_id, OString::number(GetNewShapeID(xShape)),
-  XML_name, GetShapeName(xShape));
-// non visual connector shape drawing properties
-pFS->startElementNS(mnXmlNamespace, XML_cNvCxnSpPr);
-WriteConnectorConnections( aConnectorEntry, GetShapeID( rXShapeA ), 
GetShapeID( rXShapeB ) );
-pFS->endElementNS( mnXmlNamespace, XML_cNvCxnSpPr );
-pFS->singleElementNS(mnXmlNamespace, XML_nvPr);
-pFS->endElementNS( mnXmlNamespace, XML_nvCxnSpPr );
+if (mnXmlNamespace == XML_wps)
+{
+// non visual connector shape drawing properties
+pFS->singleElementNS(mnXmlNamespace, XML_cNvCnPr);
+}
+else
+{
+// non visual shape properties
+pFS->startElementNS(mnXmlNamespace, XML_nvCxnSpPr);
+pFS->singleElementNS(mnXmlNamespace, XML_cNvPr,
+XML_id, OString::number(GetNewShapeID(xShape)),
+XML_name, GetShapeName(xShape));
+// non visual connector shape drawing properties
+pFS->startElementNS(mnXmlNamespace, XML_cNvCxnSpPr);
+WriteConnectorConnections(aConnectorEntry, GetShapeID(rXShapeA), 
GetShapeID(rXShapeB));
+pFS->endElementNS(mnXmlNamespace, XML_cNvCxnSpPr);
+pFS->singleElementNS(mnXmlNamespace, XML_nvPr);
+pFS->endElementNS(mnXmlNamespace, XML_nvCxnSpPr);
+}
 
 // visual shape properties
 pFS->startElementNS(mnXmlNamespace, XML_spPr);
@@ -1336,7 +1346,7 @@ ShapeExport& ShapeExport::WriteConnectorShape( const 
Reference< XShape >& xShape
 // write text
 WriteTextBox( xShape, mnXmlNamespace );
 
-pFS->endElementNS( mnXmlNamespace, XML_cxnSp );
+pFS->endElementNS(mnXmlNamespace, nShapeNode);
 
 return *this;
 }
diff --git a/sw/qa/extras/ooxmlexport/data/tdf99810-lost-arrow.odt 
b/sw/qa/extras/ooxmlexport/data/tdf99810-lost-arrow.odt
new file mode 100644
index ..20e60f6cef06
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf99810-lost-arrow.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 200d34033ede..ec359b119b58 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -1152,6 +1152,16 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBodyPrUpright, 
"tdf123610_handle_upright
 "/a:graphic/a:graphicData/wps:wsp/wps:bodyPr", "upright", "1");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testLostArrow, "tdf99810-lost-arrow.odt")
+{
+// tdf#99810: check whether we use normal shape instead of connector shape 
if the XML namespace
+// is wps, because wps:
+xmlDocUniquePtr pDoc = parseExport("word/document.xml");
+
+assertXPath(pDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+"/a:graphic/a:graphicData/wps:wsp");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* 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: configure.ac

2020-10-09 Thread Stephan Bergmann (via logerrit)
 configure.ac |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit d4876c04fbf0fdb2b153d0d6a7d7b101989d58bb
Author: Stephan Bergmann 
AuthorDate: Fri Oct 9 09:38:22 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 9 10:26:46 2020 +0200

Allow CXX_X86_BINARY to be passed into autogen.sh again

...after 114ed73a7ba56e013e6d7f886798915fb20c0946 "WIN drop --enable-64bit 
to
select Windows target" had broken a6c22d4e086957b743a135163c71ac233062619e
"Allow CXX_X86_BINARY to be passed into autogen.sh" (and see the commit 
message
of the latter commit for how this is used by builds with clang-cl)

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

diff --git a/configure.ac b/configure.ac
index 6c8ebcd58ebe..7449a78f7962 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3951,7 +3951,10 @@ if test "$_os" = "WINNT"; then
 case "$WIN_HOST_ARCH" in
 x64)
 AC_MSG_CHECKING([for a x86 compiler and libraries for 32-bit binaries 
required for TWAIN support])
-if test -n "$WIN_MULTI_ARCH"; then
+if test -n "$CXX_X86_BINARY"; then
+BUILD_X86=TRUE
+AC_MSG_RESULT([preset])
+elif test -n "$WIN_MULTI_ARCH"; then
 BUILD_X86=TRUE
 CXX_X86_BINARY=`win_short_path_for_make "$MSVC_MULTI_PATH/cl.exe"`
 CXX_X86_BINARY+=" /arch:SSE"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-09 Thread Daniel Arato (NISZ) (via logerrit)
 oox/qa/unit/data/camera-rotation-revolution.docx |binary
 oox/qa/unit/drawingml.cxx|   25 +
 oox/source/drawingml/shape.cxx   |7 +++--
 oox/source/export/drawingml.cxx  |   32 +--
 4 files changed, 60 insertions(+), 4 deletions(-)

New commits:
commit a9c5c0d814a266096483572b84c72875ef8efd77
Author: Daniel Arato (NISZ) 
AuthorDate: Tue Sep 29 16:37:41 2020 +0200
Commit: László Németh 
CommitDate: Fri Oct 9 10:12:35 2020 +0200

tdf#133037 OOXML shape import: camera rotation along Z

Instead of implementing proper OOXML 3D rotation (which would be
an entirely new feature if I understand correctly), I merely
interpret attribute "rev" of the rotation element a:camera/a:rot
as a directive to rotate the entire shape the usual 2D way. That
is already implemented and works well. This isn't the same thing
Word does, but it might be good enough for now. This is kind of a
mock solution, but it will be very easy to revert if it turns out
to cause problems.

Note: the export worked well previously, too (moreover, reloading
the first LO export fixed the import).

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

diff --git a/oox/qa/unit/data/camera-rotation-revolution.docx 
b/oox/qa/unit/data/camera-rotation-revolution.docx
new file mode 100644
index ..74054aa82b3f
Binary files /dev/null and b/oox/qa/unit/data/camera-rotation-revolution.docx 
differ
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index 7fcee1756a6f..6a0415b257f2 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -265,6 +265,31 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testShapeTextAdjustLeft)
 CPPUNIT_ASSERT_EQUAL(drawing::TextHorizontalAdjust_BLOCK, eAdjust);
 }
 
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testCameraRotationRevolution)
+{
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"camera-rotation-revolution.docx";
+load(aURL);
+
+uno::Reference 
xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+uno::Reference xShape0(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xShape1(xDrawPage->getByIndex(1), 
uno::UNO_QUERY);
+uno::Reference xShapeProps0(xShape0, uno::UNO_QUERY);
+uno::Reference xShapeProps1(xShape1, uno::UNO_QUERY);
+sal_Int32 nRotateAngle0;
+sal_Int32 nRotateAngle1;
+xShapeProps0->getPropertyValue("RotateAngle") >>= nRotateAngle0;
+xShapeProps1->getPropertyValue("RotateAngle") >>= nRotateAngle1;
+
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 8000
+// - Actual  : 0
+// so the camera rotation would not have been factored into how the shape 
is displayed
+CPPUNIT_ASSERT_EQUAL(static_cast(8000), nRotateAngle0);
+CPPUNIT_ASSERT_EQUAL(static_cast(27000), nRotateAngle1);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index c9ade16f7a1d..95b608eadcc6 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1461,11 +1461,14 @@ Reference< XShape > const & Shape::createAndInsert(
 else if( getTextBody() )
 getTextBody()->getTextProperties().pushVertSimulation();
 
+// tdf#133037: a bit hackish: force Shape to rotate in the opposite 
direction the camera would rotate
+const sal_Int32 nCameraRotation = 
get3DProperties().maCameraRotation.mnRevolution.get(0);
+
 PropertySet aPropertySet(mxShape);
-if ( !bUseRotationTransform && mnRotation != 0 )
+if ( !bUseRotationTransform && (mnRotation != 0 || nCameraRotation != 
0) )
 {
 // use the same logic for rotation from VML exporter 
(SimpleShape::implConvertAndInsert at vmlshape.cxx)
-aPropertySet.setAnyProperty( PROP_RotateAngle, makeAny( sal_Int32( 
NormAngle36000( mnRotation / -600 ) ) ) );
+aPropertySet.setAnyProperty( PROP_RotateAngle, makeAny( sal_Int32( 
NormAngle36000( (mnRotation - nCameraRotation) / -600 ) ) ) );
 aPropertySet.setAnyProperty( PROP_HoriOrientPosition, makeAny( 
maPosition.X ) );
 aPropertySet.setAnyProperty( PROP_VertOrientPosition, makeAny( 
maPosition.Y ) );
 }
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 4a9ac9f69014..c19b030ad642 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1708,7 +1708,8 @@ void DrawingML::WriteShapeTransformation( const 
Reference< XShape >& rXShape, sa
 {
 SAL_I

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

2020-10-09 Thread Tünde Tóth (via logerrit)
 chart2/qa/extras/chart2import.cxx  |   23 ++-
 chart2/qa/extras/data/xlsx/tdf134978.xlsx  |binary
 chart2/source/tools/ChartTypeHelper.cxx|3 ++-
 chart2/source/view/charttypes/PieChart.cxx |7 +--
 oox/source/drawingml/chart/seriesconverter.cxx |6 +-
 oox/source/export/chartexport.cxx  |1 +
 6 files changed, 35 insertions(+), 5 deletions(-)

New commits:
commit 20da1a5dd37c7edac620566c992d5a53b23a5f12
Author: Tünde Tóth 
AuthorDate: Thu Sep 17 16:49:02 2020 +0200
Commit: László Németh 
CommitDate: Fri Oct 9 09:24:18 2020 +0200

tdf#134978 Chart OOXML Import: fix pie chart label custom position

Follow-up of commit dff7a46fb46d1fa2a3ad674ee493ae2d59150fe3
(tdf#130032 Chart OOXML Import: fix data label custom position).

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

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index dadc782c0af6..d901f879ea18 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -158,6 +158,7 @@ public:
 void testTdf125444PercentageCustomLabel();
 void testDataPointLabelCustomPos();
 void testTdf130032();
+void testTdf134978();
 void testTdf119138MissingAutoTitleDeleted();
 void testStockChartShiftedCategoryPosition();
 void testTdf133376();
@@ -272,6 +273,7 @@ public:
 CPPUNIT_TEST(testTdf125444PercentageCustomLabel);
 CPPUNIT_TEST(testDataPointLabelCustomPos);
 CPPUNIT_TEST(testTdf130032);
+CPPUNIT_TEST(testTdf134978);
 CPPUNIT_TEST(testTdf119138MissingAutoTitleDeleted);
 CPPUNIT_TEST(testStockChartShiftedCategoryPosition);
 CPPUNIT_TEST(testTdf133376);
@@ -1783,7 +1785,7 @@ void Chart2ImportTest::testTdf109858()
 CPPUNIT_ASSERT( aAny.hasValue() );
 sal_Int32 nLabelPlacement = 0;
 CPPUNIT_ASSERT( aAny >>= nLabelPlacement );
-CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data point label should be placed bestFit", 
chart::DataLabelPlacement::AVOID_OVERLAP, nLabelPlacement );
+CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data point label should be placed bestfit", 
chart::DataLabelPlacement::CUSTOM, nLabelPlacement );
 
 // test data series label position
 Reference 
xSeriesPropSet(xChart1Doc->getDiagram()->getDataRowProperties(0), 
uno::UNO_SET_THROW);
@@ -2511,6 +2513,25 @@ void Chart2ImportTest::testTdf130032()
 CPPUNIT_ASSERT_EQUAL(chart::DataLabelPlacement::RIGHT, aPlacement);
 }
 
+void Chart2ImportTest::testTdf134978()
+{
+// test CustomLabelPosition on Pie chart
+load("/chart2/qa/extras/data/xlsx/", "tdf134978.xlsx");
+uno::Reference xChartDoc = getChartDocFromSheet(0, 
mxComponent);
+CPPUNIT_ASSERT(xChartDoc.is());
+uno::Reference 
xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
+CPPUNIT_ASSERT(xDataSeries.is());
+
+uno::Reference 
xPropertySet(xDataSeries->getDataPointByIndex(2),
+ uno::UNO_SET_THROW);
+CPPUNIT_ASSERT(xPropertySet.is());
+
+chart2::RelativePosition aCustomLabelPosition;
+xPropertySet->getPropertyValue("CustomLabelPosition") >>= 
aCustomLabelPosition;
+CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.040273622047244093, 
aCustomLabelPosition.Primary, 1e-7);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.25635352872557599, 
aCustomLabelPosition.Secondary, 1e-7);
+}
+
 void Chart2ImportTest::testTdf119138MissingAutoTitleDeleted()
 {
 load("/chart2/qa/extras/data/xlsx/", 
"tdf119138-missing-autotitledeleted.xlsx");
diff --git a/chart2/qa/extras/data/xlsx/tdf134978.xlsx 
b/chart2/qa/extras/data/xlsx/tdf134978.xlsx
new file mode 100644
index ..ad5522a9144d
Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf134978.xlsx differ
diff --git a/chart2/source/tools/ChartTypeHelper.cxx 
b/chart2/source/tools/ChartTypeHelper.cxx
index 236d066f77d3..a4b8059ffb19 100644
--- a/chart2/source/tools/ChartTypeHelper.cxx
+++ b/chart2/source/tools/ChartTypeHelper.cxx
@@ -252,12 +252,13 @@ uno::Sequence < sal_Int32 > 
ChartTypeHelper::getSupportedLabelPlacements( const
 
 if(!bDonut)
 {
-aRet.realloc(4);
+aRet.realloc(5);
 sal_Int32* pSeq = aRet.getArray();
 *pSeq++ = css::chart::DataLabelPlacement::AVOID_OVERLAP;
 *pSeq++ = css::chart::DataLabelPlacement::OUTSIDE;
 *pSeq++ = css::chart::DataLabelPlacement::INSIDE;
 *pSeq++ = css::chart::DataLabelPlacement::CENTER;
+*pSeq++ = css::chart::DataLabelPlacement::CUSTOM;
 }
 else
 {
diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 6042b0d0dbe4..55eb67037b9a 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ 

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

2020-10-09 Thread Miklos Vajna (via logerrit)
 include/vcl/filter/PDFiumLibrary.hxx   |3 +--
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   11 ---
 vcl/source/pdf/PDFiumLibrary.cxx   |7 +++
 3 files changed, 12 insertions(+), 9 deletions(-)

New commits:
commit 4777f5a051262c8803a7378926ad7c02da71
Author: Miklos Vajna 
AuthorDate: Thu Oct 8 21:04:07 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri Oct 9 09:03:59 2020 +0200

vcl: PDFiumLibrary: add PDFiumDocument::getFileVersion()

Allows not exposing the underlying FPDF_DOCUMENT in PDFiumDocument.

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

diff --git a/include/vcl/filter/PDFiumLibrary.hxx 
b/include/vcl/filter/PDFiumLibrary.hxx
index 6f3d94925122..2664d2bccb39 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -207,10 +207,9 @@ public:
 // Page size in points
 basegfx::B2DSize getPageSize(int nIndex);
 int getPageCount();
+int getFileVersion();
 
 std::unique_ptr openPage(int nIndex);
-
-FPDF_DOCUMENT getPointer() { return mpPdfDocument; }
 };
 
 struct PDFiumLibrary final : public 
rtl::StaticWithInit, PDFiumLibrary>
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 3525199e4b07..d4195b1844ce 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1930,13 +1930,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testLargePage)
 // The document has 1 page.
 CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
 // Check the value (not the unit) of the page size.
-FS_SIZEF aSize;
-FPDF_GetPageSizeByIndexF(pPdfDocument->getPointer(), 0, &aSize);
+basegfx::B2DSize aSize = pPdfDocument->getPageSize(0);
 // Without the accompanying fix in place, this test would have failed with:
 // - Expected: 8503.94
 // - Actual  : 17007.875
 // i.e. the value for 600 cm was larger than the 14 400 limit set in the 
spec.
-CPPUNIT_ASSERT_DOUBLES_EQUAL(8503.94, static_cast(aSize.width), 
0.01);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(8503.94, aSize.getX(), 0.01);
 }
 
 CPPUNIT_TEST_FIXTURE(PdfExportTest, testPdfImageResourceInlineXObjectRef)
@@ -2033,8 +2032,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testDefaultVersion)
 std::unique_ptr pPdfDocument
 = pPDFium->openDocument(maMemory.GetData(), maMemory.GetSize());
 CPPUNIT_ASSERT(pPdfDocument);
-int nFileVersion = 0;
-FPDF_GetFileVersion(pPdfDocument->getPointer(), &nFileVersion);
+int nFileVersion = pPdfDocument->getFileVersion();
 CPPUNIT_ASSERT_EQUAL(16, nFileVersion);
 }
 
@@ -2060,8 +2058,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testVersion15)
 std::unique_ptr pPdfDocument
 = pPDFium->openDocument(maMemory.GetData(), maMemory.GetSize());
 CPPUNIT_ASSERT(pPdfDocument);
-int nFileVersion = 0;
-FPDF_GetFileVersion(pPdfDocument->getPointer(), &nFileVersion);
+int nFileVersion = pPdfDocument->getFileVersion();
 CPPUNIT_ASSERT_EQUAL(15, nFileVersion);
 }
 
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index d790fb1b9c01..a0668d0c6048 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -174,6 +174,13 @@ basegfx::B2DSize PDFiumDocument::getPageSize(int nIndex)
 
 int PDFiumDocument::getPageCount() { return FPDF_GetPageCount(mpPdfDocument); }
 
+int PDFiumDocument::getFileVersion()
+{
+int nFileVersion = 0;
+FPDF_GetFileVersion(mpPdfDocument, &nFileVersion);
+return nFileVersion;
+}
+
 int PDFiumPage::getObjectCount() { return FPDFPage_CountObjects(mpPage); }
 
 std::unique_ptr PDFiumPage::getObject(int nIndex)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits