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

2020-10-16 Thread Noel Grandin (via logerrit)
 sd/source/filter/xml/sdxmlwrp.cxx |   33 -
 1 file changed, 20 insertions(+), 13 deletions(-)

New commits:
commit 3059f556f6818b66b2fa988c69664f5a98f4c075
Author: Noel Grandin 
AuthorDate: Sat Oct 17 08:07:45 2020 +0200
Commit: Noel Grandin 
CommitDate: Sat Oct 17 08:51:41 2020 +0200

sd: use the fastparser API when possible

part of the process of making SvXMLImport fastparser-only

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

diff --git a/sd/source/filter/xml/sdxmlwrp.cxx 
b/sd/source/filter/xml/sdxmlwrp.cxx
index 7186ef911c24..2425a5fd4de4 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -42,6 +42,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -55,7 +56,7 @@
 #include 
 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -189,38 +190,44 @@ ErrCode ReadThroughComponent(
 aParserInput.sSystemId = rName;
 aParserInput.aInputStream = xInputStream;
 
-// get parser
-Reference< xml::sax::XParser > xParser = 
xml::sax::Parser::create(rxContext);
-SAL_INFO( "sd.filter", "parser created" );
-
 // get filter
 OUString aFilterName(OUString::createFromAscii(pFilterName));
-Reference< xml::sax::XDocumentHandler > xFilter(
+// the underlying SvXMLImport implements XFastParser, XImporter, 
XFastDocumentHandler
+Reference< XInterface > xFilter(
 
rxContext->getServiceManager()->createInstanceWithArgumentsAndContext(aFilterName,
 rFilterArguments, rxContext),
 UNO_QUERY );
 SAL_WARN_IF(!xFilter.is(), "sd.filter", "Can't instantiate filter 
component: " << aFilterName);
 if( !xFilter.is() )
 return SD_XML_READERROR;
+Reference< xml::sax::XFastParser > xFastParser(xFilter, UNO_QUERY);
+Reference< xml::sax::XDocumentHandler > xDocumentHandler;
+if (!xFastParser)
+xDocumentHandler.set(xFilter, UNO_QUERY);
+if (!xFastParser && !xDocumentHandler)
+{
+SAL_WARN("sd", "service does not implement XFastParser or 
XDocumentHandler");
+assert(false);
+return SD_XML_READERROR;
+}
 SAL_INFO( "sd.filter", "" << pFilterName << " created" );
 
-// connect parser and filter
-xParser->setDocumentHandler( xFilter );
-
 // connect model and filter
 Reference < XImporter > xImporter( xFilter, UNO_QUERY );
 xImporter->setTargetDocument( xModelComponent );
 
-uno::Reference< xml::sax::XFastParser > xFastParser = dynamic_cast<
-xml::sax::XFastParser* >( xFilter.get() );
-
 // finally, parser the stream
 SAL_INFO( "sd.filter", "parsing stream" );
 try
 {
-if( xFastParser.is() )
+if (xFastParser)
 xFastParser->parseStream( aParserInput );
 else
+{
+Reference< xml::sax::XParser > xParser = 
xml::sax::Parser::create(rxContext);
+// connect parser and filter
+xParser->setDocumentHandler( xDocumentHandler );
 xParser->parseStream( aParserInput );
+}
 }
 catch (const xml::sax::SAXParseException& r)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Logerrit Error

2020-10-16 Thread Regis Perdreau
Hi,
it looks like the script has no idea where to go.

Well, have you something in your .ssh/config file?
in your home, do
cat .ssh/config

Something like this ?

 Host logerrit gerrit.libreoffice.org
   IdentityFile /path/to/your/private-key
   User YOUR_USERNAME_HERE
   Port 29418
   HostName gerrit.libreoffice.org



Regards,

Régis Perdreau



Le sam. 17 oct. 2020 à 01:35, Mariam Fahmy  a
écrit :

> Hey, I am Mariam, I am new in the open source community, I want to submit
> my patches in Gerrit for review.
> But here are some error:
> ./logerrit test
>
> There seems to be trouble. Please have the output of:
> ssh - logerrit
> at hand when looking for help.
>
> ssh -vvv logerrit
>
> OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
> debug1: Reading configuration data /home/mariamfahmy2498/.ssh/config
> debug1: Reading configuration data /etc/ssh/ssh_config
> debug1: /etc/ssh/ssh_config line 19: Applying options for *
> debug2: resolving "logerrit" port 22
> ssh: Could not resolve hostname logerrit: Name or service not known
>
> I am following
> https://wiki.documentfoundation.org/Development/gerrit/setup
> I have followed the easy way for setting up gerrit.
> I have also followed
> https://wiki.documentfoundation.org/Development/gerrit/SubmitPatch for
> submitting Patch but here is the errors:
> ./logerrit submit master
>
> ssh: Could not resolve hostname logerrit: Name or service not known
> fatal: Could not read from remote repository.
>
> Please make sure you have the correct access rights
> and the repository exists.
>
> Please guide me, thanks in advance
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Logerrit Error

2020-10-16 Thread Mariam Fahmy
Hey, I am Mariam, I am new in the open source community, I want to submit
my patches in Gerrit for review.
But here are some error:
./logerrit test

There seems to be trouble. Please have the output of:
ssh - logerrit
at hand when looking for help.

ssh -vvv logerrit

OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /home/mariamfahmy2498/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "logerrit" port 22
ssh: Could not resolve hostname logerrit: Name or service not known

I am following https://wiki.documentfoundation.org/Development/gerrit/setup
I have followed the easy way for setting up gerrit.
I have also followed
https://wiki.documentfoundation.org/Development/gerrit/SubmitPatch for
submitting Patch but here is the errors:
./logerrit submit master

ssh: Could not resolve hostname logerrit: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Please guide me, thanks in advance
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-10-16 Thread Andras Timar (via logerrit)
 sw/qa/uitest/writer_tests/watermark.py|2 +-
 sw/uiconfig/swriter/ui/watermarkdialog.ui |3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 17cbc559be6936777904e5cf8a517cac89045264
Author: Andras Timar 
AuthorDate: Tue Sep 15 12:41:08 2020 +0200
Commit: Andras Timar 
CommitDate: Sat Oct 17 00:51:17 2020 +0200

Angle of the watermark: step by 45°

Change-Id: Ia4ab9a56f346625cf191c1f5a648e1744dad29d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102728
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/sw/qa/uitest/writer_tests/watermark.py 
b/sw/qa/uitest/writer_tests/watermark.py
index 9fb587aa7479..0d918e92d061 100644
--- a/sw/qa/uitest/writer_tests/watermark.py
+++ b/sw/qa/uitest/writer_tests/watermark.py
@@ -39,7 +39,7 @@ class watermark(UITestCase):
 xTransparency = xDialog.getChild("Transparency")
 
 self.assertEqual(get_state_as_dict(xTextInput)["Text"], "Watermark")
-self.assertEqual(get_state_as_dict(xAngle)["Text"], "46°")
+self.assertEqual(get_state_as_dict(xAngle)["Text"], "90°")
 self.assertEqual(get_state_as_dict(xTransparency)["Text"], "51%")
 
 xCancBtn = xDialog.getChild("cancel")
diff --git a/sw/uiconfig/swriter/ui/watermarkdialog.ui 
b/sw/uiconfig/swriter/ui/watermarkdialog.ui
index 34d858588219..8da3642deff9 100644
--- a/sw/uiconfig/swriter/ui/watermarkdialog.ui
+++ b/sw/uiconfig/swriter/ui/watermarkdialog.ui
@@ -4,8 +4,7 @@
   
   
 359
-1
-10
+45
   
   
 100
___
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-16 Thread Jim Raykowski (via logerrit)
 sw/source/ui/fldui/fldedt.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit e385efc6bf5d084759be4fd02f272a75c053fbc5
Author: Jim Raykowski 
AuthorDate: Thu Oct 8 22:50:12 2020 -0800
Commit: Jim Raykowski 
CommitDate: Fri Oct 16 23:59:18 2020 +0200

tdf#137210 fix field selection regression

restores field selection functionality that went missing after commit
f51005bc969c9296fa3e64d82c13f84fdfb90fe4

Change-Id: Ifbab4c1ce272be75ced981e3d36717510684b93b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104100
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 2626d5c2d053..2c49e66e74b9 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -280,8 +280,6 @@ IMPL_LINK(SwFieldEditDlg, NextPrevHdl, weld::Button&, 
rButton, void)
 rMgr.GoNextPrev( bNext, pOldTyp );
 pCurField = rMgr.GetCurField();
 
-EnsureSelection(pCurField, rMgr);
-
 sal_uInt16 nGroup = SwFieldMgr::GetGroup(pCurField->GetTypeId(), 
pCurField->GetSubType());
 
 if (nGroup != pTabPage->GetGroup())
@@ -290,6 +288,7 @@ IMPL_LINK(SwFieldEditDlg, NextPrevHdl, weld::Button&, 
rButton, void)
 pTabPage->EditNewField();
 
 Init();
+EnsureSelection(pCurField, rMgr);
 }
 
 IMPL_LINK_NOARG(SwFieldEditDlg, AddressHdl, weld::Button&, void)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/source dbaccess/uiconfig

2020-10-16 Thread Gülşah Köse (via logerrit)
 dbaccess/source/ui/dlg/generalpage.cxx|   13 +
 dbaccess/source/ui/dlg/generalpage.hxx|3 +++
 dbaccess/uiconfig/ui/generalpagewizard.ui |   26 +++---
 3 files changed, 35 insertions(+), 7 deletions(-)

New commits:
commit c6d12d44a890e969ab4463fa26403da02552654c
Author: Gülşah Köse 
AuthorDate: Thu Oct 15 13:43:25 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Oct 16 22:36:25 2020 +0200

Database Wizard: show info label instead of empty list.

In Apple Store version or in case --without-java and
disable-firebird-sdbc we cannot have Java based HSQLDB or Firebird.
Instead of the empty list, there should be a static text label.

Change-Id: I6034a749f28a3c29c9c9e50929cb42aa1312a46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104359
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/dbaccess/source/ui/dlg/generalpage.cxx 
b/dbaccess/source/ui/dlg/generalpage.cxx
index 5361fc2d0907..1ad3e8272595 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -160,6 +160,7 @@ namespace dbaui
 if( !aMiscOptions.IsExperimentalMode() && 
sURLPrefix.startsWith("sdbc:embedded:firebird") )
 continue;
 aDisplayedTypes.emplace_back( sURLPrefix, sDisplayName );
+m_bIsDisplayedTypesEmpty = false;
 }
 }
 }
@@ -454,8 +455,10 @@ namespace dbaui
 , m_xFT_HelpText(m_xBuilder->weld_label("helpText"))
 , m_xLB_DocumentList(new 
OpenDocumentListBox(m_xBuilder->weld_combo_box("documentList"), 
"com.sun.star.sdb.OfficeDatabaseDocument"))
 , m_xPB_OpenDatabase(new 
OpenDocumentButton(m_xBuilder->weld_button("openDatabase"), 
"com.sun.star.sdb.OfficeDatabaseDocument"))
+, m_xFT_NoEmbeddedDBLabel(m_xBuilder->weld_label("noembeddeddbLabel"))
 , m_eOriginalCreationMode(eCreateNew)
 , m_bInitEmbeddedDBList(true)
+, m_bIsDisplayedTypesEmpty(true)
 {
 // If no driver for embedded DBs is installed, and no dBase driver, 
then hide the "Create new database" option
 sal_Int32 nCreateNewDBIndex = m_pCollection->getIndexOf( 
dbaccess::ODsnTypeCollection::getEmbeddedDatabase() );
@@ -488,6 +491,7 @@ namespace dbaui
 m_xRB_OpenExistingDatabase->connect_clicked( LINK( this, 
OGeneralPageWizard, OnSetupModeSelected ) );
 m_xLB_DocumentList->connect_changed( LINK( this, OGeneralPageWizard, 
OnDocumentSelected ) );
 m_xPB_OpenDatabase->connect_clicked( LINK( this, OGeneralPageWizard, 
OnOpenDocument ) );
+m_xFT_NoEmbeddedDBLabel->hide();
 
 pController->SetGeneralPage(this);
 }
@@ -512,6 +516,15 @@ namespace dbaui
 initializeEmbeddedDBList();
 m_xEmbeddedDBType->set_active_text(getEmbeddedDBName(_rSet));
 
+if(m_bIsDisplayedTypesEmpty)
+{
+m_xRB_CreateDatabase->set_sensitive(false);
+m_xFT_EmbeddedDBLabel->hide();
+m_xEmbeddedDBType->hide();
+m_xFT_NoEmbeddedDBLabel->show();
+m_xRB_OpenExistingDatabase->set_active(true);
+}
+
 // first check whether or not the selection is invalid or readonly 
(invalid implies readonly, but not vice versa)
 bool bValid, bReadonly;
 getFlags( _rSet, bValid, bReadonly );
diff --git a/dbaccess/source/ui/dlg/generalpage.hxx 
b/dbaccess/source/ui/dlg/generalpage.hxx
index a5f854260fbf..68e7a90cbfa0 100644
--- a/dbaccess/source/ui/dlg/generalpage.hxx
+++ b/dbaccess/source/ui/dlg/generalpage.hxx
@@ -139,6 +139,8 @@ namespace dbaui
 std::unique_ptr m_xLB_DocumentList;
 std::unique_ptr m_xPB_OpenDatabase;
 
+std::unique_ptr m_xFT_NoEmbeddedDBLabel;
+
 // state
 OUString   m_aBrowsedDocumentURL;
 CreationMode   m_eOriginalCreationMode;
@@ -148,6 +150,7 @@ namespace dbaui
 Link m_aChooseDocumentHandler;   /// to 
be called when a recent document has been definitely chosen
 
 boolm_bInitEmbeddedDBList : 1;
+boolm_bIsDisplayedTypesEmpty : 1;
 voidinsertEmbeddedDBTypeEntryData( const OUString& 
_sType, const OUString& sDisplayName );
 
 voidEnableControls();
diff --git a/dbaccess/uiconfig/ui/generalpagewizard.ui 
b/dbaccess/uiconfig/ui/generalpagewizard.ui
index 029fc1adf94d..81bd085df0c5 100644
--- a/dbaccess/uiconfig/ui/generalpagewizard.ui
+++ b/dbaccess/uiconfig/ui/generalpagewizard.ui
@@ -107,7 +107,7 @@
   
   
 0
-4
+5
   
 
 
@@ -125,7 +125,7 @@
   
   
 0
-5
+6
   
 
 
@@ -164,7 +164,7 @@
   
   
 0
-6
+7
   
 
 
@@ -179,7 +179,7 @@
   
   
 0
-7
+8
  

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

2020-10-16 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/uiwriter/uiwriter.cxx |   44 +
 1 file changed, 44 insertions(+)

New commits:
commit 254c26f1c69e2eb23f66a79349b0ea78a5d467d3
Author: Xisco Fauli 
AuthorDate: Fri Oct 16 18:32:32 2020 +0200
Commit: Xisco Fauli 
CommitDate: Fri Oct 16 21:47:49 2020 +0200

tdf#127635: sw_uiwriter: Add unittest

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

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 3ca0e97850ae..b1f93e1b8422 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -265,6 +265,7 @@ public:
 void testUnicodeNotationToggle();
 void testTextTableCellNames();
 void testShapeAnchorUndo();
+void testTdf127635();
 void testDde();
 void testDocModState();
 void testTdf94804();
@@ -491,6 +492,7 @@ public:
 CPPUNIT_TEST(testUnicodeNotationToggle);
 CPPUNIT_TEST(testTextTableCellNames);
 CPPUNIT_TEST(testShapeAnchorUndo);
+CPPUNIT_TEST(testTdf127635);
 CPPUNIT_TEST(testDde);
 CPPUNIT_TEST(testDocModState);
 CPPUNIT_TEST(testTdf94804);
@@ -4350,6 +4352,48 @@ void SwUiWriterTest::testShapeAnchorUndo()
 CPPUNIT_ASSERT_EQUAL(pObject->GetLogicRect(), aOrigLogicRect);
 }
 
+void SwUiWriterTest::testTdf127635()
+{
+SwDoc* pDoc = createDoc();
+
+SwXTextDocument* pXTextDocument = dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pXTextDocument);
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'a', 0);
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, ' ', 0);
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'b', 0);
+Scheduler::ProcessEventsToIdle();
+
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 2, 
/*bBasicCall=*/false);
+
+//Select 'a'
+pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, 
/*bBasicCall=*/false);
+
+// enable redlining
+dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+// hide
+dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+
+CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+   pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'c', 0);
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, ' ', 0);
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'd', 0);
+Scheduler::ProcessEventsToIdle();
+
+SwEditShell* const pEditShell(pDoc->GetEditShell());
+// accept all redlines
+while(pEditShell->GetRedlineCount())
+pEditShell->AcceptRedline(0);
+
+// Without the fix in place, this test would have failed with
+// - Expected: C d b
+// - Actual  : Cd  b
+CPPUNIT_ASSERT_EQUAL(OUString("C d b"), getParagraph(1)->getString());
+}
+
 void SwUiWriterTest::testDde()
 {
 #if HAVE_FEATURE_UI
___
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-16 Thread Michael Stahl (via logerrit)
 sw/source/core/undo/untblk.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7221b7638c74b13e229f7ff50349a253ebb74cfc
Author: Michael Stahl 
AuthorDate: Fri Oct 16 14:27:04 2020 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 16 21:46:41 2020 +0200

tdf#135733 sw: fix mistake in SwUndoInserts::SetInsertRange()

First init m_nDeleteTextNodes, then check it; it is inited to 1 in the
ctor so the ++m_nSttNode was skipped.

This then caused bJoinNext to be true in UndoImpl() when it should
be false.

(regression from dc7e7b94a7211c576454267c09eb108e761e4487)

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

diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index c625dad74495..a926fa2712c2 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -126,11 +126,11 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, 
bool bScanFlys,
 m_nSttNode = pTmpPos->nNode.GetIndex();
 m_nSttContent = pTmpPos->nContent.GetIndex();
 
+m_nDeleteTextNodes = nDeleteTextNodes;
 if (m_nDeleteTextNodes == 0) // if a table selection is added...
 {
 ++m_nSttNode; // ... then the CopyPam is not fully correct
 }
-m_nDeleteTextNodes = nDeleteTextNodes;
 }
 
 // Fill m_FlyUndos with flys anchored to first and last paragraphs
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Caolán McNamara (via logerrit)
 include/vcl/weld.hxx  |3 
 vcl/inc/salvtables.hxx|2 
 vcl/source/app/salvtables.cxx |6 +
 vcl/unx/gtk3/gtk3gtkinst.cxx  |  207 +-
 4 files changed, 139 insertions(+), 79 deletions(-)

New commits:
commit f9725762112ba543d57c6cfa26942b0a5b28b50e
Author: Caolán McNamara 
AuthorDate: Fri Oct 16 15:34:03 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 16 21:20:46 2020 +0200

support set_font for weld::Button

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

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 433322aae085..e463084da93b 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1280,6 +1280,9 @@ public:
 virtual void set_label_line_wrap(bool wrap) = 0;
 void clicked() { signal_clicked(); }
 
+// font size is in points, not pixels, e.g. see Window::[G]etPointFont
+virtual void set_font(const vcl::Font& rFont) = 0;
+
 void connect_clicked(const Link& rLink) { m_aClickHdl = 
rLink; }
 };
 
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index b7dd10de3a69..7f925973bd92 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -994,6 +994,8 @@ public:
 
 virtual OUString get_label() const override;
 
+virtual void set_font(const vcl::Font& rFont) override;
+
 virtual ~SalInstanceButton() override;
 };
 
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index a1e533e2a2bd..19cd239d2848 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -2477,6 +2477,12 @@ void SalInstanceButton::set_label_line_wrap(bool wrap)
 m_xButton->queue_resize();
 }
 
+void SalInstanceButton::set_font(const vcl::Font& rFont)
+{
+m_xButton->SetPointFont(*m_xButton, rFont);
+m_xButton->Invalidate();
+}
+
 OUString SalInstanceButton::get_label() const { return m_xButton->GetText(); }
 
 SalInstanceButton::~SalInstanceButton() { 
m_xButton->SetClickHdl(Link<::Button*, void>()); }
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 9dcf0645c9d4..0a4b3a4911cf 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -6668,6 +6668,88 @@ public:
 }
 };
 
+PangoAttrList* create_attr_list(const vcl::Font& rFont)
+{
+PangoAttrList* pAttrList = pango_attr_list_new();
+pango_attr_list_insert(pAttrList, 
pango_attr_family_new(OUStringToOString(rFont.GetFamilyName(), 
RTL_TEXTENCODING_UTF8).getStr()));
+pango_attr_list_insert(pAttrList, 
pango_attr_size_new(rFont.GetFontSize().Height() * PANGO_SCALE));
+switch (rFont.GetItalic())
+{
+case ITALIC_NONE:
+pango_attr_list_insert(pAttrList, 
pango_attr_style_new(PANGO_STYLE_NORMAL));
+break;
+case ITALIC_NORMAL:
+pango_attr_list_insert(pAttrList, 
pango_attr_style_new(PANGO_STYLE_ITALIC));
+break;
+case ITALIC_OBLIQUE:
+pango_attr_list_insert(pAttrList, 
pango_attr_style_new(PANGO_STYLE_OBLIQUE));
+break;
+default:
+break;
+}
+switch (rFont.GetWeight())
+{
+case WEIGHT_ULTRALIGHT:
+pango_attr_list_insert(pAttrList, 
pango_attr_weight_new(PANGO_WEIGHT_ULTRALIGHT));
+break;
+case WEIGHT_LIGHT:
+pango_attr_list_insert(pAttrList, 
pango_attr_weight_new(PANGO_WEIGHT_LIGHT));
+break;
+case WEIGHT_NORMAL:
+pango_attr_list_insert(pAttrList, 
pango_attr_weight_new(PANGO_WEIGHT_NORMAL));
+break;
+case WEIGHT_BOLD:
+pango_attr_list_insert(pAttrList, 
pango_attr_weight_new(PANGO_WEIGHT_BOLD));
+break;
+case WEIGHT_ULTRABOLD:
+pango_attr_list_insert(pAttrList, 
pango_attr_weight_new(PANGO_WEIGHT_ULTRABOLD));
+break;
+default:
+break;
+}
+switch (rFont.GetWidthType())
+{
+case WIDTH_ULTRA_CONDENSED:
+pango_attr_list_insert(pAttrList, 
pango_attr_stretch_new(PANGO_STRETCH_ULTRA_CONDENSED));
+break;
+case WIDTH_EXTRA_CONDENSED:
+pango_attr_list_insert(pAttrList, 
pango_attr_stretch_new(PANGO_STRETCH_EXTRA_CONDENSED));
+break;
+case WIDTH_CONDENSED:
+pango_attr_list_insert(pAttrList, 
pango_attr_stretch_new(PANGO_STRETCH_CONDENSED));
+break;
+case WIDTH_SEMI_CONDENSED:
+pango_attr_list_insert(pAttrList, 
pango_attr_stretch_new(PANGO_STRETCH_SEMI_CONDENSED));
+break;
+case WIDTH_NORMAL:
+pango_attr_list_insert(pAttrList, 
pango_attr_stretch_new(PANGO_STRETCH_NORMAL));
+break;
+case WIDTH_SEMI_EXPANDED:
+pango_attr_list_insert(pAttrList, 
pango_attr_stretch_new(PANGO_STRETCH_SEMI_EXPANDED));
+

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

2020-10-16 Thread Miklos Vajna (via logerrit)
 vcl/qa/cppunit/filter/ipdf/data/dict-array-dict.pdf |   55 
 vcl/qa/cppunit/filter/ipdf/ipdf.cxx |   21 +++
 vcl/source/filter/ipdf/pdfdocument.cxx  |   13 
 3 files changed, 87 insertions(+), 2 deletions(-)

New commits:
commit 056c1284d6a68525002c54bef10834cc135385db
Author: Miklos Vajna 
AuthorDate: Fri Oct 16 18:15:21 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri Oct 16 20:57:34 2020 +0200

vcl pdf tokenizer: fix handling of dict -> array -> dict tokens

Needed to be able to parse the /Reference key of signatures.

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

diff --git a/vcl/qa/cppunit/filter/ipdf/data/dict-array-dict.pdf 
b/vcl/qa/cppunit/filter/ipdf/data/dict-array-dict.pdf
new file mode 100644
index ..73de3117b9a6
--- /dev/null
+++ b/vcl/qa/cppunit/filter/ipdf/data/dict-array-dict.pdf
@@ -0,0 +1,55 @@
+%PDF-1.7
+%���
+1 0 obj <<
+  /Type /Catalog
+  /Pages 2 0 R
+>>
+endobj
+2 0 obj <<
+  /Type /Pages
+  /MediaBox [0 0 200 300]
+  /Count 1
+  /Kids [3 0 R]
+>>
+endobj
+3 0 obj <<
+  /Type /Page
+  /Parent 2 0 R
+  /Contents 4 0 R
+  /Key[<>]
+>>
+endobj
+4 0 obj <<
+  /Length 188
+>>
+stream
+q
+0 0 0 rg
+0 290 10 10 re B*
+10 150 50 30 re B*
+0 0 1 rg
+190 290 10 10 re B*
+70 232 50 30 re B*
+0 1 0 rg
+190 0 10 10 re B*
+130 150 50 30 re B*
+1 0 0 rg
+0 0 10 10 re B*
+70 67 50 30 re B*
+Q
+endstream
+endobj
+xref
+0 5
+00 65535 f 
+15 0 n 
+68 0 n 
+000157 0 n 
+000251 0 n 
+trailer <<
+  /Root 1 0 R
+  /Size 5
+>>
+startxref
+491
+%%EOF
diff --git a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx 
b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
index 96fd331ceb76..683a87f33995 100644
--- a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
+++ b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -140,6 +141,26 @@ CPPUNIT_TEST_FIXTURE(VclFilterIpdfTest, 
testPDFAddVisibleSignatureLastPage)
 CPPUNIT_ASSERT_EQUAL(4, pAnnot->getObjectCount());
 }
 
+CPPUNIT_TEST_FIXTURE(VclFilterIpdfTest, testDictArrayDict)
+{
+// Load a file that has markup like this:
+// 3 0 obj <<
+//   /Key[<>]
+// >>
+OUString aSourceURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"dict-array-dict.pdf";
+SvFileStream aFile(aSourceURL, StreamMode::READ);
+vcl::filter::PDFDocument aDocument;
+CPPUNIT_ASSERT(aDocument.Read(aFile));
+std::vector aPages = aDocument.GetPages();
+CPPUNIT_ASSERT(!aPages.empty());
+vcl::filter::PDFObjectElement* pPage = aPages[0];
+auto pKey = 
dynamic_cast(pPage->Lookup("Key"));
+
+// Without the accompanying fix in place, this test would have failed, 
because the value of Key
+// was a dictionary element, not an array element.
+CPPUNIT_ASSERT(pKey);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx 
b/vcl/source/filter/ipdf/pdfdocument.cxx
index ec763d54a2a1..2b6c9d49de34 100644
--- a/vcl/source/filter/ipdf/pdfdocument.cxx
+++ b/vcl/source/filter/ipdf/pdfdocument.cxx
@@ -2406,8 +2406,17 @@ size_t PDFDictionaryElement::Parse(const 
std::vector
 if (nexti >= i) // ensure we go forwards and not endlessly loop
 {
 i = nexti;
-rDictionary[aName] = pDictionary;
-aName.clear();
+if (pArray)
+{
+// Dictionary value inside an array.
+pArray->PushBack(pDictionary);
+}
+else
+{
+// Dictionary toplevel value.
+rDictionary[aName] = pDictionary;
+aName.clear();
+}
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Mariam Fahmy license statement

2020-10-16 Thread Mariam Fahmy
All of my past & future contributions to LibreOffice may be licensed under
the MPLv2/LGPLv3+ dual license.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-10-16 Thread Dr. David Alan Gilbert (via logerrit)
 filter/source/msfilter/mstoolbar.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 9aa11d79ce424ec96111763849a0b4de3b440c3e
Author: Dr. David Alan Gilbert 
AuthorDate: Fri Oct 16 14:52:28 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 16 20:26:46 2020 +0200

msfilter: Fix 0x%d debug printfs

Generally you want either %d or 0x%x, this had a few 0x%d debugs.

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

diff --git a/filter/source/msfilter/mstoolbar.cxx 
b/filter/source/msfilter/mstoolbar.cxx
index 43d31aeccd25..fee6cae04c2d 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -211,9 +211,9 @@ void TBCHeader::Print( FILE* fp )
 indent_printf(fp,"  tbct 0x%x\n", static_cast< unsigned int >( tbct ));
 indent_printf(fp,"  bPriority 0x%x\n", bPriority );
 if ( width.get() )
-indent_printf(fp,"  width 0x%d(0x%x)\n", *width, *width);
+indent_printf(fp,"  width %d(0x%x)\n", *width, *width);
 if ( height.get() )
-indent_printf(fp,"  height 0x%d(0x%x)\n", *height, *height);
+indent_printf(fp,"  height %d(0x%x)\n", *height, *height);
 }
 #endif
 
@@ -698,16 +698,16 @@ void TBCCDData::Print( FILE* fp)
 {
 Indent a;
 indent_printf(fp,"[ 0x%x ] TBCCDData -- dump\n", nOffSet );
-indent_printf(fp,"  cwstrItems items in wstrList 0x%d\n", cwstrItems);
+indent_printf(fp,"  cwstrItems items in wstrList %d\n", cwstrItems);
 for ( sal_Int32 index=0; index < cwstrItems; ++index )
 {
 Indent b;
 indent_printf(fp, "  wstrList[%d] %s", static_cast< int >( index ), 
OUStringToOString( wstrList[index].getString(), RTL_TEXTENCODING_UTF8 
).getStr() );
 }
-indent_printf(fp,"  cwstrMRU num most recently used string 0x%d item\n", 
cwstrMRU);
-indent_printf(fp,"  iSel index of selected item 0x%d item\n", iSel);
-indent_printf(fp,"  cLines num of suggested lines to display 0x%d", 
cLines);
-indent_printf(fp,"  dxWidth width in pixels 0x%d", dxWidth);
+indent_printf(fp,"  cwstrMRU num most recently used string %d item\n", 
cwstrMRU);
+indent_printf(fp,"  iSel index of selected item %d item\n", iSel);
+indent_printf(fp,"  cLines num of suggested lines to display %d", cLines);
+indent_printf(fp,"  dxWidth width in pixels %d", dxWidth);
 indent_printf(fp,"  wstrEdit %s", OUStringToOString( wstrEdit.getString(), 
RTL_TEXTENCODING_UTF8 ).getStr() );
 }
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Jan-Marek Glogowski (via logerrit)
 sw/source/ui/frmdlg/column.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a362277bd133832c71e66603a10e4e4e19492b4d
Author: Jan-Marek Glogowski 
AuthorDate: Fri Oct 16 11:35:56 2020 +0200
Commit: Michael Weghorn 
CommitDate: Fri Oct 16 19:53:29 2020 +0200

tdf#136924 draw lines using field text color

Interestingly, these are not icon images, as I expected, but it's
a custom DrawingArea widget, which is completely drawn by some
algorithm.

Currently it uses the themes field color as background fill color
and an independent font color for the lines. So just use the
themed, matching field text color instead.

Regressed-by: 39e027c669fc0a91e223d7635c10adb5778586c7
Change-Id: I9f0073f41127207d2391ee23c9553512ffe4ba01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104422
Reviewed-by: Jan-Marek Glogowski 
Tested-by: Jan-Marek Glogowski 
(cherry picked from commit 160bd8cf3c9c6680b9a9291f2d2c4929ec0785c1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104342
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins

diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 50822c644e6b..343ce664a4e3 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -1325,7 +1325,7 @@ void ColumnValueSet::UserDraw(const UserDrawEvent& rUDEvt)
 Color aFillColor(pDev->GetFillColor());
 Color aLineColor(pDev->GetLineColor());
 pDev->SetFillColor(rStyleSettings.GetFieldColor());
-pDev->SetLineColor(SwViewOption::GetFontColor());
+pDev->SetLineColor(rStyleSettings.GetFieldTextColor());
 
 long nStep = std::abs(std::abs(nRectHeight * 95 /100) / 11);
 long nTop = (nRectHeight - 11 * nStep ) / 2;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Miklos Vajna (via logerrit)
 filter/source/msfilter/rtfutil.cxx   |   41 -
 sw/qa/extras/htmlexport/data/paint-ole.ole   |  199 +++
 sw/qa/extras/htmlexport/data/paint-ole.png   |binary
 sw/qa/extras/htmlexport/data/paint-ole.xhtml |9 +
 sw/qa/extras/htmlexport/htmlexport.cxx   |   37 +
 5 files changed, 278 insertions(+), 8 deletions(-)

New commits:
commit 247b247dadc8f0133a8eb94f1423a29315cf998a
Author: Miklos Vajna 
AuthorDate: Fri Oct 16 16:24:06 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri Oct 16 19:47:45 2020 +0200

sw reqif-xhtml import, embedded objects: handle non-package Ole10Native 
stream

Commit 800085d4fb0831f2065e86bfd99164cd89998fcd (sw reqif-xhtml import,
embedded objects: handle Ole10Native stream, 2020-05-04) added support
for handling an OLE1 stream which contained something else than OLE2
data.

However, that assumed a fixed class name ("Package") and a matching
class id. Improve this, so that the class id is created dynamically,
based on the OLE1 class name.

The class id can be figured out by putting the OLE1 data in an RTF file
and converting that RTF file to DOC using Word.

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

diff --git a/filter/source/msfilter/rtfutil.cxx 
b/filter/source/msfilter/rtfutil.cxx
index 9e78acf1dc00..4d6c5dda2fea 100644
--- a/filter/source/msfilter/rtfutil.cxx
+++ b/filter/source/msfilter/rtfutil.cxx
@@ -18,12 +18,31 @@
 
 namespace
 {
-/// If rOle1 is native OLE1 data of size nOle1Size, wraps it in an OLE2 
container.
-void WrapOle1InOle2(SvStream& rOle1, sal_uInt32 nOle1Size, SvStream& rOle2)
+/**
+ * If rOle1 is native OLE1 data of size nOle1Size, wraps it in an OLE2 
container.
+ *
+ * The OLE2 root's CLSID is set based on rClassName.
+ */
+void WrapOle1InOle2(SvStream& rOle1, sal_uInt32 nOle1Size, SvStream& rOle2,
+const OString& rClassName)
 {
 tools::SvRef pStorage = new SotStorage(rOle2);
-// OLE Package Object
-SvGlobalName aName(0x0003000C, 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
+OString aAnsiUserType;
+SvGlobalName aName;
+if (rClassName == "PBrush")
+{
+aAnsiUserType = "Bitmap Image";
+aName = SvGlobalName(0x0003000A, 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
+}
+else
+{
+if (!rClassName.isEmpty() && rClassName != "Package")
+{
+SAL_WARN("filter.ms", "WrapOle1InOle2: unexpected class name: '" 
<< rClassName << "'");
+}
+aAnsiUserType = "OLE Package";
+aName = SvGlobalName(0x0003000C, 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
+}
 pStorage->SetClass(aName, SotClipboardFormatId::NONE, "");
 
 // [MS-OLEDS] 2.3.7 CompObjHeader
@@ -40,14 +59,13 @@ void WrapOle1InOle2(SvStream& rOle1, sal_uInt32 nOle1Size, 
SvStream& rOle2)
 pCompObj->WriteUInt32(0x4600);
 // Rest of CompObjStream
 // AnsiUserType
-OString aAnsiUserType("OLE Package");
 pCompObj->WriteUInt32(aAnsiUserType.getLength() + 1);
 pCompObj->WriteOString(aAnsiUserType);
 pCompObj->WriteChar(0);
 // AnsiClipboardFormat
 pCompObj->WriteUInt32(0x);
 // Reserved1
-OString aReserved1("Package");
+OString aReserved1(rClassName);
 pCompObj->WriteUInt32(aReserved1.getLength() + 1);
 pCompObj->WriteOString(aReserved1);
 pCompObj->WriteChar(0);
@@ -330,7 +348,14 @@ bool ExtractOLE2FromObjdata(const OString& rObjdata, 
SvStream& rOle2)
 aStream.ReadUInt32(nData); // OLEVersion
 aStream.ReadUInt32(nData); // FormatID
 aStream.ReadUInt32(nData); // ClassName
-aStream.SeekRel(nData);
+OString aClassName;
+if (nData)
+{
+// -1 because it is null-terminated.
+aClassName = read_uInt8s_ToOString(aStream, nData - 1);
+// Skip null-termination.
+aStream.SeekRel(1);
+}
 aStream.ReadUInt32(nData); // TopicName
 aStream.SeekRel(nData);
 aStream.ReadUInt32(nData); // ItemName
@@ -354,7 +379,7 @@ bool ExtractOLE2FromObjdata(const OString& rObjdata, 
SvStream& rOle2)
 else
 {
 SvMemoryStream aStorage;
-WrapOle1InOle2(aStream, nData, aStorage);
+WrapOle1InOle2(aStream, nData, aStorage, aClassName);
 rOle2.WriteStream(aStorage);
 }
 rOle2.Seek(0);
diff --git a/sw/qa/extras/htmlexport/data/paint-ole.ole 
b/sw/qa/extras/htmlexport/data/paint-ole.ole
new file mode 100644
index ..e8e78490ed68
--- /dev/null
+++ b/sw/qa/extras/htmlexport/data/paint-ole.ole
@@ -0,0 +1,199 @@
+{\object\objemb{\*\objclass PBrush}\objw13852\objh7822{\*\objdata 
+01050200070050427275736844
+424de643360028004c004c0001001

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

2020-10-16 Thread Noel (via logerrit)
 sd/source/filter/ppt/pptinanimations.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 648d9892e8a85606c060e050e31251357dcff44b
Author: Noel 
AuthorDate: Fri Oct 16 12:51:09 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 16 19:18:51 2020 +0200

remove thread-unsafe static buffer

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

diff --git a/sd/source/filter/ppt/pptinanimations.cxx 
b/sd/source/filter/ppt/pptinanimations.cxx
index 3d17237ba67b..826765ab7185 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -3007,15 +3007,14 @@ void AnimationImporter::dump( const PropertySet& rSet )
 case DFF_ANIM_PRESS_CLASS_OLE_ACTION:   pMode = 
"oleaction"; break;
 case DFF_ANIM_PRESS_CLASS_MEDIACALL:pMode = 
"mediacall"; break;
 default:
-{
-static char buffer[128];
-sprintf( buffer, "%" SAL_PRIdINT32, nPresetClass );
-pMode = buffer;
-}
+pMode = nullptr;
 break;
 }
 
-fprintf(mpFile, " class=\"%s\"", pMode);
+if (pMode)
+fprintf(mpFile, " class=\"%s\"", pMode);
+else
+fprintpf(mpFile, " class =\"%" SAL_PRIdINT32 "\"", 
nPresetClass);
 bKnown = true;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Michael Stahl (via logerrit)
 sw/qa/extras/uiwriter/uiwriter2.cxx |   83 
 sw/source/core/edit/autofmt.cxx |   25 +++---
 2 files changed, 100 insertions(+), 8 deletions(-)

New commits:
commit cb73ad024de8901ee65c8dc51de4ebb2d3da1d91
Author: Michael Stahl 
AuthorDate: Thu Oct 15 16:47:42 2020 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 16 19:17:57 2020 +0200

tdf#137245 sw: fix AutoFormat SetBorder deleting flys

Since commit e1629c210ad78310e3d48c0756723134a27b89df ReplaceRange()
will preserve flys, so split the delete into a DeleteAndJoin() just to
join the paragraphs - which should not delete any flys because it
doesn't include the "---" so isn't at the end of the section - and
a ReplaceRange for the "---".

(regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5
 and e75dd1fc992f168f24d66595265a978071cdd277)

Change-Id: Ib995e41649f69963c823a463538958d533082ee7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104380
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 9b34dc20b6946698ae6ce2d5d859885bfb444633)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104335
Reviewed-by: Caolán McNamara 
(cherry picked from commit 3f554879aa90a73940041e3a1217b97a15e18bc3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104339
Tested-by: Michael Stahl 

diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 3b158dc87595..f50a2ebe6959 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -40,6 +40,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -388,6 +391,86 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, 
testRedlineSplitContentNode)
 rUndoManager.Undo();
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf137245)
+{
+SwDoc* const pDoc(createDoc());
+SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect());
+corr.GetSwFlags().bSetBorder = true;
+// sigh, it's a global... err i mean Singleton design pattern *eyeroll*
+SvxSwAutoFormatFlags flags(*SwEditShell::GetAutoFormatFlags());
+comphelper::ScopeGuard const g([=]() { 
SwEditShell::SetAutoFormatFlags(&flags); });
+flags.bSetBorder = true;
+SwEditShell::SetAutoFormatFlags(&flags);
+
+{
+SwFormatAnchor anchor(RndStdIds::FLY_AT_PARA);
+anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+SfxItemSet flySet(pDoc->GetAttrPool(),
+  svl::Items{});
+flySet.Put(anchor);
+SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+flySet.Put(size); // set a size, else we get 1 char per line...
+SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, 
/*bAnchValid=*/true);
+CPPUNIT_ASSERT(pFly != nullptr);
+}
+{
+SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+SfxItemSet flySet(pDoc->GetAttrPool(),
+  svl::Items{});
+flySet.Put(anchor);
+SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+flySet.Put(size); // set a size, else we get 1 char per line...
+SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, 
/*bAnchValid=*/true);
+CPPUNIT_ASSERT(pFly != nullptr);
+}
+// move cursor back to body
+pWrtShell->SttEndDoc(false);
+// keep first paragraph empty so that its flys may be deleted too
+//pWrtShell->Insert("abc");
+pWrtShell->SplitNode(false);
+
+{
+SwFormatAnchor anchor(RndStdIds::FLY_AT_PARA);
+anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+SfxItemSet flySet(pDoc->GetAttrPool(),
+  svl::Items{});
+flySet.Put(anchor);
+SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+flySet.Put(size); // set a size, else we get 1 char per line...
+SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, 
/*bAnchValid=*/true);
+CPPUNIT_ASSERT(pFly != nullptr);
+}
+{
+SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+SfxItemSet flySet(pDoc->GetAttrPool(),
+  svl::Items{});
+flySet.Put(anchor);
+SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+flySet.Put(size); // set a size, else we get 1 char per line...
+SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, 
/*bAnchValid=*/true);
+CPPUNIT_ASSERT(pFly != nullptr);
+}
+
+const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+CPPUNIT_ASSERT_EQUAL(static_cast(4), rFormats.size());
+
+// move cursor back to body
+pWrtShell->SttEndDoc(false);
+pWrtShell->Insert("---");
+pWrtShell->SplitNode(true);
+
+CPPU

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

2020-10-16 Thread Jan-Marek Glogowski (via logerrit)
 sw/source/ui/frmdlg/column.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 160bd8cf3c9c6680b9a9291f2d2c4929ec0785c1
Author: Jan-Marek Glogowski 
AuthorDate: Fri Oct 16 11:35:56 2020 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Fri Oct 16 18:02:32 2020 +0200

tdf#136924 draw lines using field text color

Interestingly, these are not icon images, as I expected, but it's
a custom DrawingArea widget, which is completely drawn by some
algorithm.

Currently it uses the themes field color as background fill color
and an independent font color for the lines. So just use the
themed, matching field text color instead.

Regressed-by: 39e027c669fc0a91e223d7635c10adb5778586c7
Change-Id: I9f0073f41127207d2391ee23c9553512ffe4ba01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104422
Reviewed-by: Jan-Marek Glogowski 
Tested-by: Jan-Marek Glogowski 

diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 3922ecffda8e..8e4c471ddef7 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -1325,7 +1325,7 @@ void ColumnValueSet::UserDraw(const UserDrawEvent& rUDEvt)
 Color aFillColor(pDev->GetFillColor());
 Color aLineColor(pDev->GetLineColor());
 pDev->SetFillColor(rStyleSettings.GetFieldColor());
-pDev->SetLineColor(SwViewOption::GetFontColor());
+pDev->SetLineColor(rStyleSettings.GetFieldTextColor());
 
 long nStep = std::abs(std::abs(nRectHeight * 95 /100) / 11);
 long nTop = (nRectHeight - 11 * nStep ) / 2;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Caolán McNamara (via logerrit)
 sfx2/source/dialog/backingwindow.hxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 57db2508dd912baee6a768be9815dee106118da6
Author: Caolán McNamara 
AuthorDate: Fri Oct 16 12:22:34 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 16 17:59:09 2020 +0200

unused forward declaration

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

diff --git a/sfx2/source/dialog/backingwindow.hxx 
b/sfx2/source/dialog/backingwindow.hxx
index 99d7bd6b7ccc..cc367f058c76 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -40,8 +40,6 @@
 
 #include 
 
-class ToolBox;
-
 class BackingWindow : public vcl::Window, public VclBuilderContainer
 {
 css::uno::Reference mxContext;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Noel (via logerrit)
 svx/source/xml/xmlexport.cxx |   21 ++---
 1 file changed, 6 insertions(+), 15 deletions(-)

New commits:
commit 3dd9fb3076511faa94363be56d416fdfa8249c30
Author: Noel 
AuthorDate: Fri Oct 16 13:24:34 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 16 17:45:17 2020 +0200

svx: use the fastparser API when possible

part of the process of making SvXMLImport fastparser-only

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

diff --git a/svx/source/xml/xmlexport.cxx b/svx/source/xml/xmlexport.cxx
index 5f179873b0ca..e36f6f5191b7 100644
--- a/svx/source/xml/xmlexport.cxx
+++ b/svx/source/xml/xmlexport.cxx
@@ -185,9 +185,6 @@ bool SvxDrawingLayerImport( SdrModel* pModel, const 
uno::Reference xParser = xml::sax::Parser::create( 
xContext );
-
 // prepare filter arguments
 Sequence aFilterArgs( 2 );
 Any *pArgs = aFilterArgs.getArray();
@@ -195,26 +192,20 @@ bool SvxDrawingLayerImport( SdrModel* pModel, const 
uno::Reference xFilter( 
xContext->getServiceManager()->createInstanceWithArgumentsAndContext( 
OUString::createFromAscii( pImportService ), aFilterArgs, xContext), UNO_QUERY 
);
-uno::Reference< xml::sax::XFastParser > xFastParser = dynamic_cast<
-xml::sax::XFastParser* >( xFilter.get() );
-DBG_ASSERT( xFilter.is(), "Can't instantiate filter component." );
+Reference< XInterface > xFilter = 
xContext->getServiceManager()->createInstanceWithArgumentsAndContext( 
OUString::createFromAscii( pImportService ), aFilterArgs, xContext);
+SAL_WARN_IF( !xFilter, "svx", "Can't instantiate filter component " << 
pImportService);
+uno::Reference< xml::sax::XFastParser > xFastParser( xFilter,  
UNO_QUERY );
+assert(xFastParser);
 
 bRet = false;
-if( xParser.is() && xFilter.is() )
+if( xFastParser.is() )
 {
-// connect parser and filter
-xParser->setDocumentHandler( xFilter );
-
 // connect model and filter
 uno::Reference < document::XImporter > xImporter( xFilter, 
UNO_QUERY );
 xImporter->setTargetDocument( xTargetDocument );
 
 // finally, parser the stream
-if( xFastParser.is() )
-xFastParser->parseStream( aParserInput );
-else
-xParser->parseStream( aParserInput );
+xFastParser->parseStream( aParserInput );
 
 bRet = true;
 }
___
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-16 Thread Noel (via logerrit)
 sw/source/filter/xml/swxml.cxx |   33 -
 1 file changed, 20 insertions(+), 13 deletions(-)

New commits:
commit f586c0c9257473d92936a91d632a4a408a36275e
Author: Noel 
AuthorDate: Fri Oct 16 13:25:17 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 16 17:44:57 2020 +0200

sw: use the fastparser API when possible

part of the process of making SvXMLImport fastparser-only

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

diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 4683b6ecb1c7..c3d9c50556da 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -150,34 +150,41 @@ ErrCode ReadThroughComponent(
 aParserInput.sSystemId = rName;
 aParserInput.aInputStream = xInputStream;
 
-// get parser
-uno::Reference< xml::sax::XParser > xParser = 
xml::sax::Parser::create(rxContext);
-SAL_INFO( "sw.filter", "parser created" );
 // get filter
 const OUString aFilterName(OUString::createFromAscii(pFilterName));
-uno::Reference< xml::sax::XDocumentHandler > xFilter(
-
rxContext->getServiceManager()->createInstanceWithArgumentsAndContext(aFilterName,
 rFilterArguments, rxContext),
-UNO_QUERY);
+uno::Reference< XInterface > xFilter =
+
rxContext->getServiceManager()->createInstanceWithArgumentsAndContext(aFilterName,
 rFilterArguments, rxContext);
 SAL_WARN_IF(!xFilter.is(), "sw.filter", "Can't instantiate filter 
component: " << aFilterName);
 if( !xFilter.is() )
 return ERR_SWG_READ_ERROR;
-SAL_INFO( "sw.filter", "" << pFilterName << " created" );
-// connect parser and filter
-xParser->setDocumentHandler( xFilter );
+// the underlying SvXMLImport implements XFastParser, XImporter, 
XFastDocumentHandler
+uno::Reference< xml::sax::XFastParser > xFastParser(xFilter, UNO_QUERY);
+uno::Reference< xml::sax::XDocumentHandler > xDocumentHandler;
+if (!xFastParser)
+xDocumentHandler.set(xFilter, UNO_QUERY);
+if (!xDocumentHandler && !xFastParser)
+{
+SAL_WARN("sd", "service does not implement XFastParser or 
XDocumentHandler");
+assert(false);
+return ERR_SWG_READ_ERROR;
+}
 
 // connect model and filter
 uno::Reference < XImporter > xImporter( xFilter, UNO_QUERY );
 xImporter->setTargetDocument( xModelComponent );
-uno::Reference< xml::sax::XFastParser > xFastParser = dynamic_cast<
-xml::sax::XFastParser* >( xFilter.get() );
 
-// finally, parser the stream
+// finally, parse the stream
 try
 {
-if( xFastParser.is() )
+if (xFastParser)
 xFastParser->parseStream( aParserInput );
 else
+{
+uno::Reference< xml::sax::XParser > xParser = 
xml::sax::Parser::create(rxContext);
+// connect parser and filter
+xParser->setDocumentHandler( xDocumentHandler );
 xParser->parseStream( aParserInput );
+}
 }
 catch( xml::sax::SAXParseException& r)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Seth Chaiklin (via logerrit)
 source/text/shared/optionen/01040400.xhp |   57 +++
 1 file changed, 28 insertions(+), 29 deletions(-)

New commits:
commit af77d292e0f976655dce753608b9cb5d17f7f9ad
Author: Seth Chaiklin 
AuthorDate: Fri Oct 16 15:39:02 2020 +0200
Commit: Seth Chaiklin 
CommitDate: Fri Oct 16 16:35:27 2020 +0200

Related to: tdf#137495  Update help page for Tools - Options - Writer - 
Print

-update label names "Images and objects", "Print text in black"
-add note about when "Right-to-left" control appears, with sys switch
-change hierarchy of some controls from  to 
-move position of "Comments" to correspond ordering in dialog box
-update to ,,,
(except for labels, no text changes)

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

diff --git a/source/text/shared/optionen/01040400.xhp 
b/source/text/shared/optionen/01040400.xhp
index 5eff473ac..5f275f8e3 100644
--- a/source/text/shared/optionen/01040400.xhp
+++ b/source/text/shared/optionen/01040400.xhp
@@ -1,6 +1,5 @@
 
 
-
 
 
-
 
   
- Print
+ Print (Options)
  /text/shared/optionen/01040400.xhp
   

@@ -49,75 +47,76 @@
 mw made "fax machine selection" a two level entry
 
 
-Print
+Print
 Specifies print 
settings within a text or HTML document.
 
   
  
   
-The print settings 
defined on this tab page apply to all subsequent print jobs, until you change 
the settings again. If you want to change the settings for the current print 
job only, use the File - Print dialog.
-Contents
+The print settings defined on this 
tab page apply to all subsequent print jobs, until you change the settings 
again. If you want to change the settings for the current print job only, use 
the File - Print dialog.
+Contents
 Specifies 
which document contents are to be printed. 
 
 
-Pictures and objects
+Images and objects
 Specifies whether the 
graphics of your text document are printed.
 
 
-Form 
controls
+Form controls
  Specifies whether the 
form control fields of the text document are printed.
 
 
-Page 
background
+Page background
   Specifies whether to include colors and objects that are inserted to 
the background of the page (Format - Page - Background) in the printed 
document.UFI: fixes #i21977#
 
 
-Print 
black
+Print text in black
   Specifies whether to always 
print text in black.
 
 
-Hidden 
text
+Hidden text
   Enable this option to print text that is marked as hidden. The 
following hidden text is printed: text that is formatted as hidden by Format - Character - Font Effects - 
Hidden, and the text fields Hidden text and Hidden 
paragraphs.UFI: sorry, due to a bug no links allowed in 
extended help text
 
 
-Text 
placeholder
+Text placeholder
   Enable this option to print text placeholders. Disable this option to 
leave the text placeholders blank in the printout.Text placeholders are 
fields.
-  Pages
+  Pages
   Defines 
the print order for $[officename] Writer documents with multiple 
pages.
 
-Left 
pages (not for HTML documents)
+Left pages (not for HTML documents)
   Specifies whether to print 
all left (even numbered) pages of the document.
 
-Right 
pages (not for HTML documents)
+Right pages (not for HTML 
documents)
   Specifies whether to print 
all right (odd numbered) pages of the document.
 
-Brochure
+Brochure
   Select the Brochure 
option to print your document in brochure format. The brochure 
format is as follows in $[officename] Writer:
   
  If 
you print a document in portrait on a landscape page, two opposing sides in a 
brochure will be printed next to each other. If you have a printer with 
double-sided printing capability, you can create an entire brochure from your 
document without having to collate the pages later. If you have a printer that 
only has single-sided printing capability, you can achieve this effect by first 
printing the front pages with the "Front sides / right pages /odd pages" option 
marked, then re-inserting the entire paper stack in your printer and printing 
all the back pages with the "Back pages / left pages / even pages" option 
marked.
   
 
-Right 
to left
+Right to left
   Check to print the pages of the brochure in the correct order for a 
right-to-left script.
-  Comments
-
-
-
-
-
-
-  Specifies whether comments in your document are 
printed.
-  Other
+This control appears only if Complex 
text layout is set in %PRODUCTNAME - 
PreferencesTools - 
Options - Language Settings 
- Languages.
+Other
 
 
-Print 
automatically inserted blank pages
+Print automatically inserted blank 
pages
 If this option is enabled, automatically-inserted blank pages are being 
printed. This is best if you are printing double-sided. For example, in a book, 
a "chapter" paragraph style h

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source desktop/source

2020-10-16 Thread Jan Holesovsky (via logerrit)
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |   20 +---
 desktop/source/lib/init.cxx |   12 +++--
 2 files changed, 21 insertions(+), 11 deletions(-)

New commits:
commit ebd3d84ad58b31d325dbe17c35759d12ed7a4242
Author: Jan Holesovsky 
AuthorDate: Fri Oct 16 14:34:43 2020 +0200
Commit: Andras Timar 
CommitDate: Fri Oct 16 16:26:55 2020 +0200

lok: Make the chart (sub)title work even from the mobile-wizard.

Change-Id: Ic6346a403639e283ade47429f581f91e7a468f63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104436
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx 
b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 4026b22d9898..ce3827aa20e2 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -434,19 +434,23 @@ void ChartElementsPanel::updateData()
 
 bool hasTitle = isTitleVisisble(mxModel, TitleHelper::MAIN_TITLE);
 mpCBTitle->Check(hasTitle);
-if (!mpEditTitle->HasFocus())
-{
-
mpEditTitle->SetText(TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::MAIN_TITLE,
 mxModel)));
+
+OUString title = mpEditTitle->GetText();
+OUString newTitle = 
TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::MAIN_TITLE, 
mxModel));
+if (title != newTitle)
+mpEditTitle->SetText(newTitle);
+if (mpEditTitle->IsEnabled() != hasTitle)
 mpEditTitle->Enable(hasTitle);
-}
 
 bool hasSubtitle = isTitleVisisble(mxModel, TitleHelper::SUB_TITLE);
 mpCBSubtitle->Check(hasSubtitle);
-if (!mpEditSubtitle->HasFocus())
-{
-
mpEditSubtitle->SetText(TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::SUB_TITLE,
 mxModel)));
+
+OUString subtitle = mpEditSubtitle->GetText();
+OUString newSubtitle = 
TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::SUB_TITLE, 
mxModel));
+if (subtitle != newSubtitle)
+mpEditSubtitle->SetText(newSubtitle);
+if (mpEditSubtitle->IsEnabled() != hasSubtitle)
 mpEditSubtitle->Enable(hasSubtitle);
-}
 
 mpCBXAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::X_AXIS_TITLE));
 mpCBYAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::Y_AXIS_TITLE));
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c8971182893f..89cf49dbf6f7 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3641,6 +3641,7 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* 
/*pThis*/, unsigned nWin
 {
 static const OUString sClickAction("CLICK");
 static const OUString sSelectAction("SELECT");
+static const OUString sSetAction("SET");
 static const OUString sClearAction("CLEAR");
 static const OUString sTypeAction("TYPE");
 static const OUString sUpAction("UP");
@@ -3656,12 +3657,11 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* 
/*pThis*/, unsigned nWin
 
 bIsWeldedDialog = pWidget != nullptr;
 bool bContinueWithLOKWindow = false;
+OUString sControlType = aMap["type"];
 OUString sAction = aMap["cmd"];
 
 if (bIsWeldedDialog)
 {
-OUString sControlType = aMap["type"];
-
 if (sControlType == "tabcontrol")
 {
 auto pNotebook = dynamic_cast(pWidget);
@@ -3765,9 +3765,15 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* 
/*pThis*/, unsigned nWin
 {
 aMap["TEXT"] = aMap["data"];
 
-pUIWindow->execute(sClearAction, aMap);
+pUIWindow->execute(sClearAction, aMap); // FIXME - 
change the "CLEAR"&"TYPE" to "SET" and test thoroughly; the "TYPE" really types 
a character by character
 pUIWindow->execute(sTypeAction, aMap);
 }
+else if (sControlType == "edit" && sAction == "change") // 
FIXME - shouldn't "edit" issue "set" instead of "change"?
+{
+aMap["TEXT"] = aMap["data"];
+
+pUIWindow->execute(sSetAction, aMap);
+}
 else if (sAction == "value")
 {
 aMap["VALUE"] = aMap["data"];
___
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.2' - uitest/writer_tests vcl/source

2020-10-16 Thread Jan Holesovsky (via logerrit)
 uitest/writer_tests/customizeDialog.py |2 +-
 vcl/source/uitest/uiobject.cxx |   15 +--
 2 files changed, 14 insertions(+), 3 deletions(-)

New commits:
commit 60eefb146e4ad3fdac896400393b4e1cfaef7767
Author: Jan Holesovsky 
AuthorDate: Fri Oct 16 14:27:27 2020 +0200
Commit: Andras Timar 
CommitDate: Fri Oct 16 16:26:32 2020 +0200

uitest: Rename the "SET" to "TYPE" for Edit boxes + implement the real 
"SET".

To be consistent with the other controls: "TYPE" actually enters the
characters one by one, while "SET" sets it as a whole.

Also I believe Modify() should be called, not UpdateData()...

Change-Id: I967dc270b1d92fe76107732a511cc3e70d3d65c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104435
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/uitest/writer_tests/customizeDialog.py 
b/uitest/writer_tests/customizeDialog.py
index e6fef69cb50e..2eeb61a37aab 100644
--- a/uitest/writer_tests/customizeDialog.py
+++ b/uitest/writer_tests/customizeDialog.py
@@ -34,7 +34,7 @@ class ConfigureDialog(UITestCase):
 initialEntryCount = get_state_as_dict(xfunc)["Children"]
 self.assertTrue(initialEntryCount is not 0)
 
-xSearch.executeAction("SET", mkPropertyValues({"TEXT":"format"}))
+xSearch.executeAction("TYPE", mkPropertyValues({"TEXT":"format"}))
 
 # Wait for the search/filter op to be completed
 time.sleep(1)
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 77f4014eea7c..d7c6462783d7 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -667,7 +667,7 @@ void EditUIObject::execute(const OUString& rAction,
 const StringMap& rParameters)
 {
 bool bHandled = true;
-if (rAction == "SET")
+if (rAction == "TYPE")
 {
 if (rParameters.find("TEXT") != rParameters.end())
 {
@@ -690,6 +690,17 @@ void EditUIObject::execute(const OUString& rAction,
 bHandled = false;
 }
 }
+else if (rAction == "SET")
+{
+auto it = rParameters.find("TEXT");
+if (it != rParameters.end())
+{
+mxEdit->SetText(it->second);
+mxEdit->Modify();
+}
+else
+bHandled = false;
+}
 else if (rAction == "SELECT")
 {
 if (rParameters.find("FROM") != rParameters.end() &&
@@ -704,7 +715,7 @@ void EditUIObject::execute(const OUString& rAction,
 else if (rAction == "CLEAR")
 {
 mxEdit->SetText("");
-mxEdit->UpdateData();
+mxEdit->Modify();
 bHandled = true;
 }
 else
___
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.2' - desktop/source

2020-10-16 Thread Jan Holesovsky (via logerrit)
 desktop/source/lib/init.cxx |   54 
 1 file changed, 25 insertions(+), 29 deletions(-)

New commits:
commit 800c0aebe7dffb88eb5c1d96fd47eb99032fdfe9
Author: Jan Holesovsky 
AuthorDate: Thu Oct 15 18:05:35 2020 +0200
Commit: Andras Timar 
CommitDate: Fri Oct 16 16:24:27 2020 +0200

lok: Simplify the check for command in sendDialogEvent.

Change-Id: I1d2c967b68113d2528b80e91c32170f749ed9335
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104434
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b9fd1f9195e7..c8971182893f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3656,11 +3656,11 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* 
/*pThis*/, unsigned nWin
 
 bIsWeldedDialog = pWidget != nullptr;
 bool bContinueWithLOKWindow = false;
+OUString sAction = aMap["cmd"];
 
 if (bIsWeldedDialog)
 {
 OUString sControlType = aMap["type"];
-OUString sAction = aMap["cmd"];
 
 if (sControlType == "tabcontrol")
 {
@@ -3746,36 +3746,32 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* 
/*pThis*/, unsigned nWin
 if (pUIWindow) {
 bool bIsClickAction = false;
 
-if (aMap.find("cmd") != aMap.end()) {
-if (aMap["cmd"] == "selected")
-{
-aMap["POS"] = aMap["data"];
-aMap["TEXT"] = aMap["data"];
+if (sAction == "selected")
+{
+aMap["POS"] = aMap["data"];
+aMap["TEXT"] = aMap["data"];
 
-pUIWindow->execute(sSelectAction, aMap);
-}
-else if (aMap["cmd"] == "plus")
-{
-pUIWindow->execute(sUpAction, aMap);
-}
-else if (aMap["cmd"] == "minus")
-{
-pUIWindow->execute(sDownAction, aMap);
-}
-else if (aMap["cmd"] == "set")
-{
-aMap["TEXT"] = aMap["data"];
+pUIWindow->execute(sSelectAction, aMap);
+}
+else if (sAction == "plus")
+{
+pUIWindow->execute(sUpAction, aMap);
+}
+else if (sAction == "minus")
+{
+pUIWindow->execute(sDownAction, aMap);
+}
+else if (sAction == "set")
+{
+aMap["TEXT"] = aMap["data"];
 
-pUIWindow->execute(sClearAction, aMap);
-pUIWindow->execute(sTypeAction, aMap);
-}
-else if (aMap["cmd"] == "value")
-{
-aMap["VALUE"] = aMap["data"];
-pUIWindow->execute(sValue, aMap);
-}
-else
-bIsClickAction = true;
+pUIWindow->execute(sClearAction, aMap);
+pUIWindow->execute(sTypeAction, aMap);
+}
+else if (sAction == "value")
+{
+aMap["VALUE"] = aMap["data"];
+pUIWindow->execute(sValue, aMap);
 }
 else
 bIsClickAction = true;
___
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.2' - chart2/source chart2/uiconfig

2020-10-16 Thread Jan Holesovsky (via logerrit)
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |   39 
 chart2/source/controller/sidebar/ChartElementsPanel.hxx |3 
 chart2/uiconfig/ui/sidebarelements.ui   |   49 +---
 3 files changed, 82 insertions(+), 9 deletions(-)

New commits:
commit b9e03055d053d5cb8dbdc466ee7c67744a6433b8
Author: Jan Holesovsky 
AuthorDate: Wed Oct 14 16:18:17 2020 +0200
Commit: Andras Timar 
CommitDate: Fri Oct 16 16:21:38 2020 +0200

chart2: Add the possibility to edit title & subtitle from the sidebar.

Change-Id: I4be15acbc2127ebb6eca8864a0209ba57b488100
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104313
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx 
b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 28bc8c1a5469..4026b22d9898 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -284,7 +284,9 @@ ChartElementsPanel::ChartElementsPanel(
 mbModelValid(true)
 {
 get(mpCBTitle,  "checkbutton_title");
+get(mpEditTitle, "edit_title");
 get(mpCBSubtitle,  "checkbutton_subtitle");
+get(mpEditSubtitle, "edit_subtitle");
 get(mpCBXAxis,  "checkbutton_x_axis");
 get(mpCBXAxisTitle,  "checkbutton_x_axis_title");
 get(mpCBYAxis,  "checkbutton_y_axis");
@@ -326,7 +328,9 @@ void ChartElementsPanel::dispose()
 css::uno::Reference xBroadcaster(mxModel, 
css::uno::UNO_QUERY_THROW);
 xBroadcaster->removeModifyListener(mxListener);
 mpCBTitle.clear();
+mpEditTitle.clear();
 mpCBSubtitle.clear();
+mpEditSubtitle.clear();
 mpCBXAxis.clear();
 mpCBXAxisTitle.clear();
 mpCBYAxis.clear();
@@ -381,6 +385,10 @@ void ChartElementsPanel::Initialize()
 mpCBGridHorizontalMinor->SetClickHdl(aLink);
 
 mpLBLegendPosition->SetSelectHdl(LINK(this, ChartElementsPanel, 
LegendPosHdl));
+
+Link aEditLink = LINK(this, ChartElementsPanel, EditHdl);
+mpEditTitle->SetModifyHdl(aEditLink);
+mpEditSubtitle->SetModifyHdl(aEditLink);
 }
 
 namespace {
@@ -423,8 +431,23 @@ void ChartElementsPanel::updateData()
 
 mpCBLegend->Check(isLegendVisible(mxModel));
 mpBoxLegend->Enable( isLegendVisible(mxModel) );
-mpCBTitle->Check(isTitleVisisble(mxModel, TitleHelper::MAIN_TITLE));
-mpCBSubtitle->Check(isTitleVisisble(mxModel, TitleHelper::SUB_TITLE));
+
+bool hasTitle = isTitleVisisble(mxModel, TitleHelper::MAIN_TITLE);
+mpCBTitle->Check(hasTitle);
+if (!mpEditTitle->HasFocus())
+{
+
mpEditTitle->SetText(TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::MAIN_TITLE,
 mxModel)));
+mpEditTitle->Enable(hasTitle);
+}
+
+bool hasSubtitle = isTitleVisisble(mxModel, TitleHelper::SUB_TITLE);
+mpCBSubtitle->Check(hasSubtitle);
+if (!mpEditSubtitle->HasFocus())
+{
+
mpEditSubtitle->SetText(TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::SUB_TITLE,
 mxModel)));
+mpEditSubtitle->Enable(hasSubtitle);
+}
+
 mpCBXAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::X_AXIS_TITLE));
 mpCBYAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::Y_AXIS_TITLE));
 mpCBZAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::Z_AXIS_TITLE));
@@ -584,6 +607,18 @@ IMPL_LINK(ChartElementsPanel, CheckBoxHdl, Button*, 
pButton, void)
 setGridVisible(mxModel, GridType::HOR_MINOR, bChecked);
 }
 
+IMPL_LINK(ChartElementsPanel, EditHdl, Edit&, rEdit, void)
+{
+// title or subtitle?
+TitleHelper::eTitleType aTitleType = TitleHelper::MAIN_TITLE;
+if (&rEdit == mpEditSubtitle.get())
+aTitleType = TitleHelper::SUB_TITLE;
+
+// set it
+OUString aText(rEdit.GetText());
+TitleHelper::setCompleteString(aText, TitleHelper::getTitle(aTitleType, 
mxModel), comphelper::getProcessComponentContext());
+}
+
 IMPL_LINK_NOARG(ChartElementsPanel, LegendPosHdl, ListBox&, void)
 {
 sal_Int32 nPos = mpLBLegendPosition->GetSelectedEntryPos();
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.hxx 
b/chart2/source/controller/sidebar/ChartElementsPanel.hxx
index eca293645cc4..500ad77fccec 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.hxx
@@ -71,7 +71,9 @@ public:
 private:
 //ui controls
 VclPtr mpCBTitle;
+VclPtr mpEditTitle;
 VclPtr mpCBSubtitle;
+VclPtr mpEditSubtitle;
 VclPtr mpCBXAxis;
 VclPtr mpCBXAxisTitle;
 VclPtr mpCBYAxis;
@@ -110,6 +112,7 @@ private:
 void setTitleVisible(TitleHelper::eTitleType eTitle, bool bVisible);
 
 DECL_LINK(CheckBoxHdl, Button*, void);
+DECL_LINK(EditHdl, Edit&, void);
 DECL_LINK(LegendPosHdl, ListBox&, void);
 };
 
diff --git a/chart2/uiconfig/ui/sidebarelements.ui 
b/chart2/uiconfig/ui/sidebarelements.ui
index 9db51b35a5d7..2b1f

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - external/postgresql

2020-10-16 Thread Tor Lillqvist (via logerrit)
 external/postgresql/UnpackedTarball_postgresql.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9d4a66953262024b9a2d33f1ebe2e74440496355
Author: Tor Lillqvist 
AuthorDate: Sun Jul 5 10:23:44 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Oct 16 14:36:49 2020 +0200

Use correct location for the config.{guess,sub} in the postgresql tarball

Change-Id: Iccec53f67ab6c9e7920354f6a26c81300c1bee48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98097
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 
(cherry picked from commit 5fe12dd54ab09e3321c01f57d6af127b2fbdcf5f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104338
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/external/postgresql/UnpackedTarball_postgresql.mk 
b/external/postgresql/UnpackedTarball_postgresql.mk
index a53bbbffdb9b..90b363c2dccf 100644
--- a/external/postgresql/UnpackedTarball_postgresql.mk
+++ b/external/postgresql/UnpackedTarball_postgresql.mk
@@ -11,6 +11,8 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,postgresql))
 
 $(eval $(call 
gb_UnpackedTarball_set_tarball,postgresql,$(POSTGRESQL_TARBALL),,postgresql))
 
+$(eval $(call gb_UnpackedTarball_update_autoconf_configs,postgresql,config))
+
 $(eval $(call gb_UnpackedTarball_set_patchlevel,postgresql,3))
 
 $(eval $(call gb_UnpackedTarball_add_patches,postgresql, \
@@ -26,6 +28,4 @@ $(eval $(call gb_UnpackedTarball_add_patches,postgresql, \
 ))
 endif
 
-$(eval $(call gb_UnpackedTarball_update_autoconf_configs,postgresql))
-
 # vim: set noet sw=4 ts=4:
___
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' - external/postgresql

2020-10-16 Thread Tor Lillqvist (via logerrit)
 external/postgresql/postgresql.exit.patch.0 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3eade177c22f7896f92056e68c96867d647ddff3
Author: Tor Lillqvist 
AuthorDate: Tue Jun 23 23:29:50 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Oct 16 14:35:05 2020 +0200

Brown paper bag fix for e69f547bce7de376a0af464c5f7af5e7d2c8784a

No idea why Jenkins didn't notice.

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

diff --git a/external/postgresql/postgresql.exit.patch.0 
b/external/postgresql/postgresql.exit.patch.0
index fe9bdcca8569..0d167925f4a4 100644
--- a/external/postgresql/postgresql.exit.patch.0
+++ b/external/postgresql/postgresql.exit.patch.0
@@ -14,6 +14,6 @@
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
 +#include 
- typedef long int ac_int64;
+ typedef long long int ac_int64;
  
  /*
___
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' - external/postgresql

2020-10-16 Thread Tor Lillqvist (via logerrit)
 external/postgresql/UnpackedTarball_postgresql.mk |1 +
 external/postgresql/postgresql.exit.patch.0   |   19 +++
 2 files changed, 20 insertions(+)

New commits:
commit 5a9968aa8b0372dadb367bc2b5befdaab2189bad
Author: Tor Lillqvist 
AuthorDate: Tue Jun 23 01:59:05 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Oct 16 14:32:33 2020 +0200

Fix -Werror,-Wimplicit-function-declaration in posrgresql configury

Change-Id: I3c2dfb94a3c9627e802956cc03cebcbdb7d498cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96912
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 
(cherry picked from commit e69f547bce7de376a0af464c5f7af5e7d2c8784a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104336
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/external/postgresql/UnpackedTarball_postgresql.mk 
b/external/postgresql/UnpackedTarball_postgresql.mk
index a7e57ab93301..a53bbbffdb9b 100644
--- a/external/postgresql/UnpackedTarball_postgresql.mk
+++ b/external/postgresql/UnpackedTarball_postgresql.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,postgresql, \
external/postgresql/postgresql-libs-leak.patch \
external/postgresql/postgresql-9.2.1-libreoffice.patch \
external/postgresql/windows.patch.0 \
+   external/postgresql/postgresql.exit.patch.0 \
 ))
 
 ifeq ($(SYSTEM_ZLIB),)
diff --git a/external/postgresql/postgresql.exit.patch.0 
b/external/postgresql/postgresql.exit.patch.0
new file mode 100644
index ..fe9bdcca8569
--- /dev/null
+++ b/external/postgresql/postgresql.exit.patch.0
@@ -0,0 +1,19 @@
+# error: implicitly declaring library function 'exit' with type 'void (int) 
__attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
+--- configure
 configure
+@@ -24565,6 +24565,7 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
++#include 
+ typedef long int ac_int64;
+ 
+ /*
+@@ -24702,6 +24702,7 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
++#include 
+ typedef long int ac_int64;
+ 
+ /*
___
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.2' - external/postgresql

2020-10-16 Thread Tor Lillqvist (via logerrit)
 external/postgresql/UnpackedTarball_postgresql.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 789c4ca09eb7db72c644fa65e535210a67595cca
Author: Tor Lillqvist 
AuthorDate: Sun Jul 5 10:23:44 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Oct 16 14:30:42 2020 +0200

Use correct location for the config.{guess,sub} in the postgresql tarball

Change-Id: Iccec53f67ab6c9e7920354f6a26c81300c1bee48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98097
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104417
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/external/postgresql/UnpackedTarball_postgresql.mk 
b/external/postgresql/UnpackedTarball_postgresql.mk
index a53bbbffdb9b..90b363c2dccf 100644
--- a/external/postgresql/UnpackedTarball_postgresql.mk
+++ b/external/postgresql/UnpackedTarball_postgresql.mk
@@ -11,6 +11,8 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,postgresql))
 
 $(eval $(call 
gb_UnpackedTarball_set_tarball,postgresql,$(POSTGRESQL_TARBALL),,postgresql))
 
+$(eval $(call gb_UnpackedTarball_update_autoconf_configs,postgresql,config))
+
 $(eval $(call gb_UnpackedTarball_set_patchlevel,postgresql,3))
 
 $(eval $(call gb_UnpackedTarball_add_patches,postgresql, \
@@ -26,6 +28,4 @@ $(eval $(call gb_UnpackedTarball_add_patches,postgresql, \
 ))
 endif
 
-$(eval $(call gb_UnpackedTarball_update_autoconf_configs,postgresql))
-
 # vim: set noet sw=4 ts=4:
___
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.2' - external/postgresql

2020-10-16 Thread Tor Lillqvist (via logerrit)
 external/postgresql/postgresql.exit.patch.0 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 574d049ddf3da3da001a2c3689b44d8c40d5364b
Author: Tor Lillqvist 
AuthorDate: Tue Jun 23 23:29:50 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Oct 16 14:30:17 2020 +0200

Brown paper bag fix for e69f547bce7de376a0af464c5f7af5e7d2c8784a

No idea why Jenkins didn't notice.

Change-Id: Iaab45f40ad97db3118373eb0d27fd57692f979ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96981
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104416
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/external/postgresql/postgresql.exit.patch.0 
b/external/postgresql/postgresql.exit.patch.0
index fe9bdcca8569..0d167925f4a4 100644
--- a/external/postgresql/postgresql.exit.patch.0
+++ b/external/postgresql/postgresql.exit.patch.0
@@ -14,6 +14,6 @@
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
 +#include 
- typedef long int ac_int64;
+ typedef long long int ac_int64;
  
  /*
___
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.2' - external/postgresql

2020-10-16 Thread Tor Lillqvist (via logerrit)
 external/postgresql/UnpackedTarball_postgresql.mk |1 +
 external/postgresql/postgresql.exit.patch.0   |   19 +++
 2 files changed, 20 insertions(+)

New commits:
commit 7bdd6f613c8a87903be2e722402f952f511825ab
Author: Tor Lillqvist 
AuthorDate: Tue Jun 23 01:59:05 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Oct 16 14:29:54 2020 +0200

Fix -Werror,-Wimplicit-function-declaration in posrgresql configury

Change-Id: I3c2dfb94a3c9627e802956cc03cebcbdb7d498cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96912
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104415
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/external/postgresql/UnpackedTarball_postgresql.mk 
b/external/postgresql/UnpackedTarball_postgresql.mk
index a7e57ab93301..a53bbbffdb9b 100644
--- a/external/postgresql/UnpackedTarball_postgresql.mk
+++ b/external/postgresql/UnpackedTarball_postgresql.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,postgresql, \
external/postgresql/postgresql-libs-leak.patch \
external/postgresql/postgresql-9.2.1-libreoffice.patch \
external/postgresql/windows.patch.0 \
+   external/postgresql/postgresql.exit.patch.0 \
 ))
 
 ifeq ($(SYSTEM_ZLIB),)
diff --git a/external/postgresql/postgresql.exit.patch.0 
b/external/postgresql/postgresql.exit.patch.0
new file mode 100644
index ..fe9bdcca8569
--- /dev/null
+++ b/external/postgresql/postgresql.exit.patch.0
@@ -0,0 +1,19 @@
+# error: implicitly declaring library function 'exit' with type 'void (int) 
__attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
+--- configure
 configure
+@@ -24565,6 +24565,7 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
++#include 
+ typedef long int ac_int64;
+ 
+ /*
+@@ -24702,6 +24702,7 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
++#include 
+ typedef long int ac_int64;
+ 
+ /*
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: writerperfect/CppunitTest_writerperfect_wpftimport.mk writerperfect/inc writerperfect/source

2020-10-16 Thread Noel (via logerrit)
 writerperfect/CppunitTest_writerperfect_wpftimport.mk   |1 
 writerperfect/inc/ImportFilter.hxx  |   18 ++-
 writerperfect/source/calc/MSWorksCalcImportFilter.cxx   |   15 
 writerperfect/source/writer/WordPerfectImportFilter.cxx |   19 ++--
 4 files changed, 35 insertions(+), 18 deletions(-)

New commits:
commit 90fa4426a1be8874baacd21eff8c7c46f8a4371a
Author: Noel 
AuthorDate: Fri Oct 16 09:14:52 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 16 14:18:19 2020 +0200

writerfilter: use the fastparser API when possible

part of the process of making SvXMLImport fastparser-only

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

diff --git a/writerperfect/CppunitTest_writerperfect_wpftimport.mk 
b/writerperfect/CppunitTest_writerperfect_wpftimport.mk
index 101908aadeb4..b43836d45e7e 100644
--- a/writerperfect/CppunitTest_writerperfect_wpftimport.mk
+++ b/writerperfect/CppunitTest_writerperfect_wpftimport.mk
@@ -32,6 +32,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,writerperfect_wpftimport,\
vcl \
wpftqahelper \
writerperfect \
+   xo \
 ))
 
 $(eval $(call 
gb_CppunitTest_use_external,writerperfect_wpftimport,boost_headers))
diff --git a/writerperfect/inc/ImportFilter.hxx 
b/writerperfect/inc/ImportFilter.hxx
index 4328b902181c..56f352556c73 100644
--- a/writerperfect/inc/ImportFilter.hxx
+++ b/writerperfect/inc/ImportFilter.hxx
@@ -18,7 +18,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 #include 
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "DocumentHandler.hxx"
 #include "WPXSvInputStream.hxx"
@@ -70,19 +71,24 @@ public:
 aDescriptor["ParentWindow"] >>= xDialogParent;
 
 // An XML import service: what we push sax messages to...
-css::uno::Reference xInternalHandler(
-mxContext->getServiceManager()->createInstanceWithContext(
-DocumentHandlerFor::name(), mxContext),
-css::uno::UNO_QUERY_THROW);
+css::uno::Reference xInternalFilter
+= mxContext->getServiceManager()->createInstanceWithContext(
+DocumentHandlerFor::name(), mxContext);
+assert(xInternalFilter);
+css::uno::Reference 
xInternalHandler(
+xInternalFilter, css::uno::UNO_QUERY);
+assert(xInternalHandler);
 
 // The XImporter sets up an empty target document for XDocumentHandler 
to write to...
 css::uno::Reference 
xImporter(xInternalHandler,
 
css::uno::UNO_QUERY);
+assert(xImporter);
 xImporter->setTargetDocument(mxDoc);
 
 // OO Graphics Handler: abstract class to handle document SAX 
messages, concrete implementation here
 // writes to in-memory target doc
-DocumentHandler aHandler(xInternalHandler);
+DocumentHandler aHandler(
+new 
SvXMLLegacyToFastDocHandler(dynamic_cast(xInternalHandler.get(;
 
 WPXSvInputStream input(xInputStream);
 
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx 
b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
index 521b7c0dbf5d..83035d8b9926 100644
--- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
+++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
@@ -317,18 +317,23 @@ MSWorksCalcImportFilter::filter(const 
css::uno::Sequence xInternalHandler(
-getXContext()->getServiceManager()->createInstanceWithContext(
-writerperfect::DocumentHandlerFor::name(), 
getXContext()),
-css::uno::UNO_QUERY_THROW);
+css::uno::Reference xInternalFilter
+= getXContext()->getServiceManager()->createInstanceWithContext(
+writerperfect::DocumentHandlerFor::name(), 
getXContext());
+assert(xInternalFilter);
+css::uno::Reference 
xInternalHandler(xInternalFilter,
+  
css::uno::UNO_QUERY);
+assert(xInternalHandler);
 
 // The XImporter sets up an empty target document for XDocumentHandler to 
write to...
 css::uno::Reference xImporter(xInternalHandler, 
css::uno::UNO_QUERY);
+assert(xImporter);
 xImporter->setTargetDocument(getTargetDocument());
 
 // OO Graphics Handler: abstract class to handle document SAX messages, 
concrete implementation here
 // writes to in-memory target doc
-writerperfect::DocumentHandler aHandler(xInternalHandler);
+writerperfect::DocumentHandler aHandler(
+new 
SvXMLLegacyToFastDocHandler(dynamic_cast(xInternalHandler.get(;
 
 writerperfect::WPXSvInputStream input(xInputStream);
 OdsGenerator exporter;
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx 
b/writerperfect/source/writer/WordPerfe

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

2020-10-16 Thread Michael Stahl (via logerrit)
 sw/qa/extras/uiwriter/uiwriter2.cxx |   83 
 sw/source/core/edit/autofmt.cxx |   25 +++---
 2 files changed, 100 insertions(+), 8 deletions(-)

New commits:
commit 3f554879aa90a73940041e3a1217b97a15e18bc3
Author: Michael Stahl 
AuthorDate: Thu Oct 15 16:47:42 2020 +0200
Commit: Caolán McNamara 
CommitDate: Fri Oct 16 14:13:54 2020 +0200

tdf#137245 sw: fix AutoFormat SetBorder deleting flys

Since commit e1629c210ad78310e3d48c0756723134a27b89df ReplaceRange()
will preserve flys, so split the delete into a DeleteAndJoin() just to
join the paragraphs - which should not delete any flys because it
doesn't include the "---" so isn't at the end of the section - and
a ReplaceRange for the "---".

(regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5
 and e75dd1fc992f168f24d66595265a978071cdd277)

Change-Id: Ib995e41649f69963c823a463538958d533082ee7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104380
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 9b34dc20b6946698ae6ce2d5d859885bfb444633)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104335
Reviewed-by: Caolán McNamara 

diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 91400f397c9c..1354244a8fc1 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -38,6 +38,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -331,6 +334,86 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, 
testRedlineSplitContentNode)
 rUndoManager.Undo();
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf137245)
+{
+SwDoc* const pDoc(createDoc());
+SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect());
+corr.GetSwFlags().bSetBorder = true;
+// sigh, it's a global... err i mean Singleton design pattern *eyeroll*
+SvxSwAutoFormatFlags flags(*SwEditShell::GetAutoFormatFlags());
+comphelper::ScopeGuard const g([=]() { 
SwEditShell::SetAutoFormatFlags(&flags); });
+flags.bSetBorder = true;
+SwEditShell::SetAutoFormatFlags(&flags);
+
+{
+SwFormatAnchor anchor(RndStdIds::FLY_AT_PARA);
+anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+SfxItemSet flySet(pDoc->GetAttrPool(),
+  svl::Items{});
+flySet.Put(anchor);
+SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+flySet.Put(size); // set a size, else we get 1 char per line...
+SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, 
/*bAnchValid=*/true);
+CPPUNIT_ASSERT(pFly != nullptr);
+}
+{
+SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+SfxItemSet flySet(pDoc->GetAttrPool(),
+  svl::Items{});
+flySet.Put(anchor);
+SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+flySet.Put(size); // set a size, else we get 1 char per line...
+SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, 
/*bAnchValid=*/true);
+CPPUNIT_ASSERT(pFly != nullptr);
+}
+// move cursor back to body
+pWrtShell->SttEndDoc(false);
+// keep first paragraph empty so that its flys may be deleted too
+//pWrtShell->Insert("abc");
+pWrtShell->SplitNode(false);
+
+{
+SwFormatAnchor anchor(RndStdIds::FLY_AT_PARA);
+anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+SfxItemSet flySet(pDoc->GetAttrPool(),
+  svl::Items{});
+flySet.Put(anchor);
+SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+flySet.Put(size); // set a size, else we get 1 char per line...
+SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, 
/*bAnchValid=*/true);
+CPPUNIT_ASSERT(pFly != nullptr);
+}
+{
+SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+SfxItemSet flySet(pDoc->GetAttrPool(),
+  svl::Items{});
+flySet.Put(anchor);
+SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+flySet.Put(size); // set a size, else we get 1 char per line...
+SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, 
/*bAnchValid=*/true);
+CPPUNIT_ASSERT(pFly != nullptr);
+}
+
+const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+CPPUNIT_ASSERT_EQUAL(static_cast(4), rFormats.size());
+
+// move cursor back to body
+pWrtShell->SttEndDoc(false);
+pWrtShell->Insert("---");
+pWrtShell->SplitNode(true);
+
+CPPUNIT_ASSERT_EQUAL(static_cast(4), rFormats.size());
+
+// check that the AutoFormat did something
+pWrtShell->SttEndDoc(true);

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

2020-10-16 Thread Caolán McNamara (via logerrit)
 vcl/source/window/window2.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2df0e599090bc915362e1efb8eb27a37eccdc1f3
Author: Caolán McNamara 
AuthorDate: Fri Oct 16 09:38:11 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 16 14:13:18 2020 +0200

cid#1468188 dead code

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

diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index e435d890861e..bc48311e0d8c 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1321,7 +1321,7 @@ static bool HasParentDockingWindow(const vcl::Window* 
pWindow)
 pWindow = pWindow->GetParent();
 }
 
-return pWindow && pWindow->IsDockingWindow();
+return false;
 }
 
 void Window::queue_resize(StateChangedType eReason)
___
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-16 Thread scan-admin
Hi,

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

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


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


** CID 1468188:  Control flow issues  (DEADCODE)
/vcl/source/window/window2.cxx: 1324 in vcl::HasParentDockingWindow(const 
vcl::Window *)()



*** CID 1468188:  Control flow issues  (DEADCODE)
/vcl/source/window/window2.cxx: 1324 in vcl::HasParentDockingWindow(const 
vcl::Window *)()
1318 if( pWindow->IsDockingWindow() )
1319 return true;
1320 
1321 pWindow = pWindow->GetParent();
1322 }
1323 
>>> CID 1468188:  Control flow issues  (DEADCODE)
>>> Execution cannot reach the expression "pWindow->IsDockingWindow()" 
>>> inside this statement: "return pWindow && pWindow->...".
1324 return pWindow && pWindow->IsDockingWindow();
1325 }
1326 
1327 void Window::queue_resize(StateChangedType eReason)
1328 {
1329 if (IsDisposed())



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DK9wX_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi7HQiQX6p4adA5xz-2BtpHfY58Z-2BzvAiz8evzjX3fW2Jah-2BcmRnrHc4ElTIZOKWGigem-2BLlR6Y3mHLHtPAdavn3dLEx3m-2FyIWa6k6KdUxdgKkX5jcCv9WdSOO7huftMBRyBo9S-2FaHYOSq3fSk0kKqaRrOeBtyifd8WNzOrcm8V4GQlpRfnd-2BEIXmItSvRqTDEed

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


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

2020-10-16 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/uiwriter/uiwriter.cxx |   28 
 1 file changed, 28 insertions(+)

New commits:
commit c143ad222a3c4c8d86699e1b3f20d3a5262da1e2
Author: Xisco Fauli 
AuthorDate: Thu Oct 15 23:44:04 2020 +0200
Commit: Xisco Fauli 
CommitDate: Fri Oct 16 13:27:15 2020 +0200

tdf#135260: sw_uiwriter: Add unittest

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

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 9807343e912c..3ca0e97850ae 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -296,6 +296,7 @@ public:
 void testTdf84695Tab();
 void testTableStyleUndo();
 void testRedlineCopyPaste();
+void testTdf135260();
 void testRedlineParam();
 void testRedlineViewAuthor();
 void testTdf91292();
@@ -521,6 +522,7 @@ public:
 CPPUNIT_TEST(testTdf84695Tab);
 CPPUNIT_TEST(testTableStyleUndo);
 CPPUNIT_TEST(testRedlineCopyPaste);
+CPPUNIT_TEST(testTdf135260);
 CPPUNIT_TEST(testRedlineParam);
 CPPUNIT_TEST(testRedlineViewAuthor);
 CPPUNIT_TEST(testTdf91292);
@@ -5649,6 +5651,32 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf134436)
 CPPUNIT_ASSERT_EQUAL(OUString(""), pWrtShell->GetCursor()->GetText());
 }
 
+void SwUiWriterTest::testTdf135260()
+{
+SwDoc* pDoc = createDoc();
+SwDocShell* pDocShell = pDoc->GetDocShell();
+SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+pWrtShell->Insert("test");
+
+// Turn on track changes
+uno::Reference xPropertySet(mxComponent, 
uno::UNO_QUERY);
+xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(true));
+
+for(int i = 0; i < 4; i++) {
+pWrtShell->DelLeft();
+}
+
+SwEditShell* const pEditShell(pDoc->GetEditShell());
+// accept all redlines
+while(pEditShell->GetRedlineCount())
+pEditShell->AcceptRedline(0);
+
+// Without the fix in place, this test would have failed with
+// - Expected:
+// - Actual  : tes
+CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
+}
+
 void SwUiWriterTest::testRedlineParam()
 {
 // Create a document with minimal content.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Noel (via logerrit)
 sc/inc/xmlwrap.hxx   |1 
 sc/source/filter/xml/xmlwrap.cxx |   40 ++-
 2 files changed, 19 insertions(+), 22 deletions(-)

New commits:
commit 30668130ce82c3f45af38ab419ec04fdb67c4509
Author: Noel 
AuthorDate: Fri Oct 16 09:20:23 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 16 13:21:22 2020 +0200

sc: use the fastparser API when possible

part of the process of making SvXMLImport fastparser-only

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

diff --git a/sc/inc/xmlwrap.hxx b/sc/inc/xmlwrap.hxx
index 2b6c8b6ed33e..f1955f530d20 100644
--- a/sc/inc/xmlwrap.hxx
+++ b/sc/inc/xmlwrap.hxx
@@ -68,7 +68,6 @@ class ScXMLImportWrapper
 
 ErrCode ImportFromComponent(const 
css::uno::Reference& xContext,
 const css::uno::Reference& xModel,
-const css::uno::Reference& xParser,
 css::xml::sax::InputSource& aParserInput,
 const OUString& sComponentName, const OUString& sDocName,
 const css::uno::Sequence& aArgs,
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index c476df1955d5..c55c8d811d8f 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -104,7 +104,7 @@ uno::Reference  
ScXMLImportWrapper::GetStatusIndicator()
 }
 
 ErrCode ScXMLImportWrapper::ImportFromComponent(const 
uno::Reference& xContext,
-const uno::Reference& xModel, const 
uno::Reference& xParser,
+const uno::Reference& xModel,
 xml::sax::InputSource& aParserInput,
 const OUString& sComponentName, const OUString& sDocName,
 const uno::Sequence& aArgs,
@@ -160,12 +160,11 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const 
uno::Reference xDocHandler(
+uno::Reference xImportInterface =
 xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
-sComponentName, aArgs, xContext ),
-uno::UNO_QUERY );
-OSL_ENSURE( xDocHandler.is(), "can't get Calc importer" );
-uno::Reference xImporter( xDocHandler, uno::UNO_QUERY 
);
+sComponentName, aArgs, xContext );
+SAL_WARN_IF( !xImportInterface, "sc", "can't get Calc importer " << 
sComponentName );
+uno::Reference xImporter( xImportInterface, 
uno::UNO_QUERY );
 if (xImporter.is())
 xImporter->setTargetDocument( xModel );
 
@@ -174,16 +173,21 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const 
uno::ReferenceSetPostProcessData(&maPostProcessData);
 
 // connect parser and filter
-uno::Reference< xml::sax::XFastParser > xFastParser = dynamic_cast<
-xml::sax::XFastParser* >( xDocHandler.get() );
-xParser->setDocumentHandler( xDocHandler );
-
 try
 {
-if( xFastParser.is() )
+// xImportInterface is either ScXMLImport or an XMLTransformer 
subclass.
+// ScXMLImport implements XFastParser, but XMLTransformer only 
implements XExtendedDocumentHandler
+
+uno::Reference< xml::sax::XFastParser > xFastParser(xImportInterface, 
uno::UNO_QUERY);
+if (xFastParser)
 xFastParser->parseStream( aParserInput );
 else
+{
+uno::Reference xParser = 
xml::sax::Parser::create(xContext);
+uno::Reference 
xDocumentHandler(xImportInterface, uno::UNO_QUERY);
+xParser->setDocumentHandler( xDocumentHandler );
 xParser->parseStream( aParserInput );
+}
 }
 catch( const xml::sax::SAXParseException& r )
 {
@@ -273,9 +277,6 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const 
uno::ReferencesetDocumentHandler( nullptr );
-
 // success!
 return nReturn;
 }
@@ -291,9 +292,6 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, 
ErrCode& rError )
 if ( !xStorage.is() && pMedium )
 xStorage = pMedium->GetStorage();
 
-// get parser
-uno::Reference xXMLParser = 
xml::sax::Parser::create(xContext);
-
 // get filter
 uno::Reference xModel = mrDocShell.GetModel();
 
@@ -425,7 +423,7 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, 
ErrCode& rError )
 SAL_INFO( "sc.filter", "meta import start" );
 
 nMetaRetval = ImportFromComponent(
-xContext, xModel, xXMLParser, aParserInput,
+xContext, xModel, aParserInput,
 bOasis ? 
OUString("com.sun.star.comp.Calc.XMLOasisMetaImporter")
 : 
OUString("com.sun.star.comp.Calc.XMLMetaImporter"),
 "meta.xml", aMetaArgs, false);
@@ -467,7 +465,7 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, 
ErrCode& rError )
 SAL_INFO( "sc.filter", "settings import start" );
 
 nSettingsRetval = ImportFromComponent(
-xContext, xModel, xXMLParser, aParserInput,
+

[Libreoffice-commits] core.git: include/svx include/vcl starmath/source svtools/inc svtools/source svx/inc svx/source vcl/source

2020-10-16 Thread Caolán McNamara (via logerrit)
 include/svx/uiobject.hxx   |4 ++--
 include/vcl/uitest/uiobject.hxx|   12 
 starmath/source/uiobject.cxx   |   13 +
 starmath/source/uiobject.hxx   |4 ++--
 svtools/inc/uiobject.hxx   |6 +++---
 svtools/source/uitest/uiobject.cxx |   18 +++---
 svx/inc/uiobject.hxx   |8 
 svx/source/dialog/weldeditview.cxx |   14 +-
 svx/source/uitest/sdrobject.cxx|   15 ++-
 svx/source/uitest/uiobject.cxx |   23 +--
 vcl/source/uitest/uiobject.cxx |   12 
 11 files changed, 67 insertions(+), 62 deletions(-)

New commits:
commit d3fff9073f70bdd9caf619a9cfe7afd7c04cffe1
Author: Caolán McNamara 
AuthorDate: Thu Oct 15 11:07:10 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 16 12:55:07 2020 +0200

add a DrawingAreaUIObject to avoid need to include layout.hxx for uitest

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

diff --git a/include/svx/uiobject.hxx b/include/svx/uiobject.hxx
index de47586f74c9..4fd63c9d0d05 100644
--- a/include/svx/uiobject.hxx
+++ b/include/svx/uiobject.hxx
@@ -35,13 +35,13 @@ public:
 virtual SdrObject* get_object() = 0;
 };
 
-class SvxColorValueSetUIObject final : public WindowUIObject
+class SvxColorValueSetUIObject final : public DrawingAreaUIObject
 {
 SvxColorValueSet* mpColorSet;
 
 public:
 
-SvxColorValueSetUIObject(vcl::Window*  xColorSetWin, SvxColorValueSet* 
pColorSet);
+SvxColorValueSetUIObject(vcl::Window* pColorSetWin);
 
 virtual void execute(const OUString& rAction,
 const StringMap& rParameters) override;
diff --git a/include/vcl/uitest/uiobject.hxx b/include/vcl/uitest/uiobject.hxx
index 750226d20be0..8f8be274b3a9 100644
--- a/include/vcl/uitest/uiobject.hxx
+++ b/include/vcl/uitest/uiobject.hxx
@@ -33,9 +33,11 @@ class SvTreeListEntry;
 class SpinButton;
 class SpinField;
 class VerticalTabControl;
+class VclDrawingArea;
 class VclMultiLineEdit;
 class MenuButton;
 class ToolBox;
+namespace weld { class CustomWidgetController; }
 
 typedef std::map StringMap;
 
@@ -529,6 +531,16 @@ private:
 virtual OUString get_name() const override;
 };
 
+class UITEST_DLLPUBLIC DrawingAreaUIObject : public WindowUIObject
+{
+private:
+VclPtr mxDrawingArea;
+protected:
+weld::CustomWidgetController* mpController;
+public:
+DrawingAreaUIObject(const VclPtr& rDrawingArea);
+virtual ~DrawingAreaUIObject() override;
+};
 
 #endif
 
diff --git a/starmath/source/uiobject.cxx b/starmath/source/uiobject.cxx
index a6f0c47cbd9b..5d7519816e52 100644
--- a/starmath/source/uiobject.cxx
+++ b/starmath/source/uiobject.cxx
@@ -9,7 +9,6 @@
 
 #include 
 #include "uiobject.hxx"
-#include 
 #include 
 
 ElementUIObject::ElementUIObject(SmElementsControl* pElementSelector,
@@ -52,15 +51,15 @@ void ElementUIObject::execute(const OUString& rAction,
 }
 }
 
-ElementSelectorUIObject::ElementSelectorUIObject(vcl::Window* 
pElementSelectorWindow, SmElementsControl* pElementSelector)
-: WindowUIObject(pElementSelectorWindow)
-, mpElementsSelector(pElementSelector)
+ElementSelectorUIObject::ElementSelectorUIObject(vcl::Window* 
pElementSelectorWindow)
+: DrawingAreaUIObject(pElementSelectorWindow)
+, mpElementsSelector(static_cast(mpController))
 {
 }
 
 StringMap ElementSelectorUIObject::get_state()
 {
-StringMap aMap = WindowUIObject::get_state();
+StringMap aMap = DrawingAreaUIObject::get_state();
 
 SmElement* pElement = mpElementsSelector->current();
 if (pElement)
@@ -96,9 +95,7 @@ std::set ElementSelectorUIObject::get_children() 
const
 
 std::unique_ptr ElementSelectorUIObject::create(vcl::Window* pWindow)
 {
-VclDrawingArea* pSmElementsWin = dynamic_cast(pWindow);
-assert(pSmElementsWin);
-return std::unique_ptr(new 
ElementSelectorUIObject(pSmElementsWin, 
static_cast(pSmElementsWin->GetUserData(;
+return std::unique_ptr(new ElementSelectorUIObject(pWindow));
 }
 
 OUString ElementSelectorUIObject::get_name() const
diff --git a/starmath/source/uiobject.hxx b/starmath/source/uiobject.hxx
index 607c9194c85d..e6132ff772a8 100644
--- a/starmath/source/uiobject.hxx
+++ b/starmath/source/uiobject.hxx
@@ -35,14 +35,14 @@ private:
 SmElement* get_element();
 };
 
-class ElementSelectorUIObject : public WindowUIObject
+class ElementSelectorUIObject : public DrawingAreaUIObject
 {
 private:
 SmElementsControl* mpElementsSelector;
 
 public:
 
-explicit ElementSelectorUIObject(vcl::Window* pElementSelectorWindow, 
SmElementsControl* pElementSelector);
+explicit ElementSelectorUIObject(vcl::Window* pElementSelectorWindow);
 
 virtual StringMap get_state() override;
 
diff --git a/svtools/inc/uiobject.hxx b/svtools/inc/uiobject.hxx
index a27b6d68fdad..b201555179c4 100644
--- a/svto

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

2020-10-16 Thread Caolán McNamara (via logerrit)
 include/tools/wintypes.hxx  |1 -
 vcl/source/window/accessibility.cxx |3 ---
 vcl/source/window/brdwin.cxx|2 --
 vcl/source/window/window.cxx|1 -
 4 files changed, 7 deletions(-)

New commits:
commit 2e412c5354134fe3cd66ea0266011c5b87dc9eb3
Author: Caolán McNamara 
AuthorDate: Thu Oct 15 09:08:46 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 16 12:54:34 2020 +0200

WindowType::CALCINPUTLINE newly unused

originally introduced by...

commit cba0dad4566652f63ea3114660da4e5c7dd88c31
Date:   Wed Jun 13 14:08:28 2012 +0200

calc input line: Fix crash with accessibility enabled.

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

diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index 4181d450aa85..75557c48acfc 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -96,7 +96,6 @@ enum class WindowType : sal_uInt16
 LISTBOXWINDOW,
 DOCKINGAREA  ,
 RULER,
-CALCINPUTLINE,
 HEADERBAR,
 VERTICALTABCONTROL   ,
 LAST = VERTICALTABCONTROL,
diff --git a/vcl/source/window/accessibility.cxx 
b/vcl/source/window/accessibility.cxx
index f8649bb40782..4e3768286554 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -263,8 +263,6 @@ sal_uInt16 Window::getDefaultAccessibleRole() const
 case WindowType::PATTERNFIELD:
 case WindowType::EDIT: nRole = static_cast(this)->IsPassword() ? accessibility::AccessibleRole::PASSWORD_TEXT : 
accessibility::AccessibleRole::TEXT; break;
 
-case WindowType::CALCINPUTLINE: nRole = 
accessibility::AccessibleRole::TEXT; break;
-
 case WindowType::PATTERNBOX:
 case WindowType::NUMERICBOX:
 case WindowType::METRICBOX:
@@ -390,7 +388,6 @@ OUString Window::getDefaultAccessibleName() const
 case WindowType::PATTERNFIELD:
 case WindowType::METRICFIELD:
 case WindowType::CURRENCYFIELD:
-case WindowType::CALCINPUTLINE:
 case WindowType::EDIT:
 
 case WindowType::DATEBOX:
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index a3a72d323bd2..a6af6748ff50 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -469,7 +469,6 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, 
long nWidth, long nHei
 case WindowType::TIMEFIELD:
 case WindowType::SPINFIELD:
 case WindowType::FORMATTEDFIELD:
-case WindowType::CALCINPUTLINE:
 mbNWFBorder = true;
 if (pCtrl->GetStyle() & WB_SPIN)
 aCtrlType = ControlType::Spinbox;
@@ -609,7 +608,6 @@ void 
ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c
 case WindowType::TIMEFIELD:
 case WindowType::SPINFIELD:
 case WindowType::FORMATTEDFIELD:
-case WindowType::CALCINPUTLINE:
 if (pCtrl->GetStyle() & WB_SPIN)
 aCtrlType = ControlType::Spinbox;
 else
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 1ba367a6987f..7fd200c81b2e 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3317,7 +3317,6 @@ const char* windowTypeName(WindowType nWindowType)
 case WindowType::LISTBOXWINDOW: return "listboxwindow";
 case WindowType::DOCKINGAREA:   return "dockingarea";
 case WindowType::RULER: return "ruler";
-case WindowType::CALCINPUTLINE: return "calcinputline";
 case WindowType::HEADERBAR: return "headerbar";
 case WindowType::VERTICALTABCONTROL:return 
"verticaltabcontrol";
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: editeng/source include/editeng sc/source sc/uiconfig sc/UIConfig_scalc.mk solenv/sanitizers

2020-10-16 Thread Caolán McNamara (via logerrit)
 editeng/source/editeng/editview.cxx |5 
 include/editeng/editview.hxx|1 
 sc/UIConfig_scalc.mk|1 
 sc/source/ui/Accessibility/AccessibleEditObject.cxx |   10 
 sc/source/ui/Accessibility/AccessibleText.cxx   |   88 --
 sc/source/ui/app/inputhdl.cxx   |   10 
 sc/source/ui/app/inputwin.cxx   |  815 +---
 sc/source/ui/inc/AccessibleEditObject.hxx   |   10 
 sc/source/ui/inc/AccessibleText.hxx |6 
 sc/source/ui/inc/inputwin.hxx   |   99 +-
 sc/source/ui/pagedlg/tphfedit.cxx   |4 
 sc/uiconfig/scalc/ui/inputbar.ui|  122 ++
 solenv/sanitizers/ui/modules/scalc.suppr|2 
 13 files changed, 639 insertions(+), 534 deletions(-)

New commits:
commit e087e25f05e689091cbf1c4f91b6e93878ac17ec
Author: Caolán McNamara 
AuthorDate: Mon Oct 5 14:19:05 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 16 12:54:14 2020 +0200

weld InputBar

this also restores that DnD of a selection from the inputbar is pasted as 
plain
text not rich text formatted with the happenstance formatting of the 
inputbar's
EditEngine

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

diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index ed8bd065dca2..6b897a3bdb5c 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -309,6 +309,11 @@ bool EditView::HasSelection() const
 return pImpEditView->HasSelection();
 }
 
+bool EditView::IsSelectionAtPoint(const Point& rPointPixel)
+{
+return pImpEditView->IsSelectionAtPoint(rPointPixel);
+}
+
 void EditView::DeleteSelected()
 {
 pImpEditView->DeleteSelected();
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 97b77609fe60..093e0d851ab6 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -185,6 +185,7 @@ public:
 boolHasSelection() const;
 ESelection  GetSelection() const;
 voidSetSelection( const ESelection& rNewSel );
+boolIsSelectionAtPoint(const Point& rPointPixel);
 voidSelectCurrentWord( sal_Int16 nWordType = 
css::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
 /// Returns the rectangles of the current selection in TWIPs.
 void GetSelectionRectangles(std::vector& rLogicRects) 
const;
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index b2485054ab45..f1a6f4fe902f 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -144,6 +144,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/headerfootercontent \
sc/uiconfig/scalc/ui/headerfooterdialog \
sc/uiconfig/scalc/ui/imoptdialog \
+   sc/uiconfig/scalc/ui/inputbar \
sc/uiconfig/scalc/ui/inputstringdialog \
sc/uiconfig/scalc/ui/insertcells \
sc/uiconfig/scalc/ui/insertname \
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx 
b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index e93e6dbdb289..d0afd2c8196c 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -63,17 +63,19 @@ ScAccessibleEditObject::ScAccessibleEditObject(
 : ScAccessibleContextBase(rxParent, AccessibleRole::TEXT_FRAME)
 , mpEditView(pEditView)
 , mpWindow(pWin)
+, mpTextWnd(nullptr)
 , meObjectType(eObjectType)
 , mbHasFocus(false)
 , m_pScDoc(nullptr)
 {
-InitAcc(rxParent, pEditView, pWin, rName, rDescription);
+InitAcc(rxParent, pEditView, pWin, nullptr, rName, rDescription);
 }
 
 ScAccessibleEditObject::ScAccessibleEditObject(EditObjectType eObjectType)
 : ScAccessibleContextBase(nullptr, AccessibleRole::TEXT_FRAME)
 , mpEditView(nullptr)
 , mpWindow(nullptr)
+, mpTextWnd(nullptr)
 , meObjectType(eObjectType)
 , mbHasFocus(false)
 , m_pScDoc(nullptr)
@@ -82,12 +84,14 @@ 
ScAccessibleEditObject::ScAccessibleEditObject(EditObjectType eObjectType)
 
 void ScAccessibleEditObject::InitAcc(
 const uno::Reference& rxParent,
-EditView* pEditView, vcl::Window* pWin, const OUString& rName,
+EditView* pEditView, vcl::Window* pWin,
+ScTextWnd* pTxtWnd, const OUString& rName,
 const OUString& rDescription)
 {
 SetParent(rxParent);
 mpEditView = pEditView;
 mpWindow = pWin;
+mpTextWnd = pTxtWnd;
 
 CreateTextHelper();
 SetName(rName);
@@ -366,7 +370,7 @@ void ScAccessibleEditObject::CreateTextHelper()
 else
 {
 pAccessibleTextData.reset
-(new ScAccessibleEditLineTextData(nullptr, 
GetOutputDeviceForView()));
+(n

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

2020-10-16 Thread Seth Chaiklin (via logerrit)
 source/text/shared/01/05230100.xhp |   16 +---
 1 file changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 8d59dee8f3cfba1b4b846d5059f46a584b6aebae
Author: Seth Chaiklin 
AuthorDate: Wed Oct 14 09:22:15 2020 +0200
Commit: Seth Chaiklin 
CommitDate: Fri Oct 16 12:35:18 2020 +0200

Resolves: tdf#137141 - update Position and Size tab help for "Position"

   - add explanation about origin for Calc,
 and  about right-to-left tables
   - add  about about origin for Draw and Impress
   - revise explanation of base point
   - add  about base point
 (revised explanations and notes with Regina's guidance)

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

diff --git a/source/text/shared/01/05230100.xhp 
b/source/text/shared/01/05230100.xhp
index 5be578aa9..8d1757258 100644
--- a/source/text/shared/01/05230100.xhp
+++ b/source/text/shared/01/05230100.xhp
@@ -50,15 +50,25 @@
 
 Position
 Specify the 
location of the selected object on the page.
+
+  
+Coordinate axes start 
at column A  - row 1.
+X-coordinates are negative in a 
"right-to-left" table.
+  
+  DRAW/IMPRESS
+Coordinates are relative to the origin.  
Left/top corner of the page content area is the initial default.
+
+
 
 Position X
-Enter the horizontal distance that 
you want to move the object relative to the base point selected in the 
grid.
+Enter the horizontal coordinate where 
the selected base point should be placed.
 
 Position Y
-Enter the vertical distance that you 
want to move the object relative to the base point selected in the 
grid.
+Enter the vertical  coordinate where 
the selected base point should be placed.
 
 Base point
-Click a base point in the grid, and 
then enter the amount that you want to shift the object relative to the base 
point that you selected in the Position Y and Position 
X boxes. The base points correspond to the selection handles on an 
object.
+The selected base point will be moved 
to the specified Position Y and Position 
X.
+The base point always returns to the left/top 
corner on reopening the dialog.
 
 
 Size
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Andreas Heinisch (via logerrit)
 basic/qa/basic_coverage/test_split_method.vb |   27 ++-
 basic/source/runtime/methods1.cxx|6 --
 2 files changed, 26 insertions(+), 7 deletions(-)

New commits:
commit d6b7cc3f7c07b98c90194e8b33cf44b94804b525
Author: Andreas Heinisch 
AuthorDate: Tue Oct 6 19:22:44 2020 +0200
Commit: Mike Kaganski 
CommitDate: Fri Oct 16 12:31:02 2020 +0200

tdf#123025 - ReDim Preserve fails if array is filled by Split

The Split function sets the datatype of the array to SbxVARIANT instead
of SbxSTRING preventing any subsequent assignments to the array and to
the elements itself.

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

diff --git a/basic/qa/basic_coverage/test_split_method.vb 
b/basic/qa/basic_coverage/test_split_method.vb
index d09e8c3e7e3b..8f3701e3d987 100644
--- a/basic/qa/basic_coverage/test_split_method.vb
+++ b/basic/qa/basic_coverage/test_split_method.vb
@@ -6,10 +6,27 @@
 '
 
 Function doUnitTest as Integer
+
+doUnitTest = 0
+
 ' SPLIT
-If ( Split( "Hello world" )(1) <> "world" ) Then
-doUnitTest = 0
-Else
-doUnitTest = 1
-End If
+If ( Split( "Hello world" )(1) <> "world" ) Then Exit Function
+
+' tdf#123025 - split function sets the datatype of the array to empty,
+' preventing any subsequent assignments of values to the array and to the 
elements itself.
+Dim arr(1) As String
+arr = Split("a/b", "/")
+If ( arr(0) <> "a" Or arr(1) <> "b" ) Then Exit Function
+ReDim Preserve arr(1)
+If ( arr(0) <> "a" Or arr(1) <> "b" ) Then Exit Function
+ReDim arr(1)
+If ( arr(0) <> "" Or arr(1) <> "" ) Then Exit Function
+arr(0) = "a"
+arr(1) = "b"
+If ( arr(0) <> "a" Or arr(1) <> "b" ) Then Exit Function
+ReDim Preserve arr(1)
+If ( arr(0) <> "a" Or arr(1) <> "b" ) Then Exit Function
+
+doUnitTest = 1
+
 End Function
diff --git a/basic/source/runtime/methods1.cxx 
b/basic/source/runtime/methods1.cxx
index 807806e4cea8..1dee293ef3cf 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -1627,13 +1627,15 @@ void SbRtl_Split(StarBASIC *, SbxArray & rPar, bool)
 }
 }
 
-SbxDimArray* pArray = new SbxDimArray( SbxVARIANT );
+// tdf#123025 - split returns an array of substrings
+SbxDimArray* pArray = new SbxDimArray( SbxSTRING );
 pArray->unoAddDim32( 0, nArraySize-1 );
 
 // insert parameter(s) into the array
 for(sal_Int32 i = 0 ; i < nArraySize ; i++ )
 {
-SbxVariableRef xVar = new SbxVariable( SbxVARIANT );
+// tdf#123025 - split returns an array of substrings
+SbxVariableRef xVar = new SbxVariable( SbxSTRING );
 xVar->PutString( vRet[i] );
 pArray->Put32( xVar.get(), &i );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Noel (via logerrit)
 chart2/source/model/filter/XMLFilter.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit e1a47ddab37e70c400de254251be38e844117cc1
Author: Noel 
AuthorDate: Fri Oct 16 09:16:41 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 16 12:27:31 2020 +0200

chart2: use the fastparser API when possible

part of the process of making SvXMLImport fastparser-only

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

diff --git a/chart2/source/model/filter/XMLFilter.cxx 
b/chart2/source/model/filter/XMLFilter.cxx
index 3980e96003e2..76f88027a0e2 100644
--- a/chart2/source/model/filter/XMLFilter.cxx
+++ b/chart2/source/model/filter/XMLFilter.cxx
@@ -440,11 +440,11 @@ ErrCode XMLFilter::impl_ImportStream(
 aFilterCompArgs[ nArgs++ ] <<= xImportInfo;
 
 // the underlying SvXMLImport implements XFastParser, 
XImporter, XFastDocumentHandler
-Reference< xml::sax::XDocumentHandler  > xDocHandler(
-xFactory->createInstanceWithArgumentsAndContext( 
rServiceName, aFilterCompArgs, m_xContext ),
-uno::UNO_QUERY_THROW );
-
-Reference< document::XImporter > xImporter( xDocHandler, 
uno::UNO_QUERY_THROW );
+Reference< XInterface  > xFilter =
+xFactory->createInstanceWithArgumentsAndContext( 
rServiceName, aFilterCompArgs, m_xContext );
+assert(xFilter);
+Reference< document::XImporter > xImporter( xFilter, 
uno::UNO_QUERY );
+assert(xImporter);
 xImporter->setTargetDocument( Reference< lang::XComponent >( 
m_xTargetDoc, uno::UNO_SET_THROW ));
 
 if ( !m_sDocumentHandler.isEmpty() )
@@ -454,30 +454,30 @@ ErrCode XMLFilter::impl_ImportStream(
 uno::Sequence< uno::Any > aArgs(2);
 beans::NamedValue aValue;
 aValue.Name = "DocumentHandler";
-aValue.Value <<= xDocHandler;
+aValue.Value <<= xFilter;
 aArgs[0] <<= aValue;
 aValue.Name = "Model";
 aValue.Value <<= m_xTargetDoc;
 aArgs[1] <<= aValue;
 
-
xDocHandler.set(xFactory->createInstanceWithArgumentsAndContext(m_sDocumentHandler,aArgs,m_xContext),
 uno::UNO_QUERY_THROW );
+xFilter = 
xFactory->createInstanceWithArgumentsAndContext(m_sDocumentHandler,aArgs,m_xContext);
 }
 catch (const uno::Exception&)
 {
-TOOLS_WARN_EXCEPTION("chart2", "");
+TOOLS_WARN_EXCEPTION("chart2", "failed to instantiate 
" << m_sDocumentHandler);
 }
 }
 xml::sax::InputSource aParserInput;
 aParserInput.aInputStream.set(xInputStream, 
uno::UNO_QUERY_THROW);
 
 // the underlying SvXMLImport implements XFastParser, 
XImporter, XFastDocumentHandler
-Reference< xml::sax::XFastParser  > xFastParser(xDocHandler, 
uno::UNO_QUERY);
+Reference< xml::sax::XFastParser > xFastParser(xFilter, 
uno::UNO_QUERY);
 if (xFastParser.is())
 xFastParser->parseStream(aParserInput);
 else
 {
 Reference xParser = 
xml::sax::Parser::create(m_xContext);
-xParser->setDocumentHandler( xDocHandler );
+xParser->setDocumentHandler( 
uno::Reference(xFilter, uno::UNO_QUERY_THROW) );
 xParser->parseStream(aParserInput);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Gülşah Köse (via logerrit)
 include/svx/svdoashp.hxx  |1 
 include/svx/svdotext.hxx  |1 
 include/vcl/filter/PDFiumLibrary.hxx  |2 
 svx/qa/unit/customshapes.cxx  |2 
 svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx |   21 +---
 svx/source/svdraw/svdoashp.cxx|   16 --
 svx/source/svdraw/svdotextdecomposition.cxx   |   35 ++
 vcl/source/filter/ipdf/pdfread.cxx|   31 ++--
 vcl/source/pdf/PDFiumLibrary.cxx  |   26 --
 9 files changed, 80 insertions(+), 55 deletions(-)

New commits:
commit c7ada1cc8a294f0d2da32ffc02d0941b1b1afd29
Author: Gülşah Köse 
AuthorDate: Mon Oct 5 14:57:33 2020 +0300
Commit: Gülşah Köse 
CommitDate: Fri Oct 16 12:05:02 2020 +0200

tdf#128212 Change the text z camera rotation order.

Old order:
1) Apply all rotation values (normal and camera z)
2) Do the adjustment (top, middle, bottom)

New Order:
1) Apply rotation values except camera z
2) Do the adjustment (top, middle, bottom)
3) Apply camera z rotation.

We rotate the text at the center of the already positioned rectangle
of the text, which depends on e.g. the length of the laid out text.
This matches the PowerPoint behavior.

Change-Id: I8741cf443834bf01cc07c04318fd6205ed6a0dd6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103965
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx
index 535060caf5ca..dd1a86d24bca 100644
--- a/include/svx/svdoashp.hxx
+++ b/include/svx/svdoashp.hxx
@@ -142,7 +142,6 @@ public:
 
 double GetObjectRotation() const { return fObjectRotation;}
 double GetExtraTextRotation( const bool bPreRotation = false ) const;
-double GetCameraRotation() const;
 
 SdrObjCustomShape(SdrModel& rSdrModel);
 
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index 1de1b3edd89c..fd69b4a681b7 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -577,6 +577,7 @@ public:
 // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
 // ItemChange(), PostItemChange() and ItemSetChanged() calls.
 void SetObjectItemNoBroadcast(const SfxPoolItem& rItem);
+double GetCameraZRotation() const;
 
 public:
 
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 10abdad0f7e3..e42c7ad2fde9 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -520,7 +520,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, 
testTdf126060_3D_Z_Rotation)
 SdrObjCustomShape& rSdrObjCustomShape(
 static_cast(*GetSdrObjectFromXShape(xShape)));
 
-if (rSdrObjCustomShape.GetCameraRotation() != 90)
+if (rSdrObjCustomShape.GetCameraZRotation() != 90)
 sErrors += "Wrong text camera Z rotation";
 
 basegfx::B2DHomMatrix aObjectTransform;
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx 
b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index ccc70b0d3805..2b1a1913f003 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -159,18 +159,13 @@ namespace sdr::contact
 // #i101684# get the text range unrotated and absolute to 
the object range
 const basegfx::B2DRange 
aTextRange(getCorrectedTextBoundRect());
 
-// Get the text range before unrotated and independent 
from object range
-const tools::Rectangle 
aIndTextRect(Point(aTextRange.getMinX(), aTextRange.getMinY()), 
GetCustomShapeObj().GetTextSize());
-const basegfx::B2DRange aIndTextRange = 
vcl::unotools::b2DRectangleFromRectangle(aIndTextRect);
-
 // Rotation before scaling
-
if(!basegfx::fTools::equalZero(GetCustomShapeObj().GetExtraTextRotation(true)) 
||
-   
!basegfx::fTools::equalZero(GetCustomShapeObj().GetCameraRotation()))
+
if(!basegfx::fTools::equalZero(GetCustomShapeObj().GetExtraTextRotation(true)))
 {
 basegfx::B2DVector aTranslation(0.5, 0.5);
 aTextBoxMatrix.translate( -aTranslation.getX(), 
-aTranslation.getY() );
 aTextBoxMatrix.rotate(basegfx::deg2rad(
-360.0 - 
GetCustomShapeObj().GetExtraTextRotation(true) - 
GetCustomShapeObj().GetCameraRotation()));
+360.0 - 
GetCustomShapeObj().GetExtraTextRotation(true)));
 aTextBoxMatrix.translate( aTranslation.getX(), 
aTranslation.getY() );
 }
 // give text object a size
@@ -178,7 +173,6 @@ namespace sdr::contact
 
 

Re: Heads up: CLANG_CC, CLANG_CXX configuration variables renamed to LO_CLANG_CC, LO_CLANG_CXX

2020-10-16 Thread Stephan Bergmann

On 15/10/2020 18:53, Stephan Bergmann wrote:

With
 "Rename CLANG_CC, 
CLANG_CXX configuration vars (avoid clash with scan-build)", those two 
variables (which can e.g. be passed into autogen.sh via autogen.input) 
are going to change their names.


hit master now as 
 
"Rename CLANG_CC, CLANG_CXX configuration vars (avoid clash with 
scan-build)"


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


[Libreoffice-commits] core.git: config_host.mk.in configure.ac extensions/source external/libpng external/skia ios/LibreOfficeLight ios/UnitTest osx/soffice.xcodeproj solenv/gbuild

2020-10-16 Thread Stephan Bergmann (via logerrit)
 config_host.mk.in  
  |   20 -
 configure.ac   
  |  102 +-
 
extensions/source/macosx/spotlight/SpotlightImporterTester/SpotlightImporterTester.xcodeproj/project.pbxproj
 |8 
 external/libpng/StaticLibrary_libpng.mk
  |4 
 external/skia/Library_skia.mk  
  |   14 -
 ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
  |8 
 ios/UnitTest/UnitTest.xcodeproj/project.pbxproj
  |   12 -
 osx/soffice.xcodeproj/project.pbxproj  
  |8 
 solenv/gbuild/LinkTarget.mk
  |6 
 9 files changed, 91 insertions(+), 91 deletions(-)

New commits:
commit 5b0ca23615c3d0aae7083147bc3bb5d61db26f5e
Author: Stephan Bergmann 
AuthorDate: Thu Oct 15 18:38:24 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 16 11:21:27 2020 +0200

Rename CLANG_CC, CLANG_CXX configuration vars (avoid clash with scan-build)

Clang's scan-build tool uses the CLANG_CXX environment variable (setting it 
up
in the scan-build script to pass it to the ccc-analyzer script), but 
happens to
erroneously set it to a non-existing path (see 

"[scan-build] Fix clang++ pathname again").  So wrapping LO's autogen.sh and
make in scan-build picked up that broken CLANG_CXX and caused build
failures like

> [CXX] external/skia/source/SkMemory_malloc.cxx
> /bin/sh: ~/llvm/inst/bin/clang-12++: No such file or directory

(see


"Re: llvm/clang static analyzer reports").

So rename CLANG_CXX, and for consistency also CLANG_CC and the various
CLANG_CXXFLAGS_INTRINSICS_*, by prefixing each with LO_.

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

diff --git a/config_host.mk.in b/config_host.mk.in
index 6fff52b8a74c..57a4d686a057 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -67,16 +67,6 @@ export CCACHE_DEPEND_MODE=@CCACHE_DEPEND_MODE@
 export CDR_CFLAGS=$(gb_SPACE)@CDR_CFLAGS@
 export CDR_LIBS=$(gb_SPACE)@CDR_LIBS@
 @x_CFLAGS@ export CFLAGS=@CFLAGS@
-export CLANG_CC=@CLANG_CC@
-export CLANG_CXX=@CLANG_CXX@
-export CLANG_CXXFLAGS_INTRINSICS_SSE2=@CLANG_CXXFLAGS_INTRINSICS_SSE2@
-export CLANG_CXXFLAGS_INTRINSICS_SSSE3=@CLANG_CXXFLAGS_INTRINSICS_SSSE3@
-export CLANG_CXXFLAGS_INTRINSICS_SSE41=@CLANG_CXXFLAGS_INTRINSICS_SSE41@
-export CLANG_CXXFLAGS_INTRINSICS_SSE42=@CLANG_CXXFLAGS_INTRINSICS_SSE42@
-export CLANG_CXXFLAGS_INTRINSICS_AVX=@CLANG_CXXFLAGS_INTRINSICS_AVX@
-export CLANG_CXXFLAGS_INTRINSICS_AVX2=@CLANG_CXXFLAGS_INTRINSICS_AVX2@
-export CLANG_CXXFLAGS_INTRINSICS_F16C=@CLANG_CXXFLAGS_INTRINSICS_F16C@
-export CLANG_CXXFLAGS_INTRINSICS_FMA=@CLANG_CXXFLAGS_INTRINSICS_FMA@
 export CLANG_USE_LD=@CLANG_USE_LD@
 export CLANGDIR=@CLANGDIR@
 export CLANGLIBDIR=@CLANGLIBDIR@
@@ -400,6 +390,16 @@ export LIBXML_JAR=@LIBXML_JAR@
 export LIBXML_LIBS=$(gb_SPACE)@LIBXML_LIBS@
 export LIBXSLT_CFLAGS=$(gb_SPACE)@LIBXSLT_CFLAGS@
 export LIBXSLT_LIBS=$(gb_SPACE)@LIBXSLT_LIBS@
+export LO_CLANG_CC=@LO_CLANG_CC@
+export LO_CLANG_CXX=@LO_CLANG_CXX@
+export LO_CLANG_CXXFLAGS_INTRINSICS_SSE2=@LO_CLANG_CXXFLAGS_INTRINSICS_SSE2@
+export LO_CLANG_CXXFLAGS_INTRINSICS_SSSE3=@LO_CLANG_CXXFLAGS_INTRINSICS_SSSE3@
+export LO_CLANG_CXXFLAGS_INTRINSICS_SSE41=@LO_CLANG_CXXFLAGS_INTRINSICS_SSE41@
+export LO_CLANG_CXXFLAGS_INTRINSICS_SSE42=@LO_CLANG_CXXFLAGS_INTRINSICS_SSE42@
+export LO_CLANG_CXXFLAGS_INTRINSICS_AVX=@LO_CLANG_CXXFLAGS_INTRINSICS_AVX@
+export LO_CLANG_CXXFLAGS_INTRINSICS_AVX2=@LO_CLANG_CXXFLAGS_INTRINSICS_AVX2@
+export LO_CLANG_CXXFLAGS_INTRINSICS_F16C=@LO_CLANG_CXXFLAGS_INTRINSICS_F16C@
+export LO_CLANG_CXXFLAGS_INTRINSICS_FMA=@LO_CLANG_CXXFLAGS_INTRINSICS_FMA@
 @x_LO_ELFCHECK_ALLOWLIST@ export LO_ELFCHECK_ALLOWLIST=@LO_ELFCHECK_ALLOWLIST@
 @x_Cygwin@ export LS=@WIN_LS@
 export MACOSX_BUNDLE_IDENTIFIER=@MACOSX_BUNDLE_IDENTIFIER@
diff --git a/configure.ac b/configure.ac
index 7449a78f7962..08c4e39cbe64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11594,47 +11594,47 @@ fi
 AC_SUBST(ENABLE_SKIA)
 AC_SUBST(ENABLE_SKIA_DEBUG)
 
-CLANG_CXXFLAGS_INTRINSICS_SSE2=
-CLANG_CXXFLAGS_INTRINSICS_SSSE3=
-CLANG_CXXFLAGS_INTRINSICS_SSE41=
-CLANG_CXXFLAGS_INTRINSICS_SSE42=
-CLANG_CXXFLAGS_INTRINSICS_AVX=
-CLANG_CXXFLAGS_INTRINSICS_AVX2=
-CLANG_CXXFLAGS_INTRINSIC

[Libreoffice-commits] core.git: Branch 'feature/cib_contract3753' - 23 commits - .gitreview include/oox oox/source readlicense_oo/license sc/qa sc/source sd/qa sw/inc sw/qa sw/source translations vcl/

2020-10-16 Thread Michael Stahl (via logerrit)
Rebased ref, commits from common ancestor:
commit c69681e4b4797c4976160c46efe06beb4df4af5d
Author: Michael Stahl 
AuthorDate: Wed Oct 14 15:21:24 2020 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 16 11:14:34 2020 +0200

sw: fix unsorted redlines in SwTable::ConvertSubtableBox()

ooo12626-10.odt asserts because MoveNodeRange() handles redlines only
with an explicit flag.

(regression from e366c928819c44b5c253c45dca6dae40b71c9808)

Change-Id: I80c6e696e51c6d9c366af30ecf8b6df265d0fc91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104286
Reviewed-by: Michael Stahl 
Tested-by: Jenkins
(cherry picked from commit 48a76ea268b4c7fe499abe858074420dd7b152e2)

diff --git a/sw/source/core/table/swnewtable.cxx 
b/sw/source/core/table/swnewtable.cxx
index 892b31e807cc..918ba94fcfea 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -2200,7 +2200,7 @@ void SwTable::ConvertSubtableBox(sal_uInt16 const nRow, 
sal_uInt16 const nBox)
 #if 0
 pDoc->GetNodes().MoveNodes(content, pDoc->GetNodes(), 
insPos, false);
 #else
-
pDoc->getIDocumentContentOperations().MoveNodeRange(content, insPos, 
SwMoveFlags::NO_DELFRMS);
+
pDoc->getIDocumentContentOperations().MoveNodeRange(content, insPos, 
SwMoveFlags::NO_DELFRMS|SwMoveFlags::REDLINES);
 #endif
 // delete the empty node that was bundled in the new box
 pDoc->GetNodes().Delete(insPos);
commit 42db7c8086abb205dbdcf6b44dcd5377866425e0
Author: Michael Stahl 
AuthorDate: Thu Oct 1 17:31:21 2020 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 16 11:09:32 2020 +0200

sw: ODF import: convert the simplest sub-tables to rowspan tables

Before OOo 2.3, CWS swnewtable, Writer represented complex table
structures as sub-tables, i.e. .

Try to convert these to the modern rowspan tables, which export to
non-ODF formats much easier.

There are some cases where the result is going to look different, or
where further work is required to adapt other things in the document;
leave these alone for now.

Change-Id: I6a6c497089ef886826484d2d723bf57c72f95b14

diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index a373f561704f..b62c2567e2de 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -168,6 +168,7 @@ private:
 void AdjustWidths( const long nOld, const long nNew );
 void NewSetTabCols( Parm &rP, const SwTabCols &rNew, const SwTabCols &rOld,
 const SwTableBox *pStart, bool bCurRowOnly );
+void ConvertSubtableBox(sal_uInt16 const nRow, sal_uInt16 const nBox);
 
 public:
 
@@ -340,6 +341,9 @@ public:
 #endif
 
 bool HasLayout() const;
+
+bool CanConvertSubtables() const;
+void ConvertSubtables();
 };
 
 /// SwTableLine is one table row in the document model.
diff --git a/sw/source/core/table/swnewtable.cxx 
b/sw/source/core/table/swnewtable.cxx
index 04a2509b1e37..892b31e807cc 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -30,8 +31,14 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -2089,6 +2096,286 @@ void SwTable::CleanUpBottomRowSpan( sal_uInt16 
nDelLines )
 }
 }
 
+/**
+  This is kind of similar to InsertSpannedRow()/InsertRow() but that one would
+  recursively copy subtables, which would kind of defeat the purpose;
+  this function directly moves the subtable rows's cells into the newly
+  created rows.  For the non-subtable boxes, covered-cells are created.
+
+  Outer row heights are adjusted to match the inner row heights, and the
+  last row's height is tweaked to ensure the sum of the heights is at least
+  the original outer row's minimal height.
+
+  Inner row backgrounds are copied to its cells, if they lack a background.
+
+  This currently can't handle more than 1 subtable in a row;
+  the inner rows of all subtables would need to be sorted by their height
+  to create the correct outer row structure, which is tricky and probably
+  requires a layout for the typical variable-height case.
+
+ */
+void SwTable::ConvertSubtableBox(sal_uInt16 const nRow, sal_uInt16 const nBox)
+{
+SwDoc *const pDoc(GetFrameFormat()->GetDoc());
+SwTableLine *const pSourceLine(GetTabLines()[nRow]);
+SwTableBox *const pSubTableBox(pSourceLine->GetTabBoxes()[nBox]);
+assert(!pSubTableBox->GetTabLines().empty());
+// are relative (%) heights possible? apparently not
+SwFormatFrameSize const 
outerSize(pSourceLine->GetFrameFormat()->GetFrameSize());
+long minHeights(0);
+{
+SwFormatFrameSize const* pSize(nullptr);
+SwFrameFormat const& 
rSubLineFormat(*pSubTableBox->GetTabLines()[0]->Get

[Libreoffice-commits] core.git: editeng/source framework/source i18npool/source idlc/source oox/source sc/qa sc/source sd/source smoketest/libtest.cxx svx/source sw/source testtools/source vcl/qa vcl/

2020-10-16 Thread Noel (via logerrit)
 editeng/source/editeng/editdbg.cxx|   10 ++--
 framework/source/fwe/xml/menudocumenthandler.cxx  |6 --
 framework/source/fwe/xml/saxnamespacefilter.cxx   |6 --
 framework/source/fwe/xml/statusbardocumenthandler.cxx |6 --
 framework/source/fwe/xml/toolboxdocumenthandler.cxx   |6 --
 i18npool/source/localedata/LocaleNode.cxx |6 +-
 i18npool/source/textconversion/genconv_dict.cxx   |   10 ++--
 idlc/source/errorhandler.cxx  |   12 ++---
 idlc/source/idlcmain.cxx  |9 +---
 oox/source/helper/propertymap.cxx |6 +-
 sc/qa/unit/filters-test.cxx   |8 +--
 sc/source/filter/xcl97/xcl97rec.cxx   |6 +-
 sd/source/filter/ppt/pptinanimations.cxx  |   22 +-
 smoketest/libtest.cxx |7 +--
 svx/source/tbxctrls/colrctrl.cxx  |2 
 sw/source/filter/ww8/WW8TableInfo.cxx |6 +-
 testtools/source/performance/ubtest.cxx   |2 
 vcl/qa/cppunit/complextext.cxx|6 +-
 vcl/qa/cppunit/graphicfilter/filters-test.cxx |2 
 vcl/unx/generic/print/common_gfx.cxx  |   39 +-
 20 files changed, 83 insertions(+), 94 deletions(-)

New commits:
commit 87c90cec38c43efbbd9cbfad1f0f607f428043d4
Author: Noel 
AuthorDate: Thu Oct 15 14:26:35 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 16 11:12:31 2020 +0200

fix some *printf which are using "%l" ie. long specifiers

which are not portable between Linux and Windows because long
is not portable.

In preparation for converting long -> tools::Long

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

diff --git a/editeng/source/editeng/editdbg.cxx 
b/editeng/source/editeng/editdbg.cxx
index 720c890d2048..cee32beafcc2 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -453,9 +453,9 @@ void EditEngine::DumpData(const EditEngine* pEE, bool 
bInfoBox)
 fprintf( fp, 
"\n"
 );
 fprintf( fp, "\nControl: %x", unsigned( pEE->GetControlWord() ) );
 fprintf( fp, "\nRefMapMode: %i", int( 
pEE->pImpEditEngine->pRefDev->GetMapMode().GetMapUnit() ) );
-fprintf( fp, "\nPaperSize: %li x %li", pEE->GetPaperSize().Width(), 
pEE->GetPaperSize().Height() );
+fprintf( fp, "\nPaperSize: %" SAL_PRIdINT64 " x %" SAL_PRIdINT64, 
sal_Int64(pEE->GetPaperSize().Width()), sal_Int64(pEE->GetPaperSize().Height()) 
);
 fprintf( fp, "\nMaxAutoPaperSize: %li x %li", 
pEE->GetMaxAutoPaperSize().Width(), pEE->GetMaxAutoPaperSize().Height() );
-fprintf( fp, "\nMinAutoPaperSize: %li x %li", 
pEE->GetMinAutoPaperSize().Width(), pEE->GetMinAutoPaperSize().Height() );
+fprintf( fp, "\nMinAutoPaperSize: %" SAL_PRIdINT64 " x %" SAL_PRIdINT64 , 
sal_Int64(pEE->GetMinAutoPaperSize().Width()), 
sal_Int64(pEE->GetMinAutoPaperSize().Height()) );
 fprintf( fp, "\nUpdate: %i", pEE->GetUpdateMode() );
 fprintf( fp, "\nNumber of Views: %" SAL_PRI_SIZET "i", pEE->GetViewCount() 
);
 for ( size_t nView = 0; nView < pEE->GetViewCount(); nView++ )
@@ -464,9 +464,11 @@ void EditEngine::DumpData(const EditEngine* pEE, bool 
bInfoBox)
 DBG_ASSERT( pV, "View not found!" );
 fprintf( fp, "\nView %zu: Focus=%i", nView, 
pV->GetWindow()->HasFocus() );
 tools::Rectangle aR( pV->GetOutputArea() );
-fprintf( fp, "\n  OutputArea: nX=%li, nY=%li, dX=%li, dY=%li, MapMode 
= %i", aR.TopLeft().X(), aR.TopLeft().Y(), aR.GetSize().Width(), 
aR.GetSize().Height() , int( pV->GetWindow()->GetMapMode().GetMapUnit() ) );
+fprintf( fp, "\n  OutputArea: nX=%" SAL_PRIdINT64 ", nY=%" 
SAL_PRIdINT64 ", dX=%" SAL_PRIdINT64 ", dY=%" SAL_PRIdINT64 ", MapMode = %i",
+sal_Int64(aR.TopLeft().X()), sal_Int64(aR.TopLeft().Y()), 
sal_Int64(aR.GetSize().Width()), sal_Int64(aR.GetSize().Height()) , int( 
pV->GetWindow()->GetMapMode().GetMapUnit() ) );
 aR = pV->GetVisArea();
-fprintf( fp, "\n  VisArea: nX=%li, nY=%li, dX=%li, dY=%li", 
aR.TopLeft().X(), aR.TopLeft().Y(), aR.GetSize().Width(), aR.GetSize().Height() 
);
+fprintf( fp, "\n  VisArea: nX=%" SAL_PRIdINT64 ", nY=%" SAL_PRIdINT64 
", dX=%" SAL_PRIdINT64 ", dY=%" SAL_PRIdINT64,
+sal_Int64(aR.TopLeft().X()), sal_Int64(aR.TopLeft().Y()), 
sal_Int64(aR.GetSize().Width()), sal_Int64(aR.GetSize().Height()) );
 ESelection aSel = pV->GetSelection();
 fprintf( fp, "\n  Selection: Start=%" SAL_PRIdINT32 ",%" SAL_PRIdINT32 
", End=%" SAL_PRIdINT32 ",%" SAL_PRIdINT32, aSel.nStartPara, aSel.nStartPos, 
aSel.nEndPara, aSel.nEndPos );
 }
diff --git a/fra

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

2020-10-16 Thread Bakos Attila (via logerrit)
 sw/source/uibase/shells/drwbassh.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit d7b67e6fe3e449c8c5b95a57d8cc7b9ca70c7a99
Author: Bakos Attila 
AuthorDate: Mon Jul 20 14:30:39 2020 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 16 11:07:51 2020 +0200

tdf#124430 Writer Editing: Fix textbox aligning

Before, when align function was used the textboxes
(shape+frame) went apart, now the textframe follows
the shape.

Co-authored-by: Attila Bánhegyi (NISZ)
Change-Id: I4d69a2f7f4e5ef50d17bb0871c501d6e0026d0e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99048
Reviewed-by: Attila Bakos 
Reviewed-by: László Németh 
Tested-by: Jenkins
Tested-by: László Németh 
(cherry picked from commit 06fd06597796d9e92117602245f3968c93707708)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102769
Reviewed-by: Michael Stahl 

diff --git a/sw/source/uibase/shells/drwbassh.cxx 
b/sw/source/uibase/shells/drwbassh.cxx
index bccbe313bdf9..c707b803736b 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -53,6 +53,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -478,6 +479,8 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
 SwFormatHoriOrient 
aHOrient(pFrameFormat->GetFormatAttr(RES_HORI_ORIENT));
 aHOrient.SetHoriOrient( nHorizOrient );
 pFrameFormat->SetFormatAttr(aHOrient);
+if (auto pTxFrm = 
SwTextBoxHelper::getOtherTextBoxFormat(pFrameFormat, RES_DRAWFRMFMT))
+pTxFrm->SetFormatAttr(aHOrient);
 pSh->EndAction();
 }
 
@@ -489,6 +492,8 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
 SwFormatVertOrient 
aVOrient(pFrameFormat->GetFormatAttr(RES_VERT_ORIENT));
 aVOrient.SetVertOrient( nVertOrient );
 pFrameFormat->SetFormatAttr(aVOrient);
+if (auto pTxFrm = 
SwTextBoxHelper::getOtherTextBoxFormat(pFrameFormat, RES_DRAWFRMFMT))
+pTxFrm->SetFormatAttr(aVOrient);
 pSh->EndAction();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source

2020-10-16 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/cuicharmap.cxx |   13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 252cf479c483022505efc2641b64fa7cfde385b1
Author: Caolán McNamara 
AuthorDate: Wed Oct 14 16:42:26 2020 +0100
Commit: Michael Stahl 
CommitDate: Fri Oct 16 11:04:26 2020 +0200

tdf#137294 don't change subset sensitivity after setting search mode

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 13d3c8e7658b..bcc1dd16a454 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -643,11 +643,6 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, 
weld::ComboBox&, void)
 m_xShowSet->SetFont( aFont );
 m_xSearchSet->SetFont( aFont );
 m_aShowChar.SetFont( aFont );
-if (isSearchMode)
-{
-SearchUpdateHdl(*m_xSearchText);
-SearchCharHighlightHdl(m_xSearchSet.get());
-}
 
 // setup unicode subset listbar with font specific subsets,
 // hide unicode subset listbar for symbol fonts
@@ -675,6 +670,14 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, 
weld::ComboBox&, void)
 m_xSubsetText->set_sensitive(bNeedSubset);
 m_xSubsetLB->set_sensitive(bNeedSubset);
 
+if (isSearchMode)
+{
+// tdf#137294 do this after modifying m_xSubsetLB sensitivity to
+// restore insensitive for the search case
+SearchUpdateHdl(*m_xSearchText);
+SearchCharHighlightHdl(m_xSearchSet.get());
+}
+
 // tdf#118304 reselect current glyph to see if its still there in new font
 selectCharByCode(Radix::hexadecimal);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/unx

2020-10-16 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |   25 +++--
 1 file changed, 7 insertions(+), 18 deletions(-)

New commits:
commit b0542c740a6f46550e4ad2aced7c1e324eab693a
Author: Caolán McNamara 
AuthorDate: Tue Oct 13 14:52:35 2020 +0100
Commit: Michael Stahl 
CommitDate: Fri Oct 16 11:02:32 2020 +0200

better fix for tdf#136455 without destroying widgets we don't truly own

Change-Id: I9c3148fc6dd8658e1ff4a91ff83888288806f9e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104256
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 231a4e024b85aa0ad06a5632d3f514152babea30)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104167
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index d2d0ca46c7e5..cf06ebae9dfc 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -14055,21 +14055,6 @@ private:
 return true;
 }
 
-// Since tdf#131120 we don't use the original ComboBox menu, but it's still
-// listening to additions to the ListStore and slowing things down 
(tdf#136455)
-void destroy_unused_menu()
-{
-AtkObject* pAtkObj = gtk_combo_box_get_popup_accessible(m_pComboBox);
-if (!pAtkObj)
-return;
-if (!GTK_IS_ACCESSIBLE(pAtkObj))
-return;
-GtkWidget* pWidget = 
gtk_accessible_get_widget(GTK_ACCESSIBLE(pAtkObj));
-if (!pWidget)
-return;
-gtk_widget_destroy(pWidget);
-}
-
 public:
 GtkInstanceComboBox(GtkBuilder* pComboBuilder, GtkComboBox* pComboBox, 
GtkInstanceBuilder* pBuilder, bool bTakeOwnership)
 : 
GtkInstanceContainer(GTK_CONTAINER(gtk_builder_get_object(pComboBuilder, 
"box")), pBuilder, bTakeOwnership)
@@ -14112,7 +14097,13 @@ public:
 gtk_widget_set_no_show_all(GTK_WIDGET(m_pComboBox), true);
 
 gtk_tree_view_set_model(m_pTreeView, m_pTreeModel);
-gtk_combo_box_set_model(m_pComboBox, nullptr);
+/* tdf#136455 gtk_combo_box_set_model with a null Model should be good
+   enough. But in practice, while the ComboBox model is unset, GTK
+   doesn't unset the ComboBox menus model, so that remains listening to
+   additions to the ListStore and slowing things down massively.
+   Using a new model does reset the menu to listen to that unused one 
instead */
+gtk_combo_box_set_model(m_pComboBox, GTK_TREE_MODEL(gtk_list_store_new 
(2, G_TYPE_STRING, G_TYPE_STRING)));
+
 GtkTreeViewColumn* pCol = gtk_tree_view_column_new();
 gtk_tree_view_append_column(m_pTreeView, pCol);
 
@@ -14211,8 +14202,6 @@ public:
 gtk_overlay_add_overlay(m_pOverlay, GTK_WIDGET(m_pOverlayButton));
 g_signal_connect(m_pOverlayButton, "leave-notify-event", 
G_CALLBACK(signalOverlayButtonCrossing), this);
 g_signal_connect(m_pOverlayButton, "enter-notify-event", 
G_CALLBACK(signalOverlayButtonCrossing), this);
-
-destroy_unused_menu();
 }
 
 virtual int get_active() const override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Michael Stahl (via logerrit)
 sw/qa/extras/uiwriter/uiwriter2.cxx |   83 
 sw/source/core/edit/autofmt.cxx |   25 +++---
 2 files changed, 100 insertions(+), 8 deletions(-)

New commits:
commit 9b34dc20b6946698ae6ce2d5d859885bfb444633
Author: Michael Stahl 
AuthorDate: Thu Oct 15 16:47:42 2020 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 16 10:25:36 2020 +0200

tdf#137245 sw: fix AutoFormat SetBorder deleting flys

Since commit e1629c210ad78310e3d48c0756723134a27b89df ReplaceRange()
will preserve flys, so split the delete into a DeleteAndJoin() just to
join the paragraphs - which should not delete any flys because it
doesn't include the "---" so isn't at the end of the section - and
a ReplaceRange for the "---".

(regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5
 and e75dd1fc992f168f24d66595265a978071cdd277)

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

diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 25015b50e3c5..f2969c14402f 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -46,6 +46,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -347,6 +350,86 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, 
testRedlineSplitContentNode)
 rUndoManager.Undo();
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf137245)
+{
+SwDoc* const pDoc(createDoc());
+SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect());
+corr.GetSwFlags().bSetBorder = true;
+// sigh, it's a global... err i mean Singleton design pattern *eyeroll*
+SvxSwAutoFormatFlags flags(*SwEditShell::GetAutoFormatFlags());
+comphelper::ScopeGuard const g([=]() { 
SwEditShell::SetAutoFormatFlags(&flags); });
+flags.bSetBorder = true;
+SwEditShell::SetAutoFormatFlags(&flags);
+
+{
+SwFormatAnchor anchor(RndStdIds::FLY_AT_PARA);
+anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+SfxItemSet flySet(pDoc->GetAttrPool(),
+  svl::Items{});
+flySet.Put(anchor);
+SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+flySet.Put(size); // set a size, else we get 1 char per line...
+SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, 
/*bAnchValid=*/true);
+CPPUNIT_ASSERT(pFly != nullptr);
+}
+{
+SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+SfxItemSet flySet(pDoc->GetAttrPool(),
+  svl::Items{});
+flySet.Put(anchor);
+SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+flySet.Put(size); // set a size, else we get 1 char per line...
+SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, 
/*bAnchValid=*/true);
+CPPUNIT_ASSERT(pFly != nullptr);
+}
+// move cursor back to body
+pWrtShell->SttEndDoc(false);
+// keep first paragraph empty so that its flys may be deleted too
+//pWrtShell->Insert("abc");
+pWrtShell->SplitNode(false);
+
+{
+SwFormatAnchor anchor(RndStdIds::FLY_AT_PARA);
+anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+SfxItemSet flySet(pDoc->GetAttrPool(),
+  svl::Items{});
+flySet.Put(anchor);
+SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+flySet.Put(size); // set a size, else we get 1 char per line...
+SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, 
/*bAnchValid=*/true);
+CPPUNIT_ASSERT(pFly != nullptr);
+}
+{
+SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+SfxItemSet flySet(pDoc->GetAttrPool(),
+  svl::Items{});
+flySet.Put(anchor);
+SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+flySet.Put(size); // set a size, else we get 1 char per line...
+SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, 
/*bAnchValid=*/true);
+CPPUNIT_ASSERT(pFly != nullptr);
+}
+
+const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+CPPUNIT_ASSERT_EQUAL(static_cast(4), rFormats.size());
+
+// move cursor back to body
+pWrtShell->SttEndDoc(false);
+pWrtShell->Insert("---");
+pWrtShell->SplitNode(true);
+
+CPPUNIT_ASSERT_EQUAL(static_cast(4), rFormats.size());
+
+// check that the AutoFormat did something
+pWrtShell->SttEndDoc(true);
+SfxItemSet set{ pDoc->GetAttrPool(), svl::Items{} };
+pWrtShell->GetCurParAttr(set);
+CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, set.GetItemState(RES_BOX, false))

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

2020-10-16 Thread Luboš Luňák (via logerrit)
 include/svx/svdobj.hxx  |5 +
 sd/source/core/sdpage2.cxx  |6 +-
 svx/source/svdraw/svdotextdecomposition.cxx |   28 ++--
 3 files changed, 32 insertions(+), 7 deletions(-)

New commits:
commit b12b1663d135f94eb56f3c1f852ef008e87c4e5f
Author: Luboš Luňák 
AuthorDate: Fri Oct 9 18:10:50 2020 +0200
Commit: Luboš Luňák 
CommitDate: Fri Oct 16 10:11:38 2020 +0200

try to prefetch also graphics for background fill bitmap

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

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index de4ebc3f9b4f..cb98d67a2891 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -74,6 +74,7 @@ class SdrGluePointList;
 class SdrLayerIDSet;
 class Fraction;
 enum class PointerStyle;
+class Graphic;
 
 namespace basegfx
 {
@@ -917,6 +918,8 @@ public:
 const css::uno::WeakReference< css::uno::XInterface >& getWeakUnoShape() 
const { return maWeakUnoShape; }
 
 void setSuitableOutlinerBg(Outliner& rOutliner) const;
+// If fillstyle is drawing::FillStyle_BITMAP, returns the graphic.
+const Graphic* getFillGraphic() const;
 
 protected:
 tools::RectangleaOutRect; // surrounding rectangle for 
Paint (incl. LineWidth, ...)
@@ -995,6 +998,8 @@ protected:
 // helper function for reimplementing Clone().
 template< typename T > T* CloneHelper(SdrModel& rTargetModel) const;
 
+const SfxItemSet* getBackgroundFillSet() const;
+
 private:
 struct Impl;
 std::unique_ptr mpImpl;
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 089712ab2693..142b40a6bb25 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -614,9 +614,13 @@ void SdPage::getGraphicsForPrefetch(std::vector& 
graphics) const
 {
 for( size_t i = 0; i < GetObjCount(); ++i)
 {
-if( SdrGrafObj* grafObj = dynamic_cast(GetObj(i)))
+SdrObject* obj = GetObj(i);
+if( SdrGrafObj* grafObj = dynamic_cast(obj))
 if(!grafObj->GetGraphic().isAvailable())
 graphics.push_back( 
const_cast(&grafObj->GetGraphic()));
+if( const Graphic* fillGraphic = obj->getFillGraphic())
+if(!fillGraphic->isAvailable())
+graphics.push_back( const_cast(fillGraphic));
 }
 }
 
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index 499585c7f5f5..1650ffa71fab 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -860,6 +861,17 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
 // Resolves: fdo#35779 set background color of this shape as the editeng 
background if there
 // is one. Check the shape itself, then the host page, then that page's master 
page.
 void SdrObject::setSuitableOutlinerBg(::Outliner& rOutliner) const
+{
+const SfxItemSet* pBackgroundFillSet = getBackgroundFillSet();
+if (drawing::FillStyle_NONE != 
pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue())
+{
+Color aColor(rOutliner.GetBackgroundColor());
+GetDraftFillColor(*pBackgroundFillSet, aColor);
+rOutliner.SetBackgroundColor(aColor);
+}
+}
+
+const SfxItemSet* SdrObject::getBackgroundFillSet() const
 {
 const SfxItemSet* pBackgroundFillSet = &GetObjectItemSet();
 
@@ -879,13 +891,17 @@ void SdrObject::setSuitableOutlinerBg(::Outliner& 
rOutliner) const
 }
 }
 }
+return pBackgroundFillSet;
+}
 
-if (drawing::FillStyle_NONE != 
pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue())
-{
-Color aColor(rOutliner.GetBackgroundColor());
-GetDraftFillColor(*pBackgroundFillSet, aColor);
-rOutliner.SetBackgroundColor(aColor);
-}
+const Graphic* SdrObject::getFillGraphic() const
+{
+if(IsGroupObject()) // Doesn't make sense, and GetObjectItemSet() asserts.
+return nullptr;
+const SfxItemSet* pBackgroundFillSet = getBackgroundFillSet();
+if (drawing::FillStyle_BITMAP != 
pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue())
+return nullptr;
+return 
&pBackgroundFillSet->Get(XATTR_FILLBITMAP).GetGraphicObject().GetGraphic();
 }
 
 void SdrTextObj::impDecomposeBlockTextPrimitive(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vcl sd/inc sd/source slideshow/source vcl/inc vcl/source

2020-10-16 Thread Luboš Luňák (via logerrit)
 include/vcl/graphicfilter.hxx |6 
 sd/inc/sdpage.hxx |7 
 sd/source/core/sdpage2.cxx|   11 +++
 sd/source/ui/slidesorter/view/SlideSorterView.cxx |   14 +
 slideshow/source/engine/slide/slideimpl.cxx   |   20 +
 vcl/inc/impgraph.hxx  |2 +
 vcl/source/filter/graphicfilter.cxx   |   33 ++
 vcl/source/gdi/impgraph.cxx   |   11 ---
 8 files changed, 99 insertions(+), 5 deletions(-)

New commits:
commit 8062e88e73acd8d1f9a62b0bd519b499693285e3
Author: Luboš Luňák 
AuthorDate: Tue Oct 6 20:23:46 2020 +0200
Commit: Luboš Luňák 
CommitDate: Fri Oct 16 10:10:53 2020 +0200

try to make available all slide images using threads

Graphic::makeAvailable() is not thread-safe, but the jpeg loader
is capable of that, and the graphic can be loaded using the stream
data (which is what ultimately makeAvailable() will do anyway).
This loads all images faster using threads instead of them being
loaded one by one on-demand.

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

diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 7ce85fd8773a..83db7db95fb8 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -294,6 +294,12 @@ public:
 /// The resulting graphic is added to rGraphics on success, nullptr is 
added on failure.
 void ImportGraphics(std::vector< std::shared_ptr >& rGraphics, 
std::vector< std::unique_ptr > vStreams);
 
+/**
+ Tries to ensure all Graphic objects are available 
(Graphic::isAvailable()). Only an optimization, may
+ not process all items.
+*/
+void MakeGraphicsAvailableThreaded(std::vector< Graphic* >& rGraphics);
+
 ErrCode ImportGraphic( Graphic& rGraphic, const OUString& 
rPath,
SvStream& rStream,
sal_uInt16 nFormat,
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index 4c4c3b9ca88a..a70fbf61be8a 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -48,6 +48,7 @@ class SfxItemSet;
 class Paragraph;
 class Outliner;
 class SdStyleSheet;
+class Graphic;
 
 namespace sd
 {
@@ -377,6 +378,12 @@ public:
 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 sal_uInt16 getPageId() const { return mnPageId; }
 
+/**
+ Returns graphics objects from the page that can be prefetched before it's 
painted.
+ The pointers are temporary and should not be kept.
+*/
+void getGraphicsForPrefetch(std::vector& graphics) const;
+
 static sal_uInt16 mnLastPageId;
 
 private:
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 2f8f36c2b682..089712ab2693 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -609,6 +610,16 @@ void SdPage::removeAnnotation( const Reference< 
XAnnotation >& xAnnotation )
 Reference( xAnnotation, UNO_QUERY ) );
 }
 
+void SdPage::getGraphicsForPrefetch(std::vector& graphics) const
+{
+for( size_t i = 0; i < GetObjCount(); ++i)
+{
+if( SdrGrafObj* grafObj = dynamic_cast(GetObj(i)))
+if(!grafObj->GetGraphic().isAvailable())
+graphics.push_back( 
const_cast(&grafObj->GetGraphic()));
+}
+}
+
 void SdPage::dumpAsXml(xmlTextWriterPtr pWriter) const
 {
 xmlTextWriterStartElement(pWriter, BAD_CAST("SdPage"));
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx 
b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 46f1c00435ce..f6a6a1786e05 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -45,6 +45,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -644,6 +645,19 @@ void SlideSorterView::Paint (
 // Paint all page objects that are fully or partially inside the
 // repaint region.
 const Range aRange 
(mpLayouter->GetRangeOfVisiblePageObjects(rRepaintArea));
+// Try to prefetch all graphics from the pages to paint. This will be done
+// in threads to be more efficient than loading them on-demand one by one.
+std::vector graphics;
+for (long nIndex=aRange.Min(); nIndex<=aRange.Max(); ++nIndex)
+{
+model::SharedPageDescriptor pDescriptor 
(mrModel.GetPageDescriptor(nIndex));
+if (!pDescriptor || ! 
pDescriptor->HasState(PageDescriptor::ST_Visible))
+continue;
+pDescriptor->GetPage()->getGraphicsForPrefetch(graphics);
+}
+if(graphics.size() > 1) // threading does not help with loading just one
+
GraphicFilter::GetGraphicFilter().MakeGraphicsAvailableThre

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

2020-10-16 Thread Luboš Luňák (via logerrit)
 sd/source/ui/view/drviews1.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit a559ddd37b09a35f26a291f1a0f94608309a7d99
Author: Luboš Luňák 
AuthorDate: Fri Oct 9 18:09:56 2020 +0200
Commit: Luboš Luňák 
CommitDate: Fri Oct 16 10:11:14 2020 +0200

try to prefetch in threads also all graphics for the active page

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

diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 70c9ba3a2090..09814bd7b470 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -997,6 +998,13 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
 VisAreaChanged(::tools::Rectangle(Point(), Size(1, 1)));
 }
 
+// Try to prefetch all graphics for the active page. This will be done
+// in threads to be more efficient than loading them on-demand one by 
one.
+std::vector graphics;
+mpActualPage->getGraphicsForPrefetch(graphics);
+if(graphics.size() > 1) // threading does not help with loading just 
one
+
GraphicFilter::GetGraphicFilter().MakeGraphicsAvailableThreaded(graphics);
+
 if (meEditMode == EditMode::Page)
 {
 
/**
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/additionsdialog.ui   |4 --
 cui/uiconfig/ui/additionsfragment.ui |   64 +--
 2 files changed, 41 insertions(+), 27 deletions(-)

New commits:
commit 40d74f2def9e2255f2a7b85b3c30f76d0a0bd44e
Author: Caolán McNamara 
AuthorDate: Thu Oct 15 17:08:08 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 16 09:55:31 2020 +0200

Resolves: tdf#137508 use AtkObject::accessible-role

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

diff --git a/cui/uiconfig/ui/additionsdialog.ui 
b/cui/uiconfig/ui/additionsdialog.ui
index fe826a2c80d7..d5ca6fad8479 100644
--- a/cui/uiconfig/ui/additionsdialog.ui
+++ b/cui/uiconfig/ui/additionsdialog.ui
@@ -125,11 +125,9 @@
   
 ProgressLabel
 This label shows 
that the progress of the operations such as loading extensions, not found, 
etc.
+static
   
 
-
-  
-
   
   
 True
diff --git a/cui/uiconfig/ui/additionsfragment.ui 
b/cui/uiconfig/ui/additionsfragment.ui
index a44bceb6b9dc..410f0615235c 100644
--- a/cui/uiconfig/ui/additionsfragment.ui
+++ b/cui/uiconfig/ui/additionsfragment.ui
@@ -87,9 +87,11 @@
 start
 License:
 0
-
-  
-
+
+  
+static
+  
+
   
   
 1
@@ -103,9 +105,11 @@
 start
 Required version:
 0
-
-  
-
+
+  
+static
+  
+
   
   
 1
@@ -119,9 +123,11 @@
 start
 Comments:
 0
-
-  
-
+
+  
+static
+  
+
   
   
 1
@@ -135,9 +141,11 @@
 start
 Downloads:
 0
-
-  
-
+
+  
+static
+  
+
   
   
 1
@@ -151,9 +159,11 @@
 start
 label
 0
-
-  
-
+
+  
+static
+  
+
   
   
 2
@@ -183,9 +193,11 @@
 start
 label
 0
-
-  
-
+
+  
+static
+  
+
   
   
 2
@@ -199,9 +211,11 @@
 start
 label
 0
-
-  
-
+
+  
+static
+  
+
   
   
 2
@@ -383,9 +397,11 @@
 
   
 
-
-  
-
+
+  
+static
+  
+
   
   
 1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Gleb Popov (via logerrit)
 include/LibreOfficeKit/LibreOfficeKitInit.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bebecd0e9a1076a5aeed951e7e5ee57a33d1c3b8
Author: Gleb Popov <6year...@gmail.com>
AuthorDate: Thu Oct 15 15:10:02 2020 +0400
Commit: Tor Lillqvist 
CommitDate: Fri Oct 16 09:40:07 2020 +0200

Fix another misuse of __FreeBSD_kernel__ define in LibreOfficeKitInit.h.

The #if in question clearly checks for an operating system, not the kernel 
only.
Fixes build on FreeBSD.

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

diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h 
b/include/LibreOfficeKit/LibreOfficeKitInit.h
index c00c33193648..ff541fb2c113 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -23,7 +23,7 @@ extern "C"
 #  define LOK_TOLERATE_UNUSED
 #endif
 
-#if defined(__linux__) || defined (__FreeBSD_kernel__) || defined(_AIX) ||\
+#if defined(__linux__) || defined (__FreeBSD__) || defined(_AIX) ||\
 defined(_WIN32) || defined(__APPLE__) || defined (__NetBSD__) ||\
 defined (__sun) || defined(__OpenBSD__)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits