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

2020-12-10 Thread Miklos Vajna (via logerrit)
 svx/source/svdraw/svdpdf.cxx   |   16 +++-
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   22 --
 2 files changed, 15 insertions(+), 23 deletions(-)

New commits:
commit 106a9e98c864fe07bf91331d510dd41e3801c6eb
Author: Miklos Vajna 
AuthorDate: Wed Dec 9 21:58:36 2020 +0100
Commit: Miklos Vajna 
CommitDate: Thu Dec 10 09:17:55 2020 +0100

pdfium: no need to use FPDFPageObj_GetBounds() directly

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

diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 6f2f1de42f72..e1ae905cef33 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -914,15 +914,13 @@ void 
ImpSdrPdfImport::ImportImage(std::unique_ptr co
 break;
 }
 
-float left;
-float bottom;
-float right;
-float top;
-if (!FPDFPageObj_GetBounds(pPageObject->getPointer(), &left, &bottom, 
&right, &top))
-{
-SAL_WARN("sd.filter", "FAILED to get image bounds");
-}
-
+basegfx::B2DRectangle aBounds = pPageObject->getBounds();
+float left = aBounds.getMinX();
+// Upside down.
+float bottom = aBounds.getMinY();
+float right = aBounds.getMaxX();
+// Upside down.
+float top = aBounds.getMaxY();
 tools::Rectangle aRect = PointsToLogic(left, right, top, bottom);
 aRect.AdjustRight(1);
 aRect.AdjustBottom(1);
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 7af85573be40..69b7d17711a2 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1535,9 +1535,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106702)
 if (pPageObject->getType() != vcl::pdf::PDFPageObjectType::Image)
 continue;
 
-float fLeft = 0, fBottom = 0, fRight = 0, fTop = 0;
-FPDFPageObj_GetBounds(pPageObject->getPointer(), &fLeft, &fBottom, 
&fRight, &fTop);
-nExpected = fTop;
+// Top, but upside down.
+nExpected = pPageObject->getBounds().getMaxY();
 break;
 }
 
@@ -1552,9 +1551,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106702)
 if (pPageObject->getType() != vcl::pdf::PDFPageObjectType::Image)
 continue;
 
-float fLeft = 0, fBottom = 0, fRight = 0, fTop = 0;
-FPDFPageObj_GetBounds(pPageObject->getPointer(), &fLeft, &fBottom, 
&fRight, &fTop);
-nActual = fTop;
+// Top, but upside down.
+nActual = pPageObject->getBounds().getMaxY();
 break;
 }
 
@@ -1593,9 +1591,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf113143)
 if (pPageObject->getType() != vcl::pdf::PDFPageObjectType::Image)
 continue;
 
-float fLeft = 0, fBottom = 0, fRight = 0, fTop = 0;
-FPDFPageObj_GetBounds(pPageObject->getPointer(), &fLeft, &fBottom, 
&fRight, &fTop);
-nLarger = fRight - fLeft;
+nLarger = pPageObject->getBounds().getWidth();
 break;
 }
 
@@ -1610,9 +1606,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf113143)
 if (pPageObject->getType() != vcl::pdf::PDFPageObjectType::Image)
 continue;
 
-float fLeft = 0, fBottom = 0, fRight = 0, fTop = 0;
-FPDFPageObj_GetBounds(pPageObject->getPointer(), &fLeft, &fBottom, 
&fRight, &fTop);
-nSmaller = fRight - fLeft;
+nSmaller = pPageObject->getBounds().getWidth();
 break;
 }
 
@@ -1652,8 +1646,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115262)
 for (int i = 0; i < nPageObjectCount; ++i)
 {
 std::unique_ptr pPageObject = 
pPdfPage->getObject(i);
-float fLeft = 0, fBottom = 0, fRight = 0, fTop = 0;
-FPDFPageObj_GetBounds(pPageObject->getPointer(), &fLeft, &fBottom, 
&fRight, &fTop);
+// Top, but upside down.
+float fTop = pPageObject->getBounds().getMaxY();
 
 if (pPageObject->getType() == vcl::pdf::PDFPageObjectType::Image)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Bjoern Michaelsen (via logerrit)
 sw/source/core/inc/flyfrms.hxx |8 +---
 sw/source/core/layout/flyincnt.cxx |   67 +++--
 2 files changed, 39 insertions(+), 36 deletions(-)

New commits:
commit 4d6f00a097e68715c63c3388b1183bf08fa8cdbb
Author: Bjoern Michaelsen 
AuthorDate: Thu Dec 10 00:09:32 2020 +0100
Commit: Bjoern Michaelsen 
CommitDate: Thu Dec 10 09:25:47 2020 +0100

flyincnt: Modify no more

Change-Id: I1500f5944a5a9504ef8c9c48c2d43da710de3fa4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107512
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen 

diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 160ca2bb85ca..a401e4abf0af 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -191,18 +191,16 @@ public:
 };
 
 // Flys that are bound to a character in Content
-class SwFlyInContentFrame : public SwFlyFrame
+class SwFlyInContentFrame final: public SwFlyFrame
 {
 Point m_aRef;  // relative to this point AbsPos is being calculated
 
 virtual void DestroyImpl() override;
 virtual ~SwFlyInContentFrame() override;
 
-protected:
-virtual void NotifyBackground( SwPageFrame *pPage,
-   const SwRect& rRect, PrepareHint eHint) 
override;
+virtual void NotifyBackground(SwPageFrame *pPage, const SwRect& rRect, 
PrepareHint eHint) override;
 virtual void MakeAll(vcl::RenderContext* pRenderContext) override;
-virtual void  Modify( const SfxPoolItem*, const SfxPoolItem* ) override;
+virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
 
 public:
 // #i28701#
diff --git a/sw/source/core/layout/flyincnt.cxx 
b/sw/source/core/layout/flyincnt.cxx
index daeaaf314f17..be7b5722a593 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -90,45 +90,50 @@ void SwFlyInContentFrame::SetRefPoint( const Point& rPoint,
 }
 }
 
-void SwFlyInContentFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem 
*pNew )
+void SwFlyInContentFrame::SwClientNotify(const SwModify&, const SfxHint& rHint)
 {
-bool bCallPrepare = false;
-const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
-if (RES_ATTRSET_CHG == nWhich && pNew)
+auto pLegacy = dynamic_cast(&rHint);
+if(!pLegacy)
+return;
+std::pair, std::unique_ptr> 
aTweakedChgs;
+std::pair aSuperArgs(nullptr, 
nullptr);
+switch(pLegacy->GetWhich())
 {
-if(pOld &&
-(SfxItemState::SET == static_cast(pNew)->GetChgSet()->
-GetItemState(RES_SURROUND, false) ||
-SfxItemState::SET == static_cast(pNew)->GetChgSet()->
-GetItemState(RES_FRMMACRO, false)) )
+case RES_ATTRSET_CHG:
 {
-SwAttrSetChg aOld( *static_cast(pOld) );
-SwAttrSetChg aNew( *static_cast(pNew) );
-
-aOld.ClearItem( RES_SURROUND );
-aNew.ClearItem( RES_SURROUND );
-aOld.ClearItem( RES_FRMMACRO );
-aNew.ClearItem( RES_FRMMACRO );
-if( aNew.Count() )
+auto pOldAttrSetChg = static_cast(pLegacy->m_pOld);
+auto pNewAttrSetChg = static_cast(pLegacy->m_pNew);
+if(pOldAttrSetChg
+&& pNewAttrSetChg
+&& ((SfxItemState::SET == 
pNewAttrSetChg->GetChgSet()->GetItemState(RES_SURROUND, false))
+|| (SfxItemState::SET == 
pNewAttrSetChg->GetChgSet()->GetItemState(RES_FRMMACRO, false
 {
-SwFlyFrame::Modify( &aOld, &aNew );
-bCallPrepare = true;
-}
-}
-else if( static_cast(pNew)->GetChgSet()->Count())
-{
-SwFlyFrame::Modify( pOld, pNew );
-bCallPrepare = true;
+aTweakedChgs.second = 
std::make_unique(*pOldAttrSetChg);
+aTweakedChgs.second->ClearItem(RES_SURROUND);
+aTweakedChgs.second->ClearItem(RES_FRMMACRO);
+if(aTweakedChgs.second->Count())
+{
+aTweakedChgs.first = 
std::make_unique(*pOldAttrSetChg);
+aTweakedChgs.first->ClearItem(RES_SURROUND);
+aTweakedChgs.first->ClearItem(RES_FRMMACRO);
+aSuperArgs = std::pair(aTweakedChgs.first.get(), aTweakedChgs.second.get());
+}
+} else if(pNewAttrSetChg->GetChgSet()->Count())
+aSuperArgs = std::pair(pLegacy->m_pOld, pLegacy->m_pNew);
+break;
 }
+case RES_SURROUND:
+case RES_FRMMACRO:
+break;
+default:
+aSuperArgs = std::pair(pLegacy->m_pOld, pLegacy->m_pNew);
 }
-else if( nWhich != RES_SURROUND && RES_FRMMACRO != nWhich )
+if(aSuperArgs.second)
 {
-SwFlyFrame::Modify( pOld, pNew );
-bCallPrepare = true;
+SwFlyFrame::Modify(aSuperArgs.first, aSuperArgs.sec

[Libreoffice-commits] core.git: include/LibreOfficeKit include/vcl sc/source sd/source sw/source vcl/source

2020-12-10 Thread gokaysatir (via logerrit)
 include/LibreOfficeKit/LibreOfficeKitEnums.h |2 +-
 include/vcl/unohelp2.hxx |3 ++-
 sc/source/ui/view/editsh.cxx |8 +---
 sd/source/ui/view/drviews2.cxx   |   12 +---
 sw/source/uibase/shells/textsh1.cxx  |8 +---
 vcl/source/app/unohelp2.cxx  |6 +++---
 6 files changed, 9 insertions(+), 30 deletions(-)

New commits:
commit 56f708b3449230c328f3640709217f9aa802e4c1
Author: gokaysatir 
AuthorDate: Wed Oct 7 12:57:13 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Thu Dec 10 09:27:22 2020 +0100

Online: "Copy hyperlink location" feature improvement.

Lambda functions are replaced with class pointers.

Change-Id: I48628d3105533aad2463bd8ade1f65cf5b154b0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104058
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h 
b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 9a0eb01ca840..ae8eacd9151f 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -646,7 +646,7 @@ typedef enum
  *
  * Payload is optional. When payload is empty, Online gets string from 
selected text.
  * Payload format is JSON.
- * Example: { "mimeType": "string", "content": "some content" }
+ * Example: { "mimeType": "text/plain", "content": "some content" }
  */
 LOK_CALLBACK_CLIPBOARD_CHANGED = 38,
 
diff --git a/include/vcl/unohelp2.hxx b/include/vcl/unohelp2.hxx
index 91c4ce6ce0e2..a0e03a04e2a1 100644
--- a/include/vcl/unohelp2.hxx
+++ b/include/vcl/unohelp2.hxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace com::sun::star::datatransfer::clipboard {
 class XClipboard;
@@ -60,7 +61,7 @@ namespace vcl::unohelper {
 static  voidCopyStringTo(
 const OUString& rContent,
 const css::uno::Reference< 
css::datatransfer::clipboard::XClipboard >& rxClipboard,
-std::function *callback = nullptr
+const vcl::ILibreOfficeKitNotifier* pNotifier = nullptr
 );
 };
 
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index e12c5460c09d..619001a27d8c 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -642,13 +642,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
 {
 uno::Reference 
xClipboard = GetSystemClipboard();
 
-if (comphelper::LibreOfficeKit::isActive())
-{
-std::function callback = [&] 
(int callbackType, const char* text) { 
rViewData.GetViewShell()->libreOfficeKitViewCallback(callbackType, text); } ;
-
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, 
&callback);
-}
-else
-
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, 
nullptr);
+
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, 
SfxViewShell::Current());
 }
 }
 break;
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 11f42901b9fd..33203efef9b9 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2251,17 +2251,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 uno::Reference 
xClipboard
 = pOutView->GetWindow()->GetClipboard();
 
-if (comphelper::LibreOfficeKit::isActive())
-{
-std::function callback = [&] 
(int callbackType, const char* text)
-{
-SfxViewFrame* pFrame = GetViewFrame();
-
pFrame->GetViewShell()->libreOfficeKitViewCallback(callbackType, text);
-};
-
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, 
&callback);
-}
-else
-
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard);
+
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, 
SfxViewShell::Current());
 }
 }
 
diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 7ac52d334ce1..1344ecacf894 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1346,13 +1346,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
 OUString hyperlinkLocation = rINetFormat.GetValue();
 ::uno::Reference< datatransfer::clipboard::XClipboard > 
xClipboard = GetView().GetEditWin().GetClipboard();
 
-if (comphelper::LibreOfficeKit::is

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - include/LibreOfficeKit include/vcl sc/source sd/source sw/source vcl/source

2020-12-10 Thread gokaysatir (via logerrit)
 include/LibreOfficeKit/LibreOfficeKitEnums.h |2 +-
 include/vcl/unohelp2.hxx |3 ++-
 sc/source/ui/view/editsh.cxx |8 +---
 sd/source/ui/view/drviews2.cxx   |   12 +---
 sw/source/uibase/shells/textsh1.cxx  |8 +---
 vcl/source/app/unohelp2.cxx  |6 +++---
 6 files changed, 9 insertions(+), 30 deletions(-)

New commits:
commit 52d7ea6e03ee66ee6a9c345ded4884fea54d8351
Author: gokaysatir 
AuthorDate: Wed Oct 7 12:57:13 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Thu Dec 10 09:28:18 2020 +0100

Online: "Copy hyperlink location" feature improvement.

Lambda functions are replaced with class pointers.

Change-Id: I48628d3105533aad2463bd8ade1f65cf5b154b0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104057
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h 
b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 287894fce122..2e2c7d14c8a1 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -646,7 +646,7 @@ typedef enum
  *
  * Payload is optional. When payload is empty, Online gets string from 
selected text.
  * Payload format is JSON.
- * Example: { "mimeType": "string", "content": "some content" }
+ * Example: { "mimeType": "text/plain", "content": "some content" }
  */
 LOK_CALLBACK_CLIPBOARD_CHANGED = 38,
 
diff --git a/include/vcl/unohelp2.hxx b/include/vcl/unohelp2.hxx
index c5e042333a40..b147d837d9c2 100644
--- a/include/vcl/unohelp2.hxx
+++ b/include/vcl/unohelp2.hxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace com { namespace sun { namespace star { namespace datatransfer { 
namespace clipboard {
 class XClipboard;
@@ -60,7 +61,7 @@ namespace vcl { namespace unohelper {
 static  voidCopyStringTo(
 const OUString& rContent,
 const css::uno::Reference< 
css::datatransfer::clipboard::XClipboard >& rxClipboard,
-std::function *callback = nullptr
+const vcl::ILibreOfficeKitNotifier* pNotifier = nullptr
 );
 };
 
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 09589a2b2382..be004a1caed9 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -645,13 +645,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
 uno::Reference 
xClipboard
 = pEditView->GetWindow()->GetClipboard();
 
-if (comphelper::LibreOfficeKit::isActive())
-{
-std::function callback = [&] 
(int callbackType, const char* text) { 
pViewData->GetViewShell()->libreOfficeKitViewCallback(callbackType, text); } ;
-
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, 
&callback);
-}
-else
-
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, 
nullptr);
+
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, 
SfxViewShell::Current());
 }
 }
 break;
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index ec1dda3cdb6e..c293d0369266 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2240,17 +2240,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 uno::Reference 
xClipboard
 = pOutView->GetWindow()->GetClipboard();
 
-if (comphelper::LibreOfficeKit::isActive())
-{
-std::function callback = [&] 
(int callbackType, const char* text)
-{
-SfxViewFrame* pFrame = GetViewFrame();
-
pFrame->GetViewShell()->libreOfficeKitViewCallback(callbackType, text);
-};
-
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, 
&callback);
-}
-else
-
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard);
+
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, 
SfxViewShell::Current());
 }
 }
 
diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 9a032880ea18..4c78e37212a9 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1342,13 +1342,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
 OUString hyperlinkLocation = rINetFormat.GetValue();
 ::uno::Reference< datatransfer::clipboard::XClipboard > 
xClipbo

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

2020-12-10 Thread Caolán McNamara (via logerrit)
 solenv/clang-format/excludelist |1 -
 vcl/source/app/salvtables.cxx   |   10 +-
 2 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 80138a19ac5780169d083e1dadda43b5637912a6
Author: Caolán McNamara 
AuthorDate: Wed Dec 9 19:30:27 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 09:45:40 2020 +0100

salvtables.cxx isn't in clang-format/excludelist for 7-1

but is in master, which was a surprising find on a backport, keep
it in master too seeing as its just a diff in new changes

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

diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index d360794c45b4..aae526e5dbe8 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -14919,7 +14919,6 @@ vcl/source/app/i18nhelp.cxx
 vcl/source/app/idle.cxx
 vcl/source/app/salplug.cxx
 vcl/source/app/salusereventlist.cxx
-vcl/source/app/salvtables.cxx
 vcl/source/app/scheduler.cxx
 vcl/source/app/session.cxx
 vcl/source/app/settings.cxx
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 1289848b7ac5..2855d2a010cb 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -271,10 +271,7 @@ bool SalInstanceWidget::has_focus() const { return 
m_xWidget->HasFocus(); }
 
 bool SalInstanceWidget::is_active() const { return m_xWidget->IsActive(); }
 
-bool SalInstanceWidget::has_child_focus() const
-{
-return m_xWidget->HasChildPathFocus(true);
-}
+bool SalInstanceWidget::has_child_focus() const { return 
m_xWidget->HasChildPathFocus(true); }
 
 void SalInstanceWidget::set_has_default(bool has_default)
 {
@@ -317,7 +314,10 @@ vcl::Font SalInstanceWidget::get_font() { return 
m_xWidget->GetPointFont(*m_xWid
 
 OString SalInstanceWidget::get_buildable_name() const { return 
m_xWidget->get_id().toUtf8(); }
 
-void SalInstanceWidget::set_buildable_name(const OString& rId) { return 
m_xWidget->set_id(OUString::fromUtf8(rId)); }
+void SalInstanceWidget::set_buildable_name(const OString& rId)
+{
+return m_xWidget->set_id(OUString::fromUtf8(rId));
+}
 
 void SalInstanceWidget::set_help_id(const OString& rId) { return 
m_xWidget->SetHelpId(rId); }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Caolán McNamara (via logerrit)
 vcl/source/bitmap/bitmappaint.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 07779718407b1aec4717fb97ee7d6cedfa121823
Author: Caolán McNamara 
AuthorDate: Wed Dec 9 19:50:02 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 09:53:45 2020 +0100

tdf#138450 BitmapEx.Replace() is not working

since...

commit abd42bdc86904d1b310e8298393c887e0c195499
Date:   Thu Nov 12 14:50:16 2020 +0200

tools::Long->sal_Int32 in vcl filters

Change-Id: I4a74416547f35a9b5b3fe606de6938245d3ec6c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107503
Tested-by: Jenkins
Tested-by: Heiko Tietze 
Tested-by: Caolán McNamara 
Reviewed-by: Heiko Tietze 
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/bitmap/bitmappaint.cxx 
b/vcl/source/bitmap/bitmappaint.cxx
index 49713869069b..95a6b0af6a3e 100644
--- a/vcl/source/bitmap/bitmappaint.cxx
+++ b/vcl/source/bitmap/bitmappaint.cxx
@@ -926,12 +926,12 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 
 if (pAcc)
 {
-std::unique_ptr pMinR(new sal_Int8[nColorCount]);
-std::unique_ptr pMaxR(new sal_Int8[nColorCount]);
-std::unique_ptr pMinG(new sal_Int8[nColorCount]);
-std::unique_ptr pMaxG(new sal_Int8[nColorCount]);
-std::unique_ptr pMinB(new sal_Int8[nColorCount]);
-std::unique_ptr pMaxB(new sal_Int8[nColorCount]);
+std::unique_ptr pMinR(new int[nColorCount]);
+std::unique_ptr pMaxR(new int[nColorCount]);
+std::unique_ptr pMinG(new int[nColorCount]);
+std::unique_ptr pMaxG(new int[nColorCount]);
+std::unique_ptr pMinB(new int[nColorCount]);
+std::unique_ptr pMaxB(new int[nColorCount]);
 
 if (pTols)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Caolán McNamara (via logerrit)
 vcl/source/bitmap/bitmappaint.cxx |   57 ++
 1 file changed, 28 insertions(+), 29 deletions(-)

New commits:
commit ba587ee7a647003823efe29cdc67900e64030ea7
Author: Caolán McNamara 
AuthorDate: Wed Dec 9 19:59:29 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 09:54:09 2020 +0100

std::vector seems a more natural container

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

diff --git a/vcl/source/bitmap/bitmappaint.cxx 
b/vcl/source/bitmap/bitmappaint.cxx
index 95a6b0af6a3e..215f0e8e137a 100644
--- a/vcl/source/bitmap/bitmappaint.cxx
+++ b/vcl/source/bitmap/bitmappaint.cxx
@@ -926,12 +926,12 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 
 if (pAcc)
 {
-std::unique_ptr pMinR(new int[nColorCount]);
-std::unique_ptr pMaxR(new int[nColorCount]);
-std::unique_ptr pMinG(new int[nColorCount]);
-std::unique_ptr pMaxG(new int[nColorCount]);
-std::unique_ptr pMinB(new int[nColorCount]);
-std::unique_ptr pMaxB(new int[nColorCount]);
+std::vector aMinR(nColorCount);
+std::vector aMaxR(nColorCount);
+std::vector aMinG(nColorCount);
+std::vector aMaxG(nColorCount);
+std::vector aMinB(nColorCount);
+std::vector aMaxB(nColorCount);
 
 if (pTols)
 {
@@ -940,12 +940,12 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 const Color& rCol = pSearchColors[i];
 const sal_uInt8 nTol = pTols[i];
 
-pMinR[i] = std::clamp(rCol.GetRed() - nTol, 0, 255);
-pMaxR[i] = std::clamp(rCol.GetRed() + nTol, 0, 255);
-pMinG[i] = std::clamp(rCol.GetGreen() - nTol, 0, 255);
-pMaxG[i] = std::clamp(rCol.GetGreen() + nTol, 0, 255);
-pMinB[i] = std::clamp(rCol.GetBlue() - nTol, 0, 255);
-pMaxB[i] = std::clamp(rCol.GetBlue() + nTol, 0, 255);
+aMinR[i] = std::clamp(rCol.GetRed() - nTol, 0, 255);
+aMaxR[i] = std::clamp(rCol.GetRed() + nTol, 0, 255);
+aMinG[i] = std::clamp(rCol.GetGreen() - nTol, 0, 255);
+aMaxG[i] = std::clamp(rCol.GetGreen() + nTol, 0, 255);
+aMinB[i] = std::clamp(rCol.GetBlue() - nTol, 0, 255);
+aMaxB[i] = std::clamp(rCol.GetBlue() + nTol, 0, 255);
 }
 }
 else
@@ -954,12 +954,12 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 {
 const Color& rCol = pSearchColors[i];
 
-pMinR[i] = rCol.GetRed();
-pMaxR[i] = rCol.GetRed();
-pMinG[i] = rCol.GetGreen();
-pMaxG[i] = rCol.GetGreen();
-pMinB[i] = rCol.GetBlue();
-pMaxB[i] = rCol.GetBlue();
+aMinR[i] = rCol.GetRed();
+aMaxR[i] = rCol.GetRed();
+aMinG[i] = rCol.GetGreen();
+aMaxG[i] = rCol.GetGreen();
+aMinB[i] = rCol.GetBlue();
+aMaxB[i] = rCol.GetBlue();
 }
 }
 
@@ -972,9 +972,9 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 
 for (sal_uLong i = 0; i < nColorCount; i++)
 {
-if (pMinR[i] <= rCol.GetRed() && pMaxR[i] >= rCol.GetRed()
-&& pMinG[i] <= rCol.GetGreen() && pMaxG[i] >= 
rCol.GetGreen()
-&& pMinB[i] <= rCol.GetBlue() && pMaxB[i] >= 
rCol.GetBlue())
+if (aMinR[i] <= rCol.GetRed() && aMaxR[i] >= rCol.GetRed()
+&& aMinG[i] <= rCol.GetGreen() && aMaxG[i] >= 
rCol.GetGreen()
+&& aMinB[i] <= rCol.GetBlue() && aMaxB[i] >= 
rCol.GetBlue())
 {
 pAcc->SetPaletteColor(nEntry, pReplaceColors[i]);
 break;
@@ -984,26 +984,25 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 }
 else
 {
-BitmapColor aCol;
-std::unique_ptr pReplaces(new 
BitmapColor[nColorCount]);
+std::vector aReplaces(nColorCount);
 
 for (sal_uLong i = 0; i < nColorCount; i++)
-pReplaces[i] = pAcc->GetBestMatchingColor(pReplaceColors[i]);
+aReplaces[i] = pAcc->GetBestMatchingColor(pReplaceColors[i]);
 
 for (tools::Long nY = 0, nHeight = pAcc->Height(); nY < nHeight; 
nY++)
 {
 Scanline pScanline = pAcc->GetScanline(nY);
 for (tools::Long nX = 0, nWidth = pAcc->Width(); nX < nWidth; 
nX++)
 {
-aCol = pAcc->GetPixelFromData(pScanline

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

2020-12-10 Thread Caolán McNamara (via logerrit)
 include/vcl/bitmap.hxx|2 +-
 include/vcl/bitmapex.hxx  |4 ++--
 vcl/source/bitmap/bitmappaint.cxx |   12 ++--
 vcl/source/gdi/bitmapex.cxx   |4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit b5f7658153d80e74d415a561f562808ea024
Author: Caolán McNamara 
AuthorDate: Wed Dec 9 20:05:39 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 09:54:32 2020 +0100

use size_t instead of sal_uLong

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

diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index b995111f16a4..810ece4e5286 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -445,7 +445,7 @@ public:
 boolReplace(
 const Color* pSearchColors,
 const Color* rReplaceColors,
-sal_uLong nColorCount,
+size_t nColorCount,
 sal_uInt8 const * pTols );
 
 /** Convert the bitmap to a meta file
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index dc9f8a837502..14bbee535485 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -286,7 +286,7 @@ public:
 voidReplace(
 const Color* pSearchColors,
 const Color* pReplaceColors,
-sal_uLong nColorCount );
+size_t nColorCount );
 
 /** Replace all pixel having one the search colors with the corresponding 
replace color
 
@@ -309,7 +309,7 @@ public:
 voidReplace(
 const Color* pSearchColors,
 const Color* pReplaceColors,
-sal_uLong nColorCount,
+size_t nColorCount,
 sal_uInt8 const * pTols );
 
 /** Replace transparency with given color.
diff --git a/vcl/source/bitmap/bitmappaint.cxx 
b/vcl/source/bitmap/bitmappaint.cxx
index 215f0e8e137a..54ef3c69aaa1 100644
--- a/vcl/source/bitmap/bitmappaint.cxx
+++ b/vcl/source/bitmap/bitmappaint.cxx
@@ -913,7 +913,7 @@ bool Bitmap::Replace(const Color& rSearchColor, const 
Color& rReplaceColor, sal_
 return bRet;
 }
 
-bool Bitmap::Replace(const Color* pSearchColors, const Color* pReplaceColors, 
sal_uLong nColorCount,
+bool Bitmap::Replace(const Color* pSearchColors, const Color* pReplaceColors, 
size_t nColorCount,
  sal_uInt8 const* pTols)
 {
 // Bitmaps with 1 bit color depth can cause problems if they have other 
entries than black/white
@@ -935,7 +935,7 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 
 if (pTols)
 {
-for (sal_uLong i = 0; i < nColorCount; i++)
+for (size_t i = 0; i < nColorCount; ++i)
 {
 const Color& rCol = pSearchColors[i];
 const sal_uInt8 nTol = pTols[i];
@@ -950,7 +950,7 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 }
 else
 {
-for (sal_uLong i = 0; i < nColorCount; i++)
+for (size_t i = 0; i < nColorCount; ++i)
 {
 const Color& rCol = pSearchColors[i];
 
@@ -970,7 +970,7 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 {
 const BitmapColor& rCol = pAcc->GetPaletteColor(nEntry);
 
-for (sal_uLong i = 0; i < nColorCount; i++)
+for (size_t i = 0; i < nColorCount; ++i)
 {
 if (aMinR[i] <= rCol.GetRed() && aMaxR[i] >= rCol.GetRed()
 && aMinG[i] <= rCol.GetGreen() && aMaxG[i] >= 
rCol.GetGreen()
@@ -986,7 +986,7 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 {
 std::vector aReplaces(nColorCount);
 
-for (sal_uLong i = 0; i < nColorCount; i++)
+for (size_t i = 0; i < nColorCount; ++i)
 aReplaces[i] = pAcc->GetBestMatchingColor(pReplaceColors[i]);
 
 for (tools::Long nY = 0, nHeight = pAcc->Height(); nY < nHeight; 
nY++)
@@ -996,7 +996,7 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 {
 BitmapColor aCol = pAcc->GetPixelFromData(pScanline, nX);
 
-for (sal_uLong i = 0; i < nColorCount; i++)
+for (size_t i = 0; i < nColorCount; ++i)
 {
 if (aMinR[i] <= aCol.GetRed() && aMaxR[i] >= 
aCol.GetRed()
 && aMinG[i] <= aCol.GetGreen() && aMaxG[i] >= 
aCol.GetGr

Re: LO calc formulas

2020-12-10 Thread Noel Grandin
On Thu, 10 Dec 2020 at 01:25, Dante Doménech 
wrote:

> I-ll implement a second order kahan algorithm. Third order would be
> overkill ( I don't think anyone is gonna use it for high precision
> calculus  ).
> But it's not only sum and average, variance (stats) and any other formula
> with sums is affected. That's why I need time to track it.
> And by the way, what about using long double for intermediate steps, to
> improve precision. For what I know glibc or whatever uses gcc on fedora
> uses it,
>


Note that calc is, in general, quite performance sensitive in that people
care about how long it takes to calculate large spreadsheets (and some of
them can get very large indeed).

So 128-bit floating point would probably be tricky since CPU largely don't
have hardware support for direction operations on that.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-12-10 Thread László Németh (via logerrit)
 sw/qa/uitest/data/hiddenRow.ods  |binary
 sw/qa/uitest/table/sheetToTable.py   |   75 +++
 sw/source/uibase/dochdl/swdtflvr.cxx |   15 +--
 3 files changed, 87 insertions(+), 3 deletions(-)

New commits:
commit 7720f8cf22718415adb3db2304916581f864f884
Author: László Németh 
AuthorDate: Wed Dec 9 20:38:40 2020 +0100
Commit: László Németh 
CommitDate: Thu Dec 10 10:16:50 2020 +0100

tdf#138688 tdf#124646 sw: fix crash at pasting Calc data

.. in a table before a numbered paragraph. Dispatcher
calls of the workaround for tdf#124646 missed the temporary
table in this case, selecting + copying nothing and after
that trying to paste the same non-native Calc data again,
resulting infinite recursion.

Replacing FN_CHAR_LEFT with FN_LINE_UP solved the
problem (FN_CHAR_LEFT selected the numbers of the
numbered list instead of the temporary table).
Fixing the fragile dispatcher calls, now we check
the selection of the temporary table to avoid similar
crashes.

Unit tests are added for the fix, also for the
original problem of tdf#124646 (avoid copying
hidden rows from Calc, e.g. copying only visible
result of a filtering).

Regression from commit 0c3ac02d8a3c7ea50ae262daf134c28df5c8b343
(tdf#124646 Don't paste hidden rows of Calc sheets into Writer tables).

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

$ (cd sw && make -srj8 UITest_sw_table 
UITEST_TEST_NAME="sheetToTable.sheetToTable.test_tdf138688" 
SAL_USE_VCLPLUGIN=gen)

adding

import time
time.sleep(5)

to the called function of sheetToTable.py)

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

diff --git a/sw/qa/uitest/data/hiddenRow.ods b/sw/qa/uitest/data/hiddenRow.ods
new file mode 100644
index ..8b5d98a182fb
Binary files /dev/null and b/sw/qa/uitest/data/hiddenRow.ods differ
diff --git a/sw/qa/uitest/table/sheetToTable.py 
b/sw/qa/uitest/table/sheetToTable.py
new file mode 100644
index ..08405c03fbf1
--- /dev/null
+++ b/sw/qa/uitest/table/sheetToTable.py
@@ -0,0 +1,75 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, type_text
+import org.libreoffice.unotest
+import pathlib
+
+def get_url_for_data_file(file_name):
+return 
pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+
+#Calc sheet to Writer table
+
+class sheetToTable(UITestCase):
+def test_sheet_to_table_without_hidden_rows(self):
+print(get_url_for_data_file("hiddenRow.ods"))
+calc_doc = 
self.ui_test.load_file(get_url_for_data_file("hiddenRow.ods"))
+xCalcDoc = self.xUITest.getTopFocusWindow()
+self.xUITest.executeCommand(".uno:SelectAll")
+self.xUITest.executeCommand(".uno:Copy")
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+self.ui_test.close_doc()
+writer_doc = 
self.ui_test.load_file(get_url_for_data_file("tableToText.odt"))
+document = self.ui_test.get_component()
+xWriterDoc = self.xUITest.getTopFocusWindow()
+self.xUITest.executeCommand(".uno:Paste")
+#verify (don't copy hidden cells)
+self.assertEqual(document.TextTables.getCount(), 1)
+table = document.getTextTables()[0]
+# This was 3 (copied hidden row)
+self.assertEqual(len(table.getRows()), 2)
+self.assertEqual(table.getCellByName("A1").getString(), "1")
+# This was "2 (hidden)" (copied hidden row)
+self.assertEqual(table.getCellByName("A2").getString(), "3")
+self.ui_test.close_doc()
+
+def test_tdf138688(self):
+print(get_url_for_data_file("hiddenRow.ods"))
+calc_doc = 
self.ui_test.load_file(get_url_for_data_file("hiddenRow.ods"))
+xCalcDoc = self.xUITest.getTopFocusWindow()
+self.xUITest.executeCommand(".uno:SelectAll")
+self.xUITest.executeCommand(".uno:Copy")
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+self.ui_test.close_doc()
+writer_doc = 
self.ui_test.load_file(get_url_for_data_file("tableToText.odt"))
+document = self.ui_test.get_component()
+xWriterDoc = self.xUITest.getTopFocusWindow()
+
+# set numbering in t

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

2020-12-10 Thread Regényi Balázs (via logerrit)
 include/oox/export/drawingml.hxx|4 
 include/oox/vml/vmlshape.hxx|   10 ++
 oox/qa/unit/vml.cxx |   19 ---
 oox/source/export/drawingml.cxx |   34 
++
 oox/source/export/vmlexport.cxx |   50 
--
 oox/source/vml/vmlshape.cxx |   32 
++
 oox/source/vml/vmlshapecontext.cxx  |   20 ++--
 sw/inc/textboxhelper.hxx|7 +
 sw/qa/extras/ooxmlexport/data/tdf41466_testVmlShapeWithTextbox.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx   |   24 
 sw/source/core/doc/textboxhelper.cxx|   23 
 sw/source/core/unocore/unodraw.cxx  |9 +
 sw/source/filter/ww8/docxattributeoutput.cxx|6 +
 sw/source/filter/ww8/docxattributeoutput.hxx|2 
 14 files changed, 207 insertions(+), 33 deletions(-)

New commits:
commit bda05ba1736b74727872579b65b3fa14e3d8
Author: Regényi Balázs 
AuthorDate: Tue Dec 1 12:16:12 2020 +0100
Commit: László Németh 
CommitDate: Thu Dec 10 10:27:33 2020 +0100

tdf#41466 DOCX import: fix VML v:shape/v:textbox

VML v:shape/v:textbox element was imported only as
a text frame, losing (otherwise recognized) preset
shape geometry, i.e. replacing a callout bubble
(wedgeRectCallout) and other special shapes with a
plain rectangle.

Thanks to Attila Bakos for the initial help.

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

diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 31eeb727760f..9f87e54c1361 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -70,6 +70,7 @@ namespace style {
 namespace text {
 class XTextContent;
 class XTextRange;
+class XTextFrame;
 }
 namespace io {
 class XOutputStream;
@@ -125,6 +126,9 @@ public:
 virtual OUString FindRelId(BitmapChecksum nChecksum) = 0;
 /// Store the RelId of a graphic based on its checksum.
 virtual void CacheRelId(BitmapChecksum nChecksum, const OUString& rRelId) 
= 0;
+///  Get textbox which belongs to the shape.
+virtual css::uno::Reference GetUnoTextFrame(
+css::uno::Reference xShape) = 0;
 protected:
 DMLTextExport() {}
 virtual ~DMLTextExport() {}
diff --git a/include/oox/vml/vmlshape.hxx b/include/oox/vml/vmlshape.hxx
index 7703b311c757..0e50e5b6ee1f 100644
--- a/include/oox/vml/vmlshape.hxx
+++ b/include/oox/vml/vmlshape.hxx
@@ -216,6 +216,7 @@ struct ShapeModel
 OUString maSignatureLineSigningInstructions;
 bool mbSignatureLineShowSignDate;
 bool mbSignatureLineCanAddComment;
+bool mbInGroup;
 
 explicitShapeModel();
 ~ShapeModel();
@@ -275,6 +276,13 @@ protected:
 const css::uno::Reference< css::drawing::XShapes 
>& rxShapes,
 const css::awt::Rectangle& rShapeRect ) const = 0;
 
+/** Always called after implConvertAndInsert for the same task.*/
+virtual css::uno::Reference 
finalImplConvertAndInsert(
+const css::uno::Reference& rxShape) const
+{
+return rxShape;
+};
+
 /** Calculates the final shape rectangle according to the passed anchor,
 if present, otherwise according to the own anchor settings. */
 css::awt::Rectangle calcShapeRectangle(
@@ -304,6 +312,8 @@ protected:
 implConvertAndInsert(
 const css::uno::Reference< css::drawing::XShapes 
>& rxShapes,
 const css::awt::Rectangle& rShapeRect ) const 
override;
+virtual css::uno::Reference 
finalImplConvertAndInsert(
+const css::uno::Reference& rxShape) const 
override;
 /** Used by both RectangleShape and ComplexShape. */
 css::uno::ReferencecreateEmbeddedPictureObject(
 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
diff --git a/oox/qa/unit/vml.cxx b/oox/qa/unit/vml.cxx
index d43d2d5645ae..ec64a08c3fcf 100644
--- a/oox/qa/unit/vml.cxx
+++ b/oox/qa/unit/vml.cxx
@@ -55,25 +55,6 @@ void OoxVmlTest::load(const OUString& rFileName)
 mxComponent = loadFromDesktop(aURL);
 }
 
-CPPUNIT_TEST_FIXTURE(OoxVmlTest, testLayoutFlowAltAlone)
-{
-// mso-layout-flow-alt:bottom-to-top without a matching 
layout-flow:vertical.
-load("layout-flow-alt-alone.docx");
-
-uno::Reference 
xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
-uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0)

Re: About tdf#138715 and future of Thunderbird address book support

2020-12-10 Thread Lionel Élie Mamane
On Wed, Dec 09, 2020 at 12:52:22PM -0700, julien2412 wrote:

> About 1 year ago Robert Großkopf submitted the enhancement
> bugtracker https://bugs.documentfoundation.org/128977 had been
> created to indicate Thunderbird address book would use in next
> version Sqlite instead of Mork.

> After 1 year, no one stepped in to implement Sqlite support in LO
> and now with Thunderbird 78, the migration Mork->Sqlite has been
> done so TB address book doesn't work any more from this version.

I seem to remember there was some code done to add a native SQlite
SDBC driver "somewhere" (but not merged), not sure where. Or was that
only ever discussed and never coded?

It could be a start for a "new Thunderbird address book" driver.

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


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

2020-12-10 Thread Caolán McNamara (via logerrit)
 vcl/source/bitmap/bitmappaint.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit da71f806ad09ace88c509a9af7346f0e3f29b744
Author: Caolán McNamara 
AuthorDate: Wed Dec 9 19:50:02 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 10:36:24 2020 +0100

tdf#138450 BitmapEx.Replace() is not working

since...

commit abd42bdc86904d1b310e8298393c887e0c195499
Date:   Thu Nov 12 14:50:16 2020 +0200

tools::Long->sal_Int32 in vcl filters

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

diff --git a/vcl/source/bitmap/bitmappaint.cxx 
b/vcl/source/bitmap/bitmappaint.cxx
index 49713869069b..95a6b0af6a3e 100644
--- a/vcl/source/bitmap/bitmappaint.cxx
+++ b/vcl/source/bitmap/bitmappaint.cxx
@@ -926,12 +926,12 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 
 if (pAcc)
 {
-std::unique_ptr pMinR(new sal_Int8[nColorCount]);
-std::unique_ptr pMaxR(new sal_Int8[nColorCount]);
-std::unique_ptr pMinG(new sal_Int8[nColorCount]);
-std::unique_ptr pMaxG(new sal_Int8[nColorCount]);
-std::unique_ptr pMinB(new sal_Int8[nColorCount]);
-std::unique_ptr pMaxB(new sal_Int8[nColorCount]);
+std::unique_ptr pMinR(new int[nColorCount]);
+std::unique_ptr pMaxR(new int[nColorCount]);
+std::unique_ptr pMinG(new int[nColorCount]);
+std::unique_ptr pMaxG(new int[nColorCount]);
+std::unique_ptr pMinB(new int[nColorCount]);
+std::unique_ptr pMaxB(new int[nColorCount]);
 
 if (pTols)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: About tdf#138715 and future of Thunderbird address book support

2020-12-10 Thread Tor Lillqvist
My recommendation would be to just drop the Thunderbird address book driver
without any replacement.

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


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

2020-12-10 Thread Heiko Tietze (via logerrit)
 svx/source/dialog/frmsel.cxx |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit f527846ab9a67387909d225aaeb77301d2b48d5a
Author: Heiko Tietze 
AuthorDate: Wed Nov 11 11:25:40 2020 +0100
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 10:42:28 2020 +0100

Resolves tdf#138127 - Use document color for border widget

Change-Id: I57fdbd37c23f3bd2c20ac04ef598cd8a182aac6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105577
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
(cherry picked from commit 6f7d1aaa8c375e6b7a9b80d1ae57efc176c6430f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107388
Reviewed-by: Caolán McNamara 

diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 78b4f77025fe..8854f7d8272c 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -297,11 +298,12 @@ void FrameSelectorImpl::Initialize( FrameSelFlags nFlags )
 void FrameSelectorImpl::InitColors()
 {
 const StyleSettings& rSettings = 
Application::GetSettings().GetStyleSettings();
-maBackCol = rSettings.GetFieldColor();
+svtools::ColorConfig aColorConfig;
+maBackCol = aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor;
 mbHCMode = rSettings.GetHighContrastMode();
-maArrowCol = rSettings.GetFieldTextColor();
-maMarkCol.operator=(maBackCol).Merge(maArrowCol, mbHCMode ? 0x80 : 0xC0);
-maHCLineCol = rSettings.GetLabelTextColor();
+maArrowCol = aColorConfig.GetColorValue(svtools::DOCBOUNDARIES).nColor;
+maMarkCol = aColorConfig.GetColorValue(svtools::TABLEBOUNDARIES).nColor;
+maHCLineCol = COL_BLACK;
 }
 
 const std::u16string_view aImageIds[] =
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Attila Szűcs (via logerrit)
 sc/qa/unit/data/xlsx/tdf138741_externalLinkSkipUnusedsCrash.xlsx |binary
 sc/qa/unit/subsequent_export-test.cxx|   13 
++
 sc/source/filter/excel/xelink.cxx|2 +
 sc/source/ui/docshell/externalrefmgr.cxx |2 -
 4 files changed, 16 insertions(+), 1 deletion(-)

New commits:
commit 172b81479451f0af2978dfa2eba1f9d105b946c9
Author: Attila Szűcs 
AuthorDate: Tue Dec 8 18:22:07 2020 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 10 10:48:54 2020 +0100

tdf#138741 XLSX export: fix crash in setSkipUnusedFileIds

Changed size of maConvertFileIdToUsedFileId vector to the same as
maSrcFiles size.

Some external references was not inserted into maRefCells,
that resulted a smaller maConvertFileIdToUsedFileId as was needed.

This crash was caused by:
tdf#87973 XLSX export: fix lost file names in modified links
f85d860ccbebd99bc128218148e2992c9415f221

Co-authored-by: Tibor Nagy (NISZ)
Change-Id: I1501f5222483bf3e9e41c9e921a024320231dce8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107434
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit 8cfe270258d914e154b9db8b6ad02cd923984435)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107481
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/unit/data/xlsx/tdf138741_externalLinkSkipUnusedsCrash.xlsx 
b/sc/qa/unit/data/xlsx/tdf138741_externalLinkSkipUnusedsCrash.xlsx
new file mode 100644
index ..59102f2ab814
Binary files /dev/null and 
b/sc/qa/unit/data/xlsx/tdf138741_externalLinkSkipUnusedsCrash.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index ba5764e4841c..03d63baeeabd 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -271,6 +271,7 @@ public:
 void testTdf126305_DataValidatyErrorAlert();
 void testTdf76047_externalLink();
 void testTdf87973_externalLinkSkipUnuseds();
+void testTdf138741_externalLinkSkipUnusedsCrash();
 void testTdf129969();
 void testTdf84874();
 void testTdf136721_paper_size();
@@ -443,6 +444,7 @@ public:
 CPPUNIT_TEST(testTdf126305_DataValidatyErrorAlert);
 CPPUNIT_TEST(testTdf76047_externalLink);
 CPPUNIT_TEST(testTdf87973_externalLinkSkipUnuseds);
+CPPUNIT_TEST(testTdf138741_externalLinkSkipUnusedsCrash);
 CPPUNIT_TEST(testTdf129969);
 CPPUNIT_TEST(testTdf84874);
 CPPUNIT_TEST(testTdf136721_paper_size);
@@ -5580,6 +5582,17 @@ void ScExportTest::testTdf87973_externalLinkSkipUnuseds()
 pDocSh->DoClose();
 }
 
+void ScExportTest::testTdf138741_externalLinkSkipUnusedsCrash()
+{
+ScDocShellRef xShell = loadDoc("tdf138741_externalLinkSkipUnusedsCrash.", 
FORMAT_XLSX);
+CPPUNIT_ASSERT(xShell);
+
+//without the fix in place, it would have crashed at export time
+ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
+
+xShell->DoClose();
+}
+
 void ScExportTest::testTdf129969()
 {
 ScDocShellRef xShell = loadDoc("external_hyperlink.", FORMAT_ODS);
diff --git a/sc/source/filter/excel/xelink.cxx 
b/sc/source/filter/excel/xelink.cxx
index 69037d483e7b..affc984234f5 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -2084,6 +2084,8 @@ void XclExpSupbookBuffer::SaveXml( XclExpXmlStream& rStrm 
)
 for (size_t nPos = 0, nSize = maSupbookList.GetSize(); nPos < nSize; 
++nPos)
 {
 XclExpSupbookRef xRef(maSupbookList.GetRecord(nPos));
+// fileIDs are indexed from 1 in xlsx, and from 0 in 
ScExternalRefManager
+// converting between them require a -1 or +1
 if (xRef->GetType() == XclSupbookType::Extern)
 aExternFileIds.push_back(xRef->GetFileId() - 1);
 }
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx 
b/sc/source/ui/docshell/externalrefmgr.cxx
index 942753693507..9bb744b07049 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2751,7 +2751,7 @@ sal_uInt16 
ScExternalRefManager::convertFileIdToUsedFileId(sal_uInt16 nFileId)
 void ScExternalRefManager::setSkipUnusedFileIds(std::vector& 
rExternFileIds)
 {
 mbSkipUnusedFileIds = true;
-maConvertFileIdToUsedFileId.resize(maRefCells.size());
+maConvertFileIdToUsedFileId.resize(maSrcFiles.size());
 std::fill(maConvertFileIdToUsedFileId.begin(), 
maConvertFileIdToUsedFileId.end(), 0);
 int nUsedCount = 0;
 for (auto nEntry : rExternFileIds)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Szymon Kłos (via logerrit)
 vcl/source/window/builder.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 2cccdfbb618004b7a122259707cbff3daf31db3f
Author: Szymon Kłos 
AuthorDate: Tue Dec 8 10:37:05 2020 +0100
Commit: Szymon Kłos 
CommitDate: Thu Dec 10 10:59:10 2020 +0100

jsdialog: enable define/manage named ranges dialogs

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

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 4d252f579adf..0cb215614c82 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -187,7 +187,10 @@ weld::Builder* Application::CreateBuilder(weld::Widget* 
pParent, const OUString
 }
 }
 
-if (rUIFile == "modules/scalc/ui/pivottablelayoutdialog.ui")
+if (rUIFile == "modules/scalc/ui/pivottablelayoutdialog.ui"
+|| rUIFile == "modules/scalc/ui/selectsource.ui"
+|| rUIFile == "modules/scalc/ui/managenamesdialog.ui"
+|| rUIFile == "modules/scalc/ui/definename.ui")
 {
 bUseJSBuilder = true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Ganesh Devare license statement

2020-12-10 Thread Ganesh Devare
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: Branch 'libreoffice-7-1' - include/oox oox/qa oox/source sw/inc sw/qa sw/source

2020-12-10 Thread Regényi Balázs (via logerrit)
 include/oox/export/drawingml.hxx|4 
 include/oox/vml/vmlshape.hxx|   10 ++
 oox/qa/unit/vml.cxx |   19 ---
 oox/source/export/drawingml.cxx |   34 
++
 oox/source/export/vmlexport.cxx |   50 
--
 oox/source/vml/vmlshape.cxx |   32 
++
 oox/source/vml/vmlshapecontext.cxx  |   20 ++--
 sw/inc/textboxhelper.hxx|7 +
 sw/qa/extras/ooxmlexport/data/tdf41466_testVmlShapeWithTextbox.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx   |   24 
 sw/source/core/doc/textboxhelper.cxx|   23 
 sw/source/core/unocore/unodraw.cxx  |9 +
 sw/source/filter/ww8/docxattributeoutput.cxx|6 +
 sw/source/filter/ww8/docxattributeoutput.hxx|2 
 14 files changed, 207 insertions(+), 33 deletions(-)

New commits:
commit aefb6aaf6475b71668bab7e11ce51b0fdc34f299
Author: Regényi Balázs 
AuthorDate: Tue Dec 1 12:16:12 2020 +0100
Commit: László Németh 
CommitDate: Thu Dec 10 12:03:39 2020 +0100

tdf#41466 DOCX import: fix VML v:shape/v:textbox

VML v:shape/v:textbox element was imported only as
a text frame, losing (otherwise recognized) preset
shape geometry, i.e. replacing a callout bubble
(wedgeRectCallout) and other special shapes with a
plain rectangle.

Thanks to Attila Bakos for the initial help.

Change-Id: I03a608822ed54a20ed07406a08c3539e72958f5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105299
Tested-by: Jenkins
Reviewed-by: László Németh 
(cherry picked from commit bda05ba1736b74727872579b65b3fa14e3d8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107486

diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index a4ef6af0530f..0a42eb84f001 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -70,6 +70,7 @@ namespace style {
 namespace text {
 class XTextContent;
 class XTextRange;
+class XTextFrame;
 }
 namespace io {
 class XOutputStream;
@@ -125,6 +126,9 @@ public:
 virtual OUString FindRelId(BitmapChecksum nChecksum) = 0;
 /// Store the RelId of a graphic based on its checksum.
 virtual void CacheRelId(BitmapChecksum nChecksum, const OUString& rRelId) 
= 0;
+///  Get textbox which belongs to the shape.
+virtual css::uno::Reference GetUnoTextFrame(
+css::uno::Reference xShape) = 0;
 protected:
 DMLTextExport() {}
 virtual ~DMLTextExport() {}
diff --git a/include/oox/vml/vmlshape.hxx b/include/oox/vml/vmlshape.hxx
index 7703b311c757..0e50e5b6ee1f 100644
--- a/include/oox/vml/vmlshape.hxx
+++ b/include/oox/vml/vmlshape.hxx
@@ -216,6 +216,7 @@ struct ShapeModel
 OUString maSignatureLineSigningInstructions;
 bool mbSignatureLineShowSignDate;
 bool mbSignatureLineCanAddComment;
+bool mbInGroup;
 
 explicitShapeModel();
 ~ShapeModel();
@@ -275,6 +276,13 @@ protected:
 const css::uno::Reference< css::drawing::XShapes 
>& rxShapes,
 const css::awt::Rectangle& rShapeRect ) const = 0;
 
+/** Always called after implConvertAndInsert for the same task.*/
+virtual css::uno::Reference 
finalImplConvertAndInsert(
+const css::uno::Reference& rxShape) const
+{
+return rxShape;
+};
+
 /** Calculates the final shape rectangle according to the passed anchor,
 if present, otherwise according to the own anchor settings. */
 css::awt::Rectangle calcShapeRectangle(
@@ -304,6 +312,8 @@ protected:
 implConvertAndInsert(
 const css::uno::Reference< css::drawing::XShapes 
>& rxShapes,
 const css::awt::Rectangle& rShapeRect ) const 
override;
+virtual css::uno::Reference 
finalImplConvertAndInsert(
+const css::uno::Reference& rxShape) const 
override;
 /** Used by both RectangleShape and ComplexShape. */
 css::uno::ReferencecreateEmbeddedPictureObject(
 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
diff --git a/oox/qa/unit/vml.cxx b/oox/qa/unit/vml.cxx
index d43d2d5645ae..ec64a08c3fcf 100644
--- a/oox/qa/unit/vml.cxx
+++ b/oox/qa/unit/vml.cxx
@@ -55,25 +55,6 @@ void OoxVmlTest::load(const OUString& rFileName)
 mxComponent = loadFromDesktop(aURL);
 }
 
-CPPUNIT_TEST_FIXTURE(OoxVmlTest, testLayoutFlowAltAlone)
-{
-// mso-layout-flow-alt:bottom-to-top without a matching 
layout-flow:vertical.
-load("layout-flow-alt-alone.docx");
-
-uno::Refere

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

2020-12-10 Thread Caolán McNamara (via logerrit)
 vcl/source/bitmap/bitmappaint.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 42fec1738d2e1bc6b962c870f7712edd103f58a1
Author: Caolán McNamara 
AuthorDate: Thu Dec 10 09:38:17 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 12:08:44 2020 +0100

we can use sal_uInt8 instead of int

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

diff --git a/vcl/source/bitmap/bitmappaint.cxx 
b/vcl/source/bitmap/bitmappaint.cxx
index 54ef3c69aaa1..a1ddb1333785 100644
--- a/vcl/source/bitmap/bitmappaint.cxx
+++ b/vcl/source/bitmap/bitmappaint.cxx
@@ -926,12 +926,12 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, si
 
 if (pAcc)
 {
-std::vector aMinR(nColorCount);
-std::vector aMaxR(nColorCount);
-std::vector aMinG(nColorCount);
-std::vector aMaxG(nColorCount);
-std::vector aMinB(nColorCount);
-std::vector aMaxB(nColorCount);
+std::vector aMinR(nColorCount);
+std::vector aMaxR(nColorCount);
+std::vector aMinG(nColorCount);
+std::vector aMaxG(nColorCount);
+std::vector aMinB(nColorCount);
+std::vector aMaxB(nColorCount);
 
 if (pTols)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Seth Chaiklin (via logerrit)
 source/text/shared/optionen/01040300.xhp |   11 +--
 source/text/shared/optionen/01040301.xhp |6 +-
 2 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit 1f5e7cbaf41f21b72713814f1517be23f933258d
Author: Seth Chaiklin 
AuthorDate: Sun Dec 6 14:01:22 2020 +0100
Commit: Seth Chaiklin 
CommitDate: Thu Dec 10 12:20:50 2020 +0100

tdf#107229 simplify embedding for default template help

  ( source/text/shared/optionen/01040300.xhp )
* changed link from (shared/optionen/01040301.xhp ) to
(shared/optionen/standard_template.xhp ).
 shared/optionen/01040301.xhp simply embeds all of
 "standard_template.xhp".
   No advantage in having a separate 01040301.xhp to
   embed into 01040300.xhp, because (a) makes relation
   to standard_template.xhp more difficult to see, and
   (b) the title in 01040301.xhp is only "change default
   template, but the reference from 01040300.xhp is also
   about customizing templates.

 * update to ,

  ( source/text/shared/optionen/01040301.xhp )

   with this patch, 01040301.xhp is not used by other
   files now. Could possibly be deleted.

 * update to 

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

diff --git a/source/text/shared/optionen/01040300.xhp 
b/source/text/shared/optionen/01040300.xhp
index 090ac769f..c030f7e33 100644
--- a/source/text/shared/optionen/01040300.xhp
+++ b/source/text/shared/optionen/01040300.xhp
@@ -1,6 +1,5 @@
 
-
-
+
 
 
-
+
 
 
 Basic Fonts
@@ -41,15 +40,15 @@
 
 
 
-Basic 
Fonts
+Basic 
Fonts
 Specifies the settings 
for the basic fonts in your documents.
 
 You can also 
change the basic fonts for Asian and complex text layout languages if their 
support is enabled in %PRODUCTNAME - 
PreferencesTools - 
Options - Language Settings - 
Languages.
-These settings 
define the basic fonts for the predefined templates. You can also modify or 
customize the default text templates.
+These settings 
define the basic fonts for the predefined templates. You can also modify or 
customize the default text templates.
 
   
 
-Basic 
fonts
+Basic fonts
 
 Default
 Specifies the font to be 
used for the Default Paragraph Style. The 
Default Paragraph Style font is used for nearly all Paragraph 
Styles, unless the Paragraph Style explicitly defines another font.
diff --git a/source/text/shared/optionen/01040301.xhp 
b/source/text/shared/optionen/01040301.xhp
index c2b59580d..634f796fa 100644
--- a/source/text/shared/optionen/01040301.xhp
+++ b/source/text/shared/optionen/01040301.xhp
@@ -1,6 +1,4 @@
 
-
-
 

[Libreoffice-commits] core.git: helpcontent2

2020-12-10 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3bc92f7458384f0a253f89eaddc38b11ebf4b66d
Author: Seth Chaiklin 
AuthorDate: Thu Dec 10 12:20:50 2020 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Dec 10 12:20:50 2020 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 1f5e7cbaf41f21b72713814f1517be23f933258d
  - tdf#107229 simplify embedding for default template help

  ( source/text/shared/optionen/01040300.xhp )
* changed link from (shared/optionen/01040301.xhp ) to
(shared/optionen/standard_template.xhp ).
 shared/optionen/01040301.xhp simply embeds all of
 "standard_template.xhp".
   No advantage in having a separate 01040301.xhp to
   embed into 01040300.xhp, because (a) makes relation
   to standard_template.xhp more difficult to see, and
   (b) the title in 01040301.xhp is only "change default
   template, but the reference from 01040300.xhp is also
   about customizing templates.

 * update to ,

  ( source/text/shared/optionen/01040301.xhp )

   with this patch, 01040301.xhp is not used by other
   files now. Could possibly be deleted.

 * update to 

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

diff --git a/helpcontent2 b/helpcontent2
index 13cd181da466..1f5e7cbaf41f 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 13cd181da4668aba0ba1e60c928d91c4892754db
+Subproject commit 1f5e7cbaf41f21b72713814f1517be23f933258d
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/data/tdf129083.odt|binary
 sw/qa/uitest/table/sheetToTable.py |   36 ++--
 2 files changed, 34 insertions(+), 2 deletions(-)

New commits:
commit e9640fd9d146527f26e66bb87a9d8a43cd161957
Author: Xisco Fauli 
AuthorDate: Thu Dec 10 11:23:22 2020 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 10 12:32:44 2020 +0100

tdf#129083: sw: Add UItest

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

diff --git a/sw/qa/uitest/data/tdf129083.odt b/sw/qa/uitest/data/tdf129083.odt
new file mode 100644
index ..3de65273e8a1
Binary files /dev/null and b/sw/qa/uitest/data/tdf129083.odt differ
diff --git a/sw/qa/uitest/table/sheetToTable.py 
b/sw/qa/uitest/table/sheetToTable.py
index 08405c03fbf1..d14529d4af9e 100644
--- a/sw/qa/uitest/table/sheetToTable.py
+++ b/sw/qa/uitest/table/sheetToTable.py
@@ -9,6 +9,7 @@ from uitest.uihelper.common import get_state_as_dict
 from uitest.uihelper.common import select_pos
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.calc import enter_text_to_cell
 import org.libreoffice.unotest
 import pathlib
 
@@ -19,7 +20,6 @@ def get_url_for_data_file(file_name):
 
 class sheetToTable(UITestCase):
 def test_sheet_to_table_without_hidden_rows(self):
-print(get_url_for_data_file("hiddenRow.ods"))
 calc_doc = 
self.ui_test.load_file(get_url_for_data_file("hiddenRow.ods"))
 xCalcDoc = self.xUITest.getTopFocusWindow()
 self.xUITest.executeCommand(".uno:SelectAll")
@@ -42,7 +42,6 @@ class sheetToTable(UITestCase):
 self.ui_test.close_doc()
 
 def test_tdf138688(self):
-print(get_url_for_data_file("hiddenRow.ods"))
 calc_doc = 
self.ui_test.load_file(get_url_for_data_file("hiddenRow.ods"))
 xCalcDoc = self.xUITest.getTopFocusWindow()
 self.xUITest.executeCommand(".uno:SelectAll")
@@ -73,3 +72,36 @@ class sheetToTable(UITestCase):
 # This was "2 (hidden)" (copied hidden row)
 self.assertEqual(table.getCellByName("A2").getString(), "3")
 self.ui_test.close_doc()
+
+def test_tdf129083(self):
+calc_doc = self.ui_test.create_doc_in_start_center("calc")
+
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+
+enter_text_to_cell(gridwin, "A1", "Test 1")
+enter_text_to_cell(gridwin, "A2", "Test 2")
+enter_text_to_cell(gridwin, "A3", "Test 3")
+enter_text_to_cell(gridwin, "A4", "Test 4")
+
+gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A4"}))
+
+self.xUITest.executeCommand(".uno:Copy")
+
+self.ui_test.close_doc()
+
+writer_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf129083.odt"))
+document = self.ui_test.get_component()
+xWriterDoc = self.xUITest.getTopFocusWindow()
+
+self.xUITest.executeCommand(".uno:Paste")
+
+self.assertEqual(document.TextTables.getCount(), 1)
+table = document.getTextTables()[0]
+self.assertEqual(len(table.getRows()), 4)
+self.assertEqual(table.getCellByName("A1").getString(), "Test 1")
+self.assertEqual(table.getCellByName("A2").getString(), "Test 2")
+self.assertEqual(table.getCellByName("A3").getString(), "Test 3")
+self.assertEqual(table.getCellByName("A4").getString(), "Test 4")
+self.ui_test.close_doc()
___
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' - xmlsecurity/qa

2020-12-10 Thread Caolán McNamara (via logerrit)
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 5fc2c93e69ddb2ab6b8061c1f23fa500224c4fa6
Author: Caolán McNamara 
AuthorDate: Fri Dec 4 12:58:20 2020 +
Commit: Xisco Fauli 
CommitDate: Thu Dec 10 12:57:51 2020 +0100

disable tests that don't work without pdfium

we're probably past the end of the road on --disable-pdfium

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

diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 7659fe9485c5..68738134cc36 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
 #include 
 #include 
 
@@ -414,6 +416,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP1)
 = verify(m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"bad-cert-p1.pdf", 1,
  /*rExpectedSubFilter=*/OString());
 CPPUNIT_ASSERT(!aInfos.empty());
+#if HAVE_FEATURE_PDFIUM
 SignatureInformation& rInformation = aInfos[0];
 // Without the accompanying fix in place, this test would have failed with:
 // - Expected: 0 (SecurityOperationStatus_UNKNOWN)
@@ -421,6 +424,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP1)
 // i.e. annotation after a P1 signature was not considered as a bad 
modification.
 
CPPUNIT_ASSERT_EQUAL(xml::crypto::SecurityOperationStatus::SecurityOperationStatus_UNKNOWN,
  rInformation.nStatus);
+#endif
 }
 
 CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP3Stamp)
@@ -429,14 +433,15 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP3Stamp)
 = verify(m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"bad-cert-p3-stamp.pdf", 1,
  /*rExpectedSubFilter=*/OString());
 CPPUNIT_ASSERT(!aInfos.empty());
+#if HAVE_FEATURE_PDFIUM
 SignatureInformation& rInformation = aInfos[0];
-
 // Without the accompanying fix in place, this test would have failed with:
 // - Expected: 0 (SecurityOperationStatus_UNKNOWN)
 // - Actual  : 1 (SecurityOperationStatus_OPERATION_SUCCEEDED)
 // i.e. adding a stamp annotation was not considered as a bad modification.
 
CPPUNIT_ASSERT_EQUAL(xml::crypto::SecurityOperationStatus::SecurityOperationStatus_UNKNOWN,
  rInformation.nStatus);
+#endif
 }
 
 /// Test writing a PAdES signature.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'libreoffice-7-1' - source/text

2020-12-10 Thread Seth Chaiklin (via logerrit)
 source/text/scalc/guide/rename_table.xhp |   53 ++-
 1 file changed, 25 insertions(+), 28 deletions(-)

New commits:
commit ed893b7a8c47e2b5fe712b73966324e4c44e41d5
Author: Seth Chaiklin 
AuthorDate: Tue Dec 8 14:34:28 2020 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Dec 10 13:30:58 2020 +0100

Related to: tdf#138662   improve help for renaming Calc sheets

  * move  and  to better location
  * move prefix explanation to better location with own 
  - drop links to page that does not give any help about prefixes
and add menu command sequence to get to the relevant place.
  * Revise explanation about naming (drop select, add double click)
  + add explanation about single quote restrictions.
  - drop warning about WindowManager (which was added in 2006)
  + add  to restricted characters
  + add new  headings to clarify page content
  * convert one "note" to a paragraph under a new heading
  * where paragraphs were changed, add  as apppropriate
  * update to ,,

Change-Id: I8a0e97b871331e0e3300a68252ae4096500aeeb1
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107380
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 
Reviewed-by: Ilmari Lauhakangas 
(cherry picked from commit 13cd181da4668aba0ba1e60c928d91c4892754db)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107491
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/scalc/guide/rename_table.xhp 
b/source/text/scalc/guide/rename_table.xhp
index 0cebc5bcf..dd03da71e 100644
--- a/source/text/scalc/guide/rename_table.xhp
+++ b/source/text/scalc/guide/rename_table.xhp
@@ -1,6 +1,5 @@
 
 
-
 
 
-
 
   
  Renaming Sheets
@@ -31,16 +29,15 @@
   sheet tabs;renaming
   tables;renaming
   names; sheets
-mw made "renaming sheets" a two level entry.
-Renaming 
Sheets
-
-Setting sheet names is an important feature to produce 
readable and understandable spreadsheets documents. To rename a sheet in your 
document:
+
+Renaming 
Sheets
+
+Setting sheet names is an important feature to produce 
readable and understandable spreadsheets documents.
+The name of a sheet is independent of 
the name of the spreadsheet. You enter the spreadsheet name when you save it 
for the first time as a file.
+To rename a sheet in 
your document:
   
  
-Click on the sheet tab to select it.
- 
- 
-Open the context menu of the sheet tab and choose the 
Rename Sheet command. A dialog box appears where you can enter a 
new name.
+Double-click the sheet tab or open its context menu and choose 
Rename Sheet. A dialog box appears where you can enter a 
new name.
  
  
 Enter a new name for the sheet and click 
OK.
@@ -48,46 +45,46 @@
  
 Alternatively, hold down the Option key
 Alt key and click 
on any sheet name and enter the new name directly.
-
  
   
+The document can contain up 
to 10,000 individual sheets, which must have different names.
+Sheet Naming Restrictions
   Sheet names can contain almost any character. Some naming 
restrictions apply, the following characters are not allowed in sheet 
names:
   
  
-colon :
+colon :
  
  
-back slash \
+back slash \
  
  
-forward slash /
+forward slash /
  
  
-question mark ?
+question mark ?
  
  
-asterisk *
+asterisk *
  
  
-left square bracket [
+left square bracket [
  
  
-right square bracket ]
+right square bracket ]
  
  
-single quote ' as the first or last character of the 
name
+single quote ' as the first or last 
character of the name
  
   
-  In 
cell references, a sheet name must be enclosed in single quotes ' when the name 
contains other characters than alphanumeric or underscore. A single quote 
contained within a name has to be escaped by doubling it (two single 
quotes).
-  For example, you want to reference the cell A1 on a sheet with 
the following name:
-  This 
year's sheet
-  The reference must be enclosed in single quotes, and the one 
single quote inside the name must be doubled:
-  'This year''s sheet'.A1
-  The name of a 
sheet is independent of the name of the spreadsheet. You enter the spreadsheet 
name when you save it for the first time as a file.
-  The 
document can contain up to 10,000 individual sheets, which must have different 
names.
-  You can set a prefix for the names of new sheets you create. 
See this 
page of Calc options.
+The single quote is 
Unicode U+0027, also known as apostrophe. 
Other single-quote characters, simi

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - helpcontent2

2020-12-10 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7cf2739be725c4878713d88f7d372e70a54c238a
Author: Seth Chaiklin 
AuthorDate: Thu Dec 10 13:30:58 2020 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Dec 10 13:30:58 2020 +0100

Update git submodules

* Update helpcontent2 from branch 'libreoffice-7-1'
  to ed893b7a8c47e2b5fe712b73966324e4c44e41d5
  - Related to: tdf#138662   improve help for renaming Calc sheets

  * move  and  to better location
  * move prefix explanation to better location with own 
  - drop links to page that does not give any help about prefixes
and add menu command sequence to get to the relevant place.
  * Revise explanation about naming (drop select, add double click)
  + add explanation about single quote restrictions.
  - drop warning about WindowManager (which was added in 2006)
  + add  to restricted characters
  + add new  headings to clarify page content
  * convert one "note" to a paragraph under a new heading
  * where paragraphs were changed, add  as apppropriate
  * update to ,,

Change-Id: I8a0e97b871331e0e3300a68252ae4096500aeeb1
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107380
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 
Reviewed-by: Ilmari Lauhakangas 
(cherry picked from commit 13cd181da4668aba0ba1e60c928d91c4892754db)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107491
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index b9a3bdeb9ede..ed893b7a8c47 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b9a3bdeb9ede49b13e65c0f2c403ef5fbed6e0ee
+Subproject commit ed893b7a8c47e2b5fe712b73966324e4c44e41d5
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Michael Stahl (via logerrit)
 sw/source/core/text/xmldump.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5dbb0403b6f814129983963f5fea02208995270a
Author: Michael Stahl 
AuthorDate: Wed Dec 9 18:03:12 2020 +0100
Commit: Michael Stahl 
CommitDate: Thu Dec 10 13:34:16 2020 +0100

sw: avoid crashing in SwFrame::dumpAsXmlAttributes()

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

diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 47d3e6536ab7..03729d6156b0 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -468,7 +468,7 @@ void SwFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer 
) const
 if (IsSctFrame())
 {
 SwSectionFrame const*const pFrame(static_cast(this));
-SwSectionNode const*const 
pNode(pFrame->GetSection()->GetFormat()->GetSectionNode());
+SwSectionNode const*const pNode(pFrame->GetSection() ? 
pFrame->GetSection()->GetFormat()->GetSectionNode() : nullptr);
 xmlTextWriterWriteFormatAttribute(writer, 
BAD_CAST("sectionNodeIndex"), TMP_FORMAT, pNode ? pNode->GetIndex() : -1);
 }
 if ( IsTextFrame(  ) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Michael Stahl (via logerrit)
 sw/source/core/doc/DocumentContentOperationsManager.cxx |3 ++-
 sw/source/core/txtnode/ndtxt.cxx|2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit b4365b985178e1866c74afd757a104aad1d405a9
Author: Michael Stahl 
AuthorDate: Thu Dec 10 11:22:13 2020 +0100
Commit: Michael Stahl 
CommitDate: Thu Dec 10 13:34:32 2020 +0100

tdf#134626 sw: fix UBSan warning about deleted SwTextFormatColl

sw/source/core/txtnode/ndtxt.cxx:5254:17: runtime error: downcast of 
address 0x612000a321c0 which does not point to an object of type 'const 
SwTextFormatColl'
0x612000a321c0: note: object is of type 'SwFormat'
 00 00 00 00  50 4c 3c fa bb 7f 00 00  80 b8 ba 05 50 61 00 00  c0 81 5f 02 
20 61 00 00  c0 b6 b0 00
  ^~~
  vptr for 'SwFormat'
 0 in SwTextNode::TriggerNodeUpdate(sw::LegacyModifyHint const&) at 
sw/source/core/txtnode/ndtxt.cxx:5254:17
 1 in SwTextNode::SwClientNotify(SwModify const&, SfxHint const&) at 
sw/source/core/txtnode/ndtxt.cxx:5306:9
 2 in SwClient::SwClientNotifyCall(SwModify const&, SfxHint const&) at 
sw/inc/calbck.hxx:161:80
 3 in SwFormat::~SwFormat() at sw/source/core/attr/format.cxx:240:22
 4 in SwFormatColl::~SwFormatColl() at sw/inc/fmtcol.hxx:35:26
 5 in SwTextFormatColl::~SwTextFormatColl() at sw/inc/fmtcol.hxx:56:20
 6 in SwTextFormatColl::~SwTextFormatColl() at sw/inc/fmtcol.hxx:56:20
 7 in SwDoc::DelTextFormatColl(unsigned long, bool) at 
sw/source/core/doc/docfmt.cxx:983:5
 8 in SwDoc::DelTextFormatColl(SwTextFormatColl const*, bool) at 
sw/source/core/doc/docfmt.cxx:991:5
 9 in SwUndoTextFormatCollCreate::Delete() at 
sw/source/core/undo/SwUndoFmt.cxx:203:12
 10 in SwUndoFormatCreate::UndoImpl(sw::UndoRedoContext&) at 
sw/source/core/undo/SwUndoFmt.cxx:61:9
 11 in SwUndo::UndoWithContext(SfxUndoContext&) at 
sw/source/core/undo/undobj.cxx:235:5

Any SwUndoFormatCreate that is added during CopyImplImpl() must go before
SwUndoCopyDoc on the undo stack.

SwNodes::CopyNodes() is pretty much the only thing of substance there
that runs with Undo enabled; CopyBookmarks() and lcl_DeleteRedlines()
and CopyFlyInFlyImpl() have it disabled.

Let's see if the fix is really this simple...

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

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 4d140fcd5b00..ea18f8717509 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -4725,7 +4725,6 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
 if (rDoc.GetIDocumentUndoRedo().DoesUndo())
 {
 pUndo = new SwUndoCpyDoc(*pCopyPam);
-rDoc.GetIDocumentUndoRedo().AppendUndo( std::unique_ptr(pUndo) 
);
 pFlysAtInsPos = pUndo->GetFlysAnchoredAt();
 }
 else
@@ -5152,6 +5151,8 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
 // If Undo is enabled, store the inserted area
 if (rDoc.GetIDocumentUndoRedo().DoesUndo())
 {
+// append it after styles have been copied when copying nodes
+rDoc.GetIDocumentUndoRedo().AppendUndo( std::unique_ptr(pUndo) 
);
 pUndo->SetInsertRange(*pCopyPam, true, nDeleteTextNodes);
 }
 
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 4172d573e39d..a41c9bc19b7e 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -5248,6 +5248,8 @@ void SwTextNode::TriggerNodeUpdate(const 
sw::LegacyModifyHint& rHint)
 && GetRegisteredIn() == static_cast(pNewValue)->pChangedFormat
 && GetNodes().IsDocNodes() )
 {
+assert(dynamic_cast(static_cast(pOldValue)->pChangedFormat));
+assert(dynamic_cast(static_cast(pNewValue)->pChangedFormat));
 ChgTextCollUpdateNum(
 static_cast(static_cast(pOldValue)->pChangedFormat),
 static_cast(static_cast(pNewValue)->pChangedFormat) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'libreoffice-7-1' - source/text

2020-12-10 Thread Seth Chaiklin (via logerrit)
 source/text/shared/optionen/01040300.xhp |   11 +--
 source/text/shared/optionen/01040301.xhp |6 +-
 2 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit 8ec8c9e42a5f4a98d36029b67711cc89c5e33a3f
Author: Seth Chaiklin 
AuthorDate: Sun Dec 6 14:01:22 2020 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Dec 10 13:35:05 2020 +0100

tdf#107229 simplify embedding for default template help

  ( source/text/shared/optionen/01040300.xhp )
* changed link from (shared/optionen/01040301.xhp ) to
(shared/optionen/standard_template.xhp ).
 shared/optionen/01040301.xhp simply embeds all of
 "standard_template.xhp".
   No advantage in having a separate 01040301.xhp to
   embed into 01040300.xhp, because (a) makes relation
   to standard_template.xhp more difficult to see, and
   (b) the title in 01040301.xhp is only "change default
   template, but the reference from 01040300.xhp is also
   about customizing templates.

 * update to ,

  ( source/text/shared/optionen/01040301.xhp )

   with this patch, 01040301.xhp is not used by other
   files now. Could possibly be deleted.

 * update to 

Change-Id: I00b2ac9f9aad3865172ed985e3394492fa122d46
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107296
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 
(cherry picked from commit 1f5e7cbaf41f21b72713814f1517be23f933258d)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107492
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/shared/optionen/01040300.xhp 
b/source/text/shared/optionen/01040300.xhp
index 090ac769f..c030f7e33 100644
--- a/source/text/shared/optionen/01040300.xhp
+++ b/source/text/shared/optionen/01040300.xhp
@@ -1,6 +1,5 @@
 
-
-
+
 
 
-
+
 
 
 Basic Fonts
@@ -41,15 +40,15 @@
 
 
 
-Basic 
Fonts
+Basic 
Fonts
 Specifies the settings 
for the basic fonts in your documents.
 
 You can also 
change the basic fonts for Asian and complex text layout languages if their 
support is enabled in %PRODUCTNAME - 
PreferencesTools - 
Options - Language Settings - 
Languages.
-These settings 
define the basic fonts for the predefined templates. You can also modify or 
customize the default text templates.
+These settings 
define the basic fonts for the predefined templates. You can also modify or 
customize the default text templates.
 
   
 
-Basic 
fonts
+Basic fonts
 
 Default
 Specifies the font to be 
used for the Default Paragraph Style. The 
Default Paragraph Style font is used for nearly all Paragraph 
Styles, unless the Paragraph Style explicitly defines another font.
diff --git a/source/text/shared/optionen/01040301.xhp 
b/source/text/shared/optionen/01040301.xhp
index c2b59580d..634f796fa 100644
--- a/source/text/shared/optionen/01040301.xhp
+++ b/source/text/shared/optionen/01040301.xhp
@@ -1,6 +1,4 @@
 
-
-
 

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - helpcontent2

2020-12-10 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 85db1368d6f8965c636c82b8d85734627ffa5bbd
Author: Seth Chaiklin 
AuthorDate: Thu Dec 10 13:35:05 2020 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Dec 10 13:35:05 2020 +0100

Update git submodules

* Update helpcontent2 from branch 'libreoffice-7-1'
  to 8ec8c9e42a5f4a98d36029b67711cc89c5e33a3f
  - tdf#107229 simplify embedding for default template help

  ( source/text/shared/optionen/01040300.xhp )
* changed link from (shared/optionen/01040301.xhp ) to
(shared/optionen/standard_template.xhp ).
 shared/optionen/01040301.xhp simply embeds all of
 "standard_template.xhp".
   No advantage in having a separate 01040301.xhp to
   embed into 01040300.xhp, because (a) makes relation
   to standard_template.xhp more difficult to see, and
   (b) the title in 01040301.xhp is only "change default
   template, but the reference from 01040300.xhp is also
   about customizing templates.

 * update to ,

  ( source/text/shared/optionen/01040301.xhp )

   with this patch, 01040301.xhp is not used by other
   files now. Could possibly be deleted.

 * update to 

Change-Id: I00b2ac9f9aad3865172ed985e3394492fa122d46
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107296
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 
(cherry picked from commit 1f5e7cbaf41f21b72713814f1517be23f933258d)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107492
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index ed893b7a8c47..8ec8c9e42a5f 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ed893b7a8c47e2b5fe712b73966324e4c44e41d5
+Subproject commit 8ec8c9e42a5f4a98d36029b67711cc89c5e33a3f
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Caolán McNamara (via logerrit)
 include/svx/linectrl.hxx  |5 +
 include/svx/sidebar/LinePropertyPanelBase.hxx |4 ++--
 svx/source/sidebar/line/LinePropertyPanelBase.cxx |   18 ++
 svx/source/tbxctrls/linectrl.cxx  |9 +
 4 files changed, 22 insertions(+), 14 deletions(-)

New commits:
commit 248ceefbbc3be28f7192b986d5d34985106268e1
Author: Caolán McNamara 
AuthorDate: Thu Dec 10 11:27:15 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 14:01:25 2020 +0100

Resolves: tdf#138789 disable widgets on 'none' when status changes

instead of when chage is dispatched, the chart case has its own
dispatcher that disables the base class one. This fixes the reported
problem, and the related problem of updating when moving focus from
one line that has style 'none' to one that doesn't, and vice-versa,
where no change is dispached on received on context change

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

diff --git a/include/svx/linectrl.hxx b/include/svx/linectrl.hxx
index 62f428aa5136..7ade8dc06643 100644
--- a/include/svx/linectrl.hxx
+++ b/include/svx/linectrl.hxx
@@ -32,6 +32,7 @@ class XLineStyleItem;
 class XLineDashItem;
 
 typedef std::function 
LineStyleSelectFunction;
+typedef std::function LineStyleIsNoneFunction;
 
 // SvxLineStyleController:
 class SVXCORE_DLLPUBLIC SvxLineStyleToolBoxControl final : public 
svt::PopupWindowController
@@ -40,6 +41,7 @@ private:
 std::unique_ptr m_xBtnUpdater;
 
 LineStyleSelectFunction m_aLineStyleSelectFunction;
+LineStyleIsNoneFunction m_aLineStyleIsNoneFunction;
 
 public:
 SvxLineStyleToolBoxControl( const 
css::uno::Reference& rContext );
@@ -56,7 +58,10 @@ public:
 
 virtual ~SvxLineStyleToolBoxControl() override;
 
+// called when the user selects a line style
 void setLineStyleSelectFunction(const LineStyleSelectFunction& 
aLineStyleSelectFunction);
+// called when the line style changes, can be used to trigger disabling 
the arrows if the none line style is selected
+void setLineStyleIsNoneFunction(const LineStyleIsNoneFunction& 
aLineStyleIsNoneFunction);
 void dispatchLineStyleCommand(const OUString& rCommand, const 
css::uno::Sequence& rArgs);
 
 private:
diff --git a/include/svx/sidebar/LinePropertyPanelBase.hxx 
b/include/svx/sidebar/LinePropertyPanelBase.hxx
index 1905e66d7c2c..cd924e6b8a8f 100644
--- a/include/svx/sidebar/LinePropertyPanelBase.hxx
+++ b/include/svx/sidebar/LinePropertyPanelBase.hxx
@@ -40,7 +40,7 @@ class XDashList;
 
 namespace svx::sidebar
 {
-class DisableArrowsWrapper;
+class LineStyleNoneChange;
 
 class SVX_DLLPUBLIC LinePropertyPanelBase : public PanelLayout
 {
@@ -108,7 +108,7 @@ private:
 //popup windows
 std::unique_ptr mxLineWidthPopup;
 
-std::unique_ptr mxDisableArrowsWrapper;
+std::unique_ptr mxLineStyleNoneChange;
 
 sal_uInt16 mnTrans;
 MapUnit meMapUnit;
diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx 
b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
index 2738f1fc4023..f1b49ebde5c1 100644
--- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
@@ -36,26 +36,20 @@ const char SELECTWIDTH[] = "SelectWidth";
 namespace svx::sidebar {
 
 // trigger disabling the arrows if the none line style is selected
-class DisableArrowsWrapper
+class LineStyleNoneChange
 {
 private:
 LinePropertyPanelBase& m_rPanel;
 
 public:
-DisableArrowsWrapper(LinePropertyPanelBase& rPanel)
+LineStyleNoneChange(LinePropertyPanelBase& rPanel)
 : m_rPanel(rPanel)
 {
 }
 
-bool operator()(std::u16string_view rCommand, const css::uno::Any& rValue)
+void operator()(bool bLineStyleNone)
 {
-if (rCommand == u".uno:XLineStyle")
-{
-css::drawing::LineStyle eLineStyle(css::drawing::LineStyle_NONE);
-rValue >>= eLineStyle;
-m_rPanel.SetNoneLineStyle(eLineStyle == 
css::drawing::LineStyle_NONE);
-}
-return false;
+m_rPanel.SetNoneLineStyle(bLineStyleNone);
 }
 };
 
@@ -89,7 +83,7 @@ LinePropertyPanelBase::LinePropertyPanelBase(
 mxGridLineProps(m_xBuilder->weld_widget("lineproperties")),
 mxBoxArrowProps(m_xBuilder->weld_widget("arrowproperties")),
 mxLineWidthPopup(new LineWidthPopup(mxTBWidth.get(), *this)),
-mxDisableArrowsWrapper(new DisableArrowsWrapper(*this)),
+mxLineStyleNoneChange(new LineStyleNoneChange(*this)),
 mnTrans(0),
 meMapUnit(MapUnit::MapMM),
 mnWidthCoreValue(0),
@@ -150,7 +144,7 @@ void LinePropertyPanelBase::Initialize()
 mxLBCapStyle->connect_changed( LINK( this, LinePropertyPanelBase, 
ChangeCapStyleHdl ) );
 
 SvxLineStyleToolBoxControl* pLineStyleControl = 
getLineStyleToolBoxControl(*mxLineStyleDispatch);
-pLi

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

2020-12-10 Thread Caolán McNamara (via logerrit)
 include/svx/linectrl.hxx  |5 +
 include/svx/sidebar/LinePropertyPanelBase.hxx |4 ++--
 svx/source/sidebar/line/LinePropertyPanelBase.cxx |   18 ++
 svx/source/tbxctrls/linectrl.cxx  |9 +
 4 files changed, 22 insertions(+), 14 deletions(-)

New commits:
commit df264ca516a1cdbd24342d399f843bb3ae16c138
Author: Caolán McNamara 
AuthorDate: Thu Dec 10 11:27:15 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 14:01:40 2020 +0100

Resolves: tdf#138789 disable widgets on 'none' when status changes

instead of when chage is dispatched, the chart case has its own
dispatcher that disables the base class one. This fixes the reported
problem, and the related problem of updating when moving focus from
one line that has style 'none' to one that doesn't, and vice-versa,
where no change is dispached on received on context change

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

diff --git a/include/svx/linectrl.hxx b/include/svx/linectrl.hxx
index 62f428aa5136..7ade8dc06643 100644
--- a/include/svx/linectrl.hxx
+++ b/include/svx/linectrl.hxx
@@ -32,6 +32,7 @@ class XLineStyleItem;
 class XLineDashItem;
 
 typedef std::function 
LineStyleSelectFunction;
+typedef std::function LineStyleIsNoneFunction;
 
 // SvxLineStyleController:
 class SVXCORE_DLLPUBLIC SvxLineStyleToolBoxControl final : public 
svt::PopupWindowController
@@ -40,6 +41,7 @@ private:
 std::unique_ptr m_xBtnUpdater;
 
 LineStyleSelectFunction m_aLineStyleSelectFunction;
+LineStyleIsNoneFunction m_aLineStyleIsNoneFunction;
 
 public:
 SvxLineStyleToolBoxControl( const 
css::uno::Reference& rContext );
@@ -56,7 +58,10 @@ public:
 
 virtual ~SvxLineStyleToolBoxControl() override;
 
+// called when the user selects a line style
 void setLineStyleSelectFunction(const LineStyleSelectFunction& 
aLineStyleSelectFunction);
+// called when the line style changes, can be used to trigger disabling 
the arrows if the none line style is selected
+void setLineStyleIsNoneFunction(const LineStyleIsNoneFunction& 
aLineStyleIsNoneFunction);
 void dispatchLineStyleCommand(const OUString& rCommand, const 
css::uno::Sequence& rArgs);
 
 private:
diff --git a/include/svx/sidebar/LinePropertyPanelBase.hxx 
b/include/svx/sidebar/LinePropertyPanelBase.hxx
index 1905e66d7c2c..cd924e6b8a8f 100644
--- a/include/svx/sidebar/LinePropertyPanelBase.hxx
+++ b/include/svx/sidebar/LinePropertyPanelBase.hxx
@@ -40,7 +40,7 @@ class XDashList;
 
 namespace svx::sidebar
 {
-class DisableArrowsWrapper;
+class LineStyleNoneChange;
 
 class SVX_DLLPUBLIC LinePropertyPanelBase : public PanelLayout
 {
@@ -108,7 +108,7 @@ private:
 //popup windows
 std::unique_ptr mxLineWidthPopup;
 
-std::unique_ptr mxDisableArrowsWrapper;
+std::unique_ptr mxLineStyleNoneChange;
 
 sal_uInt16 mnTrans;
 MapUnit meMapUnit;
diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx 
b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
index 2c144e48ccd8..f1b49ebde5c1 100644
--- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
@@ -36,26 +36,20 @@ const char SELECTWIDTH[] = "SelectWidth";
 namespace svx::sidebar {
 
 // trigger disabling the arrows if the none line style is selected
-class DisableArrowsWrapper
+class LineStyleNoneChange
 {
 private:
 LinePropertyPanelBase& m_rPanel;
 
 public:
-DisableArrowsWrapper(LinePropertyPanelBase& rPanel)
+LineStyleNoneChange(LinePropertyPanelBase& rPanel)
 : m_rPanel(rPanel)
 {
 }
 
-bool operator()(const OUString& rCommand, const css::uno::Any& rValue)
+void operator()(bool bLineStyleNone)
 {
-if (rCommand == ".uno:XLineStyle")
-{
-css::drawing::LineStyle eLineStyle(css::drawing::LineStyle_NONE);
-rValue >>= eLineStyle;
-m_rPanel.SetNoneLineStyle(eLineStyle == 
css::drawing::LineStyle_NONE);
-}
-return false;
+m_rPanel.SetNoneLineStyle(bLineStyleNone);
 }
 };
 
@@ -89,7 +83,7 @@ LinePropertyPanelBase::LinePropertyPanelBase(
 mxGridLineProps(m_xBuilder->weld_widget("lineproperties")),
 mxBoxArrowProps(m_xBuilder->weld_widget("arrowproperties")),
 mxLineWidthPopup(new LineWidthPopup(mxTBWidth.get(), *this)),
-mxDisableArrowsWrapper(new DisableArrowsWrapper(*this)),
+mxLineStyleNoneChange(new LineStyleNoneChange(*this)),
 mnTrans(0),
 meMapUnit(MapUnit::MapMM),
 mnWidthCoreValue(0),
@@ -150,7 +144,7 @@ void LinePropertyPanelBase::Initialize()
 mxLBCapStyle->connect_changed( LINK( this, LinePropertyPanelBase, 
ChangeCapStyleHdl ) );
 
 SvxLineStyleToolBoxControl* pLineStyleControl = 
getLineStyleToolBoxControl(*mxLineStyleDispatch);
-pLineSty

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 2 commits - include/vcl sc/uiconfig vcl/source

2020-12-10 Thread Szymon Kłos (via logerrit)
 include/vcl/fixed.hxx  |2 +
 sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui |   28 -
 vcl/source/control/fixed.cxx   |9 
 3 files changed, 38 insertions(+), 1 deletion(-)

New commits:
commit a862c49ad5944972f336231b31fe4ad5114672fc
Author: Szymon Kłos 
AuthorDate: Thu Dec 10 10:47:35 2020 +0100
Commit: Szymon Kłos 
CommitDate: Thu Dec 10 14:06:29 2020 +0100

pivot table: add separator between list views

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

diff --git a/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui 
b/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui
index b4d106fb1c53..5e391b733d03 100644
--- a/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui
+++ b/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui
@@ -450,6 +450,32 @@
 0
   
 
+
+  
+True
+False
+True
+vertical
+6
+
+  
+True
+False
+vertical
+  
+  
+True
+True
+0
+  
+
+  
+  
+False
+True
+1
+  
+
 
   
 True
@@ -523,7 +549,7 @@
   
 False
 True
-1
+2
   
 
   
commit 1a6ff3ac3aaab0e929fc5fa6791cadd4c1afb82b
Author: Szymon Kłos 
AuthorDate: Thu Dec 10 11:38:57 2020 +0100
Commit: Szymon Kłos 
CommitDate: Thu Dec 10 14:06:18 2020 +0100

jsdialog: dump separator line

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

diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx
index fc1563962df5..00ae91c7624a 100644
--- a/include/vcl/fixed.hxx
+++ b/include/vcl/fixed.hxx
@@ -113,6 +113,8 @@ public:
 virtual voidDataChanged( const DataChangedEvent& rDCEvt ) override;
 
 virtual SizeGetOptimalSize() const override;
+
+virtual boost::property_tree::ptree DumpAsPropertyTree() override;
 };
 
 class VCL_DLLPUBLIC FixedBitmap final : public Control
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 237f2f30e304..c5eb075a8e0d 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define FIXEDLINE_TEXT_BORDER4
 
@@ -656,6 +657,14 @@ Size FixedLine::GetOptimalSize() const
 return CalcWindowSize( FixedText::CalcMinimumTextSize ( this ) );
 }
 
+boost::property_tree::ptree FixedLine::DumpAsPropertyTree()
+{
+boost::property_tree::ptree aTree(Control::DumpAsPropertyTree());
+aTree.put("type", "separator");
+aTree.put("orientation", (GetStyle() & WB_VERT) ? "vertical" : 
"horizontal");
+return aTree;
+}
+
 void FixedBitmap::ImplInit( vcl::Window* pParent, WinBits nStyle )
 {
 nStyle = ImplInitStyle( nStyle );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/vcl sc/source vcl/source vcl/unx

2020-12-10 Thread Caolán McNamara (via logerrit)
 include/vcl/layout.hxx   |8 +
 include/vcl/weld.hxx |2 
 sc/source/ui/cctrl/checklistmenu.cxx |2 
 vcl/source/app/salvtables.cxx|   17 ++-
 vcl/source/window/layout.cxx |8 -
 vcl/unx/gtk3/gtk3gtkinst.cxx |  153 ++-
 6 files changed, 107 insertions(+), 83 deletions(-)

New commits:
commit c4892a47195685cd36fe91be872206f517abc45b
Author: Caolán McNamara 
AuthorDate: Sun May 31 16:16:37 2020 +0100
Commit: Szymon Kłos 
CommitDate: Thu Dec 10 14:06:43 2020 +0100

allow sorting buttons via weld::Box

Change-Id: I315fe2dd2e40c976edd802c1e87b7ccdb0c298fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95221
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107523
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index b89cf0449ffb..89a4ad72d447 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -94,6 +94,10 @@ public:
 {
 m_bHomogeneous = bHomogeneous;
 }
+bool get_orientation() const
+{
+return m_bVerticalContainer;
+}
 virtual bool set_property(const OString &rKey, const OUString &rValue) 
override;
 virtual boost::property_tree::ptree DumpAsPropertyTree() override;
 protected:
@@ -211,7 +215,6 @@ public:
 {
 }
 virtual bool set_property(const OString &rKey, const OUString &rValue) 
override;
-void sort_native_button_order();
 virtual boost::property_tree::ptree DumpAsPropertyTree() override;
 protected:
 virtual Size calculateRequisition() const override;
@@ -868,6 +871,9 @@ Size getLegacyBestSizeForChildren(const vcl::Window 
&rWindow);
 //Get first parent which is not a layout widget
 vcl::Window* getNonLayoutParent(vcl::Window *pParent);
 
+//Sort ok/cancel etc buttons in platform order
+void sort_native_button_order(VclBox& rContainer);
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 8e91050cc3a5..20f219154ee1 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -270,6 +270,8 @@ class VCL_DLLPUBLIC Box : virtual public Container
 public:
 // Moves child to a new position in the list of children
 virtual void reorder_child(weld::Widget* pWidget, int position) = 0;
+// Sort ok/cancel etc buttons in platform order
+virtual void sort_native_button_order() = 0;
 };
 
 class VCL_DLLPUBLIC ScrolledWindow : virtual public Container
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index deeb987ee806..c913d8ddfb00 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -495,7 +495,7 @@ 
ScCheckListMenuControl::ScCheckListMenuControl(ScCheckListMenuWindow* pParent, v
 
 // sort ok/cancel into native order, if this was a dialog they would be 
auto-sorted, but this
 // popup isn't a true dialog
-//mxButtonBox->sort_native_button_order();
+mxButtonBox->sort_native_button_order();
 
 if (!bIsSubMenu)
 {
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 12503e478646..af2f66ca9b0e 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1146,9 +1146,12 @@ std::unique_ptr 
SalInstanceWidget::weld_parent() const
 
 class SalInstanceBox : public SalInstanceContainer, public virtual weld::Box
 {
+private:
+VclPtr m_xBox;
 public:
-SalInstanceBox(vcl::Window* pContainer, SalInstanceBuilder* pBuilder, bool 
bTakeOwnership)
+SalInstanceBox(VclBox* pContainer, SalInstanceBuilder* pBuilder, bool 
bTakeOwnership)
 : SalInstanceContainer(pContainer, pBuilder, bTakeOwnership)
+, m_xBox(pContainer)
 {
 }
 virtual void reorder_child(weld::Widget* pWidget, int nNewPosition) 
override
@@ -1157,6 +1160,10 @@ public:
 assert(pVclWidget);
 pVclWidget->getWidget()->reorderWithinParent(nNewPosition);
 }
+virtual void sort_native_button_order() override
+{
+::sort_native_button_order(*m_xBox);
+}
 };
 
 namespace
@@ -1415,7 +1422,7 @@ bool 
SalInstanceDialog::runAsync(std::shared_ptr aOwner,
 aCtx.maEndDialogFn = rEndDialogFn;
 VclButtonBox* pActionArea = m_xDialog->get_action_area();
 if (pActionArea)
-pActionArea->sort_native_button_order();
+sort_native_button_order(*pActionArea);
 return m_xDialog->StartExecuteAsync(aCtx);
 }
 
@@ -1429,7 +1436,7 @@ bool SalInstanceDialog::runAsync(std::shared_ptr 
const & rxSelf, const s
 aCtx.maEndDialogFn = rEndDialogFn;
 VclButtonBox* pActionArea = m_xDialog->get_action_area();
 if (pActionArea)
-pActionArea->sort_native_button_order();
+sort_native_button_order(*pActionArea);
 return m_xDialog->StartExecuteAsync(aCtx);
 }
 
@@ -1506,7 +1513,7 @

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

2020-12-10 Thread László Németh (via logerrit)
 sw/qa/uitest/data/hiddenRow.ods  |binary
 sw/qa/uitest/data/tdf129083.odt  |binary
 sw/qa/uitest/table/sheetToTable.py   |  107 +++
 sw/source/uibase/dochdl/swdtflvr.cxx |   15 +++-
 4 files changed, 119 insertions(+), 3 deletions(-)

New commits:
commit e7065337630d414bd17e626155fa4e9fc5a2e29d
Author: László Németh 
AuthorDate: Wed Dec 9 20:38:40 2020 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 10 14:09:39 2020 +0100

tdf#138688 tdf#124646 sw: fix crash at pasting Calc data

.. in a table before a numbered paragraph. Dispatcher
calls of the workaround for tdf#124646 missed the temporary
table in this case, selecting + copying nothing and after
that trying to paste the same non-native Calc data again,
resulting infinite recursion.

Replacing FN_CHAR_LEFT with FN_LINE_UP solved the
problem (FN_CHAR_LEFT selected the numbers of the
numbered list instead of the temporary table).
Fixing the fragile dispatcher calls, now we check
the selection of the temporary table to avoid similar
crashes.

Unit tests are added for the fix, also for the
original problem of tdf#124646 (avoid copying
hidden rows from Calc, e.g. copying only visible
result of a filtering).

Regression from commit 0c3ac02d8a3c7ea50ae262daf134c28df5c8b343
(tdf#124646 Don't paste hidden rows of Calc sheets into Writer tables).

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

$ (cd sw && make -srj8 UITest_sw_table 
UITEST_TEST_NAME="sheetToTable.sheetToTable.test_tdf138688" 
SAL_USE_VCLPLUGIN=gen)

adding

import time
time.sleep(5)

to the called function of sheetToTable.py)

Change-Id: I7b90af8219d6fd00b75d91f7c92fff5744373cc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107508
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 7720f8cf22718415adb3db2304916581f864f884)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107484
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/uitest/data/hiddenRow.ods b/sw/qa/uitest/data/hiddenRow.ods
new file mode 100644
index ..8b5d98a182fb
Binary files /dev/null and b/sw/qa/uitest/data/hiddenRow.ods differ
diff --git a/sw/qa/uitest/data/tdf129083.odt b/sw/qa/uitest/data/tdf129083.odt
new file mode 100644
index ..3de65273e8a1
Binary files /dev/null and b/sw/qa/uitest/data/tdf129083.odt differ
diff --git a/sw/qa/uitest/table/sheetToTable.py 
b/sw/qa/uitest/table/sheetToTable.py
new file mode 100644
index ..d14529d4af9e
--- /dev/null
+++ b/sw/qa/uitest/table/sheetToTable.py
@@ -0,0 +1,107 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.calc import enter_text_to_cell
+import org.libreoffice.unotest
+import pathlib
+
+def get_url_for_data_file(file_name):
+return 
pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+
+#Calc sheet to Writer table
+
+class sheetToTable(UITestCase):
+def test_sheet_to_table_without_hidden_rows(self):
+calc_doc = 
self.ui_test.load_file(get_url_for_data_file("hiddenRow.ods"))
+xCalcDoc = self.xUITest.getTopFocusWindow()
+self.xUITest.executeCommand(".uno:SelectAll")
+self.xUITest.executeCommand(".uno:Copy")
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+self.ui_test.close_doc()
+writer_doc = 
self.ui_test.load_file(get_url_for_data_file("tableToText.odt"))
+document = self.ui_test.get_component()
+xWriterDoc = self.xUITest.getTopFocusWindow()
+self.xUITest.executeCommand(".uno:Paste")
+#verify (don't copy hidden cells)
+self.assertEqual(document.TextTables.getCount(), 1)
+table = document.getTextTables()[0]
+# This was 3 (copied hidden row)
+self.assertEqual(len(table.getRows()), 2)
+self.assertEqual(table.getCellByName("A1").getString(), "1")
+# This was "2 (hidden)" (copied hidden row)
+self.assertEqual(table.getCellByName("A2").getString(), "3")
+self.ui_test.close_doc()
+
+def test_tdf138688(self):
+calc_doc = 
self.ui_test.load_file(get_url_for_data_file("hiddenRow.ods"))
+xCalcDoc = self.xUITest.getTopFocusWindow()
+self.xUITest.executeCommand(".uno:SelectAll")
+self.xUITest.executeCo

[Libreoffice-commits] core.git: sal/osl

2020-12-10 Thread Samuel Mehrbrodt (via logerrit)
 sal/osl/w32/socket.cxx |   40 
 1 file changed, 8 insertions(+), 32 deletions(-)

New commits:
commit afc41a467fdfabb2cd0879be3e4f1879a1d1dc91
Author: Samuel Mehrbrodt 
AuthorDate: Thu Dec 10 09:31:29 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Dec 10 14:21:15 2020 +0100

Do not call GetAddrInfoW if we just want the hostname

Calling 'gethostname' already gives us the current host name on Windows.
For some reason, if that name does not contain a dot, GetAddrInfoW is
called, which "provides protocol-independent translation from a Unicode
host name to an address".

So all this function does, is returning an address for a hostname,
while we still only need the hostname and not the address.

This causes a lag when creating the lockfile on opening a document
if the network is flaky/disabled.
See tdf#97931 and tdf#47179 for some problems caused by this.

Change-Id: I0c543ea12c23506b2daa50da40bae1a471f6fe16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107513
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index f1c46e8f2568..ba96cc5ed838 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -613,39 +613,15 @@ oslSocketResult SAL_CALL osl_getLocalHostname 
(rtl_uString **strLocalHostname)
 char Host[256]= "";
 if (gethostname(Host, sizeof(Host)) == 0)
 {
-/* check if we have an FQDN; if not, try to determine it via 
dns first: */
-if (strchr(Host, '.') == nullptr)
+OUString u;
+if (rtl_convertStringToUString(
+&u.pData, Host, strlen(Host), 
osl_getThreadTextEncoding(),
+(RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
+| RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
+| RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR))
+&& o3tl::make_unsigned(u.getLength()) < 
SAL_N_ELEMENTS(LocalHostname))
 {
-oslHostAddr pAddr;
-rtl_uString *hostName= nullptr;
-
-rtl_string2UString(
-&hostName, Host, strlen(Host),
-RTL_TEXTENCODING_UTF8, OUSTRING_TO_OSTRING_CVTFLAGS);
-OSL_ASSERT(hostName != nullptr);
-
-pAddr = osl_createHostAddrByName(hostName);
-rtl_uString_release (hostName);
-
-if (pAddr && pAddr->pHostName)
-memcpy(LocalHostname, pAddr->pHostName->buffer, 
sizeof(sal_Unicode)*(rtl_ustr_getLength(pAddr->pHostName->buffer)+1));
-else
-memset(LocalHostname, 0, sizeof(LocalHostname));
-
-osl_destroyHostAddr (pAddr);
-}
-if (LocalHostname[0] == u'\0')
-{
-OUString u;
-if (rtl_convertStringToUString(
-&u.pData, Host, strlen(Host), 
osl_getThreadTextEncoding(),
-(RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
- | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
- | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR))
-&& o3tl::make_unsigned(u.getLength()) < 
SAL_N_ELEMENTS(LocalHostname))
-{
-memcpy(LocalHostname, u.getStr(), (u.getLength() + 1) 
* sizeof (sal_Unicode));
-}
+memcpy(LocalHostname, u.getStr(), (u.getLength() + 1) * 
sizeof (sal_Unicode));
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Seth Chaiklin (via logerrit)
 sw/uiconfig/swriter/menubar/menubar.xml |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 141aacaea300177797949890af616cb6648f7282
Author: Seth Chaiklin 
AuthorDate: Thu Dec 10 12:26:34 2020 +0100
Commit: Seth Chaiklin 
CommitDate: Thu Dec 10 15:01:35 2020 +0100

tdf#138621 put icons back in File>Template submenu

Change-Id: I3f1a28d12e559ae34f992d1856557593cd0c01d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107488
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/sw/uiconfig/swriter/menubar/menubar.xml 
b/sw/uiconfig/swriter/menubar/menubar.xml
index 6f479f65bf24..f743086572a4 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -28,10 +28,10 @@
   
   
   
-  
-  
+  
+  
   
-  
+  
   
   
   
___
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' - sal/rtl

2020-12-10 Thread Eike Rathke (via logerrit)
 sal/rtl/math.cxx |   78 +++
 1 file changed, 78 insertions(+)

New commits:
commit 4c2c161018165b7484233547fea1511c84b3ffe3
Author: Eike Rathke 
AuthorDate: Fri Nov 27 17:38:46 2020 +0100
Commit: Michael Stahl 
CommitDate: Thu Dec 10 15:21:06 2020 +0100

Resolves: tdf#136272 convert DBL_MAX to 1.7976931348623157e+308

 This is a combination of 4 commits.

Resolves: tdf#136272 convert DBL_MAX to 1.7976931348623157e+308

... and the 4 subsequent nextafters to appropriate strings.

An interim workaround to not write the out-of-range string
1.79769313486232e+308 until we have a proper rounding.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106717
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
(cherry picked from commit 4713c19e2b79341dc27e66d4c6449497db1e73d8)

Consistently use RTL_CONSTASCII_LENGTH(), tdf#136272 follow-up

The mix with SAL_N_ELEMENTS() was confusing and even wrong in one
case.

Ife73342b0efc01ed4e76e217d372fc32500c9b2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106764
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 1a0f9a9c56e7b7952b813b3efd34f9be6c853957)

Fix comment

I2ae6e3cadc0f182c4798e5d33b0c7f07fbcbbff6
(cherry picked from commit b8404ae521a9c2d183d4e076a7884627ba353e4b)

Typo in rounded digit string, tdf#138360 follow-up

Ic436d3e9f0c93cb36c5e4377519f2aeb6b7fbd5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107034
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit d8e0b1c81ffa16be8aae2231bcd3c02e8c01cf88)

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

diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index 9c32cff30f2f..bd9d2c8a601f 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -274,6 +274,84 @@ void doubleToString(typename T::String ** pResult,
 return;
 }
 
+// Unfortunately the old rounding below writes 1.79769313486232e+308 for
+// DBL_MAX and 4 subsequent nextafter(...,0).
+static const double fB1 = std::nextafter( DBL_MAX, 0);
+static const double fB2 = std::nextafter( fB1, 0);
+static const double fB3 = std::nextafter( fB2, 0);
+static const double fB4 = std::nextafter( fB3, 0);
+if ((fValue >= fB4) && eFormat != rtl_math_StringFormat_F)
+{
+// 1.7976931348623157e+308 instead of rounded 1.79769313486232e+308
+// that can't be converted back as out of range. For rounded values if
+// they exceed range they should not be written to exchange strings or
+// file formats.
+
+// Writing pDig up to decimals(-1,-2) then appending one digit from
+// pRou xor one or two digits from pSlot[].
+constexpr char pDig[] = "7976931348623157";
+constexpr char pRou[] = "8087931359623267"; // the only up-carry 
is 80
+static_assert(SAL_N_ELEMENTS(pDig) == SAL_N_ELEMENTS(pRou), "digit 
count mismatch");
+constexpr sal_Int32 nDig2 = RTL_CONSTASCII_LENGTH(pRou) - 2;
+sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH(pRou) + 8;  // + "-1.E+308"
+const char pSlot[5][2][3] =
+{ // rounded, not
+"67", "57", // DBL_MAX
+"65", "55",
+"53", "53",
+"51", "51",
+"59", "49",
+};
+
+if (!pResultCapacity)
+{
+pResultCapacity = &nCapacity;
+T::createBuffer(pResult, pResultCapacity);
+nResultOffset = 0;
+}
+
+if (bSign)
+T::appendAscii(pResult, pResultCapacity, &nResultOffset,
+   RTL_CONSTASCII_STRINGPARAM("-"));
+
+nDecPlaces = std::clamp( nDecPlaces, 0, 
RTL_CONSTASCII_LENGTH(pRou));
+if (nDecPlaces == 0)
+{
+T::appendAscii(pResult, pResultCapacity, &nResultOffset,
+   RTL_CONSTASCII_STRINGPARAM("2"));
+}
+else
+{
+T::appendAscii(pResult, pResultCapacity, &nResultOffset,
+   RTL_CONSTASCII_STRINGPARAM("1"));
+T::appendChars(pResult, pResultCapacity, &nResultOffset, 
&cDecSeparator, 1);
+if (nDecPlaces <= 2)
+{
+T::appendAscii(pResult, pResultCapacity, &nResultOffset, pRou, 
nDecPlaces);
+}
+else if (nDecPlaces <= nDig2)
+{
+T::appendAscii(pResult, pResultCapacity, &nResultOffset, pDig, 
nDecPlaces - 1);
+T::appendAscii(pResult, pResultCapacity, &nResultOffset, pRou 
+ nDecPlaces - 1, 1);
+}
+else
+{
+const sal_Int32 nDec = nDecPlaces - nDig2;
+nDecPlaces -= nDec;
+   

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

2020-12-10 Thread Caolán McNamara (via logerrit)
 sd/source/ui/view/sdview3.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit f9b1ce7a2afeb5d26fb7901eedc40212269156dd
Author: Caolán McNamara 
AuthorDate: Wed Dec 9 09:49:40 2020 +
Commit: Michael Stahl 
CommitDate: Thu Dec 10 15:22:54 2020 +0100

passed_freed_arg: InsertObjectAtView returns false if pObj was deleted

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

diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index c4ae7621a60c..cc856512ae21 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -995,12 +995,13 @@ bool View::InsertData( const TransferableDataHelper& 
rDataHelper,
 nOptions |= SdrInsertFlags::DONTMARK;
 }
 
-InsertObjectAtView( pObj, *pPV, nOptions );
+// bInserted of false means that pObj has been deleted
+bool bInserted = InsertObjectAtView( pObj, *pPV, nOptions 
);
 
-if( pImageMap )
+if (bInserted && pImageMap)
 pObj->AppendUserData( 
std::unique_ptr(new SvxIMapInfo( *pImageMap )) );
 
-if (pObj->IsChart())
+if (bInserted && pObj->IsChart())
 {
 bool bDisableDataTableDialog = false;
 svt::EmbeddedObjectRef::TryRunningState( xObj );
___
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-12-10 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/dochdl/swdtflvr.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 5a98daf9f6e6bec4ccaead5df256f8f1cd9c1b15
Author: Caolán McNamara 
AuthorDate: Wed Dec 9 09:11:58 2020 +
Commit: Michael Stahl 
CommitDate: Thu Dec 10 15:23:43 2020 +0100

uninit_member

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

diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index b4e91dcec5f0..27ac5dbbef58 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -244,7 +244,9 @@ SwTransferable::SwTransferable( SwWrtShell& rSh )
 : m_pWrtShell( &rSh ),
 m_pCreatorView( nullptr ),
 m_pOrigGraphic( nullptr ),
-m_eBufferType( TransferBufferType::NONE )
+m_eBufferType( TransferBufferType::NONE ),
+m_bOldIdle(false),
+m_bCleanUp(false)
 {
 rSh.GetView().AddTransferable(*this);
 SwDocShell* pDShell = rSh.GetDoc()->GetDocShell();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - odk/CustomTarget_unowinreg.mk

2020-12-10 Thread Rene Engelhard (via logerrit)
 odk/CustomTarget_unowinreg.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 328988babda60300fd854a116ceca742a4bd79ca
Author: Rene Engelhard 
AuthorDate: Sat Dec 5 10:47:36 2020 +0100
Commit: Michael Stahl 
CommitDate: Thu Dec 10 15:25:09 2020 +0100

use -static-libgcc for unowinreg.dll

to fix

"
For another, at least the unowinreg.dll resulting from 
--enable-build-unowinreg
on Fedora 33 would have had a dependency on libgcc_s_dw2-1.dll that would
generally not have been available in a target Windows environment.
"

mentioned in 01241113947fc7bd7f7b765dd897bb023c8ca99

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

diff --git a/odk/CustomTarget_unowinreg.mk b/odk/CustomTarget_unowinreg.mk
index 3a46ddfd6860..a847e1d6bb38 100644
--- a/odk/CustomTarget_unowinreg.mk
+++ b/odk/CustomTarget_unowinreg.mk
@@ -19,7 +19,7 @@ $(call 
gb_CustomTarget_get_workdir,odk/unowinreg)/unowinreg.dll : \
$(if $(filter FREEBSD,$(OS)),-I$(JAVA_HOME)/include/freebsd \
-I$(JAVA_HOME)/include/bsd -I$(JAVA_HOME)/include/linux,\
$(if $(filter NETBSD,$(OS)),-I$(JAVA_HOME)/include/netbsd))) \
-   -shared -o $@ $< \
+   -shared -static-libgcc -o $@ $< \
-Wl,--kill-at -lkernel32 -ladvapi32 && \
$(MINGWSTRIP) $@
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Seth Chaiklin (via logerrit)
 source/text/shared/optionen/01040301.xhp |   34 ---
 1 file changed, 34 deletions(-)

New commits:
commit c9f02245818790a55c64b9dc66da43cdbb20af6a
Author: Seth Chaiklin 
AuthorDate: Thu Dec 10 15:04:51 2020 +0100
Commit: Ilmari Lauhakangas 
CommitDate: Thu Dec 10 15:25:33 2020 +0100

Resolves: tdf#107229  remove unreferenced file

shared/optionen/01040301.xhp was created to embed the entire
shared/optionen/standard_template.xhp so that it could be
used as a link to shared/optionen/01040300.xhp

Maybe it made sense at the time it was done, but now it
is easier to make the link in shared/optionen/01040300.xhp
to point directly to shared/optionen/standard_template.xhp,
so this file is no longer referenced by others, and its
content came entirely from shared/optionen/standard_template.xhp.
So now being deleted because it longer has any purpose.

Change-Id: I1d356930c98c17020e768d272e8560fdf066b456
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107535
Reviewed-by: Seth Chaiklin 
Reviewed-by: Ilmari Lauhakangas 
Tested-by: Jenkins

diff --git a/source/text/shared/optionen/01040301.xhp 
b/source/text/shared/optionen/01040301.xhp
deleted file mode 100644
index 634f796fa..0
--- a/source/text/shared/optionen/01040301.xhp
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-Change default template
-/text/shared/optionen/01040301.xhp
-
-
-Sun Microsystems, Inc.
-
-
-
-  Change default template
-  
- 
-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2020-12-10 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e4f602d4ffb4c4981fb7fd666f8908f94a4aecf1
Author: Seth Chaiklin 
AuthorDate: Thu Dec 10 15:25:33 2020 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Dec 10 15:25:33 2020 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to c9f02245818790a55c64b9dc66da43cdbb20af6a
  - Resolves: tdf#107229  remove unreferenced file

shared/optionen/01040301.xhp was created to embed the entire
shared/optionen/standard_template.xhp so that it could be
used as a link to shared/optionen/01040300.xhp

Maybe it made sense at the time it was done, but now it
is easier to make the link in shared/optionen/01040300.xhp
to point directly to shared/optionen/standard_template.xhp,
so this file is no longer referenced by others, and its
content came entirely from shared/optionen/standard_template.xhp.
So now being deleted because it longer has any purpose.

Change-Id: I1d356930c98c17020e768d272e8560fdf066b456
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107535
Reviewed-by: Seth Chaiklin 
Reviewed-by: Ilmari Lauhakangas 
Tested-by: Jenkins

diff --git a/helpcontent2 b/helpcontent2
index 1f5e7cbaf41f..c9f022458187 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 1f5e7cbaf41f21b72713814f1517be23f933258d
+Subproject commit c9f02245818790a55c64b9dc66da43cdbb20af6a
___
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' - solenv/bin

2020-12-10 Thread Tor Lillqvist (via logerrit)
 solenv/bin/macosx-codesign-app-bundle |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 992c1de725dd7590f63044ce2f1c5337fd271d9a
Author: Tor Lillqvist 
AuthorDate: Fri Nov 20 01:02:02 2020 +0200
Commit: Michael Stahl 
CommitDate: Thu Dec 10 15:25:59 2020 +0100

Check first if there is such a "bin" directory before attempting to use it

In the test-install target in Makefile.in we remove the "bin" folder
of the LibreOfficePython framework.

Change-Id: Idf3d440c4f9465f21b5dcae60d4fc5ac21965dd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106284
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106398
Tested-by: Jenkins
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107251
Reviewed-by: Michael Stahl 

diff --git a/solenv/bin/macosx-codesign-app-bundle 
b/solenv/bin/macosx-codesign-app-bundle
index 2353032e3a8a..8aa725745327 100755
--- a/solenv/bin/macosx-codesign-app-bundle
+++ b/solenv/bin/macosx-codesign-app-bundle
@@ -99,10 +99,12 @@ while read framework; do
 if test ! -L "$version" -a -d "$version"; then
# Assume the framework has a XML (and not binary) Info.plist
id=`grep -A 1 'CFBundleIdentifier' 
$version/Resources/Info.plist | tail -1 | sed -e 's,.*,,' -e 
's,.*,,'`
-# files in bin are not covered by signing the framework...
-for scriptorexecutable in $(find $version/bin/ -type f); do
-codesign --verbose --options=runtime --force --identifier=$id 
--sign "$MACOSX_CODESIGNING_IDENTITY" "$scriptorexecutable" >> 
"/tmp/codesign_${fn}.log" 2>&1
-done
+   if test -d $version/bin; then
+   # files in bin are not covered by signing the framework...
+   for scriptorexecutable in $(find $version/bin/ -type f); do
+   codesign --verbose --options=runtime --force 
--identifier=$id --sign "$MACOSX_CODESIGNING_IDENTITY" "$scriptorexecutable" >> 
"/tmp/codesign_${fn}.log" 2>&1
+   done
+   fi
 codesign --verbose --force --identifier=$id --sign 
"$MACOSX_CODESIGNING_IDENTITY" "$version" >> "/tmp/codesign_${fn}.log" 2>&1
if [ "$?" != "0" ] ; then
exit 1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Miklos Vajna (via logerrit)
 oox/qa/unit/data/table-shadow.pptx  |binary
 oox/qa/unit/drawingml.cxx   |   19 +++
 oox/source/drawingml/table/tablecontext.cxx |5 +
 3 files changed, 24 insertions(+)

New commits:
commit b273e82aaa916b0f6198097dc32740faced73741
Author: Miklos Vajna 
AuthorDate: Thu Dec 10 13:57:58 2020 +0100
Commit: Miklos Vajna 
CommitDate: Thu Dec 10 15:27:09 2020 +0100

tdf#129961 oox: add PPTX import for table shadow as direct format

PPTX export and ODP filter is still missing.

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

diff --git a/oox/qa/unit/data/table-shadow.pptx 
b/oox/qa/unit/data/table-shadow.pptx
new file mode 100644
index ..3247404cbc48
Binary files /dev/null and b/oox/qa/unit/data/table-shadow.pptx differ
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index 0dd0f0991154..d666b3d332a7 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -291,6 +291,25 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testCameraRotationRevolution)
 CPPUNIT_ASSERT_EQUAL(static_cast(27000), nRotateAngle1);
 }
 
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow)
+{
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"table-shadow.pptx";
+load(aURL);
+uno::Reference 
xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+uno::Reference xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+bool bShadow = false;
+CPPUNIT_ASSERT(xShape->getPropertyValue("Shadow") >>= bShadow);
+
+// Without the accompanying fix in place, this test would have failed, 
because shadow on a table
+// was lost on import.
+CPPUNIT_ASSERT(bShadow);
+sal_Int32 nColor = 0;
+CPPUNIT_ASSERT(xShape->getPropertyValue("ShadowColor") >>= nColor);
+CPPUNIT_ASSERT_EQUAL(static_cast(0xff), nColor);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablecontext.cxx 
b/oox/source/drawingml/table/tablecontext.cxx
index bbfc94845369..84e80dccd710 100644
--- a/oox/source/drawingml/table/tablecontext.cxx
+++ b/oox/source/drawingml/table/tablecontext.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -66,6 +67,10 @@ TableContext::onCreateContext( ::sal_Int32 aElementToken, 
const AttributeList& r
 rTableStyle = std::make_shared();
 return new TableStyleContext( *this, rAttribs, *rTableStyle );
 }
+case A_TOKEN( effectLst ):  // CT_EffectList
+{
+return new EffectPropertiesContext(*this, 
mpShapePtr->getEffectProperties());
+}
 case A_TOKEN( tableStyleId ):   // ST_Guid
 return new oox::drawingml::GuidContext( *this, 
mrTableProperties.getStyleId() );
 
___
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' - configure.ac Makefile.in

2020-12-10 Thread Tor Lillqvist (via logerrit)
 Makefile.in  |2 +-
 configure.ac |6 ++
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit cce4ed9dbb9c6189b07795213aa8731baf22cd2f
Author: Tor Lillqvist 
AuthorDate: Thu Nov 19 22:04:21 2020 +0200
Commit: Michael Stahl 
CommitDate: Thu Dec 10 15:29:16 2020 +0100

Allow --enable-macosx-sandbox without the codesigning identities

For cases where you just want "make test-install" to construct an app
bundle that you will manipulate and then sign separately.

Change-Id: Iad805618f74ec783ebc013a664f928511b388383
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106185
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106260
Tested-by: Jenkins
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107252
Reviewed-by: Michael Stahl 

diff --git a/Makefile.in b/Makefile.in
index 6af416b8a2f9..cc08afb4a5e8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -348,7 +348,6 @@ ifeq ($(OS_FOR_BUILD),WNT)
cd $(SRCDIR)/instsetoo_native && $(MAKE) LIBO_TEST_INSTALL=TRUE 
$(GMAKE_OPTIONS)
 else
@$(SRCDIR)/solenv/bin/ooinstall $(TESTINSTALLDIR)
-ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
 #
 # Create Resources/*.lproj directories for languages supported by macOS
set -x; for lang in ca cs da de el en es fi fr hr hu id it ja ko ms nl 
no pl pt pt_PT ro ru sk sv th tr uk vi zh_CN zh_TW; do \
@@ -377,6 +376,7 @@ ifneq ($(ENABLE_MACOSX_SANDBOX),)
rm 
$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unoinfo
 endif
 #
+ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
 # Then use the macosx-codesign-app-bundle script
@$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle 
$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app
 endif
diff --git a/configure.ac b/configure.ac
index 8006a535baad..b5c6c049b406 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3094,11 +3094,9 @@ if test $_os = Darwin; then
 
 AC_MSG_CHECKING([whether to sandbox the application])
 
-if test -z "$MACOSX_CODESIGNING_IDENTITY" -a "$enable_macosx_sandbox" = 
yes; then
-AC_MSG_ERROR([macOS sandboxing requires code signing])
-elif test -n "$ENABLE_JAVA" -a "$enable_macosx_sandbox" = yes; then
+if test -n "$ENABLE_JAVA" -a "$enable_macosx_sandbox" = yes; then
 AC_MSG_ERROR([macOS sandboxing (actually App Store rules) disallows 
use of Java])
-elif test -n "$MACOSX_CODESIGNING_IDENTITY" -a "$enable_macosx_sandbox" = 
yes; then
+elif test "$enable_macosx_sandbox" = yes; then
 ENABLE_MACOSX_SANDBOX=TRUE
 AC_DEFINE(HAVE_FEATURE_MACOSX_SANDBOX)
 AC_MSG_RESULT([yes])
___
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-12-10 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtksalmenu.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 9700c6ecc6a488247b5c504577d3599ac54d497e
Author: Caolán McNamara 
AuthorDate: Wed Dec 9 09:36:00 2020 +
Commit: Michael Stahl 
CommitDate: Thu Dec 10 15:35:03 2020 +0100

unref pSubMenuModel at the end of the scope

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

diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
index 262187f16658..6e47e4eae91a 100644
--- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
@@ -325,7 +325,7 @@ void GtkSalMenu::ImplUpdate(bool bRecurse, bool 
bRemoveDisabledEntries)
 pSubMenuModel = g_lo_menu_get_submenu_from_item_in_section( 
pLOMenu, nSection, nItemPos );
 }
 
-g_object_unref( pSubMenuModel );
+assert(pSubMenuModel);
 
 if (bRecurse || bNonMenuChangedToMenu)
 {
@@ -334,6 +334,8 @@ void GtkSalMenu::ImplUpdate(bool bRecurse, bool 
bRemoveDisabledEntries)
 pSubmenu->SetActionGroup( G_ACTION_GROUP( pActionGroup ) );
 pSubmenu->ImplUpdate(true, bRemoveDisabledEntries);
 }
+
+g_object_unref( pSubMenuModel );
 }
 
 g_free( aNativeCommand );
___
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/qa sw/source

2020-12-10 Thread László Németh (via logerrit)
 sw/qa/uitest/table/sheetToTable.py   |  107 +++
 sw/qa/uitest/writer_tests/data/hiddenRow.ods |binary
 sw/qa/uitest/writer_tests/data/tdf129083.odt |binary
 sw/source/uibase/dochdl/swdtflvr.cxx |   15 +++
 4 files changed, 119 insertions(+), 3 deletions(-)

New commits:
commit c8d335f9bfa6a6fd0887171e2b51035dcbb42078
Author: László Németh 
AuthorDate: Wed Dec 9 20:38:40 2020 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 10 15:35:46 2020 +0100

tdf#138688 tdf#124646 sw: fix crash at pasting Calc data

.. in a table before a numbered paragraph. Dispatcher
calls of the workaround for tdf#124646 missed the temporary
table in this case, selecting + copying nothing and after
that trying to paste the same non-native Calc data again,
resulting infinite recursion.

Replacing FN_CHAR_LEFT with FN_LINE_UP solved the
problem (FN_CHAR_LEFT selected the numbers of the
numbered list instead of the temporary table).
Fixing the fragile dispatcher calls, now we check
the selection of the temporary table to avoid similar
crashes.

Unit tests are added for the fix, also for the
original problem of tdf#124646 (avoid copying
hidden rows from Calc, e.g. copying only visible
result of a filtering).

Regression from commit 0c3ac02d8a3c7ea50ae262daf134c28df5c8b343
(tdf#124646 Don't paste hidden rows of Calc sheets into Writer tables).

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

$ (cd sw && make -srj8 UITest_sw_table 
UITEST_TEST_NAME="sheetToTable.sheetToTable.test_tdf138688" 
SAL_USE_VCLPLUGIN=gen)

adding

import time
time.sleep(5)

to the called function of sheetToTable.py)

Change-Id: I7b90af8219d6fd00b75d91f7c92fff5744373cc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107508
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 7720f8cf22718415adb3db2304916581f864f884)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107487
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/uitest/table/sheetToTable.py 
b/sw/qa/uitest/table/sheetToTable.py
new file mode 100644
index ..d14529d4af9e
--- /dev/null
+++ b/sw/qa/uitest/table/sheetToTable.py
@@ -0,0 +1,107 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.calc import enter_text_to_cell
+import org.libreoffice.unotest
+import pathlib
+
+def get_url_for_data_file(file_name):
+return 
pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+
+#Calc sheet to Writer table
+
+class sheetToTable(UITestCase):
+def test_sheet_to_table_without_hidden_rows(self):
+calc_doc = 
self.ui_test.load_file(get_url_for_data_file("hiddenRow.ods"))
+xCalcDoc = self.xUITest.getTopFocusWindow()
+self.xUITest.executeCommand(".uno:SelectAll")
+self.xUITest.executeCommand(".uno:Copy")
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+self.ui_test.close_doc()
+writer_doc = 
self.ui_test.load_file(get_url_for_data_file("tableToText.odt"))
+document = self.ui_test.get_component()
+xWriterDoc = self.xUITest.getTopFocusWindow()
+self.xUITest.executeCommand(".uno:Paste")
+#verify (don't copy hidden cells)
+self.assertEqual(document.TextTables.getCount(), 1)
+table = document.getTextTables()[0]
+# This was 3 (copied hidden row)
+self.assertEqual(len(table.getRows()), 2)
+self.assertEqual(table.getCellByName("A1").getString(), "1")
+# This was "2 (hidden)" (copied hidden row)
+self.assertEqual(table.getCellByName("A2").getString(), "3")
+self.ui_test.close_doc()
+
+def test_tdf138688(self):
+calc_doc = 
self.ui_test.load_file(get_url_for_data_file("hiddenRow.ods"))
+xCalcDoc = self.xUITest.getTopFocusWindow()
+self.xUITest.executeCommand(".uno:SelectAll")
+self.xUITest.executeCommand(".uno:Copy")
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+self.ui_test.close_doc()
+writer_doc = 
self.ui_test.load_file(get_url_for_data_file("tableToText.odt"))
+document = self.ui_test.get_component()
+xWriterDoc = self.xUITest.getTopFocusWindow()
+
+# set numbering in the

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

2020-12-10 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/a11y/gtk3atkaction.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d4d320365cc84b45d6a39826a0d4a69360b8c7f7
Author: Caolán McNamara 
AuthorDate: Wed Dec 9 09:10:34 2020 +
Commit: Michael Stahl 
CommitDate: Thu Dec 10 15:36:53 2020 +0100

leaked_storage

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

diff --git a/vcl/unx/gtk3/a11y/gtk3atkaction.cxx 
b/vcl/unx/gtk3/a11y/gtk3atkaction.cxx
index fa9d096606e6..7d3313aa4066 100644
--- a/vcl/unx/gtk3/a11y/gtk3atkaction.cxx
+++ b/vcl/unx/gtk3/a11y/gtk3atkaction.cxx
@@ -208,7 +208,7 @@ appendKeyStrokes(OStringBuffer& rBuffer, const 
uno::Sequence< awt::KeyStroke >&
 {
 // The KeyCode approach did not work, probably a non ascii 
character
 // let's hope that there is a character given in KeyChar.
-rBuffer.append( OUStringToGChar( OUString( rKeyStroke.KeyChar 
) ) );
+rBuffer.append(OUStringToOString(OUString(rKeyStroke.KeyChar), 
RTL_TEXTENCODING_UTF8));
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Seth Chaiklin (via logerrit)
 source/text/scalc/01/12120100.xhp |   17 +
 1 file changed, 13 insertions(+), 4 deletions(-)

New commits:
commit 9512494c315aee4af46fa9a9eca0e4be0210e3cd
Author: Seth Chaiklin 
AuthorDate: Tue Dec 8 00:42:25 2020 +0100
Commit: Seth Chaiklin 
CommitDate: Thu Dec 10 15:49:47 2020 +0100

tdf#138301,tdf#130738 add "Custom" condition in Data>Validity-Criteria help

+ add Custom and explanation to list of Allow conditions
* correction to condition:  "Whole Number" --> "Whole Numbers"
* update two , one 

Change-Id: I1a6034af51c8dc5afe5a44a0043e26556cf94f8f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107374
Reviewed-by: Mike Kaganski 
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/source/text/scalc/01/12120100.xhp 
b/source/text/scalc/01/12120100.xhp
index d1a00e600..c08a97563 100644
--- a/source/text/scalc/01/12120100.xhp
+++ b/source/text/scalc/01/12120100.xhp
@@ -63,7 +63,7 @@
 
 
 
-Whole 
number
+Whole 
numbers
 
 
 Only whole 
numbers corresponding to the condition.
@@ -117,18 +117,27 @@
 Entries 
whose length corresponds to the condition.
 
 
+
+
+Custom
+
+
+Only allow values 
that result in the formula entered in the Formula box to return 
TRUE, when the formula is calculated with the entered value. 
The formula can be any expression that evaluates to a boolean value of 
TRUE or FALSE, or returns a numerical 
value, where a nonzero value is interpreted as TRUE and 
0 is interpreted as FALSE.
+Formulas can use 
relative referencing. For example, if cells A1:A4 were 
selected and ISODD(A1) is entered into the Formula 
box, then only odd numbers could be entered into cells A1 
through A4.
+
+
 
 
 
 Allow blank cells
 In conjunction with 
Tools - Detective - Mark invalid Data, this defines that blank 
cells are shown as invalid data (disabled) or not (enabled).
 
-Show 
selection list
+Show selection list
 Shows a list of all 
valid strings or values to select from. The list can also be opened by 
selecting the cell and pressing Command+DCtrl+D.
 
-Sort 
entries ascending
+Sort entries ascending
 Sorts the selection 
list in ascending order and filters duplicates from the list. If not checked, 
the order from the data source is taken.
-Source
+Source
 Enter the cell range that 
contains the valid values or text.
 
 Entries
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2020-12-10 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cc4446c87b02f93b2125a5fb3e4d4a301150a177
Author: Seth Chaiklin 
AuthorDate: Thu Dec 10 15:49:47 2020 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Dec 10 15:49:47 2020 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 9512494c315aee4af46fa9a9eca0e4be0210e3cd
  - tdf#138301,tdf#130738 add "Custom" condition in Data>Validity-Criteria 
help

+ add Custom and explanation to list of Allow conditions
* correction to condition:  "Whole Number" --> "Whole Numbers"
* update two , one 

Change-Id: I1a6034af51c8dc5afe5a44a0043e26556cf94f8f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107374
Reviewed-by: Mike Kaganski 
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/helpcontent2 b/helpcontent2
index c9f022458187..9512494c315a 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit c9f02245818790a55c64b9dc66da43cdbb20af6a
+Subproject commit 9512494c315aee4af46fa9a9eca0e4be0210e3cd
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/docvw/AnnotationWin2.cxx |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit c3175687ed793c6a99eaf17a2e3e48b5d7891be7
Author: Caolán McNamara 
AuthorDate: Thu Dec 10 13:14:18 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 15:50:29 2020 +0100

fix printing of 'margins in comment'

mangled since...

commit c200aa27ee4a0f5a89af6e970c2c22580029eded
Author: Caolán McNamara 
Date:   Thu May 21 15:54:15 2020 +0100

remove Size arg from Window::Draw and depend on GetSizePixel

which was a real monday-morning commit that bizarrely dropped drawing
of the date/resolved widgets entirely and failed to notice that
the PixelToLogic call in SwPostItMgr::DrawNotesForPage was originally
called on the input pPostIt, not the output pDev

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

diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 4b1e7c70836c..4e17e799e46d 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -273,7 +273,7 @@ void SwAnnotationWin::SetCursorLogicPosition(const Point& 
rPosition, bool bPoint
 
 void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags 
nInFlags)
 {
-Size aSz = pDev->PixelToLogic(GetSizePixel());
+Size aSz = PixelToLogic(GetSizePixel());
 
 if (mpMetadataAuthor->IsVisible() )
 {
@@ -300,6 +300,7 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& 
rPt, DrawFlags nInFl
 aPos += rPt;
 vcl::Font aFont( 
mpMetadataDate->GetSettings().GetStyleSettings().GetLabelFont() );
 mpMetadataDate->SetControlFont( aFont );
+mpMetadataDate->Draw(pDev, aPos, nInFlags);
 mpMetadataDate->SetControlFont( aOrigFont );
 }
 
@@ -310,13 +311,11 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const 
Point& rPt, DrawFlags nInFl
 aPos += rPt;
 vcl::Font aFont( 
mpMetadataResolved->GetSettings().GetStyleSettings().GetLabelFont() );
 mpMetadataResolved->SetControlFont( aFont );
+mpMetadataResolved->Draw(pDev, aPos, nInFlags);
 mpMetadataResolved->SetControlFont( aOrigFont );
 }
 
-Size aOrigSize(mpSidebarTextControl->GetSizePixel());
-mpSidebarTextControl->SetSizePixel(aSz);
 mpSidebarTextControl->Draw(pDev, rPt, nInFlags);
-mpSidebarTextControl->SetSizePixel(aOrigSize);
 
 const drawinglayer::geometry::ViewInformation2D aNewViewInfos;
 std::unique_ptr pProcessor(
@@ -332,6 +331,8 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& 
rPt, DrawFlags nInFl
 if (!mpVScrollbar->IsVisible())
 return;
 
+// if there is a scrollbar shown, draw "..." to indicate the comment isn't
+// completely shown
 vcl::Font aOrigFont(mpMetadataDate->GetControlFont());
 Color aOrigBg( mpMetadataDate->GetControlBackground() );
 OUString sOrigText(mpMetadataDate->GetText());
@@ -343,7 +344,7 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& 
rPt, DrawFlags nInFl
 mpMetadataDate->SetControlFont( aFont );
 mpMetadataDate->SetControlBackground( Color(0xFF) );
 mpMetadataDate->SetText("...");
-aOrigSize = mpMetadataDate->GetSizePixel();
+Size aOrigSize = mpMetadataDate->GetSizePixel();
 mpMetadataDate->SetSizePixel(mpMenuButton->GetSizePixel());
 mpMetadataDate->Draw(pDev, aPos, nInFlags);
 mpMetadataDate->SetSizePixel(aOrigSize);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Tor Lillqvist (via logerrit)
 sw/source/uibase/inc/navipi.hxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 64877d48a34930aadf2acb22366ec29b326d517e
Author: Tor Lillqvist 
AuthorDate: Thu Dec 10 13:51:48 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Dec 10 16:12:51 2020 +0100

Drop obviously unnecessary forward declaration

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

diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index 37eaac2bb9af..c78a50ffd629 100644
--- a/sw/source/uibase/inc/navipi.hxx
+++ b/sw/source/uibase/inc/navipi.hxx
@@ -31,7 +31,6 @@
 #include 
 
 class SwWrtShell;
-class SwNavigationPI;
 class SwNavigationChild;
 class SfxBindings;
 class SwNavigationConfig;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Tor Lillqvist (via logerrit)
 sw/source/uibase/inc/navipi.hxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 65b1152f5cc67067b66945d8bb2db009a3cb554e
Author: Tor Lillqvist 
AuthorDate: Thu Dec 10 14:09:04 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Dec 10 16:13:10 2020 +0100

Drop pointless forward declaration

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

diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index c78a50ffd629..960624531cb0 100644
--- a/sw/source/uibase/inc/navipi.hxx
+++ b/sw/source/uibase/inc/navipi.hxx
@@ -36,7 +36,6 @@ class SfxBindings;
 class SwNavigationConfig;
 class SwView;
 class SfxObjectShellLock;
-class SfxChildWindowContext;
 enum class RegionMode;
 class SpinField;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: idl/source sal/osl sal/qa sal/rtl test/source tools/source vcl/headless vcl/qt5 vcl/unx

2020-12-10 Thread Stephan Bergmann (via logerrit)
 idl/source/prj/command.cxx   |3 ++-
 sal/osl/w32/socket.cxx   |6 +-
 sal/qa/osl/file/osl_File.cxx |4 ++--
 sal/rtl/strtmpl.cxx  |   10 ++
 test/source/screenshot_test.cxx  |4 +++-
 tools/source/xml/XmlWalker.cxx   |3 ++-
 vcl/headless/svpprn.cxx  |4 +++-
 vcl/qt5/Qt5Instance_Print.cxx|5 -
 vcl/unx/generic/dtrans/X11_selection.cxx |4 +++-
 9 files changed, 34 insertions(+), 9 deletions(-)

New commits:
commit 4f0c70fb5554325e0cc2129741175bf07de22029
Author: Stephan Bergmann 
AuthorDate: Tue Dec 8 16:38:44 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 10 16:27:35 2020 +0100

Avoid calling OString ctor with null pointer

...in preparation of potential future changes from using OString to using
std::string_view, where OString has an undocumented feature of allowing
construction from a null pointer.

This is mostly the result of a manual audit of potentially problematic 
getenv
calls across the code base.  But there can be other problematic places too, 
like
the xmlGetProp call in tools/source/xml/XmlWalker.cxx.  To identify those,
rtl_{string,uString}_newFromStr aborts now in non-production debug builds 
when a
null pointer is passed(and all places that hit with a full `make check
screenshot` have been addressed here).  Once we are confident that all
problematic places have been identified, we should drop support for the
undocumented feature (see the TODO in sal/rtl/strtmpl.cxx).

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

diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index 35f6e6c28e87..29b01d11219a 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -277,7 +277,8 @@ SvCommand::SvCommand( int argc, char ** argv )
 
 aList.clear();
 
-OString aInc(getenv("INCLUDE"));
+auto const env = getenv("INCLUDE");
+OString aInc(env == nullptr ? "" : env);
 // append include environment variable
 if( aInc.getLength() )
 {
diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index ba96cc5ed838..9e819beaa61f 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -512,7 +512,11 @@ oslHostAddr SAL_CALL osl_createHostAddrByName(rtl_uString 
*strHostname)
 {
 pRet = static_cast(
 rtl_allocateZeroMemory(sizeof(struct oslHostAddrImpl)));
-rtl_uString_newFromStr(&pRet->pHostName, 
o3tl::toU(pIter->ai_canonname));
+if (pIter->ai_canonname == nullptr) {
+rtl_uString_new(&pRet->pHostName);
+} else {
+rtl_uString_newFromStr(&pRet->pHostName, 
o3tl::toU(pIter->ai_canonname));
+}
 pRet->pSockAddr = createSocketAddr();
 memcpy(& pRet->pSockAddr->m_sockaddr,
pIter->ai_addr, pIter->ai_addrlen);
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 42c7a18a4f11..23b5398ac65a 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -931,7 +931,7 @@ namespace osl_FileBase
 OString sURL("file://~/tmp");
 char* home_path;
 home_path = getenv("HOME");
-OString expResult(home_path);
+OString expResult(home_path ? home_path : "");
 expResult += "/tmp";
 checkUNXBehaviour_getSystemPathFromFileURL(sURL, 
osl::FileBase::E_None, expResult);
 #endif
@@ -1009,7 +1009,7 @@ namespace osl_FileBase
 OString sSysPath("~/tmp");
 char* home_path;
 home_path = getenv("HOME");
-OString expResult(home_path);
+OString expResult(home_path ? home_path : "");
 expResult = "file://"+ expResult + "/tmp";
 checkUNXBehaviour_getFileURLFromSystemPath(sSysPath, 
osl::FileBase::E_None, expResult);
 checkWNTBehaviour_getFileURLFromSystemPath(sSysPath, 
osl::FileBase::E_None, "~/tmp");
diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx
index bf58db0ba037..2292321f747b 100644
--- a/sal/rtl/strtmpl.cxx
+++ b/sal/rtl/strtmpl.cxx
@@ -24,6 +24,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -1324,6 +1325,15 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newFromStr )( 
IMPL_RTL_STRINGDATA** ppThis,
 IMPL_RTL_STRINGDATA*pOrg;
 sal_Int32   nLen;
 
+#if OSL_DEBUG_LEVEL > 0
+//TODO: For now, only abort in non-production debug builds; once all 
places that rely on the
+// undocumented newFromStr behavior of treating a null pCharStr like an 
empty string have been
+// found and fixed, drop support for that behavior and turn this into a 
general assert:
+if (pCharStr == nullptr) {
+std::abort();
+}

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 2 commits - sc/uiconfig vcl/source

2020-12-10 Thread Szymon Kłos (via logerrit)
 sc/uiconfig/scalc/ui/notebookbar.ui |   82 
 vcl/source/window/dialog.cxx|6 ++
 2 files changed, 88 insertions(+)

New commits:
commit 9d3b73d47bb17378f57b18c8dd4a94ce61571c7b
Author: Szymon Kłos 
AuthorDate: Thu Dec 10 14:39:58 2020 +0100
Commit: Szymon Kłos 
CommitDate: Thu Dec 10 16:33:49 2020 +0100

notebookbar: add named ranges management

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

diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui 
b/sc/uiconfig/scalc/ui/notebookbar.ui
index fbdd66c61761..462a00788298 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -8366,6 +8366,88 @@
 14
   
 
+
+  
+True
+False
+center
+True
+
+  
+True
+False
+center
+True
+vertical
+
+  
+True
+True
+center
+True
+both-horiz
+False
+
+  
+True
+False
+.uno:AddName
+  
+  
+False
+True
+  
+
+  
+  
+False
+False
+0
+  
+
+
+  
+True
+True
+center
+True
+both-horiz
+False
+
+  
+True
+False
+.uno:DefineName
+  
+  
+False
+True
+  
+
+  
+  
+False
+False
+1
+  
+
+  
+  
+False
+True
+2
+  
+
+
+  
+
+  
+  
+False
+True
+14
+  
+
 
   
 True
commit 5c6a765b5091540b76659671935ea9434b2961dc
Author: Szymon Kłos 
AuthorDate: Thu Dec 10 15:35:53 2020 +0100
Commit: Szymon Kłos 
CommitDate: Thu Dec 10 16:33:41 2020 +0100

jsdialog: export dialog id

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

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index dadcc34718c8..df9135f43058 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1616,6 +1616,12 @@ boost::property_tree::ptree Dialog::DumpAsPropertyTree()
 if (!pActionArea->IsVisible())
 aTree.put("collapsed", "true");
 }
+
+OUString sDialogId = OStringToOUString(GetHelpId(), 
RTL_TEXTENCODING_ASCII_US);
+sal_Int32 nStartPos = sDialogId.lastIndexOf('/');
+nStartPos = nStartPos >= 0 ? nStartPos + 1 : 0;
+aTree.put("dialogid", sDialogId.copy(nStartPos));
+
 return aTree;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org

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

2020-12-10 Thread Stephan Bergmann (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx |   23 +++
 1 file changed, 11 insertions(+), 12 deletions(-)

New commits:
commit 23d64f31d8e68a237a9028238d1b1d0e7c894cc4
Author: Stephan Bergmann 
AuthorDate: Thu Dec 10 15:07:42 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 10 16:42:52 2020 +0100

One more OUString::fromUtf(u8"...") simplification

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index f1934775b1c1..0cfcb0c7a89f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -874,18 +874,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119143, "tdf119143.docx")
 // The runs inside  were ignored
 const OUString sParaText = getParagraph(1)->getString();
 CPPUNIT_ASSERT_EQUAL(
-OUString::fromUtf8(
-u8"عندما يريد العالم أن يتكلّم ‬ ، فهو يتحدّث "
-u8"بلغة "
-u8"يونيكود. تسجّل الآن لحضور المؤتمر الدولي العاشر "
-u8"ليونيكود (Unicode Conference)، الذي سيعقد في 10-12 "
-u8"آذار 1997 بمدينة مَايِنْتْس، ألمانيا. و سيجمع المؤتمر "
-u8"بين خبراء من كافة قطاعات الصناعة على الشبكة "
-u8"العالمية انترنيت ويونيكود، حيث ستتم، على الصعيدين "
-u8"الدولي والمحلي على حد سواء مناقشة سبل استخدام "
-u8"يونكود في النظم القائمة وفيما يخص التطبيقات "
-u8"الحاسوبية، الخطوط، تصميم النصوص والحوسبة متعددة "
-u8"اللغات."),
+OUString(u"عندما يريد العالم أن يتكلّم ‬ ، فهو يتحدّث "
+ u"بلغة "
+ u"يونيكود. تسجّل الآن لحضور المؤتمر الدولي العاشر "
+ u"ليونيكود (Unicode Conference)، الذي سيعقد في 10-12 "
+ u"آذار 1997 بمدينة مَايِنْتْس، ألمانيا. و سيجمع المؤتمر "
+ u"بين خبراء من كافة قطاعات الصناعة على الشبكة "
+ u"العالمية انترنيت ويونيكود، حيث ستتم، على الصعيدين "
+ u"الدولي والمحلي على حد سواء مناقشة سبل استخدام "
+ u"يونكود في النظم القائمة وفيما يخص التطبيقات "
+ u"الحاسوبية، الخطوط، تصميم النصوص والحوسبة متعددة "
+ u"اللغات."),
 sParaText);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: officecfg/registry

2020-12-10 Thread Samuel Mehrbrodt (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ac14ed9f26582701032a28cb424f2b6bf35ca7fd
Author: Samuel Mehrbrodt 
AuthorDate: Wed Dec 9 09:11:24 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Dec 10 16:50:42 2020 +0100

Don't show HiddenParagraphs by default

Showing them means that the layout is different from what is printed.
This probably shouldn't be the default.

The similiar HiddenCharacter is also false by default.

Change-Id: Id68408463ccbceab18b73ac78f24d1b4b4cbeaeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107385
Tested-by: Jenkins
Reviewed-by: Oliver Brinzing 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 84125017318f..c99841d3cbde 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -1203,7 +1203,7 @@
 Specifies whether hidden paragraphs are displayed on the 
screen.
 Hidden paragraphs
   
-  true
+  false
 
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


ESC meeting minutes: 2020-12-10

2020-12-10 Thread Stephan Bergmann

* Present:
   + Stephan, Eike, Cloph, Michael W, Heiko, Caolan, Sophie, Miklos, Xisco, 
Thorsten, Michael M

* Completed Action Items:
   + 


* Pending Action Items:
   + get GSoC 2021 application kicked off until end of year (Thorsten)

* Release Engineering update (Cloph)
   + 7.1 status
 + feature/UI freeze and rc1 next week
   + 7.0 status
 + 7.0.4 rc2 this week, tagged, builds are in progress
   + naming changes? (Heiko)
 + if there is a decision for a naming change, 7.1 can still have those 
changes (Cloph)
 + even if it’s in rc1, it won’t be working for translators, so not too 
important
 + or even the tag is not to be translated (Heiko)
  AI: watch the vote and restore the old change + adapt it as necessary 
(Heiko)
   + Remotes: Android, iOS
 + another version bump, with a fix for a runtime exception crash + tag
   + Android viewer

* Documentation (Olivier)
 + missing Olivier

* UX Update (Heiko)
   + Bugzilla (topicUI) statistics
   240(240) (topicUI) bugs open, 252(252) (needsUXEval) needs to be 
evaluated by the UXteam
   + Updates:
   BZ changes   1 week1 month3 months12 months  
added 18(-1) 29(-4)  53(-6) 164(-8) 
commented 90(-14)   302(-19)   1002(-45)   3865(-81)
  removed  1(0)   1(-1)   9(-1)  49(-5) 
 resolved 13(4)  52(3)  151(2)  462(1)  
   + top 10 contributors:

 Heiko Tietze made 193 changes in 1 month, and 2327 changes in 1 year
 Ilmari Lauhakangas made 61 changes in 1 month, and 275 changes in 1y
 Dieter Praas made 53 changes in 1 month, and 490 changes in 1 year
 Telesto made 48 changes in 1 month, and 617 changes in 1 year
 Foote, V Stuart made 39 changes in 1 month, and 644 changes in 1 year
 Kaganski, Mike made 19 changes in 1 month, and 146 changes in 1 year
 Roman Kuznetsov made 18 changes in 1 month, and 262 changes in 1 year
 Xisco Fauli made 17 changes in 1 month, and 438 changes in 1 year
 Ming Hua made 14 changes in 1 month, and 32 changes in 1 year
 Kevin Suo made 13 changes in 1 month, and 52 changes in 1 year

  + New tickets with needsUXEval Dec/03-10

-> + tdf#138628 ClearDirectFormatting does not remove page break
 + no change vs new config option, etc.
   + tdf#138640 Page break before/after terminology kind of confusing
   + tdf#138641 Page style should be next page style in the insert page dialog
   + tdf#138642 Manual break dialog says (next) page style set to none. 
Appears to incorrect, the page layout is always based on 
a page style

   + tdf#138658 UI: Confusing categorization of the 'Hidden' feature
-> + tdf#138668 Support image format avif
 + video format used by netflix?
   + not only, it’s “AV1 Image File Format”, see 
 https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF)

   + tdf#138676 FORMATTING - Background image in writer
   + tdf#138678 UI: Merge Format Edit Sections with Insert Section
   + tdf#138292 CHARACTER STYLES: Not possible to have two different styles
for internet link
   + tdf#134798 Experimental commands appear in Customize Dialog even 
though the experimental feature option is not selected

   + tdf#133783 FILEOPEN dialog does not show current working directory
   + tdf#138665 Visual artifact in expanded list
   + tdf#138233 Auto complete for search being counterproductive
(suggesting what I don't want to search)
   + tdf#138750 Add option to make paragraph border color same as 
paragraph default font color

   + tdf#138725 Duplicate function names in Writer's Customize Keyboard dialog
   + tdf#138767 Decoration/managing attributes for sections in editor
   + tdf#138748 Replace number format "Language" with "Locale"
   + tdf#138775 Hiding menubar is not permanent in Single or Standard T’bar UIs
   + tdf#138765 you should be able to set the size an image in Writer 
by changing its DPI

   + tdf#138758 Find and replace is too coupled between documents
   + tdf#138160 If sidebar tab is activated by an extension the minimal width 
of the tab is ignored


 +  New competition about templates started by Adfinis
+ https://adfinis.com/blog/libreoffice-template-contest-2020/
+ ran till the end of January
+ not only Impress, also Writer and Calc

* Crash Testing (Caolan)
   + 373(+361) import failure, 97(+96) export failures
 + Calc export failures, hopefully now fixed
   + 1 coverity issue
   + 13 ossfuzz issues, 2 oom, 11 timeouts

* Crash Reporting (Xisco)
   + https://crashreport.libreoffice.org/stats/version/6.4.7.2 
    + (-179) 1232 1411 1286 944 803 568 343 0 
   + https://crashreport.libreoffice.org/stats/version/7.0.2.2 
    + (-567) 1651 2218 2409 2750 3829 5339 5103 3457 0 
   + https://crashreport.libreoffice.org/stats/version/7.0.3.

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

2020-12-10 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/docvw/AnnotationWin2.cxx |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 47a5000822588b695f514866fd8cca48fb2d1ac3
Author: Caolán McNamara 
AuthorDate: Thu Dec 10 13:14:18 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 17:11:38 2020 +0100

fix printing of 'margins in comment'

mangled since...

commit c200aa27ee4a0f5a89af6e970c2c22580029eded
Author: Caolán McNamara 
Date:   Thu May 21 15:54:15 2020 +0100

remove Size arg from Window::Draw and depend on GetSizePixel

which was a real monday-morning commit that bizarrely dropped drawing
of the date/resolved widgets entirely and failed to notice that
the PixelToLogic call in SwPostItMgr::DrawNotesForPage was originally
called on the input pPostIt, not the output pDev

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

diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 4b1e7c70836c..4e17e799e46d 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -273,7 +273,7 @@ void SwAnnotationWin::SetCursorLogicPosition(const Point& 
rPosition, bool bPoint
 
 void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags 
nInFlags)
 {
-Size aSz = pDev->PixelToLogic(GetSizePixel());
+Size aSz = PixelToLogic(GetSizePixel());
 
 if (mpMetadataAuthor->IsVisible() )
 {
@@ -300,6 +300,7 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& 
rPt, DrawFlags nInFl
 aPos += rPt;
 vcl::Font aFont( 
mpMetadataDate->GetSettings().GetStyleSettings().GetLabelFont() );
 mpMetadataDate->SetControlFont( aFont );
+mpMetadataDate->Draw(pDev, aPos, nInFlags);
 mpMetadataDate->SetControlFont( aOrigFont );
 }
 
@@ -310,13 +311,11 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const 
Point& rPt, DrawFlags nInFl
 aPos += rPt;
 vcl::Font aFont( 
mpMetadataResolved->GetSettings().GetStyleSettings().GetLabelFont() );
 mpMetadataResolved->SetControlFont( aFont );
+mpMetadataResolved->Draw(pDev, aPos, nInFlags);
 mpMetadataResolved->SetControlFont( aOrigFont );
 }
 
-Size aOrigSize(mpSidebarTextControl->GetSizePixel());
-mpSidebarTextControl->SetSizePixel(aSz);
 mpSidebarTextControl->Draw(pDev, rPt, nInFlags);
-mpSidebarTextControl->SetSizePixel(aOrigSize);
 
 const drawinglayer::geometry::ViewInformation2D aNewViewInfos;
 std::unique_ptr pProcessor(
@@ -332,6 +331,8 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& 
rPt, DrawFlags nInFl
 if (!mpVScrollbar->IsVisible())
 return;
 
+// if there is a scrollbar shown, draw "..." to indicate the comment isn't
+// completely shown
 vcl::Font aOrigFont(mpMetadataDate->GetControlFont());
 Color aOrigBg( mpMetadataDate->GetControlBackground() );
 OUString sOrigText(mpMetadataDate->GetText());
@@ -343,7 +344,7 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& 
rPt, DrawFlags nInFl
 mpMetadataDate->SetControlFont( aFont );
 mpMetadataDate->SetControlBackground( Color(0xFF) );
 mpMetadataDate->SetText("...");
-aOrigSize = mpMetadataDate->GetSizePixel();
+Size aOrigSize = mpMetadataDate->GetSizePixel();
 mpMetadataDate->SetSizePixel(mpMenuButton->GetSizePixel());
 mpMetadataDate->Draw(pDev, aPos, nInFlags);
 mpMetadataDate->SetSizePixel(aOrigSize);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/docvw/AnnotationWin2.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 4a4f0f6daa2ce1f4b4a99cdc9b86f48df5d961ea
Author: Caolán McNamara 
AuthorDate: Thu Dec 10 15:08:54 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 17:25:53 2020 +0100

Don't leave an empty area at the bottom if we can move the text down

in writer's margin comment, which is what ScTextWnd does

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

diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 4e17e799e46d..edcdf448d7b8 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -935,7 +935,15 @@ void SwAnnotationWin::DoResize()
 {   // if we do not have a scrollbar anymore, we want to see the complete 
text
 mpOutlinerView->SetVisArea( PixelToLogic( 
tools::Rectangle(0,0,aWidth,aHeight) ) );
 }
-mpOutlinerView->SetOutputArea( PixelToLogic( 
tools::Rectangle(0,0,aWidth,aHeight) ) );
+tools::Rectangle aOutputArea = PixelToLogic(tools::Rectangle(0, 0, aWidth, 
aHeight));
+mpOutlinerView->SetOutputArea(aOutputArea);
+
+// Don't leave an empty area at the bottom if we can move the text down.
+tools::Long nMaxVisAreaTop = mpOutliner->GetTextHeight() - 
aOutputArea.GetHeight();
+if (mpOutlinerView->GetVisArea().Top() > nMaxVisAreaTop)
+{
+GetOutlinerView()->Scroll(0, mpOutlinerView->GetVisArea().Top() - 
nMaxVisAreaTop);
+}
 
 if (!AllSettings::GetLayoutRTL())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Tor Lillqvist (via logerrit)
 sw/source/uibase/utlui/content.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 5b021965837252f48184d8441f5e19a944e3b287
Author: Tor Lillqvist 
AuthorDate: Thu Dec 10 18:58:11 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Dec 10 18:59:32 2020 +0200

Add comments wondering what some magic numbers might mean

Change-Id: Iece65c9d96561abc0a97726cd4eb642317dc0f9c

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 57ed667d3f98..54b84ee935d9 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1177,6 +1177,9 @@ static bool lcl_InsertExpandCollapseAllItem(const 
weld::TreeView& rContentTree,
 
 static void lcl_SetOutlineContentEntriesSensitivities(SwContentTree* pThis, 
const weld::TreeView& rContentTree, const weld::TreeIter& rEntry, weld::Menu& 
rPop)
 {
+// If anybody knows what these magic numbers mean, please either
+// add a comment here, or replace them with some suitable symbolic
+// names that are defined somewhere else.
 rPop.set_sensitive(OString::number(1512), false);
 rPop.set_sensitive(OString::number(1513), false);
 rPop.set_sensitive(OString::number(1514), false);
@@ -1306,6 +1309,8 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, 
rCEvt, bool)
 std::unique_ptr xSubPopOutlineTracking = 
xBuilder->weld_menu("outlinetracking");
 
 std::unique_ptr xSubPopOutlineContent = 
xBuilder->weld_menu("outlinecontent");
+
+// More magic numbers, huh.
 xSubPopOutlineContent->append(OUString::number(1512), 
SwResId(STR_OUTLINE_CONTENT_VISIBILITY_TOGGLE));
 xSubPopOutlineContent->append(OUString::number(1513), 
SwResId(STR_OUTLINE_CONTENT_VISIBILITY_HIDE_ALL));
 xSubPopOutlineContent->append(OUString::number(1514), 
SwResId(STR_OUTLINE_CONTENT_VISIBILITY_SHOW_ALL));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Caolán McNamara (via logerrit)
 editeng/source/editeng/editview.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ae32ac87b223d6f90c460a83fa5073eb5d0f4706
Author: Caolán McNamara 
AuthorDate: Thu Dec 10 16:04:06 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 18:18:07 2020 +0100

don't need a vcl::Window for PixelToLogic

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

diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index 35965e1e276a..884817f415b6 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -868,7 +868,7 @@ bool EditView::IsCursorAtWrongSpelledWord()
 
 bool EditView::IsWrongSpelledWordAtPos( const Point& rPosPixel, bool 
bMarkIfWrong )
 {
-Point aPos ( pImpEditView->GetWindow()->PixelToLogic( rPosPixel ) );
+Point aPos(pImpEditView->GetOutputDevice().PixelToLogic(rPosPixel));
 aPos = pImpEditView->GetDocPos( aPos );
 EditPaM aPaM = pImpEditView->pEditEngine->GetPaM(aPos, false);
 return pImpEditView->IsWrongSpelledWord( aPaM , bMarkIfWrong );
@@ -911,7 +911,7 @@ static void LOKSendSpellPopupMenu(Menu* pMenu, LanguageType 
nGuessLangWord,
 
 void EditView::ExecuteSpellPopup( const Point& rPosPixel, 
Link const * pCallBack )
 {
-Point aPos ( pImpEditView->GetWindow()->PixelToLogic( rPosPixel ) );
+Point aPos(pImpEditView->GetOutputDevice().PixelToLogic(rPosPixel));
 aPos = pImpEditView->GetDocPos( aPos );
 EditPaM aPaM = pImpEditView->pEditEngine->GetPaM(aPos, false);
 Reference< linguistic2::XSpellChecker1 >  xSpeller( 
pImpEditView->pEditEngine->pImpEditEngine->GetSpeller() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: AllLangHelp_shared.mk

2020-12-10 Thread Ilmari Lauhakangas (via logerrit)
 AllLangHelp_shared.mk |1 -
 1 file changed, 1 deletion(-)

New commits:
commit a57c5901e98af74279502f6adbab65a3d101dd03
Author: Ilmari Lauhakangas 
AuthorDate: Thu Dec 10 19:23:47 2020 +0200
Commit: Ilmari Lauhakangas 
CommitDate: Thu Dec 10 18:27:28 2020 +0100

Update AllLangHelp_shared.mk after file removal

Change-Id: I78b49e10827e41df95eeacc1e7fe0fb19a9bc2d7
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107573
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas 

diff --git a/AllLangHelp_shared.mk b/AllLangHelp_shared.mk
index 888d70baf..51f3ec1c8 100644
--- a/AllLangHelp_shared.mk
+++ b/AllLangHelp_shared.mk
@@ -795,7 +795,6 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\
 helpcontent2/source/text/shared/optionen/0104 \
 helpcontent2/source/text/shared/optionen/01040200 \
 helpcontent2/source/text/shared/optionen/01040300 \
-helpcontent2/source/text/shared/optionen/01040301 \
 helpcontent2/source/text/shared/optionen/01040400 \
 helpcontent2/source/text/shared/optionen/01040500 \
 helpcontent2/source/text/shared/optionen/01040600 \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2020-12-10 Thread Ilmari Lauhakangas (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4f1a5c4622d983d40faceedabbd46d55d9f28286
Author: Ilmari Lauhakangas 
AuthorDate: Thu Dec 10 19:27:28 2020 +0200
Commit: Gerrit Code Review 
CommitDate: Thu Dec 10 18:27:28 2020 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to a57c5901e98af74279502f6adbab65a3d101dd03
  - Update AllLangHelp_shared.mk after file removal

Change-Id: I78b49e10827e41df95eeacc1e7fe0fb19a9bc2d7
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107573
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas 

diff --git a/helpcontent2 b/helpcontent2
index 9512494c315a..a57c5901e98a 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 9512494c315aee4af46fa9a9eca0e4be0210e3cd
+Subproject commit a57c5901e98af74279502f6adbab65a3d101dd03
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Luboš Luňák (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   14 ++
 vcl/inc/skia/utils.hxx |2 -
 vcl/skia/SkiaHelper.cxx|   17 +
 vcl/skia/gdiimpl.cxx   |2 -
 4 files changed, 28 insertions(+), 7 deletions(-)

New commits:
commit fae487b70adb95cdac5f2ae108d5c25580112147
Author: Luboš Luňák 
AuthorDate: Wed Dec 9 12:39:16 2020 +0100
Commit: Luboš Luňák 
CommitDate: Thu Dec 10 19:36:14 2020 +0100

make Skia image cache size configurable

As asked for in tdf#136244 comment #11. The default fits 4x 2000px
32bpp images, which is 64MiB, which is not that little, but then
4x 2000px is not that much either. So, yes, configurable ...

A good further improvement would be to make the cache grow more
if the memory is available and reduce the size on memory pressure

(https://lists.freedesktop.org/archives/libreoffice/2020-December/086404.html).

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

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 2f961f0532a2..de96a9477b37 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -1589,6 +1589,20 @@
   10
 
   
+  
+
+  Specifies a group of cache options related to Skia-based 
drawing.
+
+
+  
+Specifies the maximum cache size in bytes for all images 
used by Skia-based
+drawing code. Larger size may improve drawing performance when 
using
+many large images in software rendering mode.
+Image Cache Size
+  
+  6400
+
+  
 
 
   
diff --git a/vcl/inc/skia/utils.hxx b/vcl/inc/skia/utils.hxx
index 03e01d2e5d8b..7da858ab1fff 100644
--- a/vcl/inc/skia/utils.hxx
+++ b/vcl/inc/skia/utils.hxx
@@ -73,7 +73,7 @@ VCL_DLLPUBLIC void
 void addCachedImage(const OString& key, sk_sp image);
 sk_sp findCachedImage(const OString& key);
 void removeCachedImage(sk_sp image);
-constexpr int MAX_CACHE_SIZE = 4 * 2000 * 2000 * 4; // 4x 2000px 32bpp images, 
64MiB
+tools::Long maxImageCacheSize();
 
 // SkSurfaceProps to be used by all Skia surfaces.
 VCL_DLLPUBLIC const SkSurfaceProps* surfaceProps();
diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx
index b3aa5a1d1cbc..d545cc670bb5 100644
--- a/vcl/skia/SkiaHelper.cxx
+++ b/vcl/skia/SkiaHelper.cxx
@@ -485,7 +485,7 @@ struct ImageCacheItem
 {
 OString key;
 sk_sp image;
-int size; // cost of the item
+tools::Long size; // cost of the item
 };
 } //namespace
 
@@ -493,7 +493,7 @@ struct ImageCacheItem
 // to require a hash/map. Using o3tl::lru_cache would be simpler, but it 
doesn't support
 // calculating cost of each item.
 static std::list* imageCache = nullptr;
-static int imageCacheSize = 0; // sum of all ImageCacheItem.size
+static tools::Long imageCacheSize = 0; // sum of all ImageCacheItem.size
 
 void addCachedImage(const OString& key, sk_sp image)
 {
@@ -502,12 +502,13 @@ void addCachedImage(const OString& key, sk_sp 
image)
 return;
 if (imageCache == nullptr)
 imageCache = new std::list;
-int size = image->width() * image->height()
-   * SkColorTypeBytesPerPixel(image->imageInfo().colorType());
+tools::Long size = static_cast(image->width()) * 
image->height()
+   * 
SkColorTypeBytesPerPixel(image->imageInfo().colorType());
 imageCache->push_front({ key, image, size });
 imageCacheSize += size;
 SAL_INFO("vcl.skia.trace", "addcachedimage " << image << " :" << size << 
"/" << imageCacheSize);
-while (imageCacheSize > MAX_CACHE_SIZE)
+const tools::Long maxSize = maxImageCacheSize();
+while (imageCacheSize > maxSize)
 {
 assert(!imageCache->empty());
 imageCacheSize -= imageCache->back().size;
@@ -554,6 +555,12 @@ void removeCachedImage(sk_sp image)
 }
 }
 
+tools::Long maxImageCacheSize()
+{
+// Defaults to 4x 2000px 32bpp images, 64MiB.
+return officecfg::Office::Common::Cache::Skia::ImageCacheSize::get();
+}
+
 void cleanup()
 {
 delete sharedGrDirectContext;
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index ee2e72889152..773bdd2be1bf 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1574,7 +1574,7 @@ sk_sp 
SkiaSalGraphicsImpl::mergeCacheBitmaps(const SkiaSalBitmap& bitma
 }
 }
 // Do not cache the result if it would take most of the cache and thus get 
evicted soon.
-if (targetSize.Width() * targetSize.Height() * 4 > 
SkiaHelper::MAX_CACHE_SIZE * 0.7)
+if (targetSize.Width() * targetSize.Height() * 4 > 
Sk

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

2020-12-10 Thread Miklos Vajna (via logerrit)
 vcl/source/window/mouse.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8dd46a846fcdfd2b8cb81557b92c74e5e65e8d28
Author: Miklos Vajna 
AuthorDate: Wed Jan 29 21:06:35 2020 +0100
Commit: Michael Meeks 
CommitDate: Thu Dec 10 21:01:24 2020 +0100

vcl: fix UB in vcl::Cursor::ImplDoShow()

pWindow->mpWindowImpl can be nullptr here, see online.git's
unit-load-torture test:

vcl/source/window/cursor.cxx:204:54: runtime error: member access within 
null pointer of type 'WindowImpl'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior 
vcl/source/window/cursor.cxx:204:54 in

(And one more similar case in Window::ImplGrabFocus().)

Change-Id: Idd145082b58c10139be53e9b997efedeb0cec364
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87709
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
Signed-off-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107578
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 0aea5205fbb5..16993d199987 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -312,7 +312,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
 
 pSVData->mpWinData->mpFocusWin = this;
 
-if ( pOldFocusWindow )
+if ( pOldFocusWindow && pOldFocusWindow->mpWindowImpl )
 {
 // Cursor hidden
 if ( pOldFocusWindow->mpWindowImpl->mpCursor )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

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

New commits:
commit 7cef2f69f8553380e77ab0efab4018a010e3d9cd
Author: Xisco Fauli 
AuthorDate: Thu Dec 10 17:37:32 2020 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 10 21:28:37 2020 +0100

tdf#81226: sw_uiwriter: Add unittest

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

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index b699c2cd10ae..461b971afaf8 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -213,6 +213,7 @@ public:
 void testCreatePortions();
 void testBookmarkUndo();
 void testFdo85876();
+void testTdf81226();
 void testTdf79717();
 void testTdf137532();
 void testFdo87448();
@@ -444,6 +445,7 @@ public:
 CPPUNIT_TEST(testCreatePortions);
 CPPUNIT_TEST(testBookmarkUndo);
 CPPUNIT_TEST(testFdo85876);
+CPPUNIT_TEST(testTdf81226);
 CPPUNIT_TEST(testTdf79717);
 CPPUNIT_TEST(testTdf137532);
 CPPUNIT_TEST(testFdo87448);
@@ -2021,6 +2023,21 @@ void SwUiWriterTest::testFdo85876()
 }
 }
 
+void SwUiWriterTest::testTdf81226()
+{
+SwDoc* const pDoc = createDoc();
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+pWrtShell->Insert("before");
+pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 4, 
/*bBasicCall=*/false);
+pWrtShell->Down(false);
+pWrtShell->Insert("after");
+
+// Without the fix in place, this test would have failed with
+// - Expected: beforeafter
+// - Actual  : beafterfore
+CPPUNIT_ASSERT_EQUAL(OUString("beforeafter"), 
getParagraph(1)->getString());
+}
+
 void SwUiWriterTest::testTdf79717()
 {
 SwDoc* const pDoc = createDoc();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Caolán McNamara (via logerrit)
 include/editeng/editview.hxx |6 ++
 include/svx/weldeditview.hxx |2 ++
 2 files changed, 8 insertions(+)

New commits:
commit c913406274eb794115e6ce00abf8b01a098d2f37
Author: Caolán McNamara 
AuthorDate: Thu Dec 10 16:11:17 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 21:38:59 2020 +0100

add a way to provide a parent for a popup menu

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

diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index e89cd356be72..5552e05b1313 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -45,6 +45,7 @@ class OutlinerViewShell;
 class SvxSearchItem;
 class SvxFieldItem;
 namespace vcl { class Window; }
+namespace weld { class Widget; }
 class KeyEvent;
 class MouseEvent;
 class CommandEvent;
@@ -108,6 +109,11 @@ public:
 // return the OutputDevice that the EditView will draw to
 virtual OutputDevice& EditViewOutputDevice() const = 0;
 
+virtual weld::Widget* EditViewPopupParent() const
+{
+return nullptr;
+}
+
 // Triggered to update InputEngine context information
 virtual void EditViewInputContext(const InputContext& rInputContext) = 0;
 
diff --git a/include/svx/weldeditview.hxx b/include/svx/weldeditview.hxx
index 1b96c4954da9..930573f97856 100644
--- a/include/svx/weldeditview.hxx
+++ b/include/svx/weldeditview.hxx
@@ -89,6 +89,8 @@ protected:
 SetCursorRect(rRefDevice.LogicToPixel(rRect),
   rRefDevice.LogicToPixel(Size(nExtTextInputWidth, 
0)).Width());
 }
+
+virtual weld::Widget* EditViewPopupParent() const override { return 
GetDrawingArea(); }
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Caolán McNamara (via logerrit)
 vcl/unx/generic/printer/cupsmgr.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 605ee3213087b13782bfc0731762c175bc97e53f
Author: Caolán McNamara 
AuthorDate: Thu Dec 10 17:14:03 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 10 21:40:32 2020 +0100

cupsGetPPD returned a nullptr which OString newly aborts with

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

diff --git a/vcl/unx/generic/printer/cupsmgr.cxx 
b/vcl/unx/generic/printer/cupsmgr.cxx
index dbbb2ba5..7830323d22d7 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -90,7 +90,8 @@ struct GetPPDAttribs
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #endif
-OString aResult = cupsGetPPD(m_aParameter.getStr());
+const char* pResult = cupsGetPPD(m_aParameter.getStr());
+OString aResult = pResult ? OString(pResult) : OString();
 #ifdef __GNUC__
 #pragma GCC diagnostic pop
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Stephan Bergmann (via logerrit)
 include/rtl/string.hxx   |6 ++
 vcl/source/filter/ipdf/pdfread.cxx   |4 ++--
 writerfilter/source/rtftok/rtfdispatchsymbol.cxx |2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 9df9208b7d0fd9dd49c681c3c1b546d8ca402925
Author: Stephan Bergmann 
AuthorDate: Thu Dec 10 15:15:40 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 10 22:21:23 2020 +0100

Catch inadvertent uses of OString(char) ctor

...similar to cbe944e323edb20f958bb46ea644de659b75382e "Catch inadvertent 
uses
of OUString(sal_Unicode) ctor".  The existing few places did mean to use 
that
ctor after all, but this clean-up should come in handy when single-character
instances of OString are replaced with OStringChar, which already rejects 
non-
char arguments.

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

diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index 4d229fd86931..3c540198f95f 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -243,6 +243,12 @@ public:
 rtl_string_newFromStr_WithLength( &pData, &value, 1 );
 }
 
+#if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST_CONCAT
+// Catch inadvertent conversions to the above ctor (e.g., from 
sal_[u]Int8, aka [un]signed
+// char):
+OString(int) = delete;
+#endif
+
 /**
   New string from a character buffer array.
 
diff --git a/vcl/source/filter/ipdf/pdfread.cxx 
b/vcl/source/filter/ipdf/pdfread.cxx
index a36eacbfd41a..ef5d799fe4ee 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -54,8 +54,8 @@ bool isCompatible(SvStream& rInStream, sal_uInt64 nPos, 
sal_uInt64 nSize)
 || aFirstBytes[3] != 'F' || aFirstBytes[4] != '-')
 return false;
 
-sal_Int32 nMajor = OString(aFirstBytes[5]).toInt32();
-sal_Int32 nMinor = OString(aFirstBytes[7]).toInt32();
+sal_Int32 nMajor = OString(char(aFirstBytes[5])).toInt32();
+sal_Int32 nMinor = OString(char(aFirstBytes[7])).toInt32();
 return !(nMajor > 1 || (nMajor == 1 && nMinor > 6));
 }
 
diff --git a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx 
b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
index ff13dedcf5fa..418498f98df3 100644
--- a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
@@ -80,7 +80,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
 }
 if (cCh > 0)
 {
-OUString aStr(OStringToOUString(OString(cCh), 
RTL_TEXTENCODING_MS_1252));
+OUString aStr(OStringToOUString(OString(char(cCh)), 
RTL_TEXTENCODING_MS_1252));
 text(aStr);
 return RTFError::OK;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: About tdf#138715 and future of Thunderbird address book support

2020-12-10 Thread julien2412
Lionel Élie Mamane wrote
> ...
> I seem to remember there was some code done to add a native SQlite
> SDBC driver "somewhere" (but not merged), not sure where. Or was that
> only ever discussed and never coded?
> ...

Indeed, in master
connectivity/source/drivers contains these dirs:
ado
calc
component
dbase
evoab2
file
firebird
flat
hsqldb
jdbc
macab
mork
mozab
mysqlc
mysql_jdbc
odbc
postgresql
writer

so no sqlite too.

but I also searched a branch containing sqlite with:
https://gerrit.libreoffice.org/admin/repos/core,branches/q/filter:sqlite 
nothing.
Perhaps I used wrong filter.

Now even if there's some code waiting to be merged, it should be relevant to
put it in experimental mode so people may give a try to Sqlite native
connection.
In a second time (same time but still in experimental mode in this case?),
we need also the "plumbering" so TB address book driver uses Sqlite part.
Anyway, it could be the beginning of a solution but in mid future only (6
months/1 year or more), for the present situation, the current TB address
book driver is broken for TB >= 78.

Remark: not sure if it's useful to consider those who'll stay on TB < 78. I
mean we're talking about future LO 7.2.0 (except if we remove this part too
in branch 7.1).

Julien




--
Sent from: 
http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-12-10 Thread Aron Budea (via logerrit)
 sfx2/source/sidebar/SidebarController.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 7e5991dc695d1e590483615c2907811ce4117834
Author: Aron Budea 
AuthorDate: Wed Dec 9 18:39:54 2020 +0100
Commit: Aron Budea 
CommitDate: Thu Dec 10 23:40:04 2020 +0100

tdf#138762: crash when trying to open sidebar w chart in Writer

In Writer when in chart edit mode, and the chart is deselected,
the object selection remains. Opening Properties sidebar at
this point crashed. Calc and Impress were unaffected.

Regression from b5fdb148fe87a90f3e586efcea7aa6ef865fa42a

Change-Id: I356c3a42c41dd38e4739df27c72c6d67722b1dbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107500
Tested-by: Jenkins
Reviewed-by: Aron Budea 

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 231524d1af9b..2430641aa2d7 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -628,10 +628,13 @@ void SidebarController::OpenThenToggleDeck (
 SwitchToDeck(rsDeckId);
 
 // Make sure the sidebar is wide enough to fit the requested content
-sal_Int32 nRequestedWidth = (mpCurrentDeck->GetMinimalWidth() + 
TabBar::GetDefaultWidth())
-* mpTabBar->GetDPIScaleFactor();
-if (mnSavedSidebarWidth < nRequestedWidth)
-SetChildWindowWidth(nRequestedWidth);
+if (mpCurrentDeck && mpTabBar)
+{
+sal_Int32 nRequestedWidth = (mpCurrentDeck->GetMinimalWidth() + 
TabBar::GetDefaultWidth())
+* mpTabBar->GetDPIScaleFactor();
+if (mnSavedSidebarWidth < nRequestedWidth)
+SetChildWindowWidth(nRequestedWidth);
+}
 
 collectUIInformation(rsDeckId);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

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

New commits:
commit 61d07657caab5e0fb8ec4446f67a7044e14dae4b
Author: Xisco Fauli 
AuthorDate: Thu Dec 10 22:25:02 2020 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 10 23:42:43 2020 +0100

tdf#131990: sw_uiwriter: Add unittest

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

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 461b971afaf8..fec30772d5dd 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -248,6 +248,7 @@ public:
 void testTdf74363();
 void testTdf80663();
 void testTdf57197();
+void testTdf131990();
 void testTdf90808();
 void testTdf97601();
 void testTdf75137();
@@ -480,6 +481,7 @@ public:
 CPPUNIT_TEST(testTdf74363);
 CPPUNIT_TEST(testTdf80663);
 CPPUNIT_TEST(testTdf57197);
+CPPUNIT_TEST(testTdf131990);
 CPPUNIT_TEST(testTdf90808);
 CPPUNIT_TEST(testTdf97601);
 CPPUNIT_TEST(testTdf75137);
@@ -3817,6 +3819,15 @@ void SwUiWriterTest::testTdf57197()
 CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
 }
 
+void SwUiWriterTest::testTdf131990()
+{
+SwDoc* pDoc = createDoc();
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+CPPUNIT_ASSERT(!pWrtShell->Up( false, 1, true ));
+CPPUNIT_ASSERT(!pWrtShell->Down( false, 1, true ));
+}
+
 void SwUiWriterTest::testTdf90808()
 {
 createDoc();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


can nout build libre-core

2020-12-10 Thread Rosemarie Haberecht

Hi,


I want do build libre-core in cygwin.
I use  windows 10 64-bit (Microsoft Windows [Version 10.0.19042.685])

and the write in cygwin

/cygdrive/c/sources/libo-core/autogen.sh 
--with-external-tar=/cygdrive/c/sources/lo-externalsrc 
--with-junit=/cygdrive/c/sources/junit-4.10.jar 
--with-ant-home=/cygdrive/c/sources/apache-ant-1.9.5 --enable-pch 
--disable-ccache --disable-skia 
--with-jdk-home=/cygdrive/c/PROGRA~1/Java/jdk-14.0.2


after i had change the folder to  /cygdrive/c/build

But then I became an exception:

checking for active Antivirus software... not found
configure: setting up the build environment variables...
configure: creating ./config.status
.in'ig.status: error: cannot find input file: `config_host.mk
Error running configure at /cygdrive/c/sources/libo-core/autogen.sh line 
316.


When I show in the libre-core folder i can not find the config_host.mk, 
but my branch is uptodate. What can I do that I can build the libre-core 
project?



Thanks

Rose

--
mit besten Grüßen
Rosemarie Haberecht
mobileguides
(e-Mail) rhabere...@mobileguides.de
(Web) www.mobileguides.de
(UStId) DE 250536804

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


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

2020-12-10 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/docvw/AnnotationWin2.cxx |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 2e6ecdfec95ac18a197cf31a67455cd103b73198
Author: Caolán McNamara 
AuthorDate: Thu Dec 10 13:14:18 2020 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Dec 11 03:18:11 2020 +0100

fix printing of 'margins in comment'

mangled since...

commit c200aa27ee4a0f5a89af6e970c2c22580029eded
Author: Caolán McNamara 
Date:   Thu May 21 15:54:15 2020 +0100

remove Size arg from Window::Draw and depend on GetSizePixel

which was a real monday-morning commit that bizarrely dropped drawing
of the date/resolved widgets entirely and failed to notice that
the PixelToLogic call in SwPostItMgr::DrawNotesForPage was originally
called on the input pPostIt, not the output pDev

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

diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 9c3539f2e6d7..04c1f8332695 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -260,7 +260,7 @@ void SwAnnotationWin::SetCursorLogicPosition(const Point& 
rPosition, bool bPoint
 
 void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags 
nInFlags)
 {
-Size aSz = pDev->PixelToLogic(GetSizePixel());
+Size aSz = PixelToLogic(GetSizePixel());
 
 if (mpMetadataAuthor->IsVisible() )
 {
@@ -287,6 +287,7 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& 
rPt, DrawFlags nInFl
 aPos += rPt;
 vcl::Font aFont( 
mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() );
 mpMetadataDate->SetControlFont( aFont );
+mpMetadataDate->Draw(pDev, aPos, nInFlags);
 mpMetadataDate->SetControlFont( aOrigFont );
 }
 
@@ -297,13 +298,11 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const 
Point& rPt, DrawFlags nInFl
 aPos += rPt;
 vcl::Font aFont( 
mpMetadataResolved->GetSettings().GetStyleSettings().GetFieldFont() );
 mpMetadataResolved->SetControlFont( aFont );
+mpMetadataResolved->Draw(pDev, aPos, nInFlags);
 mpMetadataResolved->SetControlFont( aOrigFont );
 }
 
-Size aOrigSize(mpSidebarTextControl->GetSizePixel());
-mpSidebarTextControl->SetSizePixel(aSz);
 mpSidebarTextControl->Draw(pDev, rPt, nInFlags);
-mpSidebarTextControl->SetSizePixel(aOrigSize);
 
 const drawinglayer::geometry::ViewInformation2D aNewViewInfos;
 std::unique_ptr pProcessor(
@@ -319,6 +318,8 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& 
rPt, DrawFlags nInFl
 if (!mpVScrollbar->IsVisible())
 return;
 
+// if there is a scrollbar shown, draw "..." to indicate the comment isn't
+// completely shown
 vcl::Font aOrigFont(mpMetadataDate->GetControlFont());
 Color aOrigBg( mpMetadataDate->GetControlBackground() );
 OUString sOrigText(mpMetadataDate->GetText());
@@ -330,7 +331,7 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& 
rPt, DrawFlags nInFl
 mpMetadataDate->SetControlFont( aFont );
 mpMetadataDate->SetControlBackground( Color(0xFF) );
 mpMetadataDate->SetText("...");
-aOrigSize = mpMetadataDate->GetSizePixel();
+Size aOrigSize = mpMetadataDate->GetSizePixel();
 mpMetadataDate->SetSizePixel(mpMenuButton->GetSizePixel());
 mpMetadataDate->Draw(pDev, aPos, nInFlags);
 mpMetadataDate->SetSizePixel(aOrigSize);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Seth Chaiklin (via logerrit)
 sw/uiconfig/swriter/menubar/menubar.xml |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1c24e27eea98dbb2ea6cfb2a65361715957d61d5
Author: Seth Chaiklin 
AuthorDate: Thu Dec 10 12:26:34 2020 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Dec 11 03:20:23 2020 +0100

tdf#138621 put icons back in File>Template submenu

Change-Id: I3f1a28d12e559ae34f992d1856557593cd0c01d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107488
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins
(cherry picked from commit 141aacaea300177797949890af616cb6648f7282)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107539

diff --git a/sw/uiconfig/swriter/menubar/menubar.xml 
b/sw/uiconfig/swriter/menubar/menubar.xml
index 6b83059e213b..a88f1e7a727f 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -28,10 +28,10 @@
   
   
   
-  
-  
+  
+  
   
-  
+  
   
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sax/source starmath/source

2020-12-10 Thread dante (via logerrit)
 sax/source/fastparser/fastparser.cxx |   18 +-
 starmath/source/mathmlattr.hxx   |1 -
 starmath/source/mathmlimport.cxx |1 +
 3 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit b9ffc3591189c54885094fefe477241418f67996
Author: dante 
AuthorDate: Wed Dec 9 17:14:17 2020 +0100
Commit: Mike Kaganski 
CommitDate: Fri Dec 11 07:40:00 2020 +0100

FastParser.cxx changes

If custom entity list is empty, custon entities by unicode value have to 
keep working.

Succefully loaded:

http://www.w3.org/1998/Math/MathML"; display="block">
 
  σ
  ∞
  σ
  ∞
 


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

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index 04bf69a1705b..05288a4ef5f3 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -933,7 +933,6 @@ void FastSaxParserImpl::setNamespaceHandler( const 
Reference< XFastNamespaceHand
 maData.mxNamespaceHandler = Handler;
 }
 
-#include 
 void FastSaxParserImpl::setCustomEntityNames( const ::css::uno::Sequence< 
::rtl::OUString >& names, const ::css::uno::Sequence< ::rtl::OUString >& 
replacements )
 {
 mEntityNames = names;
@@ -1372,16 +1371,17 @@ xmlEntityPtr FastSaxParserImpl::callbackGetEntity( 
const xmlChar *name )
 int lname = strlen(dname);
 if( lname == 0 )
 return xmlGetPredefinedEntity(name);
-if( !mEntityNames.hasElements() )
-return xmlGetPredefinedEntity(name);
-for( size_t i = 0; i < mEntityNames.size(); ++i )
+if (mEntityNames.hasElements())
 {
-if( mEntityNames[i].compareToAscii(dname) == 0 )
+for (size_t i = 0; i < mEntityNames.size(); ++i)
 {
-return xmlNewEntity( nullptr,
-name,
-XML_INTERNAL_GENERAL_ENTITY, nullptr, nullptr,
-
BAD_CAST(OUStringToOString(mEntityReplacements[i],RTL_TEXTENCODING_UTF8).getStr()));
+if (mEntityNames[i].compareToAscii(dname) == 0)
+{
+return xmlNewEntity(
+nullptr, name, XML_INTERNAL_GENERAL_ENTITY, nullptr, 
nullptr,
+BAD_CAST(
+OUStringToOString(mEntityReplacements[i], 
RTL_TEXTENCODING_UTF8).getStr()));
+}
 }
 }
 if( lname < 2 )
diff --git a/starmath/source/mathmlattr.hxx b/starmath/source/mathmlattr.hxx
index fba6f3bc4195..104495d2c878 100644
--- a/starmath/source/mathmlattr.hxx
+++ b/starmath/source/mathmlattr.hxx
@@ -13,7 +13,6 @@
 #include 
 #include 
 #include 
-#include "xparsmlbase.hxx"
 
 // MathML 3: 2.1.5.1 Syntax notation used in the MathML specification
 // 
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index c06d0043dee7..e68184660850 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -63,6 +63,7 @@ one go*/
 #include 
 
 #include "mathmlattr.hxx"
+#include "xparsmlbase.hxx"
 #include "mathmlimport.hxx"
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Miklos Vajna (via logerrit)
 include/vcl/filter/PDFiumLibrary.hxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 8831c7d8e01abec8d3b150ee6edbe04eeba9b393
Author: Miklos Vajna 
AuthorDate: Thu Dec 10 21:05:34 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Dec 11 08:05:22 2020 +0100

pdfium: remove unused PDFiumPathSegment::getPointer()

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

diff --git a/include/vcl/filter/PDFiumLibrary.hxx 
b/include/vcl/filter/PDFiumLibrary.hxx
index 1c0ccf581343..2acdecac763b 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -131,7 +131,6 @@ public:
 PDFiumPathSegment(FPDF_PATHSEGMENT pPathSegment);
 ~PDFiumPathSegment();
 
-FPDF_PATHSEGMENT getPointer() const { return mpPathSegment; }
 basegfx::B2DPoint getPoint() const;
 bool isClosed() const;
 PDFSegmentType getType() const;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Miklos Vajna (via logerrit)
 include/svx/sdmetitm.hxx   |2 +
 include/svx/sdooitm.hxx|2 +
 include/svx/sdprcitm.hxx   |2 +
 include/svx/xcolit.hxx |1 
 svx/source/svdraw/svdattr.cxx  |   54 +
 svx/source/xoutdev/xattr.cxx   |   16 
 sw/qa/extras/layout/layout.cxx |   12 ++---
 7 files changed, 85 insertions(+), 4 deletions(-)

New commits:
commit 3728f19f1abc949dc0ff6cc627c6dbff9c667cfa
Author: Miklos Vajna 
AuthorDate: Mon Nov 30 17:44:35 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Dec 11 08:05:47 2020 +0100

tdf#129961 svx: add doc model xml dump for shadow-related pool items

It seems that sdr::table::SdrTableObj is already capable of storing
shadow properties, but this is not easy to inspect, extend the xml
dumper to improve the situation.

Change-Id: Ideef43dfd6b844e0227632ec2cb6ab5d16171d8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106902
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit a7505356872f981c951b2ec64383a95538890876)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107563

diff --git a/include/svx/sdmetitm.hxx b/include/svx/sdmetitm.hxx
index 0e7e3a7897b4..8819c5e2a2b4 100644
--- a/include/svx/sdmetitm.hxx
+++ b/include/svx/sdmetitm.hxx
@@ -38,6 +38,8 @@ public:
  MapUnit eCoreMetric,
  MapUnit ePresMetric,
  OUString& rText, const IntlWrapper&) const 
override;
+
+virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
 
diff --git a/include/svx/sdooitm.hxx b/include/svx/sdooitm.hxx
index a0e7cfe570e5..2cc2fce42738 100644
--- a/include/svx/sdooitm.hxx
+++ b/include/svx/sdooitm.hxx
@@ -35,6 +35,8 @@ public:
 virtual OUString GetValueTextByVal(bool bVal) const override;
 
 virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit 
eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const 
override;
+
+virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
 
diff --git a/include/svx/sdprcitm.hxx b/include/svx/sdprcitm.hxx
index af5cb65d852d..0316c4d0e452 100644
--- a/include/svx/sdprcitm.hxx
+++ b/include/svx/sdprcitm.hxx
@@ -35,6 +35,8 @@ public:
 virtual SdrPercentItem* Clone(SfxItemPool* pPool=nullptr) const override;
 
 virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit 
eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const 
override;
+
+virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
 
diff --git a/include/svx/xcolit.hxx b/include/svx/xcolit.hxx
index 12788d6fa901..9f35416b56ae 100644
--- a/include/svx/xcolit.hxx
+++ b/include/svx/xcolit.hxx
@@ -50,6 +50,7 @@ public:
 
 const Color&GetColorValue() const;
 voidSetColorValue(const Color& rNew) { aColor = rNew; 
Detach(); }
+virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
 #endif
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 2e007ea7d513..28bbfe39afce 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -730,6 +730,18 @@ bool SdrOnOffItem::GetPresentation(SfxItemPresentation 
ePres,
 return true;
 }
 
+void SdrOnOffItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+xmlTextWriterStartElement(pWriter, BAD_CAST("SdrOnOffItem"));
+if (Which() == SDRATTR_SHADOW)
+{
+xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), 
BAD_CAST("SDRATTR_SHADOW"));
+}
+
+SfxBoolItem::dumpAsXml(pWriter);
+
+xmlTextWriterEndElement(pWriter);
+}
 
 SdrYesNoItem* SdrYesNoItem::Clone(SfxItemPool* /*pPool*/) const
 {
@@ -773,6 +785,20 @@ bool SdrPercentItem::GetPresentation(
 return true;
 }
 
+void SdrPercentItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+xmlTextWriterStartElement(pWriter, BAD_CAST("SdrPercentItem"));
+if (Which() == SDRATTR_SHADOWTRANSPARENCE)
+{
+xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"),
+BAD_CAST("SDRATTR_SHADOWTRANSPARENCE"));
+}
+
+SfxUInt16Item::dumpAsXml(pWriter);
+
+xmlTextWriterEndElement(pWriter);
+}
+
 SdrAngleItem* SdrAngleItem::Clone(SfxItemPool* /*pPool*/) const
 {
 return new SdrAngleItem(Which(),GetValue());
@@ -872,6 +898,34 @@ bool SdrMetricItem::GetPresentation(SfxItemPresentation 
ePres,
 return true;
 }
 
+void SdrMetricItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+xmlTextWriterStartElement(pWriter, BAD_CAST("SdrMetricItem"));
+if (Which() == SDRATTR_SHADOWXDIST)
+{
+xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), 
BAD_CAST("SDRATTR_SHADOWXDIST"));
+}
+else if (Which() == SDRATTR_SHADOWYDIST)
+{
+xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), 
BAD_CAST("SDRATTR_SHADOWYDIST"));
+}
+else if (Which() == SDRA

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - oox/inc oox/source solenv/clang-format

2020-12-10 Thread Miklos Vajna (via logerrit)
 oox/inc/drawingml/effectpropertiescontext.hxx|5 +
 oox/source/drawingml/effectpropertiescontext.cxx |2 +-
 oox/source/drawingml/shapepropertiescontext.cxx  |2 +-
 oox/source/drawingml/themeelementscontext.cxx|2 +-
 solenv/clang-format/excludelist  |2 +-
 5 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 148f3e96d4d0c5376d50a93386b1a6411574e29d
Author: Miklos Vajna 
AuthorDate: Fri Nov 27 16:58:38 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Dec 11 08:06:10 2020 +0100

oox: make effectpropertiescontext available to everyone in oox/

I plan to use this from oox/source/drawingml/table/tablecontext.cxx for
tdf#129961.

(cherry picked from commit f2e1685e489c054ea10afc0df52451c74da10cc0)

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

diff --git a/oox/source/drawingml/effectpropertiescontext.hxx 
b/oox/inc/drawingml/effectpropertiescontext.hxx
similarity index 85%
rename from oox/source/drawingml/effectpropertiescontext.hxx
rename to oox/inc/drawingml/effectpropertiescontext.hxx
index ce7b5b3ef363..09ec2f02ec80 100644
--- a/oox/source/drawingml/effectpropertiescontext.hxx
+++ b/oox/inc/drawingml/effectpropertiescontext.hxx
@@ -7,8 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIESCONTEXT_HXX
-#define INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIESCONTEXT_HXX
+#pragma once
 
 #include 
 
@@ -35,6 +34,4 @@ private:
 
 }
 
-#endif // INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIESCONTEXT_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/effectpropertiescontext.cxx 
b/oox/source/drawingml/effectpropertiescontext.cxx
index f287c897d891..b7cb03bc08b6 100644
--- a/oox/source/drawingml/effectpropertiescontext.cxx
+++ b/oox/source/drawingml/effectpropertiescontext.cxx
@@ -7,7 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include "effectpropertiescontext.hxx"
+#include 
 #include "effectproperties.hxx"
 #include 
 #include 
diff --git a/oox/source/drawingml/shapepropertiescontext.cxx 
b/oox/source/drawingml/shapepropertiescontext.cxx
index 4591cb834489..574e0793c89a 100644
--- a/oox/source/drawingml/shapepropertiescontext.cxx
+++ b/oox/source/drawingml/shapepropertiescontext.cxx
@@ -24,7 +24,7 @@
 #include 
 #include 
 #include 
-#include "effectpropertiescontext.hxx"
+#include 
 #include 
 #include 
 #include 
diff --git a/oox/source/drawingml/themeelementscontext.cxx 
b/oox/source/drawingml/themeelementscontext.cxx
index e5f84e5a02a0..6fbd62e91d18 100644
--- a/oox/source/drawingml/themeelementscontext.cxx
+++ b/oox/source/drawingml/themeelementscontext.cxx
@@ -27,7 +27,7 @@
 #include 
 #include 
 #include "effectproperties.hxx"
-#include "effectpropertiescontext.hxx"
+#include 
 #include 
 #include 
 
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index fe0f19376b32..8ea69fb16734 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -7192,6 +7192,7 @@ oox/inc/drawingml/clrschemecontext.hxx
 oox/inc/drawingml/colorchoicecontext.hxx
 oox/inc/drawingml/customshapegeometry.hxx
 oox/inc/drawingml/customshapeproperties.hxx
+oox/inc/drawingml/effectpropertiescontext.hxx
 oox/inc/drawingml/embeddedwavaudiofile.hxx
 oox/inc/drawingml/fillproperties.hxx
 oox/inc/drawingml/graphicproperties.hxx
@@ -7310,7 +7311,6 @@ oox/source/drawingml/drawingmltypes.cxx
 oox/source/drawingml/effectproperties.cxx
 oox/source/drawingml/effectproperties.hxx
 oox/source/drawingml/effectpropertiescontext.cxx
-oox/source/drawingml/effectpropertiescontext.hxx
 oox/source/drawingml/fillproperties.cxx
 oox/source/drawingml/graphicshapecontext.cxx
 oox/source/drawingml/guidcontext.cxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Miklos Vajna (via logerrit)
 svx/qa/unit/unodraw.cxx|   26 ++
 svx/source/unodraw/unoprov.cxx |1 +
 2 files changed, 27 insertions(+)

New commits:
commit 5d375815df5c0a509d99292616112052f199a053
Author: Miklos Vajna 
AuthorDate: Tue Dec 1 15:16:13 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Dec 11 08:06:32 2020 +0100

tdf#129961 svx: add UNO API for table shadow as direct format

Adding it via a style was working already.

(cherry picked from commit 55d4c6cfe5bd9b737698c6cd1f28ee8234abb5d0)

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

diff --git a/svx/qa/unit/unodraw.cxx b/svx/qa/unit/unodraw.cxx
index a835dee951bd..51b1c8b43847 100644
--- a/svx/qa/unit/unodraw.cxx
+++ b/svx/qa/unit/unodraw.cxx
@@ -107,6 +107,32 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTdf93998)
 xModelProps->getPropertyValue("Graphic") >>= xGraphic;
 CPPUNIT_ASSERT(xGraphic.is());
 }
+
+CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect)
+{
+// Create an Impress document an insert a table shape.
+mxComponent = loadFromDesktop("private:factory/simpress",
+  
"com.sun.star.presentation.PresentationDocument");
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xShape(
+xFactory->createInstance("com.sun.star.drawing.TableShape"), 
uno::UNO_QUERY);
+xShape->setPosition(awt::Point(1000, 1000));
+xShape->setSize(awt::Size(1, 1));
+uno::Reference xSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xDrawPages = xSupplier->getDrawPages();
+uno::Reference xDrawPage(xDrawPages->getByIndex(0), 
uno::UNO_QUERY);
+xDrawPage->add(xShape);
+
+// Create a red shadow on it without touching its style.
+uno::Reference xShapeProps(xShape, uno::UNO_QUERY);
+// Without the accompanying fix in place, this test would have failed with 
throwing a
+// beans.UnknownPropertyException, as shadow-as-direct-formatting on 
tables were not possible.
+xShapeProps->setPropertyValue("Shadow", uno::makeAny(true));
+sal_Int32 nRed = 0xff;
+xShapeProps->setPropertyValue("ShadowColor", uno::makeAny(nRed));
+CPPUNIT_ASSERT(xShapeProps->getPropertyValue("ShadowColor") >>= nRed);
+CPPUNIT_ASSERT_EQUAL(static_cast(0xff), nRed);
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index c6a6ab7ada94..663a3d738b24 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -740,6 +740,7 @@ static SfxItemPropertyMapEntry const * 
ImplGetSvxTableShapePropertyMap()
 {
 static SfxItemPropertyMapEntry const  aTableShapePropertyMap_Impl[] =
 {
+SHADOW_PROPERTIES
 { u"" UNO_NAME_MISC_OBJ_ZORDER,   OWN_ATTR_ZORDER, 
cppu::UnoType::get(), 0, 0},
 { u"" UNO_NAME_MISC_OBJ_LAYERID,  SDRATTR_LAYERID, 
cppu::UnoType::get(), 0,0},
 { u"" UNO_NAME_MISC_OBJ_LAYERNAME,SDRATTR_LAYERNAME, 
cppu::UnoType::get(), 0, 0},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Miklos Vajna (via logerrit)
 svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx|3 -
 svx/qa/unit/unodraw.cxx  |   44 ++-
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |5 +-
 svx/source/table/viewcontactoftableobj.cxx   |   34 ++
 4 files changed, 81 insertions(+), 5 deletions(-)

New commits:
commit 3fa5fa234b1862a7455a68c7620765dab7a25bc0
Author: Miklos Vajna 
AuthorDate: Wed Dec 2 14:09:31 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Dec 11 08:06:53 2020 +0100

tdf#129961 svx: add rendering for table shadow as direct format

There was already shadow support in
ViewContactOfTableObj::createViewIndependentPrimitive2DSequence(), but
the UNO API and UI could only set the shadow properties on a shape
style, so shadow-as-direct-format is new.

One difference between the PowerPoint shadow and our shadow is that we
draw shadow for table text as well, while PowerPoint only does it for
the borders / cell fill style.

This means we're either backwards-compatible or compatible with
PowerPoint. Solve this problem by leaving the style case unchanged, but
render direct formatting like PowerPoint.

(cherry picked from commit a75bf43a8d6c5dec6dcc86908c142ceec541aa8c)

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

diff --git a/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx 
b/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx
index 02d77f656263..fbc32f3676ba 100644
--- a/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx
+++ b/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx
@@ -71,7 +71,8 @@ namespace drawinglayer::primitive2d
 Primitive2DContainer SVXCORE_DLLPUBLIC createEmbeddedShadowPrimitive(
 const Primitive2DContainer& rContent,
 const attribute::SdrShadowAttribute& rShadow,
-const basegfx::B2DHomMatrix& rObjectMatrix = 
basegfx::B2DHomMatrix());
+const basegfx::B2DHomMatrix& rObjectMatrix = 
basegfx::B2DHomMatrix(),
+const Primitive2DContainer* pContentForShadow = nullptr);
 
 Primitive2DContainer SVXCORE_DLLPUBLIC createEmbeddedGlowPrimitive(
 const Primitive2DContainer& rContent,
diff --git a/svx/qa/unit/unodraw.cxx b/svx/qa/unit/unodraw.cxx
index 51b1c8b43847..938e44f9ca21 100644
--- a/svx/qa/unit/unodraw.cxx
+++ b/svx/qa/unit/unodraw.cxx
@@ -16,12 +16,23 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
 
 using namespace ::com::sun::star;
 
@@ -30,7 +41,7 @@ namespace
 char const DATA_DIRECTORY[] = "/svx/qa/unit/data/";
 
 /// Tests for svx/source/unodraw/ code.
-class UnodrawTest : public test::BootstrapFixture, public unotest::MacrosTest
+class UnodrawTest : public test::BootstrapFixture, public unotest::MacrosTest, 
public XmlTestTools
 {
 protected:
 uno::Reference mxComponent;
@@ -132,6 +143,37 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect)
 xShapeProps->setPropertyValue("ShadowColor", uno::makeAny(nRed));
 CPPUNIT_ASSERT(xShapeProps->getPropertyValue("ShadowColor") >>= nRed);
 CPPUNIT_ASSERT_EQUAL(static_cast(0xff), nRed);
+
+// Add text.
+uno::Reference 
xTable(xShapeProps->getPropertyValue("Model"),
+ uno::UNO_QUERY);
+uno::Reference xCell(xTable->getCellByPosition(0, 0), 
uno::UNO_QUERY);
+xCell->setString("A1");
+
+// Generates drawinglayer primitives for the shape.
+auto pDrawPage = dynamic_cast(xDrawPage.get());
+CPPUNIT_ASSERT(pDrawPage);
+SdrPage* pSdrPage = pDrawPage->GetSdrPage();
+ScopedVclPtrInstance aVirtualDevice;
+sdr::contact::ObjectContactOfObjListPainter aObjectContact(*aVirtualDevice,
+   { 
pSdrPage->GetObj(0) }, nullptr);
+const sdr::contact::ViewObjectContact& rDrawPageVOContact
+= pSdrPage->GetViewContact().GetViewObjectContact(aObjectContact);
+sdr::contact::DisplayInfo aDisplayInfo;
+drawinglayer::primitive2d::Primitive2DContainer xPrimitiveSequence
+= rDrawPageVOContact.getPrimitive2DSequenceHierarchy(aDisplayInfo);
+
+// Check the primitives.
+drawinglayer::Primitive2dXmlDump aDumper;
+xmlDocUniquePtr pDocument = aDumper.dumpAndParse(xPrimitiveSequence);
+assertXPath(pDocument, "//shadow", /*nNumberOfNodes=*/1);
+
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 0
+// - Actual  : 1
+// i.e. there was shadow for the cell text, while here 
PowerPoint-compatible output is expected,
+// which has no shadow for cell text (only for cell borders and cell 
background).
+assertXPath(pDocument, "//shado

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

2020-12-10 Thread Miklos Vajna (via logerrit)
 oox/qa/unit/data/table-shadow.pptx  |binary
 oox/qa/unit/drawingml.cxx   |   19 +++
 oox/source/drawingml/table/tablecontext.cxx |5 +
 3 files changed, 24 insertions(+)

New commits:
commit d0ed3efca42ffa859cc86343ef61a9968d05ceef
Author: Miklos Vajna 
AuthorDate: Thu Dec 10 13:57:58 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Dec 11 08:07:14 2020 +0100

tdf#129961 oox: add PPTX import for table shadow as direct format

PPTX export and ODP filter is still missing.

(cherry picked from commit b273e82aaa916b0f6198097dc32740faced73741)

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

diff --git a/oox/qa/unit/data/table-shadow.pptx 
b/oox/qa/unit/data/table-shadow.pptx
new file mode 100644
index ..3247404cbc48
Binary files /dev/null and b/oox/qa/unit/data/table-shadow.pptx differ
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index 0dd0f0991154..d666b3d332a7 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -291,6 +291,25 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testCameraRotationRevolution)
 CPPUNIT_ASSERT_EQUAL(static_cast(27000), nRotateAngle1);
 }
 
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow)
+{
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"table-shadow.pptx";
+load(aURL);
+uno::Reference 
xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+uno::Reference xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+bool bShadow = false;
+CPPUNIT_ASSERT(xShape->getPropertyValue("Shadow") >>= bShadow);
+
+// Without the accompanying fix in place, this test would have failed, 
because shadow on a table
+// was lost on import.
+CPPUNIT_ASSERT(bShadow);
+sal_Int32 nColor = 0;
+CPPUNIT_ASSERT(xShape->getPropertyValue("ShadowColor") >>= nColor);
+CPPUNIT_ASSERT_EQUAL(static_cast(0xff), nColor);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablecontext.cxx 
b/oox/source/drawingml/table/tablecontext.cxx
index bbfc94845369..84e80dccd710 100644
--- a/oox/source/drawingml/table/tablecontext.cxx
+++ b/oox/source/drawingml/table/tablecontext.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -66,6 +67,10 @@ TableContext::onCreateContext( ::sal_Int32 aElementToken, 
const AttributeList& r
 rTableStyle = std::make_shared();
 return new TableStyleContext( *this, rAttribs, *rTableStyle );
 }
+case A_TOKEN( effectLst ):  // CT_EffectList
+{
+return new EffectPropertiesContext(*this, 
mpShapePtr->getEffectProperties());
+}
 case A_TOKEN( tableStyleId ):   // ST_Guid
 return new oox::drawingml::GuidContext( *this, 
mrTableProperties.getStyleId() );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread andreas kainz (via logerrit)
 extras/source/tipoftheday/statusbar.png |binary
 1 file changed

New commits:
commit 83cc9f915118c04725cf4a197e44a582ff51d9df
Author: andreas kainz 
AuthorDate: Thu Dec 10 11:01:38 2020 +0100
Commit: Andreas Kainz 
CommitDate: Fri Dec 11 08:37:23 2020 +0100

update ToD statusbar preview

Change-Id: Ic36861e388b62179e1ef6b5c5f74eb27429de159
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107517
Tested-by: Jenkins
Reviewed-by: Andreas Kainz 

diff --git a/extras/source/tipoftheday/statusbar.png 
b/extras/source/tipoftheday/statusbar.png
index 729c8217e84f..e0e7f4579fe5 100644
Binary files a/extras/source/tipoftheday/statusbar.png and 
b/extras/source/tipoftheday/statusbar.png differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits