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

2021-03-11 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/calc_tests3/tdf89754.py |   45 ---
 sc/qa/unit/ucalc.cxx |   15 +++
 2 files changed, 15 insertions(+), 45 deletions(-)

New commits:
commit d8e1892d7dd3eb5d4724ef32ce7a110a0087d9e1
Author: Xisco Fauli 
AuthorDate: Thu Mar 11 17:22:19 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Mar 12 08:51:03 2021 +0100

tdf#89754: sc_ucalc: Fix test

The original UItest added in 3ba901f050d262cdeccefa5b21b0d32aa7332dc7
< tdf#89754 - don't increment non different consecutive date cells >
didn't fail without the fix in place

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

diff --git a/sc/qa/uitest/calc_tests3/tdf89754.py 
b/sc/qa/uitest/calc_tests3/tdf89754.py
deleted file mode 100644
index 855688c8f45b..
--- a/sc/qa/uitest/calc_tests3/tdf89754.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# -*- 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.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-#tdf#89754 - EDITING: 'Autofill - Date' don't increment non different 
consecutive date cells
-
-class tdf89754(UITestCase):
-
-def test_tdf89754_autofill_date(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()
-
-#1 - A1: 2012-10-31 and A2: 2012-10-31
-enter_text_to_cell(gridwin, "A1", "2012-10-31")
-enter_text_to_cell(gridwin, "A2", "2012-10-31")
-
-#2 - Select A1:A5
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A5"}))
-
-#3 - Edit -> fill -> Series -> Down
-self.ui_test.execute_dialog_through_command(".uno:FillSeries")
-xDialog = self.xUITest.getTopFocusWindow()
-xOK = xDialog.getChild("ok")
-self.ui_test.close_dialog_through_button(xOK)
-
-#4 - Expected: All Cells show the initial date
-self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 
41213)
-self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 
41213)
-self.assertEqual(get_cell_by_position(document, 0, 0, 2).getValue(), 
41213)
-self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 
41213)
-self.assertEqual(get_cell_by_position(document, 0, 0, 4).getValue(), 
41213)
-
-self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 460f85f302c5..b7e89b71fb94 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4920,6 +4920,21 @@ void Test::testAutoFill()
 CPPUNIT_ASSERT_EQUAL(aExpected, aFormula);
 }
 
+// Clear column A for a new test.
+clearRange(m_pDoc, ScRange(0,0,0,0,MAXROW,0));
+m_pDoc->SetRowHidden(0, MAXROW, 0, false); // Show all rows.
+
+m_pDoc->SetString( 0, 100, 0, "2012-10-31" );
+m_pDoc->SetString( 0, 101, 0, "2012-10-31" );
+m_pDoc->Fill( 0, 100, 0, 101, nullptr, aMarkData, 3, FILL_TO_BOTTOM, 
FILL_AUTO );
+
+// tdf#89754, Without the fix in place, this test would have failed with
+// - Expected: 2012-10-31
+// - Actual  : 2012-11-01
+CPPUNIT_ASSERT_EQUAL( OUString("2012-10-31"), m_pDoc->GetString( 0, 102, 0 
) );
+CPPUNIT_ASSERT_EQUAL( OUString("2012-10-31"), m_pDoc->GetString( 0, 103, 0 
) );
+CPPUNIT_ASSERT_EQUAL( OUString("2012-10-31"), m_pDoc->GetString( 0, 104, 0 
) );
+
 m_pDoc->DeleteTab(0);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Mike Kaganski (via logerrit)
 sw/source/core/doc/docfld.cxx |   11 +--
 sw/source/core/edit/edfld.cxx |1 +
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit e6f7a3bf40f5df3a17ba58c4735d647bfdda71cb
Author: Mike Kaganski 
AuthorDate: Fri Mar 12 07:28:23 2021 +0100
Commit: Mike Kaganski 
CommitDate: Fri Mar 12 08:32:25 2021 +0100

Use range-based for; mention similar method in comments

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

diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index eecfc42fc1ab..58319816050b 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -351,13 +351,12 @@ const SwDBData& SwDoc::GetDBDesc()
 #if HAVE_FEATURE_DBCONNECTIVITY
 if(maDBData.sDataSource.isEmpty())
 {
-const SwFieldTypes::size_type nSize = 
getIDocumentFieldsAccess().GetFieldTypes()->size();
-for(SwFieldTypes::size_type i = 0; i < nSize && 
maDBData.sDataSource.isEmpty(); ++i)
+// Similar to: SwEditShell::IsAnyDatabaseFieldInDoc
+for (const auto& pFieldType : 
*getIDocumentFieldsAccess().GetFieldTypes())
 {
-SwFieldType& rFieldType = 
*((*getIDocumentFieldsAccess().GetFieldTypes())[i]);
-SwFieldIds nWhich = rFieldType.Which();
-if(IsUsed(rFieldType))
+if (IsUsed(*pFieldType))
 {
+SwFieldIds nWhich = pFieldType->Which();
 switch(nWhich)
 {
 case SwFieldIds::Database:
@@ -366,7 +365,7 @@ const SwDBData& SwDoc::GetDBDesc()
 case SwFieldIds::DbSetNumber:
 {
 std::vector vFields;
-rFieldType.GatherFields(vFields);
+pFieldType->GatherFields(vFields);
 if(vFields.size())
 {
 if(SwFieldIds::Database == nWhich)
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index c83f442b7160..2ad8695d46c7 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -385,6 +385,7 @@ void SwEditShell::ChangeAuthorityData(const SwAuthEntry* 
pNewData)
 
 bool SwEditShell::IsAnyDatabaseFieldInDoc()const
 {
+// Similar to: SwDoc::GetDBDesc
 const SwFieldTypes * pFieldTypes = 
GetDoc()->getIDocumentFieldsAccess().GetFieldTypes();
 for(const auto & pFieldType : *pFieldTypes)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Viswaas Prabunathan license statement

2021-03-11 Thread Viswaas Loganadhan Prabunathan
All of my past & future contributions to LibreOffice may be
   licensed under the MPLv2/LGPLv3+ dual license.


-- 
Viswaas L Prabunathan
B.S. Comp Sci & Eng | UC Davis
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


S9+ screen only 125.4 usd

2021-03-11 Thread Elekworld Kelly
Hi,Hi,Samsung screen prices drop down a lot for supply get more in market now,Pls check if you need some stock.S8 plus:USD$125.4,  ↓ $4.38S9 plus:USD$125.4,  ↓ $6.75S10:USD$204.2,  ↓ $1.8S20:USD$184,  ↓ $1.6S20 plus:USD$201,  ↓ $1.7S20 ultra:USD$232.9,  ↓ $3.4Note 9:USD$143.5,  ↓ $1.8Note 10:USD$183.9  , ↓ $3.4Note 10 plus:USD$214.3,  ↓ $3.4Note 20 ultra:USD$261.6,  ↓ $1.7A50/A50s:USD$51.2,  ↓ $2.7A40:USD$66.5,  ↓ $2.1A30:USD$51.2,  ↓ $2.7A20:USD$49.4,  ↓ $1.8Big hole back glass sells hot:iPhone SE2--$1.23iPhone 8--$1.25iPhone 8 Plus---$1.25iPhone X-$1.64iPhone XS---$1.64iPhone XR---$1.25iPhone XS MAX$1.64iPhone 11$2.25iPhone 11 Pro---$4.9iPhone 11 Pro MAX-$4.9iPhone 12$4.9iPhone 12 Mini--$4.9iPhone 12 Pro---$11.35iPhone 12 Pro Max-$12.28Thanks & RegardsKelly Elekworld Co.,Ltd.wasap.my/8613760153721Skype: Kelly-Elekworld11 Years Professional supplier for iPhone&iPad&Samsung&HUAWEI&LG etc. Parts and Accessories
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-03-11 Thread Mike Kaganski (via logerrit)
 vcl/source/app/salvtables.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 21c602913d98ef46b49fc9b6f9071db92a1597c6
Author: Mike Kaganski 
AuthorDate: Thu Mar 11 15:06:42 2021 +0100
Commit: Mike Kaganski 
CommitDate: Fri Mar 12 05:08:50 2021 +0100

No need to const_cast here

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

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 64294c4686de..083f571d858b 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -4144,8 +4144,7 @@ void SalInstanceTreeView::set_clicks_to_toggle(int 
nToggleBehavior)
 
 void SalInstanceTreeView::set_extra_row_indent(const weld::TreeIter& rIter, 
int nIndentLevel)
 {
-weld::TreeIter& rNonConstIter = const_cast(rIter);
-SalInstanceTreeIter& rVclIter = 
static_cast(rNonConstIter);
+const SalInstanceTreeIter& rVclIter = static_cast(rIter);
 rVclIter.iter->SetExtraIndent(nIndentLevel);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Mike Kaganski (via logerrit)
 vcl/source/app/salvtables.cxx |8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 0ed63ed088d23e48f050c34e49f713281468f6f8
Author: Mike Kaganski 
AuthorDate: Thu Mar 11 13:39:52 2021 +0100
Commit: Mike Kaganski 
CommitDate: Fri Mar 12 05:08:20 2021 +0100

Avoid modifying then restoring this const iterator, its copy is trivial

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

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 103b7bc4a22c..64294c4686de 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -4502,12 +4502,8 @@ int SalInstanceTreeView::get_iter_depth(const 
weld::TreeIter& rIter) const
 
 bool SalInstanceTreeView::iter_has_child(const weld::TreeIter& rIter) const
 {
-weld::TreeIter& rNonConstIter = const_cast(rIter);
-SalInstanceTreeIter& rVclIter = 
static_cast(rNonConstIter);
-SvTreeListEntry* restore(rVclIter.iter);
-bool ret = iter_children(rNonConstIter);
-rVclIter.iter = restore;
-return ret;
+SalInstanceTreeIter aTempCopy(static_cast(&rIter));
+return iter_children(aTempCopy);
 }
 
 bool SalInstanceTreeView::get_row_expanded(const weld::TreeIter& rIter) const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread mert (via logerrit)
 include/svx/svdedtv.hxx|6 +-
 sd/source/ui/func/futransf.cxx |   13 -
 svx/source/svdraw/svdedtv1.cxx |8 +++-
 3 files changed, 20 insertions(+), 7 deletions(-)

New commits:
commit 2246b6a2887b90efc712c4479b19609cf9307a3d
Author: mert 
AuthorDate: Thu Mar 4 12:17:27 2021 +0300
Commit: Mert Tumer 
CommitDate: Fri Mar 12 04:36:28 2021 +0100

Fix wrong position on move when page has margin

Change-Id: I9ac2d9914b86210ca2148b44488c2c70cc5870d4
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111949
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111929
Tested-by: Jenkins

diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 916fdaeb186b..eb815b728cb3 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -304,7 +304,11 @@ public:
 // geometrical attribute (position, size, rotation angle)
 // A PageOrigin set at a position is taken into account.
 SfxItemSet GetGeoAttrFromMarked() const;
-void SetGeoAttrToMarked(const SfxItemSet& rAttr);
+// In LOK, interactive shape movement uses this function
+// in that case, margin is not taken into account
+// and the final position of the shape becomes incorrect
+// However, "Position and Size" dialog and other cases already add the 
margins.
+void SetGeoAttrToMarked(const SfxItemSet& rAttr, bool addPageMargin = 
false);
 
 // Returns NULL if:
 // - nothing is marked,
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index fa7398e48b43..6c07e0e70be6 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -48,14 +49,13 @@ rtl::Reference FuTransform::Create( ViewShell* 
pViewSh, ::sd::Window* pW
 
 namespace {
 
-void setUndo(::sd::View* pView, const SfxItemSet* pArgs)
+void setUndo(::sd::View* pView, const SfxItemSet* pArgs, bool addPageMargin)
 {
 // Undo
 OUString aString = pView->GetDescriptionOfMarkedObjects() +
 " " + SdResId(STR_TRANSFORM);
 pView->BegUndo(aString);
-
-pView->SetGeoAttrToMarked(*pArgs);
+pView->SetGeoAttrToMarked(*pArgs, addPageMargin);
 pView->SetAttributes(*pArgs);
 pView->EndUndo();
 }
@@ -71,7 +71,9 @@ void FuTransform::DoExecute( SfxRequest& rReq )
 
 if (pArgs)
 {
-setUndo(mpView, pArgs);
+// If this comes from LOK, that means the shape is moved by mouse
+// only then pArgs is pre-set.
+setUndo(mpView, pArgs, comphelper::LibreOfficeKit::isActive());
 return;
 }
 
@@ -115,7 +117,8 @@ void FuTransform::DoExecute( SfxRequest& rReq )
 if (nResult == RET_OK)
 {
 pRequest->Done(*(pDlg->GetOutputItemSet()));
-setUndo(mpView, pRequest->GetArgs());
+// Page margin is already calculated at this point.
+setUndo(mpView, pRequest->GetArgs(), false);
 }
 
 // deferred until the dialog ends
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index f2128824b6fa..5b17b8852462 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1512,7 +1512,7 @@ static Point ImpGetPoint(const tools::Rectangle& rRect, 
RectPoint eRP)
 return Point(); // Should not happen!
 }
 
-void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
+void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr, bool 
addPageMargin)
 {
 const bool bTiledRendering = comphelper::LibreOfficeKit::isActive();
 
@@ -1520,6 +1520,12 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& 
rAttr)
 
 if(GetSdrPageView())
 {
+if (addPageMargin)
+{
+SdrPage * pPage = GetSdrPageView()->GetPage();
+Point upperLeft(pPage->GetLeftBorder(), pPage->GetUpperBorder());
+aRect.Move(upperLeft.getX(), upperLeft.getY());
+}
 GetSdrPageView()->LogicToPagePos(aRect);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Contributing to LibreOffice

2021-03-11 Thread Ankur Khandelwal
Hey there!
This is Ankur Khandelwal. I am a second-year Computer Engineering student
at the International Institute of Information Technology, Bhubaneswar.

I would like to be a part of the developer community of LibreOffice.

I am sending this mail as a formal introduction as mentioned on the page
https://summerofcode.withgoogle.com/organizations/6596812015665152/

My nickname on the #libreoffice-dev IRC channel at freenode.net is Ankur.

Thank You.
-- 
Ankur Khandelwal,
B519010,
Computer Engineering (CE),
IIIT Bhubaneswar.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: helpcontent2

2021-03-11 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4a4a38d31a287f78d4c7226fe85aafb6e6c6c0ac
Author: Rafael Lima 
AuthorDate: Fri Mar 12 00:25:12 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Fri Mar 12 00:25:12 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to ae361f8f4f70c43d7082dd37c0a3f69bf49fa3e0
  - Create SF_Database Help page

Change-Id: I4ab158e8089973af24155d3b9d0697734acdf4bb
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/112228
Tested-by: Jenkins
Tested-by: Jean-Pierre Ledure 
Reviewed-by: Jean-Pierre Ledure 

diff --git a/helpcontent2 b/helpcontent2
index 9847ee04682b..ae361f8f4f70 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 9847ee04682b673c20918af6356c0dbf39aa6deb
+Subproject commit ae361f8f4f70c43d7082dd37c0a3f69bf49fa3e0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Rafael Lima (via logerrit)
 AllLangHelp_sbasic.mk|1 
 source/text/sbasic/shared/03/lib_ScriptForge.xhp |2 
 source/text/sbasic/shared/03/sf_database.xhp |  324 +++
 3 files changed, 326 insertions(+), 1 deletion(-)

New commits:
commit ae361f8f4f70c43d7082dd37c0a3f69bf49fa3e0
Author: Rafael Lima 
AuthorDate: Wed Mar 10 15:46:49 2021 +0100
Commit: Rafael Lima 
CommitDate: Fri Mar 12 00:25:12 2021 +0100

Create SF_Database Help page

Change-Id: I4ab158e8089973af24155d3b9d0697734acdf4bb
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/112228
Tested-by: Jenkins
Tested-by: Jean-Pierre Ledure 
Reviewed-by: Jean-Pierre Ledure 

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index 90b40453f..65fc41da7 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -79,6 +79,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
 helpcontent2/source/text/sbasic/shared/03/lib_ScriptForge \
 helpcontent2/source/text/sbasic/shared/03/sf_array \
 helpcontent2/source/text/sbasic/shared/03/sf_calc \
+helpcontent2/source/text/sbasic/shared/03/sf_database \
 helpcontent2/source/text/sbasic/shared/03/sf_dialog \
 helpcontent2/source/text/sbasic/shared/03/sf_dialogcontrol \
 helpcontent2/source/text/sbasic/shared/03/sf_dictionary \
diff --git a/source/text/sbasic/shared/03/lib_ScriptForge.xhp 
b/source/text/sbasic/shared/03/lib_ScriptForge.xhp
index 30520ca95..c59831b92 100644
--- a/source/text/sbasic/shared/03/lib_ScriptForge.xhp
+++ b/source/text/sbasic/shared/03/lib_ScriptForge.xhp
@@ -120,7 +120,7 @@
   
 
 
-  Database
+  
 
 
   
diff --git a/source/text/sbasic/shared/03/sf_database.xhp 
b/source/text/sbasic/shared/03/sf_database.xhp
new file mode 100644
index 0..6c137ef47
--- /dev/null
+++ b/source/text/sbasic/shared/03/sf_database.xhp
@@ -0,0 +1,324 @@
+
+
+
+
+
+  
+SFDatabases.Database service
+/text/sbasic/shared/03/sf_database.xhp
+  
+
+
+
+   
+  Database service
+   
+
+
+
+SFDatabases.Database 
service
+The Database service provides access to 
databases either embedded or described in Base documents. This service provides 
methods to:
+
+  
+Get access to 
data in database tables.
+  
+  
+Run 
SELECT queries and perform aggregate functions.
+  
+  
+Run SQL action 
statements such as INSERT, UPDATE, 
DELETE, etc.
+  
+
+
+TODO: Add reference to the future help page SFDocuments.SF_Form 
service in the paragraph below
+Each instance of the Database service 
represents a single database and gives access to its tables, queries and data. 
This service does not provide access to  forms or reports in the Base 
document.
+All exchanges between this service and 
the database are done using SQL only.
+SQL statements may be run in direct or 
indirect mode. In direct mode the statement is 
transferred to the database engine without any syntax checking or 
review.
+The provided interfaces include simple tables and queries 
lists, as well as access to database data.
+To make SQL statements 
more readable, you can use optional square brackets to enclose tables, queries 
and fields instead of using other enclosing characters that may be exclusive to 
certain Relational Database Management Systems (RDBMS).
+
+Service invocation
+
+The code snippet below shows how to access any database with 
the Database service.
+
+Dim myDatabase As Object
+Set myDatabase = 
CreateScriptService("SFDatabases.Database", [FileName], [RegistrationName], 
[ReadOnly], [User, [Password]])
+'   ... Run 
queries, SQL statements, ...
+myDatabase.CloseDatabase()
+
+
+FileName: The name of the Base file. 
Must be expressed using SF_FileSystem.FileNaming 
notation.
+RegistrationName: The name of a 
registered database. If a file name is provided, this argument should not be 
used.
+Conversely, if a 
RegistrationName is specified, the 
FileName parameter should not be defined.
+ReadOnly: Determines if the database 
will be opened as readonly (Default = True).
+User, 
Password: Additional connection parameters to the database 
server.
+
+Accessing Databases with the UI Service
+It 
is also possible to access the database associated with a Base document using 
the ScriptForge.UI service, as shown in the 
example below:
+
+Dim myDoc As Object, myDatabase As Object, ui As 
Object
+Set ui = CreateScriptService("UI")
+Set myDoc = 
ui.OpenBaseDocument("myDb.odb")
+' User and 
password are supplied below, if needed
+Set myDatabase = myDoc.GetDatabase()
+'   ... Run 
queries, SQL statements, ...
+myDoc.CloseDocument()
+
+
+
+Database Service;Queries
+Database Service;Tables
+
+Properties
+
+  
+  
+  Name
+

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

2021-03-11 Thread Andreas Heinisch (via logerrit)
 sc/source/core/data/table4.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 1982768ba3db819b84445830ae24e55ecd373d9a
Author: Andreas Heinisch 
AuthorDate: Sat Mar 6 10:38:43 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Mar 12 00:23:17 2021 +0100

tdf#89754 - don't increment non different consecutive date cells

Change-Id: I6fedc0fe286ebe8b0110360391e8d3325fc2ca25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112054
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
(cherry picked from commit 3ba901f050d262cdeccefa5b21b0d32aa7332dc7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112295
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index a777aca898ae..ede354eead8c 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -587,6 +587,13 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 rInc = nCmpInc;
 }
 }
+else
+{
+// tdf#89754 - don't increment non different consecutive 
date cells
+rCmd = FILL_DATE;
+rDateCmd = FILL_DAY;
+rInc = 0.0;
+}
 }
 else// single date -> increment by days
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Julien Nabet (via logerrit)
 vcl/source/gdi/pdfwriter_impl.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit a0d63ee5df921e5f1ac915ada783fdef0dbbb057
Author: Julien Nabet 
AuthorDate: Sun Feb 28 22:23:30 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Mar 11 23:48:55 2021 +0100

tdf#127217: Fix buttons in forms not working in Adobe Reader

Regression from 76b5dca9dc0ff60f8f62cbecdee68f8f3b287ceb:
author  Thorsten Behrens   2019-04-09 02:19:14 
+0200
committer   Katarina Behrens   2019-07-03 
14:48:45 +0200
commit  76b5dca9dc0ff60f8f62cbecdee68f8f3b287ceb (patch)
treee778dad33073a228eb61ab62ce5f38e2a26d07ca
parent  1e8a9c19a6f7b82c9e0c481aee0c04c0780f4433 (diff)
tdf#113448 don't export any font for radio buttons

Don't let only color value in m_aDAString since it'll go here:
if( !rWidget.m_aDAString.isEmpty() )
{
if( !rWidget.m_aDRDict.isEmpty() )
{
aLine.append( "/DR<<" );
aLine.append( rWidget.m_aDRDict );
aLine.append( ">>\n" );
}
else
{
aLine.append( "/DR<>>>\n" );
}
aLine.append( "/DA" );
appendLiteralStringEncrypt( rWidget.m_aDAString, 
rWidget.m_nObject, aLine );
aLine.append( "\n" );
if( rWidget.m_nTextStyle & DrawTextFlags::Center )
aLine.append( "/Q 1\n" );
else if( rWidget.m_nTextStyle & DrawTextFlags::Right )
aLine.append( "/Q 2\n" );
}

But if we shouldn't have /DR at all since we don't want fonts for 
radiobutton, it also means
we don't want /DA too.
Indeed at the end of 12.7.3.3 
https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf:
The default appearance string (DA) contains any graphics state or text 
state operators needed to establish the
graphics state parameters, such as text size and colour, for displaying the 
field’s variable text. Only operators
that are allowed within text objects shall occur in this string (see Figure 
9). At a minimum, the string shall
include a Tf (text font) operator along with its two operands, font and 
size. The specified font value shall match
a resource name in the Font entry of the default resource dictionary 
(referenced from the DR entry of the
interactive form dictionary; see Table 218).

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

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 4cf1b8ac5e8f..b81843b459e4 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -4022,9 +4022,6 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( 
PDFWidget& rBox, const P
 
 pop();
 
-OStringBuffer aDA( 256 );
-appendNonStrokingColor( replaceColor( rWidget.TextColor, 
rSettings.GetRadioCheckTextColor() ), aDA );
-rBox.m_aDAString = aDA.makeStringAndClear();
 //to encrypt this (el)
 rBox.m_aMKDict = "/CA";
 //after this assignment, to m_aMKDic cannot be added anything
@@ -4037,6 +4034,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( 
PDFWidget& rBox, const P
 SvMemoryStream* pCheckStream = new SvMemoryStream( 256, 256 );
 
 beginRedirect( pCheckStream, aCheckRect );
+OStringBuffer aDA( 256 );
 aDA.append( "/Tx BMC\nq BT\n" );
 appendNonStrokingColor( replaceColor( rWidget.TextColor, 
rSettings.GetRadioCheckTextColor() ), aDA );
 aDA.append( ' ' );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmlsecurity/Module_xmlsecurity.mk

2021-03-11 Thread Miklos Vajna (via logerrit)
 xmlsecurity/Module_xmlsecurity.mk |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 149df1fec6472e30582162e17e04c75aee91d26a
Author: Miklos Vajna 
AuthorDate: Thu Mar 11 17:45:58 2021 +0100
Commit: Miklos Vajna 
CommitDate: Thu Mar 11 23:26:56 2021 +0100

Turn CppunitTest_xmlsecurity_signing into a subsequentcheck

This is one of the most unreliable tests on Windows, probably due to
reading the real system cert store, unlike macOS/Linux (which have a
per-test NSS template).

Give up on running this on Windows / macOS for pre-submit CI to get more
reliability instead. Local 'make check' on Windows keeps running this,
since it does pass most of the time.

The change can be reverted once somebody can figure out how to reliably
reproduce this failure on Windows.

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

diff --git a/xmlsecurity/Module_xmlsecurity.mk 
b/xmlsecurity/Module_xmlsecurity.mk
index 1ce7364d4ce9..81e74ecf21d3 100644
--- a/xmlsecurity/Module_xmlsecurity.mk
+++ b/xmlsecurity/Module_xmlsecurity.mk
@@ -18,10 +18,13 @@ $(eval $(call gb_Module_add_targets,xmlsecurity,\
 ))
 
 $(eval $(call gb_Module_add_slowcheck_targets,xmlsecurity,\
-CppunitTest_xmlsecurity_signing \
 CppunitTest_xmlsecurity_pdfsigning \
 ))
 
+$(eval $(call gb_Module_add_subsequentcheck_targets,xmlsecurity,\
+CppunitTest_xmlsecurity_signing \
+))
+
 $(eval $(call gb_Module_add_l10n_targets,xmlsecurity,\
AllLangMoTarget_xsc \
 ))
___
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 writerfilter/source

2021-03-11 Thread László Németh (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf140597.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx|   13 +
 writerfilter/source/dmapper/TableManager.hxx |   11 ++-
 3 files changed, 23 insertions(+), 1 deletion(-)

New commits:
commit 1247f2f3d8f343e0e809a1aec0ce0e20005caafd
Author: László Németh 
AuthorDate: Tue Mar 9 11:11:10 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Mar 11 21:48:59 2021 +0100

tdf#140597 DOCX import: fix missing tblPrEx border

of first table cells, caused by the workaround for tdf#138612.

Now property set of a new cell is a copy of the table exception
property set of the table row, as needed for the import of the
table style inheritance.

Regression from commit f319d6b543c2367546bc80d138e56ed03731e265
(tdf#138612 DOCX import: fix lost part of split table cell).

Change-Id: Iaf6637e757fbfeef7651a4300a7f65a23615f5c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112247
Tested-by: Jenkins
Reviewed-by: László Németh 
(cherry picked from commit 53884e8fe92597e909e4fa5599192783c3d31a56)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112225
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf140597.docx 
b/sw/qa/extras/ooxmlexport/data/tdf140597.docx
new file mode 100644
index ..36db7d9bea2b
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf140597.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index e6645a0e819f..503d0069a3f7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -760,6 +760,19 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf138612, 
"tdf138612.docx")
 assertXPath(pXmlDocument, 
"/w:document/w:body/w:tbl/w:tr[6]/w:tc[2]/w:tcPr/w:vMerge", 0);
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf140597, "tdf140597.docx")
+{
+xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+// There were missing tblPrEx table exception borders
+assertXPath(pXmlDocument, 
"/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:tcBorders/w:top");
+assertXPath(pXmlDocument, 
"/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:tcBorders/w:start");
+assertXPath(pXmlDocument, 
"/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:tcPr/w:tcBorders/w:top");
+assertXPath(pXmlDocument, 
"/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:tcPr/w:tcBorders/w:start");
+assertXPath(pXmlDocument, 
"/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:tcPr/w:tcBorders/w:top");
+assertXPath(pXmlDocument, 
"/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:tcPr/w:tcBorders/w:start");
+}
+
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128646, "tdf128646.docx")
 {
 // The problem was that not hidden shapes anchored to empty hidden 
paragraphs were imported as hidden.
diff --git a/writerfilter/source/dmapper/TableManager.hxx 
b/writerfilter/source/dmapper/TableManager.hxx
index 5e18becab606..ec064b17ccfc 100644
--- a/writerfilter/source/dmapper/TableManager.hxx
+++ b/writerfilter/source/dmapper/TableManager.hxx
@@ -114,7 +114,14 @@ class TableManager : public virtual SvRefBase
 
 void resetCellProps()
 {
-mpCellProps = getTableExceptionProps();
+// copy tblPrEx table exception properties, if they exist
+if (getTableExceptionProps().is())
+{
+mpCellProps = new TablePropertyMap;
+mpCellProps->InsertProps(getTableExceptionProps().get());
+}
+else
+mpCellProps.clear();
 }
 
 void setCellProps(TablePropertyMapPtr pProps)
@@ -149,6 +156,8 @@ class TableManager : public virtual SvRefBase
 void setTableExceptionProps(TablePropertyMapPtr pProps)
 {
 mpTableExceptionProps = pProps;
+// set table exception properties of the first cell
+resetCellProps();
 }
 
 const TablePropertyMapPtr& getTableExceptionProps() 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-0' - include/svx sw/CppunitTest_sw_ooxmlimport2.mk sw/qa

2021-03-11 Thread Gülşah Köse (via logerrit)
 include/svx/unoshprp.hxx |4 ++--
 sw/CppunitTest_sw_ooxmlimport2.mk|1 +
 sw/qa/extras/ooxmlexport/data/tdf133473.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx   |   21 +
 4 files changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 36538b33413b24241920d8c4d873beb5c671e13f
Author: Gülşah Köse 
AuthorDate: Mon Feb 22 14:44:03 2021 +0300
Commit: Xisco Fauli 
CommitDate: Thu Mar 11 21:48:44 2021 +0100

tdf#133473 Change SDRATTR_SHADOWSIZEX flag.

SDRATTR_SHADOWSIZEX holds a percentage value. So we
shouldn't use METRIC_ITEM.

Change-Id: I9f1a20d5871f60d2899ef7d525f4cf837b0a9088
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111311
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112241
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112262

diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index cf7452e8303a..8cbeff73a134 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -224,8 +224,8 @@
 { OUString(UNO_NAME_SHADOWTRANSPARENCE),SDRATTR_SHADOWTRANSPARENCE, 
::cppu::UnoType::get(),0,  0}, \
 { OUString(UNO_NAME_SHADOWXDIST),   SDRATTR_SHADOWXDIST,
::cppu::UnoType::get(),0,  0, 
PropertyMoreFlags::METRIC_ITEM}, \
 { OUString(UNO_NAME_SHADOWYDIST),   SDRATTR_SHADOWYDIST,
::cppu::UnoType::get(),0,  0, 
PropertyMoreFlags::METRIC_ITEM}, \
-{ OUString(UNO_NAME_SHADOWSIZEX),   SDRATTR_SHADOWSIZEX,
::cppu::UnoType::get(),0,  0, 
PropertyMoreFlags::METRIC_ITEM}, \
-{ OUString(UNO_NAME_SHADOWSIZEY),   SDRATTR_SHADOWSIZEY,
::cppu::UnoType::get(),0,  0, 
PropertyMoreFlags::METRIC_ITEM},
+{ OUString(UNO_NAME_SHADOWSIZEX),   SDRATTR_SHADOWSIZEX,
::cppu::UnoType::get(),0,  0}, \
+{ OUString(UNO_NAME_SHADOWSIZEY),   SDRATTR_SHADOWSIZEY,
::cppu::UnoType::get(),0,  0},
 
 #define LINE_PROPERTIES_DEFAULTS\
 { OUString(UNO_NAME_LINECAP),   XATTR_LINECAP,  
::cppu::UnoType::get(), 0, 0}, \
diff --git a/sw/CppunitTest_sw_ooxmlimport2.mk 
b/sw/CppunitTest_sw_ooxmlimport2.mk
index f47d7e35830b..6df866aebadf 100644
--- a/sw/CppunitTest_sw_ooxmlimport2.mk
+++ b/sw/CppunitTest_sw_ooxmlimport2.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ooxmlimport2, \
 tl \
 vcl \
 svxcore \
+svl\
 ))
 
 $(eval $(call gb_CppunitTest_use_externals,sw_ooxmlimport2,\
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133473.docx 
b/sw/qa/extras/ooxmlexport/data/tdf133473.docx
new file mode 100644
index ..c351db950231
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf133473.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index 1e28459cc0b0..71e313d4c545 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -9,6 +9,11 @@
 
 #include 
 
+#include 
+#include 
+#include 
+#include 
+
 #include 
 #include 
 #include 
@@ -86,6 +91,22 @@ DECLARE_OOXMLEXPORT_TEST(testTdf140137, "tdf140137.docx")
 // Don't throw exception during load
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf133473_shadowSize, "tdf133473.docx")
+{
+uno::Reference xShape = getShape(1);
+
+SdrObject* pObj(GetSdrObjectFromXShape(xShape));
+const SfxItemSet& rSet = pObj->GetMergedItemSet();
+sal_Int32 nSize1 = rSet.Get(SDRATTR_SHADOWSIZEX).GetValue();
+
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 20
+// - Actual  : 113386
+// I.e. Shadow size will be smaller than actual.
+
+CPPUNIT_ASSERT_EQUAL(static_cast(20), nSize1);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Stephan Bergmann (via logerrit)
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4af56d8189012f96d0471d7f50a3e4463516
Author: Stephan Bergmann 
AuthorDate: Thu Mar 11 09:13:51 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 11 21:33:25 2021 +0100

Don't use std::ostream operator <<(char16_t const *) deleted in C++20

Building with --with-latest-c++:

> 
C:/lo/core/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx(664):
 error C2280: 'std::basic_ostream> &std::operator 
<<>(std::basic_ostream> 
&,const char16_t *)': attempting to reference a deleted function
> 
C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.299\Include\ostream(951):
 note: see declaration of 'std::operator <<'

etc.

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

diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx 
b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
index ce65672987c5..b40639f586d8 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
@@ -661,7 +661,7 @@ static bool EncodeDistinguishedName(std::u16string_view 
const rName, CERT_NAME_B
 reinterpret_cast(rName.data()), CERT_X500_NAME_STR,
 nullptr, nullptr, &rBlob.cbData, &pszError))
 {
-SAL_INFO("xmlsecurity.xmlsec", "CertStrToNameW failed: " << 
WindowsErrorString(GetLastError()) << "; " << reinterpret_cast(pszError));
+SAL_INFO("xmlsecurity.xmlsec", "CertStrToNameW failed: " << 
WindowsErrorString(GetLastError()) << "; " << OUString(o3tl::toU(pszError)));
 return false;
 }
 rBlob.pbData = new BYTE[rBlob.cbData];
@@ -669,7 +669,7 @@ static bool EncodeDistinguishedName(std::u16string_view 
const rName, CERT_NAME_B
 reinterpret_cast(rName.data()), CERT_X500_NAME_STR,
 nullptr, rBlob.pbData, &rBlob.cbData, &pszError))
 {
-SAL_INFO("xmlsecurity.xmlsec", "CertStrToNameW failed: " << 
WindowsErrorString(GetLastError()) << "; " << reinterpret_cast(pszError));
+SAL_INFO("xmlsecurity.xmlsec", "CertStrToNameW failed: " << 
WindowsErrorString(GetLastError()) << "; " << OUString(o3tl::toU(pszError)));
 return false;
 }
 return true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/main/ChartController.cxx |   12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 2b808bad616a557fabb080b49c5b925d2481b9b5
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 15:26:21 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 21:29:04 2021 +0100

awt::XWindow has setVisible so don't need to fetch VCLXWindow to do that

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

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index 3d310d8d8bea..08b8c65c31f7 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -48,7 +48,9 @@
 #include 
 
 #include 
+#include 
 
+#include 
 #include 
 #include 
 #include 
@@ -66,7 +68,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -424,12 +425,9 @@ void SAL_CALL ChartController::attachFrame(
 //get the window parent from the frame to use as parent for our new window
 if(xFrame.is())
 {
-uno::Reference< awt::XWindow > xContainerWindow = 
xFrame->getContainerWindow();
-VCLXWindow* pParentComponent = 
comphelper::getUnoTunnelImplementation(xContainerWindow);
-assert(pParentComponent);
-if (pParentComponent)
-pParentComponent->setVisible(true);
-
+uno::Reference xContainerWindow = 
xFrame->getContainerWindow();
+if (xContainerWindow)
+xContainerWindow->setVisible(true);
 pParent = VCLUnoHelper::GetWindow( xContainerWindow );
 }
 
___
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' - emfio/inc emfio/source include/vcl vcl/inc vcl/source

2021-03-11 Thread Armin Le Grand (Allotropia) (via logerrit)
 emfio/inc/mtftools.hxx|   24 
 emfio/source/reader/emfreader.cxx |4 
 emfio/source/reader/mtftools.cxx  |  211 +-
 emfio/source/reader/wmfreader.cxx |3 
 include/vcl/metaact.hxx   |8 +
 vcl/inc/impfont.hxx   |6 -
 vcl/source/filter/wmf/emfwr.cxx   |2 
 vcl/source/font/font.cxx  |   64 ++-
 8 files changed, 286 insertions(+), 36 deletions(-)

New commits:
commit 593e4f5b92619d9d44dc3cb79f8b5088ef8276af
Author: Armin Le Grand (Allotropia) 
AuthorDate: Tue Feb 23 14:24:24 2021 +0100
Commit: Armin Le Grand 
CommitDate: Thu Mar 11 21:09:05 2021 +0100

tdf#127471 Detect&Correct EMF/WMF with wrong FontScale

Before correcting our EMF/WMF export to write the Windows-
specific data in the case of FontScaling, we wrote these
files with wrong FontScaling.
This change tries to detect and correct this at import, so
that newer versions of the office on all plattforms can
again load old, from us but not on Windows written EMF/WMF
files.
With this change we can read again all new and old EMF/WMF
files (see table in task, comment 80).

Change-Id: I1a0b0ab5f57c7cd40520401568af05cab4ecb4c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111399
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 
(cherry picked from commit 3d33e4ce3987ea17e73a72e84f7f0df7af8101a6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/11

diff --git a/emfio/inc/mtftools.hxx b/emfio/inc/mtftools.hxx
index 70471b66ea21..286442767d3a 100644
--- a/emfio/inc/mtftools.hxx
+++ b/emfio/inc/mtftools.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "emfiodllapi.h"
 
@@ -259,6 +260,8 @@ namespace emfio
 #define HUNDREDTH_MILLIMETERS_PER_MILLIINCH 2.54
 #define MILLIINCH_PER_TWIPS   1.44
 
+class MetaFontAction;
+
 // WmfReader ==
 
 namespace emfio
@@ -458,6 +461,24 @@ namespace emfio
 {}
 };
 
+// tdf#127471 implement detection and correction of wrongly scaled
+// fonts in own-written, old (before this fix) EMF/WMF files
+class ScaledFontDetectCorrectHelper
+{
+private:
+rtl::Reference  
maCurrentMetaFontAction;
+std::vector 
maAlternativeFontScales;
+std::vector, double>>  
maPositiveIdentifiedCases;
+std::vector, double>>  
maNegativeIdentifiedCases;
+
+public:
+ScaledFontDetectCorrectHelper();
+void endCurrentMetaFontAction();
+void newCurrentMetaFontAction(rtl::Reference& 
rNewMetaFontAction);
+void evaluateAlternativeFontScale(OUString const & rText, tools::Long 
nImportedTextLength);
+void applyAlternativeFontScale();
+};
+
 class MtfTools
 {
 MtfTools(MtfTools const &) = delete;
@@ -521,6 +542,9 @@ namespace emfio
 sal_uInt32  mnEndPos;
 std::vector>maBmpSaveList;
 
+// tdf#127471 always try to detect - only used with ScaledText
+ScaledFontDetectCorrectHelper maScaledFontHelper;
+
 boolmbNopMode : 1;
 boolmbFillStyleSelected : 1;
 boolmbClipNeedsUpdate : 1;
diff --git a/emfio/source/reader/emfreader.cxx 
b/emfio/source/reader/emfreader.cxx
index b1d3ae4394da..5dfd2ffbe76c 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -2034,6 +2034,10 @@ namespace emfio
 }
 mpInputStream->Seek( nNextPos );
 }
+
+// tdf#127471
+maScaledFontHelper.applyAlternativeFontScale();
+
 if( !maBmpSaveList.empty() )
 ResolveBitmapActions( maBmpSaveList );
 
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index 7a462cc659dd..94ddcd549cec 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -299,6 +299,184 @@ namespace emfio
 #endif
 };
 
+// tdf#127471
+ScaledFontDetectCorrectHelper::ScaledFontDetectCorrectHelper()
+:   maCurrentMetaFontAction(),
+maAlternativeFontScales(),
+maPositiveIdentifiedCases(),
+maNegativeIdentifiedCases()
+{
+}
+
+void ScaledFontDetectCorrectHelper::endCurrentMetaFontAction()
+{
+if(maCurrentMetaFontAction.is() && !maAlternativeFontScales.empty())
+{
+// create average corrected FontScale value and count
+// positive/negative hits
+sal_uInt32 nPositive(0);
+sal_uInt32 nNegative(0);
+double fAverage(0.0);
+
+for(double fPart : maAlternativeFontScales)
+{
+if(fPart < 0.0)
+{
+nNegative++;
+fAverage += -fPart;
+}
+else
+   

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

2021-03-11 Thread Caolán McNamara (via logerrit)
 drawinglayer/source/primitive2d/controlprimitive2d.cxx |   23 +
 1 file changed, 7 insertions(+), 16 deletions(-)

New commits:
commit 204a70f568cef3d9c685112d1c32f053a91469ca
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 14:30:29 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 20:27:26 2021 +0100

use VCLUnoHelper::GetWindow

instead of directly using VCLXWindow

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

diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx 
b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index 3f20baa1351f..7ccc9660c78c 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -34,7 +35,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -144,25 +144,16 @@ namespace drawinglayer::primitive2d
 
 if(xControl.is())
 {
-uno::Reference< awt::XWindowPeer > 
xWindowPeer(xControl->getPeer());
+uno::Reference 
xWindowPeer(xControl->getPeer());
 
-if(xWindowPeer.is())
+VclPtr pWindow = 
VCLUnoHelper::GetWindow(xWindowPeer);
+if (pWindow)
 {
-VCLXWindow* pVCLXWindow = 
comphelper::getUnoTunnelImplementation(xWindowPeer);
+pWindow = pWindow->GetParent();
 
-if(pVCLXWindow)
+if(pWindow && MapUnit::Map100thMM == 
pWindow->GetMapMode().GetMapUnit())
 {
-VclPtr pWindow = 
pVCLXWindow->GetWindow();
-
-if(pWindow)
-{
-pWindow = pWindow->GetParent();
-
-if(pWindow && 
MapUnit::Map100thMM == pWindow->GetMapMode().GetMapUnit())
-{
-bUserIs100thmm = true;
-}
-}
+bUserIs100thmm = true;
 }
 }
 }
___
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

2021-03-11 Thread Caolán McNamara (via logerrit)
 include/svx/fmtools.hxx |2 +-
 svx/source/form/formcontrolling.cxx |5 +++--
 svx/source/inc/formcontroller.hxx   |6 +++---
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 76867304b550af5c44c1fd6b82928fb2b69addc7
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 11:24:32 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 20:25:41 2021 +0100

use an explicit parent for error message

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

diff --git a/include/svx/fmtools.hxx b/include/svx/fmtools.hxx
index b00b33cb0443..97d6fcff0d05 100644
--- a/include/svx/fmtools.hxx
+++ b/include/svx/fmtools.hxx
@@ -52,7 +52,7 @@ namespace vcl { class Window; }
 void displayException(const css::sdbc::SQLException&, vcl::Window* _pParent);
 SVXCORE_DLLPUBLIC void displayException(const css::sdb::SQLContext&, 
vcl::Window* _pParent);
 void displayException(const css::sdb::SQLErrorEvent&, vcl::Window* _pParent);
-void displayException(const css::uno::Any&, vcl::Window* _pParent = nullptr);
+void displayException(const css::uno::Any&, vcl::Window* _pParent);
 
 sal_Int32 getElementPos(const css::uno::Reference< 
css::container::XIndexAccess>& xCont, const css::uno::Reference< 
css::uno::XInterface>& xElement);
 
diff --git a/svx/source/form/formcontrolling.cxx 
b/svx/source/form/formcontrolling.cxx
index c18a0f6c373b..456e5a88ffbf 100644
--- a/svx/source/form/formcontrolling.cxx
+++ b/svx/source/form/formcontrolling.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -353,9 +354,9 @@ namespace svx
 
 // display the error. Prefer the one reported in errorOccurred over 
the one caught.
 if ( m_aOperationError.hasValue() )
-displayException( m_aOperationError );
+displayException(m_aOperationError, 
svxform::FormController::getDialogParentWindow(m_xFormOperations->getController()));
 else if ( aError.hasValue() )
-displayException( aError );
+displayException(aError, 
svxform::FormController::getDialogParentWindow(m_xFormOperations->getController()));
 else
 OSL_FAIL( "FormControllerHelper::impl_operateForm_nothrow: no 
success, but no error?" );
 
diff --git a/svx/source/inc/formcontroller.hxx 
b/svx/source/inc/formcontroller.hxx
index 6ed3ffeb2c4c..c25dd5d808ac 100644
--- a/svx/source/inc/formcontroller.hxx
+++ b/svx/source/inc/formcontroller.hxx
@@ -197,6 +197,9 @@ namespace svxform
 public:
 FormController( const css::uno::Reference< css::uno::XComponentContext 
> & _rxORB );
 
+// returns the window which should be used as parent window for dialogs
+static vcl::Window* 
getDialogParentWindow(css::uno::Reference 
xFormController);
+
 private:
 virtual ~FormController() override;
 
@@ -507,9 +510,6 @@ namespace svxform
 bool isLocked() const {return m_bLocked;}
 bool determineLockState() const;
 
-// returns the window which should be used as parent window for dialogs
-static vcl::Window* 
getDialogParentWindow(css::uno::Reference 
xFormController);
-
 css::uno::Reference< css::frame::XDispatchProviderInterceptor>
createInterceptor(const css::uno::Reference< 
css::frame::XDispatchProviderInterception>& _xInterception);
 // create a new interceptor, register it on the given object
 voiddeleteInterceptor(const 
css::uno::Reference< css::frame::XDispatchProviderInterception>& 
_xInterception);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Caolán McNamara (via logerrit)
 svx/source/form/formcontroller.cxx |   17 +++--
 svx/source/inc/formcontroller.hxx  |4 ++--
 2 files changed, 9 insertions(+), 12 deletions(-)

New commits:
commit b7bcb17311ea99d1849f87e329add0eff5f6fc75
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 11:21:24 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 20:25:14 2021 +0100

refactor getDialogParentWindow to take an XFormController arg

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

diff --git a/svx/source/form/formcontroller.cxx 
b/svx/source/form/formcontroller.cxx
index c1ee3954cdc4..15b318e8f8d6 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -3265,7 +3265,7 @@ void FormController::startFiltering()
 // create a filter control
 Reference< XControl > xFilterControl = 
form::control::FilterControl::createWithFormat(
 m_xComponentContext,
-VCLUnoHelper::GetInterface( getDialogParentWindow() ),
+VCLUnoHelper::GetInterface( 
getDialogParentWindow(this) ),
 xFormatter,
 xModel);
 
@@ -3435,7 +3435,6 @@ Sequence< OUString > SAL_CALL 
FormController::getSupportedModes()
 return aModes;
 }
 
-
 sal_Bool SAL_CALL FormController::supportsMode(const OUString& Mode)
 {
 ::osl::MutexGuard aGuard( m_aMutex );
@@ -3445,14 +3444,12 @@ sal_Bool SAL_CALL FormController::supportsMode(const 
OUString& Mode)
 return comphelper::findValue(aModes, Mode) != -1;
 }
 
-
-vcl::Window* FormController::getDialogParentWindow()
+vcl::Window* 
FormController::getDialogParentWindow(css::uno::Reference
 xFormController)
 {
-OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" 
);
 vcl::Window* pParentWindow = nullptr;
 try
 {
-Reference< XControl > xContainerControl( getContainer(), 
UNO_QUERY_THROW );
+Reference< XControl > xContainerControl( 
xFormController->getContainer(), UNO_QUERY_THROW );
 Reference< XWindowPeer > xContainerPeer( xContainerControl->getPeer(), 
UNO_SET_THROW );
 pParentWindow = VCLUnoHelper::GetWindow( xContainerPeer );
 }
@@ -3621,7 +3618,7 @@ sal_Bool SAL_CALL FormController::approveRowChange(const 
RowChangeEvent& _rEvent
 {
 Reference< XControl > xControl( locateControl( xInvalidModel ) );
 aGuard.clear();
-displayErrorSetFocus( sInvalidityExplanation, xControl, 
getDialogParentWindow() );
+displayErrorSetFocus( sInvalidityExplanation, xControl, 
getDialogParentWindow(this) );
 return false;
 }
 
@@ -3667,7 +3664,7 @@ sal_Bool SAL_CALL FormController::approveRowChange(const 
RowChangeEvent& _rEvent
 xControl.set( rColInfo.xFirstGridWithInputRequiredColumn, 
UNO_QUERY );
 
 aGuard.clear();
-displayErrorSetFocus( sMessage, 
rColInfo.xFirstControlWithInputRequired, getDialogParentWindow() );
+displayErrorSetFocus( sMessage, 
rColInfo.xFirstControlWithInputRequired, getDialogParentWindow(this) );
 return false;
 }
 }
@@ -3749,7 +3746,7 @@ void SAL_CALL FormController::errorOccured(const 
SQLErrorEvent& aEvent)
 else
 {
 aGuard.clear();
-displayException(aEvent, getDialogParentWindow());
+displayException(aEvent, getDialogParentWindow(this));
 }
 }
 
@@ -4121,7 +4118,7 @@ bool FormController::ensureInteractionHandler()
 m_bAttemptedHandlerCreation = true;
 
 m_xInteractionHandler = 
InteractionHandler::createWithParent(m_xComponentContext,
- 
VCLUnoHelper::GetInterface(getDialogParentWindow()));
+ 
VCLUnoHelper::GetInterface(getDialogParentWindow(this)));
 return m_xInteractionHandler.is();
 }
 
diff --git a/svx/source/inc/formcontroller.hxx 
b/svx/source/inc/formcontroller.hxx
index 065852fe9c3a..6ed3ffeb2c4c 100644
--- a/svx/source/inc/formcontroller.hxx
+++ b/svx/source/inc/formcontroller.hxx
@@ -507,8 +507,8 @@ namespace svxform
 bool isLocked() const {return m_bLocked;}
 bool determineLockState() const;
 
-vcl::Window* getDialogParentWindow();
-// returns the window which should be used as parent window for 
dialogs
+// returns the window which should be used as parent window for dialogs
+static vcl::Window* 
getDialogParentWindow(css::uno::Reference 
xFormController);
 
 css::uno::Reference< css::frame::XDispatchProviderInterceptor>
createInterceptor(const css::uno::Reference< 
css::frame::XDispatchProviderInterception>& _xInterception);
 // create a new interceptor, register it on the given object
___

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

2021-03-11 Thread Caolán McNamara (via logerrit)
 include/svx/fmtools.hxx |2 +-
 svx/source/form/fmvwimp.cxx |7 +--
 2 files changed, 2 insertions(+), 7 deletions(-)

New commits:
commit 4fa2abb5e013738b0f7780a7eb29acdce24794b8
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 10:53:08 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 20:24:36 2021 +0100

use an explicit parent for error message

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

diff --git a/include/svx/fmtools.hxx b/include/svx/fmtools.hxx
index 90eb6d74c49c..b00b33cb0443 100644
--- a/include/svx/fmtools.hxx
+++ b/include/svx/fmtools.hxx
@@ -51,7 +51,7 @@ namespace vcl { class Window; }
 // display info about a simple css::sdbc::SQLException
 void displayException(const css::sdbc::SQLException&, vcl::Window* _pParent);
 SVXCORE_DLLPUBLIC void displayException(const css::sdb::SQLContext&, 
vcl::Window* _pParent);
-void displayException(const css::sdb::SQLErrorEvent&, vcl::Window* _pParent = 
nullptr);
+void displayException(const css::sdb::SQLErrorEvent&, vcl::Window* _pParent);
 void displayException(const css::uno::Any&, vcl::Window* _pParent = nullptr);
 
 sal_Int32 getElementPos(const css::uno::Reference< 
css::container::XIndexAccess>& xCont, const css::uno::Reference< 
css::uno::XInterface>& xElement);
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index f776d28ab4d7..8a52fbefb118 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -565,7 +565,6 @@ void FmXFormView::removeWindow( const Reference< 
XControlContainer >& _rxCC )
 }
 }
 
-
 void FmXFormView::displayAsyncErrorMessage( const SQLErrorEvent& _rEvent )
 {
 DBG_ASSERT( nullptr == m_nErrorMessageEvent, 
"FmXFormView::displayAsyncErrorMessage: not too fast, please!" );
@@ -575,28 +574,24 @@ void FmXFormView::displayAsyncErrorMessage( const 
SQLErrorEvent& _rEvent )
 m_nErrorMessageEvent = Application::PostUserEvent( LINK( this, 
FmXFormView, OnDelayedErrorMessage ) );
 }
 
-
 IMPL_LINK_NOARG(FmXFormView, OnDelayedErrorMessage, void*, void)
 {
 m_nErrorMessageEvent = nullptr;
-displayException( m_aAsyncError );
+displayException(m_aAsyncError, 
VCLUnoHelper::GetWindow(GetParentWindow()));
 }
 
-
 void FmXFormView::onFirstViewActivation( const FmFormModel* _pDocModel )
 {
 if ( _pDocModel && _pDocModel->GetAutoControlFocus() )
 m_nAutoFocusEvent = Application::PostUserEvent( LINK( this, 
FmXFormView, OnAutoFocus ) );
 }
 
-
 void FmXFormView::suspendTabOrderUpdate()
 {
 OSL_ENSURE( !m_isTabOrderUpdateSuspended, 
"FmXFormView::suspendTabOrderUpdate: nesting not allowed!" );
 m_isTabOrderUpdateSuspended = true;
 }
 
-
 void FmXFormView::resumeTabOrderUpdate()
 {
 OSL_ENSURE( m_isTabOrderUpdateSuspended, 
"FmXFormView::resumeTabOrderUpdate: not suspended!" );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Caolán McNamara (via logerrit)
 svx/source/form/fmvwimp.cxx |9 +++--
 svx/source/inc/fmvwimp.hxx  |2 ++
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 7946225280bfac1a04d73c69ff3eda8ac8b4e820
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 10:51:48 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 20:24:17 2021 +0100

factor out a FmXFormView::GetParentWindow

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

diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 4bc1c96fb13c..f776d28ab4d7 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -1014,6 +1014,12 @@ void FmXFormView::breakCreateFormObject()
 m_xLastCreatedControlModel.clear();
 }
 
+Reference FmXFormView::GetParentWindow()
+{
+const vcl::Window* pCurrentWindow = m_pView ? dynamic_cast(m_pView->GetActualOutDev()) : nullptr;
+return 
VCLUnoHelper::GetInterface(const_cast(pCurrentWindow));
+}
+
 IMPL_LINK_NOARG( FmXFormView, OnStartControlWizard, void*, void )
 {
 m_nControlWizardEvent = nullptr;
@@ -1051,8 +1057,7 @@ IMPL_LINK_NOARG( FmXFormView, OnStartControlWizard, 
void*, void )
 // build the argument list
 ::comphelper::NamedValueCollection aWizardArgs;
 aWizardArgs.put("ObjectModel", m_xLastCreatedControlModel);
-const vcl::Window* pCurrentWindow = m_pView ? dynamic_cast(m_pView->GetActualOutDev()) : nullptr;
-aWizardArgs.put("ParentWindow", 
VCLUnoHelper::GetInterface(const_cast(pCurrentWindow)));
+aWizardArgs.put("ParentWindow", GetParentWindow());
 
 // create the wizard object
 Reference< XExecutableDialog > xWizard;
diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx
index 36f1dcda1883..62291ad8b195 100644
--- a/svx/source/inc/fmvwimp.hxx
+++ b/svx/source/inc/fmvwimp.hxx
@@ -172,6 +172,8 @@ class FmXFormView : public ::cppu::WeakImplHelper<
 
 FmFormShell* GetFormShell() const;
 
+css::uno::Reference GetParentWindow();
+
 protected:
 FmXFormView( FmFormView* _pView );
 virtual ~FmXFormView() override;
___
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' - helpcontent2

2021-03-11 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9393382edfb36626bb6d8a40539f410404a3a679
Author: Seth Chaiklin 
AuthorDate: Thu Mar 11 19:10:29 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Mar 11 19:10:29 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'libreoffice-7-1'
  to 84fc53d74283a053b3002d9108a1760369b6b606
  - tdf#140395 remove "blinking" control from font effects

   The "blinking" property was removed from the UI
   (see tdf#132373). This patch removes the property
   from the help page, along with its bookmarks.

Change-Id: I3b1317e7664e3bcd1813a0d0882eff109ede95fd
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/112293
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins
(cherry picked from commit a50530fe4e224b01f37cd9c959d3bded32b8bd6a)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/112302
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index 2ddcf60f46ab..84fc53d74283 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 2ddcf60f46abe8a99afeffd5f4d1794609784682
+Subproject commit 84fc53d74283a053b3002d9108a1760369b6b606
___
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

2021-03-11 Thread Seth Chaiklin (via logerrit)
 source/text/shared/01/05020200.xhp |7 ---
 1 file changed, 7 deletions(-)

New commits:
commit 84fc53d74283a053b3002d9108a1760369b6b606
Author: Seth Chaiklin 
AuthorDate: Thu Mar 11 01:44:30 2021 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Mar 11 19:10:29 2021 +0100

tdf#140395 remove "blinking" control from font effects

   The "blinking" property was removed from the UI
   (see tdf#132373). This patch removes the property
   from the help page, along with its bookmarks.

Change-Id: I3b1317e7664e3bcd1813a0d0882eff109ede95fd
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/112293
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins
(cherry picked from commit a50530fe4e224b01f37cd9c959d3bded32b8bd6a)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/112302
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/shared/01/05020200.xhp 
b/source/text/shared/01/05020200.xhp
index aa2c6d1a0..6e332364f 100644
--- a/source/text/shared/01/05020200.xhp
+++ b/source/text/shared/01/05020200.xhp
@@ -145,13 +145,6 @@
  
   
  
- Draw and Impress do not have the Blinking and Hidden 
controls
- blinking fonts
-  flashing fonts
-
-
-Blinking
-  Makes the selected characters blink. You 
cannot change the blink frequency.
 
 Hidden
   Hides the selected characters. To 
display the hidden text, ensure that Formatting Marks is 
selected in the View menu. You can also choose %PRODUCTNAME - 
Preferences
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Caolán McNamara (via logerrit)
 include/vcl/transfer.hxx  |2 +-
 sc/source/ui/view/gridwin.cxx |3 +--
 sd/source/ui/view/drviews4.cxx|2 +-
 sw/source/uibase/docvw/edtwin.cxx |2 +-
 vcl/source/treelist/transfer.cxx  |6 +-
 5 files changed, 5 insertions(+), 10 deletions(-)

New commits:
commit 417c0c7b711fbd82a874c8f43c1b2a8f4631e236
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 10:22:42 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 18:36:16 2021 +0100

TransferableDataHelper::CreateFromSelection doesn't use its argument

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

diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx
index cd2b58fc29b6..c94b005b13fa 100644
--- a/include/vcl/transfer.hxx
+++ b/include/vcl/transfer.hxx
@@ -366,7 +366,7 @@ public:
 
 static TransferableDataHelper   CreateFromClipboard(const 
css::uno::Reference& rClipboard);
 static TransferableDataHelper   CreateFromSystemClipboard( vcl::Window * 
pWindow );
-static TransferableDataHelper   CreateFromSelection( vcl::Window * pWindow 
);
+static TransferableDataHelper   CreateFromPrimarySelection();
 static bool IsEqual( const 
css::datatransfer::DataFlavor& rInternalFlavor,
  const 
css::datatransfer::DataFlavor& rRequestFlavor );
 };
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index f3a543075b9d..790ab75713b0 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4519,8 +4519,7 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel 
)
 else
 {
 //  get selection from system
-
-TransferableDataHelper aDataHelper( 
TransferableDataHelper::CreateFromSelection( this ) );
+TransferableDataHelper 
aDataHelper(TransferableDataHelper::CreateFromPrimarySelection());
 const uno::Reference& xTransferable = 
aDataHelper.GetTransferable();
 if ( xTransferable.is() )
 {
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index fa8d9672e2d5..62e23e5b8e7e 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -493,7 +493,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, 
::sd::Window* pWin)
 
 if( rCEvt.GetCommand() == CommandEventId::PasteSelection && !bNativeShow )
 {
-TransferableDataHelper aDataHelper( 
TransferableDataHelper::CreateFromSelection( GetActiveWindow() ) );
+TransferableDataHelper 
aDataHelper(TransferableDataHelper::CreateFromPrimarySelection());
 
 if( aDataHelper.GetTransferable().is() )
 {
diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index 05595d9a23ff..1f95f9bdea31 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5605,7 +5605,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
 if( !m_rView.GetDocShell()->IsReadOnly() )
 {
 TransferableDataHelper aDataHelper(
-TransferableDataHelper::CreateFromSelection( this ));
+TransferableDataHelper::CreateFromPrimarySelection());
 if( !aDataHelper.GetXTransferable().is() )
 break;
 
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index 56c38019ab3b..bee628edc60b 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -2170,11 +2170,8 @@ TransferableDataHelper 
TransferableDataHelper::CreateFromSystemClipboard( vcl::W
 return CreateFromClipboard(xClipboard);
 }
 
-
-TransferableDataHelper TransferableDataHelper::CreateFromSelection( 
vcl::Window* pWindow )
+TransferableDataHelper TransferableDataHelper::CreateFromPrimarySelection()
 {
-DBG_ASSERT( pWindow, "Window pointer is NULL" );
-
 Reference< XClipboard > xSelection(GetSystemPrimarySelection());
 TransferableDataHelper   aRet;
 
@@ -2200,7 +2197,6 @@ TransferableDataHelper 
TransferableDataHelper::CreateFromSelection( vcl::Window*
 return aRet;
 }
 
-
 bool TransferableDataHelper::IsEqual( const css::datatransfer::DataFlavor& 
rInternalFlavor,
   const css::datatransfer::DataFlavor& 
rRequestFlavor )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/querydesign/TableFieldDescription.cxx |1 
 svx/source/inc/fmshimp.hxx   |3 
 sw/source/core/access/accmap.cxx |   47 ---
 sw/source/uibase/utlui/shdwcrsr.cxx  |1 
 4 files changed, 2 insertions(+), 50 deletions(-)

New commits:
commit 1b72bc8f0627fb934a25de63c8c789fd725d
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 10:18:45 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 18:35:48 2021 +0100

remove some unneeded vcl/window.hxx includes

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

diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx 
b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
index 95476cafd51e..c8f0a402218f 100644
--- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
+++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 
 using namespace ::com::sun::star::sdbc;
 using namespace ::com::sun::star::uno;
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index 23bb34cc3a43..4c296ed820b7 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -36,7 +36,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -55,6 +54,8 @@
 #include 
 #include 
 
+struct ImplSVEvent;
+
 typedef std::vector< css::uno::Reference< css::form::XForm > > FmFormArray;
 
 // catch database exceptions if they occur
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 95c1891057f6..5605d23ca75d 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1656,53 +1656,6 @@ void SwAccessibleMap::DoInvalidateShapeSelection(bool 
bInvalidateFocusMode /*=fa
 }
 }
 
-//Merge with DoInvalidateShapeSelection
-/*
-void SwAccessibleMap::DoInvalidateShapeFocus()
-{
-const SwViewShell *pVSh = GetShell();
-const SwFEShell *pFESh = dynamic_cast( pVSh) !=  nullptr 
?
-static_cast< const SwFEShell * >( pVSh ) : nullptr;
-const size_t nSelShapes = pFESh ? pFESh->IsObjSelected() : 0;
-
-if( nSelShapes != 1 )
-return;
-
-SwAccessibleObjShape_Impl *pShapes = nullptr;
-SwAccessibleObjShape_Impl *pSelShape = nullptr;
-size_t nShapes = 0;
-
-{
-osl::MutexGuard aGuard( maMutex );
-if( mpShapeMap )
-pShapes = mpShapeMap->Copy( nShapes, pFESh, &pSelShape );
-}
-
-if( pShapes )
-{
-vcl::Window *pWin = GetShell()->GetWin();
-bool bFocused = pWin && pWin->HasFocus();
-SwAccessibleObjShape_Impl  *pShape = pShapes;
-while( nShapes )
-{
-if( pShape->second.is() )
-{
-if( bFocused && pShape >= pSelShape )
-pShape->second->SetState( AccessibleStateType::FOCUSED );
-else
-pShape->second->ResetState( AccessibleStateType::FOCUSED );
-}
-
---nShapes;
-++pShape;
-}
-
-delete[] pShapes;
-}
-}
-
-*/
-
 SwAccessibleMap::SwAccessibleMap( SwViewShell *pSh ) :
 mpVSh( pSh ),
 mbShapeSelected( false ),
diff --git a/sw/source/uibase/utlui/shdwcrsr.cxx 
b/sw/source/uibase/utlui/shdwcrsr.cxx
index 72b313fb7d0d..2a9b2a9f3d99 100644
--- a/sw/source/uibase/utlui/shdwcrsr.cxx
+++ b/sw/source/uibase/utlui/shdwcrsr.cxx
@@ -18,7 +18,6 @@
  */
 
 #include 
-#include 
 #include 
 
 using namespace ::com::sun::star;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Caolán McNamara (via logerrit)
 include/sfx2/objsh.hxx   |4 ++--
 sfx2/source/appl/appopen.cxx |6 +++---
 sfx2/source/doc/objcont.cxx  |4 +---
 sfx2/source/doc/objmisc.cxx  |   24 +++-
 4 files changed, 21 insertions(+), 17 deletions(-)

New commits:
commit 3f66a801aeab257705922998e518398d27e4d698
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 09:52:56 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 18:35:27 2021 +0100

keep SfxObjectShell::GetDialogParent ret as an awt::XWindow

instead of extracting the vcl::Window impl details from it

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

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index b21f7bf4bb69..40715f29e6ac 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -88,7 +88,7 @@ namespace sfx2
 class StyleManager;
 }
 
-namespace vcl { class Window; }
+namespace com::sun::star::awt { class XWindow; }
 namespace com::sun::star::beans { struct PropertyValue; }
 namespace com::sun::star::document { struct CmisVersion; }
 namespace com::sun::star::document { class XDocumentProperties; }
@@ -574,7 +574,7 @@ public:
 
 virtual css::uno::Sequence< OUString > GetEventNames();
 
-vcl::Window*GetDialogParent( SfxMedium const * 
pMedium=nullptr );
+css::uno::Reference GetDialogParent(SfxMedium const* 
pMedium = nullptr);
 static SfxObjectShell*  CreateObject( const OUString& rServiceName, 
SfxObjectCreateMode = SfxObjectCreateMode::STANDARD );
 static SfxObjectShell*  CreateObjectByFactoryName( const OUString& 
rURL, SfxObjectCreateMode = SfxObjectCreateMode::STANDARD );
 static css::uno::Reference< css::lang::XComponent >
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 4a6c1f403bbb..025316846d3d 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -206,9 +206,9 @@ ErrCode CheckPasswd_Impl
 
 if ( bIsEncrypted )
 {
-vcl::Window* pWin = pDoc ? pDoc->GetDialogParent( pFile ) 
: nullptr;
-if ( pWin )
-pWin->Show();
+css::uno::Reference xWin(pDoc ? 
pDoc->GetDialogParent(pFile) : nullptr);
+if (xWin)
+xWin->setVisible(true);
 
 nRet = ERRCODE_SFX_CANTGETPASSWD;
 
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 04255063fd3f..f7f69f595e85 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -26,7 +26,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -523,8 +522,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl(  )
 else if ( bCanUpdateFromTemplate == 
document::UpdateDocMode::ACCORDING_TO_CONFIG )
 {
 const OUString sMessage( 
SfxResId(STR_QRYTEMPL_MESSAGE).replaceAll( "$(ARG1)", aTemplName ) );
-vcl::Window *pWin = GetDialogParent();
-QueryTemplateBox aBox(pWin ? pWin->GetFrameWeld() : nullptr, 
sMessage);
+QueryTemplateBox 
aBox(Application::GetFrameWeld(GetDialogParent()), sMessage);
 if (RET_YES == aBox.run())
 bLoad = true;
 }
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index b4321576b3b8..81298eb8ff11 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -1602,18 +1603,18 @@ bool SfxObjectShell::AdjustMacroMode()
 return pImpl->aMacroMode.adjustMacroMode( xInteraction );
 }
 
-vcl::Window* SfxObjectShell::GetDialogParent( SfxMedium const * pLoadingMedium 
)
+css::uno::Reference SfxObjectShell::GetDialogParent( 
SfxMedium const * pLoadingMedium )
 {
-VclPtr pWindow;
+css::uno::Reference xWindow;
 SfxItemSet* pSet = pLoadingMedium ? pLoadingMedium->GetItemSet() : 
GetMedium()->GetItemSet();
 const SfxUnoFrameItem* pUnoItem = 
SfxItemSet::GetItem(pSet, SID_FILLFRAME, false);
 if ( pUnoItem )
 {
 const uno::Reference < frame::XFrame >& xFrame( pUnoItem->GetFrame() );
-pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() );
+xWindow = xFrame->getContainerWindow();
 }
 
-if ( !pWindow )
+if (!xWindow)
 {
 SfxFrame* pFrame = nullptr;
 const SfxFrameItem* pFrameItem = 
SfxItemSet::GetItem(pSet, SID_DOCFRAME, false);
@@ -1632,22 +1633,27 @@ vcl::Window* SfxObjectShell::GetDialogParent( SfxMedium 
const * pLoadingMedium )
 }
 
 if ( pFrame )
+{
 // get topmost window
-pWindow = VCLUnoHelper::GetWindow( 
pFrame->GetFrameInterface()->getContainerWindow() );
+xWindow = pFrame->GetFrameInte

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

2021-03-11 Thread Caolán McNamara (via logerrit)
 sfx2/source/appl/childwin.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3dfb8552eb84eaf831c4c3eb59c398afc87e9174
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 09:26:10 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 18:34:35 2021 +0100

check current floating state of DockingWindow

regression from...

commit cf234dc05a3a75199890e953d789bd19b02c1725
Date:   Tue Mar 9 20:15:28 2021 +

rename SfxChildWindowContext::GetFloatingWindow to what it does

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

diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 35d3f2ecbaf2..b60c53486a3f 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -438,7 +438,7 @@ bool ParentIsFloatingWindow(vcl::Window *pParent)
 if (!pParent)
 return false;
 if (pParent->GetType() == WindowType::DOCKINGWINDOW || pParent->GetType() 
== WindowType::TOOLBOX)
-return true;
+return static_cast(pParent)->GetFloatingWindow() != 
nullptr;
 if (pParent->GetType() == WindowType::FLOATINGWINDOW)
 return true;
 return false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sfx2 include/svx include/vcl sfx2/source svtools/source svx/source sw/source vcl/source

2021-03-11 Thread Caolán McNamara (via logerrit)
 include/sfx2/ipclient.hxx  |3 ++-
 include/sfx2/lokcharthelper.hxx|3 ++-
 include/sfx2/tbxctrl.hxx   |3 ++-
 include/svx/AccessibleShapeTreeInfo.hxx|3 ++-
 include/svx/ImageMapInfo.hxx   |2 +-
 include/vcl/vclenum.hxx|   13 +
 include/vcl/waitobj.hxx|9 ++---
 include/vcl/window.hxx |   13 -
 sfx2/source/doc/objxtor.cxx|1 -
 sfx2/source/view/userinputinterception.cxx |2 --
 sfx2/source/view/viewfrm2.cxx  |1 -
 svtools/source/misc/langhelp.cxx   |1 -
 svtools/source/table/mousefunction.cxx |2 --
 svx/source/sdr/misc/ImageMapInfo.cxx   |   12 ++--
 svx/source/table/accessiblecell.cxx|1 +
 sw/source/core/access/accdoc.hxx   |1 +
 vcl/source/window/window3.cxx  |7 +++
 17 files changed, 39 insertions(+), 38 deletions(-)

New commits:
commit 071df4770dfe421d96d3df748af751eaae6982c3
Author: Caolán McNamara 
AuthorDate: Wed Mar 10 20:48:37 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 18:34:17 2021 +0100

use some forward declares to reduce includes

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

diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx
index 438807a0020d..180f67b54588 100644
--- a/include/sfx2/ipclient.hxx
+++ b/include/sfx2/ipclient.hxx
@@ -26,11 +26,12 @@
 
 #include 
 
-#include 
 #include 
+#include 
 
 namespace com::sun::star::embed { class XEmbeddedObject; }
 namespace com::sun::star::uno { template  class Reference; }
+namespace vcl { class Window; }
 
 class SfxInPlaceClient_Impl;
 class SfxViewShell;
diff --git a/include/sfx2/lokcharthelper.hxx b/include/sfx2/lokcharthelper.hxx
index 020abad111f0..319af8c35da5 100644
--- a/include/sfx2/lokcharthelper.hxx
+++ b/include/sfx2/lokcharthelper.hxx
@@ -12,10 +12,11 @@
 
 #include 
 #include 
-#include 
+#include 
 
 namespace com::sun::star::frame { class XController; }
 namespace com::sun::star::frame { class XDispatch; }
+namespace vcl { class Window; }
 
 class SfxViewShell;
 class VirtualDevice;
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index 65d44088629e..7150d64adbcf 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -25,11 +25,12 @@
 #include 
 #include 
 #include 
-#include 
 #include 
+#include 
 
 namespace com::sun::star::frame { class XDispatchProvider; }
 namespace com::sun::star::frame { class XFrame; }
+namespace vcl { class Window; }
 
 class InterimItemWindow;
 class SfxToolBoxControl;
diff --git a/include/svx/AccessibleShapeTreeInfo.hxx 
b/include/svx/AccessibleShapeTreeInfo.hxx
index f9da042b63d8..f50061ad47f4 100644
--- a/include/svx/AccessibleShapeTreeInfo.hxx
+++ b/include/svx/AccessibleShapeTreeInfo.hxx
@@ -22,13 +22,14 @@
 
 #include 
 #include 
-#include 
+#include 
 
 namespace com::sun::star {
 namespace accessibility { class XAccessibleComponent; }
 namespace document { class XShapeEventBroadcaster; }
 namespace frame { class XController; }
 }
+namespace vcl { class Window; }
 
 class SdrView;
 
diff --git a/include/svx/ImageMapInfo.hxx b/include/svx/ImageMapInfo.hxx
index 7cd8f4f1780a..0e12df24dd6d 100644
--- a/include/svx/ImageMapInfo.hxx
+++ b/include/svx/ImageMapInfo.hxx
@@ -49,7 +49,7 @@ public:
 
 static SvxIMapInfo* GetIMapInfo(const SdrObject* pObject);
 static IMapObject* GetHitIMapObject(const SdrObject* pObj, const Point& 
rWinPoint,
-const vcl::Window* rCmpWnd = nullptr);
+const OutputDevice* pCmpWnd = nullptr);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index 251b5bdba1ea..d0c56ea43090 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -387,6 +387,19 @@ namespace o3tl
 template<> struct typed_flags : 
is_typed_flags {};
 }
 
+// Flags for Window::Show()
+enum class ShowFlags
+{
+NONE   = 0x,
+NoFocusChange  = 0x0002,
+NoActivate = 0x0004,
+ForegroundTask = 0x0008,
+};
+namespace o3tl
+{
+template<> struct typed_flags : is_typed_flags {};
+}
+
 #endif // INCLUDED_VCL_VCLENUM_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/waitobj.hxx b/include/vcl/waitobj.hxx
index 682153a1e892..cd6b0c5cfe95 100644
--- a/include/vcl/waitobj.hxx
+++ b/include/vcl/waitobj.hxx
@@ -33,13 +33,8 @@ class VCL_DLLPUBLIC WaitObject
 private:
 VclPtr  mpWindow;
 public:
-WaitObject( vcl::Window* pWindow )
-{
-mpWindow = pWindow;
-if ( mpW

[Libreoffice-commits] core.git: chart2/source comphelper/source include/comphelper include/sfx2 include/svx officecfg/registry sc/qa sc/source sd/qa sd/source sfx2/inc sfx2/source sfx2/uiconfig sfx2/U

2021-03-11 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/sidebar/Chart2PanelFactory.cxx|   38 +-
 chart2/source/controller/sidebar/ChartAreaPanel.cxx|   16 -
 chart2/source/controller/sidebar/ChartAreaPanel.hxx|8 
 chart2/source/controller/sidebar/ChartAxisPanel.cxx|   29 --
 chart2/source/controller/sidebar/ChartAxisPanel.hxx|   10 
 chart2/source/controller/sidebar/ChartElementsPanel.cxx|   28 -
 chart2/source/controller/sidebar/ChartElementsPanel.hxx|   10 
 chart2/source/controller/sidebar/ChartErrorBarPanel.cxx|   30 --
 chart2/source/controller/sidebar/ChartErrorBarPanel.hxx|   10 
 chart2/source/controller/sidebar/ChartLinePanel.cxx|   16 -
 chart2/source/controller/sidebar/ChartLinePanel.hxx|8 
 chart2/source/controller/sidebar/ChartSeriesPanel.cxx  |   28 -
 chart2/source/controller/sidebar/ChartSeriesPanel.hxx  |9 
 chart2/source/controller/sidebar/ChartTypePanel.cxx|   20 -
 chart2/source/controller/sidebar/ChartTypePanel.hxx|5 
 comphelper/source/misc/configuration.cxx   |1 
 include/comphelper/configurationlistener.hxx   |4 
 include/sfx2/navigat.hxx   |2 
 include/sfx2/sidebar/Panel.hxx |3 
 include/sfx2/sidebar/PanelLayout.hxx   |   48 +--
 include/sfx2/sidebar/SidebarPanelBase.hxx  |   12 
 include/sfx2/templdlg.hxx  |3 
 include/svx/sidebar/AreaPropertyPanelBase.hxx  |9 
 include/svx/sidebar/InspectorTextPanel.hxx |7 
 include/svx/sidebar/LinePropertyPanelBase.hxx  |4 
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu   |  145 
++
 officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs |8 
 sc/qa/uitest/calc_tests8/navigator.py  |   10 
 sc/source/ui/formdlg/dwfunctr.cxx  |   27 -
 sc/source/ui/inc/content.hxx   |2 
 sc/source/ui/inc/dwfunctr.hxx  |7 
 sc/source/ui/inc/navipi.hxx|9 
 sc/source/ui/navipi/content.cxx|1 
 sc/source/ui/navipi/navipi.cxx |   58 ++--
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx|   23 -
 sc/source/ui/sidebar/AlignmentPropertyPanel.hxx|   10 
 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx   |   22 -
 sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx   |   11 
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx |   23 -
 sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx |   10 
 sc/source/ui/sidebar/ScPanelFactory.cxx|   26 -
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |   13 
 sd/source/ui/animations/CustomAnimationPane.cxx|   28 -
 sd/source/ui/animations/SlideTransitionPane.cxx|   28 -
 sd/source/ui/dlg/NavigatorChildWindow.cxx  |   14 
 sd/source/ui/dlg/navigatr.cxx  |   18 -
 sd/source/ui/dlg/sdtreelb.cxx  |8 
 sd/source/ui/inc/CustomAnimationPane.hxx   |8 
 sd/source/ui/inc/SlideTransitionPane.hxx   |   11 
 sd/source/ui/inc/TableDesignPane.hxx   |   10 
 sd/source/ui/inc/navigatr.hxx  |   13 
 sd/source/ui/inc/sdtreelb.hxx  |2 
 sd/source/ui/sidebar/AllMasterPagesSelector.cxx|   16 -
 sd/source/ui/sidebar/AllMasterPagesSelector.hxx|   21 -
 sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx|   23 -
 sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx|   21 -
 sd/source/ui/sidebar/LayoutMenu.cxx|   15 -
 sd/source/ui/sidebar/LayoutMenu.hxx|5 
 sd/source/ui/sidebar/MasterPagesSelector.cxx   |   13 
 sd/source/ui/sidebar/MasterPagesSelector.hxx   |3 
 sd/source/ui/sidebar/NavigatorWrapper.cxx  |9 
 sd/source/ui/sidebar/NavigatorWrapper.hxx  |2 
 sd/source/ui/sidebar/PanelFactory.cxx  |   34 +-
 sd/source/ui/sidebar/RecentMasterPagesSelector.cxx |   22 -
 sd/source/ui/sidebar/RecentMasterPagesSelector.hxx |   21 -
 sd/source/ui/sidebar/SlideBackground.cxx   |   28 -
 sd/source/ui/sidebar/SlideBackground.hxx   |4 
 sfx2/UIConfig_sfx.mk   |1 
 sfx2/inc/sidebar/PanelDescriptor.hxx   

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

2021-03-11 Thread Michael Meeks (via logerrit)
 sfx2/source/view/lokhelper.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 40c58f6039fb02cff74e442f6adc5ba38adcff1d
Author: Michael Meeks 
AuthorDate: Sun Jan 24 04:10:41 2021 +
Commit: Michael Meeks 
CommitDate: Thu Mar 11 17:06:14 2021 +0100

lok: avoid a set of invalidations per view on re-size.

Unfortunate to have N^2 invalidations in the number of views on
resize - particularly for calc, when you re-size/wrap-text on a
row during editing.

Change-Id: I93f75c4543ad072684e5575a2cbe0e8abcab0d80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109913
Reviewed-by: Jan Holesovsky 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112094
Tested-by: Jenkins
Reviewed-by: Michael Meeks 

diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 2a5ea882d92d..0da6b9b88682 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -539,7 +539,10 @@ void 
SfxLokHelper::notifyDocumentSizeChangedAllViews(vcl::ITiledRenderable* pDoc
 // Should we then do this for all views of all open documents
 // or not?
 if (pCurrentViewShell == nullptr || pViewShell->GetDocId() == 
pCurrentViewShell-> GetDocId())
+{
 SfxLokHelper::notifyDocumentSizeChanged(pViewShell, "", pDoc, 
bInvalidateAll);
+bInvalidateAll = false; // we direct invalidations to all views 
anyway.
+}
 pViewShell = SfxViewShell::GetNext(*pViewShell);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - xmloff/CppunitTest_xmloff_style.mk xmloff/qa xmloff/source

2021-03-11 Thread Miklos Vajna (via logerrit)
 xmloff/CppunitTest_xmloff_style.mk   |2 
 xmloff/qa/unit/style.cxx |   69 ++-
 xmloff/source/style/XMLFontAutoStylePool.cxx |   12 
 3 files changed, 82 insertions(+), 1 deletion(-)

New commits:
commit 92471550b8c43d8ff0cef8b414884d697edf9e63
Author: Miklos Vajna 
AuthorDate: Thu Mar 11 13:01:16 2021 +0100
Commit: Miklos Vajna 
CommitDate: Thu Mar 11 16:57:42 2021 +0100

ODF export: sort  elements based on the style:name 
attribute

m_pFontAutoStylePool is already sorted, but sorting ignores
XMLFontAutoStylePoolEntry_Impl::sName, and changing
XMLFontAutoStylePoolEntryCmp_Impl would affect how find() works in
XMLFontAutoStylePool::Add(), so just extend
XMLFontAutoStylePool::exportXML() instead.

With this, the order of  elements is meant to be stable
in content.xml and styles.xml, helping use-cases where a document is
converted to ODF multiple times and an integration test wants to assert
that the output is the same.

(cherry picked from commit 08e783903cf67e9c6673e21f99dfff816f8d5872)

Conflicts:
xmloff/qa/unit/style.cxx

Change-Id: If0dbfa40a1b204aebe5e141fe64f71ac2ca92405

diff --git a/xmloff/CppunitTest_xmloff_style.mk 
b/xmloff/CppunitTest_xmloff_style.mk
index 866224e70159..8d603833c7a8 100644
--- a/xmloff/CppunitTest_xmloff_style.mk
+++ b/xmloff/CppunitTest_xmloff_style.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_CppunitTest_CppunitTest,xmloff_style))
 
 $(eval $(call gb_CppunitTest_use_externals,xmloff_style,\
boost_headers \
+   libxml2 \
 ))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,xmloff_style, \
@@ -26,6 +27,7 @@ $(eval $(call gb_CppunitTest_use_libraries,xmloff_style, \
 sal \
 test \
 unotest \
+utl \
 ))
 
 $(eval $(call gb_CppunitTest_use_sdk_api,xmloff_style))
diff --git a/xmloff/qa/unit/style.cxx b/xmloff/qa/unit/style.cxx
index 4a5b7af616c1..f859c3619837 100644
--- a/xmloff/qa/unit/style.cxx
+++ b/xmloff/qa/unit/style.cxx
@@ -9,16 +9,25 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
 
 using namespace ::com::sun::star;
 
 char const DATA_DIRECTORY[] = "/xmloff/qa/unit/data/";
 
 /// Covers xmloff/source/style/ fixes.
-class XmloffStyleTest : public test::BootstrapFixture, public 
unotest::MacrosTest
+class XmloffStyleTest : public test::BootstrapFixture,
+public unotest::MacrosTest,
+public XmlTestTools
 {
 private:
 uno::Reference mxComponent;
@@ -26,6 +35,7 @@ private:
 public:
 void setUp() override;
 void tearDown() override;
+void registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx) override;
 uno::Reference& getComponent() { return mxComponent; }
 void load(const OUString& rURL);
 };
@@ -45,6 +55,14 @@ void XmloffStyleTest::tearDown()
 test::BootstrapFixture::tearDown();
 }
 
+void XmloffStyleTest::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
+{
+xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("office"),
+   
BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:office:1.0"));
+xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("style"),
+   
BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:style:1.0"));
+}
+
 void XmloffStyleTest::load(const OUString& rFileName)
 {
 OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFileName;
@@ -64,6 +82,55 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFillImageBase64)
 CPPUNIT_ASSERT(xBitmaps->hasByName("libreoffice_0"));
 }
 
+CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFontSorting)
+{
+// Given an empty document with default fonts (Liberation Sans, Lucida 
Sans, etc):
+getComponent() = loadFromDesktop("private:factory/swriter");
+
+// When saving that document to ODT:
+uno::Reference xStorable(getComponent(), uno::UNO_QUERY);
+utl::TempFile aTempFile;
+aTempFile.EnableKillingFile();
+uno::Sequence aStoreProps = 
comphelper::InitPropertySequence({
+{ "FilterName", uno::makeAny(OUString("writer8")) },
+});
+xStorable->storeToURL(aTempFile.GetURL(), aStoreProps);
+
+// Then make sure  elements are sorted (by 
style:name="..."):
+uno::Reference xNameAccess
+= packages::zip::ZipFileAccess::createWithURL(mxComponentContext, 
aTempFile.GetURL());
+uno::Reference 
xInputStream(xNameAccess->getByName("content.xml"),
+  uno::UNO_QUERY);
+std::unique_ptr 
pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
+xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+xmlXPathObjectPtr pXPath
+= getXPathNode(pXmlDoc, 
"/office:document-content/office:font-face-decls/style:font-face");
+xmlNodeSetPtr pXmlNodes = pXPath->nodesetval;
+int nNodeCount = xmlXPathNodeSetGetLength(pXmlNodes);
+std::vector aXMLNames;
+std::set aS

ESC meeting minutes: 2021-03-11

2021-03-11 Thread Miklos Vajna
* Present:
+ Stephan, Thorsten, Cloph, Gabriel, Michael S, Heiko, Olivier, Caolan, 
Miklos, Eike, Michael W, Xisco

* Completed Action Items:
+ Consider re-using the pootle bot to remove >1w old Verified+1 labels on 
gerrit (Xisco)
   [ on hold for now, see below ]

* Pending Action Items:
+ None

* Release Engineering update (Cloph)
+ 7.2 alpha 1 in 2nd week of May
+ 7.1 status: 7.1.2 rc1 was tagged yesterday, builds are in progress
+ rc2 in 2 weeks
+ 7.0 status: 7.0.5 will be announced later today
+ Remotes: Android, iOS
+ Android viewer

* Documentation (Olivier)
+ New Help: no news
+ Helpcontent2:
   + Updates and fixes (S. Chakilin, ohallot)
  + Help pages fo ScriptForge( R. Lima, LibreOfficiant)
+ Google Season of Doc
   + Please add you idea for tech writing ! e.g.
 + A11y guide for LO docs ?
   + Macros and scripts (py) guides ?
   + AOO Dev Guide update?
   + Other?
+ Guides
   + More developments in ODT→HTML
 + https://books.libreoffice.org/pt-br/CG70/CG7000.html
   + Guides being updated to latest releases.

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
243(243) (topicUI) bugs open, 233(233) (needsUXEval) needs to be 
evaluated by the UXteam
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
 added 13(8) 21(10)45(8)  112(-18)
 commented 54(-5)   196(0)846(-21)   3758(-20)
   removed  0(-1) 4(-1)12(0)   27(-28)
  resolved  5(-3)34(-6)   136(-11)500(-7)
+ top 10 contributors:
  Heiko Tietze made 137 changes in 1 month, and 2387 changes in 1 year
  Seth Chaiklin made 66 changes in 1 month, and 203 changes in 1 year
  Telesto made 41 changes in 1 month, and 934 changes in 1 year
  Xisco Fauli made 37 changes in 1 month, and 207 changes in 1 year
  Ilmari Lauhakangas made 19 changes in 1 month, and 340 changes in 1 
year
  Dieter made 18 changes in 1 month, and 396 changes in 1 year
  Foote, V Stuart made 17 changes in 1 month, and 604 changes in 1 year
  Henschel, Regina made 16 changes in 1 month, and 94 changes in 1 year
  Baggeraar made 8 changes in 1 month, and 8 changes in 1 year
  Adolfo Jayme Barrientos made 7 changes in 1 month, and 35 changes in 
1 year

 + 13 new tickets with needsUXEval Mar/04-11

   * [Bug 140644] Image not scaling when downsizing caption frame (select
 frame & drag results in image being changed)
   * [Bug 140178] Change "Outline & List" to "Level & List" as tab label
 in Paragraph and Paragraph Style dialogs
   * [Bug 140936] RFE: Writer: Change Selection type icon in Statusbar
 to labels depending on current type
   * [Bug 140922] RFE: upper and lower cases for Day or day in insert >
 field > more fields>type date>extra formats>date> personal day format
   * [Bug 140745] AutoFilter dropdown doesn't show (empty) on top of the
 list with values
   * [Bug 140880] UI: Indicator to navigator if an item based group of items
-> * [Bug 140478] Basic fonts option for List does not have any effect
 + we have UI for this, but it does not seem to work
 + if you know how this is supposed to work, input is welcome
   * [Bug 140846] "Contains" in Paragraph Style should identify "Outline"
 as "Chapter Numbering" and have "Level" before the level number
   * [Bug 140845] "Contains" in Paragraph Style should identify List Style
 as "List Style", not as "Numbering"
   * [Bug 140839] Many images in ToTD looks cropped or blurry
   * [Bug 126352] “Create Style” Dialogue Does not Work Correctly if Opened
 via Menu or Toolbar: (often/always) shows other styles than the 'own
 styles', sometimes inactive when it shouldn't ..
   * [Bug 140818] Shouldn't all predefined (builtin) Character Styles
 inherit from Default Character Style?
-> * [Bug 140800] Improvements to Tools>Chapter Numbering > Load/Save when
 entries in Load/save dropdown are empty

-> * Wrong English string for U+2060 character
 + https://bugs.documentfoundation.org/show_bug.cgi?id=140796
 + .uno:InsertZWNBSP / SID_INSERT_ZWNBSP renamed to
  .uno:InsertWJ / SID_INSERT_WJ
  + zero-width non-breaking space, word joiner
 + https://gerrit.libreoffice.org/c/core/+/112055
AI: release note this (Heiko)

* Crash Testing (Caolan)
+ 15(-5) import failure, 5(+0) export failures
+ lot of duplication, perhaps 3 root causes
+ 3 coverity issues
   + builds still failing to upload, trying something else
+ 20 ossfuzz issues, 7 non-timeout/oom

* Crash Reporting (Xisco)
   + https://crashreport.libreoffice.org/stats/version/7.0.4.2
 + (+149) 5651 5593 5375 5272 5698 6259 5595 3893 2033 

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

2021-03-11 Thread Eike Rathke (via logerrit)
 xmloff/source/style/xmlnumfe.cxx |   18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

New commits:
commit a6b9b1128d5ced0e3f82f88e442a7bba243ce164
Author: Eike Rathke 
AuthorDate: Wed Mar 10 23:02:42 2021 +0100
Commit: Eike Rathke 
CommitDate: Thu Mar 11 16:33:24 2021 +0100

ODF save: handle implicit other calendar and switch to Gregorian for 

In preparation for https://gerrit.libreoffice.org/c/core/+/108532
to add dual calendar mixed formats.

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

diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index b961eb2620f5..24c0524a4239 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -1268,6 +1268,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt
 sal_Int32 nMinDecimals = nPrecision;
 OUString sCurrExt;
 OUString aCalendar;
+bool bImplicitOtherCalendar = false;
+bool bExplicitCalendar = false;
 sal_uInt16 nPos = 0;
 bool bEnd = false;
 while (!bEnd)
@@ -1336,7 +1338,10 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt
 case NF_KEY_R:
 case NF_KEY_RR:
 if (aCalendar.isEmpty())
+{
 aCalendar = lcl_GetDefaultCalendar( pFormatter, nLang 
);
+bImplicitOtherCalendar = true;
+}
 break;
 }
 ++nPos;
@@ -1579,7 +1584,10 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt
 
 case NF_SYMBOLTYPE_CALENDAR:
 if ( pElemStr )
+{
 aCalendar = *pElemStr;
+bExplicitCalendar = true;
+}
 break;
 
 // date elements:
@@ -1640,10 +1648,16 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt
 case NF_KEY_R:  //! R acts as EE, no attribute available
 {
 //! distinguish EE and R
-//  calendar attribute for E and EE and R is set in 
first loop
+// Calendar attribute for E and EE and R is set in
+// first loop. If set and not an explicit calendar and
+// YY or  is encountered, switch temporarily to
+// Gregorian, i.e. empty calendar name.
 bool bLong = ( nElemType == NF_KEY_ || nElemType 
== NF_KEY_EEC ||
 nElemType == NF_KEY_R );
-WriteYearElement_Impl( aCalendar, ( bSystemDate ? 
bLongSysDate : bLong ) );
+WriteYearElement_Impl(
+((bImplicitOtherCalendar && !bExplicitCalendar
+  && (nElemType == NF_KEY_YY || nElemType == 
NF_KEY_)) ? OUString() : aCalendar),
+(bSystemDate ? bLongSysDate : bLong));
 bAnyContent = true;
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/CppunitTest_xmloff_style.mk xmloff/qa xmloff/source

2021-03-11 Thread Miklos Vajna (via logerrit)
 xmloff/CppunitTest_xmloff_style.mk   |2 
 xmloff/qa/unit/style.cxx |   69 ++-
 xmloff/source/style/XMLFontAutoStylePool.cxx |   12 
 3 files changed, 82 insertions(+), 1 deletion(-)

New commits:
commit 08e783903cf67e9c6673e21f99dfff816f8d5872
Author: Miklos Vajna 
AuthorDate: Thu Mar 11 13:01:16 2021 +0100
Commit: Miklos Vajna 
CommitDate: Thu Mar 11 16:14:57 2021 +0100

ODF export: sort  elements based on the style:name 
attribute

m_pFontAutoStylePool is already sorted, but sorting ignores
XMLFontAutoStylePoolEntry_Impl::sName, and changing
XMLFontAutoStylePoolEntryCmp_Impl would affect how find() works in
XMLFontAutoStylePool::Add(), so just extend
XMLFontAutoStylePool::exportXML() instead.

With this, the order of  elements is meant to be stable
in content.xml and styles.xml, helping use-cases where a document is
converted to ODF multiple times and an integration test wants to assert
that the output is the same.

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

diff --git a/xmloff/CppunitTest_xmloff_style.mk 
b/xmloff/CppunitTest_xmloff_style.mk
index 866224e70159..8d603833c7a8 100644
--- a/xmloff/CppunitTest_xmloff_style.mk
+++ b/xmloff/CppunitTest_xmloff_style.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_CppunitTest_CppunitTest,xmloff_style))
 
 $(eval $(call gb_CppunitTest_use_externals,xmloff_style,\
boost_headers \
+   libxml2 \
 ))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,xmloff_style, \
@@ -26,6 +27,7 @@ $(eval $(call gb_CppunitTest_use_libraries,xmloff_style, \
 sal \
 test \
 unotest \
+utl \
 ))
 
 $(eval $(call gb_CppunitTest_use_sdk_api,xmloff_style))
diff --git a/xmloff/qa/unit/style.cxx b/xmloff/qa/unit/style.cxx
index f2d9cdbedc37..eaae3bbd1b92 100644
--- a/xmloff/qa/unit/style.cxx
+++ b/xmloff/qa/unit/style.cxx
@@ -13,16 +13,25 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
 
 using namespace ::com::sun::star;
 
 constexpr OUStringLiteral DATA_DIRECTORY = u"/xmloff/qa/unit/data/";
 
 /// Covers xmloff/source/style/ fixes.
-class XmloffStyleTest : public test::BootstrapFixture, public 
unotest::MacrosTest
+class XmloffStyleTest : public test::BootstrapFixture,
+public unotest::MacrosTest,
+public XmlTestTools
 {
 private:
 uno::Reference mxComponent;
@@ -30,6 +39,7 @@ private:
 public:
 void setUp() override;
 void tearDown() override;
+void registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx) override;
 uno::Reference& getComponent() { return mxComponent; }
 void load(std::u16string_view rURL);
 };
@@ -49,6 +59,14 @@ void XmloffStyleTest::tearDown()
 test::BootstrapFixture::tearDown();
 }
 
+void XmloffStyleTest::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
+{
+xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("office"),
+   
BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:office:1.0"));
+xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("style"),
+   
BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:style:1.0"));
+}
+
 void XmloffStyleTest::load(std::u16string_view rFileName)
 {
 OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFileName;
@@ -68,6 +86,55 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFillImageBase64)
 CPPUNIT_ASSERT(xBitmaps->hasByName("libreoffice_0"));
 }
 
+CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFontSorting)
+{
+// Given an empty document with default fonts (Liberation Sans, Lucida 
Sans, etc):
+getComponent() = loadFromDesktop("private:factory/swriter");
+
+// When saving that document to ODT:
+uno::Reference xStorable(getComponent(), uno::UNO_QUERY);
+utl::TempFile aTempFile;
+aTempFile.EnableKillingFile();
+uno::Sequence aStoreProps = 
comphelper::InitPropertySequence({
+{ "FilterName", uno::makeAny(OUString("writer8")) },
+});
+xStorable->storeToURL(aTempFile.GetURL(), aStoreProps);
+
+// Then make sure  elements are sorted (by 
style:name="..."):
+uno::Reference xNameAccess
+= packages::zip::ZipFileAccess::createWithURL(mxComponentContext, 
aTempFile.GetURL());
+uno::Reference 
xInputStream(xNameAccess->getByName("content.xml"),
+  uno::UNO_QUERY);
+std::unique_ptr 
pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
+xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+xmlXPathObjectPtr pXPath
+= getXPathNode(pXmlDoc, 
"/office:document-content/office:font-face-decls/style:font-face");
+xmlNodeSetPtr pXmlNodes = pXPath->nodesetval;
+int nNodeCount = xmlXPathNodeSetGetLength(pXmlNodes);
+std::vector aXMLNames;
+std:

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

2021-03-11 Thread Seth Chaiklin (via logerrit)
 sw/inc/strings.hrc  |4 ++--
 sw/source/uibase/utlui/attrdesc.cxx |3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit f92510321dc860f43e471473db67167c0fefcbea
Author: Seth Chaiklin 
AuthorDate: Tue Mar 9 11:43:55 2021 +0100
Commit: Seth Chaiklin 
CommitDate: Thu Mar 11 15:37:42 2021 +0100

tdf#140845 labelling improvements for List Styles in Contains

   move hard-coded formatting of liststyle out of
   sw/source/uibase/utlui/attrdesc.cxx and into sw/inc/strings.hrc,
   so that translators can customize as needed.

   In sw/inc/strings.hrc:
  * "Numbering" -> "List Style: (%LISTSTYLENAME)"
  * "no numbering" -> "List Style: (None)"
   (to be consistent with setting in "List Style" control
and to keep consistent appearance in Contains)

   Thanks to Mike Kaganski for assistance.

Change-Id: I9d2b6507082fea06665d0d8a3465c314a5d894c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112213
Reviewed-by: Mike Kaganski 
Reviewed-by: Seth Chaiklin 
Tested-by: Seth Chaiklin 

diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index 4d81ef4fd966..008b077781a1 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -1126,8 +1126,8 @@
 #define STR_MAX_FTN_HEIGHT  NC_("STR_MAX_FTN_HEIGHT", 
"Max. footnote area:")
 #define STR_EDIT_IN_READONLYNC_("STR_EDIT_IN_READONLY", 
"Editable in read-only document")
 #define STR_LAYOUT_SPLITNC_("STR_LAYOUT_SPLIT", 
"Split")
-#define STR_NUMRULE_ON  NC_("STR_NUMRULE_ON", 
"Numbering")
-#define STR_NUMRULE_OFF NC_("STR_NUMRULE_OFF", "no 
numbering")
+#define STR_NUMRULE_ON  NC_("STR_NUMRULE_ON", "List 
Style: (%LISTSTYLENAME)")
+#define STR_NUMRULE_OFF NC_("STR_NUMRULE_OFF", "List 
Style: (None)")
 #define STR_CONNECT1NC_("STR_CONNECT1", "linked to 
")
 #define STR_CONNECT2NC_("STR_CONNECT2", "and ")
 #define STR_LINECOUNT   NC_("STR_LINECOUNT", "Count 
lines")
diff --git a/sw/source/uibase/utlui/attrdesc.cxx 
b/sw/source/uibase/utlui/attrdesc.cxx
index 861697d5e329..e35e8d31e01c 100644
--- a/sw/source/uibase/utlui/attrdesc.cxx
+++ b/sw/source/uibase/utlui/attrdesc.cxx
@@ -190,8 +190,7 @@ bool SwNumRuleItem::GetPresentation
 )   const
 {
 if( !GetValue().isEmpty() )
-rText = SwResId( STR_NUMRULE_ON ) +
-"(" + GetValue() + ")";
+rText = SwResId( STR_NUMRULE_ON ).replaceFirst("%LISTSTYLENAME", 
GetValue());
 else
 rText = SwResId( STR_NUMRULE_OFF );
 return true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Xisco Fauli (via logerrit)
 oox/source/helper/graphichelper.cxx |8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit c6bf16909db054ec5467ebdc0ea0c9dc07307048
Author: Xisco Fauli 
AuthorDate: Mon Mar 8 11:03:11 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Mar 11 15:01:40 2021 +0100

Revert "tdf#118133 DOCX import: disable lazy-loading of tiff images"

This reverts commit fa356008b08a8a5b5556aa8f89ca8f7989c53516

Similar to 1238ca8d100c107656b707ed3a6b662f0a1867fb  it seems this
workaround is no longer needed and lazy-loading works with
tiff images.
The unittest has not been reverted

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

diff --git a/oox/source/helper/graphichelper.cxx 
b/oox/source/helper/graphichelper.cxx
index 17cf66c92e44..52273f6f 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -251,8 +251,7 @@ Reference< XGraphic > GraphicHelper::importGraphic( const 
Reference< XInputStrea
 aArgs[ 0 ].Name = "InputStream";
 aArgs[ 0 ].Value <<= rxInStrm;
 aArgs[ 1 ].Name = "LazyRead";
-bool bLazyRead = !pExtHeader;
-aArgs[ 1 ].Value <<= bLazyRead;
+aArgs[ 1 ].Value <<= true;
 
 if ( pExtHeader && pExtHeader->mapMode > 0 )
 {
@@ -301,11 +300,6 @@ Reference< XGraphic > 
GraphicHelper::importEmbeddedGraphic( const OUString& rStr
 xGraphic = mxGraphicMapper->findGraphic(rStreamName);
 if (!xGraphic.is())
 {
-// Lazy-loading doesn't work with TIFF at the moment.
-WmfExternal aHeader;
-if (rStreamName.endsWith(".tiff") && !pExtHeader)
-pExtHeader = &aHeader;
-
 auto xStream = mxStorage->openInputStream(rStreamName);
 xGraphic = importGraphic(xStream, pExtHeader);
 if (xGraphic.is())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: uitest/math_tests uitest/uitest

2021-03-11 Thread Victor Kukshiev (via logerrit)
 uitest/math_tests/start.py |1 -
 uitest/uitest/bisecting.py |2 --
 uitest/uitest/framework.py |2 +-
 uitest/uitest/uihelper/keyboard.py |2 +-
 4 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 1a0af07a556e53dd156d933a8fb82bd13b5e84b1
Author: Victor Kukshiev 
AuthorDate: Fri Feb 19 00:23:30 2021 +0300
Commit: Xisco Fauli 
CommitDate: Thu Mar 11 15:00:29 2021 +0100

tdf#132293 remove unused imports from uitest

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

diff --git a/uitest/math_tests/start.py b/uitest/math_tests/start.py
index 425cb9679f57..2ad977f73917 100644
--- a/uitest/math_tests/start.py
+++ b/uitest/math_tests/start.py
@@ -11,7 +11,6 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
 
 from uitest.framework import UITestCase
 from uitest.uihelper.common import type_text, select_pos
-from uitest.debug import sleep
 
 import unittest
 
diff --git a/uitest/uitest/bisecting.py b/uitest/uitest/bisecting.py
index 7d2f074411df..938baaa2f971 100644
--- a/uitest/uitest/bisecting.py
+++ b/uitest/uitest/bisecting.py
@@ -5,8 +5,6 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-from functools import wraps
-
 def requires(revision):
 def decorator(f):
 f.requires = revision
diff --git a/uitest/uitest/framework.py b/uitest/uitest/framework.py
index 7149132c3508..072ff5097dbf 100644
--- a/uitest/uitest/framework.py
+++ b/uitest/uitest/framework.py
@@ -11,7 +11,7 @@ import time
 
 from uitest.test import UITest
 
-from libreoffice.connection import PersistentConnection, OfficeConnection
+from libreoffice.connection import PersistentConnection
 
 class UITestCase(unittest.TestCase):
 
diff --git a/uitest/uitest/uihelper/keyboard.py 
b/uitest/uitest/uihelper/keyboard.py
index f2d8890afed0..f2be76de407c 100644
--- a/uitest/uitest/uihelper/keyboard.py
+++ b/uitest/uitest/uihelper/keyboard.py
@@ -5,7 +5,7 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-from libreoffice.uno.propertyvalue import convert_property_values_to_dict, 
mkPropertyValues
+from libreoffice.uno.propertyvalue import mkPropertyValues
 
 def select_all(ui_object):
 ui_object.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Minutes from the UX/design meeting 2020-Mar-11

2021-03-11 Thread Heiko Tietze

Present: Heiko
Comments: Roman, Sascha, Stuart, Dieter

Tickets/Topic

 * AutoFilter dropdown doesn't show (empty) on top of the list with values
   + https://bugs.documentfoundation.org/show_bug.cgi?id=140745
   + to hide empty cells might be common and often used;
 the "(empty)" entry after numbers before text can be hard
 to find in large lists => +1 (Heiko)
   + MSO places  at the bottom (Roman)
   => move it to the top

 * Default Character Style should be renamed
   + https://bugs.documentfoundation.org/show_activity.cgi?id=140818
   + "No Character Style" (Seth, Regina), "Set to Paragraph Default" (Sascha)
   => No CS is less error-prone for l10n

 * Make non-breaking hyphen the default hyphen character in LibreOffice Writer
   + https://bugs.documentfoundation.org/show_bug.cgi?id=140442
   + -1 (Roman, Stuart), +1 if it's the default;
 true for auto-hyphenation (Dieter) (Heiko)
   => resolve WF

 * Context menu "open file location" from StartCenter thumbnail views
   + https://bugs.documentfoundation.org/show_bug.cgi?id=126404
   + can of worms (Heiko)
   => keep ticket open

 * Make bottom description area in Sidebar's Function section more high
   + https://bugs.documentfoundation.org/show_bug.cgi?id=12
   + scale with content, resize by default?
   => make it a bit larger to put more attention on it but also
  ensure word-wrap is working correctly



OpenPGP_signature
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


GSoC 2021

2021-03-11 Thread anshu khare
Hii

I am Anshu Khare, a third year student currently studying at the Birla
Institute of Technology and Science, Pilani (BITS Pilani)

I have been contributing to libreoffice since last year. These are a list
of my contributions :

https://gerrit.libreoffice.org/c/core/+/105501
https://gerrit.libreoffice.org/c/core/+/107041
https://gerrit.libreoffice.org/c/core/+/106556
https://bugs.documentfoundation.org/show_bug.cgi?id=136239
https://gerrit.libreoffice.org/c/core/+/108541
https://bugs.documentfoundation.org/show_bug.cgi?id=139339
https://gerrit.libreoffice.org/c/core/+/108929
https://gerrit.libreoffice.org/c/core/+/108841 - 2 Bugs solved in this
https://gerrit.libreoffice.org/c/core/+/110205
https://bugs.documentfoundation.org/show_bug.cgi?id=140480
https://bugs.documentfoundation.org/show_bug.cgi?id=140483

I would like to work on the the Styles Highlighter project given on the
Libreoffice Ideas list. I am looking forward to interact with the mentors :)

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


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

2021-03-11 Thread Caolán McNamara (via logerrit)
 toolkit/source/awt/vclxtopwindow.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a05622de4a97215260a9275e6117d9f0e1e8e87f
Author: Caolán McNamara 
AuthorDate: Wed Mar 10 21:01:52 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 14:36:52 2021 +0100

no need to cast to WorkWindow* to use ToTop

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

diff --git a/toolkit/source/awt/vclxtopwindow.cxx 
b/toolkit/source/awt/vclxtopwindow.cxx
index 965312e6954b..a500029eed0d 100644
--- a/toolkit/source/awt/vclxtopwindow.cxx
+++ b/toolkit/source/awt/vclxtopwindow.cxx
@@ -107,8 +107,8 @@ void VCLXTopWindow::toFront(  )
 SolarMutexGuard aGuard;
 
 vcl::Window* pWindow = VCLXContainer::GetWindow();
-if ( pWindow )
-static_cast(pWindow)->ToTop( ToTopFlags::RestoreWhenMin );
+if (pWindow)
+pWindow->ToTop( ToTopFlags::RestoreWhenMin );
 }
 
 void VCLXTopWindow::toBack(  )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Caolán McNamara (via logerrit)
 include/sfx2/sidebar/Panel.hxx |4 ++--
 include/sfx2/sidebar/SidebarController.hxx |4 ++--
 sfx2/source/sidebar/Panel.cxx  |   16 +---
 sfx2/source/sidebar/SidebarController.cxx  |5 ++---
 4 files changed, 19 insertions(+), 10 deletions(-)

New commits:
commit 5649c4b26401b56736b9eb56ef47b73b95e43c67
Author: Caolán McNamara 
AuthorDate: Wed Mar 3 14:03:12 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 14:30:23 2021 +0100

create GetElementParentWindow on demand

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

diff --git a/include/sfx2/sidebar/Panel.hxx b/include/sfx2/sidebar/Panel.hxx
index cd820ff937b2..92e57abc13fd 100644
--- a/include/sfx2/sidebar/Panel.hxx
+++ b/include/sfx2/sidebar/Panel.hxx
@@ -70,7 +70,7 @@ public:
 {
 return mxPanelComponent;
 }
-css::uno::Reference GetElementParentWindow() const { 
return mxXWindow; }
+css::uno::Reference GetElementParentWindow();
 css::uno::Reference GetElementWindow();
 void SetExpanded(const bool bIsExpanded);
 bool IsExpanded() const { return mbIsExpanded; }
@@ -98,7 +98,7 @@ private:
 const css::uno::Reference& mxFrame;
 std::unique_ptr mxTitleBar;
 std::unique_ptr mxContents;
-css::uno::Reference mxXWindow;
+css::uno::Reference mxAwtXWindow;
 };
 typedef std::vector> SharedPanelContainer;
 
diff --git a/include/sfx2/sidebar/SidebarController.hxx 
b/include/sfx2/sidebar/SidebarController.hxx
index 1c38211d11c1..8bcaa858ff1c 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -39,7 +39,7 @@
 #include 
 #include 
 
-namespace com::sun::star::awt { class XWindowPeer; }
+namespace com::sun::star::awt { class XWindow; }
 namespace com::sun::star::frame { class XDispatch; }
 namespace com::sun::star::ui { class XUIElement; }
 
@@ -231,7 +231,7 @@ private:
 void UpdateConfigurations();
 
 css::uno::Reference CreateUIElement (
-const css::uno::Reference& rxWindow,
+const css::uno::Reference& rxWindow,
 const OUString& rsImplementationURL,
 const bool bWantsCanvas,
 const Context& rContext);
diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx
index 7c66838b2d8e..41cfbc096abb 100644
--- a/sfx2/source/sidebar/Panel.cxx
+++ b/sfx2/source/sidebar/Panel.cxx
@@ -60,7 +60,7 @@ Panel::Panel(const PanelDescriptor& rPanelDescriptor,
 , mxFrame(rxFrame)
 , mxTitleBar(new PanelTitleBar(rPanelDescriptor.msTitle, *m_xBuilder, 
this))
 , mxContents(m_xBuilder->weld_container("contents"))
-, mxXWindow(mxContents->CreateChildFrame())
+, mxAwtXWindow(mxContents->CreateChildFrame())
 {
 SetText(rPanelDescriptor.msTitle);
 mxContents->set_visible(mbIsExpanded);
@@ -111,8 +111,11 @@ void Panel::dispose()
 
 mxTitleBar.reset();
 
-mxXWindow->dispose();
-mxXWindow.clear();
+if (mxAwtXWindow)
+{
+mxAwtXWindow->dispose();
+mxAwtXWindow.clear();
+}
 mxContents.reset();
 
 InterimItemWindow::dispose();
@@ -181,6 +184,13 @@ Reference Panel::GetElementWindow()
 return nullptr;
 }
 
+Reference Panel::GetElementParentWindow()
+{
+if (!mxAwtXWindow)
+mxAwtXWindow = mxContents->CreateChildFrame();
+return mxAwtXWindow;
+}
+
 } // end of namespace sfx2::sidebar
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index e6a24e3b632a..dce668892c16 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -954,9 +954,8 @@ VclPtr SidebarController::CreatePanel (
 mxFrame);
 
 // Create the XUIElement.
-Reference xPeer(pPanel->GetElementParentWindow(), 
UNO_QUERY);
 Reference xUIElement (CreateUIElement(
-xPeer,
+pPanel->GetElementParentWindow(),
 xPanelDescriptor->msImplementationURL,
 xPanelDescriptor->mbWantsCanvas,
 rContext));
@@ -974,7 +973,7 @@ VclPtr SidebarController::CreatePanel (
 }
 
 Reference SidebarController::CreateUIElement (
-const Reference& rxWindow,
+const Reference& rxWindow,
 const OUString& rsImplementationURL,
 const bool bWantsCanvas,
 const Context& rContext)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sfx2 sfx2/inc sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk

2021-03-11 Thread Caolán McNamara (via logerrit)
 include/sfx2/sidebar/Panel.hxx|   13 +--
 sfx2/UIConfig_sfx.mk  |2 
 sfx2/inc/sidebar/PanelTitleBar.hxx|   14 ++-
 sfx2/inc/sidebar/TitleBar.hxx |   28 --
 sfx2/source/sidebar/Deck.cxx  |3 
 sfx2/source/sidebar/DeckLayouter.cxx  |   62 +++
 sfx2/source/sidebar/FocusManager.cxx  |   15 +--
 sfx2/source/sidebar/Panel.cxx |   49 +---
 sfx2/source/sidebar/PanelTitleBar.cxx |   31 +++
 sfx2/source/sidebar/SidebarController.cxx |5 -
 sfx2/source/sidebar/TitleBar.cxx  |   50 +++-
 sfx2/source/sidebar/UnoPanel.cxx  |4 
 sfx2/uiconfig/ui/panel.ui |  122 ++
 sfx2/uiconfig/ui/paneltitlebar.ui |   96 ---
 14 files changed, 270 insertions(+), 224 deletions(-)

New commits:
commit d764415977ad65bb4a657ccada7c9b2c19b689e1
Author: Caolán McNamara 
AuthorDate: Tue Mar 2 16:18:43 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 14:29:54 2021 +0100

merge panel and panel title

so one combined InterimItemWindow instead of two separate ones
for each panel

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

diff --git a/include/sfx2/sidebar/Panel.hxx b/include/sfx2/sidebar/Panel.hxx
index ea4a81870744..cd820ff937b2 100644
--- a/include/sfx2/sidebar/Panel.hxx
+++ b/include/sfx2/sidebar/Panel.hxx
@@ -20,7 +20,7 @@
 
 #include 
 
-#include 
+#include 
 
 #include 
 
@@ -51,7 +51,7 @@ class Context;
  * Multiple panels form a single deck.
  * E.g. the Properties deck has panels like Styles, Character, paragraph.
  */
-class SFX2_DLLPUBLIC Panel final : public vcl::Window
+class SFX2_DLLPUBLIC Panel final : public InterimItemWindow
 {
 public:
 Panel(const PanelDescriptor& rPanelDescriptor, vcl::Window* pParentWindow,
@@ -62,13 +62,15 @@ public:
 virtual ~Panel() override;
 virtual void dispose() override;
 
-VclPtr const& GetTitleBar() const;
+PanelTitleBar* GetTitleBar() const;
+void ShowTitlebar(bool bShowTitlebar);
 bool IsTitleBarOptional() const { return mbIsTitleBarOptional; }
 void SetUIElement(const css::uno::Reference& 
rxElement);
 const css::uno::Reference& GetPanelComponent() 
const
 {
 return mxPanelComponent;
 }
+css::uno::Reference GetElementParentWindow() const { 
return mxXWindow; }
 css::uno::Reference GetElementWindow();
 void SetExpanded(const bool bIsExpanded);
 bool IsExpanded() const { return mbIsExpanded; }
@@ -80,7 +82,6 @@ public:
 void SetLurkMode(bool bLurk);
 bool IsLurking() const { return mbLurking; }
 
-virtual void Resize() override;
 virtual void DataChanged(const DataChangedEvent& rEvent) override;
 virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
 virtual void DumpAsPropertyTree(tools::JsonWriter&) override;
@@ -95,7 +96,9 @@ private:
 const std::function maDeckLayoutTrigger;
 const std::function maContextAccess;
 const css::uno::Reference& mxFrame;
-VclPtr mpTitleBar;
+std::unique_ptr mxTitleBar;
+std::unique_ptr mxContents;
+css::uno::Reference mxXWindow;
 };
 typedef std::vector> SharedPanelContainer;
 
diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index 7bdbd7a85a1e..a21bbeed53bb 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -52,7 +52,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/newstyle \
sfx2/uiconfig/ui/notebookbar \
sfx2/uiconfig/ui/optprintpage \
-   sfx2/uiconfig/ui/paneltitlebar \
+   sfx2/uiconfig/ui/panel \
sfx2/uiconfig/ui/password \
sfx2/uiconfig/ui/notebookbarpopup \
sfx2/uiconfig/ui/printeroptionsdialog \
diff --git a/sfx2/inc/sidebar/PanelTitleBar.hxx 
b/sfx2/inc/sidebar/PanelTitleBar.hxx
index ff00eb9f9294..64a77833 100644
--- a/sfx2/inc/sidebar/PanelTitleBar.hxx
+++ b/sfx2/inc/sidebar/PanelTitleBar.hxx
@@ -29,35 +29,39 @@ namespace sfx2::sidebar {
 class Panel;
 
 class PanelTitleBar final
-: public TitleBar
+: public TitleBarBase
 {
 public:
-PanelTitleBar(const OUString& rsTitle, vcl::Window* pParentWindow, Panel* 
pPanel);
-virtual void dispose() override;
+PanelTitleBar(const OUString& rsTitle, weld::Builder& rBuilder, Panel* 
pPanel);
 virtual ~PanelTitleBar() override;
 
 virtual void SetTitle (const OUString& rsTitle) override;
 virtual OUString GetTitle() const override;
+virtual bool GetVisible() const override;
 
 void SetMoreOptionsCommand(const OUString& rsCommandName,
const css::uno::Reference& 
rxFrame,
const 
css::uno::Reference& rxController);
 
 void UpdateExpandedState();
+void Show(bool bShow)
+{
+m

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

2021-03-11 Thread Caolán McNamara (via logerrit)
 compilerplugins/clang/constantparam.numbers.results |4 
 compilerplugins/clang/countusersofdefaultparams.py  |2 
 include/sfx2/app.hxx|2 
 include/sfx2/childwin.hxx   |   76 --
 sfx2/source/appl/appchild.cxx   |   68 
 sfx2/source/appl/childwin.cxx   |  106 
 sfx2/source/appl/childwinimpl.cxx   |   20 ---
 sfx2/source/appl/workwin.cxx|6 -
 sfx2/source/inc/childwinimpl.hxx|   12 --
 9 files changed, 296 deletions(-)

New commits:
commit feb8164afa67d3e2e5fe27dd01c5101d6d0cb847
Author: Caolán McNamara 
AuthorDate: Tue Mar 9 20:22:37 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 14:29:30 2021 +0100

drop newly unused code and macros

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

diff --git a/compilerplugins/clang/constantparam.numbers.results 
b/compilerplugins/clang/constantparam.numbers.results
index 7759f40f512d..b03d0ff7c507 100644
--- a/compilerplugins/clang/constantparam.numbers.results
+++ b/compilerplugins/clang/constantparam.numbers.results
@@ -730,10 +730,6 @@ include/sfx2/app.hxx:87
 void SfxLinkItem::SfxLinkItem(unsigned short,const class Link &)
 unsigned short nWhichId
 5646
-include/sfx2/childwin.hxx:138
-void SfxChildWindowContext::RegisterChildWindowContext(class SfxModule 
*,unsigned short,class std::unique_ptr >)
-unsigned short 
-10366
 include/sfx2/ctrlitem.hxx:91
 void SfxStatusForwarder::SfxStatusForwarder(unsigned short,class 
SfxControllerItem &)
 unsigned short nSlotId
diff --git a/compilerplugins/clang/countusersofdefaultparams.py 
b/compilerplugins/clang/countusersofdefaultparams.py
index 57af9ea29caa..a53c17283c14 100755
--- a/compilerplugins/clang/countusersofdefaultparams.py
+++ b/compilerplugins/clang/countusersofdefaultparams.py
@@ -47,8 +47,6 @@ for k,v in callDict.iteritems():
 continue
 if k.endswith("::RegisterChildWindow(_Bool,class SfxModule *,enum 
SfxChildWindowFlags)"):
 continue
-if k.endswith("::RegisterChildWindowContext(unsigned short,class SfxModule 
*)"):
-continue
 if k.endswith("::RegisterControl(unsigned short,class SfxModule *)"):
 continue
 if k.endswith("::RegisterFactory(unsigned short)"):
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 26b14e2ca2d4..b3b1761baece 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -36,7 +36,6 @@ namespace weld { class Window; }
 
 class BasicManager;
 class DdeService;
-struct SfxChildWinContextFactory;
 class SfxAppData_Impl;
 class SfxChildWinFactArr_Impl;
 class SfxDispatcher;
@@ -174,7 +173,6 @@ public:
 
 // Object-Factories/global arrays
 SAL_DLLPRIVATE void RegisterChildWindow_Impl(SfxModule*, 
std::unique_ptr);
-SAL_DLLPRIVATE void RegisterChildWindowContext_Impl(SfxModule*, 
sal_uInt16, std::unique_ptr);
 SAL_DLLPRIVATE void RegisterStatusBarControl_Impl(SfxModule*, 
const SfxStbCtrlFactory&);
 SAL_DLLPRIVATE void RegisterToolBoxControl_Impl( SfxModule*, const 
SfxTbxCtrlFactory&);
 SAL_DLLPRIVATE SfxTbxCtrlFactArr_Impl& GetTbxCtrlFactories_Impl() const;
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index b78f8301c653..6668ddcbee32 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -35,7 +35,6 @@ namespace com::sun::star::frame { class XFrame; }
 class SfxWorkWindow;
 class SfxModule;
 class SfxChildWindow;
-class SfxChildWindowContext;
 class SfxBindings;
 class SfxModelessDialogController;
 
@@ -83,57 +82,18 @@ typedef std::unique_ptr (*SfxChildWinCtor)( 
vcl::Window *pParent
 SfxBindings *pBindings,
 SfxChildWinInfo *pInfo);
 
-// ChildWindowsContexts factory methods
-typedef std::unique_ptr (*SfxChildWinContextCtor)( 
vcl::Window *pParentWindow,
-SfxBindings *pBindings,
-SfxChildWinInfo *pInfo);
-struct SfxChildWinContextFactory
-{
-SfxChildWinContextCtor  pCtor;  // Factory method
-sal_uInt16  nContextId; // Identifier for SfxInterface
-
-SfxChildWinContextFactory( SfxChildWinContextCtor pTheCtor, sal_uInt16 nID 
)
-: pCtor(pTheCtor)
-, nContextId(nID)
-{}
-};
-
-class SfxChildWinContextArr_Impl;
-
 struct SFX2_DLLPUBLIC SfxChildWinFactory
 {
 SfxChildWinCtor pCtor;  // Factory method
 sal_uInt16  nId;// ChildWindow-Id ( SlotId )
 SfxChildWinInfo aInfo;  // Configuration
 sal_uInt16  nPos;   // Position in UI
-std::unique_ptr pArr;   /

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

2021-03-11 Thread Caolán McNamara (via logerrit)
 sw/inc/AnnotationWin.hxx  |2 +
 sw/source/uibase/docvw/AnnotationWin2.cxx |   49 +-
 2 files changed, 31 insertions(+), 20 deletions(-)

New commits:
commit 47ad7497f736b27c23667e0754cd686b78b60744
Author: Caolán McNamara 
AuthorDate: Wed Mar 10 17:02:46 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 14:28:34 2021 +0100

tdf#140934 update annotation menubutton bg when comment color changes

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

diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index 15dc3e177ea3..f1ba8a499589 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -221,6 +221,8 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public 
InterimItemWindow
 
 SvxLanguageItem GetLanguage() const;
 
+void SetMenuButtonColors();
+
 SwPostItMgr&mrMgr;
 SwView& mrView;
 
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index b3e361793b99..2c82afeb8b3f 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -441,6 +441,33 @@ static Color ColorFromAlphaColor(const sal_uInt8 
aTransparency, const Color& aFr
  sal_uInt8(aFront.GetBlue()  * aTransparency / 255.0 + 
aBack.GetBlue()  * (1 - aTransparency / 255.0)));
 }
 
+void SwAnnotationWin::SetMenuButtonColors()
+{
+if (!mxMenuButton)
+return;
+
+mxMenuButton->set_background(mColorDark);
+
+const Fraction& rFraction = 
mrView.GetWrtShellPtr()->GetOut()->GetMapMode().GetScaleY();
+
+ScopedVclPtrInstance xVirDev;
+Size aSize(tools::Long(METABUTTON_WIDTH * rFraction),
+   tools::Long(METABUTTON_HEIGHT * rFraction));
+tools::Rectangle aRect(Point(0, 0), aSize);
+xVirDev->SetOutputSizePixel(aSize);
+
+Gradient aGradient(GradientStyle::Linear,
+ ColorFromAlphaColor(15, mColorAnchor, mColorDark),
+ ColorFromAlphaColor(80, mColorAnchor, 
mColorDark));
+xVirDev->DrawGradient(aRect, aGradient);
+
+DecorationView aDecoView(xVirDev.get());
+aDecoView.DrawSymbol(aRect, SymbolType::SPIN_DOWN, GetTextColor(),
+ DrawSymbolFlags::NONE);
+mxMenuButton->set_image(xVirDev);
+mxMenuButton->set_size_request(aSize.Width() + 4, aSize.Height());
+}
+
 void SwAnnotationWin::Rescale()
 {
 // On Android, this method leads to invoke ImpEditEngine::UpdateViews
@@ -468,25 +495,7 @@ void SwAnnotationWin::Rescale()
 mxMetadataDate->set_font(aFont);
 if (mxMetadataResolved)
 mxMetadataResolved->set_font(aFont);
-if (mxMenuButton)
-{
-ScopedVclPtrInstance xVirDev;
-Size aSize(tools::Long(METABUTTON_WIDTH * rFraction),
-   tools::Long(METABUTTON_HEIGHT * rFraction));
-tools::Rectangle aRect(Point(0, 0), aSize);
-xVirDev->SetOutputSizePixel(aSize);
-
-Gradient aGradient(GradientStyle::Linear,
- ColorFromAlphaColor(15, mColorAnchor, 
mColorDark),
- ColorFromAlphaColor(80, mColorAnchor, 
mColorDark));
-xVirDev->DrawGradient(aRect, aGradient);
-
-DecorationView aDecoView(xVirDev.get());
-aDecoView.DrawSymbol(aRect, SymbolType::SPIN_DOWN, GetTextColor(),
- DrawSymbolFlags::NONE);
-mxMenuButton->set_image(xVirDev);
-mxMenuButton->set_size_request(aSize.Width() + 4, aSize.Height());
-}
+SetMenuButtonColors();
 if (mxVScrollbar)
 mxVScrollbar->set_scroll_thickness(GetPrefScrollbarWidth());
 }
@@ -835,7 +844,7 @@ void SwAnnotationWin::SetColor(Color aColorDark,Color 
aColorLight, Color aColorA
 return;
 
 m_xContainer->set_background(mColorDark);
-mxMenuButton->set_background(mColorDark);
+SetMenuButtonColors();
 
 mxMetadataAuthor->set_font_color(aColorAnchor);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - accessibility/inc accessibility/source avmedia/source basctl/source dbaccess/source extensions/source forms/source framework/inc framework/source include/av

2021-03-11 Thread Noel (via logerrit)
 accessibility/inc/standard/vclxaccessibletoolboxitem.hxx |2 
 accessibility/source/standard/vclxaccessibletoolbox.cxx  |   26 +-
 accessibility/source/standard/vclxaccessibletoolboxitem.cxx  |4 
 avmedia/source/framework/mediatoolbox.cxx|2 
 basctl/source/basicide/IDEComboBox.cxx   |4 
 basctl/source/inc/IDEComboBox.hxx|4 
 dbaccess/source/ui/browser/unodatbr.cxx  |4 
 extensions/source/bibliography/toolbar.cxx   |   18 -
 extensions/source/bibliography/toolbar.hxx   |   28 +-
 forms/source/solar/control/navtoolbar.cxx|   61 ++--
 framework/inc/uielement/FixedImageToolbarController.hxx  |2 
 framework/inc/uielement/FixedTextToolbarController.hxx   |2 
 framework/inc/uielement/comboboxtoolbarcontroller.hxx|2 
 framework/inc/uielement/commandinfo.hxx  |5 
 framework/inc/uielement/complextoolbarcontroller.hxx |4 
 framework/inc/uielement/dropdownboxtoolbarcontroller.hxx |2 
 framework/inc/uielement/edittoolbarcontroller.hxx|2 
 framework/inc/uielement/imagebuttontoolbarcontroller.hxx |2 
 framework/inc/uielement/spinfieldtoolbarcontroller.hxx   |2 
 framework/inc/uielement/togglebuttontoolbarcontroller.hxx|2 
 framework/inc/uielement/toolbarmanager.hxx   |3 
 framework/inc/uielement/toolbarmerger.hxx|   12 
 framework/source/fwe/classes/sfxhelperfunctions.cxx  |2 
 framework/source/layoutmanager/toolbarlayoutmanager.cxx  |4 
 framework/source/uielement/FixedImageToolbarController.cxx   |2 
 framework/source/uielement/FixedTextToolbarController.cxx|2 
 framework/source/uielement/comboboxtoolbarcontroller.cxx |2 
 framework/source/uielement/complextoolbarcontroller.cxx  |4 
 framework/source/uielement/dropdownboxtoolbarcontroller.cxx  |2 
 framework/source/uielement/edittoolbarcontroller.cxx |2 
 framework/source/uielement/generictoolbarcontroller.cxx  |6 
 framework/source/uielement/imagebuttontoolbarcontroller.cxx  |2 
 framework/source/uielement/popuptoolbarcontroller.cxx|   14 -
 framework/source/uielement/spinfieldtoolbarcontroller.cxx|2 
 framework/source/uielement/styletoolbarcontroller.cxx|2 
 framework/source/uielement/subtoolbarcontroller.cxx  |8 
 framework/source/uielement/togglebuttontoolbarcontroller.cxx |2 
 framework/source/uielement/toolbarmanager.cxx|   36 +-
 framework/source/uielement/toolbarmerger.cxx |   16 -
 include/avmedia/mediatoolbox.hxx |2 
 include/framework/generictoolbarcontroller.hxx   |4 
 include/framework/sfxhelperfunctions.hxx |5 
 include/sfx2/strings.hrc |2 
 include/sfx2/tbxctrl.hxx |   16 -
 include/svtools/toolboxcontroller.hxx|5 
 include/svx/ParaSpacingControl.hxx   |   14 -
 include/svx/clipboardctl.hxx |2 
 include/svx/colorwindow.hxx  |4 
 include/svx/fillctrl.hxx |2 
 include/svx/formatpaintbrushctrl.hxx |2 
 include/svx/grafctrl.hxx |   18 -
 include/svx/linectrl.hxx |2 
 include/svx/tbxctl.hxx   |2 
 include/vcl/builder.hxx  |3 
 include/vcl/toolbox.hxx  |  128 +
 sc/inc/NumberFormatControl.hxx   |2 
 sc/inc/sc.hrc|6 
 sc/source/ui/app/inputwin.cxx|  143 +--
 sc/source/ui/cctrl/tbzoomsliderctrl.cxx  |4 
 sc/source/ui/inc/tbzoomsliderctrl.hxx|2 
 sc/source/ui/sidebar/NumberFormatControl.cxx |4 
 sd/source/ui/controller/displaymodecontroller.cxx|4 
 sd/source/ui/controller/slidelayoutcontroller.cxx|2 
 sd/source/ui/dlg/diactrl.cxx |2 
 sd/source/ui/dlg/gluectrl.cxx|2 
 sd/source/ui/inc/diactrl.hxx |2 
 sd/source/ui/inc/gluectrl.hxx|2 
 sfx2/inc/inettbc.hxx |2 
 sfx2/inc/sidebar/ControllerFactory.hxx   |3 
 sfx2/inc/sidebar/SidebarToolBox.hxx  |6 
 sfx2/source/appl/linkmgr2.cxx|

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

2021-03-11 Thread Noel (via logerrit)
 sw/source/filter/ww8/ww8graf.cxx  |   10 +-
 sw/source/filter/ww8/ww8graf2.cxx |2 +-
 sw/source/filter/ww8/ww8par.cxx   |4 ++--
 sw/source/filter/ww8/ww8par.hxx   |4 ++--
 sw/source/filter/ww8/ww8par4.cxx  |4 ++--
 sw/source/filter/ww8/ww8par6.cxx  |2 +-
 6 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 0374d5fe08050062394038ffe863c037d95ffac1
Author: Noel 
AuthorDate: Wed Mar 10 14:46:59 2021 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 11 14:09:56 2021 +0100

rename GrafikCtor to GraphicCtor

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

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 674ca5649dca..89a3e8ac14f2 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -,7 +,7 @@ void SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
 
static_cast(pNew)->SetGraphic(aGraph);
 }
 
-GrafikCtor();
+GraphicCtor();
 
 pNew->SetLogicRect( 
pTextObj->GetCurrentBoundRect() );
 pNew->SetLayer( pTextObj->GetLayer() );
@@ -1661,7 +1661,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject 
const * pSdrObj,
 */
 
 // 1. GraphicObject of documents?
-GrafikCtor();
+GraphicCtor();
 
 const SfxItemSet& rOldSet = pSdrObj->GetMergedItemSet();
 
@@ -2512,7 +2512,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( 
tools::Long nGrafAnchorCp )
 m_nDrawCpO = 0;
 m_bDrawCpOValid = m_xWwFib->GetBaseCp(m_xPlcxMan->GetManType() == MAN_HDFT 
? MAN_TXBX_HDFT : MAN_TXBX, &m_nDrawCpO);
 
-GrafikCtor();
+GraphicCtor();
 
 WW8PLCFspecial* pPF = m_xPlcxMan->GetFdoa();
 if( !pPF )
@@ -3186,7 +3186,7 @@ SwFlyFrameFormat* 
SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj
 return pRetFrameFormat;
 }
 
-void SwWW8ImplReader::GrafikCtor()  // For SVDraw and VCControls and Escher
+void SwWW8ImplReader::GraphicCtor()  // For SVDraw and VCControls and Escher
 {
 if (m_pDrawModel)
 return;
@@ -3208,7 +3208,7 @@ void SwWW8ImplReader::GrafikCtor()  // For SVDraw and 
VCControls and Escher
 m_xMSDffManager->GetShapeOrders()));
 }
 
-void SwWW8ImplReader::GrafikDtor()
+void SwWW8ImplReader::GraphicDtor()
 {
 m_pDrawEditEngine.reset(); // maybe created by graphic
 m_xWWZOrder.reset();   // same
diff --git a/sw/source/filter/ww8/ww8graf2.cxx 
b/sw/source/filter/ww8/ww8graf2.cxx
index 3cb16f6422b8..08ef81f6e397 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -467,7 +467,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj const 
* pTextObj,
 
 ::SetProgressState(m_nProgress, m_pDocShell); // Update
 
-GrafikCtor();
+GraphicCtor();
 
 /*
  * Little joke from Microsoft: sometimes a stream named DATA exists. This
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 68069d83a7a1..b95e5e2795af 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4396,7 +4396,7 @@ void wwSectionManager::SetSegmentToPageDesc(const 
wwSection &rSection,
 SwFrameFormat &rFormat = rPage.GetMaster();
 
 if(mrReader.m_xWDop->fUseBackGroundInAllmodes) // #i56806# Make sure 
mrReader is initialized
-mrReader.GrafikCtor();
+mrReader.GraphicCtor();
 
 if (mrReader.m_xWDop->fUseBackGroundInAllmodes && mrReader.m_xMSDffManager)
 {
@@ -5357,7 +5357,7 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const 
*pGloss)
 m_xStyles.reset();
 
 m_xFormImpl.reset();
-GrafikDtor();
+GraphicDtor();
 m_xMSDffManager.reset();
 m_xHdFt.reset();
 m_xSBase.reset();
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 21975f20fac8..bb05228159fd 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1608,8 +1608,8 @@ private:
 SwFrameFormat* MungeTextIntoDrawBox(SvxMSDffImportRec *pRecord,
 tools::Long nGrafAnchorCp, SwFrameFormat *pRetFrameFormat);
 
-void GrafikCtor();
-void GrafikDtor();
+void GraphicCtor();
+void GraphicDtor();
 
 // other stuff
 OUString GetFieldResult( WW8FieldDesc const * pF );
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index 1c5bc2a09b6c..2f0a87cc4849 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -243,7 +243,7 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* 
pGrf,
 ::SetProgressState(m_nProgress, m_pDocShell); // Update
 SwFrameFormat* pFormat = nullptr;
 
-GrafikCtor();
+GraphicCtor();
 
 Graphic aGraph;
  

[Libreoffice-commits] core.git: helpcontent2

2021-03-11 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7643d21bc0191caf78b766b608576f4a9f6a855a
Author: Seth Chaiklin 
AuthorDate: Thu Mar 11 13:44:27 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Mar 11 13:44:27 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 9847ee04682b673c20918af6356c0dbf39aa6deb
  - tdf#102265 finish giving all controls to format menu

  - remove "Slide Layout" and "Slide Design", which are no
longer on this page.
  + embed missing controls
  + for three submenu items, add  and description, which can
be replaced when submenus are made.

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

diff --git a/helpcontent2 b/helpcontent2
index 5b9423fe309b..9847ee04682b 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 5b9423fe309bad1fc15230c1ef641521b424a73a
+Subproject commit 9847ee04682b673c20918af6356c0dbf39aa6deb
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Seth Chaiklin (via logerrit)
 source/text/simpress/main_format.xhp |   27 +++
 1 file changed, 19 insertions(+), 8 deletions(-)

New commits:
commit 9847ee04682b673c20918af6356c0dbf39aa6deb
Author: Seth Chaiklin 
AuthorDate: Wed Mar 10 22:00:02 2021 +0100
Commit: Seth Chaiklin 
CommitDate: Thu Mar 11 13:44:27 2021 +0100

tdf#102265 finish giving all controls to format menu

  - remove "Slide Layout" and "Slide Design", which are no
longer on this page.
  + embed missing controls
  + for three submenu items, add  and description, which can
be replaced when submenus are made.

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

diff --git a/source/text/simpress/main_format.xhp 
b/source/text/simpress/main_format.xhp
index 65b7268b4..ca95949cd 100644
--- a/source/text/simpress/main_format.xhp
+++ b/source/text/simpress/main_format.xhp
@@ -32,9 +32,13 @@
 
 
 
-temporary solution, 
until submenus are made
+temporary solution 
for "Align Text", until submenu is made
+temporary solution 
for "Lists", until submenu is made
 
 
+Styles
+Shows commands to 
edit, update, create, and manage styles.Needs a submenu 
page
+
 Character
 
 
@@ -43,17 +47,24 @@
 
 Bullets and Numbering
 
+
+Table
+Shows commands to 
format, edit, and delete a table and its elements.Needs a 
submenu page
+
+Image
+Shows commands to 
crop, edit, and manage images.Needs a submenu 
page.
+
 
+
 
 
 
-
-Slide Design
-
-
-Slide Layout
-
-
+
+
+
+
+
+
 
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Stephan Bergmann (via logerrit)
 slideshow/source/engine/opengl/Operation.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d148113591c554a3c6d8223767159334c014ad0c
Author: Stephan Bergmann 
AuthorDate: Thu Mar 11 09:02:18 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 11 13:31:20 2021 +0100

Work around MSVC 2019 16.9.0 warning C4103 compiler bug

With that compiler version (and --with-latest-c++), the build now started to
fail for me with

> [build CXX] slideshow/source/engine/opengl/Operation.cxx
> 
C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.299\Include\memory(14): 
error C2220: the following warning is treated as an error
> 
C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.299\Include\memory(14): 
warning C4103: alignment changed after including header, may be due to missing 
#pragma pack(pop)
> C:\lo\core\slideshow\source\engine\opengl\Operation.hxx(34): warning 
C4103: alignment changed after including header, may be due to missing #pragma 
pack(pop)
> C:/lo/core/slideshow/source/engine/opengl/Operation.cxx(36): warning 
C4103: alignment changed after including header, may be due to missing #pragma 
pack(pop)

Mike had experienced the same (though without --with-latest-c++, but due to 
us
now always using /permissive-) as explained in the post-merge comments 
starting
at  "Use MSVC's /permissive- 
to
make it more standards conforming", linking to
 "Warning C4103 in Visual
Studio 16.6 Update".

At least for my --with-latest-c++ aka /std:c++latest case, I have reduced 
the
issue to a test.cc of

> #include 
> template void f(int[1]) {}
> #include 

failing with

> **
> ** Visual Studio 2019 Developer Command Prompt v16.9.0
> ** Copyright (c) 2021 Microsoft Corporation
> **
> [vcvarsall.bat] Environment initialized for: 'x64'
>
> C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>cd \lo\core
>
> C:\test>cl /std:c++latest /c test.cc
> Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29910 for x64
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
> /std:c++latest is provided as a preview of language features from the 
latest C++
>
> working draft, and we're eager to hear about bugs and suggestions for 
improvemen
> ts.
> However, note that these features are provided as-is without support, and 
subjec
> t
> to changes or removal as the working draft evolves. See
> https://go.microsoft.com/fwlink/?linkid=2045807 for details.
>
> test.cc
> test.cc(3): warning C4103: alignment changed after including header, may 
be due
> to missing #pragma pack(pop)

which looks clearly like a compiler bug.

As it happens, reordering the includes here makes the issue disappear at 
least
for me.

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

diff --git a/slideshow/source/engine/opengl/Operation.cxx 
b/slideshow/source/engine/opengl/Operation.cxx
index e70f203edad7..ec83d6b74c32 100644
--- a/slideshow/source/engine/opengl/Operation.cxx
+++ b/slideshow/source/engine/opengl/Operation.cxx
@@ -28,13 +28,13 @@
 
 #include 
 
+#include "Operation.hxx"
+
 #include 
 
 #include 
 #include 
 
-#include "Operation.hxx"
-
 SRotate::SRotate(const glm::vec3& Axis, const glm::vec3& Origin,
 double Angle, bool bInter, double T0, double T1):
 Operation(bInter, T0, T1),
___
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' - cui/source cui/uiconfig

2021-03-11 Thread Szymon Kłos (via logerrit)
 cui/source/customize/cfgutil.cxx   |3 ++-
 cui/source/inc/cfgutil.hxx |1 +
 cui/uiconfig/ui/macroselectordialog.ui |2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 295c8262f7e7e0436301deed5edde9963b19dd11
Author: Szymon Kłos 
AuthorDate: Thu Mar 11 12:33:52 2021 +0100
Commit: Szymon Kłos 
CommitDate: Thu Mar 11 13:28:06 2021 +0100

Remove description from mobile macro selector

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

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index fa9d9139d1f5..24fec3396858 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -1060,6 +1060,7 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
 , m_xOKButton(m_xBuilder->weld_button("ok"))
 , m_xCancelButton(m_xBuilder->weld_button("cancel"))
 , m_xDescriptionText(m_xBuilder->weld_text_view("description"))
+, m_xDescriptionFrame(m_xBuilder->weld_frame("descriptionframe"))
 {
 m_xCancelButton->show();
 m_xDialogDescription->show();
@@ -1096,7 +1097,7 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
 UpdateUI();
 
 if (comphelper::LibreOfficeKit::isActive())
-m_xDescriptionText->hide();
+m_xDescriptionFrame->hide();
 }
 
 SvxScriptSelectorDialog::~SvxScriptSelectorDialog()
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 885ccd8df8e7..20da0fc6f4a6 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -243,6 +243,7 @@ class SvxScriptSelectorDialog : public 
weld::GenericDialogController
 std::unique_ptr m_xOKButton;
 std::unique_ptr m_xCancelButton;
 std::unique_ptr m_xDescriptionText;
+std::unique_ptr m_xDescriptionFrame;
 
 DECL_LINK(ClickHdl, weld::Button&, void);
 DECL_LINK(SelectHdl, weld::TreeView&, void);
diff --git a/cui/uiconfig/ui/macroselectordialog.ui 
b/cui/uiconfig/ui/macroselectordialog.ui
index 4e65088cf94f..6b190e8cbde5 100644
--- a/cui/uiconfig/ui/macroselectordialog.ui
+++ b/cui/uiconfig/ui/macroselectordialog.ui
@@ -274,7 +274,7 @@
   
 
 
-  
+  
 True
 False
 True
___
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/qa

2021-03-11 Thread Miklos Vajna (via logerrit)
 sw/qa/core/draw/data/textbox-undo-ordnum.docx |binary
 sw/qa/core/draw/draw.cxx  |   53 ++
 2 files changed, 53 insertions(+)

New commits:
commit 291bc2799e4d384cb3ccbb429e82a8ea52d3ea2f
Author: Miklos Vajna 
AuthorDate: Mon Mar 8 21:06:10 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Mar 11 13:25:50 2021 +0100

tdf#140292 sw: fix z-order of textbox on undo

Regression from commit 200cd2b99bee18962a970edc5d059286f6c3ea0e
(tdf#138995 DOCX import: fix handling of textbox zorders, 2021-01-11),
the problem was already fixed by Michael Stahl, this just adds a test
for it.

Change-Id: Id613224d5fab0c2d2a3bdfd58bff6d77a92dd374
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112181
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112273

diff --git a/sw/qa/core/draw/data/textbox-undo-ordnum.docx 
b/sw/qa/core/draw/data/textbox-undo-ordnum.docx
new file mode 100644
index ..96b00973289a
Binary files /dev/null and b/sw/qa/core/draw/data/textbox-undo-ordnum.docx 
differ
diff --git a/sw/qa/core/draw/draw.cxx b/sw/qa/core/draw/draw.cxx
index 162bf237d154..400f701ca352 100644
--- a/sw/qa/core/draw/draw.cxx
+++ b/sw/qa/core/draw/draw.cxx
@@ -10,11 +10,14 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
 
 char const DATA_DIRECTORY[] = "/sw/qa/core/draw/data/";
 
@@ -46,6 +49,56 @@ CPPUNIT_TEST_FIXTURE(SwCoreDrawTest, testTextboxDeleteAsChar)
 CPPUNIT_ASSERT_EQUAL(static_cast(0), nActual);
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreDrawTest, testTextboxUndoOrdNum)
+{
+// Given a document with 5 frame formats:
+// - picture
+// - draw format + fly format and a picture in it
+// - picture
+SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "textbox-undo-ordnum.docx");
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+// Test the state before del + undo.
+for (const auto& pFormat : rFormats)
+{
+const SwFrameFormat* pFlyFormat
+= SwTextBoxHelper::getOtherTextBoxFormat(pFormat, RES_DRAWFRMFMT);
+if (!pFlyFormat)
+{
+continue;
+}
+
+sal_Int32 nDrawOrdNum = pFormat->FindRealSdrObject()->GetOrdNum();
+sal_Int32 nFlyOrdNum = pFlyFormat->FindRealSdrObject()->GetOrdNum();
+CPPUNIT_ASSERT_EQUAL(nDrawOrdNum + 1, nFlyOrdNum);
+}
+
+// When selecting the first page, deleting the selection and undoing:
+pWrtShell->Down(true, 3);
+pWrtShell->DelLeft();
+pWrtShell->Undo();
+
+// Then the z-order of the fly format should be still the z-order of the 
draw format + 1, when
+// the fly and draw formats form a textbox pair.
+for (const auto& pFormat : rFormats)
+{
+const SwFrameFormat* pFlyFormat
+= SwTextBoxHelper::getOtherTextBoxFormat(pFormat, RES_DRAWFRMFMT);
+if (!pFlyFormat)
+{
+continue;
+}
+
+sal_Int32 nDrawOrdNum = pFormat->FindRealSdrObject()->GetOrdNum();
+sal_Int32 nFlyOrdNum = pFlyFormat->FindRealSdrObject()->GetOrdNum();
+// Without the accompanying fix in place, this test would have failed 
with:
+// - Expected: 4
+// - Actual  : 2
+// i.e. the fly format was behind the draw format, not visible.
+CPPUNIT_ASSERT_EQUAL(nDrawOrdNum + 1, nFlyOrdNum);
+}
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Michael Stahl (via logerrit)
 sw/inc/dcontact.hxx  |4 ++--
 sw/qa/extras/mailmerge/mailmerge.cxx |2 +-
 sw/source/core/draw/dcontact.cxx |   27 ---
 sw/source/core/inc/flyfrm.hxx|2 +-
 sw/source/core/layout/fly.cxx|6 +++---
 5 files changed, 31 insertions(+), 10 deletions(-)

New commits:
commit 18397b2ede1e6c3feb54bd2bf59da57fd8c4d13a
Author: Michael Stahl 
AuthorDate: Fri Mar 5 21:06:28 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Mar 11 13:25:31 2021 +0100

tdf#140292: (related: tdf#133487) sw: fix ordering of virtual SdrObjects 
for textboxes

Calling XShapes3::sort() on export of the testTdf130314 fails because of
2 consecutive textboxes; the function requires a textbox to immediately
follow its shape in the list (i.e. textbox has OrdNum of shape + 1).

This is because for shapes in header/footer, one virtual SdrVirtObj is
created per page where the header/footer is shown, and the
SwFlyDrawContact::GetOrdNumForNewRef() does not take textbox ordering
into account.

It's not clear if the assumption that the shape's SdrVirtObj is created
before the textbox's always holds, but let's try this for now.

Change-Id: I860896471211bf6c142ab825f298f4d4c0eec148
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112029
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112272

diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index 1082ebc70d94..082c0fe8d77f 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -179,13 +179,13 @@ private:
 
 SwFlyDrawObjPtr mpMasterObj;
 void SwClientNotify(const SwModify&, const SfxHint& rHint) override;
-sal_uInt32 GetOrdNumForNewRef(const SwFlyFrame* pFly);
+sal_uInt32 GetOrdNumForNewRef(const SwFlyFrame* pFly, SwFrame const& 
rAnchorFrame);
 
 public:
 
 /// Creates DrawObject and registers it with the Model.
 SwFlyDrawContact(SwFlyFrameFormat* pToRegisterIn, SdrModel& rTargetModel);
-static SwVirtFlyDrawObj* CreateNewRef(SwFlyFrame* pFly, SwFlyFrameFormat* 
pFormat);
+static SwVirtFlyDrawObj* CreateNewRef(SwFlyFrame* pFly, SwFlyFrameFormat* 
pFormat, SwFrame const& rAnchorFrame);
 virtual ~SwFlyDrawContact() override;
 
 virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj 
) const override;
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx 
b/sw/qa/extras/mailmerge/mailmerge.cxx
index 17d92d3789ac..58173b1e56cb 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -397,7 +397,7 @@ DECLARE_FILE_MAILMERGE_TEST(testMissingDefaultLineColor, 
"missing-default-line-c
 executeMailMerge();
 // The document was created by LO version which didn't write out the 
default value for line color
 // (see XMLGraphicsDefaultStyle::SetDefaults()).
-uno::Reference xPropertySet(getShape(1), 
uno::UNO_QUERY);
+uno::Reference xPropertySet(getShape(5), 
uno::UNO_QUERY);
 // Lines do not have a line color.
 CPPUNIT_ASSERT( !xPropertySet->getPropertySetInfo()->hasPropertyByName( 
"LineColor" ));
 SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index bece3f460079..2c4ab5e5b288 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -480,8 +480,28 @@ SwFlyDrawContact::~SwFlyDrawContact()
 }
 }
 
-sal_uInt32 SwFlyDrawContact::GetOrdNumForNewRef(const SwFlyFrame* pFly)
+sal_uInt32 SwFlyDrawContact::GetOrdNumForNewRef(const SwFlyFrame* pFly,
+SwFrame const& rAnchorFrame)
 {
+// maintain invariant that a shape's textbox immediately follows the shape
+// also for the multiple SdrVirtObj created for shapes in header/footer
+if (SwFrameFormat const*const pDrawFormat =
+SwTextBoxHelper::getOtherTextBoxFormat(GetFormat(), RES_FLYFRMFMT))
+{
+// assume that the draw SdrVirtObj is always created before the 
flyframe one
+if (SwSortedObjs const*const pObjs = rAnchorFrame.GetDrawObjs())
+{
+for (SwAnchoredObject const*const pAnchoredObj : *pObjs)
+{
+if (&pAnchoredObj->GetFrameFormat() == pDrawFormat)
+{
+return pAnchoredObj->GetDrawObj()->GetOrdNum() + 1;
+}
+}
+}
+// if called from AppendObjs(), this is a problem; if called from 
lcl_SetFlyFrameAttr() it's not
+SAL_INFO("sw", "GetOrdNumForNewRef: cannot find SdrObject for text 
box's shape");
+}
 // search for another Writer fly frame registered at same frame format
 SwIterator aIter(*GetFormat());
 const SwFlyFrame* pFlyFrame(nullptr);
@@ -503,7 +523,8 @@ sal_uInt32 SwFlyDrawContact::GetOrdNumForNewRef(const 
SwFlyFrame* pFly)
 return GetMaster()->GetOrdNumDirect();
 }
 
-S

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

2021-03-11 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/autofilter/tdf140754.py   |   84 +
 sc/qa/uitest/data/autofilter/tdf140754.ods |binary
 2 files changed, 84 insertions(+)

New commits:
commit feb4067be5d8e40902190dc58a7a634a21102f34
Author: Xisco Fauli 
AuthorDate: Wed Mar 10 17:15:06 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Mar 11 13:12:45 2021 +0100

tdf#140754: sc: Add UItest

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

diff --git a/sc/qa/uitest/autofilter/tdf140754.py 
b/sc/qa/uitest/autofilter/tdf140754.py
new file mode 100644
index ..4d413ac0d85f
--- /dev/null
+++ b/sc/qa/uitest/autofilter/tdf140754.py
@@ -0,0 +1,84 @@
+# -*- 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, get_url_for_data_file
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from libreoffice.calc.document import get_cell_by_position
+
+class tdf140754(UITestCase):
+
+def test_tdf140754(self):
+
+calc_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf140754.ods"))
+
+#Make sure 'multi-threaded calculation' is enabled
+self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog")
+xDialogOpt = self.xUITest.getTopFocusWindow()
+
+xPages = xDialogOpt.getChild("pages")
+xCalcEntry = xPages.getChild('3')
+xCalcEntry.executeAction("EXPAND", tuple())
+xCalcCalculateEntry = xCalcEntry.getChild('3')
+xCalcCalculateEntry.executeAction("SELECT", tuple())
+
+self.assertEqual('true', 
get_state_as_dict(xDialogOpt.getChild('threadingenabled'))["Selected"])
+
+xOKBtn = xDialogOpt.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+document = self.ui_test.get_component()
+
+self.assertEqual(0, get_cell_by_position(document, 0, 0, 
30).getValue())
+self.assertEqual(0, get_cell_by_position(document, 0, 0, 
82).getValue())
+self.assertEqual(1, get_cell_by_position(document, 0, 0, 
238).getValue())
+self.assertEqual(28, get_cell_by_position(document, 0, 0, 
265).getValue())
+self.assertEqual(28, get_cell_by_position(document, 0, 0, 
1370).getValue())
+
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+
+gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "2", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xAll = xFloatWindow.getChild("toggle_all")
+xAll.executeAction("CLICK", tuple())
+
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+xList = xCheckListMenu.getChild("check_list_box")
+self.assertEqual(25, len(xList.getChildren()))
+
+# Without the fix in place, this test would have crashed here
+xOkBtn = xFloatWindow.getChild("ok")
+xOkBtn.executeAction("CLICK", tuple())
+
+self.assertEqual(0, get_cell_by_position(document, 0, 0, 
30).getValue())
+self.assertEqual(1, get_cell_by_position(document, 0, 0, 
82).getValue())
+self.assertEqual(39, get_cell_by_position(document, 0, 0, 
238).getValue())
+self.assertEqual(66, get_cell_by_position(document, 0, 0, 
265).getValue())
+self.assertEqual(282, get_cell_by_position(document, 0, 0, 
1370).getValue())
+
+gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "6", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xAll = xFloatWindow.getChild("toggle_all")
+xAll.executeAction("CLICK", tuple())
+
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+xList = xCheckListMenu.getChild("check_list_box")
+self.assertEqual(10, len(xList.getChildren()))
+
+xOkBtn = xFloatWindow.getChild("ok")
+xOkBtn.executeAction("CLICK", tuple())
+
+self.assertEqual(1, get_cell_by_position(document, 0, 0, 
30).getValue())
+self.assertEqual(11, get_cell_by_position(document, 0, 0, 
82).getValue())
+self.assertEqual(69, get_cell_by_position(document, 0, 0, 
238).getValue())
+self.assertEqual(96, get_cell_by_position(document, 0, 0, 
265).getValue())
+self.assertEqual(411, get_cell_by_position(document, 0, 0, 
1370).getValue())
+
+self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/autofilter/tdf140754.ods 
b/sc/qa/uitest/data/autofilter/tdf140754.ods
new file mode 100644
index ..f3b3923

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

2021-03-11 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 1453345219b2b0a2e4c7cb993737cdf4de9f2217
Author: Tomaž Vajngerl 
AuthorDate: Thu Mar 4 21:57:49 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Mar 11 12:47:28 2021 +0100

devtools: fix crash by checking if xIntrospection is available

It can happen that xIntrospectionAccess object or xIntrospetion
object can't be created. The app crashed in those cases so add a
check.

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 7f969ae24464..a9687635c380 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -535,7 +535,13 @@ void 
GenericPropertiesNode::fillChildren(std::unique_ptr& pTree,
 }
 
 uno::Reference xIntrospection = 
beans::theIntrospection::get(mxContext);
+if (!xIntrospection.is())
+return;
+
 auto xIntrospectionAccess = xIntrospection->inspect(maAny);
+if (!xIntrospectionAccess.is())
+return;
+
 auto xInvocationFactory = css::script::Invocation::create(mxContext);
 uno::Sequence aParameters = { maAny };
 auto xInvocationInterface = 
xInvocationFactory->createInstanceWithArguments(aParameters);
@@ -610,6 +616,8 @@ ObjectInspectorNodeInterface* 
BasicValueNode::createNodeObjectForAny(OUString co
 return new BasicValueNode(rName, rAny, mxContext);
 }
 
+// helper functions
+
 ObjectInspectorNodeInterface* getSelectedNode(weld::TreeView const& rTreeView)
 {
 OUString sID = rTreeView.get_selected_id();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |5 +
 sfx2/uiconfig/ui/developmenttool.ui |   18 --
 2 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit 8839ea90176a38e07ca8a36f5a33e9cbe2b4fcef
Author: Tomaž Vajngerl 
AuthorDate: Thu Mar 4 15:30:19 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Mar 11 12:46:59 2021 +0100

devtools: add refresh to toolbar for the object inspector

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 5d3d8049d467..7f969ae24464 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -786,6 +786,11 @@ IMPL_LINK(ObjectInspectorTreeHandler, 
ToolbarButtonClicked, const OString&, rSel
 inspectObject(xInterface);
 }
 }
+else if (rSelectionId == "refresh")
+{
+auto rPageId = mpObjectInspectorNotebook->get_current_page_ident();
+NotebookEnterPage(rPageId);
+}
 }
 
 IMPL_LINK(ObjectInspectorTreeHandler, NotebookEnterPage, const OString&, 
rPageId, void)
diff --git a/sfx2/uiconfig/ui/developmenttool.ui 
b/sfx2/uiconfig/ui/developmenttool.ui
index b915d1f6f12d..8326083cde5a 100644
--- a/sfx2/uiconfig/ui/developmenttool.ui
+++ b/sfx2/uiconfig/ui/developmenttool.ui
@@ -426,7 +426,7 @@
   
 True
 False
-Back
+Back
 Back
 True
 cmd/lc_prevrecord.png
@@ -440,7 +440,7 @@
   
 True
 False
-Inspect
+Inspect
 Inspect
 True
 cmd/lc_recsearch.png
@@ -450,6 +450,20 @@
 True
   
 
+
+  
+True
+False
+Refresh
+Refresh
+True
+cmd/lc_reload.png
+  
+  
+False
+True
+  
+
   
   
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/DocumentModelTreeHandler.cxx |   39 --
 1 file changed, 37 insertions(+), 2 deletions(-)

New commits:
commit 9f36bc3a4252ac795696c162accf5c8a20ae258f
Author: Tomaž Vajngerl 
AuthorDate: Wed Mar 3 20:58:47 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Mar 11 12:45:54 2021 +0100

devtools: add text portions for paragraphs to DOM tree view

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

diff --git a/sfx2/source/devtools/DocumentModelTreeHandler.cxx 
b/sfx2/source/devtools/DocumentModelTreeHandler.cxx
index a170e3551bc5..6d15c56f3a5a 100644
--- a/sfx2/source/devtools/DocumentModelTreeHandler.cxx
+++ b/sfx2/source/devtools/DocumentModelTreeHandler.cxx
@@ -122,6 +122,40 @@ public:
 }
 };
 
+class ParagraphEntry : public DocumentModelTreeEntry
+{
+public:
+ParagraphEntry(css::uno::Reference const& xObject)
+: DocumentModelTreeEntry(xObject)
+{
+}
+
+void fill(std::unique_ptr& pDocumentModelTree,
+  weld::TreeIter const& rParent) override
+{
+uno::Reference 
xEnumAccess(getMainObject(), uno::UNO_QUERY);
+if (!xEnumAccess.is())
+return;
+
+uno::Reference xTextPortions = 
xEnumAccess->createEnumeration();
+
+if (xTextPortions.is())
+{
+for (sal_Int32 i = 0; xTextPortions->hasMoreElements(); i++)
+{
+uno::Reference const 
xTextPortion(xTextPortions->nextElement(),
+
uno::UNO_QUERY);
+OUString aString = lclGetNamed(xTextPortion);
+if (aString.isEmpty())
+aString = "Text Portion " + OUString::number(i + 1);
+
+auto pEntry = 
std::make_unique(xTextPortion);
+lclAppendToParentEntry(pDocumentModelTree, rParent, aString, 
pEntry.release());
+}
+}
+}
+};
+
 class ParagraphsEntry : public DocumentModelTreeEntry
 {
 public:
@@ -158,8 +192,9 @@ public:
 if (aString.isEmpty())
 aString = "Paragraph " + OUString::number(i + 1);
 
-auto pEntry = 
std::make_unique(xParagraph);
-lclAppendToParentEntry(pDocumentModelTree, rParent, aString, 
pEntry.release());
+auto pEntry = std::make_unique(xParagraph);
+lclAppendToParentEntry(pDocumentModelTree, rParent, aString, 
pEntry.release(),
+   true);
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |   17 +
 1 file changed, 17 insertions(+)

New commits:
commit a443e4e3d96bf51313451e254a8aada2bad05c52
Author: Tomaž Vajngerl 
AuthorDate: Wed Mar 3 21:28:32 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Mar 11 12:46:26 2021 +0100

devtools: also support XEnumerationAccess in object inspector

Similar like XIndexAccess is XEnumerationAccess, which is like
an iterator over elements, but unlike XIndexAccess the elements
can't be accessed direclty by an index.

In the object inspector the elements of a XEnumeration are
presented as @{number} at the top of the properties.

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index c00ddc645a10..5d3d8049d467 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -517,6 +518,22 @@ void 
GenericPropertiesNode::fillChildren(std::unique_ptr& pTree,
 }
 }
 
+const auto xEnumAccess = 
uno::Reference(maAny, uno::UNO_QUERY);
+if (xEnumAccess.is())
+{
+uno::Reference xEnumeration = 
xEnumAccess->createEnumeration();
+if (xEnumeration.is())
+{
+for (sal_Int32 nIndex = 0; xEnumeration->hasMoreElements(); 
nIndex++)
+{
+uno::Any aAny = xEnumeration->nextElement();
+auto* pObjectInspectorNode
+= createNodeObjectForAny("@{" + OUString::number(nIndex) + 
"}", aAny);
+lclAppendNodeToParent(pTree, pParent, pObjectInspectorNode);
+}
+}
+}
+
 uno::Reference xIntrospection = 
beans::theIntrospection::get(mxContext);
 auto xIntrospectionAccess = xIntrospection->inspect(maAny);
 auto xInvocationFactory = css::script::Invocation::create(mxContext);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Tünde Tóth (via logerrit)
 sc/source/ui/inc/hdrcont.hxx  |2 
 sc/source/ui/view/hdrcont.cxx |  103 +++---
 2 files changed, 98 insertions(+), 7 deletions(-)

New commits:
commit 9bba5f418d4900ba20503dd1d310b3ff68bb14df
Author: Tünde Tóth 
AuthorDate: Thu Jan 28 12:50:53 2021 +0100
Commit: László Németh 
CommitDate: Thu Mar 11 12:14:39 2021 +0100

tdf#89841 sc UI: show blue row numbers for filtered rows

improving appearance of Autofilter for interoperability.

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

diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx
index 777d2e9746df..e30f6e0a3ea5 100644
--- a/sc/source/ui/inc/hdrcont.hxx
+++ b/sc/source/ui/inc/hdrcont.hxx
@@ -39,7 +39,9 @@ private:
 Timer   aShowHelpTimer;
 vcl::Font   aNormFont;
 vcl::Font   aBoldFont;
+vcl::Font   aAutoFilterFont;
 boolbBoldSet;
+boolbAutoFilterSet;
 
 boolbVertical;  // Vertical = Row header
 
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index 78214cb9be68..a4f715ffc81e 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -25,6 +25,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -32,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define SC_DRAG_MIN 2
 
@@ -75,9 +77,11 @@ ScHeaderControl::ScHeaderControl( vcl::Window* pParent, 
SelectionEngine* pSelect
 aNormFont.SetTransparent( true );   //! hard-set WEIGHT_NORMAL ???
 aBoldFont = aNormFont;
 aBoldFont.SetWeight( WEIGHT_BOLD );
+aAutoFilterFont = aNormFont;
 
 SetFont(aBoldFont);
 bBoldSet = true;
+bAutoFilterSet = false;
 
 Size aSize = LogicToPixel( Size(
 GetTextWidth(""),
@@ -223,12 +227,18 @@ void ScHeaderControl::Paint( vcl::RenderContext& 
/*rRenderContext*/, const tools
 
 Color aTextColor = rStyleSettings.GetButtonTextColor();
 Color aSelTextColor = rStyleSettings.GetHighlightTextColor();
+Color aAFilterTextColor = COL_LIGHTBLUE;// color of filtered row 
numbers
 aNormFont.SetColor( aTextColor );
+aAutoFilterFont.SetColor(aAFilterTextColor);
 if ( bHighContrast )
 aBoldFont.SetColor( aTextColor );
 else
 aBoldFont.SetColor( aSelTextColor );
-SetTextColor( ( bBoldSet && !bHighContrast ) ? aSelTextColor : aTextColor 
);
+
+if (bAutoFilterSet)
+SetTextColor(aAFilterTextColor);
+else
+SetTextColor((bBoldSet && !bHighContrast) ? aSelTextColor : 
aTextColor);
 
 Color aSelLineColor = rStyleSettings.GetHighlightColor();
 aSelLineColor.Merge( COL_BLACK, 0xe0 );// darken just a little bit
@@ -381,6 +391,57 @@ void ScHeaderControl::Paint( vcl::RenderContext& 
/*rRenderContext*/, const tools
 }
 }
 
+// tdf#89841 Use blue row numbers when Autofilter selected
+std::vector aSpans;
+if (bVertical)
+{
+SCTAB nTab = pTabView->GetViewData().GetTabNo();
+ScDocument& rDoc = pTabView->GetViewData().GetDocument();
+
+ScDBData* pDBData = rDoc.GetAnonymousDBData(nTab);
+if (pDBData && pDBData->HasAutoFilter())
+{
+SCSIZE nSelected = 0;
+SCSIZE nTotal = 0;
+pDBData->GetFilterSelCount(nSelected, nTotal);
+if (nTotal > nSelected)
+{
+ScRange aRange;
+pDBData->GetArea(aRange);
+SCCOLROW nStartRow = 
static_cast(aRange.aStart.Row());
+SCCOLROW nEndRow = static_cast(aRange.aEnd.Row());
+if (pDBData->HasHeader())
+nStartRow++;
+aSpans.push_back(sc::ColRowSpan(nStartRow, nEndRow));
+}
+}
+
+ScDBCollection* pDocColl = rDoc.GetDBCollection();
+if (!pDocColl->empty())
+{
+ScDBCollection::NamedDBs& rDBs = pDocColl->getNamedDBs();
+for (const auto& rxDB : rDBs)
+{
+if (rxDB->GetTab() == nTab && rxDB->HasAutoFilter())
+{
+SCSIZE nSelected = 0;
+SCSIZE nTotal = 0;
+rxDB->GetFilterSelCount(nSelected, nTotal);
+if (nTotal > nSelected)
+{
+ScRange aRange;
+rxDB->GetArea(aRange);
+SCCOLROW nStartRow = 
static_cast(aRange.aStart.Row());
+SCCOLROW nEndRow = 
static_cast(aRange.aEnd.Row());
+if (rxDB->HasHeader())
+nStartRow++;
+aSpans.push_back(sc::ColRowSpan(nStartRow, nEndRow));
+}
+}
+}
+}

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

2021-03-11 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf136841.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx   |   17 +
 2 files changed, 17 insertions(+)

New commits:
commit 076da4cd9d61adf15942a7bfc350bd0d268f64f1
Author: Xisco Fauli 
AuthorDate: Wed Mar 10 20:32:22 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Mar 11 11:52:16 2021 +0100

tdf#136841: sw_ooxmlexport16: Add unittest

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf136841.docx 
b/sw/qa/extras/ooxmlexport/data/tdf136841.docx
new file mode 100644
index ..6f9020ee17f4
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf136841.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index a819c00e..319695655fcb 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -157,6 +157,23 @@ 
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf140572_docDefault_superscript, "tdf14
 CPPUNIT_ASSERT_EQUAL( sal_Int16(0), 
getProperty(getRun(getParagraph(1), 1), "CharEscapement") );
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf136841, "tdf136841.docx")
+{
+uno::Reference image = getShape(1);
+uno::Reference imageProperties(image, uno::UNO_QUERY);
+uno::Reference graphic;
+imageProperties->getPropertyValue( "Graphic" ) >>= graphic;
+Graphic vclGraphic(graphic);
+BitmapEx bitmap(vclGraphic.GetBitmapEx());
+CPPUNIT_ASSERT_EQUAL( tools::Long(76), bitmap.GetSizePixel().Width());
+CPPUNIT_ASSERT_EQUAL( tools::Long(76), bitmap.GetSizePixel().Height());
+
+// Without the fix in place, this test would have failed with
+// - Expected: Color: R:228 G:71 B:69 A:0
+// - Actual  : Color: R:0 G:0 B:0 A:0
+CPPUNIT_ASSERT_EQUAL( Color(228,71,69), bitmap.GetPixelColor(38,38));
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf138953, "croppedAndRotated.odt")
 {
 CPPUNIT_ASSERT_EQUAL(1, getShapes());
___
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' - cui/source cui/uiconfig

2021-03-11 Thread Szymon Kłos (via logerrit)
 cui/source/customize/cfgutil.cxx   |   41 ++
 cui/source/customize/macropg.cxx   |2 
 cui/source/factory/dlgfact.cxx |2 
 cui/source/inc/cfgutil.hxx |5 -
 cui/uiconfig/ui/macroselectordialog.ui |  132 -
 5 files changed, 31 insertions(+), 151 deletions(-)

New commits:
commit fe902aa8f3b7e6d43bc0d7ea3e6f77d25da40311
Author: Szymon Kłos 
AuthorDate: Thu Mar 11 09:11:38 2021 +0100
Commit: Szymon Kłos 
CommitDate: Thu Mar 11 11:49:22 2021 +0100

Remove unused code from Macro Selector dialog

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

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index a980d4b7fa3f..fa9d9139d1f5 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -1050,37 +1050,27 @@ void CuiConfigGroupListBox::SelectMacro( const 
OUString& rBasic,
  */
 
 SvxScriptSelectorDialog::SvxScriptSelectorDialog(
-weld::Window* pParent, bool bShowSlots, const css::uno::Reference< 
css::frame::XFrame >& xFrame)
+weld::Window* pParent, const css::uno::Reference< css::frame::XFrame >& 
xFrame)
 : GenericDialogController(pParent, "cui/ui/macroselectordialog.ui", 
"MacroSelectorDialog")
-, m_bShowSlots(bShowSlots)
-, m_xDialogDescription(m_xBuilder->weld_label(bShowSlots ? "helptoolbar" : 
"helpmacro"))
+, m_xDialogDescription(m_xBuilder->weld_label("helpmacro"))
 , m_xCategories(new 
CuiConfigGroupListBox(m_xBuilder->weld_tree_view("categories")))
 , m_xCommands(new 
CuiConfigFunctionListBox(m_xBuilder->weld_tree_view("commands")))
 , m_xLibraryFT(m_xBuilder->weld_label("libraryft"))
-, m_xCategoryFT(m_xBuilder->weld_label("categoryft"))
 , m_xMacronameFT(m_xBuilder->weld_label("macronameft"))
-, m_xCommandsFT(m_xBuilder->weld_label("commandsft"))
-, m_xOKButton(m_xBuilder->weld_button(bShowSlots ? "add" : "ok"))
-, m_xCancelButton(m_xBuilder->weld_button(bShowSlots ? "close" : "cancel"))
+, m_xOKButton(m_xBuilder->weld_button("ok"))
+, m_xCancelButton(m_xBuilder->weld_button("cancel"))
 , m_xDescriptionText(m_xBuilder->weld_text_view("description"))
 {
-if (m_bShowSlots)
-{
-// If we are showing Slot API commands update labels in the UI
-m_xDialog->set_title(CuiResId(RID_SVXSTR_SELECTOR_ADD_COMMANDS));
-}
 m_xCancelButton->show();
 m_xDialogDescription->show();
 m_xOKButton->show();
 
-m_xLibraryFT->set_visible(!m_bShowSlots);
-m_xCategoryFT->set_visible(m_bShowSlots);
-m_xMacronameFT->set_visible(!m_bShowSlots);
-m_xCommandsFT->set_visible(m_bShowSlots);
+m_xLibraryFT->set_visible(true);
+m_xMacronameFT->set_visible(true);
 
 const OUString 
aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame));
 m_xCategories->SetFunctionListBox(m_xCommands.get());
-m_xCategories->Init(comphelper::getProcessComponentContext(), xFrame, 
aModuleName, bShowSlots);
+m_xCategories->Init(comphelper::getProcessComponentContext(), xFrame, 
aModuleName, /*bShowSlots*/false);
 
 m_xCategories->connect_changed(
 LINK( this, SvxScriptSelectorDialog, SelectHdl ) );
@@ -1104,6 +1094,9 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
 m_xCategories->SetStylesInfo(&m_aStylesInfo);
 
 UpdateUI();
+
+if (comphelper::LibreOfficeKit::isActive())
+m_xDescriptionText->hide();
 }
 
 SvxScriptSelectorDialog::~SvxScriptSelectorDialog()
@@ -1154,19 +1147,7 @@ IMPL_LINK(SvxScriptSelectorDialog, ClickHdl, 
weld::Button&, rButton, void)
 }
 else if (&rButton == m_xOKButton.get())
 {
-// If we are displaying Slot API commands then this the dialog is being
-// run from Tools/Configure and we should not close it
-if ( !m_bShowSlots )
-{
-m_xDialog->response(RET_OK);
-}
-else
-{
-// Select the next entry in the list if possible
-std::unique_ptr xIter = 
m_xCommands->make_iterator();
-if (m_xCommands->get_selected(xIter.get()) && 
m_xCommands->iter_next_sibling(*xIter))
-m_xCommands->select(*xIter);
-}
+m_xDialog->response(RET_OK);
 }
 }
 
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 2fb442dbdb24..cdf07498f83e 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -460,7 +460,7 @@ void 
SvxMacroTabPage_::GenericHandler_Impl(SvxMacroTabPage_* pThis, const weld::
 else if( bAssEnabled )
 {
 // assign pressed
-SvxScriptSelectorDialog aDlg(pThis->GetFrameWeld(), false, 
pThis->GetFrame());
+SvxScriptSelectorDialog aDlg(pThis->GetFrameWeld(), pThis->GetFrame());
 short ret = aDlg.run();
 if ( ret

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

2021-03-11 Thread Luboš Luňák (via logerrit)
 vcl/skia/salbmp.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7d4644f0631d7b88514d9a92def06a463021f283
Author: Luboš Luňák 
AuthorDate: Wed Mar 10 13:03:54 2021 +0100
Commit: Michael Stahl 
CommitDate: Thu Mar 11 11:44:58 2021 +0100

forgotten ComputeScanlineSize() (tdf#140917)

Change-Id: Id139cea52832b7973dfac47d309d5bba8299b4e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112263
Reviewed-by: Mark Hung 
Reviewed-by: Luboš Luňák 
Tested-by: Jenkins
(cherry picked from commit 7ba7a1170a46ad340d06822a03f7196ccef29d84)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112227
Reviewed-by: Michael Stahl 

diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index eeb528267b0f..e29f84b90b53 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -320,6 +320,7 @@ bool SkiaSalBitmap::Scale(const double& rScaleX, const 
double& rScaleY, BmpScale
 if (mEraseColorSet)
 { // Simple.
 mSize = mPixelsSize = newSize;
+ComputeScanlineSize();
 EraseInternal(mEraseColor);
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: idl/source reportdesign/source sc/source sd/source sw/source vcl/source

2021-03-11 Thread Bayram Çiçek (via logerrit)
 idl/source/objects/module.cxx   |2 +-
 idl/source/objects/object.cxx   |2 +-
 idl/source/objects/slot.cxx |2 +-
 reportdesign/source/ui/report/dlgedfunc.cxx |4 ++--
 sc/source/core/tool/chartpos.cxx|7 +++
 sc/source/filter/excel/xiname.cxx   |2 +-
 sd/source/core/drawdoc_animations.cxx   |2 +-
 sw/source/filter/xml/xmltbli.cxx|4 ++--
 vcl/source/window/toolbox2.cxx  |4 ++--
 9 files changed, 14 insertions(+), 15 deletions(-)

New commits:
commit a88effc4f53da8ae476f6a9f24b96e5948b17bee
Author: Bayram Çiçek 
AuthorDate: Sun Feb 14 19:11:12 2021 +
Commit: Michael Stahl 
CommitDate: Thu Mar 11 11:37:49 2021 +0100

tdf#114441: Convert use of sal_uLong to better integer types

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

diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 17c483a3243e..e97dd29d651c 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -26,7 +26,7 @@ SvMetaModule::SvMetaModule() {}
 
 void SvMetaModule::WriteSfx(SvIdlDataBase& rBase, SvStream& rOutStm)
 {
-for (sal_uLong n = 0; n < aClassList.size(); n++)
+for (size_t n = 0; n < aClassList.size(); n++)
 {
 SvMetaClass* pClass = aClassList[n];
 pClass->WriteSfx(rBase, rOutStm);
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index a424bb748044..1c8299b132d4 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -106,7 +106,7 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, 
SvTokenStream & rInStm,
 SAL_WARN( "idl", "new slot : " << rAttr.GetSlotId().getString() );
 }
 
-for( sal_uLong n = 0; n < aAttrList.size(); n++ )
+for( size_t n = 0; n < aAttrList.size(); n++ )
 {
 SvMetaAttribute * pS = aAttrList[n];
 if( pS->GetName() == rAttr.GetName() )
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 30b6b1fe0eca..fcdbbb8e95d0 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -579,7 +579,7 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & 
rBase, SvStream & rO
 
 const SvRefMemberList& rList =
 pType->GetAttrList();
-for( sal_uLong n = 0; n < rList.size(); n++ )
+for( size_t n = 0; n < rList.size(); n++ )
 {
 SvMetaAttribute * pPar  = rList[n];
 SvMetaType * pPType = pPar->GetType();
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx 
b/reportdesign/source/ui/report/dlgedfunc.cxx
index 4e653cb87930..d2be2d012406 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -411,8 +411,8 @@ void DlgEdFunc::deactivateOle(bool _bSelect)
 {
 OLEObjCache& rObjCache = GetSdrGlobalData().GetOLEObjCache();
 OReportController& rController = 
m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->getController();
-const sal_uLong nCount = rObjCache.size();
-for(sal_uLong i = 0 ; i< nCount;++i)
+const size_t nCount = rObjCache.size();
+for(size_t i = 0 ; i < nCount;++i)
 {
 SdrOle2Obj* pObj = rObjCache[i];
 if ( m_pParent->getPage() == pObj->getSdrPageFromSdrObject() )
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 48e734ec2454..aee7df6583b6 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -422,11 +422,10 @@ void ScChartPositioner::CreatePositionMap()
 if ( bNoGlue )
 {   // fill gaps with Dummies, first column is master
 RowMap& rFirstCol = aColMap.begin()->second;
-sal_uLong nCount = rFirstCol.size();
-RowMap::const_iterator it1 = rFirstCol.begin();
-for ( sal_uLong n = 0; n < nCount; n++, ++it1 )
+
+for ( auto& it1 : rFirstCol )
 {
-sal_uLong nKey = it1->first;
+sal_uLong nKey = it1.first;
 for (ColumnMap::iterator it2 = ++aColMap.begin(); it2 != 
aColMap.end(); ++it2 )
 it2->second.emplace( nKey, nullptr ); // no data
 }
diff --git a/sc/source/filter/excel/xiname.cxx 
b/sc/source/filter/excel/xiname.cxx
index 11d1d753963a..d498dfba492c 100644
--- a/sc/source/filter/excel/xiname.cxx
+++ b/sc/source/filter/excel/xiname.cxx
@@ -282,7 +282,7 @@ XclImpNameManager::XclImpNameManager( const XclImpRoot& 
rRoot ) :
 
 void XclImpNameManager::ReadName( XclImpStream& rStrm )
 {
-sal_uLong nCount = maNameList.size();
+size_t nCount = maNameList.size();
 if( nCount < 0x )
 maNameList.push_back( std::make_unique( rStrm, 
static_cast< sal_uInt16 >( nCount + 1 ) ) );
 }
diff --git a/sd

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

2021-03-11 Thread Miklos Vajna (via logerrit)
 svx/qa/unit/xoutdev.cxx|   11 +++
 svx/source/inc/svdpdf.hxx  |7 +--
 svx/source/svdraw/svdedtv2.cxx |   14 --
 svx/source/svdraw/svdpdf.cxx   |8 
 4 files changed, 16 insertions(+), 24 deletions(-)

New commits:
commit c792cbf4f2d0d44279f273c4c6cba650601f1468
Author: Miklos Vajna 
AuthorDate: Wed Mar 10 21:18:45 2021 +0100
Commit: Miklos Vajna 
CommitDate: Thu Mar 11 11:29:08 2021 +0100

svx: rework to avoid pdfium ifdefs

Return early in case pdfium is not available, to avoid the ifdef forest.

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

diff --git a/svx/qa/unit/xoutdev.cxx b/svx/qa/unit/xoutdev.cxx
index f422b5141705..4e0cc5ff0b48 100644
--- a/svx/qa/unit/xoutdev.cxx
+++ b/svx/qa/unit/xoutdev.cxx
@@ -7,8 +7,6 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
-
 #include 
 #include 
 #include 
@@ -22,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class XOutdevTest : public CppUnit::TestFixture
 {
@@ -35,7 +34,12 @@ public:
 
 CPPUNIT_TEST_FIXTURE(XOutdevTest, testPdfGraphicExport)
 {
-#if HAVE_FEATURE_PDFIUM
+auto pPdfium = vcl::pdf::PDFiumLibrary::get();
+if (!pPdfium)
+{
+return;
+}
+
 // Import the graphic.
 Graphic aGraphic;
 test::Directories aDirectories;
@@ -62,7 +66,6 @@ CPPUNIT_TEST_FIXTURE(XOutdevTest, testPdfGraphicExport)
 CPPUNIT_ASSERT_EQUAL(static_cast('D'), sFirstBytes[2]);
 CPPUNIT_ASSERT_EQUAL(static_cast('F'), sFirstBytes[3]);
 CPPUNIT_ASSERT_EQUAL(static_cast('-'), sFirstBytes[4]);
-#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/inc/svdpdf.hxx b/svx/source/inc/svdpdf.hxx
index 271eb1fd6dee..f8736a7bc891 100644
--- a/svx/source/inc/svdpdf.hxx
+++ b/svx/source/inc/svdpdf.hxx
@@ -20,9 +20,6 @@
 #ifndef INCLUDED_SVX_SOURCE_SVDRAW_SVDPDF_HXX
 #define INCLUDED_SVX_SOURCE_SVDRAW_SVDPDF_HXX
 
-#include 
-
-#if HAVE_FEATURE_PDFIUM
 #include 
 
 #include 
@@ -140,8 +137,6 @@ public:
 SvdProgressInfo* pProgrInfo = nullptr);
 };
 
-#endif // HAVE_FEATURE_PDFIUM
-
-#endif // INCLUDED_SVX_SOURCE_SVDRAW_SVDFMTF_HXX
+#endif // INCLUDED_SVX_SOURCE_SVDRAW_SVDPDF_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 17ced3685bff..ef1a1c43e89b 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -2108,14 +2108,16 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo 
*pProgrInfo)
 
 if (pVectorGraphicData && pVectorGraphicData->getType() == 
VectorGraphicDataType::Pdf)
 {
-#if HAVE_FEATURE_PDFIUM
-aLogicRect = pGraf->GetLogicRect();
-ImpSdrPdfImport aFilter(*mpModel, pObj->GetLayer(), 
aLogicRect, aGraphic);
-if (aGraphic.getPageNumber() < aFilter.GetPageCount())
+auto pPdfium = vcl::pdf::PDFiumLibrary::get();
+if (pPdfium)
 {
-nInsCnt = aFilter.DoImport(*pOL, nInsPos, 
aGraphic.getPageNumber(), pProgrInfo);
+aLogicRect = pGraf->GetLogicRect();
+ImpSdrPdfImport aFilter(*mpModel, pObj->GetLayer(), 
aLogicRect, aGraphic);
+if (aGraphic.getPageNumber() < aFilter.GetPageCount())
+{
+nInsCnt = aFilter.DoImport(*pOL, nInsPos, 
aGraphic.getPageNumber(), pProgrInfo);
+}
 }
-#endif // HAVE_FEATURE_PDFIUM
 }
 else if (pGraf->HasGDIMetaFile() || 
pGraf->isEmbeddedVectorGraphicData() )
 {
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 75f079540935..714e90da7c52 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -19,12 +19,6 @@
 
 #include 
 
-#include 
-
-#if HAVE_FEATURE_PDFIUM
-#include 
-#include 
-
 #include 
 #include 
 #include 
@@ -1060,6 +1054,4 @@ tools::Rectangle ImpSdrPdfImport::PointsToLogic(double 
left, double right, doubl
 return tools::Rectangle(aPos, aSize);
 }
 
-#endif // HAVE_FEATURE_PDFIUM
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Need help with contributing

2021-03-11 Thread Ilmari Lauhakangas

On 11.3.2021 9.56, SHABBIR KHAN wrote:
Hello, I am looking forward to contributing to libreoffice and i need 
some guidance, please help me out with things like where to start. There 
is a very vague list of files in the project, i want to know the file 
where i should start off from


it would make me really happy and encouraged to receive a reply from 
you, thank you for taking the time out of your schedule to read this.



I have invited you to an orienting interview.

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


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

2021-03-11 Thread Andreas Heinisch (via logerrit)
 sc/qa/uitest/calc_tests3/tdf89754.py |   45 +++
 sc/source/core/data/table4.cxx   |7 +
 2 files changed, 52 insertions(+)

New commits:
commit 3ba901f050d262cdeccefa5b21b0d32aa7332dc7
Author: Andreas Heinisch 
AuthorDate: Sat Mar 6 10:38:43 2021 +0100
Commit: Eike Rathke 
CommitDate: Thu Mar 11 11:07:07 2021 +0100

tdf#89754 - don't increment non different consecutive date cells

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

diff --git a/sc/qa/uitest/calc_tests3/tdf89754.py 
b/sc/qa/uitest/calc_tests3/tdf89754.py
new file mode 100644
index ..855688c8f45b
--- /dev/null
+++ b/sc/qa/uitest/calc_tests3/tdf89754.py
@@ -0,0 +1,45 @@
+# -*- 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.calc import enter_text_to_cell
+from libreoffice.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+#tdf#89754 - EDITING: 'Autofill - Date' don't increment non different 
consecutive date cells
+
+class tdf89754(UITestCase):
+
+def test_tdf89754_autofill_date(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()
+
+#1 - A1: 2012-10-31 and A2: 2012-10-31
+enter_text_to_cell(gridwin, "A1", "2012-10-31")
+enter_text_to_cell(gridwin, "A2", "2012-10-31")
+
+#2 - Select A1:A5
+gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A5"}))
+
+#3 - Edit -> fill -> Series -> Down
+self.ui_test.execute_dialog_through_command(".uno:FillSeries")
+xDialog = self.xUITest.getTopFocusWindow()
+xOK = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOK)
+
+#4 - Expected: All Cells show the initial date
+self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 
41213)
+self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 
41213)
+self.assertEqual(get_cell_by_position(document, 0, 0, 2).getValue(), 
41213)
+self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 
41213)
+self.assertEqual(get_cell_by_position(document, 0, 0, 4).getValue(), 
41213)
+
+self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 4db88f60bb7c..02e6c1c31d83 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -588,6 +588,13 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 rInc = nCmpInc;
 }
 }
+else
+{
+// tdf#89754 - don't increment non different consecutive 
date cells
+rCmd = FILL_DATE;
+rDateCmd = FILL_DAY;
+rInc = 0.0;
+}
 }
 else// single date -> increment by days
 {
___
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' - oox/source sd/qa

2021-03-11 Thread Regina Henschel (via logerrit)
 oox/source/drawingml/scene3dcontext.cxx|   24 +
 oox/source/drawingml/textbodypropertiescontext.cxx |   16 ++
 sd/qa/unit/data/pptx/tdf140865Wordart3D.pptx   |binary
 sd/qa/unit/export-tests-ooxml1.cxx |   24 +
 4 files changed, 64 insertions(+)

New commits:
commit d1026ad7ad1562235b328bb5be2e00ceabd09475
Author: Regina Henschel 
AuthorDate: Mon Mar 8 17:28:27 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Mar 11 11:03:21 2021 +0100

tdf#140865 roundtrip pptx wordart 3D, add sp3d

Change-Id: I446ae4e8c9dd5f2fbf3efe289681339f967c515a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112185
Tested-by: Jenkins
Reviewed-by: Regina Henschel 
(cherry picked from commit dbbb8cafcb801638bde3b21796eaebfc807acbdc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112229
Reviewed-by: Xisco Fauli 

diff --git a/oox/source/drawingml/scene3dcontext.cxx 
b/oox/source/drawingml/scene3dcontext.cxx
index 91b73f0bbd95..813f9442c901 100644
--- a/oox/source/drawingml/scene3dcontext.cxx
+++ b/oox/source/drawingml/scene3dcontext.cxx
@@ -92,6 +92,30 @@ ContextHandlerRef 
SceneText3DPropertiesContext::onCreateContext( sal_Int32 aElem
 case A_TOKEN( backdrop ):
 case A_TOKEN( extLst ):
 return nullptr; // TODO: later (backdrop is not supported by core 
anyway)
+
+case A_TOKEN( bevelT ):
+case A_TOKEN( bevelB ):
+{
+BevelProperties aProps;
+if( rAttribs.hasAttribute( XML_w ) )
+aProps.mnWidth = rAttribs.getInteger( XML_w, 0 );
+if( rAttribs.hasAttribute( XML_h ) )
+aProps.mnHeight = rAttribs.getInteger( XML_h, 0 );
+if( rAttribs.hasAttribute( XML_prst ) )
+aProps.mnPreset = rAttribs.getToken( XML_prst, XML_none );
+
+if( aElementToken == A_TOKEN( bevelT ) )
+mr3DProperties.maTopBevelProperties.set( aProps );
+else
+mr3DProperties.maBottomBevelProperties.set( aProps );
+break;
+}
+
+case A_TOKEN( extrusionClr ):
+return new ColorContext( *this, mr3DProperties.maExtrusionColor );
+
+case A_TOKEN( contourClr ):
+return new ColorContext( *this, mr3DProperties.maContourColor );
 }
 return nullptr;
 }
diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx 
b/oox/source/drawingml/textbodypropertiescontext.cxx
index 5bc244b73fc2..4d94191dcfc7 100644
--- a/oox/source/drawingml/textbodypropertiescontext.cxx
+++ b/oox/source/drawingml/textbodypropertiescontext.cxx
@@ -177,6 +177,22 @@ ContextHandlerRef 
TextBodyPropertiesContext::onCreateContext( sal_Int32 aElement
 
 // EG_Text3D
 case A_TOKEN( sp3d ):   // CT_Shape3D
+{
+if (mpShapePtr && mpShapePtr->getServiceName() == 
"com.sun.star.drawing.CustomShape")
+{
+if (rAttribs.hasAttribute(XML_extrusionH))
+
mpShapePtr->getTextBody()->get3DProperties().mnExtrusionH = 
rAttribs.getInteger(XML_extrusionH, 0);
+if (rAttribs.hasAttribute(XML_contourW))
+
mpShapePtr->getTextBody()->get3DProperties().mnContourW = 
rAttribs.getInteger(XML_contourW, 0);
+if (rAttribs.hasAttribute(XML_z))
+mpShapePtr->getTextBody()->get3DProperties().mnShapeZ 
= rAttribs.getInteger(XML_z, 0);
+if (rAttribs.hasAttribute(XML_prstMaterial))
+
mpShapePtr->getTextBody()->get3DProperties().mnMaterial = 
rAttribs.getToken(XML_prstMaterial, XML_none);
+return new SceneText3DPropertiesContext(*this, 
mpShapePtr->getTextBody()->get3DProperties());
+}
+break;
+}
+
 case A_TOKEN( flatTx ): // CT_FlatText
 
 break;
diff --git a/sd/qa/unit/data/pptx/tdf140865Wordart3D.pptx 
b/sd/qa/unit/data/pptx/tdf140865Wordart3D.pptx
new file mode 100644
index ..e55bc43800b4
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf140865Wordart3D.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index a76c8ec137e6..d0837001ceca 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -102,6 +102,7 @@ public:
 void testTdf136911();
 void testArcTo();
 void testNarrationMimeType();
+void testTdf140865Wordart3D();
 
 CPPUNIT_TEST_SUITE(SdOOXMLExportTest1);
 
@@ -153,6 +154,7 @@ public:
 CPPUNIT_TEST(testTdf136911);
 CPPUNIT_TEST(testArcTo);
 CPPUNIT_TEST(testNarrationMimeType);
+CPPUNIT_TEST(testTdf140865Wordart3D);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -1325,6 +1327,28 @@ void SdOOXMLExportTest1::testNarrationMimeType()
 xDocShRef->DoClose();
 }
 
+void SdOOXMLExportTest1::testTdf140865Wordart3D()
+{
+sd::DrawDocShellRef xDocShRef
+= 
loadURL(m_

[Libreoffice-commits] core.git: helpcontent2

2021-03-11 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 87354bca54d3d6682bd85d94a4dc368fd796431b
Author: Seth Chaiklin 
AuthorDate: Thu Mar 11 10:57:35 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Mar 11 10:57:35 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 5b9423fe309bad1fc15230c1ef641521b424a73a
  - tdf#118008 updating Format menu path page

  * "Area" -> "Object and Shape" (for Impress transparency tab)
  * "Align" -> "Align Text" (and remove "drawing functions", because
 this is found in all modules)
  + add appl-switch for Group commands (and remove the mention of
which applications, in part because they were missing modules,
and mostly because now the appl-switch should show the right
possibilities, so they do not need to be differentiated).

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

diff --git a/helpcontent2 b/helpcontent2
index a50530fe4e22..5b9423fe309b 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit a50530fe4e224b01f37cd9c959d3bded32b8bd6a
+Subproject commit 5b9423fe309bad1fc15230c1ef641521b424a73a
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Seth Chaiklin (via logerrit)
 source/text/shared/00/00040502.xhp |   58 ++---
 1 file changed, 41 insertions(+), 17 deletions(-)

New commits:
commit 5b9423fe309bad1fc15230c1ef641521b424a73a
Author: Seth Chaiklin 
AuthorDate: Thu Mar 11 02:47:45 2021 +0100
Commit: Seth Chaiklin 
CommitDate: Thu Mar 11 10:57:35 2021 +0100

tdf#118008 updating Format menu path page

  * "Area" -> "Object and Shape" (for Impress transparency tab)
  * "Align" -> "Align Text" (and remove "drawing functions", because
 this is found in all modules)
  + add appl-switch for Group commands (and remove the mention of
which applications, in part because they were missing modules,
and mostly because now the appl-switch should show the right
possibilities, so they do not need to be differentiated).

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

diff --git a/source/text/shared/00/00040502.xhp 
b/source/text/shared/00/00040502.xhp
index 660648895..2b7f06c47 100644
--- a/source/text/shared/00/00040502.xhp
+++ b/source/text/shared/00/00040502.xhp
@@ -125,7 +125,7 @@
 
 
 Choose Format 
- Area - Transparency tab (drawing documents).
-Choose Format 
- Area - Transparency tab (presentation documents).
+Choose Format 
- Object and Shape - Area - Transparency tab (presentation 
documents).
 Choose Format 
- Chart Wall - Transparency tab (chart documents).
 Choose Format 
- Chart Area - Transparency tab (chart documents).
 Choose Format 
- Chart Floor - Transparency tab (chart documents).
@@ -346,7 +346,7 @@
 Open context menu - 
choose Line Spacing - Double.
 
 
-Choose Format 
- Align - Left (drawing functions).
+Choose Format 
- Align Text - Left.
 Open context menu - 
choose Align - Left.
 
 
@@ -362,7 +362,7 @@
 
 
 
-Choose Format 
- Align - Right (drawing functions).
+Choose Format 
- Align Text - Right.
 Open context menu - 
choose Align - Right.
 
 
@@ -378,7 +378,7 @@
 
 
 
-Choose Format 
- Align - Centered (drawing functions).
+Choose Format 
- Align Text - Centered.
 Open context menu - 
choose Align - Center.
 
 
@@ -394,7 +394,7 @@
 
 
 
-Choose Format 
- Align - Justified (drawing functions).
+Choose Format 
- Align Text - Justified.
 Open context menu - 
choose Align - Justified.
 
 
@@ -415,9 +415,15 @@
 Open context menu - 
choose Group.
 
 
-Choose Format 
- Group - Group (text documents, spreadsheets).
-Choose Shape 
- Group - Group (drawing documents).
-Open context menu - 
choose Group - Group (form objects).
+  
+
+  Choose 
Shape - Group - Group
+
+
+  Choose 
Format - Group - Group
+
+  
+  Open context menu - 
choose Group (for text box and shapes).
 
 
 
@@ -432,9 +438,15 @@
 
 
 
-Choose Format 
- Group - Ungroup (text documents, spreadsheets).
-Choose Shape 
- Group - Ungroup (drawing documents).
-Open context menu - 
choose Ungroup.
+  
+
+   Choose 
Shape - Group - Ungroup.
+
+
+  Choose 
Format - Group - Ungroup.
+
+  
+  Open context menu - 
choose Ungroup.
 
 
 
@@ -449,10 +461,16 @@
 
 
 
-Choose Format 
- Group - Exit Group (text documents, spreadsheets).
-Choose Shape 
- Group - Exit Group (drawing documents).
-Open context menu - 
choose Exit Group.
-
+  
+
+  Choose 
Shape - Group - Exit Group.
+
+
+  Choose 
Format - Group - Exit Group.
+
+  
+  Open context menu - 
choose Exit Group.
+  
 
 
 
@@ -466,8 +484,14 @@
 
 
 
-Choose Format 
- Group - Enter Group (text documents, spreadsheets).
-Choose Shape 
- Group - Enter Group (drawing documents).
+  
+ 
+  Choose 
Shape - Group - Enter Group.
+
+ 
+  Choose 
Format - Group - Enter Group.
+
+  
 Open context menu - 
choose Enter Group.
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/writer_tests5/tdf123378.py |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 9ff37cb094d2c20c2fc591d8e7e06c462aa2d88f
Author: Xisco Fauli 
AuthorDate: Thu Mar 11 10:04:01 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Mar 11 10:11:39 2021 +0100

Revert "uitest: sw: re-enable test to see if it still fails"

This reverts commit 3d2ed830d63f0d1adcb0404ad979d5fcf9706ca2.

Jenkins still fails with this test. See
https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/82317/console

Meanwhile, sw/qa/uitest/writer_dialogs/openDialogs.py:20 doesn't fail

Change-Id: I19d3fc2993e8d7a5a0c031f30d258d57a9cda114
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112321
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/uitest/writer_tests5/tdf123378.py 
b/sw/qa/uitest/writer_tests5/tdf123378.py
index 6c78e0ecf699..d7b832e25c8c 100644
--- a/sw/qa/uitest/writer_tests5/tdf123378.py
+++ b/sw/qa/uitest/writer_tests5/tdf123378.py
@@ -10,6 +10,8 @@ from uitest.framework import UITestCase
 
 class tdf123378(UITestCase):
def test_tdf123378_print_sets_modified(self):
+# FIXME unstable test
+return
 self.ui_test.create_doc_in_start_center("writer")
 document = self.ui_test.get_component()
 xWriterDoc = self.xUITest.getTopFocusWindow()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Caolán McNamara (via logerrit)
 include/sfx2/childwin.hxx |4 ++--
 sc/source/ui/navipi/navipi.cxx|4 ++--
 sfx2/source/appl/childwin.cxx |8 
 sw/source/uibase/utlui/navipi.cxx |8 
 4 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit cf234dc05a3a75199890e953d789bd19b02c1725
Author: Caolán McNamara 
AuthorDate: Tue Mar 9 20:15:28 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 10:08:47 2021 +0100

rename SfxChildWindowContext::GetFloatingWindow to what it does

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

diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index fd614a06d632..b78f8301c653 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -132,11 +132,11 @@ public:
 sal_uInt16  GetContextId() const
 { return nContextId; }
 
-static SystemWindow* GetFloatingWindow(vcl::Window *pParent);
-
 static void RegisterChildWindowContext(SfxModule*, sal_uInt16, 
std::unique_ptr);
 };
 
+extern SFX2_DLLPUBLIC bool ParentIsFloatingWindow(vcl::Window *pParent);
+
 class SFX2_DLLPUBLIC SfxChildWindow
 {
 VclPtrpParent; // parent window ( Topwindow )
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 5d813e172033..1759bf7cea23 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -447,7 +447,7 @@ void ScNavigatorDlg::StateChanged(StateChangedType 
nStateChange)
 // When the navigator is displayed in the sidebar, or is otherwise
 // docked, it has the whole deck to fill. Therefore hide the button 
that
 // hides all controls below the top two rows of buttons.
-m_xTbxCmd1->set_item_visible("contents", 
SfxChildWindowContext::GetFloatingWindow(GetParent()) != nullptr);
+m_xTbxCmd1->set_item_visible("contents", 
ParentIsFloatingWindow(GetParent()));
 }
 }
 
@@ -764,7 +764,7 @@ void ScNavigatorDlg::SetListMode(NavListMode eMode)
 {
 if (eMode != eListMode)
 {
-bool bForceParentResize = 
SfxChildWindowContext::GetFloatingWindow(GetParent()) &&
+bool bForceParentResize = ParentIsFloatingWindow(GetParent()) &&
   (eMode == NAV_LMODE_NONE || eListMode == 
NAV_LMODE_NONE);
 SfxNavigator* pNav = bForceParentResize ? 
dynamic_cast(GetParent()) : nullptr;
 if (pNav && eMode == NAV_LMODE_NONE) //save last normal size on 
minimizing
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 72e469a04403..430593a88ab9 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -529,17 +529,17 @@ SfxChildWindowContext::~SfxChildWindowContext()
 pWindow.disposeAndClear();
 }
 
-SystemWindow* SfxChildWindowContext::GetFloatingWindow(vcl::Window *pParent)
+bool ParentIsFloatingWindow(vcl::Window *pParent)
 {
 if (pParent->GetType() == WindowType::DOCKINGWINDOW || pParent->GetType() 
== WindowType::TOOLBOX)
 {
-return static_cast(pParent)->GetFloatingWindow();
+return true;
 }
 if (pParent->GetType() == WindowType::FLOATINGWINDOW)
 {
-return static_cast(pParent);
+return true;
 }
-return nullptr;
+return false;
 }
 
 void SfxChildWindow::SetFactory_Impl( SfxChildWinFactory *pF )
diff --git a/sw/source/uibase/utlui/navipi.cxx 
b/sw/source/uibase/utlui/navipi.cxx
index 6052eafb1911..08ba46dae8e3 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -193,7 +193,7 @@ IMPL_LINK(SwNavigationPI, ToolBoxSelectHdl, const OString&, 
rCommand, void)
 }
 else if (rCommand == "listbox")
 {
-if (SfxChildWindowContext::GetFloatingWindow(GetParent()))
+if (ParentIsFloatingWindow(GetParent()))
 {
 if (IsZoomedIn())
 {
@@ -562,7 +562,7 @@ SwNavigationPI::SwNavigationPI(vcl::Window* pParent,
 
 m_aStatusArr[3] = SwResId(STR_ACTIVE_VIEW);
 
-bool bFloatingNavigator = 
SfxChildWindowContext::GetFloatingWindow(GetParent()) != nullptr;
+bool bFloatingNavigator = ParentIsFloatingWindow(GetParent());
 
 m_xContentTree->set_selection_mode(SelectionMode::Single);
 m_xContentTree->ShowTree();
@@ -726,9 +726,9 @@ void SwNavigationPI::StateChanged(StateChangedType 
nStateChange)
 // the sidebar or is otherwise docked. While the navigator could change
 // its size, the sidebar can not, and the navigator would just waste
 // space. Therefore disable this button.
-m_xContent6ToolBox->set_item_sensitive("listbox", 
SfxChildWindowContext::GetFloatingWindow(GetParent()) != nullptr);
+m_xContent6ToolBox->set_item_sensitive("listbox", 
ParentIsFloatingWindow(GetParent()));
 // show content if docked
-if (SfxChildWindowContext::

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

2021-03-11 Thread Caolán McNamara (via logerrit)
 include/sfx2/navigat.hxx  |   28 +
 sc/source/ui/app/scdll.cxx|3 -
 sc/source/ui/inc/navipi.hxx   |   17 ++-
 sc/source/ui/navipi/navipi.cxx|   41 ++-
 sd/source/ui/app/sddll.cxx|4 -
 sd/source/ui/dlg/NavigatorChildWindow.cxx |   51 ---
 sd/source/ui/inc/NavigatorChildWindow.hxx |   17 ++-
 sd/source/ui/inc/navigatr.hxx |   21 -
 sd/source/ui/view/drviews4.cxx|2 
 sd/source/ui/view/drviewsd.cxx|2 
 sfx2/source/appl/appreg.cxx   |1 
 sfx2/source/dialog/navigat.cxx|   28 -
 sw/source/uibase/app/swmodule.cxx |3 -
 sw/source/uibase/inc/navipi.hxx   |   17 ++-
 sw/source/uibase/utlui/navipi.cxx |   64 +++---
 15 files changed, 165 insertions(+), 134 deletions(-)

New commits:
commit 001cf630f14109b4200b218161418350562713fa
Author: Caolán McNamara 
AuthorDate: Tue Mar 9 15:51:53 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 10:07:57 2021 +0100

register navigator individually in each module that it exists in

instead of globally. This makes the navigators the same
as everything else and easier to deal with.

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

diff --git a/include/sfx2/navigat.hxx b/include/sfx2/navigat.hxx
index 29b7c84f41c6..f5fc9acb3fd7 100644
--- a/include/sfx2/navigat.hxx
+++ b/include/sfx2/navigat.hxx
@@ -23,30 +23,24 @@
 #include 
 #include 
 
-class SfxNavigatorWrapper final : public SfxChildWindow
+class SFX2_DLLPUBLIC SfxNavigatorWrapper : public SfxChildWindow
 {
-
+protected:
+void Initialize(SfxChildWinInfo* pInfo);
 public:
-SfxNavigatorWrapper( vcl::Window* pParent ,
-sal_uInt16 nId ,
-SfxBindings* pBindings ,
-SfxChildWinInfo* pInfo );
-
-SFX_DECL_CHILDWINDOW(SfxNavigatorWrapper);
+SfxNavigatorWrapper( vcl::Window* pParent ,
+sal_uInt16 nId ,
+SfxBindings* pBindings ,
+SfxChildWinInfo* pInfo );
 };
 
-class SFX2_DLLPUBLIC SfxNavigator final : public SfxDockingWindow
+class SFX2_DLLPUBLIC SfxNavigator : public SfxDockingWindow
 {
-SfxChildWindow* pWrapper;
-
 public:
-SfxNavigator( SfxBindings* pBindings ,
-SfxChildWindow* pChildWin ,
-vcl::Window* pParent ,
-WinBits nBits );
+SfxNavigator(SfxBindings* pBindings, SfxChildWindow* pChildWin,
+ vcl::Window* pParent);
 
-virtual voidResize() override;
-virtual boolClose() override;
+virtual void Resize() override;
 };
 
 #endif
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 56d5e106e042..548ae028853a 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -177,7 +177,6 @@ void ScDLL::Init()
 // Child Windows
 
 ScInputWindowWrapper::RegisterChildWindow(true, pMod, 
SfxChildWindowFlags::TASK|SfxChildWindowFlags::FORCEDOCK);
-ScNavigatorDialogWrapper
::RegisterChildWindowContext(static_cast(ScTabViewShell::GetInterfaceId()),
 pMod);
 ScSolverDlgWrapper  ::RegisterChildWindow(false, pMod);
 ScOptSolverDlgWrapper   ::RegisterChildWindow(false, pMod);
 ScXMLSourceDlgWrapper   ::RegisterChildWindow(false, pMod);
@@ -225,6 +224,8 @@ void ScDLL::Init()
 sc::SearchResultsDlgWrapper::RegisterChildWindow(false, pMod);
 ScCondFormatDlgWrapper::RegisterChildWindow(false, pMod);
 
+ScNavigatorWrapper::RegisterChildWindow(false, pMod, 
SfxChildWindowFlags::NEVERHIDE);
+
 // Add 3DObject Factory
 E3dObjFactory();
 
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index fae782112f7c..37f6bbb1 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include "content.hxx"
 
@@ -85,8 +86,8 @@ private:
 
 class ScNavigatorDlg : public PanelLayout, public SfxListener
 {
+friend class ScNavigatorWin;
 friend class ScNavigatorControllerItem;
-friend class ScNavigatorDialogWrapper;
 friend class ScContentTree;
 
 private:
@@ -179,18 +180,12 @@ public:
 virtual void StateChanged(StateChangedType nStateChange) override;
 };
 
-class ScNavigatorDialogWrapper: public SfxChildWindowContext
+class ScNavigatorWrapper final : public SfxNavigatorWrapper
 {
 public:
-ScNavigatorDialogWrapper( vcl::Window*   pParent,
-  

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

2021-03-11 Thread Caolán McNamara (via logerrit)
 sd/source/ui/sidebar/LayoutMenu.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5229cacba320f829ca0acd6ef79ddbb09d52b2d9
Author: Caolán McNamara 
AuthorDate: Wed Mar 10 11:02:22 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 10:06:29 2021 +0100

schedule redraw to draw without focus

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

diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx 
b/sd/source/ui/sidebar/LayoutMenu.cxx
index 29b4350aef18..41261b20c17d 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -707,7 +707,7 @@ IMPL_LINK(LayoutMenu, EventMultiplexerListener, 
::sd::tools::EventMultiplexerEve
 break;
 
 case EventMultiplexerEventId::MainViewRemoved:
-HideFocus();
+mxLayoutValueSet->Invalidate(); // redraw without focus
 break;
 
 case EventMultiplexerEventId::ConfigurationUpdated:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Caolán McNamara (via logerrit)
 include/sfx2/sidebar/FocusManager.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 51144537404beb2341fae7e0c9de9b121b222c0e
Author: Caolán McNamara 
AuthorDate: Wed Mar 10 17:18:48 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 10:05:42 2021 +0100

use SharedPanelContainer typedef

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

diff --git a/include/sfx2/sidebar/FocusManager.hxx 
b/include/sfx2/sidebar/FocusManager.hxx
index 9f58a76ce9b1..d20e7c4466bf 100644
--- a/include/sfx2/sidebar/FocusManager.hxx
+++ b/include/sfx2/sidebar/FocusManager.hxx
@@ -70,7 +70,7 @@ public:
 
 private:
 VclPtr mpDeckTitleBar;
-std::vector > maPanels;
+SharedPanelContainer maPanels;
 std::vector maButtons;
 const std::function maShowPanelFunctor;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Caolán McNamara (via logerrit)
 include/vcl/dockwin.hxx   |1 +
 vcl/source/window/dockwin.cxx |   16 
 2 files changed, 17 insertions(+)

New commits:
commit 16a91006ca44da08fb436d70129e7a8cbff9e2d2
Author: Caolán McNamara 
AuthorDate: Wed Mar 10 14:21:42 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 10:04:21 2021 +0100

allow throwing away size cache of hosted container

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

diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx
index 8dbe5ead00a4..afca81622a2f 100644
--- a/include/vcl/dockwin.hxx
+++ b/include/vcl/dockwin.hxx
@@ -248,6 +248,7 @@ protected:
 public:
 ResizableDockingWindow(vcl::Window* pParent,
 const css::uno::Reference &rFrame = 
css::uno::Reference());
+void InvalidateChildSizeCache();
 ResizableDockingWindow(vcl::Window* pParent, WinBits nStyle);
 virtual ~ResizableDockingWindow() override;
 virtual void dispose() override;
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 6834317c87ff..3b622cf1cd73 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -1115,6 +1115,22 @@ 
ResizableDockingWindow::ResizableDockingWindow(vcl::Window* pParent, WinBits nSt
 {
 }
 
+// needed to blow away the cached size of the boundary between vcl and hosted 
child widget
+void ResizableDockingWindow::InvalidateChildSizeCache()
+{
+// find the bottom vcl::Window of the hierarchy and queue_resize on that
+// one will invalidate all the size caches upwards
+vcl::Window* pChild = GetWindow(GetWindowType::FirstChild);
+while (true)
+{
+vcl::Window* pSubChild = pChild->GetWindow(GetWindowType::FirstChild);
+if (!pSubChild)
+break;
+pChild = pSubChild;
+}
+pChild->queue_resize();
+}
+
 ResizableDockingWindow::~ResizableDockingWindow()
 {
 disposeOnce();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkobject.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 81d5acda2c143ab1183c7dc6d2386cc1b28c9fcf
Author: Caolán McNamara 
AuthorDate: Wed Mar 10 12:53:19 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 11 10:03:55 2021 +0100

in GtkSalObject::GetOptimalSize get the preferred size

and not its current size as set via SetPosSize

as needed for calc navigator shrink/expand contents toolbar toggle

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

diff --git a/vcl/unx/gtk3/gtk3gtkobject.cxx b/vcl/unx/gtk3/gtk3gtkobject.cxx
index 5923088b79ee..e6da598d5e30 100644
--- a/vcl/unx/gtk3/gtk3gtkobject.cxx
+++ b/vcl/unx/gtk3/gtk3gtkobject.cxx
@@ -206,8 +206,18 @@ Size GtkSalObjectBase::GetOptimalSize() const
 bool bVisible = gtk_widget_get_visible(m_pSocket);
 if (!bVisible)
 gtk_widget_set_visible(m_pSocket, true);
+
+// Undo SetPosSize before getting its preferred size
+gint width(-1), height(-1);
+gtk_widget_get_size_request(m_pSocket, &width, &height);
+gtk_widget_set_size_request(m_pSocket, -1, -1);
+
 GtkRequisition size;
 gtk_widget_get_preferred_size(m_pSocket, nullptr, &size);
+
+// Restore SetPosSize size
+gtk_widget_set_size_request(m_pSocket, width, height);
+
 if (!bVisible)
 gtk_widget_set_visible(m_pSocket, false);
 return Size(size.width, size.height);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'private/tml/cp-6-4-28-1'

2021-03-11 Thread Tor Lillqvist (via logerrit)
New branch 'private/tml/cp-6-4-28-1' available with the following commits:
commit 205313ed3727b8e6966e3be47940ef14a59afc89
Author: Tor Lillqvist 
Date:   Wed Mar 10 13:06:54 2021 +0200

Don't unselect an existing selection on (long) press on iOS and Android

A (long) press, also known as a long tap, in Collabora Online (as used
to bring up a context menu), shows up in core as a click of the right
mouse button. We don't want that to cause an existing selection to be
unselected.

This fixes https://github.com/CollaboraOnline/online/issues/1323

Why this problem happened only in presentation documents I have no
idea.

Change-Id: Iebbf71e75dcea7c39a92fd8d5dd07c368d92f163
Signed-off-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112261
Tested-by: Jenkins CollaboraOffice 

___
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' - sw/source

2021-03-11 Thread Mike Kaganski (via logerrit)
 sw/source/uibase/utlui/content.cxx |   61 +
 1 file changed, 42 insertions(+), 19 deletions(-)

New commits:
commit 57cbadcd84bff198811629470f0554396b041f40
Author: Mike Kaganski 
AuthorDate: Tue Mar 9 12:59:41 2021 +0300
Commit: Mike Kaganski 
CommitDate: Thu Mar 11 09:14:31 2021 +0100

tdf#40427: use node index as position, not Y position on screen

As mentioned in comment to SwContent::nYPosition in
sw/source/uibase/inc/swcont.hxx:

  some subclasses appear to use this for a tools/gen.hxx-style
  geometric Y position, while e.g. SwOutlineContent wants to store
  the index in its subtree

Abusing the nYPosition to store vertical position *on screen* gives
wrong results when a following section is positioned on screen higher
than a previous section - e.g., when multiple-page view is active.

So just use the section's node as Y position of the Navigator entry.
When the section is inside a fly frame, use the frame's anchor node.

Change-Id: I6caf26aeb19d845129dc837138c37f42bbc18655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112197
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112283
Tested-by: Jenkins CollaboraOffice 

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 85e6d4559608..06c4795a6531 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -268,6 +268,26 @@ namespace
 
 return false;
 }
+
+// Gets "YPos" for SwRegionContent, i.e. a number used to sort sections in 
Navigator's list
+long getYPosForSection(const SwNodeIndex& rNodeIndex)
+{
+sal_uLong nIndex = rNodeIndex.GetIndex();
+if (rNodeIndex.GetNodes().GetEndOfExtras().GetIndex() >= nIndex)
+{
+// Not a node of BodyText
+// Are we in a fly?
+if (const auto pFlyFormat = rNodeIndex.GetNode().GetFlyFormat())
+{
+// Get node index of anchor
+if (auto pSwPosition = pFlyFormat->GetAnchor().GetContentAnchor())
+{
+nIndex = getYPosForSection(pSwPosition->nNode);
+}
+}
+}
+return static_cast(nIndex);
+}
 } // end of anonymous namespace
 
 SwContentType::SwContentType(SwWrtShell* pShell, ContentTypeId nType, 
sal_uInt8 nLevel) :
@@ -359,18 +379,20 @@ void SwContentType::Init(bool* pbInvalidateWindow)
 pOldMember = std::move(m_pMember);
 m_pMember.reset( new SwContentArr );
 }
-const Point aNullPt;
 m_nMemberCount = m_pWrtShell->GetSectionFormatCount();
 for(size_t i = 0; i < m_nMemberCount; ++i)
 {
-const SwSectionFormat* pFormat;
-SectionType eTmpType;
-if( (pFormat = 
&m_pWrtShell->GetSectionFormat(i))->IsInNodesArr() &&
-(eTmpType = pFormat->GetSection()->GetType()) != 
TOX_CONTENT_SECTION
-&& TOX_HEADER_SECTION != eTmpType )
+const SwSectionFormat* pFormat = 
&m_pWrtShell->GetSectionFormat(i);
+if (!pFormat->IsInNodesArr())
+continue;
+const SwSection* pSection = pFormat->GetSection();
+if (SectionType eTmpType = pSection->GetType();
+eTmpType == TOX_CONTENT_SECTION || eTmpType == 
TOX_HEADER_SECTION)
+continue;
+const SwNodeIndex* pNodeIndex = 
pFormat->GetContent().GetContentIdx();
+if (pNodeIndex)
 {
-const OUString& rSectionName =
-pFormat->GetSection()->GetSectionName();
+const OUString& rSectionName = pSection->GetSectionName();
 sal_uInt8 nLevel = 0;
 SwSectionFormat* pParentFormat = pFormat->GetParent();
 while(pParentFormat)
@@ -380,8 +402,7 @@ void SwContentType::Init(bool* pbInvalidateWindow)
 }
 
 std::unique_ptr pCnt(new SwRegionContent(this, 
rSectionName,
-nLevel,
-pFormat->FindLayoutRect( false, &aNullPt ).Top()));
+nLevel, getYPosForSection(*pNodeIndex)));
 
 SwPtrMsgPoolItem aAskItem( RES_CONTENT_VISIBLE, nullptr );
 if( !pFormat->GetInfo( aAskItem ) &&
@@ -664,17 +685,20 @@ void SwContentType::FillMemberList(bool* 
pbLevelOrVisibilityChanged)
 break;
 case ContentTypeId::REGION:
 {
-const Point aNullPt;
 m_nMemberCount = m_pWrtShell->GetSectionFormatCount();
 for(size_t i = 0; i < m_nMemberCount; ++i)
 {
-const SwSectionFormat* pFormat;
-SectionType eTmpType;
-if( (pFormat = 
&m_pWrtShe