[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/source sw/uiconfig

2023-10-25 Thread Skyler Grey (via logerrit)
 sw/source/core/fields/reffld.cxx |   21 +
 sw/uiconfig/swriter/ui/fldrefpage.ui |2 +-
 2 files changed, 6 insertions(+), 17 deletions(-)

New commits:
commit 60c111838da81697a49b3011eebe8b1e05ad08bb
Author: Skyler Grey 
AuthorDate: Tue Oct 24 10:19:52 2023 +
Commit: Skyler Grey 
CommitDate: Wed Oct 25 16:36:51 2023 +0200

Improve STYLE_FROM_BOTTOM compatability with Word

From my testing in Word, it doesn't honor the "search from bottom" flag
when it is in the body, only in marginals. Additionally, it doesn't
continue searching in the opposite order if the referenced content is
not found on the current page, instead it searches in the same order as
it would normally (i.e. pages above then pages below). This commit
changes the behavior and UI of our from bottom flag to match.

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

diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 3a7bc4ae4e70..1f8aae4e3506 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -1385,8 +1385,6 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, 
const OUString& rRefMark,
 case REF_STYLE:
 if (!pSelf) break;
 
-bool bFlagFromBottom = (nFlags & REFFLDFLAG_STYLE_FROM_BOTTOM) == 
REFFLDFLAG_STYLE_FROM_BOTTOM;
-
 const SwNodes& nodes = pDoc->GetNodes();
 
 StyleRefElementType elementType = StyleRefElementType::Default;
@@ -1435,6 +1433,8 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, 
const OUString& rRefMark,
 // For marginals, styleref tries to act on the current 
page first
 // 1. Get the page we're on, search it from top to bottom
 
+bool bFlagFromBottom = (nFlags & 
REFFLDFLAG_STYLE_FROM_BOTTOM) == REFFLDFLAG_STYLE_FROM_BOTTOM;
+
 Point aPt;
 std::pair const tmp(aPt, false);
 
@@ -1500,10 +1500,7 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, 
const OUString& rRefMark,
 
 if (beforeStart)
 {
-if (bFlagFromBottom)
-pSearchThird.push_front(nodes[n]);
-else
-pSearchSecond.push_front(nodes[n]);
+pSearchSecond.push_front(nodes[n]);
 }
 else if (beforeEnd)
 {
@@ -1517,8 +1514,6 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, 
const OUString& rRefMark,
 beforeEnd = false;
 }
 }
-else if (bFlagFromBottom)
-pSearchSecond.push_back(nodes[n]);
 else
 pSearchThird.push_back(nodes[n]);
 }
@@ -1580,20 +1575,14 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, 
const OUString& rRefMark,
 {
 if (beforeElement)
 {
-if (bFlagFromBottom)
-pSearchSecond.push_front(nodes[n]);
-else
-pSearchFirst.push_front(nodes[n]);
+pSearchFirst.push_front(nodes[n]);
 
 if (*pReference == *nodes[n])
 {
 beforeElement = false;
 }
 }
-else if (bFlagFromBottom)
-pSearchFirst.push_back(nodes[n]);
-else
-pSearchSecond.push_back(nodes[n]);
+pSearchSecond.push_back(nodes[n]);
 }
 
 // 1. Search up until we hit the top of the document
diff --git a/sw/uiconfig/swriter/ui/fldrefpage.ui 
b/sw/uiconfig/swriter/ui/fldrefpage.ui
index 635cbb35fb41..8592211ef10e 100644
--- a/sw/uiconfig/swriter/ui/fldrefpage.ui
+++ b/sw/uiconfig/swriter/ui/fldrefpage.ui
@@ -201,7 +201,7 @@
 top
 
   
-Search from bottom to top
+Search this page from bottom to 
top
 True
 True
 False


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/source sw/uiconfig vcl/jsdialog

2023-03-21 Thread Pranam Lashkari (via logerrit)
 sw/source/ui/frmdlg/column.cxx |2 +-
 sw/uiconfig/swriter/ui/columndialog.ui |   20 +---
 vcl/jsdialog/enabled.cxx   |1 +
 3 files changed, 19 insertions(+), 4 deletions(-)

New commits:
commit f50d009885c499e55db35571ace83f2ed7effbfe
Author: Pranam Lashkari 
AuthorDate: Mon Mar 20 18:35:31 2023 +0530
Commit: Szymon Kłos 
CommitDate: Tue Mar 21 12:59:32 2023 +

jsdialog: enable column dialog (writer)

Change-Id: I4b91d271d766d8efeaddc3c3775513184036c5f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149167
Reviewed-by: Szymon Kłos 
Tested-by: Szymon Kłos 

diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 5692a906e279..c2a24ad18ef6 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -89,7 +89,7 @@ SwColumnDlg::SwColumnDlg(weld::Window* pParent, SwWrtShell& 
rSh)
 , m_bSectionChanged(false)
 , m_bSelSectionChanged(false)
 , m_bFrameChanged(false)
-, m_xContentArea(m_xDialog->weld_content_area())
+, m_xContentArea(m_xBuilder->weld_container("content"))
 , m_xOkButton(m_xBuilder->weld_button("ok"))
 {
 SwRect aRect;
diff --git a/sw/uiconfig/swriter/ui/columndialog.ui 
b/sw/uiconfig/swriter/ui/columndialog.ui
index 5bf4d5d9d999..2162f1e5b2fd 100644
--- a/sw/uiconfig/swriter/ui/columndialog.ui
+++ b/sw/uiconfig/swriter/ui/columndialog.ui
@@ -17,6 +17,23 @@
 False
 vertical
 12
+
+  
+True
+False
+vertical
+12
+
+  
+
+  
+  
+False
+True
+begin
+0
+  
+
 
   
 False
@@ -74,9 +91,6 @@
 0
   
 
-
-  
-
   
 
 
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 6595cf7971c0..7efb9de2bb84 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -128,6 +128,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/captionoptions.ui"
 || rUIFile == u"modules/swriter/ui/characterproperties.ui"
 || rUIFile == u"modules/swriter/ui/charurlpage.ui"
+|| rUIFile == u"modules/swriter/ui/columndialog.ui"
 || rUIFile == u"modules/swriter/ui/columnpage.ui"
 || rUIFile == u"modules/swriter/ui/contentcontroldlg.ui"
 || rUIFile == u"modules/swriter/ui/contentcontrollistitemdlg.ui"