core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source

2024-04-26 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc|6 
 formula/source/core/api/FormulaCompiler.cxx  |1 
 include/formula/compiler.hxx |3 
 include/formula/opcode.hxx   |2 
 sc/README.md |1 
 sc/inc/helpids.h |1 
 sc/inc/scfuncs.hrc   |   14 
 sc/qa/extras/scfunctionlistobj.cxx   |2 
 sc/qa/unit/data/functions/spreadsheet/fods/sequence.fods | 4231 +++
 sc/qa/unit/ucalc.cxx |1 
 sc/source/core/data/funcdesc.cxx |1 
 sc/source/core/inc/interpre.hxx  |1 
 sc/source/core/tool/interpr4.cxx |1 
 sc/source/core/tool/interpr5.cxx |   61 
 sc/source/core/tool/parclass.cxx |1 
 sc/source/core/tool/token.cxx|1 
 sc/source/filter/excel/xlformula.cxx |3 
 sc/source/filter/oox/formulabase.cxx |3 
 18 files changed, 4330 insertions(+), 4 deletions(-)

New commits:
commit 35772a003bb30be61f8ba8abe805455e41db0e1e
Author: Balazs Varga 
AuthorDate: Wed Apr 17 17:12:37 2024 +0200
Commit: Balazs Varga 
CommitDate: Fri Apr 26 09:33:23 2024 +0200

tdf#126573 Add Excel2021 array function SEQUENCE to Calc

Add new function called SEQUENCE to the function list.

(TODO: dynamic array in separate patch, oasis proposal)

Change-Id: I9fa6f2c83536536987542cc00a9eec5c196ada8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166245
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 82d3a52c98e8..ec1f81699e7f 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -315,6 +315,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "MDETERM" , SC_OPCODE_MAT_DET },
 { "MINVERSE" , SC_OPCODE_MAT_INV },
 { "MMULT" , SC_OPCODE_MAT_MULT },
+{ "COM.MICROSOFT.SEQUENCE" , SC_OPCODE_MAT_SEQUENCE },
 { "TRANSPOSE" , SC_OPCODE_MAT_TRANS },
 { "MUNIT" , SC_OPCODE_MATRIX_UNIT },
 { "ORG.OPENOFFICE.GOALSEEK" , SC_OPCODE_BACK_SOLVER },
@@ -767,6 +768,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "MDETERM" , SC_OPCODE_MAT_DET },
 { "MINVERSE" , SC_OPCODE_MAT_INV },
 { "MMULT" , SC_OPCODE_MAT_MULT },
+{ "_xlfn.SEQUENCE" , SC_OPCODE_MAT_SEQUENCE },
 { "TRANSPOSE" , SC_OPCODE_MAT_TRANS },
 { "_xlfn.MUNIT" , SC_OPCODE_MATRIX_UNIT },
 { "_xlfn.ORG.OPENOFFICE.GOALSEEK" , SC_OPCODE_BACK_SOLVER },
@@ -1222,6 +1224,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "MDETERM" , SC_OPCODE_MAT_DET },
 { "MINVERSE" , SC_OPCODE_MAT_INV },
 { "MMULT" , SC_OPCODE_MAT_MULT },
+{ "SEQUENCE" , SC_OPCODE_MAT_SEQUENCE },
 { "TRANSPOSE" , SC_OPCODE_MAT_TRANS },
 { "MUNIT" , SC_OPCODE_MATRIX_UNIT },
 { "GOALSEEK" , SC_OPCODE_BACK_SOLVER },
@@ -1678,6 +1681,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "MDETERM" , SC_OPCODE_MAT_DET },
 { "MINVERSE" , SC_OPCODE_MAT_INV },
 { "MMULT" , SC_OPCODE_MAT_MULT },
+{ "SEQUENCE" , SC_OPCODE_MAT_SEQUENCE },
 { "TRANSPOSE" , SC_OPCODE_MAT_TRANS },
 { "MUNIT" , SC_OPCODE_MATRIX_UNIT },
 { "GOALSEEK" , SC_OPCODE_BACK_SOLVER },
@@ -2132,6 +2136,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "MDETERM" , SC_OPCODE_MAT_DET },
 { "MINVERSE" , SC_OPCODE_MAT_INV },
 { "MMULT" , SC_OPCODE_MAT_MULT },
+{ "SEQUENCE" , SC_OPCODE_MAT_SEQUENCE },
 { "TRANSPOSE" , SC_OPCODE_MAT_TRANS },
 { "MUNIT" , SC_OPCODE_MATRIX_UNIT },
 { "GOALSEEK" , SC_OPCODE_BACK_SOLVER },
@@ -2565,6 +2570,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MDETERM") , SC_OPCODE_MAT_DET },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MINVERSE") , SC_OPCODE_MAT_INV },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MMULT") , SC_OPCODE_MAT_MULT },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "SEQUENCE") , SC_OPCODE_MAT_SEQUENCE },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "TRANSPOSE") , SC_OPCODE_MAT_TRANS },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MUNIT") , SC_OPCODE_MATRIX_UNIT },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "GOALSEEK") , SC_OPCODE_BACK_SOLVER },
diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 278628cbd648..0f75df5cc184 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1224,6 +1224,7 @@ bool FormulaCompiler::IsMatrixFunction( OpCode eOpCode )
 case ocLogest :
 case ocLinest :
 case 

core.git: sc/qa sc/source

2024-04-19 Thread Balazs Varga (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  364 +++-
 sc/source/core/inc/interpre.hxx |1 
 sc/source/core/tool/interpr1.cxx|   16 
 3 files changed, 365 insertions(+), 16 deletions(-)

New commits:
commit 8df17c340193c89549d8c563b04d015156afa3fb
Author: Balazs Varga 
AuthorDate: Thu Apr 18 19:35:42 2024 +0200
Commit: Balazs Varga 
CommitDate: Fri Apr 19 09:19:37 2024 +0200

tdf#160711 - sc fix XLOOKUP function search for empty cell

Make XLOOKUP function able to search for empty cells.

Change-Id: Iefa71b938fe658a59d52e0bf605dbef7a62742c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166263
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
index f6cfb74b24c5..8da1a44240bd 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
@@ -1,7 +1,7 @@
 
 
 http://openoffice.org/2004/office; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns
 :css3t="http://www.w3.org/TR/css3-text/; 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2024-01-16T18:30:06.27800PT1H22M11S26LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/3f63df475b9c7039d93d0d66c74c4d0ad79894862024-02-27T14:15:45.12500
+ 
2024-01-16T18:30:06.27800PT1H51M16S29LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/24914caa6013b41b6614710322a3084cf4a2aa102024-04-18T19:16:45.85500
  
   
0
@@ -14,7 +14,7 @@
  
   
2
-   4
+   0
2
0
0
@@ -31,12 +31,12 @@
   
   
0
-   128
+   133
2
0
0
0
-   46
+   90
0
65
60
@@ -48,7 +48,7 @@
   
  
  Sheet1
- 2479
+ 1677
  0
  65
  60
@@ -1353,6 +1353,194 @@


   
+  
+   
+Ft
+  
+  
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   
+   -
+   
+Ft
+   
+  
+  
+   
+   
+  
+  
+   -
+   
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   -
+   
+   
+   
+  
+  
+   
+   
+  
+  
+   -
+   
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   -
+   
+   
+   
+  
+  
+
+
+   
+
+  
+  
+   -
+
+   
+
+  
+  
+
+
+   - 
+  
+  
+
+   
+
+   
+   
+   
+  
+  
+
+
+   
+Ft 
+  
+  
+   -
+
+   
+Ft 
+  
+  
+
+
+   - Ft 
+  
+  
+
+   
+
+   
+   
+   
+  
+  
+
+
+   
+
+  
+  
+   -
+
+   
+
+  
+  
+
+
+   -
+   
+
+  
+  
+
+   
+
+   
+   
+   
+  
+  
+
+
+   
+Ft 
+  
+  
+   -
+
+   
+Ft 
+  
+  
+
+
+   -
+   
+Ft 
+  
+  
+
+   

core.git: chart2/qa chart2/source oox/source xmloff/source

2024-04-18 Thread Balazs Varga (via logerrit)
 chart2/qa/extras/chart2export3.cxx|  138 +-
 chart2/qa/extras/data/ods/tdf39052.ods|binary
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx |   46 +---
 chart2/source/model/main/Title.cxx|3 
 oox/source/export/chartexport.cxx |   12 -
 xmloff/source/chart/SchXMLAxisContext.cxx |   22 --
 xmloff/source/chart/SchXMLChartContext.cxx|   39 ---
 xmloff/source/chart/SchXMLChartContext.hxx|6 
 xmloff/source/chart/SchXMLExport.cxx  |   77 ---
 xmloff/source/chart/SchXMLParagraphContext.cxx|  131 +
 xmloff/source/chart/SchXMLParagraphContext.hxx|   44 
 xmloff/source/chart/SchXMLTools.cxx   |   92 +
 xmloff/source/chart/SchXMLTools.hxx   |4 
 xmloff/source/chart/transporttypes.hxx|2 
 14 files changed, 491 insertions(+), 125 deletions(-)

New commits:
commit d7214aba95bbdcbd40e87ef50fc66f2e2ec4f5ff
Author: Balazs Varga 
AuthorDate: Mon Apr 15 13:39:03 2024 +0200
Commit: Balazs Varga 
CommitDate: Thu Apr 18 18:07:57 2024 +0200

tdf#160517 - chart odf: import/export formatted chart titles

(main, sub, axis titles) texts properly to/from odf format.

Fix odf export of formatted chart titles. The exported data structure
will look like:



This
 is
.
.
.
3
 a 



Fix import of formatted chart titles. Put the properties and related texts
into the chart2::XFormattedString2 uno objects.

Follow-up commit of:
55e9a27afd2d6a13cf76b39641bf121c3ec4b45c
Related: tdf#39052 - chart ooxml: export formatted chart titles

4f994cec388377cc5c2bddb804bd92eb4cd7dc8d
tdf#39052 - Chart: make characters formatable in editable chart textshapes

--
TODO: chart data point / dataseries labels are handled differently
since those are not editable objects, but that is a completily different
issue.
--

Change-Id: I1842f2c69c132bdf578bb2d354f451cc9d49c63c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166122
Reviewed-by: Michael Stahl 
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/qa/extras/chart2export3.cxx 
b/chart2/qa/extras/chart2export3.cxx
index 3d05495eff40..df96a70e8e1f 100644
--- a/chart2/qa/extras/chart2export3.cxx
+++ b/chart2/qa/extras/chart2export3.cxx
@@ -10,6 +10,9 @@
 #include "charttest.hxx"
 
 #include 
+#include 
+#include 
+#include 
 
 using uno::Reference;
 using beans::XPropertySet;
@@ -432,11 +435,17 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartSubTitle)
 xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
 CPPUNIT_ASSERT(pXmlDoc);
 // test properties of subtitle
+// paragraph props
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, 
"1100");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, 
"1");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr"_ostr,
 "val"_ostr, "00a933");
+// run props
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "sz"_ostr, 
"1100");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "b"_ostr, "1");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:solidFill/a:srgbClr"_ostr,
 "val"_ostr, "00a933");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin"_ostr, 
"typeface"_ostr, "Times New Roman");
+// text
 assertXPathContent(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t"_ostr, "It is a 
Subtitle");
+// shape props
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, 
"b2b2b2");
 }
 
@@ -447,13 +456,19 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, 
testChartMainWithSubTitle)
 xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
 CPPUNIT_ASSERT(pXmlDoc);
 // test properties of title
+// paragraph props
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, 
"sz"_ostr, "1300");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, 
"b"_ostr, "0");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, 
"i"_ostr, "1");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr/a:solidFill/a:srgbClr"_ostr,
 "val"_ostr, "f10d0c");
+// run props
+assertXPath(pXmlDoc, 

core.git: sc/source

2024-04-12 Thread Balazs Varga (via logerrit)
 sc/source/core/tool/interpr1.cxx |9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

New commits:
commit 51abf44808c6793a184e986b62c0786753e11ded
Author: Balazs Varga 
AuthorDate: Thu Apr 11 21:49:21 2024 +0200
Commit: Balazs Varga 
CommitDate: Fri Apr 12 10:22:59 2024 +0200

Related: tdf#127293 Fix regex search mode in XLOOKUP wildcards mode

If relevant Option in Calc was set for regex, xlookup still used the
wildcard search mode.

Change-Id: I318c3f368b6f59644c43ec518542910be72a5e0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166015
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 8ea81b336641..6f3c3304e627 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -11455,14 +11455,7 @@ bool ScInterpreter::SearchVectorForValue( 
VectorSearchArguments& vsa )
 if ( mrDoc.IsInVBAMode() )
 rParam.eSearchType = 
utl::SearchParam::SearchType::Wildcard;
 else
-{
-// set searchtype hard to wildcard or regexp if 
applicable, the XLOOKUP
-// argument prevails over the configuration setting
-if ( MayBeWildcard( vsa.sSearchStr.getString() ) )
-rParam.eSearchType = 
utl::SearchParam::SearchType::Wildcard;
-else if ( MayBeRegExp( vsa.sSearchStr.getString() ) )
-rParam.eSearchType = 
utl::SearchParam::SearchType::Regexp;
-}
+rParam.eSearchType = 
DetectSearchType(vsa.sSearchStr.getString(), mrDoc);
 }
 }
 else


core.git: Branch 'feature/cib_contract49' - sc/qa sc/source

2024-04-11 Thread Balazs Varga (via logerrit)
 sc/qa/unit/ucalc_formula.cxx |2 +-
 sc/source/core/tool/compiler.cxx |9 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit e0123fd7bacf426dba74279a4b0c81a45d76c48f
Author: Balazs Varga 
AuthorDate: Wed Apr 10 17:48:20 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Fri Apr 12 00:53:26 2024 +0200

tdf#160616 - Fix SUMPRODUCT calculation is broken in some cases

Double refs with operators only trimmable in case of one root paramater.

Follow up of: ba0ec4a5d2b025b675410cd18890d1cca3bc5a2f

Change-Id: If61fb39696d9539ffc9d32a6ecad79bfa1bf92e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165957
Tested-by: Gabor Kelemen 
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 
(cherry picked from commit 2af433f11cf24db655677bdf26e39fabaf3611fc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165932
Tested-by: allotropia jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 153096d6a434..feb0e8fef22a 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -1464,7 +1464,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, 
testFormulaAnnotateTrimOnDoubleRefs)
 
 {
 "=SUMPRODUCT(A:A=$C$1; 1-(A:A=$C$1))",
-ScRange(0, 0, 0, 0, 1048575, 0),
+ScRange(-1, -1, -1, -1, -1, -1), // Has no trimmable 
double-ref.
 0.0,
 false// Not in matrix mode.
 },
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 13fed4ac95b3..3ad360120da5 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -6476,6 +6476,8 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 
 // OpCode of the "root" operator (which is already in RPN array).
 OpCode eOpCode = (*(pCode - 1))->GetOpCode();
+// Param number of the "root" operator (which is already in RPN array).
+sal_uInt8 nRootParam = (*(pCode - 1))->GetByte();
 // eOpCode can be some operator which does not change with operands with 
or contains zero values.
 if (eOpCode == ocSum)
 {
@@ -6568,7 +6570,8 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 // such that one of the operands of ocEqual is a double-ref.
 // Examples of formula that matches this are:
 //   SUMPRODUCT(IF($A:$A=$L12;$D:$D*G:G))
-// Also in case of DoubleRef arguments around other Binary operators 
can be trimmable:
+// Also in case of DoubleRef arguments around other Binary operators 
can be trimmable inside one parameter
+// of the root operator:
 //   SUMPRODUCT(($D:$D>M47:M47)*($D:$DIsInForceArray())
+// tdf#160616: Double refs with these operators only
+// trimmable in case of one paramater
+if (!pTok->IsInForceArray() || nRootParam > 1)
 break;
 FormulaToken* pLHS = *(ppTok - 1);
 FormulaToken* pRHS = *(ppTok - 2);


core.git: sc/qa sc/source

2024-04-11 Thread Balazs Varga (via logerrit)
 sc/qa/unit/ucalc_formula.cxx |2 +-
 sc/source/core/tool/compiler.cxx |9 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 969ddf72824942be9755a8d14482d6549a2231ce
Author: Balazs Varga 
AuthorDate: Wed Apr 10 17:48:20 2024 +0100
Commit: Gabor Kelemen 
CommitDate: Thu Apr 11 16:12:58 2024 +0200

tdf#160616 - Fix SUMPRODUCT calculation is broken in some cases

Double refs with operators only trimmable in case of one root paramater.

Follow up of: ba0ec4a5d2b025b675410cd18890d1cca3bc5a2f

Change-Id: If61fb39696d9539ffc9d32a6ecad79bfa1bf92e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165957
Tested-by: Gabor Kelemen 
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index adbc9c121042..105c7e4a772d 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -1464,7 +1464,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, 
testFormulaAnnotateTrimOnDoubleRefs)
 
 {
 "=SUMPRODUCT(A:A=$C$1; 1-(A:A=$C$1))",
-ScRange(0, 0, 0, 0, 1048575, 0),
+ScRange(-1, -1, -1, -1, -1, -1), // Has no trimmable 
double-ref.
 0.0,
 false// Not in matrix mode.
 },
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 7b655d72c944..a0529fbe0f4e 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -6468,6 +6468,8 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 
 // OpCode of the "root" operator (which is already in RPN array).
 OpCode eOpCode = (*(pCode - 1))->GetOpCode();
+// Param number of the "root" operator (which is already in RPN array).
+sal_uInt8 nRootParam = (*(pCode - 1))->GetByte();
 // eOpCode can be some operator which does not change with operands with 
or contains zero values.
 if (eOpCode == ocSum)
 {
@@ -6560,7 +6562,8 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 // such that one of the operands of ocEqual is a double-ref.
 // Examples of formula that matches this are:
 //   SUMPRODUCT(IF($A:$A=$L12;$D:$D*G:G))
-// Also in case of DoubleRef arguments around other Binary operators 
can be trimmable:
+// Also in case of DoubleRef arguments around other Binary operators 
can be trimmable inside one parameter
+// of the root operator:
 //   SUMPRODUCT(($D:$D>M47:M47)*($D:$DIsInForceArray())
+// tdf#160616: Double refs with these operators only
+// trimmable in case of one paramater
+if (!pTok->IsInForceArray() || nRootParam > 1)
 break;
 FormulaToken* pLHS = *(ppTok - 1);
 FormulaToken* pRHS = *(ppTok - 2);


core.git: sc/qa sc/source

2024-04-05 Thread Balazs Varga (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/sort.fods |  537 ++-
 sc/source/core/tool/interpr3.cxx |   22 
 2 files changed, 422 insertions(+), 137 deletions(-)

New commits:
commit be938f2fb1c0a18658b4170396a22c64b77bf646
Author: Balazs Varga 
AuthorDate: Fri Apr 5 12:14:45 2024 +0200
Commit: Caolán McNamara 
CommitDate: Fri Apr 5 16:03:52 2024 +0200

Related tdf#126573 Add Excel2021 array function SORT to Calc

In case of cell formulas which have a string result, we need to
get the value from the formula result, for sorting/comparing.

folow up of commit: 45435a680be065e44eba385bb2523b27b77fb451

Change-Id: I30502dfb013ef78de0e5f2f9d5151cfc60e46942
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165816
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/sort.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/sort.fods
index af67e19b29cd..e24de0a1892f 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/sort.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/sort.fods
@@ -1,7 +1,7 @@
 
 
 http://openoffice.org/2004/office; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns
 :css3t="http://www.w3.org/TR/css3-text/; 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2024-01-16T18:30:06.27800PT4H51M18S92LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/0437c500018c62f95ad3cd584ed57a6da47f60052024-03-15T12:32:38.48400
+ 
2024-01-16T18:30:06.27800PT4H58M22S93LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/3c10a1a4ce65496877d8fc78359f9b7e59d2703c2024-04-05T12:10:35.33200
  
   
0
@@ -14,14 +14,14 @@
  
   
2
-   0
+   1
2
0
0
0
0
0
-   85
+   110
60
true
false
@@ -30,15 +30,15 @@
false
   
   
-   0
-   4
+   8
+   98
2
-   0
+   4
0
0
-   0
+   96
0
-   85
+   110
60
true
false
@@ -48,9 +48,9 @@
   
  
  Sheet1
- 2495
+ 1353
  0
- 85
+ 110
  60
  false
  true
@@ -3019,6 +3019,49 @@
   

   
+  
+   
+   
+  
+  
+   
+   
+   
+  
+  
+   
+   
+   
+  
+  
+   
+   
+   
+   
+   
+  
+  
+   
+   
+   
+  
+  
+   
+   
+   
+   
+   
+   
+  
+  
+   
+   
+   
+  
+  
+   
+   
+  
   


@@ -3040,12 +3083,12 @@


   
-  
+  



   
-  
+  



@@ -3053,12 +3096,12 @@


   
-  
+  



   
-  
+  


   
@@ -3071,7 +3114,7 @@
   
   
   
-  
+  



@@ -3125,7 +3168,7 @@
  
???(???)
 
 
- .00.00, 00:00:00
+ .00.00, 00:00:00
 


@@ -3142,7 +3185,7 @@


 
-
+
 
 
  
@@ -3172,7 +3215,7 @@
  
   Sheet
  
- 
+ 
   Result
  
  
@@ -3186,13 

core.git: Branch 'feature/cib_contract49' - 4 commits - chart2/qa chart2/source chart2/uiconfig editeng/source include/editeng include/oox oox/inc oox/source sc/source sd/source svx/source sw/source x

2024-04-03 Thread Balazs Varga (via logerrit)
 chart2/qa/extras/chart2export3.cxx  |   70 +++-
 chart2/qa/extras/data/xlsx/tdf39052.xlsx|binary
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx   |   65 +++-
 chart2/source/controller/dialogs/TitleDialogData.cxx|2 
 chart2/source/controller/inc/ChartController.hxx|5 
 chart2/source/controller/inc/SelectionHelper.hxx|1 
 chart2/source/controller/main/ChartController.cxx   |6 
 chart2/source/controller/main/ChartController_TextEdit.cxx  |   83 --
 chart2/source/controller/main/ChartController_Tools.cxx |   11 +
 chart2/source/controller/main/ChartController_Window.cxx|   10 -
 chart2/source/controller/main/ControllerCommandDispatch.cxx |6 
 chart2/source/controller/main/SelectionHelper.cxx   |5 
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |3 
 chart2/source/inc/TitleHelper.hxx   |6 
 chart2/source/tools/TitleHelper.cxx |   97 
 chart2/source/view/main/PropertyMapper.cxx  |3 
 chart2/source/view/main/ShapeFactory.cxx|   74 ++---
 chart2/uiconfig/menubar/menubar.xml |1 
 chart2/uiconfig/toolbar/toolbar.xml |1 
 editeng/source/editeng/editobj.cxx  |   14 +
 editeng/source/editeng/editobj2.hxx |2 
 editeng/source/outliner/overflowingtxt.cxx  |2 
 include/editeng/editobj.hxx |4 
 include/oox/export/chartexport.hxx  |4 
 oox/inc/drawingml/textcharacterproperties.hxx   |8 
 oox/source/drawingml/chart/titleconverter.cxx   |   11 +
 oox/source/drawingml/textcharacterpropertiescontext.cxx |3 
 oox/source/export/chartexport.cxx   |   81 +++---
 oox/source/export/drawingml.cxx |3 
 sc/source/filter/xcl97/xcl97rec.cxx |3 
 sc/source/ui/Accessibility/AccessiblePageHeader.cxx |2 
 sc/source/ui/view/viewfunc.cxx  |2 
 sd/source/filter/ppt/pptinanimations.cxx|2 
 svx/source/svdraw/svdotxat.cxx  |   19 +-
 svx/source/table/cell.cxx   |2 
 sw/source/uibase/docvw/AnnotationWin.cxx|2 
 xmloff/source/chart/SchXMLAxisContext.cxx   |1 
 xmloff/source/chart/SchXMLChartContext.cxx  |2 
 xmloff/source/chart/SchXMLExport.cxx|3 
 39 files changed, 492 insertions(+), 127 deletions(-)

New commits:
commit 170fdbae18fdaf1ce0259b51f80566dc54f5a683
Author: Balazs Varga 
AuthorDate: Fri Mar 29 23:00:50 2024 +0100
Commit: Balazs Varga 
CommitDate: Wed Apr 3 11:09:23 2024 +0200

Related: tdf#39052 - chart ooxml: export formatted chart titles

texts properly to ooxml.

Also adding "FormattedStrings" property for title objects
to simplify the working of character formattings in editable
chart shapes.

TODO: odf import/export

cherry-pick from commit: 55e9a27afd2d6a13cf76b39641bf121c3ec4b45c

Change-Id: Ie27b4dee72c24fa6a2a4e2a7db8da7fa50eb8937
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165583
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/chart2/qa/extras/chart2export3.cxx 
b/chart2/qa/extras/chart2export3.cxx
index 845e6c98c6a6..b81c99218cba 100644
--- a/chart2/qa/extras/chart2export3.cxx
+++ b/chart2/qa/extras/chart2export3.cxx
@@ -455,12 +455,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, 
testChartMainWithSubTitle)
 xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
 CPPUNIT_ASSERT(pXmlDoc);
 // test properties of title
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "sz", "1300");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "b", "0");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "i", "1");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr",
 "val", "f10d0c");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin", "typeface", 
"Arial");
-assertXPathContent(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t", "It is a Maintitle
It is a Subtitle");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr", "sz", 
"1300");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr", "b", "0");
+assertXPath(pXmlDoc, 

core.git: chart2/qa chart2/source include/oox oox/source xmloff/source

2024-04-02 Thread Balazs Varga (via logerrit)
 chart2/qa/extras/chart2export3.cxx |   70 ++-
 chart2/qa/extras/data/xlsx/tdf39052.xlsx   |binary
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx  |   65 ++
 chart2/source/controller/main/ChartController_TextEdit.cxx |   30 
 chart2/source/inc/TitleHelper.hxx  |2 
 chart2/source/tools/TitleHelper.cxx|   31 +++-
 include/oox/export/chartexport.hxx |4 
 oox/source/export/chartexport.cxx  |   81 +
 oox/source/export/drawingml.cxx|3 
 xmloff/source/chart/SchXMLAxisContext.cxx  |1 
 xmloff/source/chart/SchXMLChartContext.cxx |2 
 xmloff/source/chart/SchXMLExport.cxx   |3 
 12 files changed, 230 insertions(+), 62 deletions(-)

New commits:
commit 55e9a27afd2d6a13cf76b39641bf121c3ec4b45c
Author: Balazs Varga 
AuthorDate: Fri Mar 29 23:00:50 2024 +0100
Commit: Balazs Varga 
CommitDate: Tue Apr 2 23:27:26 2024 +0200

Related: tdf#39052 - chart ooxml: export formatted chart titles

texts properly to ooxml.

Also adding "FormattedStrings" property for title objects
to simplify the working of character formattings in editable
chart shapes.

TODO: odf import/export

Change-Id: Ie27b4dee72c24fa6a2a4e2a7db8da7fa50eb8937
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165583
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/chart2/qa/extras/chart2export3.cxx 
b/chart2/qa/extras/chart2export3.cxx
index e1229b07720c..3d05495eff40 100644
--- a/chart2/qa/extras/chart2export3.cxx
+++ b/chart2/qa/extras/chart2export3.cxx
@@ -447,12 +447,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, 
testChartMainWithSubTitle)
 xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
 CPPUNIT_ASSERT(pXmlDoc);
 // test properties of title
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, 
"1300");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, 
"0");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "i"_ostr, 
"1");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr"_ostr,
 "val"_ostr, "f10d0c");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin"_ostr, 
"typeface"_ostr, "Arial");
-assertXPathContent(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t"_ostr, "It is a Maintitle
It is a Subtitle");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, 
"sz"_ostr, "1300");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, 
"b"_ostr, "0");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, 
"i"_ostr, "1");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr/a:solidFill/a:srgbClr"_ostr,
 "val"_ostr, "f10d0c");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr/a:latin"_ostr, 
"typeface"_ostr, "Arial");
+assertXPathContent(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:t"_ostr, "It is a 
Maintitle");
+assertXPathContent(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r/a:t"_ostr, "It is a 
Subtitle");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, 
"81d41a");
 }
 
@@ -754,6 +755,63 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf148142)
 CPPUNIT_ASSERT(!aScaleData2.ShiftedCategoryPosition);
 }
 
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFormattedChartTitles)
+{
+loadFromFile(u"xlsx/tdf39052.xlsx");
+save("Calc Office Open XML");
+xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+CPPUNIT_ASSERT(pXmlDoc);
+
+// Check run level properties [1] - first paragraph
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr"_ostr, "b"_ostr, 
"1");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr"_ostr, 
"sz"_ostr, "1400");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr/a:solidFill/a:srgbClr"_ostr,
 "val"_ostr, "ff");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr/a:latin"_ostr, 
"typeface"_ostr, "Aptos Narrow");
+assertXPathContent(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:t"_ostr, "This");
+// Check run level properties [2]
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:rPr"_ostr, "b"_ostr, 

core.git: chart2/source chart2/uiconfig

2024-04-02 Thread Balazs Varga (via logerrit)
 chart2/source/controller/dialogs/TitleDialogData.cxx|2 
 chart2/source/controller/inc/ChartController.hxx|5 
 chart2/source/controller/inc/SelectionHelper.hxx|1 
 chart2/source/controller/main/ChartController.cxx   |6 
 chart2/source/controller/main/ChartController_TextEdit.cxx  |   93 +++-
 chart2/source/controller/main/ChartController_Tools.cxx |   11 +
 chart2/source/controller/main/ChartController_Window.cxx|   10 -
 chart2/source/controller/main/ControllerCommandDispatch.cxx |6 
 chart2/source/controller/main/SelectionHelper.cxx   |5 
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |3 
 chart2/source/inc/TitleHelper.hxx   |4 
 chart2/source/tools/TitleHelper.cxx |   72 ++---
 chart2/uiconfig/menubar/menubar.xml |1 
 chart2/uiconfig/toolbar/toolbar.xml |1 
 14 files changed, 180 insertions(+), 40 deletions(-)

New commits:
commit 4f994cec388377cc5c2bddb804bd92eb4cd7dc8d
Author: Balazs Varga 
AuthorDate: Thu Mar 28 17:55:30 2024 +0100
Commit: Balazs Varga 
CommitDate: Tue Apr 2 23:27:03 2024 +0200

tdf#39052 - Chart: make characters formatable in editable chart textshapes

Editable textshapes include main chart title, sub chart title, axis titles.

In chart2 the chart2::XFormattedString and chart2::XFormattedString2 store
the formatted characters from textshapes, so we need to set all the 
character
properties from the EditTextObject and need to add them to to the 
XFormattedString
array with all the related texts which are formatted individually.

For formatting of the characters the .uno:FontDialog command can be used,
which can be called from the chart menubar, toolbar and with right click
on the text when we are in edit mode in the textshape.

(Note: in the next patch the OOXML export will be fixed.)

Change-Id: I5750a5fe694b384dc6b28e2ef03ac1f2b03957db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165501
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/controller/dialogs/TitleDialogData.cxx 
b/chart2/source/controller/dialogs/TitleDialogData.cxx
index 45dda2c897b0..b8f3ed6d9429 100644
--- a/chart2/source/controller/dialogs/TitleDialogData.cxx
+++ b/chart2/source/controller/dialogs/TitleDialogData.cxx
@@ -99,7 +99,7 @@ bool TitleDialogData::writeDifferenceToModel(
 TitleHelper::getTitle( static_cast< TitleHelper::eTitleType >( 
nN ), xChartModel ) );
 if(xTitle.is())
 {
-TitleHelper::setCompleteString( aTextList[nN], xTitle, 
xContext );
+TitleHelper::setCompleteString( aTextList[nN], xTitle, 
xContext, nullptr, true );
 bChanged = true;
 }
 }
diff --git a/chart2/source/controller/inc/ChartController.hxx 
b/chart2/source/controller/inc/ChartController.hxx
index d1e95efafac3..737d0cf3768f 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -323,6 +323,7 @@ public:
 void setDrawMode( ChartDrawMode eMode ) { m_eDrawMode = eMode; }
 
 bool isShapeContext() const;
+bool IsTextEdit() const;
 
 ViewElementListProvider getViewElementListProvider();
 DrawModelWrapper* GetDrawModelWrapper();
@@ -484,6 +485,8 @@ private:
 void executeDispatch_MoveSeries( bool bForward );
 
 bool EndTextEdit();
+css::uno::Sequence< css::uno::Reference> 
GetFormattedTitle(
+const EditTextObject& aEdit, const css::uno::Reference< 
css::drawing::XShape >& xShape );
 
 void executeDispatch_View3D();
 void executeDispatch_PositionAndSize( const ::css::uno::Sequence< 
::css::beans::PropertyValue >* pArgs = nullptr );
@@ -514,7 +517,7 @@ private:
 const css::uno::Sequence< css::beans::PropertyValue >& rArgs );
 
 DECL_LINK( DoubleClickWaitingHdl, Timer*, void );
-void execute_DoubleClick( const Point* pMousePixel );
+void execute_DoubleClick( const Point* pMousePixel, bool  );
 void startDoubleClickWaiting();
 void stopDoubleClickWaiting();
 
diff --git a/chart2/source/controller/inc/SelectionHelper.hxx 
b/chart2/source/controller/inc/SelectionHelper.hxx
index ff0e95eee27a..119640bd4300 100644
--- a/chart2/source/controller/inc/SelectionHelper.hxx
+++ b/chart2/source/controller/inc/SelectionHelper.hxx
@@ -39,6 +39,7 @@ public: //methods
 
 bool isResizeableObjectSelected() const;
 bool isRotateableObjectSelected( const 
rtl::Reference<::chart::ChartModel>& xChartModel ) const;
+bool isTitleObjectSelected() const;
 bool isDragableObjectSelected() const;
 
 bool isAdditionalShapeSelected() const;
diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx

core.git: chart2/source oox/inc oox/source

2024-04-02 Thread Balazs Varga (via logerrit)
 chart2/source/view/main/PropertyMapper.cxx  |3 
 chart2/source/view/main/ShapeFactory.cxx|   72 ++--
 oox/inc/drawingml/textcharacterproperties.hxx   |8 +
 oox/source/drawingml/chart/titleconverter.cxx   |   11 ++
 oox/source/drawingml/textcharacterpropertiescontext.cxx |3 
 5 files changed, 71 insertions(+), 26 deletions(-)

New commits:
commit f31a8ff9ea15ad81aeac265fce6eafe6342a68b7
Author: Balazs Varga 
AuthorDate: Thu Mar 28 17:17:47 2024 +0100
Commit: Balazs Varga 
CommitDate: Tue Apr 2 23:26:13 2024 +0200

tdf#78027 - Fix Chart OOXML Import with non-uniform formatted titles

Character formats are disappeared from Chart Title textobjects if they were
formatted non-uniform. In this patch only the OOXML import and the chartview
part will be fixed which make it visible after the import.

(Note: next patch will contain the chart controller part where the 
characters
can be formatted during title editing).

Change-Id: I4fb5c3d80b7889935d198e70fb49e2c68108b235
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165500
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/main/PropertyMapper.cxx 
b/chart2/source/view/main/PropertyMapper.cxx
index c3241049057a..79206624f436 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -268,7 +268,8 @@ const tPropertyNameMap& 
PropertyMapper::getPropertyNameMapForCharacterProperties
 {"CharColor","CharColor"},
 {"CharContoured","CharContoured"},
 {"CharEmphasis", "CharEmphasis"},//the service 
style::CharacterProperties  describes a property called 'CharEmphasize' which 
is nowhere implemented
-
+{"CharEscapement",   "CharEscapement"},
+{"CharEscapementHeight", "CharEscapementHeight"},
 {"CharFontFamily",   "CharFontFamily"},
 {"CharFontFamilyAsian",  "CharFontFamilyAsian"},
 {"CharFontFamilyComplex","CharFontFamilyComplex"},
diff --git a/chart2/source/view/main/ShapeFactory.cxx 
b/chart2/source/view/main/ShapeFactory.cxx
index 0e572a7e8dcb..c681c581a7b3 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -2183,7 +2183,8 @@ rtl::Reference
 
 //set text and text properties
 uno::Reference< text::XTextCursor > xTextCursor( 
xShape->createTextCursor() );
-if( !xTextCursor.is() )
+uno::Reference< text::XTextCursor > xSelectionCursor( 
xShape->createTextCursor() );
+if( !xTextCursor.is() || !xSelectionCursor.is() )
 return xShape;
 
 tPropertyNameValueMap aValueMap;
@@ -2232,18 +2233,32 @@ rtl::Reference
 //if the characters should be stacked we use only the first 
character properties for code simplicity
 if( xFormattedString.hasElements() )
 {
-OUString aLabel;
-for (const auto& i : xFormattedString)
-aLabel += i->getString();
-aLabel = ShapeFactory::getStackedString( aLabel, 
bStackCharacters );
-
-xTextCursor->gotoEnd(false);
-xShape->insertString( xTextCursor, aLabel, false );
-xTextCursor->gotoEnd(true);
-uno::Reference< beans::XPropertySet > xSourceProps( 
xFormattedString[0], uno::UNO_QUERY );
-
-PropertyMapper::setMappedProperties( *xShape, xSourceProps
-, 
PropertyMapper::getPropertyNameMapForCharacterProperties() );
+size_t nLBreaks = xFormattedString.size() - 1;
+uno::Reference< beans::XPropertySet > 
xSelectionProp(xSelectionCursor, uno::UNO_QUERY);
+for (const uno::Reference& rxFS : 
xFormattedString)
+{
+if (!rxFS->getString().isEmpty())
+{
+xTextCursor->gotoEnd(false);
+xSelectionCursor->gotoEnd(false);
+OUString aLabel = 
ShapeFactory::getStackedString(rxFS->getString(), bStackCharacters);
+if (nLBreaks-- > 0)
+aLabel += OUStringChar(' ');
+xShape->insertString(xTextCursor, aLabel, false);
+xSelectionCursor->gotoEnd(true); // select current 
paragraph
+uno::Reference< beans::XPropertySet > 
xSourceProps(rxFS, uno::UNO_QUERY);
+if (xFormattedString.size() > 1 && xSelectionProp.is())
+{
+
PropertyMapper::setMappedProperties(xSelectionProp, xSourceProps,
+
PropertyMapper::getPropertyNameMapForTextShapeProperties());
+}
+else
+   

core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source

2024-03-26 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc  |6 
 formula/source/core/api/FormulaCompiler.cxx|1 
 include/formula/compiler.hxx   |3 
 include/formula/opcode.hxx |2 
 sc/README.md   |1 
 sc/inc/helpids.h   |1 
 sc/inc/scfuncs.hrc |   12 
 sc/qa/extras/scfunctionlistobj.cxx |2 
 sc/qa/unit/data/functions/spreadsheet/fods/sortby.fods | 5743 +
 sc/qa/unit/ucalc.cxx   |1 
 sc/source/core/data/funcdesc.cxx   |1 
 sc/source/core/inc/interpre.hxx|3 
 sc/source/core/tool/interpr1.cxx   |  235 
 sc/source/core/tool/interpr3.cxx   |   69 
 sc/source/core/tool/interpr4.cxx   |1 
 sc/source/core/tool/parclass.cxx   |1 
 sc/source/core/tool/token.cxx  |1 
 sc/source/filter/excel/xlformula.cxx   |3 
 sc/source/filter/oox/formulabase.cxx   |3 
 19 files changed, 6045 insertions(+), 44 deletions(-)

New commits:
commit bfb4c58ae708c75949559290bdfdd9afcef6aa91
Author: Balazs Varga 
AuthorDate: Wed Mar 20 01:49:58 2024 +0100
Commit: Balazs Varga 
CommitDate: Tue Mar 26 10:20:38 2024 +0100

tdf#126573 Add Excel2021 array function SORTBY to Calc

TODO/WIP: oasis proposal
More information about how this new function works:

https://support.microsoft.com/en-au/office/sortby-function-cd2d7a62-1b93-435c-b561-d6a35134f28f
https://exceljet.net/functions/sortby-function

Change-Id: I4538a32f7f75056d3055369fc5f4483d24fd1089
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165069
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 3d4e822353ef..82d3a52c98e8 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -280,6 +280,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "COM.MICROSOFT.FILTER" , SC_OPCODE_FILTER },
 { "COM.MICROSOFT.SORT" , SC_OPCODE_SORT },
+{ "COM.MICROSOFT.SORTBY" , SC_OPCODE_SORTBY },
 { "ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for 
range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -731,6 +732,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "_xlfn._xlws.FILTER" , SC_OPCODE_FILTER },
 { "_xlfn._xlws.SORT" , SC_OPCODE_SORT },
+{ "_xlfn.SORTBY" , SC_OPCODE_SORTBY },
 { "_xlfn.ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy 
for range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1185,6 +1187,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "FILTER" , SC_OPCODE_FILTER },
 { "SORT" , SC_OPCODE_SORT },
+{ "SORTBY" , SC_OPCODE_SORTBY },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1640,6 +1643,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "FILTER" , SC_OPCODE_FILTER },
 { "SORT" , SC_OPCODE_SORT },
+{ "SORTBY" , SC_OPCODE_SORTBY },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },  // ?? first character = I ??
@@ -2093,6 +2097,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "FILTER" , SC_OPCODE_FILTER },
 { "SORT" , SC_OPCODE_SORT },
+{ "SORTBY" , SC_OPCODE_SORTBY },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -2527,6 +2532,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "HLOOKUP") , SC_OPCODE_H_LOOKUP },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "FILTER") , SC_OPCODE_FILTER },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SORT") , SC_OPCODE_SORT },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "SORTBY") , SC_OPCODE_SORTBY },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MULTIRANGE") , SC_OPCODE_MULTI_AREA 
}, // legacy for range list (union)
 { NC_("RID_STRLIST_FUNCTION_NAMES", "OFFSET") , SC_OPCODE_OFFSET },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "INDEX") , SC_OPCODE_INDEX }, // ?? 
first character = I ??
diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 

core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source

2024-03-25 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc|6 
 formula/source/core/api/FormulaCompiler.cxx  |1 
 include/formula/compiler.hxx |3 
 include/formula/opcode.hxx   |2 
 sc/README.md |1 
 sc/inc/helpids.h |1 
 sc/inc/scfuncs.hrc   |   14 
 sc/inc/sortparam.hxx |  176 
 sc/inc/table.hxx |1 
 sc/qa/extras/scfunctionlistobj.cxx   |2 
 sc/qa/unit/data/functions/spreadsheet/fods/sort.fods | 5816 +++
 sc/qa/unit/ucalc.cxx |1 
 sc/source/core/data/funcdesc.cxx |1 
 sc/source/core/data/sortparam.cxx|9 
 sc/source/core/data/table3.cxx   |  175 
 sc/source/core/inc/interpre.hxx  |   21 
 sc/source/core/tool/interpr1.cxx |  203 
 sc/source/core/tool/interpr3.cxx |  363 +
 sc/source/core/tool/interpr4.cxx |1 
 sc/source/core/tool/parclass.cxx |1 
 sc/source/core/tool/token.cxx|1 
 sc/source/filter/excel/xlformula.cxx |3 
 sc/source/filter/oox/formulabase.cxx |3 
 23 files changed, 6623 insertions(+), 182 deletions(-)

New commits:
commit 45435a680be065e44eba385bb2523b27b77fb451
Author: Balazs Varga 
AuthorDate: Wed Mar 13 11:07:10 2024 +0100
Commit: Balazs Varga 
CommitDate: Mon Mar 25 15:54:01 2024 +0100

tdf#126573 Add Excel2021 array function SORT to Calc

TODO/WIP: oasis proposal
More information about how this new function works:

https://support.microsoft.com/en-au/office/sort-function-22f63bd0-ccc8-492f-953d-c20e8e44b86c
https://exceljet.net/functions/sort-function

Note: Move ScSortInfoArray class to sortparam.hxx, which is a more
logical place.

Change-Id: I70e720e93ba0414d54cb3437de0bfa066508fe30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164778
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index f0efc468ab6f..3d4e822353ef 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -279,6 +279,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "COM.MICROSOFT.XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "COM.MICROSOFT.FILTER" , SC_OPCODE_FILTER },
+{ "COM.MICROSOFT.SORT" , SC_OPCODE_SORT },
 { "ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for 
range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -729,6 +730,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "_xlfn.XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "_xlfn._xlws.FILTER" , SC_OPCODE_FILTER },
+{ "_xlfn._xlws.SORT" , SC_OPCODE_SORT },
 { "_xlfn.ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy 
for range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1182,6 +1184,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "FILTER" , SC_OPCODE_FILTER },
+{ "SORT" , SC_OPCODE_SORT },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1636,6 +1639,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "FILTER" , SC_OPCODE_FILTER },
+{ "SORT" , SC_OPCODE_SORT },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },  // ?? first character = I ??
@@ -2088,6 +2092,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "FILTER" , SC_OPCODE_FILTER },
+{ "SORT" , SC_OPCODE_SORT },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -2521,6 +2526,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "XLOOKUP") , SC_OPCODE_X_LOOKUP },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "HLOOKUP") , SC_OPCODE_H_LOOKUP },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "FILTER") , SC_OPCODE_FILTER },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "SORT") , SC_OPCODE_SORT },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MULTIRANGE") , SC_OPCODE_MULTI_AREA 
}, // legacy for range list (union)
   

core.git: Branch 'feature/cib_contract49' - sc/qa sc/source

2024-03-25 Thread Balazs Varga (via logerrit)
 sc/qa/unit/ucalc_formula.cxx |2 +-
 sc/source/core/tool/compiler.cxx |   35 +++
 2 files changed, 36 insertions(+), 1 deletion(-)

New commits:
commit faea4bf55e4160565da6b307e6799312f677bee9
Author: Balazs Varga 
AuthorDate: Wed Mar 20 18:32:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Mon Mar 25 08:48:35 2024 +0100

tdf#159687 sc formula SUMPRODUCT performance fix: add more binary

operators which need to be checked if they are next to a trimmable
DoubleRef arguments or not.
Example:
=SUMPRODUCT(($D:$D>M47:M47)*($D:$D
$D:$D and $I:$I columns are trimmable.

Recalculation of formulas with a lot of SUMPRODUCT where we comparing
full columns could take minutes during editing a sheet. With reducing
the size of the compared ranges to the actual data could significantly
speed up the recalculation.

This takes the recalculation time from ~50 sec to <1 sec on my machine.

Note: probabaly the same could be applied to the SUM function.

Change-Id: I758660d0b638ef7255bd5a41a96755289b5a2b41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165074
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index feb0e8fef22a..153096d6a434 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -1464,7 +1464,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, 
testFormulaAnnotateTrimOnDoubleRefs)
 
 {
 "=SUMPRODUCT(A:A=$C$1; 1-(A:A=$C$1))",
-ScRange(-1, -1, -1, -1, -1, -1), // Has no trimmable 
double-ref.
+ScRange(0, 0, 0, 0, 1048575, 0),
 0.0,
 false// Not in matrix mode.
 },
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index f5805db887c9..13fed4ac95b3 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -6568,6 +6568,8 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 // such that one of the operands of ocEqual is a double-ref.
 // Examples of formula that matches this are:
 //   SUMPRODUCT(IF($A:$A=$L12;$D:$D*G:G))
+// Also in case of DoubleRef arguments around other Binary operators 
can be trimmable:
+//   SUMPRODUCT(($D:$D>M47:M47)*($D:$DIsInForceArray())
+break;
+FormulaToken* pLHS = *(ppTok - 1);
+FormulaToken* pRHS = *(ppTok - 2);
+StackVar lhsType = pLHS->GetType();
+StackVar rhsType = pRHS->GetType();
+if (lhsType == svDoubleRef && (rhsType == svSingleRef 
|| rhsType == svDoubleRef))
+{
+pLHS->GetDoubleRef()->SetTrimToData(true);
+}
+if (rhsType == svDoubleRef && (lhsType == svSingleRef 
|| lhsType == svDoubleRef))
+{
+pRHS->GetDoubleRef()->SetTrimToData(true);
+}
+}
+break;
 case ocPush:
 break;
 case ocClose:


core.git: sd/source slideshow/source

2024-03-22 Thread Balazs Varga (via logerrit)
 sd/source/core/sdpage.cxx|5 +++--
 slideshow/source/engine/shapes/shapeimporter.cxx |   20 +++-
 2 files changed, 22 insertions(+), 3 deletions(-)

New commits:
commit e136900e7a971385be9367a3dcaedea54d1e7207
Author: Balazs Varga 
AuthorDate: Thu Feb 29 16:34:45 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 22 11:44:16 2024 +0100

tdf#159258 sd: fix to show objects in slideshow if they have

fillstyle or linestyle.

Also the shape will be appeared in print and pdf view.
(Powerpoint doing the same.)

TODO: the placeholder bitmap and the default text
was not removed from the slideshow/print/pdf view.

Change-Id: Ifadc9a692d77b60a7e3514afe8e6ea5cab0018c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164163
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 10b4f34b761f..020f1f6bbfd4 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2802,9 +2802,10 @@ bool SdPage::checkVisibility(
 const bool bIsInsidePageObj(pPageView && pPageView->GetPage() != 
pVisualizedPage);
 
 // empty presentation objects only visible during edit mode
-if( (bIsPrinting || !bEdit || bIsInsidePageObj ) && pObj->IsEmptyPresObj() 
)
+if( (bIsPrinting || !bEdit || bIsInsidePageObj ) && pObj->IsEmptyPresObj() 
&& !(pObj->HasFillStyle() || pObj->HasLineStyle()) )
 {
-if( (pObj->GetObjInventor() != SdrInventor::Default) || ( 
(pObj->GetObjIdentifier() != SdrObjKind::Rectangle) && 
(pObj->GetObjIdentifier() != SdrObjKind::Page) ) )
+if( (pObj->GetObjInventor() != SdrInventor::Default) || ( 
(pObj->GetObjIdentifier() != SdrObjKind::Rectangle) &&
+(pObj->GetObjIdentifier() != SdrObjKind::Page) ) )
 return false;
 }
 
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx 
b/slideshow/source/engine/shapes/shapeimporter.cxx
index 92162eeb60ad..7823a5588efd 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -346,7 +346,25 @@ bool ShapeImporter::isSkip(
   "IsEmptyPresentationObject") &&
 bEmpty )
 {
-return true;
+// check object have fill or linestyle, if have, it should be visible
+drawing::FillStyle aFillStyle{ drawing::FillStyle_NONE };
+if (getPropertyValue(aFillStyle,
+xPropSet, "FillStyle") &&
+aFillStyle != drawing::FillStyle_NONE)
+{
+bEmpty = false;
+}
+
+drawing::LineStyle aLineStyle{ drawing::LineStyle_NONE };
+if (bEmpty && getPropertyValue(aLineStyle,
+xPropSet, "LineStyle") &&
+aLineStyle != drawing::LineStyle_NONE)
+{
+bEmpty = false;
+}
+
+if (bEmpty)
+return true;
 }
 
 //skip shapes which corresponds to annotations


core.git: sc/qa sc/source

2024-03-22 Thread Balazs Varga (via logerrit)
 sc/qa/unit/ucalc_formula.cxx |2 +-
 sc/source/core/tool/compiler.cxx |   35 +++
 2 files changed, 36 insertions(+), 1 deletion(-)

New commits:
commit ba0ec4a5d2b025b675410cd18890d1cca3bc5a2f
Author: Balazs Varga 
AuthorDate: Wed Mar 20 18:32:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 22 09:23:58 2024 +0100

tdf#159687 sc formula SUMPRODUCT performance fix: add more binary

operators which need to be checked if they are next to a trimmable
DoubleRef arguments or not.
Example:
=SUMPRODUCT(($D:$D>M47:M47)*($D:$D
$D:$D and $I:$I columns are trimmable.

Recalculation of formulas with a lot of SUMPRODUCT where we comparing
full columns could take minutes during editing a sheet. With reducing
the size of the compared ranges to the actual data could significantly
speed up the recalculation.

This takes the recalculation time from ~50 sec to <1 sec on my machine.

Note: probabaly the same could be applied to the SUM function.

Change-Id: I758660d0b638ef7255bd5a41a96755289b5a2b41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165074
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 105c7e4a772d..adbc9c121042 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -1464,7 +1464,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, 
testFormulaAnnotateTrimOnDoubleRefs)
 
 {
 "=SUMPRODUCT(A:A=$C$1; 1-(A:A=$C$1))",
-ScRange(-1, -1, -1, -1, -1, -1), // Has no trimmable 
double-ref.
+ScRange(0, 0, 0, 0, 1048575, 0),
 0.0,
 false// Not in matrix mode.
 },
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 5e0258b3fd21..152a75f949b1 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -6564,6 +6564,8 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 // such that one of the operands of ocEqual is a double-ref.
 // Examples of formula that matches this are:
 //   SUMPRODUCT(IF($A:$A=$L12;$D:$D*G:G))
+// Also in case of DoubleRef arguments around other Binary operators 
can be trimmable:
+//   SUMPRODUCT(($D:$D>M47:M47)*($D:$DIsInForceArray())
+break;
+FormulaToken* pLHS = *(ppTok - 1);
+FormulaToken* pRHS = *(ppTok - 2);
+StackVar lhsType = pLHS->GetType();
+StackVar rhsType = pRHS->GetType();
+if (lhsType == svDoubleRef && (rhsType == svSingleRef 
|| rhsType == svDoubleRef))
+{
+pLHS->GetDoubleRef()->SetTrimToData(true);
+}
+if (rhsType == svDoubleRef && (lhsType == svSingleRef 
|| lhsType == svDoubleRef))
+{
+pRHS->GetDoubleRef()->SetTrimToData(true);
+}
+}
+break;
 case ocPush:
 break;
 case ocClose:


core.git: Branch 'distro/collabora/co-24.04' - officecfg/registry sc/inc sc/source sc/uiconfig

2024-03-20 Thread Balazs Varga (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   24 +
 sc/inc/formulaopt.hxx|4 
 sc/inc/globstr.hrc   |1 
 sc/source/core/tool/formulaopt.cxx   |   62 +--
 sc/source/filter/oox/workbookhelper.cxx  |4 
 sc/source/filter/xml/xmlimprt.cxx|3 
 sc/source/ui/docshell/docsh.cxx  |   56 +
 sc/source/ui/inc/docsh.hxx   |2 
 sc/source/ui/inc/tpformula.hxx   |1 
 sc/source/ui/optdlg/tpformula.cxx|   12 ++
 sc/uiconfig/scalc/ui/optformula.ui   |   37 
 11 files changed, 197 insertions(+), 9 deletions(-)

New commits:
commit 1bc97e82c793574ec16238a38b4ab644c623fd4b
Author: Balazs Varga 
AuthorDate: Wed Feb 14 22:34:10 2024 +0100
Commit: Justin Luth 
CommitDate: Wed Mar 20 15:41:40 2024 +0100

tdf#124098 sc add global config setting "RecalcOptimalRowHeightMode"

to optimal row height recalculation for optimal document loading.

THIS COMMIT MERGES commits 0748c2b0789a and 0e0e7de07686 AS WELL,
so XLSX is handled too!

If the "RecalcOptimalRowHeightMode" is set to "Recalc always" we always
recalculate the optimal row heights at load time, without any warning 
dialog.
If the "RecalcOptimalRowHeightMode" is set to "Recalc" we never recalculate
the optimal row heights at load time, without any warning dialog.
If the "RecalcOptimalRowHeightMode" is set to "Ask before Recalc" we ask 
the user
if want to recalculate the optimal row heights at load time or not.

The default value is the same what we are doing now: "Recalc always"

This option was necessary, since optimal row height calculation depending 
on also
the result of the conditional formatted formulas and it takes a lot of time 
to calculate
the optimal row heights and load the document. Because we allow a lot of 
text/cell format
attribute which are effect on the cell size, therefor it is necessary to 
evaluate all
the formulas. Also if we have 20 condition for a cell range we need to 
evaluate all
the 20 formulas for all the cells and it is very expensive at load time.

Change-Id: I9288d11dd2f061f85fa36292a909402a6bb89ea9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163421
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164796
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Justin Luth 
Reviewed-by: Michael Meeks 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index d54b092eca66..a8830ab1ba19 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1532,6 +1532,30 @@
   
   1
 
+
+  
+  
+Specifies whether to force a hard recalc after load on 
optimal row heights.
+  
+  
+
+  
+Recalc always
+  
+
+
+  
+Recalc never
+  
+
+
+  
+Ask before Recalc
+  
+
+  
+  0
+
   
 
 
diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx
index de46b52643c8..6cc1dedcbbb4 100644
--- a/sc/inc/formulaopt.hxx
+++ b/sc/inc/formulaopt.hxx
@@ -30,6 +30,7 @@ private:
 
 ScRecalcOptions meOOXMLRecalc;
 ScRecalcOptions meODFRecalc;
+ScRecalcOptions meReCalcOptiRowHeights;
 
 public:
 ScFormulaOptions();
@@ -64,6 +65,9 @@ public:
 void SetODFRecalcOptions( ScRecalcOptions eOpt ) { meODFRecalc = eOpt; }
 ScRecalcOptions GetODFRecalcOptions() const { return meODFRecalc; }
 
+void SetReCalcOptiRowHeights( ScRecalcOptions eOpt ) { 
meReCalcOptiRowHeights = eOpt; }
+ScRecalcOptions GetReCalcOptiRowHeights() const { return 
meReCalcOptiRowHeights; }
+
 void ResetFormulaSeparators();
 
 static void GetDefaultFormulaSeparators(OUString& rSepArg, OUString& 
rSepArrayCol, OUString& rSepArrayRow);
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 8b07dc508edd..6d73c41fdc51 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -505,6 +505,7 @@
 #define STR_EDIT_EXISTING_COND_FORMATS  
NC_("STR_EDIT_EXISTING_COND_FORMATS", "The selected cell already contains 
conditional formatting. You can either edit the existing conditional format or 
you define a new overlapping conditional format.

 Do you want to edit the existing conditional format?")
 #define STR_QUERY_FORMULA_RECALC_ONLOAD_ODS 
NC_("STR_QUERY_FORMULA_RECALC_ONLOAD_ODS", "This document was last saved by an 

core.git: formula/source sc/inc

2024-03-15 Thread Balazs Varga (via logerrit)
 formula/source/core/api/FormulaCompiler.cxx |1 +
 sc/inc/scfuncs.hrc  |4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit e5361d0ef04bc63e7809323750aabe6efafcaef9
Author: Balazs Varga 
AuthorDate: Thu Mar 14 21:16:01 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 15 12:38:13 2024 +0100

Related: tdf#126573 Add Excel2021 array function FILTER to Calc

Add ocFilter to matrix (array) functions.
Some follow-up cosmetic clean.

Follow up commit of b0791dd9216224bdb266fd0d8c87df253b6d0583

Change-Id: I4c3c786fe14ab870be8c43211ca6a76c5ff6ac6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164847
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index dc9c73d7937d..1bf29d2b44e4 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1230,6 +1230,7 @@ bool FormulaCompiler::IsMatrixFunction( OpCode eOpCode )
 case ocMatrixUnit :
 case ocModalValue_Multi :
 case ocFourier :
+case ocFilter :
 return true;
 default:
 {
diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc
index e7213f028491..5fa1c12808c1 100644
--- a/sc/inc/scfuncs.hrc
+++ b/sc/inc/scfuncs.hrc
@@ -4187,12 +4187,12 @@ const TranslateId SC_OPCODE_RANDBETWEEN_NV_ARY[] =
 const TranslateId SC_OPCODE_FILTER_ARY[] =
 {
 NC_("SC_OPCODE_FILTER", "Filters an array based on a Boolean (True/False) 
array."),
-NC_("SC_OPCODE_FILTER", "Range "),
+NC_("SC_OPCODE_FILTER", "Range"),
 NC_("SC_OPCODE_FILTER", "The array, or range to filter."),
 NC_("SC_OPCODE_FILTER", "Include"),
 NC_("SC_OPCODE_FILTER", "A Boolean array whose height or width is the same 
as the array."),
 NC_("SC_OPCODE_FILTER", "Result if empty"),
-NC_("SC_OPCODE_FILTER", "The value to return if all values in the included 
array are empty (filter returns nothing)")
+NC_("SC_OPCODE_FILTER", "The value to return if all values in the included 
array are empty (filter returns nothing).")
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


core.git: Branch 'feature/cib_contract49' - 3 commits - chart2/source sw/qa

2024-03-08 Thread Balazs Varga (via logerrit)
 chart2/source/view/axes/VCartesianAxis.cxx |7 +
 chart2/source/view/main/DataTableView.cxx  |9 +-
 chart2/source/view/main/SeriesPlotterContainer.cxx |7 -
 chart2/source/view/main/SeriesPlotterContainer.hxx |2 
 sw/qa/extras/layout/data/charttable.odt|binary
 sw/qa/extras/layout/data/tdf159443.odt |binary
 sw/qa/extras/layout/layout3.cxx|   91 +
 7 files changed, 106 insertions(+), 10 deletions(-)

New commits:
commit 5b9bf5fac2fc0fc3a9ab7b2a4c23d63f13b1a212
Author: Balazs Varga 
AuthorDate: Thu Mar 7 14:32:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 8 11:04:00 2024 +0100

tdf#159456 - chart view: fix wrongly shifted value Y axis

We only have to shift the category axis only, and not the
value axis, if we have a chart data table.

Change-Id: Ie77ea829e8f8987702dce7d17cb3e20054f3d8cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164539
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/main/SeriesPlotterContainer.cxx 
b/chart2/source/view/main/SeriesPlotterContainer.cxx
index bcc5b0f482a3..7623992a3e08 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.cxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.cxx
@@ -171,7 +171,7 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
 }
 
 if (xDiagram->getDataTable().is())
-m_bForceShiftPosition = true;
+m_bTableShiftPosition = true;
 
 //prepare for autoscaling and shape creation
 // - create plotter for charttypes (for each first scale group at each 
plotter, as they are independent)
@@ -340,12 +340,9 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
 bool SeriesPlotterContainer::isCategoryPositionShifted(const 
chart2::ScaleData& rSourceScale,
bool 
bHasComplexCategories)
 {
-if (m_bForceShiftPosition)
-return true;
-
 if (rSourceScale.AxisType == AxisType::CATEGORY)
 return bHasComplexCategories || rSourceScale.ShiftedCategoryPosition
-   || m_bChartTypeUsesShiftedCategoryPositionPerDefault;
+   || m_bTableShiftPosition || 
m_bChartTypeUsesShiftedCategoryPositionPerDefault;
 
 if (rSourceScale.AxisType == AxisType::DATE)
 return rSourceScale.ShiftedCategoryPosition;
diff --git a/chart2/source/view/main/SeriesPlotterContainer.hxx 
b/chart2/source/view/main/SeriesPlotterContainer.hxx
index 578f2ba2760c..38f3c8b909c8 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.hxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.hxx
@@ -151,7 +151,7 @@ private:
 sal_Int32 m_nMaxAxisIndex;
 
 bool m_bChartTypeUsesShiftedCategoryPositionPerDefault;
-bool m_bForceShiftPosition = false;
+bool m_bTableShiftPosition = false;
 sal_Int32 m_nDefaultDateNumberFormat;
 };
 
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index eae1d65e7a90..26186d36ea72 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -1965,6 +1965,31 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159422)
 CPPUNIT_ASSERT_DOUBLES_EQUAL(6573, nYSymbol3, 20);
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159456)
+{
+// Given a document with chart, which have a datatable
+createSwDoc("charttable.odt");
+SwDoc* pDoc = getSwDoc();
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ Without the fix, this would fail:
+ - Expected: 1
+ - Actual  : 1.5
+ - In <>, XPath contents of child does not match
+assertXPathContent(pXmlDoc,
+   
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/"
+   "push[103]/textarray/text",
+   "1");
+assertXPathContent(pXmlDoc,
+   
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/"
+   "push[104]/textarray/text",
+   "2");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 2ddbe0a75a82b8833b1d4b2f9143e70db1569434
Author: Balazs Varga 
AuthorDate: Wed Mar 6 22:52:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 8 11:01:04 2024 +0100

tdf#159422 - chart view: fix symbols position of data table legend

Calculate the correct/optimal row height after calculating and set
correct width of a table cell. Then we will have the correct row height
for the symbol positions.

Change-Id: I65bc0f0579ea100906b0b32449c2200a54c2a353
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164512
 

core.git: chart2/source sw/qa

2024-03-08 Thread Balazs Varga (via logerrit)
 chart2/source/view/main/SeriesPlotterContainer.cxx |7 +
 chart2/source/view/main/SeriesPlotterContainer.hxx |2 -
 sw/qa/extras/layout/layout3.cxx|   25 +
 3 files changed, 28 insertions(+), 6 deletions(-)

New commits:
commit 40a19e61efff859d83e0689c0ed7d40c8e9ae8fe
Author: Balazs Varga 
AuthorDate: Thu Mar 7 14:32:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 8 09:42:42 2024 +0100

tdf#159456 - chart view: fix wrongly shifted value Y axis

We only have to shift the category axis only, and not the
value axis, if we have a chart data table.

Change-Id: Ie77ea829e8f8987702dce7d17cb3e20054f3d8cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164539
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/main/SeriesPlotterContainer.cxx 
b/chart2/source/view/main/SeriesPlotterContainer.cxx
index b70e51510b7d..06a22207634d 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.cxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.cxx
@@ -174,7 +174,7 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
 }
 
 if (xDiagram->getDataTable().is())
-m_bForceShiftPosition = true;
+m_bTableShiftPosition = true;
 
 //prepare for autoscaling and shape creation
 // - create plotter for charttypes (for each first scale group at each 
plotter, as they are independent)
@@ -357,12 +357,9 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
 bool SeriesPlotterContainer::isCategoryPositionShifted(const 
chart2::ScaleData& rSourceScale,
bool 
bHasComplexCategories)
 {
-if (m_bForceShiftPosition)
-return true;
-
 if (rSourceScale.AxisType == AxisType::CATEGORY)
 return bHasComplexCategories || rSourceScale.ShiftedCategoryPosition
-   || m_bChartTypeUsesShiftedCategoryPositionPerDefault;
+   || m_bTableShiftPosition || 
m_bChartTypeUsesShiftedCategoryPositionPerDefault;
 
 if (rSourceScale.AxisType == AxisType::DATE)
 return rSourceScale.ShiftedCategoryPosition;
diff --git a/chart2/source/view/main/SeriesPlotterContainer.hxx 
b/chart2/source/view/main/SeriesPlotterContainer.hxx
index 578f2ba2760c..38f3c8b909c8 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.hxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.hxx
@@ -151,7 +151,7 @@ private:
 sal_Int32 m_nMaxAxisIndex;
 
 bool m_bChartTypeUsesShiftedCategoryPositionPerDefault;
-bool m_bForceShiftPosition = false;
+bool m_bTableShiftPosition = false;
 sal_Int32 m_nDefaultDateNumberFormat;
 };
 
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index 7bb1dbced75c..9d2de1ea0497 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -2458,6 +2458,31 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159422)
 CPPUNIT_ASSERT_DOUBLES_EQUAL(6573, nYSymbol3, 20);
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159456)
+{
+// Given a document with chart, which have a datatable
+createSwDoc("charttable.odt");
+SwDoc* pDoc = getSwDoc();
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ Without the fix, this would fail:
+ - Expected: 1
+ - Actual  : 1.5
+ - In <>, XPath contents of child does not match
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[103]/textarray/text"_ostr,
+"1");
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[104]/textarray/text"_ostr,
+"2");
+}
+
 } // end of anonymous namespace
 
 CPPUNIT_PLUGIN_IMPLEMENT();


core.git: chart2/source sw/qa

2024-03-08 Thread Balazs Varga (via logerrit)
 chart2/source/view/main/DataTableView.cxx |9 +++---
 sw/qa/extras/layout/data/charttable.odt   |binary
 sw/qa/extras/layout/layout3.cxx   |   39 ++
 3 files changed, 44 insertions(+), 4 deletions(-)

New commits:
commit f4ba83e82aafc206d17d2fa66a27573ebc5a3624
Author: Balazs Varga 
AuthorDate: Wed Mar 6 22:52:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 8 09:41:15 2024 +0100

tdf#159422 - chart view: fix symbols position of data table legend

Calculate the correct/optimal row height after calculating and set
correct width of a table cell. Then we will have the correct row height
for the symbol positions.

Change-Id: I65bc0f0579ea100906b0b32449c2200a54c2a353
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164512
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/main/DataTableView.cxx 
b/chart2/source/view/main/DataTableView.cxx
index c3c807ca099b..eacd91a6a651 100644
--- a/chart2/source/view/main/DataTableView.cxx
+++ b/chart2/source/view/main/DataTableView.cxx
@@ -455,11 +455,9 @@ void DataTableView::createShapes(basegfx::B2DVector const& 
rStart, basegfx::B2DV
 nRow++;
 }
 
+// force recalculation of column widths in the table shape
 xBroadcaster->unlockBroadcasts();
-
-// force recalculation of all cells in the table shape
 pTableObject->DistributeColumns(0, nColumnCount, true, true);
-pTableObject->DistributeRows(0, nRowCount, true, true);
 
 xBroadcaster->lockBroadcasts();
 
@@ -477,6 +475,10 @@ void DataTableView::createShapes(basegfx::B2DVector const& 
rStart, basegfx::B2DV
 xPropertySet->setPropertyValue("Width", uno::Any(nColumnWidth));
 }
 
+// force recalculation of row heights in the table shape
+xBroadcaster->unlockBroadcasts();
+pTableObject->DistributeRows(0, nRowCount, true, true);
+
 if (bKeys)
 {
 sal_Int32 nTotalHeight = 0;
@@ -501,7 +503,6 @@ void DataTableView::createShapes(basegfx::B2DVector const& 
rStart, basegfx::B2DV
 }
 }
 }
-xBroadcaster->unlockBroadcasts();
 }
 
 void DataTableView::changePosition(sal_Int32 x, sal_Int32 y)
diff --git a/sw/qa/extras/layout/data/charttable.odt 
b/sw/qa/extras/layout/data/charttable.odt
new file mode 100644
index ..e8dfa37d8006
Binary files /dev/null and b/sw/qa/extras/layout/data/charttable.odt differ
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index f96b786cc093..7bb1dbced75c 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -2419,6 +2419,45 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159443)
 "4.3");
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159422)
+{
+// Given a document with chart, which have a datatable
+createSwDoc("charttable.odt");
+SwDoc* pDoc = getSwDoc();
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+CPPUNIT_ASSERT(pXmlDoc);
+ Without the fix, this would fail:
+ - Expected: 5877
+ - Actual  : 5649
+ - Delta   : 20
+sal_Int32 nYSymbol1
+= getXPath(
+  pXmlDoc,
+  
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[99]/polypolygon/polygon/point[1]"_ostr,
+  "y"_ostr)
+  .toInt32();
+CPPUNIT_ASSERT_DOUBLES_EQUAL(5877, nYSymbol1, 20);
+sal_Int32 nYSymbol2
+= getXPath(
+  pXmlDoc,
+  
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[100]/polypolygon/polygon/point[1]"_ostr,
+  "y"_ostr)
+  .toInt32();
+CPPUNIT_ASSERT_DOUBLES_EQUAL(6225, nYSymbol2, 20);
+sal_Int32 nYSymbol3
+= getXPath(
+  pXmlDoc,
+  
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[101]/polypolygon/polygon/point[1]"_ostr,
+  "y"_ostr)
+  .toInt32();
+CPPUNIT_ASSERT_DOUBLES_EQUAL(6573, nYSymbol3, 20);
+}
+
 } // end of anonymous namespace
 
 CPPUNIT_PLUGIN_IMPLEMENT();


core.git: chart2/source sw/qa

2024-03-08 Thread Balazs Varga (via logerrit)
 chart2/source/view/axes/VCartesianAxis.cxx |7 ++
 sw/qa/extras/layout/data/tdf159443.odt |binary
 sw/qa/extras/layout/layout3.cxx|   30 +
 3 files changed, 37 insertions(+)

New commits:
commit f856733ed18353b8ac7d7e19348cf9b1107cc14b
Author: Balazs Varga 
AuthorDate: Wed Mar 6 14:54:22 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 8 09:40:14 2024 +0100

tdf#159443 - chart view: fix Data table is not rendered below chart

If we have 1 dataseries we will have no tickmarks, in that case the
distance between two tickmarks is the width of the chart.

Change-Id: Ifea11329f1dcb80e8e390c1408306d1df7d49ded
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164471
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/axes/VCartesianAxis.cxx 
b/chart2/source/view/axes/VCartesianAxis.cxx
index 8163058ad5e0..a0c4a329d76d 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -1687,6 +1687,13 @@ void 
VCartesianAxis::createDataTableShape(std::unique_ptr const&
 nDistance *= 2;
 }
 
+if (nDistance <= 0)
+{
+// we only have one data series so we have no TickMarks, therefor 
calculate and use the table size
+auto rDelta = aEnd - aStart;
+nDistance = basegfx::fround(rDelta.getX());
+}
+
 if (nDistance > 0)
 {
 m_pDataTableView->createShapes(aStart, aEnd, nDistance);
diff --git a/sw/qa/extras/layout/data/tdf159443.odt 
b/sw/qa/extras/layout/data/tdf159443.odt
new file mode 100644
index ..8ec733aedb06
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf159443.odt differ
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index de11ac7d788d..f96b786cc093 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -2389,6 +2389,36 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, 
testPageBreakInHiddenSection)
 assertXPath(pXmlDoc, "//page[4]/body/section/infos/bounds"_ostr, 
"height"_ostr, u"0"_ustr);
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159443)
+{
+// Given a document with chart, which have a datatable
+createSwDoc("tdf159443.odt");
+SwDoc* pDoc = getSwDoc();
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+CPPUNIT_ASSERT(pXmlDoc);
+ Without the fix, this would fail:
+ - Expected: DataSeries1
+ - Actual  : 1.25
+ - In <>, XPath contents of child does not match
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[47]/textarray/text"_ostr,
+"DataSeries1");
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[49]/textarray/text"_ostr,
+"Category1");
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[51]/textarray/text"_ostr,
+"4.3");
+}
+
 } // end of anonymous namespace
 
 CPPUNIT_PLUGIN_IMPLEMENT();


core.git: formula/inc include/formula sc/inc sc/qa sc/README.md sc/source

2024-03-01 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc  |6 
 include/formula/compiler.hxx   |3 
 include/formula/opcode.hxx |2 
 sc/README.md   |1 
 sc/inc/helpids.h   |1 
 sc/inc/scfuncs.hrc |   12 
 sc/inc/scmatrix.hxx|2 
 sc/qa/extras/scfunctionlistobj.cxx |2 
 sc/qa/unit/data/functions/spreadsheet/fods/filter.fods | 5061 +
 sc/qa/unit/ucalc.cxx   |1 
 sc/source/core/data/funcdesc.cxx   |3 
 sc/source/core/inc/interpre.hxx|1 
 sc/source/core/tool/interpr1.cxx   |  173 
 sc/source/core/tool/interpr4.cxx   |1 
 sc/source/core/tool/parclass.cxx   |1 
 sc/source/core/tool/scmatrix.cxx   |   35 
 sc/source/core/tool/token.cxx  |1 
 sc/source/filter/excel/xlformula.cxx   |3 
 sc/source/filter/oox/formulabase.cxx   |3 
 19 files changed, 5307 insertions(+), 5 deletions(-)

New commits:
commit b0791dd9216224bdb266fd0d8c87df253b6d0583
Author: Balazs Varga 
AuthorDate: Mon Feb 26 16:13:33 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 1 18:31:35 2024 +0100

tdf#126573 Add Excel2021 array function FILTER to Calc

https://issues.oasis-open.org/browse/OFFICE-4156

TODO: add dynamic arrays would be useful: Older array formulas,
known as legacy array formulas, always return a fixed-size result
- they always spill into the same number of cells. The spilling behavior
described in this topic does not apply to legacy array formulas.

More info about it:

https://support.microsoft.com/en-gb/office/dynamic-array-formulas-and-spilled-array-behavior-205c6b06-03ba-4151-89a1-87a7eb36e531

Related Bug: https://bugs.documentfoundation.org/show_bug.cgi?id=127808

Change-Id: I1c3769ef33fa0207f55e1c96083717c2d90402e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163955
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 60460e93d38b..f0efc468ab6f 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -278,6 +278,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "VLOOKUP" , SC_OPCODE_V_LOOKUP },
 { "COM.MICROSOFT.XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
+{ "COM.MICROSOFT.FILTER" , SC_OPCODE_FILTER },
 { "ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for 
range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -727,6 +728,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "VLOOKUP" , SC_OPCODE_V_LOOKUP },
 { "_xlfn.XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
+{ "_xlfn._xlws.FILTER" , SC_OPCODE_FILTER },
 { "_xlfn.ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy 
for range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1179,6 +1181,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "VLOOKUP" , SC_OPCODE_V_LOOKUP },
 { "XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
+{ "FILTER" , SC_OPCODE_FILTER },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1632,6 +1635,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "VLOOKUP" , SC_OPCODE_V_LOOKUP },
 { "XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
+{ "FILTER" , SC_OPCODE_FILTER },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },  // ?? first character = I ??
@@ -2083,6 +2087,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "VLOOKUP" , SC_OPCODE_V_LOOKUP },
 { "XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
+{ "FILTER" , SC_OPCODE_FILTER },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -2515,6 +2520,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "VLOOKUP") , SC_OPCODE_V_LOOKUP },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "XLOOKUP") , SC_OPCODE_X_LOOKUP },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "HLOOKUP") , SC_OPCODE_H_LOOKUP },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "FILTER") , SC_OPCODE_FILTER },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MULTIRANGE") , 

core.git: sc/qa sc/source

2024-02-28 Thread Balazs Varga (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  380 +++-
 sc/source/core/tool/interpr1.cxx|   10 
 sc/source/core/tool/interpr4.cxx|1 
 3 files changed, 375 insertions(+), 16 deletions(-)

New commits:
commit c7664873f8aff4e1fa4f857e87821a49f858a73b
Author: Balazs Varga 
AuthorDate: Tue Feb 27 14:33:53 2024 +0100
Commit: Balazs Varga 
CommitDate: Wed Feb 28 15:31:23 2024 +0100

tdf#159467 XLOOKUP propagate error only for active paths

because XLOOKUP have [if_not_found] optional attribute where
a valid match is not found, return the [if_not_found] value
you supply. Which can also return an error as a result from
another function.

If a valid match is not found, and [if_not_found] is missing, #N/A is 
returned.

follow-up for tdf#127293: d9635e9bb42cf2b744b8d2f74633e2a209a8e3fd

Change-Id: Ic8727c6b51e947ef767397c29095b93286bc7bd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164042
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
index fb464e08d008..f6cfb74b24c5 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
@@ -1,7 +1,7 @@
 
 
 http://openoffice.org/2004/office; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns
 :css3t="http://www.w3.org/TR/css3-text/; 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2024-01-16T18:30:06.27800PT1H14M20S23LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/578d9be50413a4bdc809f8b5f58cc177458f83252024-02-08T21:37:48.96900
+ 
2024-01-16T18:30:06.27800PT1H22M11S26LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/3f63df475b9c7039d93d0d66c74c4d0ad79894862024-02-27T14:15:45.12500
  
   
0
@@ -13,8 +13,8 @@
  view1
  
   
-   4
-   17
+   2
+   4
2
0
0
@@ -30,13 +30,13 @@
false
   
   
-   4
-   43
+   0
+   128
2
0
0
0
-   24
+   46
0
65
60
@@ -48,7 +48,7 @@
   
  
  Sheet1
- 1851
+ 2479
  0
  65
  60
@@ -1114,6 +1114,245 @@


   
+  
+   
+Ft
+  
+  
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   
+   -
+   
+Ft
+   
+  
+  
+   
+   .
+   
+   .
+   
+  
+  
+   
+   .
+   
+   .
+   
+  
+  
+   
+   .
+   
+  
+  
+   
+   .
+   
+  
+  
+   
+   :
+   
+
+   
+  
+  
+   
+   :
+   
+   :
+   
+
+   
+  
+  
+   
+   .
+   
+   .
+   
+
+   
+   :
+   
+  
+  
+   
+   
+  
+  
+   -
+   
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   -
+   
+   
+   
+  
+  
+   
+

core.git: sc/source

2024-02-22 Thread Balazs Varga (via logerrit)
 sc/source/core/tool/interpr1.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d9635e9bb42cf2b744b8d2f74633e2a209a8e3fd
Author: Balazs Varga 
AuthorDate: Thu Feb 22 12:01:48 2024 +0100
Commit: Balazs Varga 
CommitDate: Thu Feb 22 21:58:39 2024 +0100

Related: tdf#127293 Fix typo for function XLOOKUP

Wrong isStringSearch value for VectorSearchArguments
at svExternalSingleRef argument.
Also more clean-up.

Change-Id: Idc5a953638b90704586754d07f5096d7b5615e17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163736
Tested-by: Jenkins
Reviewed-by: Sahil Gautam 
Reviewed-by: Balazs Varga 

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index c33e74ba9c3e..5b04dca96b4e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8011,7 +8011,7 @@ void ScInterpreter::ScXLookup()
 }
 else
 {
-vsa.isStringSearch = false;
+vsa.isStringSearch = true;
 vsa.sSearchStr = pToken->GetString();
 }
 }
@@ -10894,10 +10894,8 @@ bool ScInterpreter::SearchVectorForValue( 
VectorSearchArguments& vsa )
 rParam.nTab  = vsa.nTab1;
 
 ScQueryEntry& rEntry = rParam.GetEntry(0);
-rEntry = rParam.GetEntry(0);
 rEntry.nField = vsa.eSearchMode != searchrev ? vsa.nCol1 : vsa.nCol2;
 rEntry.bDoQuery = true;
-ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
 switch ( vsa.eMatchMode )
 {
 case exactorNA :
@@ -10943,6 +10941,8 @@ bool ScInterpreter::SearchVectorForValue( 
VectorSearchArguments& vsa )
 PushIllegalParameter();
 return false;
 }
+
+ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
 if ( vsa.isStringSearch )
 {
 rItem.meType   = ScQueryEntry::ByString;


core.git: Branch 'libreoffice-24-2-1' - writerfilter/qa writerfilter/source

2024-02-22 Thread Balazs Varga (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx|6 ++
 writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|5 -
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 0a300e60ed73f76eeb61035086df6cf857a2fa85
Author: Balazs Varga 
AuthorDate: Tue Feb 20 20:26:25 2024 +0100
Commit: Michael Stahl 
CommitDate: Thu Feb 22 12:26:43 2024 +0100

tdf#158360 - sw, ooxml import - fix insertTextPortion crash

Before this patch da8dead8e9282010893cbd12519e107baf03cd1a
SvxUnoTextBase::insertTextPortion returned an empty XTextRange
in case of texts in comment. (SwTextAPIObject) Lets use
finishParagraphInsert which also give back an empty XTextRange.

regression from commit: da8dead8e9282010893cbd12519e107baf03cd1a
(tdf#73537 - sc: show author and creation date in calc comments)

Change-Id: I0b33e5b3cae32718a62a7be04b9a88562f85652c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163670
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
(cherry picked from commit 7cf3d5e3073dc5cffc64b6d9b32513e90087a3d4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163626
Reviewed-by: Miklos Vajna 
(cherry picked from commit 64248c5d42bbf46eeb4c41e79dd0b5e4a360e280)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163629
Reviewed-by: Xisco Fauli 
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
index 8452da0203ab..885443c5a210 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
@@ -155,6 +155,12 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo78333)
 // just care that it doesn't crash/assert
 loadFromFile(u"fdo78333-1-minimized.docx");
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf158360)
+{
+// just test that doc with annotation in TOC doesn't crash/assert
+loadFromFile(u"tdf158360.docx");
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx
new file mode 100644
index ..a46ee67c007e
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 4ee9f58f3e4c..58568a910514 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3253,7 +3253,10 @@ void DomainMapper_Impl::applyToggleAttributes(const 
PropertyMapPtr& pPropertyMap
 {
 xTOCTextCursor->goLeft(1, false);
 }
-xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
+if (IsInComments())
+xTextRange = 
xTextAppend->finishParagraphInsert(aValues, xTOCTextCursor);
+else
+xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
 SAL_WARN_IF(!xTextRange.is(), "writerfilter.dmapper", 
"insertTextPortion failed");
 if (!xTextRange.is())
 throw uno::Exception("insertTextPortion failed", 
nullptr);


core.git: Branch 'feature/cib_contract49' - 2 commits - officecfg/registry sc/inc sc/source sc/uiconfig

2024-02-22 Thread Balazs Varga (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   24 +
 sc/inc/formulaopt.hxx|4 
 sc/inc/globstr.hrc   |1 
 sc/source/core/tool/formulaopt.cxx   |   62 ++
 sc/source/filter/xml/xmlimprt.cxx|   77 +++
 sc/source/filter/xml/xmlimprt.hxx|1 
 sc/source/ui/inc/tpformula.hxx   |1 
 sc/source/ui/optdlg/tpformula.cxx|   12 
 sc/uiconfig/scalc/ui/optformula.ui   |  323 ---
 9 files changed, 354 insertions(+), 151 deletions(-)

New commits:
commit 5ec10019e8905eceecbf6f527f86f1d9eb9f48e8
Author: Balazs Varga 
AuthorDate: Wed Feb 14 22:34:10 2024 +0100
Commit: Balazs Varga 
CommitDate: Thu Feb 22 11:14:49 2024 +0100

tdf#124098 sc add global config setting "RecalcOptimalRowHeightMode"

to optimal row height recalculation for optimal document loading.

If the "RecalcOptimalRowHeightMode" is set to "Recalc always" we always
recalculate the optimal row heights at load time, without any warning 
dialog.
If the "RecalcOptimalRowHeightMode" is set to "Recalc" we never recalculate
the optimal row heights at load time, without any warning dialog.
If the "RecalcOptimalRowHeightMode" is set to "Ask before Recalc" we ask 
the user
if want to recalculate the optimal row heights at load time or not.

The default value is the same what we are doing now: "Recalc always"

This option was necessary, since optimal row height calculation depending 
on also
the result of the conditional formatted formulas and it takes a lot of time 
to calculate
the optimal row heights and load the document. Because we allow a lot of 
text/cell format
attribute which are effect on the cell size, therefor it is necessary to 
evaluate all
the formulas. Also if we have 20 condition for a cell range we need to 
evaluate all
the 20 formulas for all the cells and it is very expensive at load time.

Change-Id: I9288d11dd2f061f85fa36292a909402a6bb89ea9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163421
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 0cb348ea087e..1ae1f4015717 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1608,6 +1608,30 @@
   
   1
 
+
+  
+  
+Specifies whether to force a hard recalc after load on 
optimal row heights.
+  
+  
+
+  
+Recalc always
+  
+
+
+  
+Recalc never
+  
+
+
+  
+Ask before Recalc
+  
+
+  
+  0
+
   
 
 
diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx
index de46b52643c8..6cc1dedcbbb4 100644
--- a/sc/inc/formulaopt.hxx
+++ b/sc/inc/formulaopt.hxx
@@ -30,6 +30,7 @@ private:
 
 ScRecalcOptions meOOXMLRecalc;
 ScRecalcOptions meODFRecalc;
+ScRecalcOptions meReCalcOptiRowHeights;
 
 public:
 ScFormulaOptions();
@@ -64,6 +65,9 @@ public:
 void SetODFRecalcOptions( ScRecalcOptions eOpt ) { meODFRecalc = eOpt; }
 ScRecalcOptions GetODFRecalcOptions() const { return meODFRecalc; }
 
+void SetReCalcOptiRowHeights( ScRecalcOptions eOpt ) { 
meReCalcOptiRowHeights = eOpt; }
+ScRecalcOptions GetReCalcOptiRowHeights() const { return 
meReCalcOptiRowHeights; }
+
 void ResetFormulaSeparators();
 
 static void GetDefaultFormulaSeparators(OUString& rSepArg, OUString& 
rSepArrayCol, OUString& rSepArrayRow);
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 5e6880d973d1..2a1c4b112570 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -505,6 +505,7 @@
 #define STR_EDIT_EXISTING_COND_FORMATS  
NC_("STR_EDIT_EXISTING_COND_FORMATS", "The selected cell already contains 
conditional formatting. You can either edit the existing conditional format or 
you define a new overlapping conditional format.

 Do you want to edit the existing conditional format?")
 #define STR_QUERY_FORMULA_RECALC_ONLOAD_ODS 
NC_("STR_QUERY_FORMULA_RECALC_ONLOAD_ODS", "This document was last saved by an 
application other than %PRODUCTNAME.  Some formula cells may produce different 
results when recalculated.

Do you want to recalculate all formula cells in this document now?")
 #define STR_QUERY_FORMULA_RECALC_ONLOAD_XLS 
NC_("STR_QUERY_FORMULA_RECALC_ONLOAD_XLS", "This document was saved in Excel 
file format (.xlsx). Some formula cells may produce different results when 
recalculated. 

Do you want to 

core.git: Branch 'libreoffice-7-6' - writerfilter/qa writerfilter/source

2024-02-22 Thread Balazs Varga (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx|6 ++
 writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|5 -
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 656540497a555cc23d66881c3b987cc93ba2203c
Author: Balazs Varga 
AuthorDate: Tue Feb 20 20:26:25 2024 +0100
Commit: Xisco Fauli 
CommitDate: Thu Feb 22 11:14:50 2024 +0100

tdf#158360 - sw, ooxml import - fix insertTextPortion crash

Before this patch da8dead8e9282010893cbd12519e107baf03cd1a
SvxUnoTextBase::insertTextPortion returned an empty XTextRange
in case of texts in comment. (SwTextAPIObject) Lets use
finishParagraphInsert which also give back an empty XTextRange.

regression from commit: da8dead8e9282010893cbd12519e107baf03cd1a
(tdf#73537 - sc: show author and creation date in calc comments)

Change-Id: I0b33e5b3cae32718a62a7be04b9a88562f85652c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163670
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
(cherry picked from commit 7cf3d5e3073dc5cffc64b6d9b32513e90087a3d4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163626
Reviewed-by: Miklos Vajna 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163720

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
index 97f856044d6c..c352c163cfe8 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
@@ -119,6 +119,12 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableThenTable)
 // Make sure the anchor text is the body text, not some cell.
 CPPUNIT_ASSERT_EQUAL(xBodyText, xAnchor->getText());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf158360)
+{
+// just test that doc with annotation in TOC doesn't crash/assert
+loadFromFile(u"tdf158360.docx");
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx
new file mode 100644
index ..a46ee67c007e
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 4fa434431555..bbdbb117556b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3228,7 +3228,10 @@ void DomainMapper_Impl::applyToggleAttributes(const 
PropertyMapPtr& pPropertyMap
 {
 xTOCTextCursor->goLeft(1, false);
 }
-xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
+if (IsInComments())
+xTextRange = 
xTextAppend->finishParagraphInsert(aValues, xTOCTextCursor);
+else
+xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
 SAL_WARN_IF(!xTextRange.is(), "writerfilter.dmapper", 
"insertTextPortion failed");
 if (!xTextRange.is())
 throw uno::Exception("insertTextPortion failed", 
nullptr);


core.git: Branch 'libreoffice-24-2' - writerfilter/qa writerfilter/source

2024-02-21 Thread Balazs Varga (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx|6 ++
 writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|5 -
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 64248c5d42bbf46eeb4c41e79dd0b5e4a360e280
Author: Balazs Varga 
AuthorDate: Tue Feb 20 20:26:25 2024 +0100
Commit: Miklos Vajna 
CommitDate: Thu Feb 22 08:26:14 2024 +0100

tdf#158360 - sw, ooxml import - fix insertTextPortion crash

Before this patch da8dead8e9282010893cbd12519e107baf03cd1a
SvxUnoTextBase::insertTextPortion returned an empty XTextRange
in case of texts in comment. (SwTextAPIObject) Lets use
finishParagraphInsert which also give back an empty XTextRange.

regression from commit: da8dead8e9282010893cbd12519e107baf03cd1a
(tdf#73537 - sc: show author and creation date in calc comments)

Change-Id: I0b33e5b3cae32718a62a7be04b9a88562f85652c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163670
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
(cherry picked from commit 7cf3d5e3073dc5cffc64b6d9b32513e90087a3d4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163626
Reviewed-by: Miklos Vajna 

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
index 8452da0203ab..885443c5a210 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
@@ -155,6 +155,12 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo78333)
 // just care that it doesn't crash/assert
 loadFromFile(u"fdo78333-1-minimized.docx");
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf158360)
+{
+// just test that doc with annotation in TOC doesn't crash/assert
+loadFromFile(u"tdf158360.docx");
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx
new file mode 100644
index ..a46ee67c007e
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 7a009d71aee8..0c0fa255d896 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3286,7 +3286,10 @@ void DomainMapper_Impl::applyToggleAttributes(const 
PropertyMapPtr& pPropertyMap
 {
 xTOCTextCursor->goLeft(1, false);
 }
-xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
+if (IsInComments())
+xTextRange = 
xTextAppend->finishParagraphInsert(aValues, xTOCTextCursor);
+else
+xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
 SAL_WARN_IF(!xTextRange.is(), "writerfilter.dmapper", 
"insertTextPortion failed");
 if (!xTextRange.is())
 throw uno::Exception("insertTextPortion failed", 
nullptr);


core.git: writerfilter/qa writerfilter/source

2024-02-21 Thread Balazs Varga (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx|6 ++
 writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|5 -
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 7cf3d5e3073dc5cffc64b6d9b32513e90087a3d4
Author: Balazs Varga 
AuthorDate: Tue Feb 20 20:26:25 2024 +0100
Commit: Balazs Varga 
CommitDate: Wed Feb 21 20:36:38 2024 +0100

tdf#158360 - sw, ooxml import - fix insertTextPortion crash

Before this patch da8dead8e9282010893cbd12519e107baf03cd1a
SvxUnoTextBase::insertTextPortion returned an empty XTextRange
in case of texts in comment. (SwTextAPIObject) Lets use
finishParagraphInsert which also give back an empty XTextRange.

regression from commit: da8dead8e9282010893cbd12519e107baf03cd1a
(tdf#73537 - sc: show author and creation date in calc comments)

Change-Id: I0b33e5b3cae32718a62a7be04b9a88562f85652c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163670
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
index 8452da0203ab..885443c5a210 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
@@ -155,6 +155,12 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo78333)
 // just care that it doesn't crash/assert
 loadFromFile(u"fdo78333-1-minimized.docx");
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf158360)
+{
+// just test that doc with annotation in TOC doesn't crash/assert
+loadFromFile(u"tdf158360.docx");
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx
new file mode 100644
index ..a46ee67c007e
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index f73504824ea0..0b1ff5e0e6e3 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3287,7 +3287,10 @@ void 
DomainMapper_Impl::MergeAtContentImageRedlineWithNext(const css::uno::Refer
 {
 xTOCTextCursor->goLeft(1, false);
 }
-xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
+if (IsInComments())
+xTextRange = 
xTextAppend->finishParagraphInsert(aValues, xTOCTextCursor);
+else
+xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
 SAL_WARN_IF(!xTextRange.is(), "writerfilter.dmapper", 
"insertTextPortion failed");
 if (!xTextRange.is())
 throw uno::Exception("insertTextPortion failed", 
nullptr);


core.git: officecfg/registry sc/inc sc/source sc/uiconfig

2024-02-19 Thread Balazs Varga (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   24 
 sc/inc/formulaopt.hxx|4 
 sc/inc/globstr.hrc   |1 
 sc/source/core/tool/formulaopt.cxx   |   62 ++--
 sc/source/filter/xml/xmlimprt.cxx|   77 ++-
 sc/source/filter/xml/xmlimprt.hxx|1 
 sc/source/ui/inc/tpformula.hxx   |1 
 sc/source/ui/optdlg/tpformula.cxx|   12 ++
 sc/uiconfig/scalc/ui/optformula.ui   |   37 +++
 9 files changed, 211 insertions(+), 8 deletions(-)

New commits:
commit 2d2974f22ab59ea7dab1aee778308c4f50ff5464
Author: Balazs Varga 
AuthorDate: Wed Feb 14 22:34:10 2024 +0100
Commit: Balazs Varga 
CommitDate: Mon Feb 19 23:24:54 2024 +0100

tdf#124098 sc add global config setting "RecalcOptimalRowHeightMode"

to optimal row height recalculation for optimal document loading.

If the "RecalcOptimalRowHeightMode" is set to "Recalc always" we always
recalculate the optimal row heights at load time, without any warning 
dialog.
If the "RecalcOptimalRowHeightMode" is set to "Recalc" we never recalculate
the optimal row heights at load time, without any warning dialog.
If the "RecalcOptimalRowHeightMode" is set to "Ask before Recalc" we ask 
the user
if want to recalculate the optimal row heights at load time or not.

The default value is the same what we are doing now: "Recalc always"

This option was necessary, since optimal row height calculation depending 
on also
the result of the conditional formatted formulas and it takes a lot of time 
to calculate
the optimal row heights and load the document. Because we allow a lot of 
text/cell format
attribute which are effect on the cell size, therefor it is necessary to 
evaluate all
the formulas. Also if we have 20 condition for a cell range we need to 
evaluate all
the 20 formulas for all the cells and it is very expensive at load time.

Change-Id: I9288d11dd2f061f85fa36292a909402a6bb89ea9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163421
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index de97c822c7c1..5582b346910d 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1540,6 +1540,30 @@
   
   1
 
+
+  
+  
+Specifies whether to force a hard recalc after load on 
optimal row heights.
+  
+  
+
+  
+Recalc always
+  
+
+
+  
+Recalc never
+  
+
+
+  
+Ask before Recalc
+  
+
+  
+  0
+
   
 
 
diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx
index de46b52643c8..6cc1dedcbbb4 100644
--- a/sc/inc/formulaopt.hxx
+++ b/sc/inc/formulaopt.hxx
@@ -30,6 +30,7 @@ private:
 
 ScRecalcOptions meOOXMLRecalc;
 ScRecalcOptions meODFRecalc;
+ScRecalcOptions meReCalcOptiRowHeights;
 
 public:
 ScFormulaOptions();
@@ -64,6 +65,9 @@ public:
 void SetODFRecalcOptions( ScRecalcOptions eOpt ) { meODFRecalc = eOpt; }
 ScRecalcOptions GetODFRecalcOptions() const { return meODFRecalc; }
 
+void SetReCalcOptiRowHeights( ScRecalcOptions eOpt ) { 
meReCalcOptiRowHeights = eOpt; }
+ScRecalcOptions GetReCalcOptiRowHeights() const { return 
meReCalcOptiRowHeights; }
+
 void ResetFormulaSeparators();
 
 static void GetDefaultFormulaSeparators(OUString& rSepArg, OUString& 
rSepArrayCol, OUString& rSepArrayRow);
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index b5badb52dff3..04bfae4f6f82 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -504,6 +504,7 @@
 #define STR_EDIT_EXISTING_COND_FORMATS  
NC_("STR_EDIT_EXISTING_COND_FORMATS", "The selected cell already contains 
conditional formatting. You can either edit the existing conditional format or 
you define a new overlapping conditional format.

 Do you want to edit the existing conditional format?")
 #define STR_QUERY_FORMULA_RECALC_ONLOAD_ODS 
NC_("STR_QUERY_FORMULA_RECALC_ONLOAD_ODS", "This document was last saved by an 
application other than %PRODUCTNAME.  Some formula cells may produce different 
results when recalculated.

Do you want to recalculate all formula cells in this document now?")
 #define STR_QUERY_FORMULA_RECALC_ONLOAD_XLS 
NC_("STR_QUERY_FORMULA_RECALC_ONLOAD_XLS", "This document was saved in Excel 
file format (.xlsx). Some formula cells may produce different results when 
recalculated. 

Do you 

core.git: formula/inc include/formula sc/inc sc/qa sc/README.md sc/source

2024-02-18 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc  |6 
 include/formula/compiler.hxx   |2 
 include/formula/opcode.hxx |2 
 sc/README.md   |1 
 sc/inc/helpids.h   |1 
 sc/inc/scfuncs.hrc |   14 
 sc/qa/extras/scfunctionlistobj.cxx |2 
 sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods | 3753 +
 sc/qa/unit/ucalc.cxx   |1 
 sc/source/core/data/funcdesc.cxx   |1 
 sc/source/core/data/queryiter.cxx  |   39 
 sc/source/core/inc/interpre.hxx|3 
 sc/source/core/tool/interpr1.cxx   |  180 
 sc/source/core/tool/interpr4.cxx   |1 
 sc/source/core/tool/parclass.cxx   |3 
 sc/source/core/tool/token.cxx  |1 
 sc/source/filter/excel/xlformula.cxx   |3 
 sc/source/filter/oox/formulabase.cxx   |3 
 18 files changed, 3988 insertions(+), 28 deletions(-)

New commits:
commit b36ecef07a4933c0943b27ea937f31e1df2e77cd
Author: Balazs Varga 
AuthorDate: Mon Feb 12 21:36:30 2024 +0100
Commit: Balazs Varga 
CommitDate: Sun Feb 18 23:13:01 2024 +0100

tdf#128425 Add Excel2021 function XMATCH to Calc

https://issues.oasis-open.org/browse/OFFICE-4155

Change-Id: I7791ab873cf62ce882feba75dc0d722bc5990f9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163260
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 835d928ea4a8..60460e93d38b 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -266,6 +266,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "INDIRECT" , SC_OPCODE_INDIRECT },
 { "ADDRESS" , SC_OPCODE_ADDRESS },
 { "MATCH" , SC_OPCODE_MATCH },
+{ "COM.MICROSOFT.XMATCH" , SC_OPCODE_X_MATCH },
 { "COUNTBLANK" , SC_OPCODE_COUNT_EMPTY_CELLS },
 { "COUNTIF" , SC_OPCODE_COUNT_IF },
 { "SUMIF" , SC_OPCODE_SUM_IF },
@@ -714,6 +715,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "INDIRECT" , SC_OPCODE_INDIRECT },
 { "ADDRESS" , SC_OPCODE_ADDRESS },
 { "MATCH" , SC_OPCODE_MATCH },
+{ "_xlfn.XMATCH" , SC_OPCODE_X_MATCH },
 { "COUNTBLANK" , SC_OPCODE_COUNT_EMPTY_CELLS },
 { "COUNTIF" , SC_OPCODE_COUNT_IF },
 { "SUMIF" , SC_OPCODE_SUM_IF },
@@ -1165,6 +1167,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "INDIRECT" , SC_OPCODE_INDIRECT },
 { "ADDRESS" , SC_OPCODE_ADDRESS },
 { "MATCH" , SC_OPCODE_MATCH },
+{ "XMATCH" , SC_OPCODE_X_MATCH },
 { "COUNTBLANK" , SC_OPCODE_COUNT_EMPTY_CELLS },
 { "COUNTIF" , SC_OPCODE_COUNT_IF },
 { "SUMIF" , SC_OPCODE_SUM_IF },
@@ -1617,6 +1620,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "INDIRECT" , SC_OPCODE_INDIRECT },
 { "ADDRESS" , SC_OPCODE_ADDRESS },
 { "MATCH" , SC_OPCODE_MATCH },
+{ "XMATCH" , SC_OPCODE_X_MATCH },
 { "COUNTBLANK" , SC_OPCODE_COUNT_EMPTY_CELLS },
 { "COUNTIF" , SC_OPCODE_COUNT_IF },
 { "SUMIF" , SC_OPCODE_SUM_IF },
@@ -2067,6 +2071,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "INDIRECT" , SC_OPCODE_INDIRECT },
 { "ADDRESS" , SC_OPCODE_ADDRESS },
 { "MATCH" , SC_OPCODE_MATCH },
+{ "XMATCH" , SC_OPCODE_X_MATCH },
 { "COUNTBLANK" , SC_OPCODE_COUNT_EMPTY_CELLS },
 { "COUNTIF" , SC_OPCODE_COUNT_IF },
 { "SUMIF" , SC_OPCODE_SUM_IF },
@@ -2498,6 +2503,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "INDIRECT") , SC_OPCODE_INDIRECT },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "ADDRESS") , SC_OPCODE_ADDRESS },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MATCH") , SC_OPCODE_MATCH },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "XMATCH") , SC_OPCODE_X_MATCH },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "COUNTBLANK") , 
SC_OPCODE_COUNT_EMPTY_CELLS },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "COUNTIF") , SC_OPCODE_COUNT_IF },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SUMIF") , SC_OPCODE_SUM_IF },
diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx
index 479008dfb1a2..f3187ae95baa 100644
--- a/include/formula/compiler.hxx
+++ b/include/formula/compiler.hxx
@@ -399,7 +399,7 @@
 #define SC_OPCODE_ISPMT 386
 #define SC_OPCODE_HYPERLINK 387
 #define SC_OPCODE_X_LOOKUP  388
-// free: 389
+#define SC_OPCODE_X_MATCH   389
 #define SC_OPCODE_GET_PIVOT_DATA390
 #define SC_OPCODE_EUROCONVERT   391
 #define SC_OPCODE_NUMBERVALUE   392
diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx
index ad056a9b0b50..3c8053ffb1e3 100644
--- 

core.git: sc/uiconfig

2024-02-16 Thread Balazs Varga (via logerrit)
 sc/uiconfig/scalc/ui/optformula.ui |  288 ++---
 1 file changed, 144 insertions(+), 144 deletions(-)

New commits:
commit d6f2f7aca93796370575875a291e15436922b2e9
Author: Balazs Varga 
AuthorDate: Thu Feb 15 11:38:27 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Feb 16 12:15:41 2024 +0100

Resave with newer Glade version

Change-Id: Id3a9d60a82cfee0ccbb1275a32274697b54ebff3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163445
Reviewed-by: Balazs Varga 
Tested-by: Balazs Varga 

diff --git a/sc/uiconfig/scalc/ui/optformula.ui 
b/sc/uiconfig/scalc/ui/optformula.ui
index 68a2ad8166a9..545c0759fd1c 100644
--- a/sc/uiconfig/scalc/ui/optformula.ui
+++ b/sc/uiconfig/scalc/ui/optformula.ui
@@ -1,77 +1,77 @@
 
-
+
 
   
-  
+  
   
 True
-False
+False
 True
-6
-12
+6
+12
 
   
 True
-False
-0
-none
+False
+0
+none
 
-  
+  
   
 True
-False
-6
+False
 12
 6
+6
 
   
 Use English function names
 True
-True
-False
-True
-True
+True
+False
+True
+True
   
   
-0
-1
+0
+1
   
 
 
-  
+  
   
 True
-False
+False
 True
-12
+12
 
   
 True
-False
+False
 True
   
   
-1
-0
+1
+0
   
 
 
   
 True
-False
+False
 Formula _syntax:
-True
-formulasyntax
+True
+formulasyntax
   
   
-0
-0
+0
+0
   
 
   
   
-0
-0
+0
+0
   
 
   
@@ -79,7 +79,7 @@
 
   
 True
-False
+False
 Formula Options
 
   
@@ -88,57 +88,57 @@
 
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
-0
-none
+False
+0
+none
 
-  
+  
   
 True
-False
-6
-12
+False
 12
 6
+6
+12
 
   
 True
-False
+False
 Excel 2007 and newer:
-True
-ooxmlrecalc
+True
+ooxmlrecalc
 0
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 ODF spreadsheet (not saved by 
%PRODUCTNAME):
-True
-odfrecalc
+True
+odfrecalc
 0
   
   
-0
-1
+0
+1
   
 
 
   
 True
-False
+False
 True
 
   Always recalculate
@@ -147,14 +147,14 @@
 
   
   
-1
-0
+1
+0
   
 
 
   
 True
-False
+False
 True
 
   Always recalculate
@@ -163,8 +163,8 @@
 
   
   
-1
-1
+1
+1
   
 
   
@@ -172,7 +172,7 @@
 
   
 True
-False
+False
 Recalculation on File Load
 
   
@@ -181,79 +181,79 @@
 
   
   
-0
-3
+ 

core.git: sc/qa sc/source

2024-02-09 Thread Balazs Varga (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |   79 +--
 sc/source/core/tool/interpr1.cxx|  107 ++--
 2 files changed, 108 insertions(+), 78 deletions(-)

New commits:
commit 41192a36796155f8cd6ac733f5ef84767edf300f
Author: Balazs Varga 
AuthorDate: Fri Feb 9 00:07:41 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Feb 9 13:23:51 2024 +0100

Related: tdf#127293 Fix function XLOOKUP with nested XLOOKUP functions

to return reference of cells what other functions can use (e.g.:SUM):
=SUM(XLOOKUP(B3,B6:B10,E6:E10):XLOOKUP(C3,B6:B10,E6:E10))

XLOOKUP function returns a reference to a range of cell(s).

Change-Id: I06007aba7017315fc02a92b120f842244b7cc3c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163129
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
index 49ecf573b50c..fb464e08d008 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
@@ -1,7 +1,7 @@
 
 
 http://openoffice.org/2004/office; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns
 :css3t="http://www.w3.org/TR/css3-text/; 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2024-01-16T18:30:06.27800PT1H12M22LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/2b1f5fa987f02ec8014dbf6837c6b090faf11f2d2024-02-01T11:50:13.78900
+ 
2024-01-16T18:30:06.27800PT1H14M20S23LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/578d9be50413a4bdc809f8b5f58cc177458f83252024-02-08T21:37:48.96900
  
   
0
@@ -13,8 +13,8 @@
  view1
  
   
-   2
-   0
+   4
+   17
2
0
0
@@ -30,13 +30,13 @@
false
   
   
-   1
-   115
+   4
+   43
2
0
0
0
-   0
+   24
0
65
60
@@ -48,7 +48,7 @@
   
  
  Sheet1
- 1837
+ 1851
  0
  65
  60
@@ -126,7 +126,7 @@
true

 
- Munkalap1
+ Sheet1
 
 
  Sheet2
@@ -1612,9 +1612,6 @@
   

   
-  
-   
-  
   

   
@@ -1719,7 +1716,7 @@
  
???(???)
 
 
- .00.00, 00:00:00
+ .00.00, 00:00:00
 


@@ -1998,10 +1995,10 @@
 
 
  
-  #HIÁNYZIK
+  #N/A
  
  
-  #HIÁNYZIK
+  #N/A
  
  
   IGAZ
@@ -2161,10 +2158,10 @@
 
 
  
-  #HIÁNYZIK
+  #N/A
  
  
-  #HIÁNYZIK
+  #N/A
  
  
   IGAZ
@@ -2509,10 +2506,10 @@
 
 
  
-  #HIÁNYZIK
+  #N/A
  
  
-  #HIÁNYZIK
+  #N/A
  
  
   IGAZ
@@ -2524,10 +2521,10 @@
 
 
  
-  #HIÁNYZIK
+  #N/A
  
  
-  #HIÁNYZIK
+  #N/A
  
  
   IGAZ
@@ -2712,7 +2709,7 @@
 
 
  
-  #HIÁNYZIK

core.git: sc/inc sc/qa sc/source

2024-02-07 Thread Balazs Varga (via logerrit)
 sc/inc/queryiter.hxx|   18 
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  406 ++--
 sc/source/core/data/queryiter.cxx   |   57 +-
 sc/source/core/tool/interpr1.cxx|   22 
 4 files changed, 423 insertions(+), 80 deletions(-)

New commits:
commit 68738bd0ac262819b13ea7e11af67ee493b9b3e1
Author: Balazs Varga 
AuthorDate: Thu Feb 1 14:36:24 2024 +0100
Commit: Balazs Varga 
CommitDate: Thu Feb 8 08:25:15 2024 +0100

Related: tdf#127293 Fix function XLOOKUP binary search corner cases

Fix some binary search (vertical) corner cases in case of XLOOKUP
where we looking for the first matches.

Change-Id: I6cdc778350989e0802ffc54284fdab9b8a2bece4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162877
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/inc/queryiter.hxx b/sc/inc/queryiter.hxx
index e34a7be20e13..662fe8a9cf35 100644
--- a/sc/inc/queryiter.hxx
+++ b/sc/inc/queryiter.hxx
@@ -171,8 +171,16 @@ protected:
 nTestEqualConditionFulfilled = nTestEqualConditionEnabled | 
nTestEqualConditionMatched
 };
 
+enum SortedBinarySearchBits
+{
+nBinarySearchDisabled = 0x00,
+nSearchbAscd = 0x01,
+nSearchbDesc = 0x02,
+};
+
 sal_uInt8nStopOnMismatch;
 sal_uInt8nTestEqualCondition;
+sal_uInt8nSortedBinarySearch;
 boolbAdvanceQuery;
 boolbIgnoreMismatchOnLeadingStrings;
 boolbSortedBinarySearch;
@@ -263,8 +271,11 @@ public:
 { bAdvanceQuery = bVal; }
 voidAdvanceQueryParamEntryField();
 
-voidSetSortedBinarySearchMode( bool bVal )
-{ bSortedBinarySearch = bVal; }
+voidSetSortedBinarySearchMode( sal_Int8 nSearchMode )
+{
+nSortedBinarySearch = 
sal::static_int_cast(nSearchMode == 2 ?
+nSearchbAscd : (nSearchMode == -2 ? 
nSearchbDesc : nBinarySearchDisabled));
+}
 
 voidSetXlookupMode( bool bVal )
 { bXLookUp = bVal; }
@@ -309,11 +320,12 @@ class ScQueryCellIterator
 using Base::nStopOnMismatchEnabled;
 using Base::nTestEqualCondition;
 using Base::nTestEqualConditionEnabled;
+using Base::nSortedBinarySearch;
+using Base::nBinarySearchDisabled;
 using Base::PerformQuery;
 using Base::getThisResult;
 using Base::nBestFitCol;
 using Base::nBestFitRow;
-using Base::bSortedBinarySearch;
 using Base::bXLookUp;
 
 bool GetThis();
diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
index 16abcbcacb4b..49ecf573b50c 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
@@ -1,7 +1,7 @@
 
 
 http://openoffice.org/2004/office; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns
 

core.git: Branch 'libreoffice-24-2' - cui/source include/sfx2 include/svx include/vcl sfx2/sdi sfx2/source solenv/clang-format

2024-02-01 Thread Balazs Varga (via logerrit)
 cui/source/factory/dlgfact.cxx |   11 +
 cui/source/factory/dlgfact.hxx |8 ++
 cui/source/inc/securityoptions.hxx |1 
 cui/source/options/optinet2.cxx|   38 ++---
 cui/source/options/securityoptions.cxx |   30 +-
 include/sfx2/sfxdlg.hxx|2 +
 include/sfx2/sfxsids.hrc   |1 
 include/svx/svxdlg.hxx |2 +
 include/vcl/abstdlg.hxx|8 ++
 sfx2/sdi/appslots.sdi  |4 +++
 sfx2/sdi/sfx.sdi   |   17 ++
 sfx2/source/appl/appserv.cxx   |   14 
 sfx2/source/view/viewfrm.cxx   |3 --
 solenv/clang-format/excludelist|2 -
 14 files changed, 102 insertions(+), 39 deletions(-)

New commits:
commit 3bbcae765e58bb02ca422edbb27d69388fdba4eb
Author: Balazs Varga 
AuthorDate: Mon Jan 22 13:19:26 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Feb 1 10:43:36 2024 +0100

tdf#159128 UI: Open Security settings option directly

Open Security Option Setting page directly from Security pop up
warning infobar.

Follow up of 1f440348eb0892fd2c9597806d87b5fe9d60d49a
(tdf#157482 UI: Turn Security Warnings popup windows into infobars)

cherry-pick from commit: 2c16ea16b305dc546164e28cf6b212ebccc44ec4

Change-Id: Iac116677801bdb13a9680bcfdf532ec3d874ce0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162393
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162491
Reviewed-by: Thorsten Behrens 

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index ffb5fd301069..c53e3432a2a4 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -116,6 +116,7 @@ IMPL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg)
 IMPL_ABSTDLG_CLASS(AbstractSignatureLineDialog)
 IMPL_ABSTDLG_CLASS(AbstractSignSignatureLineDialog)
 IMPL_ABSTDLG_CLASS(AbstractSvxCharacterMapDialog)
+IMPL_ABSTDLG_CLASS(AbstractSecurityOptionsDialog)
 IMPL_ABSTDLG_CLASS(AbstractSvxHpLinkDlg)
 IMPL_ABSTDLG_CLASS(AbstractSvxJSearchOptionsDialog)
 IMPL_ABSTDLG_CLASS(AbstractSvxMultiPathDialog)
@@ -874,6 +875,16 @@ VclPtr 
AbstractDialogFactory_Impl::CreateFrameDialog(weld::Wi
 return nullptr;
 }
 
+VclPtr 
AbstractDialogFactory_Impl::CreateSvxSecurityOptionsDialog(weld::Window* 
pParent)
+{
+return 
VclPtr::Create(std::make_unique(pParent));
+}
+
+bool AbstractSecurityOptionsDialog_Impl::SetSecurityOptions()
+{
+return m_xDlg->SetSecurityOptions();
+}
+
 // TabDialog outside the drawing layer
 VclPtr 
AbstractDialogFactory_Impl::CreateAutoCorrTabDialog(weld::Window* pParent, 
const SfxItemSet* pAttrSet)
 {
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 1da0ec35ec38..02ba9a1b0f9d 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -49,6 +49,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -402,6 +403,11 @@ 
DECL_ABSTDLG_CLASS_UNIQUE(AbstractSvxCharacterMapDialog,SfxAbstractDialog,SvxCha
 DECL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg,ScreenshotAnnotationDlg)
 };
 
+// AbstractSecurityOptionsDialog_Impl
+DECL_ABSTDLG_CLASS(AbstractSecurityOptionsDialog, svx::SecurityOptionsDialog)
+virtual bool SetSecurityOptions() override;
+};
+
 // AbstractSignatureLineDialog_Impl
 DECL_ABSTDLG_CLASS(AbstractSignatureLineDialog,SignatureLineDialog)
 };
@@ -592,6 +598,8 @@ public:
 
 virtual VclPtr 
CreateScreenshotAnnotationDlg(weld::Dialog& rParentDialog) override;
 
+virtual VclPtr 
CreateSvxSecurityOptionsDialog(weld::Window* pParent) override;
+
 virtual VclPtr
 CreateSignatureLineDialog(weld::Window* pParent,
   const css::uno::Reference 
xModel, bool bEditExisting) override;
diff --git a/cui/source/options/securityoptions.hxx 
b/cui/source/inc/securityoptions.hxx
similarity index 99%
rename from cui/source/options/securityoptions.hxx
rename to cui/source/inc/securityoptions.hxx
index 7884ccfbd30e..6839e3931822 100644
--- a/cui/source/options/securityoptions.hxx
+++ b/cui/source/inc/securityoptions.hxx
@@ -72,6 +72,7 @@ namespace svx
 
 DECL_LINK(ShowPersonalInfosToggle, weld::Toggleable&, void);
 
+bool SetSecurityOptions();
 void changeKeepSecurityInfosEnabled();
 };
 }
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 083c3e40f784..eaf0e8616bfd 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -52,7 +51,7 @@
 #include 
 #include 
 #include 
-#include "securityoptions.hxx"
+#include 
 #include "webconninfo.hxx"
 #include "certpath.hxx"
 #include "tsaurls.hxx"
@@ -834,25 +833,6 @@ DeactivateRC 

core.git: Branch 'libreoffice-24-2' - sw/source

2024-01-30 Thread Balazs Varga (via logerrit)
 sw/source/core/access/AccessibilityCheck.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 5f6542e77a3ae8313199ca6704ef050be336a2f0
Author: Balazs Varga 
AuthorDate: Mon Jan 29 22:05:28 2024 +0100
Commit: Michael Stahl 
CommitDate: Tue Jan 30 18:11:32 2024 +0100

tdf#159384 - A11y: fix simulated numbering warning in TOC

Do not complane about simulated numbering warning in TOC
if its contains a list with numbering.

Change-Id: Ib6a10d18d19cc9cb44ffd5b79e2106af457985d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162707
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 24a3f8269e427875fbe8013f88e83fc41b90b33a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162717

diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index e4eaa089ef2f..e515b5cae7ed 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -344,6 +344,10 @@ public:
 if (!pNextTextNode)
 return;
 
+SwSectionNode* pNd = pCurrentTextNode->FindSectionNode();
+if (pNd && pNd->GetSection().GetType() == SectionType::ToxContent)
+return;
+
 for (auto& rPair : m_aNumberingCombinations)
 {
 if (pCurrentTextNode->GetText().startsWith(rPair.first)


core.git: Branch 'libreoffice-7-6' - sw/source

2024-01-30 Thread Balazs Varga (via logerrit)
 sw/source/core/access/AccessibilityCheck.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 211f6ff53715432af32a5e94923edd16ef9475cb
Author: Balazs Varga 
AuthorDate: Mon Jan 29 22:05:28 2024 +0100
Commit: Christian Lohmaier 
CommitDate: Tue Jan 30 13:46:40 2024 +0100

tdf#159384 - A11y: fix simulated numbering warning in TOC

Do not complane about simulated numbering warning in TOC
if its contains a list with numbering.

Change-Id: Ib6a10d18d19cc9cb44ffd5b79e2106af457985d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162707
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 24a3f8269e427875fbe8013f88e83fc41b90b33a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162718

diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index 42f4cf7303c9..6491c4430011 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -307,6 +307,10 @@ public:
 if (!pNextTextNode)
 return;
 
+SwSectionNode* pNd = pCurrentTextNode->FindSectionNode();
+if (pNd && pNd->GetSection().GetType() == SectionType::ToxContent)
+return;
+
 for (auto& rPair : m_aNumberingCombinations)
 {
 if (pCurrentTextNode->GetText().startsWith(rPair.first)


core.git: sw/source

2024-01-30 Thread Balazs Varga (via logerrit)
 sw/source/core/access/AccessibilityCheck.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 24a3f8269e427875fbe8013f88e83fc41b90b33a
Author: Balazs Varga 
AuthorDate: Mon Jan 29 22:05:28 2024 +0100
Commit: Balazs Varga 
CommitDate: Tue Jan 30 11:24:39 2024 +0100

tdf#159384 - A11y: fix simulated numbering warning in TOC

Do not complane about simulated numbering warning in TOC
if its contains a list with numbering.

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

diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index 5d98f7bd731e..d43a6919adf2 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -344,6 +344,10 @@ public:
 if (!pNextTextNode)
 return;
 
+SwSectionNode* pNd = pCurrentTextNode->FindSectionNode();
+if (pNd && pNd->GetSection().GetType() == SectionType::ToxContent)
+return;
+
 for (auto& rPair : m_aNumberingCombinations)
 {
 if (pCurrentTextNode->GetText().startsWith(rPair.first)


core.git: cui/source include/sfx2 include/svx include/vcl sfx2/sdi sfx2/source solenv/clang-format

2024-01-24 Thread Balazs Varga (via logerrit)
 cui/source/factory/dlgfact.cxx |   11 +
 cui/source/factory/dlgfact.hxx |8 ++
 cui/source/inc/securityoptions.hxx |1 
 cui/source/options/optinet2.cxx|   39 ++---
 cui/source/options/securityoptions.cxx |   31 +-
 include/sfx2/sfxdlg.hxx|2 +
 include/sfx2/sfxsids.hrc   |1 
 include/svx/svxdlg.hxx |2 +
 include/vcl/abstdlg.hxx|8 ++
 sfx2/sdi/appslots.sdi  |4 +++
 sfx2/sdi/sfx.sdi   |   17 ++
 sfx2/source/appl/appserv.cxx   |   14 +++
 sfx2/source/view/viewfrm.cxx   |3 --
 solenv/clang-format/excludelist|2 -
 14 files changed, 103 insertions(+), 40 deletions(-)

New commits:
commit 2c16ea16b305dc546164e28cf6b212ebccc44ec4
Author: Balazs Varga 
AuthorDate: Mon Jan 22 13:19:26 2024 +0100
Commit: Balazs Varga 
CommitDate: Wed Jan 24 09:06:39 2024 +0100

tdf#159128 UI: Open Security settings option directly

Open Security Option Setting page directly from Security pop up
warning infobar.

Follow up of 1f440348eb0892fd2c9597806d87b5fe9d60d49a
(tdf#157482 UI: Turn Security Warnings popup windows into infobars)

Change-Id: Iac116677801bdb13a9680bcfdf532ec3d874ce0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162393
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index b5e852cbb292..6979167de569 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -116,6 +116,7 @@ IMPL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg)
 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSignatureLineDialog, SignatureLineDialog)
 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSignSignatureLineDialog, 
SignSignatureLineDialog)
 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSvxCharacterMapDialog, SvxCharacterMap)
+IMPL_ABSTDLG_CLASS(AbstractSecurityOptionsDialog)
 IMPL_ABSTDLG_CLASS(AbstractSvxHpLinkDlg)
 IMPL_ABSTDLG_CLASS(AbstractSvxJSearchOptionsDialog)
 IMPL_ABSTDLG_CLASS(AbstractSvxMultiPathDialog)
@@ -874,6 +875,16 @@ VclPtr 
AbstractDialogFactory_Impl::CreateFrameDialog(weld::Wi
 return nullptr;
 }
 
+VclPtr 
AbstractDialogFactory_Impl::CreateSvxSecurityOptionsDialog(weld::Window* 
pParent)
+{
+return 
VclPtr::Create(std::make_unique(pParent));
+}
+
+bool AbstractSecurityOptionsDialog_Impl::SetSecurityOptions()
+{
+return m_xDlg->SetSecurityOptions();
+}
+
 // TabDialog outside the drawing layer
 VclPtr 
AbstractDialogFactory_Impl::CreateAutoCorrTabDialog(weld::Window* pParent, 
const SfxItemSet* pAttrSet)
 {
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 0125c975ae79..3c8601140164 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -49,6 +49,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -402,6 +403,11 @@ 
DECL_ABSTDLG_CLASS_SHARED_ASYNC(AbstractSvxCharacterMapDialog,SfxAbstractDialog,
 DECL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg,ScreenshotAnnotationDlg)
 };
 
+// AbstractSecurityOptionsDialog_Impl
+DECL_ABSTDLG_CLASS(AbstractSecurityOptionsDialog, svx::SecurityOptionsDialog)
+virtual bool SetSecurityOptions() override;
+};
+
 // AbstractSignatureLineDialog_Impl
 DECL_ABSTDLG_CLASS_ASYNC(AbstractSignatureLineDialog,SignatureLineDialog)
 virtual void Apply() override { m_xDlg->Apply(); }
@@ -594,6 +600,8 @@ public:
 
 virtual VclPtr 
CreateScreenshotAnnotationDlg(weld::Dialog& rParentDialog) override;
 
+virtual VclPtr 
CreateSvxSecurityOptionsDialog(weld::Window* pParent) override;
+
 virtual VclPtr
 CreateSignatureLineDialog(weld::Window* pParent,
   const css::uno::Reference 
xModel, bool bEditExisting) override;
diff --git a/cui/source/options/securityoptions.hxx 
b/cui/source/inc/securityoptions.hxx
similarity index 99%
rename from cui/source/options/securityoptions.hxx
rename to cui/source/inc/securityoptions.hxx
index 10534d4426a7..981c9ac29bf8 100644
--- a/cui/source/options/securityoptions.hxx
+++ b/cui/source/inc/securityoptions.hxx
@@ -75,6 +75,7 @@ namespace svx
 
 DECL_LINK(ShowPersonalInfosToggle, weld::Toggleable&, void);
 
+bool SetSecurityOptions();
 void changeKeepSecurityInfosEnabled();
 };
 }
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index de34b031e8ce..eaf0e8616bfd 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -52,7 +51,7 @@
 #include 
 #include 
 #include 
-#include "securityoptions.hxx"
+#include 
 #include "webconninfo.hxx"
 #include "certpath.hxx"
 #include "tsaurls.hxx"
@@ -834,25 +833,6 @@ DeactivateRC SvxSecurityTabPage::DeactivatePage( 
SfxItemSet* 

core.git: Branch 'libreoffice-24-2' - sd/source

2024-01-11 Thread Balazs Varga (via logerrit)
 sd/source/core/drawdoc3.cxx |   64 +++-
 1 file changed, 46 insertions(+), 18 deletions(-)

New commits:
commit 7f66797b10b91242c7025215156922bb17c5a777
Author: Balazs Varga 
AuthorDate: Fri Dec 29 12:01:10 2023 +0100
Commit: Michael Stahl 
CommitDate: Thu Jan 11 13:00:06 2024 +0100

tdf#157742 tdf#157783 - sd: fix copy master slides style

Copy SlideLayout property and themes from the old slide to
the new one.

Change-Id: I7310200c731839a606981c6d63c8d0d4f9ec0536
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161401
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
(cherry picked from commit 167659bf16a68c27fa547e6eccd62c1a6f69b057)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161420
Reviewed-by: Michael Stahl 

diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 5062630edb88..5310789d2988 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -67,11 +67,11 @@ namespace {
 class InsertBookmarkAsPage_FindDuplicateLayouts
 {
 public:
-explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::map  )
+explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::vector 
 )
 : mrLayoutsToTransfer(rLayoutsToTransfer) {}
 void operator()( SdDrawDocument&, SdPage const *, bool, SdDrawDocument* );
 private:
-std::map 
+std::vector 
 };
 
 }
@@ -85,11 +85,11 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( 
SdDrawDocument& rDoc
 if( nIndex != -1 )
 aLayout = aLayout.copy(0, nIndex);
 
-std::map::const_iterator pIter = 
mrLayoutsToTransfer.find(aLayout);
+std::vector::const_iterator pIter =
+find(mrLayoutsToTransfer.begin(), mrLayoutsToTransfer.end(), aLayout);
 
 bool bFound = pIter != mrLayoutsToTransfer.end();
 
-sal_Int32 nLayout = 20; // blank page - master slide layout ID
 const sal_uInt16 nMPageCount = rDoc.GetMasterPageCount();
 for (sal_uInt16 nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++)
 {
@@ -110,15 +110,6 @@ void 
InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
 pBMMPage->GetLayoutName(), pBMMPage->GetName() + "_");
 aLayout = pBMMPage->GetName();
 
-uno::Reference< drawing::XDrawPage > 
xOldPage(rDoc.GetMasterPage(nMPage)->getUnoPage(), uno::UNO_QUERY_THROW);
-uno::Reference xPropSet(xOldPage, 
uno::UNO_QUERY_THROW);
-if (xPropSet.is())
-{
-uno::Any aLayoutID = 
xPropSet->getPropertyValue("SlideLayout");
-if (aLayoutID.hasValue()) {
-aLayoutID >>= nLayout;
-}
-}
 break;
 }
 else
@@ -127,7 +118,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( 
SdDrawDocument& rDoc
 }
 
 if (!bFound)
-mrLayoutsToTransfer.insert({ aLayout, nLayout });
+mrLayoutsToTransfer.push_back(aLayout);
 }
 
 // Inserts a bookmark as a page
@@ -508,7 +499,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 
 // Refactored copy'n'pasted layout name collection into 
IterateBookmarkPages
 
-std::map aLayoutsToTransfer;
+std::vector aLayoutsToTransfer;
 InsertBookmarkAsPage_FindDuplicateLayouts aSearchFunctor( 
aLayoutsToTransfer );
 lcl_IterateBookmarkPages( *this, pBookmarkDoc, rBookmarkList, 
nBMSdPageCount, aSearchFunctor, ( rBookmarkList.empty() && pBookmarkDoc != this 
) );
 
@@ -520,11 +511,14 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 if( !aLayoutsToTransfer.empty() )
 bMergeMasterPages = true;
 
-for ( const auto& layout : aLayoutsToTransfer )
+std::map aSlideLayoutsToTransfer;
+std::map> aThemesToTransfer;
+
+for ( const OUString& layoutName : aLayoutsToTransfer )
 {
 StyleSheetCopyResultVector aCreatedStyles;
 
-rStyleSheetPool.CopyLayoutSheets(layout.first, 
rBookmarkStyleSheetPool, aCreatedStyles);
+rStyleSheetPool.CopyLayoutSheets(layoutName, rBookmarkStyleSheetPool, 
aCreatedStyles);
 
 if(!aCreatedStyles.empty())
 {
@@ -533,6 +527,29 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 
pUndoMgr->AddUndoAction(std::make_unique(this, 
aCreatedStyles, true));
 }
 }
+
+// copy SlideLayout and Theme of the master slide
+sal_Int32 nLayout = 20; // blank page - master slide layout ID
+bool bIsMasterPage = false;
+sal_uInt16 nBMPage = pBookmarkDoc->GetPageByName(layoutName, 
bIsMasterPage);
+if (bIsMasterPage)
+{
+uno::Reference< drawing::XDrawPage > 
xOldPage(pBookmarkDoc->GetMasterPage(nBMPage)->getUnoPage(), 
uno::UNO_QUERY_THROW);
+SdrPage* pMasterPage = SdPage::getImplementation(xOldPage);
+if (pMasterPage)
+{
+aThemesToTransfer.insert({ 

core.git: Branch 'distro/allotropia/zeta-7-4' - desktop/Library_sofficeapp.mk lingucomponent/Module_lingucomponent.mk

2024-01-05 Thread Balazs Varga (via logerrit)
 desktop/Library_sofficeapp.mk   |3 ++-
 lingucomponent/Module_lingucomponent.mk |8 +++-
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 93741a53562a78ca626e9c1fce15004c07d901e3
Author: Balazs Varga 
AuthorDate: Thu Jan 4 10:13:47 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Jan 5 09:22:59 2024 +0100

Fix Fix --disable-curl build for wasm

cherry-picked (partly) from: 5bf7c2fa57946cc3323a1d4ee1b2f31d805ae06f
(Fix --disable-curl build)

Change-Id: Ie0429b086d9b89d4a0c3b7b86afba08c3e831c2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161609
Tested-by: Balazs Varga 
Reviewed-by: Balazs Varga 

diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 70f4b07ea045..f27372cbddc6 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -24,9 +24,10 @@ $(eval $(call gb_Library_use_externals,sofficeapp, \
 icu_headers \
 icui18n \
 icuuc \
+$(if $(ENABLE_CURL), \
 $(if $(filter-out EMSCRIPTEN iOS,$(OS)), \
 curl \
-)\
+))\
 $(if $(ENABLE_ONLINE_UPDATE_MAR),\
 orcus-parser \
 orcus )\
diff --git a/lingucomponent/Module_lingucomponent.mk 
b/lingucomponent/Module_lingucomponent.mk
index 13f1a829d98a..8cbd2ab19fa9 100644
--- a/lingucomponent/Module_lingucomponent.mk
+++ b/lingucomponent/Module_lingucomponent.mk
@@ -25,10 +25,16 @@ $(eval $(call gb_Module_add_targets,lingucomponent,\
 ))
 endif
 
+ifeq ($(ENABLE_CURL),TRUE)
 $(eval $(call gb_Module_add_targets,lingucomponent,\
$(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \
-   Library_numbertext \
Library_LanguageTool \
 ))
+endif
+
+$(eval $(call gb_Module_add_targets,lingucomponent,\
+   $(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \
+   Library_numbertext \
+))
 
 # vim: set noet sw=4 ts=4:


core.git: Branch 'distro/collabora/co-23.05' - sd/source

2024-01-02 Thread Balazs Varga (via logerrit)
 sd/source/core/drawdoc3.cxx |   64 +++-
 1 file changed, 46 insertions(+), 18 deletions(-)

New commits:
commit 24d86ae7ffd8942098c0cbee4a8b45c0d205548a
Author: Balazs Varga 
AuthorDate: Fri Dec 29 12:01:10 2023 +0100
Commit: Tomaž Vajngerl 
CommitDate: Tue Jan 2 09:58:29 2024 +0100

tdf#157742 tdf#157783 - sd: fix copy master slides style

Copy SlideLayout property and themes from the old slide to
the new one.

Change-Id: I7310200c731839a606981c6d63c8d0d4f9ec0536
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161401
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
(cherry picked from commit 167659bf16a68c27fa547e6eccd62c1a6f69b057)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161532
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 

diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 410141980d1d..5311721bc59f 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -67,11 +67,11 @@ namespace {
 class InsertBookmarkAsPage_FindDuplicateLayouts
 {
 public:
-explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::map  )
+explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::vector 
 )
 : mrLayoutsToTransfer(rLayoutsToTransfer) {}
 void operator()( SdDrawDocument&, SdPage const *, bool, SdDrawDocument* );
 private:
-std::map 
+std::vector 
 };
 
 }
@@ -85,11 +85,11 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( 
SdDrawDocument& rDoc
 if( nIndex != -1 )
 aLayout = aLayout.copy(0, nIndex);
 
-std::map::const_iterator pIter = 
mrLayoutsToTransfer.find(aLayout);
+std::vector::const_iterator pIter =
+find(mrLayoutsToTransfer.begin(), mrLayoutsToTransfer.end(), aLayout);
 
 bool bFound = pIter != mrLayoutsToTransfer.end();
 
-sal_Int32 nLayout = 20; // blank page - master slide layout ID
 const sal_uInt16 nMPageCount = rDoc.GetMasterPageCount();
 for (sal_uInt16 nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++)
 {
@@ -110,15 +110,6 @@ void 
InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
 pBMMPage->GetLayoutName(), pBMMPage->GetName() + "_");
 aLayout = pBMMPage->GetName();
 
-uno::Reference< drawing::XDrawPage > 
xOldPage(rDoc.GetMasterPage(nMPage)->getUnoPage(), uno::UNO_QUERY_THROW);
-uno::Reference xPropSet(xOldPage, 
uno::UNO_QUERY_THROW);
-if (xPropSet.is())
-{
-uno::Any aLayoutID = 
xPropSet->getPropertyValue("SlideLayout");
-if (aLayoutID.hasValue()) {
-aLayoutID >>= nLayout;
-}
-}
 break;
 }
 else
@@ -127,7 +118,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( 
SdDrawDocument& rDoc
 }
 
 if (!bFound)
-mrLayoutsToTransfer.insert({ aLayout, nLayout });
+mrLayoutsToTransfer.push_back(aLayout);
 }
 
 // Inserts a bookmark as a page
@@ -508,7 +499,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 
 // Refactored copy'n'pasted layout name collection into 
IterateBookmarkPages
 
-std::map aLayoutsToTransfer;
+std::vector aLayoutsToTransfer;
 InsertBookmarkAsPage_FindDuplicateLayouts aSearchFunctor( 
aLayoutsToTransfer );
 lcl_IterateBookmarkPages( *this, pBookmarkDoc, rBookmarkList, 
nBMSdPageCount, aSearchFunctor, ( rBookmarkList.empty() && pBookmarkDoc != this 
) );
 
@@ -520,11 +511,14 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 if( !aLayoutsToTransfer.empty() )
 bMergeMasterPages = true;
 
-for ( const auto& layout : aLayoutsToTransfer )
+std::map aSlideLayoutsToTransfer;
+std::map> aThemesToTransfer;
+
+for ( const OUString& layoutName : aLayoutsToTransfer )
 {
 StyleSheetCopyResultVector aCreatedStyles;
 
-rStyleSheetPool.CopyLayoutSheets(layout.first, 
rBookmarkStyleSheetPool, aCreatedStyles);
+rStyleSheetPool.CopyLayoutSheets(layoutName, rBookmarkStyleSheetPool, 
aCreatedStyles);
 
 if(!aCreatedStyles.empty())
 {
@@ -533,6 +527,29 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 
pUndoMgr->AddUndoAction(std::make_unique(this, 
aCreatedStyles, true));
 }
 }
+
+// copy SlideLayout and Theme of the master slide
+sal_Int32 nLayout = 20; // blank page - master slide layout ID
+bool bIsMasterPage = false;
+sal_uInt16 nBMPage = pBookmarkDoc->GetPageByName(layoutName, 
bIsMasterPage);
+if (bIsMasterPage)
+{
+uno::Reference< drawing::XDrawPage > 
xOldPage(pBookmarkDoc->GetMasterPage(nBMPage)->getUnoPage(), 
uno::UNO_QUERY_THROW);
+SdrPage* pMasterPage = SdPage::getImplementation(xOldPage);
+if (pMasterPage)
+{
+

core.git: sd/source

2024-01-01 Thread Balazs Varga (via logerrit)
 sd/source/core/drawdoc3.cxx |   64 +++-
 1 file changed, 46 insertions(+), 18 deletions(-)

New commits:
commit 167659bf16a68c27fa547e6eccd62c1a6f69b057
Author: Balazs Varga 
AuthorDate: Fri Dec 29 12:01:10 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Jan 1 19:11:39 2024 +0100

tdf#157742 tdf#157783 - sd: fix copy master slides style

Copy SlideLayout property and themes from the old slide to
the new one.

Change-Id: I7310200c731839a606981c6d63c8d0d4f9ec0536
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161401
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 5062630edb88..5310789d2988 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -67,11 +67,11 @@ namespace {
 class InsertBookmarkAsPage_FindDuplicateLayouts
 {
 public:
-explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::map  )
+explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::vector 
 )
 : mrLayoutsToTransfer(rLayoutsToTransfer) {}
 void operator()( SdDrawDocument&, SdPage const *, bool, SdDrawDocument* );
 private:
-std::map 
+std::vector 
 };
 
 }
@@ -85,11 +85,11 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( 
SdDrawDocument& rDoc
 if( nIndex != -1 )
 aLayout = aLayout.copy(0, nIndex);
 
-std::map::const_iterator pIter = 
mrLayoutsToTransfer.find(aLayout);
+std::vector::const_iterator pIter =
+find(mrLayoutsToTransfer.begin(), mrLayoutsToTransfer.end(), aLayout);
 
 bool bFound = pIter != mrLayoutsToTransfer.end();
 
-sal_Int32 nLayout = 20; // blank page - master slide layout ID
 const sal_uInt16 nMPageCount = rDoc.GetMasterPageCount();
 for (sal_uInt16 nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++)
 {
@@ -110,15 +110,6 @@ void 
InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
 pBMMPage->GetLayoutName(), pBMMPage->GetName() + "_");
 aLayout = pBMMPage->GetName();
 
-uno::Reference< drawing::XDrawPage > 
xOldPage(rDoc.GetMasterPage(nMPage)->getUnoPage(), uno::UNO_QUERY_THROW);
-uno::Reference xPropSet(xOldPage, 
uno::UNO_QUERY_THROW);
-if (xPropSet.is())
-{
-uno::Any aLayoutID = 
xPropSet->getPropertyValue("SlideLayout");
-if (aLayoutID.hasValue()) {
-aLayoutID >>= nLayout;
-}
-}
 break;
 }
 else
@@ -127,7 +118,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( 
SdDrawDocument& rDoc
 }
 
 if (!bFound)
-mrLayoutsToTransfer.insert({ aLayout, nLayout });
+mrLayoutsToTransfer.push_back(aLayout);
 }
 
 // Inserts a bookmark as a page
@@ -508,7 +499,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 
 // Refactored copy'n'pasted layout name collection into 
IterateBookmarkPages
 
-std::map aLayoutsToTransfer;
+std::vector aLayoutsToTransfer;
 InsertBookmarkAsPage_FindDuplicateLayouts aSearchFunctor( 
aLayoutsToTransfer );
 lcl_IterateBookmarkPages( *this, pBookmarkDoc, rBookmarkList, 
nBMSdPageCount, aSearchFunctor, ( rBookmarkList.empty() && pBookmarkDoc != this 
) );
 
@@ -520,11 +511,14 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 if( !aLayoutsToTransfer.empty() )
 bMergeMasterPages = true;
 
-for ( const auto& layout : aLayoutsToTransfer )
+std::map aSlideLayoutsToTransfer;
+std::map> aThemesToTransfer;
+
+for ( const OUString& layoutName : aLayoutsToTransfer )
 {
 StyleSheetCopyResultVector aCreatedStyles;
 
-rStyleSheetPool.CopyLayoutSheets(layout.first, 
rBookmarkStyleSheetPool, aCreatedStyles);
+rStyleSheetPool.CopyLayoutSheets(layoutName, rBookmarkStyleSheetPool, 
aCreatedStyles);
 
 if(!aCreatedStyles.empty())
 {
@@ -533,6 +527,29 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 
pUndoMgr->AddUndoAction(std::make_unique(this, 
aCreatedStyles, true));
 }
 }
+
+// copy SlideLayout and Theme of the master slide
+sal_Int32 nLayout = 20; // blank page - master slide layout ID
+bool bIsMasterPage = false;
+sal_uInt16 nBMPage = pBookmarkDoc->GetPageByName(layoutName, 
bIsMasterPage);
+if (bIsMasterPage)
+{
+uno::Reference< drawing::XDrawPage > 
xOldPage(pBookmarkDoc->GetMasterPage(nBMPage)->getUnoPage(), 
uno::UNO_QUERY_THROW);
+SdrPage* pMasterPage = SdPage::getImplementation(xOldPage);
+if (pMasterPage)
+{
+aThemesToTransfer.insert({ layoutName, 
pMasterPage->getSdrPageProperties().getTheme() });
+uno::Reference xPropSet(xOldPage, 
uno::UNO_QUERY_THROW);
+if (xPropSet.is())
+ 

core.git: Branch 'libreoffice-24-2' - sd/source

2023-12-26 Thread Balazs Varga (via logerrit)
 sd/source/filter/eppt/epptbase.hxx   |3 ++-
 sd/source/filter/eppt/epptooxml.hxx  |2 +-
 sd/source/filter/eppt/pptx-epptooxml.cxx |2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 2a0faeebbafd972d67b48046aa912c8c5090218f
Author: Balazs Varga 
AuthorDate: Fri Dec 22 13:55:42 2023 +0100
Commit: Xisco Fauli 
CommitDate: Tue Dec 26 09:31:40 2023 +0100

cid#1559857 Illegal address computation

Follow up of commit: bff76421e234df7246a7f49c71a11432f86e09d1

Change-Id: I1abfcea1c7ca8e55f8a4b19b66d80b901f575bcf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161179
Tested-by: Jenkins
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit c5cc7af60d4b93d4247fd88f941a323f4a56dfcd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161221
Reviewed-by: Xisco Fauli 

diff --git a/sd/source/filter/eppt/epptbase.hxx 
b/sd/source/filter/eppt/epptbase.hxx
index 64709fa14f39..70bcd3a4b6ce 100644
--- a/sd/source/filter/eppt/epptbase.hxx
+++ b/sd/source/filter/eppt/epptbase.hxx
@@ -73,7 +73,8 @@ enum class EppLayout
 TITLERIGHT2BODIESLEFT = 18  /* Vertical title on the right, body on the 
left split into 2 rows*/
 };
 
-#define EPP_LAYOUT_SIZE 36
+#define EPP_LAYOUT_SIZE 25
+#define OOXML_LAYOUT_SIZE 36
 
 struct PHLayout
 {
diff --git a/sd/source/filter/eppt/epptooxml.hxx 
b/sd/source/filter/eppt/epptooxml.hxx
index 2d67ebce2c77..d9d65a2e8300 100644
--- a/sd/source/filter/eppt/epptooxml.hxx
+++ b/sd/source/filter/eppt/epptooxml.hxx
@@ -139,7 +139,7 @@ private:
 
 ::sax_fastparser::FSHelperPtr mPresentationFS;
 
-LayoutInfo mLayoutInfo[EPP_LAYOUT_SIZE];
+LayoutInfo mLayoutInfo[OOXML_LAYOUT_SIZE];
 std::vector< ::sax_fastparser::FSHelperPtr > mpSlidesFSArray;
 sal_Int32 mnLayoutFileIdMax;
 
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 41ef744c1799..2148653dcd20 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -196,7 +196,7 @@ struct PPTXLayoutInfo
 
 }
 
-const PPTXLayoutInfo aLayoutInfo[EPP_LAYOUT_SIZE] =
+const PPTXLayoutInfo aLayoutInfo[OOXML_LAYOUT_SIZE] =
 {
 { 0, "Title Slide", "title" },
 { 1, "Title and text", "tx" },


core.git: Branch 'libreoffice-7-6' - 3 commits - sd/source svtools/source sw/source

2023-12-26 Thread Balazs Varga (via logerrit)
 sd/source/filter/eppt/epptbase.hxx   |3 ++-
 sd/source/filter/eppt/epptooxml.hxx  |2 +-
 sd/source/filter/eppt/pptx-epptooxml.cxx |2 +-
 svtools/source/control/tabbar.cxx|   11 ---
 sw/source/core/access/AccessibilityCheck.cxx |   20 +---
 5 files changed, 21 insertions(+), 17 deletions(-)

New commits:
commit 255a0032d399ae13e0f166942c03721caa1e0d74
Author: Balazs Varga 
AuthorDate: Fri Dec 22 13:55:42 2023 +0100
Commit: Xisco Fauli 
CommitDate: Tue Dec 26 09:31:34 2023 +0100

cid#1559857 Illegal address computation

Follow up of commit: bff76421e234df7246a7f49c71a11432f86e09d1

Change-Id: I1abfcea1c7ca8e55f8a4b19b66d80b901f575bcf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161179
Tested-by: Jenkins
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit c5cc7af60d4b93d4247fd88f941a323f4a56dfcd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161222
Reviewed-by: Xisco Fauli 

diff --git a/sd/source/filter/eppt/epptbase.hxx 
b/sd/source/filter/eppt/epptbase.hxx
index 64709fa14f39..70bcd3a4b6ce 100644
--- a/sd/source/filter/eppt/epptbase.hxx
+++ b/sd/source/filter/eppt/epptbase.hxx
@@ -73,7 +73,8 @@ enum class EppLayout
 TITLERIGHT2BODIESLEFT = 18  /* Vertical title on the right, body on the 
left split into 2 rows*/
 };
 
-#define EPP_LAYOUT_SIZE 36
+#define EPP_LAYOUT_SIZE 25
+#define OOXML_LAYOUT_SIZE 36
 
 struct PHLayout
 {
diff --git a/sd/source/filter/eppt/epptooxml.hxx 
b/sd/source/filter/eppt/epptooxml.hxx
index 2d67ebce2c77..d9d65a2e8300 100644
--- a/sd/source/filter/eppt/epptooxml.hxx
+++ b/sd/source/filter/eppt/epptooxml.hxx
@@ -139,7 +139,7 @@ private:
 
 ::sax_fastparser::FSHelperPtr mPresentationFS;
 
-LayoutInfo mLayoutInfo[EPP_LAYOUT_SIZE];
+LayoutInfo mLayoutInfo[OOXML_LAYOUT_SIZE];
 std::vector< ::sax_fastparser::FSHelperPtr > mpSlidesFSArray;
 sal_Int32 mnLayoutFileIdMax;
 
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 5986ed958380..0967b6a3b34e 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -196,7 +196,7 @@ struct PPTXLayoutInfo
 
 }
 
-const PPTXLayoutInfo aLayoutInfo[EPP_LAYOUT_SIZE] =
+const PPTXLayoutInfo aLayoutInfo[OOXML_LAYOUT_SIZE] =
 {
 { 0, "Title Slide", "title" },
 { 1, "Title and text", "tx" },
commit 7c10c49309acb2f183ef726283e36044d8f68766
Author: Andreas Heinisch 
AuthorDate: Thu Dec 21 20:33:20 2023 +0100
Commit: Xisco Fauli 
CommitDate: Tue Dec 26 09:31:30 2023 +0100

Revert "tdf#100584 - Arrange sheets in the tab bar depending on the RTL 
settings"

This reverts commit be86c8f2432623fdb8ed4f22ca08c35121fd8bec.

Reason for revert: To many regressions.

Change-Id: Id3fb8dc5d4edb84c0008b7834a80887aaa7d9f83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161154
Tested-by: Andreas Heinisch 
Reviewed-by: Andreas Heinisch 
(cherry picked from commit 3430a2c639a9f714259f9d319515464a653d21ab)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161159
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit b3e86695022f8db57344f4115ee360072d671838)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161212

diff --git a/svtools/source/control/tabbar.cxx 
b/svtools/source/control/tabbar.cxx
index 1690269ba234..f9faa2bbe0dc 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -710,15 +710,10 @@ void TabBar::ImplFormat()
 if (!mbFormat)
 return;
 
+sal_uInt16 nItemIndex = 0;
 tools::Long x = mnOffX;
-
-const size_t nItemListSize = mpImpl->maItemList.size();
-for (size_t nItemIndex = 0; nItemIndex < nItemListSize; nItemIndex++)
+for (auto & rItem : mpImpl->maItemList)
 {
-// tdf#100584 - arrange sheets depending on the RTL settings
-auto& rItem = mbMirrored ? mpImpl->maItemList[nItemListSize - 
nItemIndex - 1]
- : mpImpl->maItemList[nItemIndex];
-
 // At all non-visible tabs an empty rectangle is set
 if ((nItemIndex + 1 < mnFirstPos) || (x > mnLastOffX))
 rItem.maRect.SetEmpty();
@@ -746,6 +741,8 @@ void TabBar::ImplFormat()
 rItem.maRect.SetLeft(nNewLeft);
 }
 }
+
+nItemIndex++;
 }
 
 mbFormat = false;
commit f118426560d913f5180aab2a8ef6424e8825a778
Author: Xisco Fauli 
AuthorDate: Fri Dec 22 10:38:52 2023 +0100
Commit: Xisco Fauli 
CommitDate: Tue Dec 26 09:31:25 2023 +0100

sw: fix another null deref in a11y check

similar to

author  Caolán McNamara  2023-12-21 16:47:18 
+
committer   Caolán McNamara  2023-12-21 
21:15:03 +0100
commit  ba712e9a35179c480cdc6f9d600d79040a273d53 (patch)
tree

core.git: sd/source

2023-12-22 Thread Balazs Varga (via logerrit)
 sd/source/filter/eppt/epptbase.hxx   |3 ++-
 sd/source/filter/eppt/epptooxml.hxx  |2 +-
 sd/source/filter/eppt/pptx-epptooxml.cxx |2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit c5cc7af60d4b93d4247fd88f941a323f4a56dfcd
Author: Balazs Varga 
AuthorDate: Fri Dec 22 13:55:42 2023 +0100
Commit: Caolán McNamara 
CommitDate: Fri Dec 22 20:30:51 2023 +0100

cid#1559857 Illegal address computation

Follow up of commit: bff76421e234df7246a7f49c71a11432f86e09d1

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

diff --git a/sd/source/filter/eppt/epptbase.hxx 
b/sd/source/filter/eppt/epptbase.hxx
index 64709fa14f39..70bcd3a4b6ce 100644
--- a/sd/source/filter/eppt/epptbase.hxx
+++ b/sd/source/filter/eppt/epptbase.hxx
@@ -73,7 +73,8 @@ enum class EppLayout
 TITLERIGHT2BODIESLEFT = 18  /* Vertical title on the right, body on the 
left split into 2 rows*/
 };
 
-#define EPP_LAYOUT_SIZE 36
+#define EPP_LAYOUT_SIZE 25
+#define OOXML_LAYOUT_SIZE 36
 
 struct PHLayout
 {
diff --git a/sd/source/filter/eppt/epptooxml.hxx 
b/sd/source/filter/eppt/epptooxml.hxx
index 2d67ebce2c77..d9d65a2e8300 100644
--- a/sd/source/filter/eppt/epptooxml.hxx
+++ b/sd/source/filter/eppt/epptooxml.hxx
@@ -139,7 +139,7 @@ private:
 
 ::sax_fastparser::FSHelperPtr mPresentationFS;
 
-LayoutInfo mLayoutInfo[EPP_LAYOUT_SIZE];
+LayoutInfo mLayoutInfo[OOXML_LAYOUT_SIZE];
 std::vector< ::sax_fastparser::FSHelperPtr > mpSlidesFSArray;
 sal_Int32 mnLayoutFileIdMax;
 
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 41ef744c1799..2148653dcd20 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -196,7 +196,7 @@ struct PPTXLayoutInfo
 
 }
 
-const PPTXLayoutInfo aLayoutInfo[EPP_LAYOUT_SIZE] =
+const PPTXLayoutInfo aLayoutInfo[OOXML_LAYOUT_SIZE] =
 {
 { 0, "Title Slide", "title" },
 { 1, "Title and text", "tx" },


core.git: cui/source cui/uiconfig

2023-12-20 Thread Balazs Varga (via logerrit)
 cui/source/options/optcolor.cxx  |  205 +++
 cui/source/options/optcolor.hxx  |2 
 cui/uiconfig/ui/optappearancepage.ui |   62 +++---
 3 files changed, 183 insertions(+), 86 deletions(-)

New commits:
commit 0cd74b5be297f638d455b9b267462192f2e6620c
Author: Balazs Varga 
AuthorDate: Tue Dec 19 20:54:39 2023 +0100
Commit: Balazs Varga 
CommitDate: Thu Dec 21 00:22:27 2023 +0100

tdf#158759 - UI: Part 56 - Unify lockdown behavior of Options dialog

for General - Application Colors Page.

Change-Id: I2fb6c73cef82c12c3c8f3c49fb0e4b62703a1de3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161030
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index c8841205f3b4..f1e1b8a26b18 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -21,6 +21,8 @@
 
 #include 
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -36,6 +38,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 using namespace ::com::sun::star;
 using namespace ::svtools;
 
@@ -87,6 +91,8 @@ struct
 OUString pColor;
 // has checkbox?
 bool bCheckBox;
+//prop name
+std::u16string_view sPropName;
 }
 const vEntryInfo[] =
 {
@@ -98,67 +104,67 @@ const vEntryInfo[] =
 
 // The list of these entries (enum ColorConfigEntry) are in colorcfg.hxx.
 
-{ Group_General, IDS(doccolor) },
-{ Group_General, IDS_CB(docboundaries) },
-{ Group_General, IDS(appback) },
-{ Group_General, IDS_CB(objboundaries) },
-{ Group_General, IDS_CB(tblboundaries) },
-{ Group_General, IDS(font) },
-{ Group_General, IDS_CB(unvisitedlinks) },
-{ Group_General, IDS_CB(visitedlinks) },
-{ Group_General, IDS(autospellcheck) },
-{ Group_General, IDS(grammarcheck) },
-{ Group_General, IDS(smarttags) },
-{ Group_General, IDS_CB(shadows) },
-
-{ Group_Writer,  IDS(writergrid) },
-{ Group_Writer,  IDS_CB(field) },
-{ Group_Writer,  IDS_CB(index) },
-{ Group_Writer,  IDS(direct) },
-{ Group_Writer,  IDS(script) },
-{ Group_Writer,  IDS_CB(section) },
-{ Group_Writer,  IDS(hdft) },
-{ Group_Writer,  IDS(pagebreak) },
-
-{ Group_Html,IDS(sgml) },
-{ Group_Html,IDS(htmlcomment) },
-{ Group_Html,IDS(htmlkeyword) },
-{ Group_Html,IDS(unknown) },
-
-{ Group_Calc,IDS(calcgrid) },
-{ Group_Calc,IDS(brk) },
-{ Group_Calc,IDS(brkmanual) },
-{ Group_Calc,IDS(brkauto) },
-{ Group_Calc,IDS_CB(hiddencolrow) },
-{ Group_Calc,IDS_CB(textoverflow) },
-{ Group_Calc,IDS(comments) },
-{ Group_Calc,IDS(det) },
-{ Group_Calc,IDS(deterror) },
-{ Group_Calc,IDS(ref) },
-{ Group_Calc,IDS(notes) },
-{ Group_Calc,IDS(values) },
-{ Group_Calc,IDS(formulas) },
-{ Group_Calc,IDS(text) },
-{ Group_Calc,IDS(protectedcells) },
-
-{ Group_Draw,IDS(drawgrid) },
-
-{ Group_Basic,   IDS(basiceditor) },
-{ Group_Basic,   IDS(basicid) },
-{ Group_Basic,   IDS(basiccomment) },
-{ Group_Basic,   IDS(basicnumber) },
-{ Group_Basic,   IDS(basicstring) },
-{ Group_Basic,   IDS(basicop) },
-{ Group_Basic,   IDS(basickeyword) },
-{ Group_Basic,   IDS(error) },
-
-{ Group_Sql, IDS(sqlid) },
-{ Group_Sql, IDS(sqlnumber) },
-{ Group_Sql, IDS(sqlstring) },
-{ Group_Sql, IDS(sqlop) },
-{ Group_Sql, IDS(sqlkeyword) },
-{ Group_Sql, IDS(sqlparam) },
-{ Group_Sql, IDS(sqlcomment) }
+{ Group_General, IDS(doccolor), std::u16string_view(u"/DocColor") },
+{ Group_General, IDS_CB(docboundaries), 
std::u16string_view(u"/DocBoundaries") },
+{ Group_General, IDS(appback), std::u16string_view(u"/AppBackground") },
+{ Group_General, IDS_CB(objboundaries), 
std::u16string_view(u"/ObjectBoundaries") },
+{ Group_General, IDS_CB(tblboundaries), 
std::u16string_view(u"/TableBoundaries") },
+{ Group_General, IDS(font), std::u16string_view(u"/FontColor") },
+{ Group_General, IDS_CB(unvisitedlinks), std::u16string_view(u"/Links") },
+{ Group_General, IDS_CB(visitedlinks), 
std::u16string_view(u"/LinksVisited") },
+{ Group_General, IDS(autospellcheck), std::u16string_view(u"/Spell") },
+{ Group_General, IDS(grammarcheck), std::u16string_view(u"/Grammar") },
+{ Group_General, IDS(smarttags), std::u16string_view(u"/SmartTags") },
+{ Group_General, IDS_CB(shadows), std::u16string_view(u"/Shadow") },
+
+{ Group_Writer,  IDS(writergrid), std::u16string_view(u"/WriterTextGrid") 
},
+{ Group_Writer,  IDS_CB(field), 
std::u16string_view(u"/WriterFieldShadings") },
+{ Group_Writer,  IDS_CB(index), std::u16string_view(u"/WriterIdxShadings") 
},
+{ Group_Writer,  IDS(direct), std::u16string_view(u"/WriterDirectCursor") 
},
+{ Group_Writer,  

core.git: Branch 'distro/collabora/co-23.05' - oox/source sd/qa sd/source xmloff/source

2023-12-19 Thread Balazs Varga (via logerrit)
 oox/source/ppt/presentationfragmenthandler.cxx |7 -
 oox/source/ppt/slidepersist.cxx|6 
 sd/qa/unit/data/pptx/tdf157740.pptx|binary
 sd/qa/unit/export-tests-ooxml1.cxx |   16 +-
 sd/qa/unit/export-tests-ooxml2.cxx |   12 -
 sd/source/core/drawdoc3.cxx|   38 -
 sd/source/filter/eppt/epptbase.hxx |2 
 sd/source/filter/eppt/epptooxml.hxx|2 
 sd/source/filter/eppt/pptx-epptooxml.cxx   |  160 ++---
 sd/source/ui/inc/unopage.hxx   |1 
 sd/source/ui/unoidl/unopage.cxx|   13 +-
 xmloff/source/draw/ximpbody.cxx|   19 ++
 12 files changed, 149 insertions(+), 127 deletions(-)

New commits:
commit 397da200a5250bc23df7692354ccb4910783f61e
Author: Balazs Varga 
AuthorDate: Sun Dec 3 23:41:01 2023 +0100
Commit: Henry Castro 
CommitDate: Tue Dec 19 22:47:04 2023 +0100

tdf#157740 FILESAVE PPTX: fix explosion of the number of master slides

- Export correctly the "supported" master slides with the actual slides 
names.
- Set SlideLayout property at ODF import as well for MasterSlides layout 
type.
- When we copy a slide with the master slide also copy the SlideLayout 
property
value as well.

Change-Id: Idb6b88ebe87a83818d8eb27a1fa087652a002c0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160290
Tested-by: Jenkins
Reviewed-by: Henry Castro 
Reviewed-by: Balazs Varga 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160985
Tested-by: Jenkins CollaboraOffice 

diff --git a/oox/source/ppt/presentationfragmenthandler.cxx 
b/oox/source/ppt/presentationfragmenthandler.cxx
index 1586a8a26174..91824210e239 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -212,11 +212,11 @@ void PresentationFragmentHandler::importMasterSlide(const 
ReferencegetFragmentPathFromRelation(rEntry.second);
-
 if (!rEntry.second.maType.endsWith("relationships/slideLayout"))
 continue;
 
+aLayoutFragmentPath = 
xMasterRelations->getFragmentPathFromRelation(rEntry.second);
+
 sal_Int32 nIndex;
 if( rFilter.getMasterPages().empty() )
 {
@@ -271,6 +271,9 @@ void PresentationFragmentHandler::importMasterSlide(const 
ReferencecreateBackground( rFilter );
 pMasterPersistPtr->createXShapes( rFilter );
 
+uno::Reference< beans::XPropertySet > 
xSet(pMasterPersistPtr->getPage(), uno::UNO_QUERY_THROW);
+xSet->setPropertyValue("SlideLayout", 
Any(pMasterPersistPtr->getLayoutFromValueToken()));
+
 oox::drawingml::ThemePtr pTheme = pMasterPersistPtr->getTheme();
 if (pTheme)
 {
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 0f7479e8ede9..d31416e43f5b 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -105,6 +105,7 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const
 case XML_titleOnly: nLayout = 19; break;
 case XML_twoObj:
 case XML_twoColTx:  nLayout =  3; break;
+case XML_twoObjAndObj:
 case XML_twoObjAndTx:   nLayout = 15; break;
 case XML_twoObjOverTx:  nLayout = 16; break;
 case XML_tx:nLayout =  1; break;
@@ -112,19 +113,18 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const
 case XML_txAndClipArt:  nLayout =  6; break;
 case XML_txAndMedia:nLayout =  6; break;
 case XML_txAndObj:  nLayout = 10; break;
+case XML_objAndTwoObj:
 case XML_txAndTwoObj:   nLayout = 12; break;
 case XML_txOverObj: nLayout = 17; break;
 case XML_vertTitleAndTx:nLayout = 22; break;
 case XML_vertTitleAndTxOverChart: nLayout = 21; break;
 case XML_vertTx:nLayout = 23; break;
+case XML_objOnly:   nLayout = 32; break;
 
 case XML_twoTxTwoObj:
-case XML_twoObjAndObj:
 case XML_objTx:
 case XML_picTx:
 case XML_secHead:
-case XML_objOnly:
-case XML_objAndTwoObj:
 case XML_mediaAndTx:
 case XML_dgm:
 case XML_cust:
diff --git a/sd/qa/unit/data/pptx/tdf157740.pptx 
b/sd/qa/unit/data/pptx/tdf157740.pptx
new file mode 100644
index ..009e9eeb1da0
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf157740.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index 30df5ba06789..e7726d27e29e 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -263,14 +263,14 @@ void SdOOXMLExportTest1::testTdf149128()
 save("Impress Office Open XML");
 
 xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
-assertXPath(pXmlDoc, 

core.git: Branch 'libreoffice-7-6' - oox/source sd/qa sd/source xmloff/source

2023-12-19 Thread Balazs Varga (via logerrit)
 oox/source/ppt/slidepersist.cxx  |6 
 sd/qa/unit/data/pptx/tdf157740.pptx  |binary
 sd/qa/unit/export-tests-ooxml1.cxx   |4 
 sd/qa/unit/export-tests-ooxml2.cxx   |   20 +-
 sd/source/core/drawdoc3.cxx  |   38 +++-
 sd/source/filter/eppt/epptbase.hxx   |2 
 sd/source/filter/eppt/epptooxml.hxx  |6 
 sd/source/filter/eppt/pptx-epptooxml.cxx |  284 +++
 xmloff/source/draw/ximpbody.cxx  |   19 ++
 9 files changed, 142 insertions(+), 237 deletions(-)

New commits:
commit a4640043ed772b5dcc1ee9d36cfd8b0e4759f894
Author: Balazs Varga 
AuthorDate: Sun Dec 3 23:41:01 2023 +0100
Commit: Henry Castro 
CommitDate: Tue Dec 19 22:46:42 2023 +0100

tdf#157740 FILESAVE PPTX: fix explosion of the number of master slides

- Export correctly the "supported" master slides with the actual slides 
names.
- Set SlideLayout property at ODF import as well for MasterSlides layout 
type.
- When we copy a slide with the master slide also copy the SlideLayout 
property
value as well.

Change-Id: Idb6b88ebe87a83818d8eb27a1fa087652a002c0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160290
Tested-by: Jenkins
Reviewed-by: Henry Castro 
Reviewed-by: Balazs Varga 
(cherry picked from commit bff76421e234df7246a7f49c71a11432f86e09d1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160869
Reviewed-by: Xisco Fauli 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160986

diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 0f7479e8ede9..d31416e43f5b 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -105,6 +105,7 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const
 case XML_titleOnly: nLayout = 19; break;
 case XML_twoObj:
 case XML_twoColTx:  nLayout =  3; break;
+case XML_twoObjAndObj:
 case XML_twoObjAndTx:   nLayout = 15; break;
 case XML_twoObjOverTx:  nLayout = 16; break;
 case XML_tx:nLayout =  1; break;
@@ -112,19 +113,18 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const
 case XML_txAndClipArt:  nLayout =  6; break;
 case XML_txAndMedia:nLayout =  6; break;
 case XML_txAndObj:  nLayout = 10; break;
+case XML_objAndTwoObj:
 case XML_txAndTwoObj:   nLayout = 12; break;
 case XML_txOverObj: nLayout = 17; break;
 case XML_vertTitleAndTx:nLayout = 22; break;
 case XML_vertTitleAndTxOverChart: nLayout = 21; break;
 case XML_vertTx:nLayout = 23; break;
+case XML_objOnly:   nLayout = 32; break;
 
 case XML_twoTxTwoObj:
-case XML_twoObjAndObj:
 case XML_objTx:
 case XML_picTx:
 case XML_secHead:
-case XML_objOnly:
-case XML_objAndTwoObj:
 case XML_mediaAndTx:
 case XML_dgm:
 case XML_cust:
diff --git a/sd/qa/unit/data/pptx/tdf157740.pptx 
b/sd/qa/unit/data/pptx/tdf157740.pptx
new file mode 100644
index ..009e9eeb1da0
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf157740.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index 17a5ce94cbf6..407eef46f7b9 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -110,11 +110,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149128)
 
 xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
 assertXPath(pXmlDoc, 
"/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn", "id",
-"42");
+"8");
 assertXPath(pXmlDoc, 
"/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn", "idx",
 "0");
 assertXPath(pXmlDoc, 
"/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn", "id",
-"43");
+"9");
 assertXPath(pXmlDoc, 
"/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn", "idx",
 "2");
 }
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index ed6568d0bc1f..65102c143c1d 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -157,6 +157,22 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf153107)
 "tl");
 }
 
+CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf157740_slideMasters)
+{
+createSdImpressDoc("pptx/tdf157740.pptx");
+saveAndReload("Impress Office Open XML");
+
+// Test how many slidemaster we have
+xmlDocUniquePtr pXmlDocContent = parseExport("ppt/presentation.xml");
+assertXPath(pXmlDocContent, 
"/p:presentation/p:sldMasterIdLst/p:sldMasterId", 7);
+
+pXmlDocContent = parseExport("ppt/slideMasters/slideMaster1.xml");
+

core.git: Branch 'libreoffice-24-2' - oox/source sd/qa sd/source xmloff/source

2023-12-19 Thread Balazs Varga (via logerrit)
 oox/source/ppt/slidepersist.cxx  |6 
 sd/qa/unit/data/pptx/tdf157740.pptx  |binary
 sd/qa/unit/export-tests-ooxml1.cxx   |4 
 sd/qa/unit/export-tests-ooxml2.cxx   |4 
 sd/qa/unit/export-tests-ooxml4.cxx   |   16 +
 sd/source/core/drawdoc3.cxx  |   38 +++-
 sd/source/filter/eppt/epptbase.hxx   |2 
 sd/source/filter/eppt/epptooxml.hxx  |6 
 sd/source/filter/eppt/pptx-epptooxml.cxx |  284 +++
 xmloff/source/draw/ximpbody.cxx  |   19 ++
 10 files changed, 142 insertions(+), 237 deletions(-)

New commits:
commit 00ea1f0252fa2b59adc5336ffd0d5f5b73cf1203
Author: Balazs Varga 
AuthorDate: Sun Dec 3 23:41:01 2023 +0100
Commit: Xisco Fauli 
CommitDate: Tue Dec 19 11:48:01 2023 +0100

tdf#157740 FILESAVE PPTX: fix explosion of the number of master slides

- Export correctly the "supported" master slides with the actual slides 
names.
- Set SlideLayout property at ODF import as well for MasterSlides layout 
type.
- When we copy a slide with the master slide also copy the SlideLayout 
property
value as well.

Change-Id: Idb6b88ebe87a83818d8eb27a1fa087652a002c0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160290
Tested-by: Jenkins
Reviewed-by: Henry Castro 
Reviewed-by: Balazs Varga 
(cherry picked from commit bff76421e234df7246a7f49c71a11432f86e09d1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160869
Reviewed-by: Xisco Fauli 

diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index cd42ef6bcdb6..a4225f95cd43 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -105,6 +105,7 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const
 case XML_titleOnly: nLayout = 19; break;
 case XML_twoObj:
 case XML_twoColTx:  nLayout =  3; break;
+case XML_twoObjAndObj:
 case XML_twoObjAndTx:   nLayout = 15; break;
 case XML_twoObjOverTx:  nLayout = 16; break;
 case XML_tx:nLayout =  1; break;
@@ -112,19 +113,18 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const
 case XML_txAndClipArt:  nLayout =  6; break;
 case XML_txAndMedia:nLayout =  6; break;
 case XML_txAndObj:  nLayout = 10; break;
+case XML_objAndTwoObj:
 case XML_txAndTwoObj:   nLayout = 12; break;
 case XML_txOverObj: nLayout = 17; break;
 case XML_vertTitleAndTx:nLayout = 22; break;
 case XML_vertTitleAndTxOverChart: nLayout = 21; break;
 case XML_vertTx:nLayout = 23; break;
+case XML_objOnly:   nLayout = 32; break;
 
 case XML_twoTxTwoObj:
-case XML_twoObjAndObj:
 case XML_objTx:
 case XML_picTx:
 case XML_secHead:
-case XML_objOnly:
-case XML_objAndTwoObj:
 case XML_mediaAndTx:
 case XML_dgm:
 case XML_cust:
diff --git a/sd/qa/unit/data/pptx/tdf157740.pptx 
b/sd/qa/unit/data/pptx/tdf157740.pptx
new file mode 100644
index ..009e9eeb1da0
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf157740.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index deab0ea2de24..9f87fd5d92c4 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -111,11 +111,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149128)
 
 xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
 assertXPath(pXmlDoc, 
"/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn"_ostr,
-"id"_ostr, "42");
+"id"_ostr, "8");
 assertXPath(pXmlDoc, 
"/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn"_ostr,
 "idx"_ostr, "0");
 assertXPath(pXmlDoc, 
"/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn"_ostr,
-"id"_ostr, "43");
+"id"_ostr, "9");
 assertXPath(pXmlDoc, 
"/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn"_ostr,
 "idx"_ostr, "2");
 }
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index 0583233c9f06..4498f66bf03a 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -1343,7 +1343,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf106867)
 
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/"
 
"p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:cmd/"
 "p:cBhvr/p:tgtEl/p:spTgt"_ostr,
-"spid"_ostr, "42");
+"spid"_ostr, "67");
 }
 
 CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112280)
@@ -1740,7 +1740,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testAccentColor)
 

core.git: oox/source sd/qa sd/source xmloff/source

2023-12-18 Thread Balazs Varga (via logerrit)
 oox/source/ppt/slidepersist.cxx  |6 
 sd/qa/unit/data/pptx/tdf157740.pptx  |binary
 sd/qa/unit/export-tests-ooxml1.cxx   |4 
 sd/qa/unit/export-tests-ooxml2.cxx   |4 
 sd/qa/unit/export-tests-ooxml4.cxx   |   16 +
 sd/source/core/drawdoc3.cxx  |   38 +++-
 sd/source/filter/eppt/epptbase.hxx   |2 
 sd/source/filter/eppt/epptooxml.hxx  |6 
 sd/source/filter/eppt/pptx-epptooxml.cxx |  284 +++
 xmloff/source/draw/ximpbody.cxx  |   19 ++
 10 files changed, 142 insertions(+), 237 deletions(-)

New commits:
commit bff76421e234df7246a7f49c71a11432f86e09d1
Author: Balazs Varga 
AuthorDate: Sun Dec 3 23:41:01 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Dec 18 15:10:54 2023 +0100

tdf#157740 FILESAVE PPTX: fix explosion of the number of master slides

- Export correctly the "supported" master slides with the actual slides 
names.
- Set SlideLayout property at ODF import as well for MasterSlides layout 
type.
- When we copy a slide with the master slide also copy the SlideLayout 
property
value as well.

Change-Id: Idb6b88ebe87a83818d8eb27a1fa087652a002c0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160290
Tested-by: Jenkins
Reviewed-by: Henry Castro 
Reviewed-by: Balazs Varga 

diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index cd42ef6bcdb6..a4225f95cd43 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -105,6 +105,7 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const
 case XML_titleOnly: nLayout = 19; break;
 case XML_twoObj:
 case XML_twoColTx:  nLayout =  3; break;
+case XML_twoObjAndObj:
 case XML_twoObjAndTx:   nLayout = 15; break;
 case XML_twoObjOverTx:  nLayout = 16; break;
 case XML_tx:nLayout =  1; break;
@@ -112,19 +113,18 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const
 case XML_txAndClipArt:  nLayout =  6; break;
 case XML_txAndMedia:nLayout =  6; break;
 case XML_txAndObj:  nLayout = 10; break;
+case XML_objAndTwoObj:
 case XML_txAndTwoObj:   nLayout = 12; break;
 case XML_txOverObj: nLayout = 17; break;
 case XML_vertTitleAndTx:nLayout = 22; break;
 case XML_vertTitleAndTxOverChart: nLayout = 21; break;
 case XML_vertTx:nLayout = 23; break;
+case XML_objOnly:   nLayout = 32; break;
 
 case XML_twoTxTwoObj:
-case XML_twoObjAndObj:
 case XML_objTx:
 case XML_picTx:
 case XML_secHead:
-case XML_objOnly:
-case XML_objAndTwoObj:
 case XML_mediaAndTx:
 case XML_dgm:
 case XML_cust:
diff --git a/sd/qa/unit/data/pptx/tdf157740.pptx 
b/sd/qa/unit/data/pptx/tdf157740.pptx
new file mode 100644
index ..009e9eeb1da0
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf157740.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index deab0ea2de24..9f87fd5d92c4 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -111,11 +111,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149128)
 
 xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
 assertXPath(pXmlDoc, 
"/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn"_ostr,
-"id"_ostr, "42");
+"id"_ostr, "8");
 assertXPath(pXmlDoc, 
"/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn"_ostr,
 "idx"_ostr, "0");
 assertXPath(pXmlDoc, 
"/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn"_ostr,
-"id"_ostr, "43");
+"id"_ostr, "9");
 assertXPath(pXmlDoc, 
"/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn"_ostr,
 "idx"_ostr, "2");
 }
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index 0583233c9f06..4498f66bf03a 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -1343,7 +1343,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf106867)
 
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/"
 
"p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:cmd/"
 "p:cBhvr/p:tgtEl/p:spTgt"_ostr,
-"spid"_ostr, "42");
+"spid"_ostr, "67");
 }
 
 CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112280)
@@ -1740,7 +1740,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testAccentColor)
 xmlDocUniquePtr pXmlDocTheme1 = parseExport("ppt/theme/theme1.xml");
 assertXPath(pXmlDocTheme1, 
"/a:theme/a:themeElements/a:clrScheme/a:accent6/a:srgbClr"_ostr,
   

core.git: svx/source

2023-12-11 Thread Balazs Varga (via logerrit)
 svx/source/dialog/optgrid.cxx |   37 ++---
 1 file changed, 30 insertions(+), 7 deletions(-)

New commits:
commit 7d5c403f3759b14fe3be206f4c29494799eac2b4
Author: Balazs Varga 
AuthorDate: Mon Dec 11 10:33:20 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Dec 11 15:58:11 2023 +0100

tdf#158473 - UI: Part 55 - Unify lockdown behavior of Options dialog

for Calc - Grid Page.

Change-Id: Ic29e06c2f1a5e71e1b6236c321cfcb4b1afc39f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160564
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index 2226eaa4e23c..6cee157cc005 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -261,7 +262,8 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet )
 case HTML_MODE: bReadOnly = 
officecfg::Office::WriterWeb::Grid::Option::SnapToGrid::isReadOnly(); break;
 case IMPRESS_MODE: bReadOnly = 
officecfg::Office::Impress::Grid::Option::SnapToGrid::isReadOnly(); break;
 case DRAW_MODE: bReadOnly = 
officecfg::Office::Draw::Grid::Option::SnapToGrid::isReadOnly(); break;
-default: //TODO Calc
+case CALC_MODE: bReadOnly = 
officecfg::Office::Calc::Grid::Option::SnapToGrid::isReadOnly(); break;
+default:
 break;
 }
 m_xCbxUseGridsnap->set_active(pGridAttr->bUseGridsnap);
@@ -274,7 +276,8 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet )
 case HTML_MODE: bReadOnly = 
officecfg::Office::WriterWeb::Grid::Option::Synchronize::isReadOnly(); break;
 case IMPRESS_MODE: bReadOnly = 
officecfg::Office::Impress::Grid::Option::Synchronize::isReadOnly(); break;
 case DRAW_MODE: bReadOnly = 
officecfg::Office::Draw::Grid::Option::Synchronize::isReadOnly(); break;
-default: //TODO Calc
+case CALC_MODE: bReadOnly = 
officecfg::Office::Calc::Grid::Option::Synchronize::isReadOnly(); break;
+default:
 break;
 }
 m_xCbxSynchronize->set_active(pGridAttr->bSynchronize);
@@ -287,7 +290,8 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet )
 case HTML_MODE: bReadOnly = 
officecfg::Office::WriterWeb::Grid::Option::VisibleGrid::isReadOnly(); break;
 case IMPRESS_MODE: bReadOnly = 
officecfg::Office::Impress::Grid::Option::VisibleGrid::isReadOnly(); break;
 case DRAW_MODE: bReadOnly = 
officecfg::Office::Draw::Grid::Option::VisibleGrid::isReadOnly(); break;
-default: //TODO Calc
+case CALC_MODE: bReadOnly = 
officecfg::Office::Calc::Grid::Option::VisibleGrid::isReadOnly(); break;
+default:
 break;
 }
 m_xCbxGridVisible->set_active(pGridAttr->bGridVisible);
@@ -318,7 +322,15 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet )
 bReadOnly = 
officecfg::Office::Draw::Grid::Resolution::XAxis::NonMetric::isReadOnly();
 }
 break;
-default: //TODO Calc
+case CALC_MODE:
+{
+if (lcl_IsMetricSystem())
+bReadOnly = 
officecfg::Office::Calc::Grid::Resolution::XAxis::Metric::isReadOnly();
+else
+bReadOnly = 
officecfg::Office::Calc::Grid::Resolution::XAxis::NonMetric::isReadOnly();
+}
+break;
+default:
 break;
 }
 m_xMtrFldDrawX->set_sensitive(!bReadOnly);
@@ -344,7 +356,15 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet )
 bReadOnly = 
officecfg::Office::Draw::Grid::Resolution::YAxis::NonMetric::isReadOnly();
 }
 break;
-default: //TODO Calc
+case CALC_MODE:
+{
+if (lcl_IsMetricSystem())
+bReadOnly = 
officecfg::Office::Calc::Grid::Resolution::YAxis::Metric::isReadOnly();
+else
+bReadOnly = 
officecfg::Office::Calc::Grid::Resolution::YAxis::NonMetric::isReadOnly();
+}
+break;
+default:
 break;
 }
 m_xMtrFldDrawY->set_sensitive(!bReadOnly);
@@ -359,7 +379,8 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet )
 case HTML_MODE: bReadOnly = 
officecfg::Office::WriterWeb::Grid::Subdivision::XAxis::isReadOnly(); break;
 case IMPRESS_MODE: bReadOnly = 
officecfg::Office::Impress::Grid::Subdivision::XAxis::isReadOnly(); break;
 case DRAW_MODE: bReadOnly = 
officecfg::Office::Draw::Grid::Subdivision::XAxis::isReadOnly(); break;
-default: //TODO Calc
+case CALC_MODE: bReadOnly = 
officecfg::Office::Calc::Grid::Subdivision::XAxis::isReadOnly(); 

core.git: sc/source sc/uiconfig

2023-12-10 Thread Balazs Varga (via logerrit)
 sc/source/ui/inc/tpprint.hxx|3 +
 sc/source/ui/optdlg/tpprint.cxx |   14 ++-
 sc/uiconfig/scalc/ui/optdlg.ui  |   78 +---
 3 files changed, 74 insertions(+), 21 deletions(-)

New commits:
commit 5e8c0575e877795aaca91346548cd0136fa22048
Author: Balazs Varga 
AuthorDate: Fri Dec 8 20:04:16 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Dec 11 08:27:26 2023 +0100

tdf#158472 - UI: Part 54 - Unify lockdown behavior of Options dialog

for Calc - Print Page.

Change-Id: Ie5ee611552185662f4a1081415a2c6493cf58301
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160502
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx
index 3dc7d36e5304..5cb33891b835 100644
--- a/sc/source/ui/inc/tpprint.hxx
+++ b/sc/source/ui/inc/tpprint.hxx
@@ -24,8 +24,11 @@
 class ScTpPrintOptions : public SfxTabPage
 {
 std::unique_ptr   m_xSkipEmptyPagesCB;
+std::unique_ptrm_xSkipEmptyPagesImg;
 std::unique_ptr   m_xSelectedSheetsCB;
+std::unique_ptrm_xSelectedSheetsImg;
 std::unique_ptr   m_xForceBreaksCB;
+std::unique_ptrm_xForceBreaksImg;
 
 public:
 ScTpPrintOptions(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rCoreSet);
diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx
index 44324ffc2aa6..fbcafe299ef5 100644
--- a/sc/source/ui/optdlg/tpprint.cxx
+++ b/sc/source/ui/optdlg/tpprint.cxx
@@ -25,13 +25,17 @@
 #include 
 #include 
 #include 
+#include 
 
 ScTpPrintOptions::ScTpPrintOptions( weld::Container* pPage, 
weld::DialogController* pController,
 const SfxItemSet& rCoreAttrs )
 : SfxTabPage(pPage, pController, "modules/scalc/ui/optdlg.ui", 
"optCalcPrintPage",  )
 , m_xSkipEmptyPagesCB(m_xBuilder->weld_check_button("suppressCB"))
+, m_xSkipEmptyPagesImg(m_xBuilder->weld_widget("locksuppressCB"))
 , m_xSelectedSheetsCB(m_xBuilder->weld_check_button("printCB"))
+, m_xSelectedSheetsImg(m_xBuilder->weld_widget("lockprintCB"))
 , m_xForceBreaksCB(m_xBuilder->weld_check_button("forceBreaksCB"))
+, m_xForceBreaksImg(m_xBuilder->weld_widget("lockforceBreaksCB"))
 {
 }
 
@@ -75,9 +79,17 @@ void ScTpPrintOptions::Reset( const SfxItemSet* rCoreSet )
 }
 
 m_xSkipEmptyPagesCB->set_active( aOptions.GetSkipEmpty() );
+m_xForceBreaksCB->set_active(aOptions.GetForceBreaks());
+
+
m_xSkipEmptyPagesCB->set_sensitive(!officecfg::Office::Calc::Print::Page::EmptyPages::isReadOnly());
+
m_xSkipEmptyPagesImg->set_visible(officecfg::Office::Calc::Print::Page::EmptyPages::isReadOnly());
+
m_xSelectedSheetsCB->set_sensitive(!officecfg::Office::Calc::Print::Other::AllSheets::isReadOnly());
+
m_xSelectedSheetsImg->set_visible(officecfg::Office::Calc::Print::Other::AllSheets::isReadOnly());
+
m_xForceBreaksCB->set_sensitive(!officecfg::Office::Calc::Print::Page::ForceBreaks::isReadOnly());
+
m_xForceBreaksImg->set_visible(officecfg::Office::Calc::Print::Page::ForceBreaks::isReadOnly());
+
 m_xSkipEmptyPagesCB->save_state();
 m_xSelectedSheetsCB->save_state();
-m_xForceBreaksCB->set_active( aOptions.GetForceBreaks() );
 m_xForceBreaksCB->save_state();
 }
 
diff --git a/sc/uiconfig/scalc/ui/optdlg.ui b/sc/uiconfig/scalc/ui/optdlg.ui
index bbbad94a4f76..8dd869f817af 100644
--- a/sc/uiconfig/scalc/ui/optdlg.ui
+++ b/sc/uiconfig/scalc/ui/optdlg.ui
@@ -15,46 +15,71 @@
 0
 none
 
-  
+  
+  
 True
 False
 12
 6
-vertical
-6
+6
+6
 
-  
-_Always apply manual breaks
+  
+_Suppress output of empty pages
 True
 True
 False
 True
 True
+
+  
+Specifies that empty pages 
that have no cell contents or draw objects are not printed.
+  
+
   
   
-False
-True
-0
+1
+1
   
 
 
-  
-_Suppress output of empty pages
+  
+_Always apply manual breaks
 True
 True
 False
 True
 True
-
-  
-Specifies that empty pages 
that have no cell contents or draw objects are not printed.
-  
-
   
   
-False
-True
-0
+1
+0
+  
+
+

core.git: sc/uiconfig

2023-12-10 Thread Balazs Varga (via logerrit)
 sc/uiconfig/scalc/ui/optdlg.ui |   58 -
 1 file changed, 29 insertions(+), 29 deletions(-)

New commits:
commit 9ed541b82ac32c38dad10410cab16b6763704af9
Author: Balazs Varga 
AuthorDate: Fri Dec 8 19:30:33 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Dec 11 08:26:47 2023 +0100

Resave with newer Glade version

Change-Id: Ic95805c397b7a6e71d80d0f0c976e9c432238b2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160501
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/uiconfig/scalc/ui/optdlg.ui b/sc/uiconfig/scalc/ui/optdlg.ui
index 6a928899fe6a..bbbad94a4f76 100644
--- a/sc/uiconfig/scalc/ui/optdlg.ui
+++ b/sc/uiconfig/scalc/ui/optdlg.ui
@@ -1,35 +1,35 @@
 
-
+
 
   
   
 True
-False
-6
+False
+6
 vertical
 12
 
   
 True
-False
-0
-none
+False
+0
+none
 
   
 True
-False
-vertical
-6
+False
 12
 6
+vertical
+6
 
   
 _Always apply manual breaks
 True
-True
-False
-True
-True
+True
+False
+True
+True
   
   
 False
@@ -41,10 +41,10 @@
   
 _Suppress output of empty pages
 True
-True
-False
-True
-True
+True
+False
+True
+True
 
   
 Specifies that empty pages 
that have no cell contents or draw objects are not printed.
@@ -62,7 +62,7 @@
 
   
 True
-False
+False
 Pages
 
   
@@ -79,25 +79,25 @@
 
   
 True
-False
-0
-none
+False
+0
+none
 
   
 True
-False
-vertical
-6
+False
 12
 6
+vertical
+6
 
   
 _Print only selected sheets
 True
-True
-False
-True
-True
+True
+False
+True
+True
 
   
 Specifies that only contents 
from selected sheets are printed, even if you specify a wider range in the File 
- Print dialog or in the Format - Print Ranges dialog. Contents from sheets 
that are not selected will not be printed.
@@ -115,7 +115,7 @@
 
   
 True
-False
+False
 Sheets
 0.5
 


core.git: sc/source sc/uiconfig

2023-12-10 Thread Balazs Varga (via logerrit)
 sc/source/ui/inc/tpcompatibility.hxx |2 +
 sc/source/ui/optdlg/tpcompatibility.cxx  |7 +
 sc/uiconfig/scalc/ui/optcompatibilitypage.ui |   36 +++
 3 files changed, 40 insertions(+), 5 deletions(-)

New commits:
commit 67fcf1388976c11b1c0a688403e7323326a56e82
Author: Balazs Varga 
AuthorDate: Fri Dec 8 19:07:20 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Dec 11 08:26:25 2023 +0100

tdf#158471 - UI: Part 53 - Unify lockdown behavior of Options dialog

for Calc - Compatibility Page.

Change-Id: I43780c8b29de42a765b1d1110dbfe90efb173b4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160499
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/source/ui/inc/tpcompatibility.hxx 
b/sc/source/ui/inc/tpcompatibility.hxx
index 4efdbc172b10..0ab84d4d93e8 100644
--- a/sc/source/ui/inc/tpcompatibility.hxx
+++ b/sc/source/ui/inc/tpcompatibility.hxx
@@ -26,7 +26,9 @@ public:
 
 private:
 std::unique_ptr m_xLbKeyBindings;
+std::unique_ptr m_xLbKeyBindingsImg;
 std::unique_ptr m_xBtnLink;
+std::unique_ptr m_xBtnLinkImg;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx 
b/sc/source/ui/optdlg/tpcompatibility.cxx
index cc54635f3300..64221cd2a9da 100644
--- a/sc/source/ui/optdlg/tpcompatibility.cxx
+++ b/sc/source/ui/optdlg/tpcompatibility.cxx
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -19,7 +20,9 @@
 ScTpCompatOptions::ScTpCompatOptions(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet )
 : SfxTabPage(pPage, pController, 
"modules/scalc/ui/optcompatibilitypage.ui", "OptCompatibilityPage", )
 , m_xLbKeyBindings(m_xBuilder->weld_combo_box("keybindings"))
+, m_xLbKeyBindingsImg(m_xBuilder->weld_widget("lockkeybindings"))
 , m_xBtnLink(m_xBuilder->weld_check_button("cellLinkCB"))
+, m_xBtnLinkImg(m_xBuilder->weld_widget("lockcellLinkCB"))
 {
 }
 
@@ -86,12 +89,16 @@ void ScTpCompatOptions::Reset(const SfxItemSet *rCoreAttrs)
 ;
 }
 }
+
m_xLbKeyBindings->set_sensitive(!officecfg::Office::Calc::Compatibility::KeyBindings::BaseGroup::isReadOnly());
+
m_xLbKeyBindingsImg->set_visible(officecfg::Office::Calc::Compatibility::KeyBindings::BaseGroup::isReadOnly());
 m_xLbKeyBindings->save_value();
 
 if (const SfxBoolItem* pbItem = rCoreAttrs->GetItemIfSet(SID_SC_OPT_LINKS))
 {
 m_xBtnLink->set_active(pbItem->GetValue());
 }
+
m_xBtnLink->set_sensitive(!officecfg::Office::Calc::Compatibility::Links::isReadOnly());
+
m_xBtnLinkImg->set_visible(officecfg::Office::Calc::Compatibility::Links::isReadOnly());
 m_xBtnLink->save_state();
 }
 
diff --git a/sc/uiconfig/scalc/ui/optcompatibilitypage.ui 
b/sc/uiconfig/scalc/ui/optcompatibilitypage.ui
index f45996294ad7..b48bfeb70c20 100644
--- a/sc/uiconfig/scalc/ui/optcompatibilitypage.ui
+++ b/sc/uiconfig/scalc/ui/optcompatibilitypage.ui
@@ -16,7 +16,7 @@
 0
 none
 
-  
+  
   
 True
 False
@@ -40,7 +40,7 @@
 0
   
   
-0
+1
 0
   
 
@@ -55,7 +55,20 @@
 
   
   
-1
+2
+0
+  
+
+
+  
+False
+True
+center
+center
+res/lock.png
+  
+  
+0
 0
   
 
@@ -87,7 +100,7 @@
 0
 none
 
-  
+  
   
 True
 False
@@ -112,11 +125,24 @@
 
   
   
-0
+1
 0
 2
   
 
+
+  
+False
+True
+center
+center
+res/lock.png
+  
+  
+0
+0
+  
+
   
 
 


core.git: sc/uiconfig

2023-12-10 Thread Balazs Varga (via logerrit)
 sc/uiconfig/scalc/ui/optcompatibilitypage.ui |   74 +--
 1 file changed, 37 insertions(+), 37 deletions(-)

New commits:
commit 0024b7e392f72a16fcbcd0b65e3f590761c94fbe
Author: Balazs Varga 
AuthorDate: Fri Dec 8 18:43:01 2023 +0100
Commit: Balazs Varga 
CommitDate: Sun Dec 10 22:37:26 2023 +0100

Resave with newer Glade version

Change-Id: I080b742ae6dcfa8a67ee90c7b611736121355806
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160498
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/uiconfig/scalc/ui/optcompatibilitypage.ui 
b/sc/uiconfig/scalc/ui/optcompatibilitypage.ui
index 359fd45305c8..f45996294ad7 100644
--- a/sc/uiconfig/scalc/ui/optcompatibilitypage.ui
+++ b/sc/uiconfig/scalc/ui/optcompatibilitypage.ui
@@ -1,53 +1,53 @@
 
-
+
 
   
   
 True
-False
-6
+False
+6
 vertical
 12
 
   
 True
-False
+False
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
-True
-6
-12
+False
 12
 6
+True
+6
+12
 
   
 True
-False
+False
 True
 Select desired _key binding type. 
Changing the key binding type may overwrite some of the existing key 
bindings.
-True
+True
 True
-keybindings
-60
-60
+keybindings
+60
+60
 0
 0
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 start
 
   Default
@@ -55,8 +55,8 @@
 
   
   
-1
-0
+1
+0
   
 
   
@@ -64,7 +64,7 @@
 
   
 True
-False
+False
 Key Bindings
 
   
@@ -81,30 +81,30 @@
 
   
 True
-False
+False
 True
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
-True
-6
-12
+False
 12
 6
+True
+6
+12
 
   
 Insert _hyperlink for the cell, not 
for the text in the cell.
 True
-True
-False
+True
+False
 By default, Excel allows 
only one hyperlink per cell. (Works only if Excel file format is 
used.)
-True
-True
+True
+True
 
   
 Calc can insert multiple 
hyperlinks in a cell as text fields, but multiple hyperlinks in a cell cannot 
be saved to Excel file formats. This option prevents inserting multiple 
hyperlinks in a cell when Excel files are edited, in order to be interoperable 
with Excel.
@@ -112,8 +112,8 @@
 
   
   
-0
-0
+0
+0
 2
   
 
@@ -122,7 +122,7 @@
 
   
 True
-False
+False
 Hyperlinks
 
   


core.git: sc/source

2023-12-10 Thread Balazs Varga (via logerrit)
 sc/source/ui/optdlg/tpusrlst.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 99c7a2a6a0bbc048204e2a2a5c013f79244c72ee
Author: Balazs Varga 
AuthorDate: Fri Dec 8 17:56:14 2023 +0100
Commit: Balazs Varga 
CommitDate: Sun Dec 10 17:59:20 2023 +0100

tdf#158469 - UI: Part 51 - Unify lockdown behavior of Options dialog

for Calc - Sort Lists Page.

Change-Id: I857b49caf8fa6823ae2582212885b317a34ff1df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160494
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 128b8ea936aa..f3999d562d55 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -20,6 +20,7 @@
 #undef SC_DLLIMPLEMENTATION
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -161,7 +162,7 @@ void ScTpUserLists::Reset( const SfxItemSet* rCoreAttrs )
 
 mxEdCopyFrom->set_text( aStrSelectedArea );
 
-if ( mxLbLists->n_children() == 0 )
+if ( mxLbLists->n_children() == 0 || 
officecfg::Office::Calc::SortList::List::isReadOnly() )
 {
 mxFtLists->set_sensitive(false);
 mxLbLists->set_sensitive(false);
@@ -174,6 +175,7 @@ void ScTpUserLists::Reset( const SfxItemSet* rCoreAttrs )
 mxBtnDiscard->hide();
 mxBtnAdd->show();
 mxBtnModify->hide();
+
mxBtnNew->set_sensitive(!officecfg::Office::Calc::SortList::List::isReadOnly());
 mxBtnAdd->set_sensitive(false);
 mxBtnModify->set_sensitive(false);
 


core.git: sc/uiconfig

2023-12-10 Thread Balazs Varga (via logerrit)
 sc/uiconfig/scalc/ui/optsortlists.ui |  144 +--
 1 file changed, 72 insertions(+), 72 deletions(-)

New commits:
commit 9c923b5c7404c1597cc39ed0c81b13606e99308d
Author: Balazs Varga 
AuthorDate: Fri Dec 8 18:09:41 2023 +0100
Commit: Balazs Varga 
CommitDate: Sun Dec 10 17:58:39 2023 +0100

Resave with newer Glade version

Change-Id: Ibf9a565587a5af02f6cb8ba9194e25d2f5b66c8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160493
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/uiconfig/scalc/ui/optsortlists.ui 
b/sc/uiconfig/scalc/ui/optsortlists.ui
index dcc0a32bb68c..3084325943fb 100644
--- a/sc/uiconfig/scalc/ui/optsortlists.ui
+++ b/sc/uiconfig/scalc/ui/optsortlists.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -12,27 +12,27 @@
   
   
 True
-False
+False
 True
 True
-6
+6
 vertical
 
-  
+  
   
 True
-False
+False
 True
 True
-12
-12
+12
+12
 
   
 _Copy
 True
-True
-True
-True
+True
+True
+True
 
   
 Copies the contents of the cells 
in the Copy list from box. If you select a reference to related rows and 
columns, the Copy List dialog appears after clicking the button. You can use 
this dialog to define if the reference is converted to sort lists by row or by 
column.
@@ -40,23 +40,23 @@
 
   
   
-1
-1
+1
+1
   
 
 
   
 True
-False
+False
 True
 12
 
   
 True
-False
+False
 Copy list _from:
-True
-copyfrom
+True
+copyfrom
   
   
 False
@@ -67,10 +67,10 @@
 
   
 True
-True
+True
 center
 True
-True
+True
 True
 
   
@@ -86,65 +86,65 @@
 
   
   
-0
-1
+0
+1
   
 
 
-  
+  
   
 True
-False
+False
 True
 True
-6
-12
-True
+6
+12
+True
 
   
 True
-False
+False
 _Lists
-True
-lists
+True
+lists
 0
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 _Entries
-True
-entries
+True
+entries
 0
   
   
-1
-0
+1
+0
   
 
 
   
 True
-True
+True
 True
 True
-in
+in
 
   
 True
-True
+True
 True
 liststore1
-False
-False
-0
-False
+False
+False
+0
+False
 
   
 
@@ -167,19 +167,19 @@
 
   
   
-0
-1
+0
+1
   
 
 
   
 True
-True
-in
+True
+in
 
   
 True
-True
+True
 True
 True
 
@@ -191,30 +191,30 @@
 
   
   
-1
-1
+1
+1
   
 
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 vertical
 12

core.git: sc/source sc/uiconfig

2023-12-10 Thread Balazs Varga (via logerrit)
 sc/source/ui/inc/opredlin.hxx  |4 +
 sc/source/ui/optdlg/opredlin.cxx   |   13 ++
 sc/uiconfig/scalc/ui/optchangespage.ui |   70 -
 3 files changed, 78 insertions(+), 9 deletions(-)

New commits:
commit 60cb604efe742a69b0e701515324833e300043c1
Author: Balazs Varga 
AuthorDate: Fri Dec 8 18:34:13 2023 +0100
Commit: Balazs Varga 
CommitDate: Sun Dec 10 17:57:54 2023 +0100

tdf#158470 - UI: Part 52 - Unify lockdown behavior of Options dialog

for Calc - Changes Page.

Change-Id: I2d352915b2804411f0bbee62c967de77ad4bbba7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160496
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/source/ui/inc/opredlin.hxx b/sc/source/ui/inc/opredlin.hxx
index 4cd5660be4df..b31504212ae3 100644
--- a/sc/source/ui/inc/opredlin.hxx
+++ b/sc/source/ui/inc/opredlin.hxx
@@ -25,9 +25,13 @@ class ColorListBox;
 class ScRedlineOptionsTabPage : public SfxTabPage
 {
 std::unique_ptr m_xContentColorLB;
+std::unique_ptr m_xContentColorImg;
 std::unique_ptr m_xRemoveColorLB;
+std::unique_ptr m_xRemoveColorImg;
 std::unique_ptr m_xInsertColorLB;
+std::unique_ptr m_xInsertColorImg;
 std::unique_ptr m_xMoveColorLB;
+std::unique_ptr m_xMoveColorImg;
 
 public:
 ScRedlineOptionsTabPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rSet );
diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx
index 5aa904536433..9d3c1835dfc3 100644
--- a/sc/source/ui/optdlg/opredlin.cxx
+++ b/sc/source/ui/optdlg/opredlin.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -32,12 +33,16 @@ 
ScRedlineOptionsTabPage::ScRedlineOptionsTabPage(weld::Container* pPage, weld::D
 : SfxTabPage(pPage, pController, "modules/scalc/ui/optchangespage.ui", 
"OptChangesPage", )
 , m_xContentColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button("changes"),
 [this]{ return GetDialogController()->getDialog(); }))
+, m_xContentColorImg(m_xBuilder->weld_widget("lockchanges"))
 , m_xRemoveColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button("deletions"),
 [this]{ return GetDialogController()->getDialog(); }))
+, m_xRemoveColorImg(m_xBuilder->weld_widget("lockdeletions"))
 , m_xInsertColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button("entries"),
 [this]{ return GetDialogController()->getDialog(); }))
+, m_xInsertColorImg(m_xBuilder->weld_widget("lockentries"))
 , m_xMoveColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button("insertions"),
 [this]{ return GetDialogController()->getDialog(); }))
+, m_xMoveColorImg(m_xBuilder->weld_widget("lockinsertions"))
 {
 m_xContentColorLB->SetSlotId(SID_AUTHOR_COLOR);
 m_xRemoveColorLB->SetSlotId(SID_AUTHOR_COLOR);
@@ -105,15 +110,23 @@ void ScRedlineOptionsTabPage::Reset( const SfxItemSet* /* 
rSet */ )
 
 Color nColor = aAppOptions.GetTrackContentColor();
 m_xContentColorLB->SelectEntry(nColor);
+
m_xContentColorLB->set_sensitive(!officecfg::Office::Calc::Revision::Color::Change::isReadOnly());
+
m_xContentColorImg->set_visible(officecfg::Office::Calc::Revision::Color::Change::isReadOnly());
 
 nColor = aAppOptions.GetTrackMoveColor();
 m_xMoveColorLB->SelectEntry(nColor);
+
m_xMoveColorLB->set_sensitive(!officecfg::Office::Calc::Revision::Color::Insertion::isReadOnly());
+
m_xMoveColorImg->set_visible(officecfg::Office::Calc::Revision::Color::Insertion::isReadOnly());
 
 nColor = aAppOptions.GetTrackInsertColor();
 m_xInsertColorLB->SelectEntry(nColor);
+
m_xInsertColorLB->set_sensitive(!officecfg::Office::Calc::Revision::Color::MovedEntry::isReadOnly());
+
m_xInsertColorImg->set_visible(officecfg::Office::Calc::Revision::Color::MovedEntry::isReadOnly());
 
 nColor = aAppOptions.GetTrackDeleteColor();
 m_xRemoveColorLB->SelectEntry(nColor);
+
m_xRemoveColorLB->set_sensitive(!officecfg::Office::Calc::Revision::Color::Deletion::isReadOnly());
+
m_xRemoveColorImg->set_visible(officecfg::Office::Calc::Revision::Color::Deletion::isReadOnly());
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/uiconfig/scalc/ui/optchangespage.ui 
b/sc/uiconfig/scalc/ui/optchangespage.ui
index a8a9a85cc5de..8bd34036dbe8 100644
--- a/sc/uiconfig/scalc/ui/optchangespage.ui
+++ b/sc/uiconfig/scalc/ui/optchangespage.ui
@@ -16,7 +16,7 @@
 0
 none
 
-  
+  
   
 True
 False
@@ -35,7 +35,7 @@
 0
   
   
-0
+1
 0
   
 
@@ -49,7 +49,7 @@
 0
   
   
-0
+1
 1
   
 
@@ -63,7 +63,7 @@
 0
   

core.git: sc/uiconfig

2023-12-10 Thread Balazs Varga (via logerrit)
 sc/uiconfig/scalc/ui/optchangespage.ui |  108 +++--
 1 file changed, 52 insertions(+), 56 deletions(-)

New commits:
commit 98b1eb2523a1bb5d1fd15fc06be7ec7a16f1eeab
Author: Balazs Varga 
AuthorDate: Fri Dec 8 18:13:47 2023 +0100
Commit: Balazs Varga 
CommitDate: Sun Dec 10 17:57:02 2023 +0100

Resave with newer Glade version

Change-Id: I6bb6dbfe977987e592b87abc5e1f0f3dc4b789cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160495
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/uiconfig/scalc/ui/optchangespage.ui 
b/sc/uiconfig/scalc/ui/optchangespage.ui
index dbdb116b6b92..a8a9a85cc5de 100644
--- a/sc/uiconfig/scalc/ui/optchangespage.ui
+++ b/sc/uiconfig/scalc/ui/optchangespage.ui
@@ -1,95 +1,94 @@
 
-
+
 
   
   
 True
-False
-6
+False
+6
 vertical
 12
 
   
 True
-False
+False
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
-True
-6
-12
+False
 12
 6
+True
+6
+12
 
   
 True
-False
+False
 Chan_ges:
-True
-changes
+True
+changes
 0
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 _Deletions:
-True
-deletions
+True
+deletions
 0
   
   
-0
-1
+0
+1
   
 
 
   
 True
-False
+False
 _Insertions:
-True
-insertions
+True
+insertions
 0
   
   
-0
-2
+0
+2
   
 
 
   
 True
-False
+False
 _Moved entries:
-True
-entries
+True
+entries
 0
   
   
-0
-3
+0
+3
   
 
 
   
 True
-False
-False
+False
+False
 True
 0
-True
-
+True
 
   
 
@@ -100,19 +99,18 @@
 
   
   
-1
-0
+1
+0
   
 
 
   
 True
-False
-False
+False
+False
 True
 0
-True
-
+True
 
   
 
@@ -123,19 +121,18 @@
 
   
   
-1
-1
+1
+1
   
 
 
   
 True
-False
-False
+False
+False
 True
 0
-True
-
+True
 
   
 
@@ -146,19 +143,18 @@
 
   
   
-1
-3
+1
+3
   
 
 
   
 True
-False
-False
+False
+False
 True
 0
-True
-
+True
 
   
 
@@ -169,8 +165,8 @@
 
   
   
-1
-2
+1
+2
   
 
   
@@ -178,7 +174,7 @@
 
   
 True
-False
+False
 Colors for Changes
 
   


core.git: sc/source sc/uiconfig

2023-12-10 Thread Balazs Varga (via logerrit)
 sc/source/ui/inc/tpcalc.hxx  |   16 ++
 sc/source/ui/optdlg/tpcalc.cxx   |  104 -
 sc/uiconfig/scalc/ui/optcalculatepage.ui |  240 +++
 3 files changed, 321 insertions(+), 39 deletions(-)

New commits:
commit a6ead255af6efaede730a980c3a4a80ff193c8e5
Author: Balazs Varga 
AuthorDate: Fri Dec 8 12:33:08 2023 +0100
Commit: Balazs Varga 
CommitDate: Sun Dec 10 17:56:31 2023 +0100

tdf#158467 - UI: Part 50 - Unify lockdown behavior of Options dialog

for Calc - Calculate Page.

Change-Id: Ibe728e2ffc122879ee66abb88927be355d41348a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160462
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx
index 87b4f903684d..6bfacaee3c30 100644
--- a/sc/source/ui/inc/tpcalc.hxx
+++ b/sc/source/ui/inc/tpcalc.hxx
@@ -21,6 +21,8 @@
 
 #include 
 #include "editfield.hxx"
+#include 
+#include 
 
 class ScDocOptions;
 
@@ -38,32 +40,46 @@ public:
 virtual DeactivateRC   DeactivatePage  ( SfxItemSet* pSet ) override;
 
 private:
+css::uno::Reference 
m_xReadWriteAccess;
+
 std::unique_ptr pOldOptions;
 std::unique_ptr pLocalOptions;
 
 std::unique_ptr m_xBtnIterate;
+std::unique_ptr m_xBtnIterateImg;
 std::unique_ptr m_xFtSteps;
 std::unique_ptr m_xEdSteps;
+std::unique_ptr m_xEdStepsImg;
 std::unique_ptr m_xFtEps;
 std::unique_ptr m_xEdEps;
+std::unique_ptr m_xEdEpsImg;
 
 std::unique_ptr m_xBtnDateStd;
 std::unique_ptr m_xBtnDateSc10;
 std::unique_ptr m_xBtnDate1904;
+std::unique_ptr m_xDateImg;
 
 std::unique_ptr m_xBtnCase;
+std::unique_ptr m_xBtnCaseImg;
 std::unique_ptr m_xBtnCalc;
+std::unique_ptr m_xBtnCalcImg;
 std::unique_ptr m_xBtnMatch;
+std::unique_ptr m_xBtnMatchImg;
 std::unique_ptr m_xBtnWildcards;
 std::unique_ptr m_xBtnRegex;
 std::unique_ptr m_xBtnLiteral;
+std::unique_ptr m_xFormulaImg;
 std::unique_ptr m_xBtnLookUp;
+std::unique_ptr m_xBtnLookUpImg;
 std::unique_ptr m_xBtnGeneralPrec;
+std::unique_ptr m_xBtnGeneralPrecImg;
 
 std::unique_ptr m_xFtPrec;
 std::unique_ptr m_xEdPrec;
+std::unique_ptr m_xEdPrecImg;
 
 std::unique_ptr m_xBtnThread;
+std::unique_ptr m_xBtnThreadImg;
 
 private:
 voidInit();
diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index 356fcd9bd1fb..edeb306b668d 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -38,27 +38,42 @@ ScTpCalcOptions::ScTpCalcOptions(weld::Container* pPage, 
weld::DialogController*
 rCoreAttrs.Get(SID_SCDOCOPTIONS).GetDocOptions()))
 , pLocalOptions(new ScDocOptions)
 , m_xBtnIterate(m_xBuilder->weld_check_button("iterate"))
+, m_xBtnIterateImg(m_xBuilder->weld_widget("lockiterate"))
 , m_xFtSteps(m_xBuilder->weld_label("stepsft"))
 , m_xEdSteps(m_xBuilder->weld_spin_button("steps"))
+, m_xEdStepsImg(m_xBuilder->weld_widget("locksteps"))
 , m_xFtEps(m_xBuilder->weld_label("minchangeft"))
 , m_xEdEps(new ScDoubleField(m_xBuilder->weld_entry("minchange")))
+, m_xEdEpsImg(m_xBuilder->weld_widget("lockminchange"))
 , m_xBtnDateStd(m_xBuilder->weld_radio_button("datestd"))
 , m_xBtnDateSc10(m_xBuilder->weld_radio_button("datesc10"))
 , m_xBtnDate1904(m_xBuilder->weld_radio_button("date1904"))
+, m_xDateImg(m_xBuilder->weld_widget("lockdate"))
 , m_xBtnCase(m_xBuilder->weld_check_button("case"))
+, m_xBtnCaseImg(m_xBuilder->weld_widget("lockcase"))
 , m_xBtnCalc(m_xBuilder->weld_check_button("calc"))
+, m_xBtnCalcImg(m_xBuilder->weld_widget("lockcalc"))
 , m_xBtnMatch(m_xBuilder->weld_check_button("match"))
+, m_xBtnMatchImg(m_xBuilder->weld_widget("lockmatch"))
 , m_xBtnWildcards(m_xBuilder->weld_radio_button("formulawildcards"))
 , m_xBtnRegex(m_xBuilder->weld_radio_button("formularegex"))
 , m_xBtnLiteral(m_xBuilder->weld_radio_button("formulaliteral"))
+, m_xFormulaImg(m_xBuilder->weld_widget("lockformulawild"))
 , m_xBtnLookUp(m_xBuilder->weld_check_button("lookup"))
+, m_xBtnLookUpImg(m_xBuilder->weld_widget("locklookup"))
 , m_xBtnGeneralPrec(m_xBuilder->weld_check_button("generalprec"))
+, m_xBtnGeneralPrecImg(m_xBuilder->weld_widget("lockgeneralprec"))
 , m_xFtPrec(m_xBuilder->weld_label("precft"))
 , m_xEdPrec(m_xBuilder->weld_spin_button("prec"))
+, m_xEdPrecImg(m_xBuilder->weld_widget("lockprec"))
 , m_xBtnThread(m_xBuilder->weld_check_button("threadingenabled"))
+, m_xBtnThreadImg(m_xBuilder->weld_widget("lockthreadingenabled"))
 {
 Init();
 SetExchangeSupport();
+
+css::uno::Reference < css::uno::XComponentContext > 
xContext(::comphelper::getProcessComponentContext());
+m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, 
"*");
 }
 
 

core.git: sc/uiconfig

2023-12-08 Thread Balazs Varga (via logerrit)
 sc/uiconfig/scalc/ui/optcalculatepage.ui |  344 +++
 1 file changed, 172 insertions(+), 172 deletions(-)

New commits:
commit a7596dd25a9738226bf2637999c61690d7dd659a
Author: Balazs Varga 
AuthorDate: Thu Dec 7 19:53:52 2023 +0100
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Sat Dec 9 06:02:32 2023 +0100

Resave with newer Glade version

Change-Id: I8f140098d4818d46645fbf69703c80e389c1ac72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160461
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/sc/uiconfig/scalc/ui/optcalculatepage.ui 
b/sc/uiconfig/scalc/ui/optcalculatepage.ui
index c26bd44341cb..c88fbdec09a3 100644
--- a/sc/uiconfig/scalc/ui/optcalculatepage.ui
+++ b/sc/uiconfig/scalc/ui/optcalculatepage.ui
@@ -1,55 +1,55 @@
 
-
+
 
   
   
 1
 32767
 100
-1
-10
+1
+10
   
   
 20
-1
-10
+1
+10
   
-  
+  
   
 True
-False
-6
-12
-24
+False
+6
+12
+24
 
   
 True
-False
-0
-none
+False
+0
+none
 
-  
+  
   
 True
-False
-True
-6
-12
+False
 12
 6
+True
+6
+12
 
   
 Enable multi-threaded 
calculation
 True
-True
-False
-Enable multi-threaded 
calculation of formula-groups
-True
-True
+True
+False
+Enable multi-threaded 
calculation of formula-groups
+True
+True
   
   
-0
-0
+0
+0
 2
   
 
@@ -58,7 +58,7 @@
 
   
 True
-False
+False
 CPU Threading Settings
 
   
@@ -67,34 +67,34 @@
 
   
   
-0
-3
+0
+3
 2
   
 
 
   
 True
-False
-0
-none
+False
+0
+none
 
-  
+  
   
 True
-False
-True
+False
 12
 6
+True
 
   
 Case se_nsitive
 True
-True
-False
-Disable case sensitivity for 
interoperability with Microsoft Excel
-True
-True
+True
+False
+Disable case sensitivity for 
interoperability with Microsoft Excel
+True
+True
 
   
 Specifies whether to distinguish 
between upper and lower case in texts when comparing cell contents.
@@ -102,18 +102,18 @@
 
   
   
-0
-0
+0
+0
   
 
 
   
 _Precision as shown
 True
-True
-False
-True
-True
+True
+False
+True
+True
 
   
 Specifies whether to make 
calculations using the rounded values displayed in the sheet. Charts will be 
shown with the displayed values. If the Precision as shown option is not 
marked, the displayed numbers are rounded, but they are calculated internally 
using the non-rounded number.
@@ -121,19 +121,19 @@
 
   
   
-0
-1
+0
+1
   
 
 
   
 Search criteria = and  must apply to 
_whole cells
 True
-True
-False
-Keep this enabled for 
interoperability with Microsoft Excel or for better performance
-True
-True
+True
+False
+Keep this enabled for 
interoperability with Microsoft Excel or for better performance
+True
+True
 
   
 Specifies that the search 
criteria you set for the Calc database functions must match the whole cell 
exactly. When both, the Search criteria = and  must apply to whole 
cells box and the Enable wildcards in formulas box are marked, Calc behaves 
exactly as Microsoft Excel when searching cells in the database 
functions.
@@ 

core.git: sc/source sc/uiconfig

2023-12-07 Thread Balazs Varga (via logerrit)
 sc/source/ui/inc/tpview.hxx|   22 ++
 sc/source/ui/optdlg/tpview.cxx |  112 ++
 sc/uiconfig/scalc/ui/tpviewpage.ui |  387 -
 3 files changed, 476 insertions(+), 45 deletions(-)

New commits:
commit cb099da3923ae2e6cca70a73049f79e55f808d47
Author: Balazs Varga 
AuthorDate: Thu Dec 7 15:35:25 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Dec 8 08:27:03 2023 +0100

tdf#158466 - UI: Part 49 - Unify lockdown behavior of Options dialog

for Calc - View Page.

Change-Id: I75fcb41b82c4946812d27dd364ffef8eb3086c0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160439
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index 6854f77c5eb0..97addc9f530d 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -29,32 +29,54 @@ class ScTpContentOptions : public SfxTabPage
 std::unique_ptr m_xLocalOptions;
 
 std::unique_ptr m_xGridLB;
+std::unique_ptr m_xGridImg;
 std::unique_ptr m_xBreakCB;
+std::unique_ptr m_xBreakImg;
 std::unique_ptr m_xGuideLineCB;
+std::unique_ptr m_xGuideLineImg;
 
 std::unique_ptr m_xFormulaCB;
+std::unique_ptr m_xFormulaImg;
 std::unique_ptr m_xNilCB;
+std::unique_ptr m_xNilImg;
 std::unique_ptr m_xAnnotCB;
+std::unique_ptr m_xAnnotImg;
 std::unique_ptr m_xFormulaMarkCB;
+std::unique_ptr m_xFormulaMarkImg;
 std::unique_ptr m_xValueCB;
+std::unique_ptr m_xValueImg;
 std::unique_ptr m_xColRowHighCB;
+std::unique_ptr m_xColRowHighImg;
 std::unique_ptr m_xAnchorCB;
+std::unique_ptr m_xAnchorImg;
 std::unique_ptr m_xRangeFindCB;
+std::unique_ptr m_xRangeFindImg;
 
 std::unique_ptr m_xObjGrfLB;
+std::unique_ptr m_xObjGrfImg;
 std::unique_ptr m_xDiagramLB;
+std::unique_ptr m_xDiagramImg;
 std::unique_ptr m_xDrawLB;
+std::unique_ptr m_xDrawImg;
 
 std::unique_ptr m_xSyncZoomCB;
+std::unique_ptr m_xSyncZoomImg;
 
 std::unique_ptr m_xRowColHeaderCB;
+std::unique_ptr m_xRowColHeaderImg;
 std::unique_ptr m_xHScrollCB;
+std::unique_ptr m_xHScrollImg;
 std::unique_ptr m_xVScrollCB;
+std::unique_ptr m_xVScrollImg;
 std::unique_ptr m_xTblRegCB;
+std::unique_ptr m_xTblRegImg;
 std::unique_ptr m_xOutlineCB;
+std::unique_ptr m_xOutlineImg;
 std::unique_ptr m_xSummaryCB;
+std::unique_ptr m_xSummaryImg;
 std::unique_ptr m_xThemedCursorRB;
 std::unique_ptr m_xSystemCursorRB;
+std::unique_ptr m_xCursorImg;
 
 voidInitGridOpt();
 DECL_LINK( GridHdl, weld::ComboBox&, void );
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 213d4e73eb7b..73f305dd7ff7 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -38,28 +38,50 @@
 ScTpContentOptions::ScTpContentOptions(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet&  rArgSet)
 : SfxTabPage(pPage, pController, "modules/scalc/ui/tpviewpage.ui", 
"TpViewPage", )
 , m_xGridLB(m_xBuilder->weld_combo_box("grid"))
+, m_xGridImg(m_xBuilder->weld_widget("lockgrid"))
 , m_xBreakCB(m_xBuilder->weld_check_button("break"))
+, m_xBreakImg(m_xBuilder->weld_widget("lockbreak"))
 , m_xGuideLineCB(m_xBuilder->weld_check_button("guideline"))
+, m_xGuideLineImg(m_xBuilder->weld_widget("lockguideline"))
 , m_xFormulaCB(m_xBuilder->weld_check_button("formula"))
+, m_xFormulaImg(m_xBuilder->weld_widget("lockformula"))
 , m_xNilCB(m_xBuilder->weld_check_button("nil"))
+, m_xNilImg(m_xBuilder->weld_widget("locknil"))
 , m_xAnnotCB(m_xBuilder->weld_check_button("annot"))
+, m_xAnnotImg(m_xBuilder->weld_widget("lockannot"))
 , m_xFormulaMarkCB(m_xBuilder->weld_check_button("formulamark"))
+, m_xFormulaMarkImg(m_xBuilder->weld_widget("lockformulamark"))
 , m_xValueCB(m_xBuilder->weld_check_button("value"))
+, m_xValueImg(m_xBuilder->weld_widget("lockvalue"))
 , m_xColRowHighCB(m_xBuilder->weld_check_button("colrowhigh"))
+, m_xColRowHighImg(m_xBuilder->weld_widget("lockcolrowhigh"))
 , m_xAnchorCB(m_xBuilder->weld_check_button("anchor"))
+, m_xAnchorImg(m_xBuilder->weld_widget("lockanchor"))
 , m_xRangeFindCB(m_xBuilder->weld_check_button("rangefind"))
+, m_xRangeFindImg(m_xBuilder->weld_widget("lockrangefind"))
 , m_xObjGrfLB(m_xBuilder->weld_combo_box("objgrf"))
+, m_xObjGrfImg(m_xBuilder->weld_widget("lockobjgrf"))
 , m_xDiagramLB(m_xBuilder->weld_combo_box("diagram"))
+, m_xDiagramImg(m_xBuilder->weld_widget("lockdiagram"))
 , m_xDrawLB(m_xBuilder->weld_combo_box("draw"))
+, m_xDrawImg(m_xBuilder->weld_widget("lockdraw"))
 , m_xSyncZoomCB(m_xBuilder->weld_check_button("synczoom"))
+, m_xSyncZoomImg(m_xBuilder->weld_widget("locksynczoom"))
 , 

core.git: sc/source sc/uiconfig

2023-12-07 Thread Balazs Varga (via logerrit)
 sc/source/ui/inc/tpdefaults.hxx|3 +
 sc/source/ui/optdlg/tpdefaults.cxx |   20 
 sc/uiconfig/scalc/ui/optdefaultpage.ui |   51 +
 3 files changed, 68 insertions(+), 6 deletions(-)

New commits:
commit ea0f4d74143a8109c7c118eb4e5b4bfa611b6a21
Author: Balazs Varga 
AuthorDate: Thu Dec 7 08:31:29 2023 +0100
Commit: Balazs Varga 
CommitDate: Thu Dec 7 15:06:38 2023 +0100

tdf#158465 - UI: Part 48 - Unify lockdown behavior of Options dialog

for Calc - Defaults Page.

Change-Id: I813469c6e56f0bd148afb17644853116e4ae0398
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160419
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/source/ui/inc/tpdefaults.hxx b/sc/source/ui/inc/tpdefaults.hxx
index 76ad8fc133ff..d3760948b6b3 100644
--- a/sc/source/ui/inc/tpdefaults.hxx
+++ b/sc/source/ui/inc/tpdefaults.hxx
@@ -38,8 +38,11 @@ private:
 OUString maOldPrefixValue;
 
 std::unique_ptr m_xEdNSheets;
+std::unique_ptr m_xEdNSheetsImg;
 std::unique_ptr m_xEdSheetPrefix;
+std::unique_ptr m_xEdSheetPrefixImg;
 std::unique_ptr m_xEdJumboSheets;
+std::unique_ptr m_xEdJumboSheetsImg;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx 
b/sc/source/ui/optdlg/tpdefaults.cxx
index 760c029fe9af..4528da5e48b5 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -14,13 +14,17 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 ScTpDefaultsOptions::ScTpDefaultsOptions(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet )
 : SfxTabPage(pPage, pController, "modules/scalc/ui/optdefaultpage.ui", 
"OptDefaultPage", )
 , m_xEdNSheets(m_xBuilder->weld_spin_button("sheetsnumber"))
+, m_xEdNSheetsImg(m_xBuilder->weld_widget("locksheetsnumber"))
 , m_xEdSheetPrefix(m_xBuilder->weld_entry("sheetprefix"))
+, m_xEdSheetPrefixImg(m_xBuilder->weld_widget("locksheetprefix"))
 , m_xEdJumboSheets(m_xBuilder->weld_check_button("jumbo_sheets"))
+, m_xEdJumboSheetsImg(m_xBuilder->weld_widget("lockjumbo_sheets"))
 {
 m_xEdNSheets->connect_changed( LINK(this, ScTpDefaultsOptions, 
NumModifiedHdl) );
 m_xEdSheetPrefix->connect_changed( LINK(this, ScTpDefaultsOptions, 
PrefixModifiedHdl) );
@@ -90,6 +94,22 @@ void ScTpDefaultsOptions::Reset(const SfxItemSet* rCoreSet)
 m_xEdNSheets->set_value(aOpt.GetInitTabCount());
 m_xEdSheetPrefix->set_text( aOpt.GetInitTabPrefix() );
 m_xEdJumboSheets->set_state( aOpt.GetInitJumboSheets() ? TRISTATE_TRUE : 
TRISTATE_FALSE );
+
+bool bReadOnly = 
officecfg::Office::Calc::Defaults::Sheet::SheetCount::isReadOnly();
+m_xEdNSheets->set_sensitive(!bReadOnly);
+m_xEdNSheetsImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Calc::Defaults::Sheet::SheetPrefix::isReadOnly();
+m_xEdSheetPrefix->set_sensitive(!bReadOnly);
+m_xEdSheetPrefixImg->set_visible(bReadOnly);
+
+if (m_xEdJumboSheets->is_visible())
+{
+bReadOnly = 
officecfg::Office::Calc::Defaults::Sheet::JumboSheets::isReadOnly();
+m_xEdJumboSheets->set_sensitive(!bReadOnly);
+m_xEdJumboSheetsImg->set_visible(bReadOnly);
+}
+
 m_xEdNSheets->save_value();
 m_xEdSheetPrefix->save_value();
 m_xEdJumboSheets->save_state();
diff --git a/sc/uiconfig/scalc/ui/optdefaultpage.ui 
b/sc/uiconfig/scalc/ui/optdefaultpage.ui
index 95056beed213..de220b478041 100644
--- a/sc/uiconfig/scalc/ui/optdefaultpage.ui
+++ b/sc/uiconfig/scalc/ui/optdefaultpage.ui
@@ -21,7 +21,7 @@
 0
 none
 
-  
+  
   
 True
 False
@@ -39,7 +39,7 @@
 0
   
   
-0
+1
 0
   
 
@@ -53,7 +53,7 @@
 0
   
   
-0
+1
 1
   
 
@@ -66,7 +66,7 @@
 True
   
   
-1
+2
 1
   
 
@@ -80,7 +80,7 @@
 adjustment1
   
   
-1
+2
 0
   
 
@@ -94,11 +94,50 @@
 True
   
   
-0
+1
 2
 2
   
 
+
+  
+False
+True
+center
+center
+res/lock.png
+  
+  
+0
+0
+  
+
+
+  
+False
+True
+center
+center
+res/lock.png
+  

core.git: sc/uiconfig

2023-12-07 Thread Balazs Varga (via logerrit)
 sc/uiconfig/scalc/ui/optdefaultpage.ui |   74 -
 1 file changed, 37 insertions(+), 37 deletions(-)

New commits:
commit 308d822bf6b277bb7844b2f142fac501ac71a1e9
Author: Balazs Varga 
AuthorDate: Thu Dec 7 08:14:42 2023 +0100
Commit: Balazs Varga 
CommitDate: Thu Dec 7 13:13:17 2023 +0100

Resave with newer Glade version

Change-Id: I252b2a2a51a12463fb2ffc764c2531ac8d5f723c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160418
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/uiconfig/scalc/ui/optdefaultpage.ui 
b/sc/uiconfig/scalc/ui/optdefaultpage.ui
index b234090d40e0..95056beed213 100644
--- a/sc/uiconfig/scalc/ui/optdefaultpage.ui
+++ b/sc/uiconfig/scalc/ui/optdefaultpage.ui
@@ -1,101 +1,101 @@
 
-
+
 
   
   
 1
 32000
 1
-1
-10
+1
+10
   
   
 True
-False
-6
+False
+6
 vertical
 
   
 True
-False
-0
-none
+False
+0
+none
 
-  
+  
   
 True
-False
-6
-12
+False
 12
 6
+6
+12
 
   
 True
-False
+False
 _Number of worksheets in new 
document:
-True
-sheetsnumber
+True
+sheetsnumber
 0
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 _Prefix name for new 
worksheet:
-True
-sheetprefix
+True
+sheetprefix
 0
   
   
-0
-1
+0
+1
   
 
 
   
 True
-True
+True
 center
+True
 True
-True
   
   
-1
-1
+1
+1
   
 
 
   
 True
-True
+True
 start
-True
+True
 True
 adjustment1
   
   
-1
-0
+1
+0
   
 
 
   
 _Enable very large spreadsheets (16m 
rows, 16384 cols)
 True
-True
-False
-True
-True
+True
+False
+True
+True
   
   
-0
-2
+0
+2
 2
   
 
@@ -104,7 +104,7 @@
 
   
 True
-False
+False
 New Spreadsheet
 
   


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

2023-12-06 Thread Balazs Varga (via logerrit)
 sc/source/ui/inc/tpview.hxx   |   12 +
 sc/source/ui/optdlg/tpview.cxx|   91 ++
 sc/uiconfig/scalc/ui/scgeneralpage.ui |  283 +++---
 3 files changed, 325 insertions(+), 61 deletions(-)

New commits:
commit 4022666087f317f9c5f9c966307bcbe85ee5e1b6
Author: Balazs Varga 
AuthorDate: Wed Dec 6 23:29:47 2023 +0100
Commit: Balazs Varga 
CommitDate: Thu Dec 7 08:34:24 2023 +0100

tdf#158464 - UI: Part 47 - Unify lockdown behavior of Options dialog

for Calc - General Page.

Change-Id: I2ff8edd0fb10a3f388459d842c79b157bc3861f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160407
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index 72f3b7668732..6854f77c5eb0 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -81,22 +81,34 @@ class ScTpLayoutOptions : public SfxTabPage
 ScDocument *pDoc;
 
 std::unique_ptr m_xUnitLB;
+std::unique_ptr m_xUnitImg;
 std::unique_ptr m_xTabMF;
+std::unique_ptr m_xTabImg;
 
 std::unique_ptr m_xAlwaysRB;
 std::unique_ptr m_xRequestRB;
 std::unique_ptr m_xNeverRB;
+std::unique_ptr m_xUpdateLinksImg;
 
 std::unique_ptr m_xAlignCB;
+std::unique_ptr m_xAlignImg;
 std::unique_ptr m_xAlignLB;
 std::unique_ptr m_xEditModeCB;
+std::unique_ptr m_xEditModeImg;
 std::unique_ptr m_xFormatCB;
+std::unique_ptr m_xFormatImg;
 std::unique_ptr m_xExpRefCB;
+std::unique_ptr m_xExpRefImg;
 std::unique_ptr m_xSortRefUpdateCB;
+std::unique_ptr m_xSortRefUpdateImg;
 std::unique_ptr m_xMarkHdrCB;
+std::unique_ptr m_xMarkHdrImg;
 std::unique_ptr m_xReplWarnCB;
+std::unique_ptr m_xReplWarnImg;
 std::unique_ptr m_xLegacyCellSelectionCB;
+std::unique_ptr m_xLegacyCellSelectionImg;
 std::unique_ptr m_xEnterPasteModeCB;
+std::unique_ptr m_xEnterPasteModeImg;
 
 DECL_LINK(MetricHdl, weld::ComboBox&, void );
 DECL_LINK( AlignHdl, weld::Toggleable&, void );
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 4b8595899f04..8640e187c5f7 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -32,6 +32,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 ScTpContentOptions::ScTpContentOptions(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet&  rArgSet)
 : SfxTabPage(pPage, pController, "modules/scalc/ui/tpviewpage.ui", 
"TpViewPage", )
@@ -318,20 +321,32 @@ ScTpLayoutOptions::ScTpLayoutOptions(weld::Container* 
pPage, weld::DialogControl
 : SfxTabPage(pPage, pController, "modules/scalc/ui/scgeneralpage.ui", 
"ScGeneralPage", )
 , pDoc(nullptr)
 , m_xUnitLB(m_xBuilder->weld_combo_box("unitlb"))
+, m_xUnitImg(m_xBuilder->weld_widget("lockunitlb"))
 , m_xTabMF(m_xBuilder->weld_metric_spin_button("tabmf", FieldUnit::CM))
+, m_xTabImg(m_xBuilder->weld_widget("locktabmf"))
 , m_xAlwaysRB(m_xBuilder->weld_radio_button("alwaysrb"))
 , m_xRequestRB(m_xBuilder->weld_radio_button("requestrb"))
 , m_xNeverRB(m_xBuilder->weld_radio_button("neverrb"))
+, m_xUpdateLinksImg(m_xBuilder->weld_widget("lockupdatelinks"))
 , m_xAlignCB(m_xBuilder->weld_check_button("aligncb"))
+, m_xAlignImg(m_xBuilder->weld_widget("lockaligncb"))
 , m_xAlignLB(m_xBuilder->weld_combo_box("alignlb"))
 , m_xEditModeCB(m_xBuilder->weld_check_button("editmodecb"))
+, m_xEditModeImg(m_xBuilder->weld_widget("lockeditmodecb"))
 , m_xFormatCB(m_xBuilder->weld_check_button("formatcb"))
+, m_xFormatImg(m_xBuilder->weld_widget("lockformatcb"))
 , m_xExpRefCB(m_xBuilder->weld_check_button("exprefcb"))
+, m_xExpRefImg(m_xBuilder->weld_widget("lockexprefcb"))
 , m_xSortRefUpdateCB(m_xBuilder->weld_check_button("sortrefupdatecb"))
+, m_xSortRefUpdateImg(m_xBuilder->weld_widget("locksortrefupdatecb"))
 , m_xMarkHdrCB(m_xBuilder->weld_check_button("markhdrcb"))
+, m_xMarkHdrImg(m_xBuilder->weld_widget("lockmarkhdrcb"))
 , m_xReplWarnCB(m_xBuilder->weld_check_button("replwarncb"))
+, m_xReplWarnImg(m_xBuilder->weld_widget("lockreplwarncb"))
 , 
m_xLegacyCellSelectionCB(m_xBuilder->weld_check_button("legacy_cell_selection_cb"))
+, m_xLegacyCellSelectionImg(m_xBuilder->weld_widget("locklegacy_cell"))
 , m_xEnterPasteModeCB(m_xBuilder->weld_check_button("enter_paste_mode_cb"))
+, m_xEnterPasteModeImg(m_xBuilder->weld_widget("lockenter_paste"))
 {
 SetExchangeSupport();
 
@@ -530,11 +545,33 @@ voidScTpLayoutOptions::Reset( const SfxItemSet* 
rCoreSet )
 }
 ::SetFieldUnit(*m_xTabMF, eFieldUnit);
 }
-m_xUnitLB->save_value();
+
+bool bReadOnly = false;
+MeasurementSystem eSys = 
ScGlobal::getLocaleData().getMeasurementSystemEnum();
+if (eSys == MeasurementSystem::Metric)
+{
+bReadOnly = 

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

2023-11-29 Thread Balazs Varga (via logerrit)
 sd/source/ui/dlg/prntopts.cxx |   76 +-
 sd/source/ui/inc/prntopts.hxx |2 +
 2 files changed, 55 insertions(+), 23 deletions(-)

New commits:
commit 05f60be48a51a64ce99a7a7b62ae030002b16a14
Author: Balazs Varga 
AuthorDate: Tue Nov 28 14:06:09 2023 +0100
Commit: Balazs Varga 
CommitDate: Wed Nov 29 11:00:41 2023 +0100

tdf#158245 - UI: Part 46 - Unify lockdown behavior of Options dialog

for Draw - Print Page.

Change-Id: I9c5004253b0b871a14fe92475339cdad598491a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160027
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index 6a608932adce..0349fe688919 100644
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -23,12 +23,14 @@
 #include 
 #include 
 #include 
+#include 
 
 /**
  *  dialog to adjust print options
  */
 SdPrintOptions::SdPrintOptions(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rInAttrs)
 : SfxTabPage(pPage, pController, "modules/simpress/ui/prntopts.ui", 
"prntopts", )
+, m_bDrawMode(false)
 , m_xFrmContent(m_xBuilder->weld_frame("contentframe"))
 , m_xCbxDraw(m_xBuilder->weld_check_button("drawingcb"))
 , m_xCbxNotes(m_xBuilder->weld_check_button("notecb"))
@@ -200,41 +202,59 @@ void SdPrintOptions::Reset( const SfxItemSet* rAttrs )
 m_xRbtBlackWhite->set_active(true);
 }
 
-bool bReadOnly = 
officecfg::Office::Impress::Print::Page::PageSize::isReadOnly() ||
-officecfg::Office::Impress::Print::Page::PageTile::isReadOnly() ||
-officecfg::Office::Impress::Print::Page::Booklet::isReadOnly();
+bool bReadOnly = false;
+if (m_bDrawMode)
+{
+bReadOnly = 
officecfg::Office::Draw::Print::Page::PageSize::isReadOnly() ||
+officecfg::Office::Draw::Print::Page::PageTile::isReadOnly() ||
+officecfg::Office::Draw::Print::Page::Booklet::isReadOnly();
+}
+else
+{
+bReadOnly = 
officecfg::Office::Impress::Print::Page::PageSize::isReadOnly() ||
+officecfg::Office::Impress::Print::Page::PageTile::isReadOnly() ||
+officecfg::Office::Impress::Print::Page::Booklet::isReadOnly();
+}
 m_xGridPageOpt->set_sensitive(!bReadOnly);
 m_xRbtPageOptImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Print::Page::BookletFront::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Page::BookletFront::isReadOnly() :
+officecfg::Office::Impress::Print::Page::BookletFront::isReadOnly();
 m_xCbxFront->set_sensitive(!bReadOnly);
 m_xCbxFrontImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Print::Page::BookletBack::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Page::BookletBack::isReadOnly() :
+officecfg::Office::Impress::Print::Page::BookletBack::isReadOnly();
 m_xCbxBack->set_sensitive(!bReadOnly);
 m_xCbxBackImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Print::Other::FromPrinterSetup::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Other::FromPrinterSetup::isReadOnly() :
+
officecfg::Office::Impress::Print::Other::FromPrinterSetup::isReadOnly();
 m_xCbxPaperbin->set_sensitive(!bReadOnly);
 m_xCbxPaperbinImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Print::Other::PageName::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Other::PageName::isReadOnly() :
+officecfg::Office::Impress::Print::Other::PageName::isReadOnly();
 m_xCbxPagename->set_sensitive(!bReadOnly);
 m_xCbxPagenameImg->set_visible(bReadOnly);
 
-bReadOnly = officecfg::Office::Impress::Print::Other::Date::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Other::Date::isReadOnly() :
+officecfg::Office::Impress::Print::Other::Date::isReadOnly();
 m_xCbxDate->set_sensitive(!bReadOnly);
 m_xCbxDateImg->set_visible(bReadOnly);
 
-bReadOnly = officecfg::Office::Impress::Print::Other::Time::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Other::Time::isReadOnly() :
+officecfg::Office::Impress::Print::Other::Time::isReadOnly();
 m_xCbxTime->set_sensitive(!bReadOnly);
 m_xCbxTimeImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Print::Other::HiddenPage::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Print::Other::HiddenPage::isReadOnly() :
+officecfg::Office::Impress::Print::Other::HiddenPage::isReadOnly();
 m_xCbxHiddenPages->set_sensitive(!bReadOnly);
 m_xCbxHiddenPagesImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Print::Other::Quality::isReadOnly();
+bReadOnly = 

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

2023-11-29 Thread Balazs Varga (via logerrit)
 include/svx/optgrid.hxx   |2 +
 sd/source/ui/dlg/tpoption.cxx |   31 +---
 svx/source/dialog/optgrid.cxx |   65 +++---
 3 files changed, 71 insertions(+), 27 deletions(-)

New commits:
commit 2bf8231ab5709f0d7577d6da53f50bc7f0b65079
Author: Balazs Varga 
AuthorDate: Tue Nov 28 11:57:29 2023 +0100
Commit: Balazs Varga 
CommitDate: Wed Nov 29 09:45:57 2023 +0100

tdf#158244 - UI: Part 45 - Unify lockdown behavior of Options dialog

for Draw - Grid Page.

Use the right grid settings associated with the application.
follow-up of fbecf8009af8abdd218fbb3bd26087e8b805d06b

Change-Id: I30b3c7ad80348a9cc89b6ea206a8ad9387276593
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160020
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
index b8e1f5604286..ed71e62cdb53 100644
--- a/include/svx/optgrid.hxx
+++ b/include/svx/optgrid.hxx
@@ -152,6 +152,8 @@ protected:
 std::unique_ptr m_xMtrFldBezAngle;
 std::unique_ptr m_xMtrFldBezAngleImg;
 
+bool IsDrawMode() const { return m_Emode == DRAW_MODE; }
+
 DECL_LINK(ClickRotateHdl_Impl, weld::Toggleable&, void);
 private:
 DECL_DLLPRIVATE_LINK(ChangeDrawHdl_Impl, weld::MetricSpinButton&, void);
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 8c5416c9cb09..812d39ffd8aa 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -83,51 +83,62 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 
 SdOptionsSnapItem aOptsItem( rAttrs->Get( ATTR_OPTIONS_SNAP ) );
 
-bool bReadOnly = 
officecfg::Office::Impress::Snap::Object::SnapLine::isReadOnly();
+bool bDrawMode = SvxGridTabPage::IsDrawMode();
+bool bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::SnapLine::isReadOnly() :
+officecfg::Office::Impress::Snap::Object::SnapLine::isReadOnly();
 m_xCbxSnapHelplines->set_active( 
aOptsItem.GetOptionsSnap().IsSnapHelplines() );
 m_xCbxSnapHelplines->set_sensitive(!bReadOnly);
 m_xCbxSnapHelplinesImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Snap::Object::PageMargin::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::PageMargin::isReadOnly() :
+officecfg::Office::Impress::Snap::Object::PageMargin::isReadOnly();
 m_xCbxSnapBorder->set_active( aOptsItem.GetOptionsSnap().IsSnapBorder() );
 m_xCbxSnapBorder->set_sensitive(!bReadOnly);
 m_xCbxSnapBorderImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Snap::Object::ObjectFrame::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::ObjectFrame::isReadOnly() :
+officecfg::Office::Impress::Snap::Object::ObjectFrame::isReadOnly();
 m_xCbxSnapFrame->set_active( aOptsItem.GetOptionsSnap().IsSnapFrame() );
 m_xCbxSnapFrame->set_sensitive(!bReadOnly);
 m_xCbxSnapFrameImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Snap::Object::ObjectPoint::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::ObjectPoint::isReadOnly() :
+officecfg::Office::Impress::Snap::Object::ObjectPoint::isReadOnly();
 m_xCbxSnapPoints->set_active( aOptsItem.GetOptionsSnap().IsSnapPoints() );
 m_xCbxSnapPoints->set_sensitive(!bReadOnly);
 m_xCbxSnapPointsImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Snap::Position::CreatingMoving::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Position::CreatingMoving::isReadOnly() :
+
officecfg::Office::Impress::Snap::Position::CreatingMoving::isReadOnly();
 m_xCbxOrtho->set_active( aOptsItem.GetOptionsSnap().IsOrtho() );
 m_xCbxOrtho->set_sensitive(!bReadOnly);
 m_xCbxOrthoImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Snap::Position::ExtendEdges::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Position::ExtendEdges::isReadOnly() :
+officecfg::Office::Impress::Snap::Position::ExtendEdges::isReadOnly();
 m_xCbxBigOrtho->set_active( aOptsItem.GetOptionsSnap().IsBigOrtho() );
 m_xCbxBigOrtho->set_sensitive(!bReadOnly);
 m_xCbxBigOrthoImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Snap::Position::Rotating::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Position::Rotating::isReadOnly() :
+officecfg::Office::Impress::Snap::Position::Rotating::isReadOnly();
 m_xCbxRotate->set_active( aOptsItem.GetOptionsSnap().IsRotate() );
 m_xCbxRotate->set_sensitive(!bReadOnly);
 m_xCbxRotateImg->set_visible(bReadOnly);
 
-bReadOnly = officecfg::Office::Impress::Snap::Object::Range::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::Range::isReadOnly() :
+

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

2023-11-29 Thread Balazs Varga (via logerrit)
 sd/source/ui/app/sdmod2.cxx   |7 +++
 sd/source/ui/dlg/tpoption.cxx |   24 
 sd/source/ui/inc/tpoption.hxx |5 +
 3 files changed, 32 insertions(+), 4 deletions(-)

New commits:
commit 34d3f383b62ebd87f842e48e6627dbf5ed369667
Author: Balazs Varga 
AuthorDate: Mon Nov 27 14:03:20 2023 +0100
Commit: Balazs Varga 
CommitDate: Wed Nov 29 09:45:40 2023 +0100

tdf#158243 - UI: Part 44 - Unify lockdown behavior of Options dialog

for Draw - View Page.

Change-Id: If06945482e5a441903d6eb44b66242bd8806bcd6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159995
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index cccf425172bc..8a6424d16263 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -736,7 +736,14 @@ std::unique_ptr SdModule::CreateTabPage( 
sal_uInt16 nId, weld::Conta
 {
 ::CreateTabPage fnCreatePage = 
pFact->GetSdOptionsContentsTabPageCreatorFunc();
 if( fnCreatePage )
+{
 xRet = (*fnCreatePage)( pPage, pController,  );
+if (SID_SD_TP_CONTENTS == nId)
+aSet.Put(SfxUInt32Item(SID_SDMODE_FLAG, SD_DRAW_MODE));
+else
+aSet.Put(SfxUInt32Item(SID_SDMODE_FLAG, SD_IMPRESS_MODE));
+xRet->PageCreated(aSet);
+}
 }
 break;
 case SID_SD_TP_SNAP:
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index f6f5b4f5aa7e..8c5416c9cb09 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -148,6 +148,7 @@ std::unique_ptr SdTpOptionsSnap::Create( 
weld::Container* pPage, wel
 \/
 SdTpOptionsContents::SdTpOptionsContents(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rInAttrs)
 : SfxTabPage(pPage, pController, "modules/simpress/ui/sdviewpage.ui", 
"SdViewPage", )
+, m_bDrawMode(false)
 , m_xCbxRuler(m_xBuilder->weld_check_button("ruler"))
 , m_xCbxRulerImg(m_xBuilder->weld_widget("lockruler"))
 , m_xCbxDragStripes(m_xBuilder->weld_check_button("dragstripes"))
@@ -216,19 +217,23 @@ void SdTpOptionsContents::Reset( const SfxItemSet* rAttrs 
)
 m_xCbxDragStripes->set_active( 
aLayoutItem.GetOptionsLayout().IsDragStripes() );
 m_xCbxHandlesBezier->set_active( 
aLayoutItem.GetOptionsLayout().IsHandlesBezier() );
 
-bool bReadOnly = 
officecfg::Office::Impress::Layout::Display::Ruler::isReadOnly();
+bool bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Layout::Display::Ruler::isReadOnly() :
+officecfg::Office::Impress::Layout::Display::Ruler::isReadOnly();
 m_xCbxRuler->set_sensitive(!bReadOnly);
 m_xCbxRulerImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Layout::Display::Contour::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Layout::Display::Contour::isReadOnly() :
+officecfg::Office::Impress::Layout::Display::Contour::isReadOnly();
 m_xCbxMoveOutline->set_sensitive(!bReadOnly);
 m_xCbxMoveOutlineImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Layout::Display::Guide::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Layout::Display::Guide::isReadOnly() :
+officecfg::Office::Impress::Layout::Display::Guide::isReadOnly();
 m_xCbxDragStripes->set_sensitive(!bReadOnly);
 m_xCbxDragStripesImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Layout::Display::Bezier::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Layout::Display::Bezier::isReadOnly() :
+officecfg::Office::Impress::Layout::Display::Bezier::isReadOnly();
 m_xCbxHandlesBezier->set_sensitive(!bReadOnly);
 m_xCbxHandlesBezierImg->set_visible(bReadOnly);
 
@@ -244,6 +249,17 @@ std::unique_ptr SdTpOptionsContents::Create( 
weld::Container* pPage,
 return std::make_unique(pPage, pController, *rAttrs);
 }
 
+void SdTpOptionsContents::PageCreated( const SfxAllItemSet& aSet )
+{
+const SfxUInt32Item* pFlagItem = 
aSet.GetItem(SID_SDMODE_FLAG, false);
+if (pFlagItem)
+{
+sal_uInt32 nFlags = pFlagItem->GetValue();
+if ((nFlags & SD_DRAW_MODE) == SD_DRAW_MODE)
+SetDrawMode();
+}
+}
+
 /*
 |*
 |*  TabPage to adjust the misc options
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index e53c55284cf0..e1065eb28b1b 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -42,6 +42,7 @@ public:
 class SdTpOptionsContents final : public SfxTabPage
 {
 private:
+bool m_bDrawMode;
 std::unique_ptr m_xCbxRuler;
 std::unique_ptr m_xCbxRulerImg;
 

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

2023-11-26 Thread Balazs Varga (via logerrit)
 sd/source/ui/dlg/tpoption.cxx|   59 ++-
 sd/source/ui/inc/tpoption.hxx|3 +
 sd/uiconfig/simpress/ui/optimpressgeneralpage.ui |   53 +++-
 3 files changed, 92 insertions(+), 23 deletions(-)

New commits:
commit 60969b81dd710f26e50f3428f5544ae368010d79
Author: Balazs Varga 
AuthorDate: Fri Nov 24 18:00:44 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Nov 27 08:49:18 2023 +0100

tdf#158241 - UI: Part 43 - Unify lockdown behavior of Options dialog

for Draw - General Page.

Change-Id: Ib17d638580011362cde5c2adea7e7e2d6e7d0eb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159936
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 300b5caedd71..f6f5b4f5aa7e 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -255,6 +256,7 @@ SdTpOptionsMisc::SdTpOptionsMisc(weld::Container* pPage, 
weld::DialogController*
 : SfxTabPage(pPage, pController, 
"modules/simpress/ui/optimpressgeneralpage.ui", "OptSavePage", )
 , nWidth(0)
 , nHeight(0)
+, m_bDrawMode(false)
 , m_xCbxQuickEdit(m_xBuilder->weld_check_button("qickedit"))
 , m_xCbxQuickEditImg(m_xBuilder->weld_widget("lockqickedit"))
 , m_xCbxPickThrough(m_xBuilder->weld_check_button("textselected"))
@@ -276,6 +278,7 @@ SdTpOptionsMisc::SdTpOptionsMisc(weld::Container* pPage, 
weld::DialogController*
 , m_xCbxCompatibilityImg(m_xBuilder->weld_widget("lockcbCompatibility"))
 , m_xScaleFrame(m_xBuilder->weld_frame("scaleframe"))
 , m_xCbScale(m_xBuilder->weld_combo_box("scaleBox"))
+, m_xCbScaleImg(m_xBuilder->weld_widget("lockscaleBox"))
 , m_xNewDocLb(m_xBuilder->weld_label("newdoclbl"))
 , m_xFiInfo1(m_xBuilder->weld_label("info1"))
 , 
m_xMtrFldOriginalWidth(m_xBuilder->weld_metric_spin_button("metricWidthFields", 
FieldUnit::MM))
@@ -284,6 +287,7 @@ SdTpOptionsMisc::SdTpOptionsMisc(weld::Container* pPage, 
weld::DialogController*
 , m_xFiInfo2(m_xBuilder->weld_label("info2"))
 , 
m_xMtrFldOriginalHeight(m_xBuilder->weld_metric_spin_button("metricHeightFields",
 FieldUnit::MM))
 , m_xCbxDistort(m_xBuilder->weld_check_button("distortcb"))
+, m_xCbxDistortImg(m_xBuilder->weld_widget("lockdistortcb"))
 , m_xMtrFldInfo1(m_xBuilder->weld_metric_spin_button("metricInfo1Fields", 
FieldUnit::MM))
 , m_xMtrFldInfo2(m_xBuilder->weld_metric_spin_button("metricInfo2Fields", 
FieldUnit::MM))
 {
@@ -500,42 +504,54 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs )
 {
 SdOptionsMiscItem aOptsItem( rAttrs->Get( ATTR_OPTIONS_MISC ) );
 
-bool bReadOnly = 
officecfg::Office::Impress::Misc::NewDoc::AutoPilot::isReadOnly();
+bool bReadOnly = m_bDrawMode ? false : 
officecfg::Office::Impress::Misc::NewDoc::AutoPilot::isReadOnly();
 m_xCbxStartWithTemplate->set_active( 
aOptsItem.GetOptionsMisc().IsStartWithTemplate() );
 m_xCbxStartWithTemplate->set_sensitive(!bReadOnly);
 m_xCbxStartWithTemplateImg->set_visible(bReadOnly);
 
-bReadOnly = officecfg::Office::Impress::Misc::ObjectMoveable::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Misc::ObjectMoveable::isReadOnly() :
+officecfg::Office::Impress::Misc::ObjectMoveable::isReadOnly();
 m_xCbxMarkedHitMovesAlways->set_active( 
aOptsItem.GetOptionsMisc().IsMarkedHitMovesAlways() );
 m_xCbxMarkedHitMovesAlways->set_sensitive(!bReadOnly);
 m_xCbxMarkedHitMovesAlwaysImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Misc::TextObject::QuickEditing::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Misc::TextObject::QuickEditing::isReadOnly() :
+
officecfg::Office::Impress::Misc::TextObject::QuickEditing::isReadOnly();
 m_xCbxQuickEdit->set_active( aOptsItem.GetOptionsMisc().IsQuickEdit() );
 m_xCbxQuickEdit->set_sensitive(!bReadOnly);
 m_xCbxQuickEditImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Misc::TextObject::Selectable::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Misc::TextObject::Selectable::isReadOnly() :
+officecfg::Office::Impress::Misc::TextObject::Selectable::isReadOnly();
 m_xCbxPickThrough->set_active( aOptsItem.GetOptionsMisc().IsPickThrough() 
);
 m_xCbxPickThrough->set_sensitive(!bReadOnly);
 m_xCbxPickThroughImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Misc::BackgroundCache::isReadOnly();
+bReadOnly = m_bDrawMode ? 
officecfg::Office::Draw::Misc::BackgroundCache::isReadOnly() :
+officecfg::Office::Impress::Misc::BackgroundCache::isReadOnly();
 m_xCbxMasterPageCache->set_active( 
aOptsItem.GetOptionsMisc().IsMasterPagePaintCaching() );
 

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

2023-11-24 Thread Balazs Varga (via logerrit)
 sd/source/ui/dlg/prntopts.cxx   |   63 ++
 sd/source/ui/inc/prntopts.hxx   |   10 +
 sd/uiconfig/simpress/ui/prntopts.ui |  335 
 3 files changed, 293 insertions(+), 115 deletions(-)

New commits:
commit 6f32acbbf8e2f42dd926b42d7718056db5bbee94
Author: Balazs Varga 
AuthorDate: Fri Nov 24 14:15:46 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 24 15:17:12 2023 +0100

tdf#158240 - UI: Part 42 - Unify lockdown behavior of Options dialog

for Impress - Print Page.

Change-Id: I96e90ab09ee4bc80b097799970a5b1c56fc47048
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159927
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index 8b17ae6d59ab..6a608932adce 100644
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /**
  *  dialog to adjust print options
@@ -36,17 +37,27 @@ SdPrintOptions::SdPrintOptions(weld::Container* pPage, 
weld::DialogController* p
 , m_xRbtColor(m_xBuilder->weld_radio_button("defaultrb"))
 , m_xRbtGrayscale(m_xBuilder->weld_radio_button("grayscalerb"))
 , m_xRbtBlackWhite(m_xBuilder->weld_radio_button("blackwhiterb"))
+, m_xRbQualityImg(m_xBuilder->weld_widget("lockquality"))
 , m_xCbxPagename(m_xBuilder->weld_check_button("pagenmcb"))
+, m_xCbxPagenameImg(m_xBuilder->weld_widget("lockpagenmcb"))
 , m_xCbxDate(m_xBuilder->weld_check_button("datecb"))
+, m_xCbxDateImg(m_xBuilder->weld_widget("lockdatecb"))
 , m_xCbxTime(m_xBuilder->weld_check_button("timecb"))
+, m_xCbxTimeImg(m_xBuilder->weld_widget("locktimecb"))
 , m_xCbxHiddenPages(m_xBuilder->weld_check_button("hiddenpgcb"))
+, m_xCbxHiddenPagesImg(m_xBuilder->weld_widget("lockhiddenpgcb"))
 , m_xRbtDefault(m_xBuilder->weld_radio_button("pagedefaultrb"))
 , m_xRbtPagesize(m_xBuilder->weld_radio_button("fittopgrb"))
 , m_xRbtPagetile(m_xBuilder->weld_radio_button("tilepgrb"))
 , m_xRbtBooklet(m_xBuilder->weld_radio_button("brouchrb"))
+, m_xGridPageOpt(m_xBuilder->weld_widget("pageoptions"))
+, m_xRbtPageOptImg(m_xBuilder->weld_widget("lockpageoptions"))
 , m_xCbxFront(m_xBuilder->weld_check_button("frontcb"))
+, m_xCbxFrontImg(m_xBuilder->weld_widget("lockfrontcb"))
 , m_xCbxBack(m_xBuilder->weld_check_button("backcb"))
+, m_xCbxBackImg(m_xBuilder->weld_widget("lockbackcb"))
 , m_xCbxPaperbin(m_xBuilder->weld_check_button("papertryfrmprntrcb"))
+, m_xCbxPaperbinImg(m_xBuilder->weld_widget("lockpapertryfrmprntrcb"))
 {
 Link aLink = LINK( this, SdPrintOptions, 
ClickBookletHdl );
 m_xRbtDefault->connect_toggled( aLink );
@@ -188,6 +199,47 @@ void SdPrintOptions::Reset( const SfxItemSet* rAttrs )
 else
 m_xRbtBlackWhite->set_active(true);
 }
+
+bool bReadOnly = 
officecfg::Office::Impress::Print::Page::PageSize::isReadOnly() ||
+officecfg::Office::Impress::Print::Page::PageTile::isReadOnly() ||
+officecfg::Office::Impress::Print::Page::Booklet::isReadOnly();
+m_xGridPageOpt->set_sensitive(!bReadOnly);
+m_xRbtPageOptImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Print::Page::BookletFront::isReadOnly();
+m_xCbxFront->set_sensitive(!bReadOnly);
+m_xCbxFrontImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Print::Page::BookletBack::isReadOnly();
+m_xCbxBack->set_sensitive(!bReadOnly);
+m_xCbxBackImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Print::Other::FromPrinterSetup::isReadOnly();
+m_xCbxPaperbin->set_sensitive(!bReadOnly);
+m_xCbxPaperbinImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Print::Other::PageName::isReadOnly();
+m_xCbxPagename->set_sensitive(!bReadOnly);
+m_xCbxPagenameImg->set_visible(bReadOnly);
+
+bReadOnly = officecfg::Office::Impress::Print::Other::Date::isReadOnly();
+m_xCbxDate->set_sensitive(!bReadOnly);
+m_xCbxDateImg->set_visible(bReadOnly);
+
+bReadOnly = officecfg::Office::Impress::Print::Other::Time::isReadOnly();
+m_xCbxTime->set_sensitive(!bReadOnly);
+m_xCbxTimeImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Print::Other::HiddenPage::isReadOnly();
+m_xCbxHiddenPages->set_sensitive(!bReadOnly);
+m_xCbxHiddenPagesImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Print::Other::Quality::isReadOnly();
+m_xRbtColor->set_sensitive(!bReadOnly);
+m_xRbtGrayscale->set_sensitive(!bReadOnly);
+m_xRbtBlackWhite->set_sensitive(!bReadOnly);
+m_xRbQualityImg->set_visible(bReadOnly);
+
 m_xCbxDraw->save_state();
 m_xCbxNotes->save_state();
 m_xCbxHandout->save_state();
@@ -229,13 +281,14 @@ IMPL_LINK_NOARG(SdPrintOptions, ClickBookletHdl, 
weld::Toggleable&, 

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

2023-11-24 Thread Balazs Varga (via logerrit)
 include/svx/optgrid.hxx|   19 
 sd/source/ui/dlg/tpoption.cxx  |   38 +
 svx/source/dialog/optgrid.cxx  |  125 +++
 svx/uiconfig/ui/optgridpage.ui |  162 +
 4 files changed, 313 insertions(+), 31 deletions(-)

New commits:
commit fbecf8009af8abdd218fbb3bd26087e8b805d06b
Author: Balazs Varga 
AuthorDate: Thu Nov 23 12:20:37 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 24 15:16:43 2023 +0100

tdf#158239 - UI: Part 41 - Unify lockdown behavior of Options dialog

for Impress - Grid Page.

Change-Id: I0864a0a47a890c34154e775a1f960fdff09de81c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159868
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
index c033d001871c..b8e1f5604286 100644
--- a/include/svx/optgrid.hxx
+++ b/include/svx/optgrid.hxx
@@ -104,8 +104,16 @@ public:
 virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet ) override;
 
 private:
+enum ModuleMode
+{
+WRITER_MODE = 0,
+CALC_MODE = 1,
+IMPRESS_MODE = 2,
+DRAW_MODE = 3,
+HTML_MODE = 4
+};
 boolbAttrModified;
-boolm_bHTMLMode;
+ModuleMode  m_Emode;
 
 std::unique_ptr m_xCbxUseGridsnap;
 std::unique_ptr m_xCbxUseGridsnapImg;
@@ -125,15 +133,24 @@ protected:
 //these controls are used in draw and impress
 std::unique_ptr m_xSnapFrames;
 std::unique_ptr m_xCbxSnapHelplines;
+std::unique_ptr m_xCbxSnapHelplinesImg;
 std::unique_ptr m_xCbxSnapBorder;
+std::unique_ptr m_xCbxSnapBorderImg;
 std::unique_ptr m_xCbxSnapFrame;
+std::unique_ptr m_xCbxSnapFrameImg;
 std::unique_ptr m_xCbxSnapPoints;
+std::unique_ptr m_xCbxSnapPointsImg;
 std::unique_ptr m_xMtrFldSnapArea;
+std::unique_ptr m_xMtrFldSnapAreaImg;
 std::unique_ptr m_xCbxOrtho;
+std::unique_ptr m_xCbxOrthoImg;
 std::unique_ptr m_xCbxBigOrtho;
+std::unique_ptr m_xCbxBigOrthoImg;
 std::unique_ptr m_xCbxRotate;
+std::unique_ptr m_xCbxRotateImg;
 std::unique_ptr m_xMtrFldAngle;
 std::unique_ptr m_xMtrFldBezAngle;
+std::unique_ptr m_xMtrFldBezAngleImg;
 
 DECL_LINK(ClickRotateHdl_Impl, weld::Toggleable&, void);
 private:
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index fabf76255bd7..300b5caedd71 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -82,16 +82,54 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 
 SdOptionsSnapItem aOptsItem( rAttrs->Get( ATTR_OPTIONS_SNAP ) );
 
+bool bReadOnly = 
officecfg::Office::Impress::Snap::Object::SnapLine::isReadOnly();
 m_xCbxSnapHelplines->set_active( 
aOptsItem.GetOptionsSnap().IsSnapHelplines() );
+m_xCbxSnapHelplines->set_sensitive(!bReadOnly);
+m_xCbxSnapHelplinesImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Object::PageMargin::isReadOnly();
 m_xCbxSnapBorder->set_active( aOptsItem.GetOptionsSnap().IsSnapBorder() );
+m_xCbxSnapBorder->set_sensitive(!bReadOnly);
+m_xCbxSnapBorderImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Object::ObjectFrame::isReadOnly();
 m_xCbxSnapFrame->set_active( aOptsItem.GetOptionsSnap().IsSnapFrame() );
+m_xCbxSnapFrame->set_sensitive(!bReadOnly);
+m_xCbxSnapFrameImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Object::ObjectPoint::isReadOnly();
 m_xCbxSnapPoints->set_active( aOptsItem.GetOptionsSnap().IsSnapPoints() );
+m_xCbxSnapPoints->set_sensitive(!bReadOnly);
+m_xCbxSnapPointsImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Position::CreatingMoving::isReadOnly();
 m_xCbxOrtho->set_active( aOptsItem.GetOptionsSnap().IsOrtho() );
+m_xCbxOrtho->set_sensitive(!bReadOnly);
+m_xCbxOrthoImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Position::ExtendEdges::isReadOnly();
 m_xCbxBigOrtho->set_active( aOptsItem.GetOptionsSnap().IsBigOrtho() );
+m_xCbxBigOrtho->set_sensitive(!bReadOnly);
+m_xCbxBigOrthoImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Position::Rotating::isReadOnly();
 m_xCbxRotate->set_active( aOptsItem.GetOptionsSnap().IsRotate() );
+m_xCbxRotate->set_sensitive(!bReadOnly);
+m_xCbxRotateImg->set_visible(bReadOnly);
+
+bReadOnly = officecfg::Office::Impress::Snap::Object::Range::isReadOnly();
 m_xMtrFldSnapArea->set_value(aOptsItem.GetOptionsSnap().GetSnapArea(), 
FieldUnit::PIXEL);
+m_xMtrFldSnapArea->set_sensitive(!bReadOnly);
+m_xMtrFldSnapAreaImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Position::RotatingValue::isReadOnly();
 

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

2023-11-24 Thread Balazs Varga (via logerrit)
 sd/source/ui/dlg/tpoption.cxx |   20 
 sd/source/ui/inc/tpoption.hxx |4 +
 sd/uiconfig/simpress/ui/sdviewpage.ui |   78 +++---
 3 files changed, 87 insertions(+), 15 deletions(-)

New commits:
commit b1a866caccb322ec6e88eac67710310160e72b58
Author: Balazs Varga 
AuthorDate: Thu Nov 23 11:39:09 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 24 14:18:23 2023 +0100

tdf#158238 - UI: Part 40 - Unify lockdown behavior of Options dialog

for Impress - View Page.

Change-Id: Icc3c4fc9dd3800ef454cbddb06e569e03c08967a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159856
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index b177c8e94064..fabf76255bd7 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -110,9 +110,13 @@ std::unique_ptr SdTpOptionsSnap::Create( 
weld::Container* pPage, wel
 SdTpOptionsContents::SdTpOptionsContents(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rInAttrs)
 : SfxTabPage(pPage, pController, "modules/simpress/ui/sdviewpage.ui", 
"SdViewPage", )
 , m_xCbxRuler(m_xBuilder->weld_check_button("ruler"))
+, m_xCbxRulerImg(m_xBuilder->weld_widget("lockruler"))
 , m_xCbxDragStripes(m_xBuilder->weld_check_button("dragstripes"))
+, m_xCbxDragStripesImg(m_xBuilder->weld_widget("lockdragstripes"))
 , m_xCbxHandlesBezier(m_xBuilder->weld_check_button("handlesbezier"))
+, m_xCbxHandlesBezierImg(m_xBuilder->weld_widget("lockhandlesbezier"))
 , m_xCbxMoveOutline(m_xBuilder->weld_check_button("moveoutline"))
+, m_xCbxMoveOutlineImg(m_xBuilder->weld_widget("lockmoveoutline"))
 {
 }
 
@@ -173,6 +177,22 @@ void SdTpOptionsContents::Reset( const SfxItemSet* rAttrs )
 m_xCbxDragStripes->set_active( 
aLayoutItem.GetOptionsLayout().IsDragStripes() );
 m_xCbxHandlesBezier->set_active( 
aLayoutItem.GetOptionsLayout().IsHandlesBezier() );
 
+bool bReadOnly = 
officecfg::Office::Impress::Layout::Display::Ruler::isReadOnly();
+m_xCbxRuler->set_sensitive(!bReadOnly);
+m_xCbxRulerImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Layout::Display::Contour::isReadOnly();
+m_xCbxMoveOutline->set_sensitive(!bReadOnly);
+m_xCbxMoveOutlineImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Layout::Display::Guide::isReadOnly();
+m_xCbxDragStripes->set_sensitive(!bReadOnly);
+m_xCbxDragStripesImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Layout::Display::Bezier::isReadOnly();
+m_xCbxHandlesBezier->set_sensitive(!bReadOnly);
+m_xCbxHandlesBezierImg->set_visible(bReadOnly);
+
 m_xCbxRuler->save_state();
 m_xCbxMoveOutline->save_state();
 m_xCbxDragStripes->save_state();
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index 4184cd7400d5..79735e6a3f81 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -43,9 +43,13 @@ class SdTpOptionsContents final : public SfxTabPage
 {
 private:
 std::unique_ptr m_xCbxRuler;
+std::unique_ptr m_xCbxRulerImg;
 std::unique_ptr m_xCbxDragStripes;
+std::unique_ptr m_xCbxDragStripesImg;
 std::unique_ptr m_xCbxHandlesBezier;
+std::unique_ptr m_xCbxHandlesBezierImg;
 std::unique_ptr m_xCbxMoveOutline;
+std::unique_ptr m_xCbxMoveOutlineImg;
 
 public:
 SdTpOptionsContents(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rInAttrs);
diff --git a/sd/uiconfig/simpress/ui/sdviewpage.ui 
b/sd/uiconfig/simpress/ui/sdviewpage.ui
index 52193b075c1e..608114e88fa9 100644
--- a/sd/uiconfig/simpress/ui/sdviewpage.ui
+++ b/sd/uiconfig/simpress/ui/sdviewpage.ui
@@ -10,13 +10,13 @@
 0
 none
 
-  
+  
+  
 True
 False
 12
 6
-vertical
-6
+6
 
   
 _Rulers visible
@@ -32,9 +32,8 @@
 
   
   
-False
-True
-0
+1
+0
   
 
 
@@ -52,9 +51,8 @@
 
   
   
-False
-True
-1
+1
+1
   
 
 
@@ -72,9 +70,8 @@
 
   
   
-False
-True
-2
+1
+2
   
 
 
@@ -92,9 +89,60 @@
 
   
   
-False
-True
-3
+1
+3
+  
+
+
+  
+False
+True
+center
+center
+res/lock.png
+  
+  
+0
+0
+  
+
+
+  
+False
+True
+   

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

2023-11-24 Thread Balazs Varga (via logerrit)
 sd/uiconfig/simpress/ui/sdviewpage.ui |   50 +-
 1 file changed, 25 insertions(+), 25 deletions(-)

New commits:
commit afd3517301d28145861aa7725fd5879aa881
Author: Balazs Varga 
AuthorDate: Thu Nov 23 11:10:58 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 24 14:18:05 2023 +0100

Resave with newer Glade version

Change-Id: I238bb0d6f54a6df0bdab6cd93a73f75746cfdb6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159855
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/uiconfig/simpress/ui/sdviewpage.ui 
b/sd/uiconfig/simpress/ui/sdviewpage.ui
index d3e54dd8ca15..52193b075c1e 100644
--- a/sd/uiconfig/simpress/ui/sdviewpage.ui
+++ b/sd/uiconfig/simpress/ui/sdviewpage.ui
@@ -1,30 +1,30 @@
 
-
+
 
   
   
 True
-False
+False
 True
-6
-0
-none
+6
+0
+none
 
   
 True
-False
-vertical
-6
+False
 12
 6
+vertical
+6
 
   
 _Rulers visible
 True
-True
-False
-True
-True
+True
+False
+True
+True
 
   
 Specifies whether to display 
the rulers at the top and to the left of the work area.
@@ -41,10 +41,10 @@
   
 _Helplines while moving
 True
-True
-False
-True
-True
+True
+False
+True
+True
 
   
 Specifies whether to 
display guides when moving an object.
@@ -61,10 +61,10 @@
   
 _All control points in Bézier 
editor
 True
-True
-False
-True
-True
+True
+False
+True
+True
 
   
 Displays the control 
points of all Bézier points if you have previously selected a Bézier curve. If 
the All control points in Bézier editor option is not marked, only the control 
points of the selected Bézier points will be visible.
@@ -81,10 +81,10 @@
   
 _Contour of each individual object
 True
-True
-False
-True
-True
+True
+False
+True
+True
 
   
 The contour line of each 
individual object is displayed when moving this object.
@@ -102,7 +102,7 @@
 
   
 True
-False
+False
 Display
 
   


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

2023-11-24 Thread Balazs Varga (via logerrit)
 sd/source/ui/dlg/tpoption.cxx|   55 -
 sd/source/ui/inc/tpoption.hxx|9 +
 sd/uiconfig/simpress/ui/optimpressgeneralpage.ui |  140 +--
 3 files changed, 193 insertions(+), 11 deletions(-)

New commits:
commit 256ec735299e95f03f87a1356a30147c67388d24
Author: Balazs Varga 
AuthorDate: Thu Nov 23 10:45:24 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 24 14:17:47 2023 +0100

tdf#158222 - UI: Part 39 - Unify lockdown behavior of Options dialog

for Impress - General Page.

Change-Id: Idd7240b6c0ccfec8929e2f224a63ec5c0a8ad331
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159854
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index c7ee0843a42b..b177c8e94064 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -197,15 +198,24 @@ SdTpOptionsMisc::SdTpOptionsMisc(weld::Container* pPage, 
weld::DialogController*
 , nWidth(0)
 , nHeight(0)
 , m_xCbxQuickEdit(m_xBuilder->weld_check_button("qickedit"))
+, m_xCbxQuickEditImg(m_xBuilder->weld_widget("lockqickedit"))
 , m_xCbxPickThrough(m_xBuilder->weld_check_button("textselected"))
+, m_xCbxPickThroughImg(m_xBuilder->weld_widget("locktextselected"))
 , m_xNewDocumentFrame(m_xBuilder->weld_frame("newdocumentframe"))
 , m_xCbxStartWithTemplate(m_xBuilder->weld_check_button("startwithwizard"))
+, 
m_xCbxStartWithTemplateImg(m_xBuilder->weld_widget("lockstartwithwizard"))
 , m_xCbxMasterPageCache(m_xBuilder->weld_check_button("backgroundback"))
+, m_xCbxMasterPageCacheImg(m_xBuilder->weld_widget("lockbackgroundback"))
 , m_xCbxCopy(m_xBuilder->weld_check_button("copywhenmove"))
+, m_xCbxCopyImg(m_xBuilder->weld_widget("lockcopywhenmove"))
 , m_xCbxMarkedHitMovesAlways(m_xBuilder->weld_check_button("objalwymov"))
+, m_xCbxMarkedHitMovesAlwaysImg(m_xBuilder->weld_widget("lockobjalwymov"))
 , m_xLbMetric(m_xBuilder->weld_combo_box("units"))
+, m_xLbMetricImg(m_xBuilder->weld_widget("lockunits"))
 , m_xMtrFldTabstop(m_xBuilder->weld_metric_spin_button("metricFields", 
FieldUnit::MM))
+, m_xMtrFldTabstopImg(m_xBuilder->weld_widget("locktabstop"))
 , m_xCbxCompatibility(m_xBuilder->weld_check_button("cbCompatibility"))
+, m_xCbxCompatibilityImg(m_xBuilder->weld_widget("lockcbCompatibility"))
 , m_xScaleFrame(m_xBuilder->weld_frame("scaleframe"))
 , m_xCbScale(m_xBuilder->weld_combo_box("scaleBox"))
 , m_xNewDocLb(m_xBuilder->weld_label("newdoclbl"))
@@ -432,13 +442,41 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs )
 {
 SdOptionsMiscItem aOptsItem( rAttrs->Get( ATTR_OPTIONS_MISC ) );
 
+bool bReadOnly = 
officecfg::Office::Impress::Misc::NewDoc::AutoPilot::isReadOnly();
 m_xCbxStartWithTemplate->set_active( 
aOptsItem.GetOptionsMisc().IsStartWithTemplate() );
+m_xCbxStartWithTemplate->set_sensitive(!bReadOnly);
+m_xCbxStartWithTemplateImg->set_visible(bReadOnly);
+
+bReadOnly = officecfg::Office::Impress::Misc::ObjectMoveable::isReadOnly();
 m_xCbxMarkedHitMovesAlways->set_active( 
aOptsItem.GetOptionsMisc().IsMarkedHitMovesAlways() );
+m_xCbxMarkedHitMovesAlways->set_sensitive(!bReadOnly);
+m_xCbxMarkedHitMovesAlwaysImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Misc::TextObject::QuickEditing::isReadOnly();
 m_xCbxQuickEdit->set_active( aOptsItem.GetOptionsMisc().IsQuickEdit() );
+m_xCbxQuickEdit->set_sensitive(!bReadOnly);
+m_xCbxQuickEditImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Misc::TextObject::Selectable::isReadOnly();
 m_xCbxPickThrough->set_active( aOptsItem.GetOptionsMisc().IsPickThrough() 
);
+m_xCbxPickThrough->set_sensitive(!bReadOnly);
+m_xCbxPickThroughImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Misc::BackgroundCache::isReadOnly();
 m_xCbxMasterPageCache->set_active( 
aOptsItem.GetOptionsMisc().IsMasterPagePaintCaching() );
+m_xCbxMasterPageCache->set_sensitive(!bReadOnly);
+m_xCbxMasterPageCacheImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Misc::CopyWhileMoving::isReadOnly();
 m_xCbxCopy->set_active( aOptsItem.GetOptionsMisc().IsDragWithCopy() );
+m_xCbxCopy->set_sensitive(!bReadOnly);
+m_xCbxCopyImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Misc::Compatibility::AddBetween::isReadOnly();
 m_xCbxCompatibility->set_active( 
aOptsItem.GetOptionsMisc().IsSummationOfParagraphs() );
+m_xCbxCompatibility->set_sensitive(!bReadOnly);
+m_xCbxCompatibilityImg->set_visible(bReadOnly);
+
 m_xCbxDistort->set_active( 
aOptsItem.GetOptionsMisc().IsCrookNoContortion() );
 

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

2023-11-22 Thread Balazs Varga (via logerrit)
 starmath/inc/dialog.hxx |9 
 starmath/source/dialog.cxx  |   53 +++
 starmath/uiconfig/smath/ui/smathsettings.ui |  455 
 3 files changed, 393 insertions(+), 124 deletions(-)

New commits:
commit 278c5d22928a05cbfe887e38bc93a5051d0f59d4
Author: Balazs Varga 
AuthorDate: Wed Nov 22 14:21:00 2023 +0100
Commit: Balazs Varga 
CommitDate: Wed Nov 22 19:18:23 2023 +0100

tdf#158147 - UI: Part 38 - Unify lockdown behavior of Options dialog

for Math - Settings Page.

Change-Id: I05170a6c7edb6160e0e7804fa04325d329499854
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159819
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 66db01d295f4..3b4f80b8e61c 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -40,17 +40,26 @@ void SetFontStyle(std::u16string_view rStyleName, vcl::Font 
);
 class SmPrintOptionsTabPage final : public SfxTabPage
 {
 std::unique_ptr  m_xTitle;
+std::unique_ptr  m_xTitleImg;
 std::unique_ptr  m_xText;
+std::unique_ptr  m_xTextImg;
 std::unique_ptr  m_xFrame;
+std::unique_ptr  m_xFrameImg;
 std::unique_ptr  m_xSizeNormal;
 std::unique_ptr  m_xSizeScaled;
 std::unique_ptr  m_xSizeZoomed;
+std::unique_ptr  m_xLockPrintImg;
 std::unique_ptr m_xZoom;
 std::unique_ptr  m_xEnableInlineEdit;
+std::unique_ptr  m_xEnableInlineEditImg;
 std::unique_ptr  m_xNoRightSpaces;
+std::unique_ptr  m_xNoRightSpacesImg;
 std::unique_ptr  m_xSaveOnlyUsedSymbols;
+std::unique_ptr  m_xSaveOnlyUsedSymbolsImg;
 std::unique_ptr  m_xAutoCloseBrackets;
+std::unique_ptr  m_xAutoCloseBracketsImg;
 std::unique_ptr m_xSmZoom;
+std::unique_ptr m_xSmZoomImg;
 
 DECL_LINK(SizeButtonClickHdl, weld::Toggleable&, void);
 
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index f96f43cfebba..1ad8376e5a7f 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -179,17 +180,26 @@ IMPL_LINK_NOARG(SmPrintOptionsTabPage, 
SizeButtonClickHdl, weld::Toggleable&, vo
 SmPrintOptionsTabPage::SmPrintOptionsTabPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rOptions)
 : SfxTabPage(pPage, pController, "modules/smath/ui/smathsettings.ui", 
"SmathSettings", )
 , m_xTitle(m_xBuilder->weld_check_button("title"))
+, m_xTitleImg(m_xBuilder->weld_widget("locktitle"))
 , m_xText(m_xBuilder->weld_check_button("text"))
+, m_xTextImg(m_xBuilder->weld_widget("locktext"))
 , m_xFrame(m_xBuilder->weld_check_button("frame"))
+, m_xFrameImg(m_xBuilder->weld_widget("lockframe"))
 , m_xSizeNormal(m_xBuilder->weld_radio_button("sizenormal"))
 , m_xSizeScaled(m_xBuilder->weld_radio_button("sizescaled"))
 , m_xSizeZoomed(m_xBuilder->weld_radio_button("sizezoomed"))
+, m_xLockPrintImg(m_xBuilder->weld_widget("lockprintformat"))
 , m_xZoom(m_xBuilder->weld_metric_spin_button("zoom", FieldUnit::PERCENT))
 , m_xEnableInlineEdit(m_xBuilder->weld_check_button("enableinlineedit"))
+, m_xEnableInlineEditImg(m_xBuilder->weld_widget("lockenableinlineedit"))
 , m_xNoRightSpaces(m_xBuilder->weld_check_button("norightspaces"))
+, m_xNoRightSpacesImg(m_xBuilder->weld_widget("locknorightspaces"))
 , 
m_xSaveOnlyUsedSymbols(m_xBuilder->weld_check_button("saveonlyusedsymbols"))
+, 
m_xSaveOnlyUsedSymbolsImg(m_xBuilder->weld_widget("locksaveonlyusedsymbols"))
 , m_xAutoCloseBrackets(m_xBuilder->weld_check_button("autoclosebrackets"))
+, m_xAutoCloseBracketsImg(m_xBuilder->weld_widget("lockautoclosebrackets"))
 , m_xSmZoom(m_xBuilder->weld_metric_spin_button("smzoom", 
FieldUnit::PERCENT))
+, m_xSmZoomImg(m_xBuilder->weld_widget("locksmzoom"))
 {
 m_xSizeNormal->connect_toggled(LINK(this, SmPrintOptionsTabPage, 
SizeButtonClickHdl));
 m_xSizeScaled->connect_toggled(LINK(this, SmPrintOptionsTabPage, 
SizeButtonClickHdl));
@@ -271,21 +281,58 @@ void SmPrintOptionsTabPage::Reset(const SfxItemSet* rSet)
 m_xSizeNormal->set_active(ePrintSize == PRINT_SIZE_NORMAL);
 m_xSizeScaled->set_active(ePrintSize == PRINT_SIZE_SCALED);
 m_xSizeZoomed->set_active(ePrintSize == PRINT_SIZE_ZOOMED);
+bool bReadOnly = officecfg::Office::Math::Print::Size::isReadOnly();
+if (bReadOnly)
+{
+m_xSizeNormal->set_sensitive(false);
+m_xSizeScaled->set_sensitive(false);
+m_xSizeZoomed->set_sensitive(false);
+m_xLockPrintImg->set_visible(true);
+}
 
-m_xZoom->set_sensitive(m_xSizeZoomed->get_active());
-
+bReadOnly = officecfg::Office::Math::Print::ZoomFactor::isReadOnly();
 m_xZoom->set_value(rSet->Get(SID_PRINTZOOM).GetValue(), 

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

2023-11-21 Thread Balazs Varga (via logerrit)
 sw/source/ui/config/optpage.cxx |   93 +---
 1 file changed, 60 insertions(+), 33 deletions(-)

New commits:
commit e797f291530fb7f4f6d86646b2fb805a1a78aa3f
Author: Balazs Varga 
AuthorDate: Tue Nov 21 19:53:29 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 21 21:04:20 2023 +0100

tdf#158145 - UI: Part 37 - Unify lockdown behavior of Options dialog

for Writer/Web - Table Page.

Change-Id: I3a8333684d1c4bfeea869581b33354385838111f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159795
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 063d353da0ee..a2af6912b75a 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1468,6 +1468,11 @@ bool SwTableOptionsTabPage::FillItemSet( SfxItemSet* )
 
 void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet)
 {
+if (const SfxUInt16Item* pItem = rSet->GetItemIfSet(SID_HTML_MODE, false))
+{
+m_bHTMLMode = 0 != (pItem->GetValue() & HTMLMODE_ON);
+}
+
 const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
 if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT )
 {
@@ -1479,21 +1484,29 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* 
rSet)
 ::SetFieldUnit( *m_xColInsertMF, eFieldUnit );
 }
 
+bool bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Table::Shift::Row::isReadOnly() :
+officecfg::Office::WriterWeb::Table::Shift::Row::isReadOnly();
 m_xRowMoveMF->set_value(m_xRowMoveMF->normalize(pModOpt->GetTableHMove()), 
FieldUnit::TWIP);
-
m_xRowMoveMF->set_sensitive(!officecfg::Office::Writer::Table::Shift::Row::isReadOnly());
-
m_xRowMoveImg->set_visible(officecfg::Office::Writer::Table::Shift::Row::isReadOnly());
+m_xRowMoveMF->set_sensitive(!bReadOnly);
+m_xRowMoveImg->set_visible(bReadOnly);
 
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Table::Shift::Column::isReadOnly() :
+officecfg::Office::WriterWeb::Table::Shift::Column::isReadOnly();
 m_xColMoveMF->set_value(m_xColMoveMF->normalize(pModOpt->GetTableVMove()), 
FieldUnit::TWIP);
-
m_xColMoveMF->set_sensitive(!officecfg::Office::Writer::Table::Shift::Column::isReadOnly());
-
m_xColMoveImg->set_visible(officecfg::Office::Writer::Table::Shift::Column::isReadOnly());
+m_xColMoveMF->set_sensitive(!bReadOnly);
+m_xColMoveImg->set_visible(bReadOnly);
 
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Table::Insert::Row::isReadOnly() :
+officecfg::Office::WriterWeb::Table::Insert::Row::isReadOnly();
 
m_xRowInsertMF->set_value(m_xRowInsertMF->normalize(pModOpt->GetTableHInsert()),
 FieldUnit::TWIP);
-
m_xRowInsertMF->set_sensitive(!officecfg::Office::Writer::Table::Insert::Row::isReadOnly());
-
m_xRowInsertImg->set_visible(officecfg::Office::Writer::Table::Insert::Row::isReadOnly());
+m_xRowInsertMF->set_sensitive(!bReadOnly);
+m_xRowInsertImg->set_visible(bReadOnly);
 
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Table::Insert::Column::isReadOnly() :
+officecfg::Office::WriterWeb::Table::Insert::Column::isReadOnly();
 
m_xColInsertMF->set_value(m_xColInsertMF->normalize(pModOpt->GetTableVInsert()),
 FieldUnit::TWIP);
-
m_xColInsertMF->set_sensitive(!officecfg::Office::Writer::Table::Insert::Column::isReadOnly());
-
m_xColInsertImg->set_visible(officecfg::Office::Writer::Table::Insert::Column::isReadOnly());
+m_xColInsertMF->set_sensitive(!bReadOnly);
+m_xColInsertImg->set_visible(bReadOnly);
 
 switch(pModOpt->GetTableMode())
 {
@@ -1501,10 +1514,6 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* 
rSet)
 case TableChgMode::FixedWidthChangeProp:  
m_xFixPropRB->set_active(true); break;
 case TableChgMode::VarWidthChangeAbs: m_xVarRB->set_active(true); 
break;
 }
-if(const SfxUInt16Item* pItem = rSet->GetItemIfSet(SID_HTML_MODE, false))
-{
-m_bHTMLMode = 0 != (pItem->GetValue() & HTMLMODE_ON);
-}
 
 // hide certain controls for html
 if (m_bHTMLMode)
@@ -1513,7 +1522,9 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet)
 m_xDontSplitCB->hide();
 }
 
-if (officecfg::Office::Writer::Table::Change::Effect::isReadOnly())
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Table::Change::Effect::isReadOnly() :
+officecfg::Office::WriterWeb::Table::Change::Effect::isReadOnly();
+if (bReadOnly)
 {
 m_xFixRB->set_sensitive(false);
 m_xFixPropRB->set_sensitive(false);
@@ -1524,33 +1535,45 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* 
rSet)
 SwInsertTableOptions aInsOpts = pModOpt->GetInsTableFlags(m_bHTMLMode);
 const SwInsertTableFlags nInsTableFlags = aInsOpts.mnInsMode;
 
+bReadOnly = !m_bHTMLMode ? 

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

2023-11-21 Thread Balazs Varga (via logerrit)
 sw/source/ui/config/optpage.cxx  |   97 ---
 sw/source/uibase/inc/optpage.hxx |1 
 2 files changed, 63 insertions(+), 35 deletions(-)

New commits:
commit 1f94a89429c665104bdf21b5ac48171850fa5afb
Author: Balazs Varga 
AuthorDate: Tue Nov 21 16:31:00 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 21 21:04:01 2023 +0100

tdf#158144 - UI: Part 36 - Unify lockdown behavior of Options dialog

for Writer/Web - Print Page.

Change-Id: I1fb2f52966843297fcb415c02946d7ce38097332
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159788
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 7062a68716c8..063d353da0ee 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -415,6 +415,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(weld::Container* 
pPage, weld::DialogCon
 , m_sNone(SwResId(SW_STR_NONE))
 , m_bAttrModified(false)
 , m_bPreview(false)
+, m_bHTMLMode(false)
 , m_xGrfCB(m_xBuilder->weld_check_button("graphics"))
 , m_xGrfImg(m_xBuilder->weld_widget("lockgraphics"))
 , m_xCtrlFieldCB(m_xBuilder->weld_check_button("formcontrols"))
@@ -473,6 +474,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(weld::Container* 
pPage, weld::DialogCon
 const SfxUInt16Item* pItem = rCoreSet.GetItemIfSet(SID_HTML_MODE, false );
 if(pItem && pItem->GetValue() & HTMLMODE_ON)
 {
+m_bHTMLMode = true;
 m_xLeftPageCB->hide();
 m_xRightPageCB->hide();
 m_xPrintHiddenTextCB->hide();
@@ -577,56 +579,76 @@ boolSwAddPrinterTabPage::FillItemSet( SfxItemSet* 
rCoreSet )
 voidSwAddPrinterTabPage::Reset( const SfxItemSet*  )
 {
 const   SfxItemSet& rSet = GetItemSet();
+bool bReadOnly = false;
 
 if( const SwAddPrinterItem* pAddPrinterAttr = rSet.GetItemIfSet( 
FN_PARAM_ADDPRINTER , false ) )
 {
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Print::Content::Graphic::isReadOnly() :
+
officecfg::Office::WriterWeb::Print::Content::Graphic::isReadOnly();
 m_xGrfCB->set_active(pAddPrinterAttr->m_bPrintGraphic || 
pAddPrinterAttr->m_bPrintDraw);
-
m_xGrfCB->set_sensitive(!officecfg::Office::Writer::Print::Content::Graphic::isReadOnly());
-
m_xGrfImg->set_visible(officecfg::Office::Writer::Print::Content::Graphic::isReadOnly());
+m_xGrfCB->set_sensitive(!bReadOnly);
+m_xGrfImg->set_visible(bReadOnly);
 
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Print::Content::Control::isReadOnly() :
+
officecfg::Office::WriterWeb::Print::Content::Control::isReadOnly();
 m_xCtrlFieldCB->set_active(   pAddPrinterAttr->m_bPrintControl);
-
m_xCtrlFieldCB->set_sensitive(!officecfg::Office::Writer::Print::Content::Control::isReadOnly());
-
m_xCtrlFieldImg->set_visible(officecfg::Office::Writer::Print::Content::Control::isReadOnly());
+m_xCtrlFieldCB->set_sensitive(!bReadOnly);
+m_xCtrlFieldImg->set_visible(bReadOnly);
 
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Print::Content::Background::isReadOnly() :
+
officecfg::Office::WriterWeb::Print::Content::Background::isReadOnly();
 m_xBackgroundCB->set_active(
pAddPrinterAttr->m_bPrintPageBackground);
-
m_xBackgroundCB->set_sensitive(!officecfg::Office::Writer::Print::Content::Background::isReadOnly());
-
m_xBackgroundImg->set_visible(officecfg::Office::Writer::Print::Content::Background::isReadOnly());
+m_xBackgroundCB->set_sensitive(!bReadOnly);
+m_xBackgroundImg->set_visible(bReadOnly);
 
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Print::Content::PrintBlack::isReadOnly() :
+
officecfg::Office::WriterWeb::Print::Content::PrintBlack::isReadOnly();
 m_xBlackFontCB->set_active( pAddPrinterAttr->m_bPrintBlackFont);
-
m_xBlackFontCB->set_sensitive(!officecfg::Office::Writer::Print::Content::PrintBlack::isReadOnly());
-
m_xBlackFontImg->set_visible(officecfg::Office::Writer::Print::Content::PrintBlack::isReadOnly());
+m_xBlackFontCB->set_sensitive(!bReadOnly);
+m_xBlackFontImg->set_visible(bReadOnly);
 
+bReadOnly = 
officecfg::Office::Writer::Print::Content::PrintHiddenText::isReadOnly();
 m_xPrintHiddenTextCB->set_active( pAddPrinterAttr->m_bPrintHiddenText);
-
m_xPrintHiddenTextCB->set_sensitive(!officecfg::Office::Writer::Print::Content::PrintHiddenText::isReadOnly());
-
m_xPrintHiddenTextImg->set_visible(officecfg::Office::Writer::Print::Content::PrintHiddenText::isReadOnly());
+m_xPrintHiddenTextCB->set_sensitive(!bReadOnly);
+m_xPrintHiddenTextImg->set_visible(bReadOnly);
 
+bReadOnly = 
officecfg::Office::Writer::Print::Content::PrintPlaceholders::isReadOnly();
 

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

2023-11-21 Thread Balazs Varga (via logerrit)
 include/svx/optgrid.hxx   |2 +
 svx/source/dialog/optgrid.cxx |   48 +-
 2 files changed, 36 insertions(+), 14 deletions(-)

New commits:
commit b4350fd9c3f1873ead892c6baeb7f7c0fc1c7d80
Author: Balazs Varga 
AuthorDate: Tue Nov 21 15:32:11 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 21 21:03:41 2023 +0100

tdf#158143 - UI: Part 35 - Unify lockdown behavior of Options dialog

for Writer/Web - Grid Page.

Change-Id: I8b3cc4f75e613691840edc6456fb8ea2c4314282
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159784
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
index f27a4bf78d29..c033d001871c 100644
--- a/include/svx/optgrid.hxx
+++ b/include/svx/optgrid.hxx
@@ -20,6 +20,7 @@
 #define INCLUDED_SVX_OPTGRID_HXX
 
 #include 
+#include 
 #include 
 
 namespace weld { class CheckButton; }
@@ -104,6 +105,7 @@ public:
 
 private:
 boolbAttrModified;
+boolm_bHTMLMode;
 
 std::unique_ptr m_xCbxUseGridsnap;
 std::unique_ptr m_xCbxUseGridsnapImg;
diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index cd73ae223961..a5607755fd3f 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -91,6 +92,7 @@ bool  SvxGridItem::GetPresentation
 SvxGridTabPage::SvxGridTabPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rCoreSet)
 : SfxTabPage(pPage, pController, "svx/ui/optgridpage.ui", "OptGridPage", 
)
 , bAttrModified(false)
+, m_bHTMLMode(false)
 , m_xCbxUseGridsnap(m_xBuilder->weld_check_button("usegridsnap"))
 , m_xCbxUseGridsnapImg(m_xBuilder->weld_widget("lockusegridsnap"))
 , m_xCbxGridVisible(m_xBuilder->weld_check_button("gridvisible"))
@@ -132,6 +134,10 @@ SvxGridTabPage::SvxGridTabPage(weld::Container* pPage, 
weld::DialogController* p
 SetFieldUnit( *m_xMtrFldDrawY, eFUnit, true );
 lcl_SetMinMax(*m_xMtrFldDrawY, nMin, nMax);
 
+if (const SfxUInt16Item* pItem = rCoreSet.GetItemIfSet(SID_HTML_MODE, 
false))
+{
+m_bHTMLMode = 0 != (pItem->GetValue() & HTMLMODE_ON);
+}
 
 m_xCbxRotate->connect_toggled(LINK(this, SvxGridTabPage, 
ClickRotateHdl_Impl));
 Link aLink = LINK(this, SvxGridTabPage, 
ChangeGridsnapHdl_Impl);
@@ -213,36 +219,50 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet )
 
 if( (pGridAttr = rSet->GetItemIfSet( SID_ATTR_GRID_OPTIONS , false )) )
 {
+bool bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Grid::Option::SnapToGrid::isReadOnly() :
+
officecfg::Office::WriterWeb::Grid::Option::SnapToGrid::isReadOnly();
 m_xCbxUseGridsnap->set_active(pGridAttr->bUseGridsnap);
-
m_xCbxUseGridsnap->set_sensitive(!officecfg::Office::Writer::Grid::Option::SnapToGrid::isReadOnly());
-
m_xCbxUseGridsnapImg->set_visible(officecfg::Office::Writer::Grid::Option::SnapToGrid::isReadOnly());
+m_xCbxUseGridsnap->set_sensitive(!bReadOnly);
+m_xCbxUseGridsnapImg->set_visible(bReadOnly);
 
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Grid::Option::Synchronize::isReadOnly() :
+
officecfg::Office::WriterWeb::Grid::Option::Synchronize::isReadOnly();
 m_xCbxSynchronize->set_active(pGridAttr->bSynchronize);
-
m_xCbxSynchronize->set_sensitive(!officecfg::Office::Writer::Grid::Option::Synchronize::isReadOnly());
-
m_xCbxSynchronizeImg->set_visible(officecfg::Office::Writer::Grid::Option::Synchronize::isReadOnly());
+m_xCbxSynchronize->set_sensitive(!bReadOnly);
+m_xCbxSynchronizeImg->set_visible(bReadOnly);
 
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Grid::Option::VisibleGrid::isReadOnly() :
+
officecfg::Office::WriterWeb::Grid::Option::VisibleGrid::isReadOnly();
 m_xCbxGridVisible->set_active(pGridAttr->bGridVisible);
-
m_xCbxGridVisible->set_sensitive(!officecfg::Office::Writer::Grid::Option::VisibleGrid::isReadOnly());
-
m_xCbxGridVisibleImg->set_visible(officecfg::Office::Writer::Grid::Option::VisibleGrid::isReadOnly());
+m_xCbxGridVisible->set_sensitive(!bReadOnly);
+m_xCbxGridVisibleImg->set_visible(bReadOnly);
 
 MapUnit eUnit = rSet->GetPool()->GetMetric( SID_ATTR_GRID_OPTIONS );
 SetMetricValue( *m_xMtrFldDrawX , pGridAttr->nFldDrawX, eUnit );
 SetMetricValue( *m_xMtrFldDrawY , pGridAttr->nFldDrawY, eUnit );
 
-
m_xMtrFldDrawX->set_sensitive(!officecfg::Office::Writer::Grid::Resolution::XAxis::isReadOnly());
-
m_xMtrFldDrawXImg->set_visible(officecfg::Office::Writer::Grid::Resolution::XAxis::isReadOnly());
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Grid::Resolution::XAxis::isReadOnly() :
+

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

2023-11-21 Thread Balazs Varga (via logerrit)
 sw/source/ui/config/optpage.cxx  |   40 ++-
 sw/source/uibase/inc/optpage.hxx |1 
 2 files changed, 28 insertions(+), 13 deletions(-)

New commits:
commit edf05194527e596e8b32956f7f3f34357f6e4a27
Author: Balazs Varga 
AuthorDate: Tue Nov 21 14:32:21 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 21 21:03:25 2023 +0100

tdf#158141 - UI: Part 34 - Unify lockdown behavior of Options dialog

for Writer/Web - Formatting Aids Page.

Change-Id: I8e67ac65add2aab50fe1db2d071ce731be80f946
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159783
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 90ea14acf64f..7062a68716c8 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1560,6 +1560,7 @@ void SwTableOptionsTabPage::PageCreated( const 
SfxAllItemSet& aSet)
 SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rSet)
 : SfxTabPage(pPage, pController, 
"modules/swriter/ui/optformataidspage.ui", "OptFormatAidsPage", )
 , m_pWrtShell(nullptr)
+, m_bHTMLMode(false)
 , m_xParaCB(m_xBuilder->weld_check_button("paragraph"))
 , m_xParaImg(m_xBuilder->weld_widget("lockparagraph"))
 , m_xSHyphCB(m_xBuilder->weld_check_button("hyphens"))
@@ -1607,6 +1608,8 @@ 
SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w
 if(!pHtmlModeItem || !(pHtmlModeItem->GetValue() & HTMLMODE_ON))
 return;
 
+m_bHTMLMode = true;
+
 m_xTabCB->hide();
 m_xTabLabel->hide();
 m_xCharHiddenCB->hide();
@@ -1721,18 +1724,23 @@ void SwShdwCursorOptionsTabPage::Reset( const 
SfxItemSet* rSet )
 eMode = pItem->GetMode();
 bIsOn = pItem->IsOn();
 }
+
+bool bReadOnly = 
officecfg::Office::Writer::Cursor::DirectCursor::UseDirectCursor::isReadOnly();
 m_xOnOffCB->set_active( bIsOn );
-
m_xOnOffCB->set_sensitive(!officecfg::Office::Writer::Cursor::DirectCursor::UseDirectCursor::isReadOnly());
-
m_xOnOffImg->set_visible(officecfg::Office::Writer::Cursor::DirectCursor::UseDirectCursor::isReadOnly());
+m_xOnOffCB->set_sensitive(!bReadOnly);
+m_xOnOffImg->set_visible(bReadOnly);
 
+bReadOnly = 
officecfg::Office::Writer::Cursor::DirectCursor::Insert::isReadOnly();
 m_xDirectCursorFillMode->set_active( static_cast(eMode) );
-
m_xDirectCursorFillMode->set_sensitive(!officecfg::Office::Writer::Cursor::DirectCursor::Insert::isReadOnly());
-
m_xDirectCursorFillModeImg->set_visible(officecfg::Office::Writer::Cursor::DirectCursor::Insert::isReadOnly());
+m_xDirectCursorFillMode->set_sensitive(!bReadOnly);
+m_xDirectCursorFillModeImg->set_visible(bReadOnly);
 
 if (m_pWrtShell) {
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Layout::Other::IsAlignMathObjectsToBaseline::isReadOnly()
 :
+
officecfg::Office::WriterWeb::Layout::Other::IsAlignMathObjectsToBaseline::isReadOnly();
 m_xMathBaselineAlignmentCB->set_active( 
m_pWrtShell->GetDoc()->getIDocumentSettingAccess().get( 
DocumentSettingId::MATH_BASELINE_ALIGNMENT ) );
-
m_xMathBaselineAlignmentCB->set_sensitive(!officecfg::Office::Writer::Layout::Other::IsAlignMathObjectsToBaseline::isReadOnly());
-
m_xMathBaselineAlignmentImg->set_visible(officecfg::Office::Writer::Layout::Other::IsAlignMathObjectsToBaseline::isReadOnly());
+m_xMathBaselineAlignmentCB->set_sensitive(!bReadOnly);
+m_xMathBaselineAlignmentImg->set_visible(bReadOnly);
 m_xMathBaselineAlignmentCB->save_state();
 } else {
 m_xMathBaselineAlignmentCB->hide();
@@ -1740,14 +1748,16 @@ void SwShdwCursorOptionsTabPage::Reset( const 
SfxItemSet* rSet )
 
 if( const SfxBoolItem* pItem = rSet->GetItemIfSet( 
FN_PARAM_CRSR_IN_PROTECTED, false ) )
 m_xCursorInProtCB->set_active(pItem->GetValue());
-
m_xCursorInProtCB->set_sensitive(!officecfg::Office::Writer::Cursor::Option::ProtectedArea::isReadOnly());
-
m_xCursorInProtImg->set_visible(officecfg::Office::Writer::Cursor::Option::ProtectedArea::isReadOnly());
+bReadOnly = 
officecfg::Office::Writer::Cursor::Option::ProtectedArea::isReadOnly();
+m_xCursorInProtCB->set_sensitive(!bReadOnly);
+m_xCursorInProtImg->set_visible(bReadOnly);
 m_xCursorInProtCB->save_state();
 
 const SwDocDisplayItem* pDocDisplayAttr = rSet->GetItemIfSet( 
FN_PARAM_DOCDISP, false );
 if(pDocDisplayAttr)
 {
-bool bReadOnly = 
officecfg::Office::Writer::Content::NonprintingCharacter::ParagraphEnd::isReadOnly();
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Content::NonprintingCharacter::ParagraphEnd::isReadOnly()
 :
+
officecfg::Office::WriterWeb::Content::NonprintingCharacter::ParagraphEnd::isReadOnly();
 m_xParaCB->set_active( 

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

2023-11-21 Thread Balazs Varga (via logerrit)
 sw/source/ui/config/optpage.cxx   |   36 ++
 sw/source/uibase/inc/optpage.hxx  |1 
 sw/uiconfig/swriter/ui/viewoptionspage.ui |   12 +-
 3 files changed, 39 insertions(+), 10 deletions(-)

New commits:
commit 49c200cf9f3e8f61716a15bf67dee9f54d2931fa
Author: Balazs Varga 
AuthorDate: Tue Nov 21 13:26:01 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 21 21:03:03 2023 +0100

tdf#158140 - UI: Part 33 - Unify lockdown behavior of Options dialog

for Writer/Web - View Page.

Change-Id: Idcd271493461bbd7a945e0ad5484715279a19c98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159780
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 294e25772da0..90ea14acf64f 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -52,6 +52,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -108,6 +109,7 @@ SwContentOptPage::SwContentOptPage(weld::Container* pPage, 
weld::DialogControlle
 , m_xSettingsLabel(m_xBuilder->weld_label("settingslabel"))
 , m_xMetricLabel(m_xBuilder->weld_label("measureunitlabel"))
 , m_xMetricLB(m_xBuilder->weld_combo_box("measureunit"))
+, m_xMetricImg(m_xBuilder->weld_widget("lockmeasureunit"))
 , m_xShowInlineTooltips(m_xBuilder->weld_check_button("changestooltip"))
 , m_xShowInlineTooltipsImg(m_xBuilder->weld_widget("lockchangestooltip"))
 , 
m_xShowOutlineContentVisibilityButton(m_xBuilder->weld_check_button("outlinecontentvisibilitybutton"))
@@ -203,35 +205,42 @@ static void lcl_SelectMetricLB(weld::ComboBox& rMetric, 
TypedWhichIdis_visible();
 const SwElemItem* pElemAttr = rSet->GetItemIfSet( FN_PARAM_ELEM , false );
 if(pElemAttr)
 {
-bReadOnly = 
officecfg::Office::Writer::Content::Display::Table::isReadOnly();
+bReadOnly = !bWebOptionsPage ? 
officecfg::Office::Writer::Content::Display::Table::isReadOnly() :
+
officecfg::Office::WriterWeb::Content::Display::Table::isReadOnly();
 m_xTableCB->set_active(pElemAttr->m_bTable);
 m_xTableCB->set_sensitive(!bReadOnly);
 m_xTableImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Writer::Content::Display::GraphicObject::isReadOnly();
+bReadOnly = !bWebOptionsPage ? 
officecfg::Office::Writer::Content::Display::GraphicObject::isReadOnly() :
+
officecfg::Office::WriterWeb::Content::Display::GraphicObject::isReadOnly();
 m_xGrfCB->set_active(pElemAttr->m_bGraphic);
 m_xGrfCB->set_sensitive(!bReadOnly);
 m_xGrfImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Writer::Content::Display::DrawingControl::isReadOnly();
+bReadOnly = !bWebOptionsPage ? 
officecfg::Office::Writer::Content::Display::DrawingControl::isReadOnly() :
+
officecfg::Office::WriterWeb::Content::Display::DrawingControl::isReadOnly();
 m_xDrwCB->set_active(pElemAttr->m_bDrawing);
 m_xDrwCB->set_sensitive(!bReadOnly);
 m_xDrwImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Writer::Content::Display::Note::isReadOnly();
+bReadOnly = !bWebOptionsPage ? 
officecfg::Office::Writer::Content::Display::Note::isReadOnly() :
+officecfg::Office::WriterWeb::Content::Display::Note::isReadOnly();
 m_xPostItCB->set_active(pElemAttr->m_bNotes);
 m_xPostItCB->set_sensitive(!bReadOnly);
 m_xPostItCB->set_visible(pElemAttr->m_bNotes);
 
-bReadOnly = 
officecfg::Office::Writer::Layout::Line::Guide::isReadOnly();
+bReadOnly = !bWebOptionsPage ? 
officecfg::Office::Writer::Layout::Line::Guide::isReadOnly() :
+officecfg::Office::WriterWeb::Layout::Line::Guide::isReadOnly();
 m_xCrossCB->set_active(pElemAttr->m_bCrosshair);
 m_xCrossCB->set_sensitive(!bReadOnly);
 m_xCrossImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Writer::Layout::Window::VerticalRuler::isReadOnly();
+bReadOnly = !bWebOptionsPage ? 
officecfg::Office::Writer::Layout::Window::VerticalRuler::isReadOnly() :
+
officecfg::Office::WriterWeb::Layout::Window::VerticalRuler::isReadOnly();
 m_xVRulerCBox->set_active(pElemAttr->m_bVertRuler);
 m_xVRulerCBox->set_sensitive(!bReadOnly);
 m_xVRulerImg->set_visible(bReadOnly);
@@ -241,7 +250,8 @@ void SwContentOptPage::Reset(const SfxItemSet* rSet)
 m_xVRulerRightCBox->set_sensitive(!bReadOnly);
 m_xVRulerRightImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Writer::Layout::Window::SmoothScroll::isReadOnly();
+bReadOnly = !bWebOptionsPage ? 
officecfg::Office::Writer::Layout::Window::SmoothScroll::isReadOnly() :
+
officecfg::Office::WriterWeb::Layout::Window::SmoothScroll::isReadOnly();
 

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

2023-11-21 Thread Balazs Varga (via logerrit)
 sw/source/ui/config/mailconfigpage.cxx |   85 -
 sw/source/uibase/inc/mailconfigpage.hxx|7 
 sw/uiconfig/swriter/ui/authenticationsettingsdialog.ui |  159 ++---
 sw/uiconfig/swriter/ui/mailconfigpage.ui   |  124 +++--
 4 files changed, 332 insertions(+), 43 deletions(-)

New commits:
commit ddf9f30869a9808097135f77384e2679c3f73e36
Author: Balazs Varga 
AuthorDate: Mon Nov 20 15:22:11 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 21 12:17:45 2023 +0100

tdf#158137 - UI: Part 32 - Unify lockdown behavior of Options dialog

for Writer - Mail Merge, Email Page.

Change-Id: Ibd484a4ae815ad94dd6c418fbe66901a9b84c7fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159741
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/source/ui/config/mailconfigpage.cxx 
b/sw/source/ui/config/mailconfigpage.cxx
index 468d9f761d8a..0bf9633abd1d 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -68,23 +69,31 @@ class SwAuthenticationSettingsDialog : public 
SfxDialogController
 SwMailMergeConfigItem& m_rConfigItem;
 
 std::unique_ptr m_xAuthenticationCB;
+std::unique_ptr  m_xAuthenticationImg;
 std::unique_ptr m_xSeparateAuthenticationRB;
+std::unique_ptr  m_xSeparateAuthenticationImg;
 std::unique_ptr m_xSMTPAfterPOPRB;
+std::unique_ptr  m_xSMTPAfterPOPImg;
 std::unique_ptr   m_xOutgoingServerFT;
 std::unique_ptr   m_xUserNameFT;
 std::unique_ptr   m_xUserNameED;
+std::unique_ptr  m_xUserNameImg;
 std::unique_ptr   m_xOutPasswordFT;
 std::unique_ptr   m_xOutPasswordED;
 std::unique_ptr   m_xIncomingServerFT;
 std::unique_ptr   m_xServerFT;
 std::unique_ptr   m_xServerED;
+std::unique_ptr  m_xServerImg;
 std::unique_ptr   m_xPortFT;
 std::unique_ptr  m_xPortNF;
+std::unique_ptr  m_xPortImg;
 std::unique_ptr   m_xProtocolFT;
 std::unique_ptr m_xPOP3RB;
+std::unique_ptr  m_xPOP3Img;
 std::unique_ptr m_xIMAPRB;
 std::unique_ptr   m_xInUsernameFT;
 std::unique_ptr   m_xInUsernameED;
+std::unique_ptr  m_xInUsernameImg;
 std::unique_ptr   m_xInPasswordFT;
 std::unique_ptr   m_xInPasswordED;
 std::unique_ptr  m_xOKPB;
@@ -104,13 +113,20 @@ SwMailConfigPage::SwMailConfigPage(weld::Container* 
pPage, weld::DialogControlle
 : SfxTabPage(pPage, pController, "modules/swriter/ui/mailconfigpage.ui", 
"MailConfigPage", )
 , m_pConfigItem(new SwMailMergeConfigItem)
 , m_xDisplayNameED(m_xBuilder->weld_entry("displayname"))
+, m_xDisplayNameImg(m_xBuilder->weld_widget("lockdisplayname"))
 , m_xAddressED(m_xBuilder->weld_entry("address"))
+, m_xAddressImg(m_xBuilder->weld_widget("lockaddress"))
 , m_xReplyToCB(m_xBuilder->weld_check_button("replytocb"))
+, m_xReplyToCBImg(m_xBuilder->weld_widget("lockreplytocb"))
 , m_xReplyToFT(m_xBuilder->weld_label("replyto_label"))
 , m_xReplyToED(m_xBuilder->weld_entry("replyto"))
+, m_xReplyToImg(m_xBuilder->weld_widget("lockreplyto"))
 , m_xServerED(m_xBuilder->weld_entry("server"))
+, m_xServerImg(m_xBuilder->weld_widget("lockserver"))
 , m_xPortNF(m_xBuilder->weld_spin_button("port"))
+, m_xPortImg(m_xBuilder->weld_widget("lockport"))
 , m_xSecureCB(m_xBuilder->weld_check_button("secure"))
+, m_xSecureImg(m_xBuilder->weld_widget("locksecure"))
 , 
m_xServerAuthenticationPB(m_xBuilder->weld_button("serverauthentication"))
 , m_xTestPB(m_xBuilder->weld_button("test"))
 {
@@ -184,16 +200,34 @@ bool SwMailConfigPage::FillItemSet( SfxItemSet* /*rSet*/ )
 void SwMailConfigPage::Reset( const SfxItemSet* /*rSet*/ )
 {
 m_xDisplayNameED->set_text(m_pConfigItem->GetMailDisplayName());
+
m_xDisplayNameED->set_sensitive(!officecfg::Office::Writer::MailMergeWizard::MailDisplayName::isReadOnly());
+
m_xDisplayNameImg->set_visible(officecfg::Office::Writer::MailMergeWizard::MailDisplayName::isReadOnly());
+
 m_xAddressED->set_text(m_pConfigItem->GetMailAddress());
+
m_xAddressED->set_sensitive(!officecfg::Office::Writer::MailMergeWizard::MailAddress::isReadOnly());
+
m_xAddressImg->set_visible(officecfg::Office::Writer::MailMergeWizard::MailAddress::isReadOnly());
+
+m_xReplyToED->set_text(m_pConfigItem->GetMailReplyTo());
+
m_xReplyToED->set_sensitive(!officecfg::Office::Writer::MailMergeWizard::MailReplyTo::isReadOnly());
+
m_xReplyToImg->set_visible(officecfg::Office::Writer::MailMergeWizard::MailReplyTo::isReadOnly());
 
-m_xReplyToED->set_text(m_pConfigItem->GetMailReplyTo()) ;
 m_xReplyToCB->set_active(m_pConfigItem->IsMailReplyTo());
+

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

2023-11-20 Thread Balazs Varga (via logerrit)
 sw/inc/SwCapConfigProp.hxx   |   38 ++
 sw/source/ui/config/optload.cxx  |  503 ++-
 sw/source/uibase/inc/optload.hxx |   11 
 sw/uiconfig/swriter/ui/optcaptionpage.ui |  206 ++--
 4 files changed, 725 insertions(+), 33 deletions(-)

New commits:
commit 3e81415f7f71b7fe99342c82b3c54011fbcb2dbb
Author: Balazs Varga 
AuthorDate: Fri Nov 17 19:03:51 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Nov 20 12:55:55 2023 +0100

tdf#158136 - UI: Part 31 - Unify lockdown behavior of Options dialog

for Writer - AutoCaption Page.

Change-Id: Ia3c37510477542556c3302d2013fe10a4ae00545
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159594
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/inc/SwCapConfigProp.hxx b/sw/inc/SwCapConfigProp.hxx
new file mode 100644
index ..20257f3d9716
--- /dev/null
+++ b/sw/inc/SwCapConfigProp.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_INC_SWCAPCONFIGPROP_HXX
+#define INCLUDED_SW_INC_SWCAPCONFIGPROP_HXX
+
+enum CapConfigProp
+{
+PROP_CAP_OBJECT_ENABLE = 0, //0
+PROP_CAP_OBJECT_CATEGORY, //1
+PROP_CAP_OBJECT_NUMBERING, //2
+PROP_CAP_OBJECT_NUMBERINGSEPARATOR, //3
+PROP_CAP_OBJECT_CAPTIONTEXT, //4
+PROP_CAP_OBJECT_DELIMITER, //5
+PROP_CAP_OBJECT_LEVEL, //6
+PROP_CAP_OBJECT_POSITION, //7
+PROP_CAP_OBJECT_CHARACTERSTYLE, //8
+PROP_CAP_OBJECT_APPLYATTRIBUTES, //9
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 675a2d48e8d6..3adf4dce4e34 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -55,6 +55,436 @@
 
 using namespace ::com::sun::star;
 
+static bool lcl_isPropertyReadOnly(const SwCapObjType eType, const 
CapConfigProp ePropType, const SvGlobalName& rOleId)
+{
+bool bReadOnly = false;
+
+switch (ePropType)
+{
+case PROP_CAP_OBJECT_ENABLE:
+{
+switch (eType)
+{
+case TABLE_CAP:
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::WriterObject::Table::Enable::isReadOnly();
+break;
+case FRAME_CAP:
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::WriterObject::Frame::Enable::isReadOnly();
+break;
+case GRAPHIC_CAP:
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::WriterObject::Graphic::Enable::isReadOnly();
+break;
+case OLE_CAP:
+{
+if (rOleId == SvGlobalName(SO3_SC_CLASSID)) {
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::OfficeObject::Calc::Enable::isReadOnly();
+} else if (rOleId == SvGlobalName(SO3_SIMPRESS_CLASSID)) {
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::OfficeObject::Impress::Enable::isReadOnly();
+} else if (rOleId == SvGlobalName(SO3_SCH_CLASSID)) {
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::OfficeObject::Chart::Enable::isReadOnly();
+} else if (rOleId == SvGlobalName(SO3_SM_CLASSID)) {
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::OfficeObject::Formula::Enable::isReadOnly();
+} else if (rOleId == SvGlobalName(SO3_SDRAW_CLASSID)) {
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::OfficeObject::Draw::Enable::isReadOnly();
+} else if (rOleId == SvGlobalName(SO3_OUT_CLASSID)) {
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::OfficeObject::OLEMisc::Enable::isReadOnly();
+} else {
+// Should not reach it.
+}
+}
+break;
+default:
+break;
+

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

2023-11-17 Thread Balazs Varga (via logerrit)
 include/unotools/compatibility.hxx   |   55 
 sw/source/ui/config/optcomp.cxx  |   18 -
 unotools/source/config/compatibility.cxx |   60 +++
 3 files changed, 132 insertions(+), 1 deletion(-)

New commits:
commit 35f59457ff434b7b97cad6ce1dbef6ff07f7bc96
Author: Balazs Varga 
AuthorDate: Thu Nov 16 17:03:39 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 17 18:55:22 2023 +0100

tdf#158135 - UI: Part 30 - Unify lockdown behavior of Options dialog

for Writer - Compatibility Page.

Change-Id: Id9ad445b451b332314f72f54e183730097584a74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159513
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/include/unotools/compatibility.hxx 
b/include/unotools/compatibility.hxx
index 620d3c1c3fa4..9c2acefcf1d7 100644
--- a/include/unotools/compatibility.hxx
+++ b/include/unotools/compatibility.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -131,8 +132,50 @@ class SvtCompatibilityEntry
 setValue(rIdx, css::uno::Any(rValue));
 }
 
+bool getPropertyReadOnly(const Index rIdx) const
+{
+if (static_cast(rIdx) < getElementCount())
+{
+return m_aPropertyReadOnly.at(static_cast(rIdx));
+}
+else
+{
+/* Wrong index. */
+assert(false);
+return false;
+}
+}
+
+void setPropertyReadOnly(const Index rIdx, const bool bReadOnly)
+{
+if (static_cast(rIdx) < getElementCount())
+{
+m_aPropertyReadOnly.insert({ static_cast(rIdx), bReadOnly 
});
+}
+else
+{
+/* Wrong index. */
+assert(false);
+}
+}
+
+bool haveReadOnlyProperty() const
+{
+bool bRet = false;
+for (const auto& pair : m_aPropertyReadOnly)
+{
+if (pair.second == true)
+{
+bRet = true;
+break;
+}
+}
+return bRet;
+}
+
 private:
 std::vector m_aPropertyValue;
+std::map m_aPropertyReadOnly;
 };
 
 
/*-
@@ -183,6 +226,18 @@ class UNOTOOLS_DLLPUBLIC SvtCompatibilityOptions final : 
public utl::detail::Opt
 
*//*-*/
 std::vector< SvtCompatibilityEntry > GetList() const;
 
+
/*-
+@short  return property/option is readonly or not
+@descr  Call it to get the readonly status of default entry of
+compatibility options.
+@return Return true if the compatibility option is true, 
otherwise false.
+
+@onerrorWe return false.
+
*//*-*/
+bool GetPropertyReadOnly( SvtCompatibilityEntry::Index rIdx ) const;
+bool GetDefaultPropertyReadOnly( SvtCompatibilityEntry::Index rIdx ) 
const;
+bool HaveDefaultReadOnlyProperty() const;
+
 private:
 std::shared_ptr m_pImpl;
 
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index a1ea231d305c..1393b2864d95 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -216,7 +216,7 @@ void SwCompatibilityOptPage::InitControls( const 
SfxItemSet& rSet )
 rEntry.getValue( SvtCompatibilityEntry::Index::NoExtLeading 
),
 rEntry.getValue( 
SvtCompatibilityEntry::Index::UseLineSpacing ),
 rEntry.getValue( 
SvtCompatibilityEntry::Index::AddTableSpacing ),
-
rEntry.getValue(SvtCompatibilityEntry::Index::AddTableLineSpacing),
+rEntry.getValue( 
SvtCompatibilityEntry::Index::AddTableLineSpacing),
 rEntry.getValue( 
SvtCompatibilityEntry::Index::UseObjectPositioning ),
 rEntry.getValue( 
SvtCompatibilityEntry::Index::UseOurTextWrapping ),
 rEntry.getValue( 
SvtCompatibilityEntry::Index::ConsiderWrappingStyle ),
@@ -277,9 +277,11 @@ IMPL_LINK_NOARG(SwCompatibilityOptPage, UseAsDefaultHdl, 
weld::Button&, void)
 void SwCompatibilityOptPage::SetCurrentOptions( sal_uInt32 nOptions )
 {
 const int nCount = m_xOptionsLB->n_children();
+const OUString aOptionsName = m_xFormattingLB->get_active_text();
 OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry 
overflow" );
 for (int i = 0; i < nCount; ++i)
 {
+bool 

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

2023-11-14 Thread Balazs Varga (via logerrit)
 sw/source/ui/config/optpage.cxx |   31 ++
 sw/source/uibase/inc/optpage.hxx|5 +
 sw/uiconfig/swriter/ui/optcomparison.ui |   93 +---
 3 files changed, 121 insertions(+), 8 deletions(-)

New commits:
commit bfee998e71e2b7e8bcf4a366a00219a9b0f59035
Author: Balazs Varga 
AuthorDate: Tue Nov 14 14:32:20 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 14 19:47:26 2023 +0100

tdf#158134 - UI: Part 29 - Unify lockdown behavior of Options dialog

for Writer - Comparison Page.

Change-Id: I33cfb499bf9026db1e2b8a359ad619c760e09abe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159420
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index add7bed5a079..294e25772da0 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -2457,10 +2457,15 @@ 
SwCompareOptionsTabPage::SwCompareOptionsTabPage(weld::Container* pPage, weld::D
 , m_xAutoRB(m_xBuilder->weld_radio_button("auto"))
 , m_xWordRB(m_xBuilder->weld_radio_button("byword"))
 , m_xCharRB(m_xBuilder->weld_radio_button("bycharacter"))
+, m_xCompareModeImg(m_xBuilder->weld_widget("lockcomparemode"))
 , m_xRsidCB(m_xBuilder->weld_check_button("useRSID"))
+, m_xRsidImg(m_xBuilder->weld_widget("lockuseRSID"))
 , m_xIgnoreCB(m_xBuilder->weld_check_button("ignore"))
+, m_xIgnoreImg(m_xBuilder->weld_widget("lockignore"))
 , m_xLenNF(m_xBuilder->weld_spin_button("ignorelen"))
+, m_xLenImg(m_xBuilder->weld_widget("lockignorelen"))
 , m_xStoreRsidCB(m_xBuilder->weld_check_button("storeRSID"))
+, m_xStoreRsidImg(m_xBuilder->weld_widget("lockstoreRSID"))
 {
 Link aLnk( LINK( this, SwCompareOptionsTabPage, 
ComparisonHdl ) );
 m_xAutoRB->connect_toggled( aLnk );
@@ -2581,22 +2586,48 @@ void SwCompareOptionsTabPage::Reset( const SfxItemSet* )
 m_xIgnoreCB->set_sensitive(true);
 m_xLenNF->set_sensitive(true);
 }
+
+if (officecfg::Office::Writer::Comparison::Mode::isReadOnly())
+{
+m_xAutoRB->set_sensitive(false);
+m_xWordRB->set_sensitive(false);
+m_xCharRB->set_sensitive(false);
+m_xCompareModeImg->set_visible(true);
+}
+
 m_xAutoRB->save_state();
 m_xWordRB->save_state();
 m_xCharRB->save_state();
 
 m_xRsidCB->set_active( pOpt->IsUseRsid() );
+if (officecfg::Office::Writer::Comparison::UseRSID::isReadOnly())
+{
+m_xRsidCB->set_sensitive(false);
+m_xRsidImg->set_visible(true);
+}
 m_xRsidCB->save_state();
 
 m_xIgnoreCB->set_active( pOpt->IsIgnorePieces() );
+if (officecfg::Office::Writer::Comparison::IgnorePieces::isReadOnly())
+{
+m_xIgnoreCB->set_sensitive(false);
+m_xIgnoreImg->set_visible(true);
+}
 m_xIgnoreCB->save_state();
 
 m_xLenNF->set_sensitive( m_xIgnoreCB->get_active() && eCmpMode != 
SwCompareMode::Auto );
 
 m_xLenNF->set_value( pOpt->GetPieceLen() );
+if (officecfg::Office::Writer::Comparison::IgnoreLength::isReadOnly())
+{
+m_xLenNF->set_sensitive(false);
+m_xLenImg->set_visible(true);
+}
 m_xLenNF->save_value();
 
 m_xStoreRsidCB->set_active(pOpt->IsStoreRsid());
+
m_xStoreRsidCB->set_sensitive(!officecfg::Office::Writer::Comparison::StoreRSID::isReadOnly());
+
m_xStoreRsidImg->set_visible(officecfg::Office::Writer::Comparison::StoreRSID::isReadOnly());
 m_xStoreRsidCB->save_state();
 }
 
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx
index 9027c74ab1bf..ba9c585d9d99 100644
--- a/sw/source/uibase/inc/optpage.hxx
+++ b/sw/source/uibase/inc/optpage.hxx
@@ -451,10 +451,15 @@ class SwCompareOptionsTabPage final : public SfxTabPage
 std::unique_ptr m_xAutoRB;
 std::unique_ptr m_xWordRB;
 std::unique_ptr m_xCharRB;
+std::unique_ptr m_xCompareModeImg;
 std::unique_ptr m_xRsidCB;
+std::unique_ptr m_xRsidImg;
 std::unique_ptr m_xIgnoreCB;
+std::unique_ptr m_xIgnoreImg;
 std::unique_ptr m_xLenNF;
+std::unique_ptr m_xLenImg;
 std::unique_ptr m_xStoreRsidCB;
+std::unique_ptr m_xStoreRsidImg;
 
 DECL_LINK(ComparisonHdl, weld::Toggleable&, void);
 DECL_LINK(IgnoreHdl, weld::Toggleable&, void);
diff --git a/sw/uiconfig/swriter/ui/optcomparison.ui 
b/sw/uiconfig/swriter/ui/optcomparison.ui
index 8010cbc0a9a2..afaab6e4bbd1 100644
--- a/sw/uiconfig/swriter/ui/optcomparison.ui
+++ b/sw/uiconfig/swriter/ui/optcomparison.ui
@@ -22,7 +22,7 @@
 0
 none
 
-  
+  
   
 True
 False
@@ -40,7 +40,7 @@
 True
   
   
-0
+1
 0
   
 
@@ -55,7 +55,7 @@
 auto
   
   
-0
+1
 

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

2023-11-14 Thread Balazs Varga (via logerrit)
 sw/source/ui/config/optpage.cxx  |   24 
 sw/source/uibase/inc/optpage.hxx |8 +
 sw/uiconfig/swriter/ui/optcomparison.ui  |  120 
 sw/uiconfig/swriter/ui/optredlinepage.ui |  152 ++-
 4 files changed, 220 insertions(+), 84 deletions(-)

New commits:
commit 1264cff53a3d4510f0e82706aeeaf1c63b4f04a6
Author: Balazs Varga 
AuthorDate: Tue Nov 14 13:38:14 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 14 19:47:13 2023 +0100

resave with newer glade version

Change-Id: If2a527679d171ff8f11b3fdeaf595c6bdd1b5f28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159419
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/uiconfig/swriter/ui/optcomparison.ui 
b/sw/uiconfig/swriter/ui/optcomparison.ui
index 62d228c252e3..8010cbc0a9a2 100644
--- a/sw/uiconfig/swriter/ui/optcomparison.ui
+++ b/sw/uiconfig/swriter/ui/optcomparison.ui
@@ -1,77 +1,77 @@
 
-
+
 
   
   
 1
 99
 1
-1
-10
+1
+10
   
   
 True
-False
-6
+False
+6
 vertical
 12
 
   
 True
-False
-0
-none
+False
+0
+none
 
-  
+  
   
 True
-False
-6
+False
 12
 6
+6
 
   
 A_uto
 True
-True
-False
-True
+True
+False
+True
 True
-True
+True
   
   
-0
-0
+0
+0
   
 
 
   
 By w_ord
 True
-True
-False
-True
-True
+True
+False
+True
+True
 auto
   
   
-0
-1
+0
+1
   
 
 
   
 By _character
 True
-True
-False
-True
-True
+True
+False
+True
+True
 auto
   
   
-0
-2
+0
+2
   
 
   
@@ -79,7 +79,7 @@
 
   
 True
-False
+False
 Compare Documents
 
   
@@ -96,71 +96,71 @@
 
   
 True
-False
-0
-none
+False
+0
+none
 
-  
+  
   
 True
-False
-6
-12
+False
 12
 6
+6
+12
 
   
 Ignore _pieces of length:
 True
-True
-False
-True
-True
+True
+False
+True
+True
   
   
-0
-1
+0
+1
   
 
 
   
 Take it into account when comparing
 True
-True
-False
-True
-True
+True
+False
+True
+True
   
   
-0
-0
+0
+0
   
 
 
   
 True
-True
-True
+True
+True
 True
 adjustment1
   
   
-1
-1
+1
+1
   
 
 
   
 Store it when changing the document
 True
-True
-False
-True
-True
+True
+False
+True
+True
   
   
-0
-2
+0
+2
   
 
 
@@ -174,7 +174,7 @@
 
   
 True
-False
+False
 Random number to improve accuracy of document 
comparison
 
   
commit 23228e6fc60a10c41595302c9bf4ed9d753660da
Author: Balazs 

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

2023-11-14 Thread Balazs Varga (via logerrit)
 sw/source/ui/config/optpage.cxx  |   59 +
 sw/source/uibase/inc/optpage.hxx |   12 +
 sw/uiconfig/swriter/ui/optredlinepage.ui |  310 +++
 sw/uiconfig/swriter/ui/opttablepage.ui   |  229 --
 4 files changed, 421 insertions(+), 189 deletions(-)

New commits:
commit 164596c00b4361b5b378609f026a1b11ac653970
Author: Balazs Varga 
AuthorDate: Tue Nov 14 12:13:21 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 14 19:46:41 2023 +0100

resave with newer glade version

Change-Id: I2679c9f59b351d9e3db9121d42d9e8c2948ac641
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159413
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/uiconfig/swriter/ui/optredlinepage.ui 
b/sw/uiconfig/swriter/ui/optredlinepage.ui
index f01c85075a5f..255bf2d6e851 100644
--- a/sw/uiconfig/swriter/ui/optredlinepage.ui
+++ b/sw/uiconfig/swriter/ui/optredlinepage.ui
@@ -1,64 +1,64 @@
 
-
+
 
   
-  
+  
   
 True
-False
+False
 True
 True
-6
-12
+6
+12
 
   
 True
-False
+False
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
-True
-6
-12
+False
 12
 6
+True
+6
+12
 
   
 True
-False
+False
 _Attributes:
-True
-insert
+True
+insert
 0
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 Co_lor:
-True
-insertcolor
+True
+insertcolor
 0
   
   
-0
-1
+0
+1
   
 
 
   
 True
-False
+False
 center
 
   [None]
@@ -80,19 +80,18 @@
 
   
   
-1
-0
+1
+0
   
 
 
   
-
 True
-False
-False
+False
+False
 True
 0
-True
+True
 
   
 
@@ -104,26 +103,26 @@
 
   
   
-1
-1
+1
+1
   
 
 
   
 True
-False
+False
 True
-never
-never
-in
+never
+never
+in
 
   
 True
-False
+False
 
   
 True
-False
+False
 True
   
 
@@ -131,8 +130,8 @@
 
   
   
-2
-0
+2
+0
 2
   
 
@@ -141,7 +140,7 @@
 
   
 True
-False
+False
 Insertions
 0
 
@@ -151,59 +150,59 @@
 
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
-True
-6
-12
+False
 12
 6
+True
+6
+12
 
   
 True
-False
+False
 Attri_butes:
-True
-deleted
+True
+deleted
 0
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 Col_or:
-True
-deletedcolor
+True
+   

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

2023-11-13 Thread Balazs Varga (via logerrit)
 sw/source/ui/config/optpage.cxx|   65 
 sw/source/uibase/inc/optpage.hxx   |   14 +
 sw/uiconfig/swriter/ui/printoptionspage.ui |  389 +
 3 files changed, 369 insertions(+), 99 deletions(-)

New commits:
commit d93d11529e7922fe391edcc839af8a3b4044b809
Author: Balazs Varga 
AuthorDate: Mon Nov 13 18:01:45 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 14 08:22:10 2023 +0100

tdf#158130 - UI: Part 26 - Unify lockdown behavior of Options dialog

for Writer - Print Page.

Change-Id: Id6bc4da75cba3daf83a9709233eaafea372bb600
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159392
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 1abc9d46d334..8506d8773d55 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -399,25 +399,39 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(weld::Container* 
pPage, weld::DialogCon
 , m_bAttrModified(false)
 , m_bPreview(false)
 , m_xGrfCB(m_xBuilder->weld_check_button("graphics"))
+, m_xGrfImg(m_xBuilder->weld_widget("lockgraphics"))
 , m_xCtrlFieldCB(m_xBuilder->weld_check_button("formcontrols"))
+, m_xCtrlFieldImg(m_xBuilder->weld_widget("lockformcontrols"))
 , m_xBackgroundCB(m_xBuilder->weld_check_button("background"))
+, m_xBackgroundImg(m_xBuilder->weld_widget("lockbackground"))
 , m_xBlackFontCB(m_xBuilder->weld_check_button("inblack"))
+, m_xBlackFontImg(m_xBuilder->weld_widget("lockinblack"))
 , m_xPrintHiddenTextCB(m_xBuilder->weld_check_button("hiddentext"))
+, m_xPrintHiddenTextImg(m_xBuilder->weld_widget("lockhiddentext"))
 , 
m_xPrintTextPlaceholderCB(m_xBuilder->weld_check_button("textplaceholder"))
+, 
m_xPrintTextPlaceholderImg(m_xBuilder->weld_widget("locktextplaceholder"))
 , m_xPagesFrame(m_xBuilder->weld_widget("pagesframe"))
 , m_xLeftPageCB(m_xBuilder->weld_check_button("leftpages"))
+, m_xLeftPageImg(m_xBuilder->weld_widget("lockleftpages"))
 , m_xRightPageCB(m_xBuilder->weld_check_button("rightpages"))
+, m_xRightPageImg(m_xBuilder->weld_widget("lockrightpages"))
 , m_xProspectCB(m_xBuilder->weld_check_button("brochure"))
+, m_xProspectImg(m_xBuilder->weld_widget("lockbrochure"))
 , m_xProspectCB_RTL(m_xBuilder->weld_check_button("rtl"))
+, m_xProspectImg_RTL(m_xBuilder->weld_widget("lockrtl"))
 , m_xCommentsFrame(m_xBuilder->weld_widget("commentsframe"))
 , m_xNoRB(m_xBuilder->weld_radio_button("none"))
 , m_xOnlyRB(m_xBuilder->weld_radio_button("only"))
 , m_xEndRB(m_xBuilder->weld_radio_button("end"))
 , m_xEndPageRB(m_xBuilder->weld_radio_button("endpage"))
 , m_xInMarginsRB(m_xBuilder->weld_radio_button("inmargins"))
+, m_xMarginsImg(m_xBuilder->weld_widget("lockcomments"))
 , m_xPrintEmptyPagesCB(m_xBuilder->weld_check_button("blankpages"))
+, m_xPrintEmptyPagesImg(m_xBuilder->weld_widget("lockblankpages"))
 , m_xPaperFromSetupCB(m_xBuilder->weld_check_button("papertray"))
+, m_xPaperFromSetupImg(m_xBuilder->weld_widget("lockpapertray"))
 , m_xFaxLB(m_xBuilder->weld_combo_box("fax"))
+, m_xFaxImg(m_xBuilder->weld_widget("lockfax"))
 {
 Link aLk = LINK( this, SwAddPrinterTabPage, 
AutoClickHdl);
 m_xGrfCB->connect_toggled( aLk );
@@ -550,32 +564,79 @@ voidSwAddPrinterTabPage::Reset( const SfxItemSet*  )
 if( const SwAddPrinterItem* pAddPrinterAttr = rSet.GetItemIfSet( 
FN_PARAM_ADDPRINTER , false ) )
 {
 m_xGrfCB->set_active(pAddPrinterAttr->m_bPrintGraphic || 
pAddPrinterAttr->m_bPrintDraw);
+
m_xGrfCB->set_sensitive(!officecfg::Office::Writer::Print::Content::Graphic::isReadOnly());
+
m_xGrfImg->set_visible(officecfg::Office::Writer::Print::Content::Graphic::isReadOnly());
+
 m_xCtrlFieldCB->set_active(   pAddPrinterAttr->m_bPrintControl);
+
m_xCtrlFieldCB->set_sensitive(!officecfg::Office::Writer::Print::Content::Control::isReadOnly());
+
m_xCtrlFieldImg->set_visible(officecfg::Office::Writer::Print::Content::Control::isReadOnly());
+
 m_xBackgroundCB->set_active(
pAddPrinterAttr->m_bPrintPageBackground);
+
m_xBackgroundCB->set_sensitive(!officecfg::Office::Writer::Print::Content::Background::isReadOnly());
+
m_xBackgroundImg->set_visible(officecfg::Office::Writer::Print::Content::Background::isReadOnly());
+
 m_xBlackFontCB->set_active( pAddPrinterAttr->m_bPrintBlackFont);
+
m_xBlackFontCB->set_sensitive(!officecfg::Office::Writer::Print::Content::PrintBlack::isReadOnly());
+
m_xBlackFontImg->set_visible(officecfg::Office::Writer::Print::Content::PrintBlack::isReadOnly());
+
 m_xPrintHiddenTextCB->set_active( pAddPrinterAttr->m_bPrintHiddenText);
+

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

2023-11-13 Thread Balazs Varga (via logerrit)
 sw/source/ui/config/optpage.cxx  |   49 
 sw/source/uibase/inc/optpage.hxx |   10 +
 sw/uiconfig/swriter/ui/optfonttabpage.ui |  172 +++
 3 files changed, 213 insertions(+), 18 deletions(-)

New commits:
commit 4cf54aa70a73b000c6dbf604a2d69f287644756e
Author: Balazs Varga 
AuthorDate: Mon Nov 13 14:39:42 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 14 08:21:54 2023 +0100

tdf#158010 - UI: Part 25 - Unify lockdown behavior of Options dialog

for Writer - Basic Fonts Page.

Change-Id: I73276c0bf3dc190098781e427cf32c753aae23ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159377
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 5628f2b1570a..1abc9d46d334 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -653,15 +653,25 @@ SwStdFontTabPage::SwStdFontTabPage(weld::Container* 
pPage, weld::DialogControlle
 , m_sScriptComplex(SwResId(ST_SCRIPT_CTL))
 , m_xLabelFT(m_xBuilder->weld_label("label1"))
 , m_xStandardBox(m_xBuilder->weld_combo_box("standardbox"))
+, m_xStandardBoxImg(m_xBuilder->weld_widget("lockstandardbox"))
 , m_xStandardHeightLB(new 
FontSizeBox(m_xBuilder->weld_combo_box("standardheight")))
+, m_xStandardHeightImg(m_xBuilder->weld_widget("lockstandardheight"))
 , m_xTitleBox(m_xBuilder->weld_combo_box("titlebox"))
+, m_xTitleBoxImg(m_xBuilder->weld_widget("locktitlebox"))
 , m_xTitleHeightLB(new 
FontSizeBox(m_xBuilder->weld_combo_box("titleheight")))
+, m_xTitleHeightImg(m_xBuilder->weld_widget("locktitleheight"))
 , m_xListBox(m_xBuilder->weld_combo_box("listbox"))
+, m_xListBoxImg(m_xBuilder->weld_widget("locklistbox"))
 , m_xListHeightLB(new 
FontSizeBox(m_xBuilder->weld_combo_box("listheight")))
+, m_xListHeightImg(m_xBuilder->weld_widget("locklistheight"))
 , m_xLabelBox(m_xBuilder->weld_combo_box("labelbox"))
+, m_xLabelBoxImg(m_xBuilder->weld_widget("locklabelbox"))
 , m_xLabelHeightLB(new 
FontSizeBox(m_xBuilder->weld_combo_box("labelheight")))
+, m_xLabelHeightImg(m_xBuilder->weld_widget("locklabelheight"))
 , m_xIdxBox(m_xBuilder->weld_combo_box("idxbox"))
+, m_xIdxBoxImg(m_xBuilder->weld_widget("lockidxbox"))
 , m_xIndexHeightLB(new 
FontSizeBox(m_xBuilder->weld_combo_box("indexheight")))
+, m_xIndexHeightImg(m_xBuilder->weld_widget("lockindexheight"))
 , m_xStandardPB(m_xBuilder->weld_button("standard"))
 {
 m_xStandardBox->make_sorted();
@@ -1036,6 +1046,45 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
 m_xLabelHeightLB->set_value( CalcToPoint( nLabelHeight   , 
MapUnit::MapTwip, 10 ));
 m_xIndexHeightLB->set_value( CalcToPoint( nIndexHeight   , 
MapUnit::MapTwip, 10 ));
 
+
+if (m_nFontGroup == FONT_GROUP_DEFAULT)
+{
+bool bReadonly = 
officecfg::Office::Writer::DefaultFont::Standard::isReadOnly();
+m_xStandardBox->set_sensitive(!bReadonly);
+m_xStandardBoxImg->set_visible(bReadonly);
+bReadonly = 
officecfg::Office::Writer::DefaultFont::StandardHeight::isReadOnly();
+m_xStandardHeightLB->set_sensitive(!bReadonly);
+m_xStandardHeightImg->set_visible(bReadonly);
+
+bReadonly = 
officecfg::Office::Writer::DefaultFont::Heading::isReadOnly();
+m_xTitleBox->set_sensitive(!bReadonly);
+m_xTitleBoxImg->set_visible(bReadonly);
+bReadonly = 
officecfg::Office::Writer::DefaultFont::HeadingHeight::isReadOnly();
+m_xTitleHeightLB->set_sensitive(!bReadonly);
+m_xTitleHeightImg->set_visible(bReadonly);
+
+bReadonly = officecfg::Office::Writer::DefaultFont::List::isReadOnly();
+m_xListBox->set_sensitive(!bReadonly);
+m_xListBoxImg->set_visible(bReadonly);
+bReadonly = 
officecfg::Office::Writer::DefaultFont::ListHeight::isReadOnly();
+m_xListHeightLB->set_sensitive(!bReadonly);
+m_xListHeightImg->set_visible(bReadonly);
+
+bReadonly = 
officecfg::Office::Writer::DefaultFont::Caption::isReadOnly();
+m_xLabelBox->set_sensitive(!bReadonly);
+m_xLabelBoxImg->set_visible(bReadonly);
+bReadonly = 
officecfg::Office::Writer::DefaultFont::CaptionHeight::isReadOnly();
+m_xLabelHeightLB->set_sensitive(!bReadonly);
+m_xLabelHeightImg->set_visible(bReadonly);
+
+bReadonly = 
officecfg::Office::Writer::DefaultFont::Index::isReadOnly();
+m_xIdxBox->set_sensitive(!bReadonly);
+m_xIdxBoxImg->set_visible(bReadonly);
+bReadonly = 
officecfg::Office::Writer::DefaultFont::IndexHeight::isReadOnly();
+m_xIndexHeightLB->set_sensitive(!bReadonly);
+m_xIndexHeightImg->set_visible(bReadonly);
+}
+
 m_xStandardBox->save_value();
 m_xTitleBox->save_value();
 m_xListBox->save_value();
diff --git a/sw/source/uibase/inc/optpage.hxx 

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

2023-11-13 Thread Balazs Varga (via logerrit)
 sw/uiconfig/swriter/ui/optfonttabpage.ui |  220 +++
 1 file changed, 110 insertions(+), 110 deletions(-)

New commits:
commit 2585cd1f52585c9a2abfc34ea56171375ebdab6a
Author: Balazs Varga 
AuthorDate: Mon Nov 13 10:48:48 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Nov 13 18:09:07 2023 +0100

resave with newer glade version

Change-Id: I63c03d2c23394f0ba3441be9cb858a11011ee7ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159376
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/uiconfig/swriter/ui/optfonttabpage.ui 
b/sw/uiconfig/swriter/ui/optfonttabpage.ui
index adca6166a1cc..f3c8475500a1 100644
--- a/sw/uiconfig/swriter/ui/optfonttabpage.ui
+++ b/sw/uiconfig/swriter/ui/optfonttabpage.ui
@@ -1,140 +1,140 @@
 
-
+
 
   
   
 True
-False
+False
 True
 True
-6
+6
 vertical
 12
 
   
 True
-False
+False
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
-True
-6
-12
+False
 12
 6
+True
+6
+12
 
   
 True
-False
+False
 True
 Font
 0
   
   
-1
-0
+1
+0
   
 
 
   
 True
-False
+False
 _Size
-True
-standardheight
+True
+standardheight
 0
   
   
-2
-0
+2
+0
   
 
 
   
 True
-False
+False
 De_fault:
-True
-standardbox
+True
+standardbox
 0
   
   
-0
-1
+0
+1
   
 
 
   
 True
-False
+False
 Headin_g:
-True
-titlebox
+True
+titlebox
 0
   
   
-0
-2
+0
+2
   
 
 
   
 True
-False
+False
 _List:
-True
-listbox
+True
+listbox
 0
   
   
-0
-3
+0
+3
   
 
 
   
 True
-False
+False
 C_aption:
-True
-labelbox
+True
+labelbox
 0
   
   
-0
-4
+0
+4
   
 
 
   
 True
-False
+False
 _Index:
-True
-idxbox
+True
+idxbox
 0
   
   
-0
-5
+0
+5
   
 
 
   
 True
-False
+False
 True
-True
+True
 
   
-True
+True
+True
 True
-True
   
 
 
@@ -144,21 +144,21 @@
 
   
   
-1
-1
+1
+1
   
 
 
   
 True
-False
+False
 True
-True
+True
 
   
-True
+True
+True
 True
-True
   
 
 
@@ -168,21 +168,21 @@
 
   
   
-1
-2
+1
+2
   
 
 
   
  

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

2023-11-13 Thread Balazs Varga (via logerrit)
 cui/source/options/optgdlg.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 0d30e2a8cd312dfcf5fc2ac0c67e09a1c74d2f46
Author: Balazs Varga 
AuthorDate: Mon Nov 13 10:17:51 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Nov 13 14:35:07 2023 +0100

Related: tdf#157837 - UI: Part 3 - Unify lockdown behavior of Options

dialog for View Page.

Change-Id: I78239ce7ad7b133eaaa3d42a0f424ed0250cb47e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159359
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 9e32e2fc9ea6..941164e5044f 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1116,7 +1116,6 @@ void OfaViewTabPage::UpdateHardwareAccelStatus()
 }
 #if HAVE_FEATURE_SKIA
 m_xUseHardwareAccell->set_sensitive(!m_xUseSkia->get_active());
-m_xUseHardwareAccellImg->set_visible(m_xUseSkia->get_active());
 #endif
 }
 


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

2023-11-13 Thread Balazs Varga (via logerrit)
 sw/source/ui/config/optpage.cxx |   57 +
 sw/source/uibase/inc/optpage.hxx|   13 +
 sw/uiconfig/swriter/ui/optformataidspage.ui |  267 +---
 3 files changed, 316 insertions(+), 21 deletions(-)

New commits:
commit a598de5b6ed6f161844e01f7be7164a65927caee
Author: Balazs Varga 
AuthorDate: Fri Nov 10 15:57:57 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Nov 13 09:20:27 2023 +0100

tdf#158009 - UI: Part 24 - Unify lockdown behavior of Options dialog

for Writer - Format Aids Page.

Change-Id: Ia51094f86c47d154ec6e8b4d961a9db6a5005a03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159305
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 6fb499f455ad..5628f2b1570a 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1379,23 +1379,36 @@ 
SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w
 : SfxTabPage(pPage, pController, 
"modules/swriter/ui/optformataidspage.ui", "OptFormatAidsPage", )
 , m_pWrtShell(nullptr)
 , m_xParaCB(m_xBuilder->weld_check_button("paragraph"))
+, m_xParaImg(m_xBuilder->weld_widget("lockparagraph"))
 , m_xSHyphCB(m_xBuilder->weld_check_button("hyphens"))
+, m_xSHyphImg(m_xBuilder->weld_widget("lockhyphens"))
 , m_xSpacesCB(m_xBuilder->weld_check_button("spaces"))
+, m_xSpacesImg(m_xBuilder->weld_widget("lockspaces"))
 , m_xHSpacesCB(m_xBuilder->weld_check_button("nonbreak"))
+, m_xHSpacesImg(m_xBuilder->weld_widget("locknonbreak"))
 , m_xTabCB(m_xBuilder->weld_check_button("tabs"))
+, m_xTabImg(m_xBuilder->weld_widget("locktabs"))
 , m_xTabLabel(m_xBuilder->weld_label("tabs_label"))
 , m_xBreakCB(m_xBuilder->weld_check_button("break"))
+, m_xBreakImg(m_xBuilder->weld_widget("lockbreak"))
 , m_xCharHiddenCB(m_xBuilder->weld_check_button("hiddentext"))
+, m_xCharHiddenImg(m_xBuilder->weld_widget("lockhiddentext"))
 , m_xBookmarkCB(m_xBuilder->weld_check_button("bookmarks"))
+, m_xBookmarkImg(m_xBuilder->weld_widget("lockbookmarks"))
 , m_xBookmarkLabel(m_xBuilder->weld_label("bookmarks_label"))
 , m_xDirectCursorFrame(m_xBuilder->weld_frame("directcrsrframe"))
 , m_xOnOffCB(m_xBuilder->weld_check_button("cursoronoff"))
+, m_xOnOffImg(m_xBuilder->weld_widget("lockcursoronoff"))
 , 
m_xDirectCursorFillMode(m_xBuilder->weld_combo_box("cxDirectCursorFillMode"))
+, m_xDirectCursorFillModeImg(m_xBuilder->weld_widget("lockfillmode"))
 , m_xCursorProtFrame(m_xBuilder->weld_frame("crsrprotframe"))
 , m_xImageFrame(m_xBuilder->weld_frame("frmImage"))
 , m_xCursorInProtCB(m_xBuilder->weld_check_button("cursorinprot"))
+, m_xCursorInProtImg(m_xBuilder->weld_widget("lockcursorinprot"))
 , m_xDefaultAnchorType(m_xBuilder->weld_combo_box("cxDefaultAnchor"))
+, m_xDefaultAnchorTypeImg(m_xBuilder->weld_widget("lockAnchor"))
 , m_xMathBaselineAlignmentCB(m_xBuilder->weld_check_button("mathbaseline"))
+, m_xMathBaselineAlignmentImg(m_xBuilder->weld_widget("lockmathbaseline"))
 {
 SwFillMode eMode = SwFillMode::Tab;
 bool bIsOn = false;
@@ -1527,10 +1540,17 @@ void SwShdwCursorOptionsTabPage::Reset( const 
SfxItemSet* rSet )
 bIsOn = pItem->IsOn();
 }
 m_xOnOffCB->set_active( bIsOn );
+
m_xOnOffCB->set_sensitive(!officecfg::Office::Writer::Cursor::DirectCursor::UseDirectCursor::isReadOnly());
+
m_xOnOffImg->set_visible(officecfg::Office::Writer::Cursor::DirectCursor::UseDirectCursor::isReadOnly());
 
 m_xDirectCursorFillMode->set_active( static_cast(eMode) );
+
m_xDirectCursorFillMode->set_sensitive(!officecfg::Office::Writer::Cursor::DirectCursor::Insert::isReadOnly());
+
m_xDirectCursorFillModeImg->set_visible(officecfg::Office::Writer::Cursor::DirectCursor::Insert::isReadOnly());
+
 if (m_pWrtShell) {
 m_xMathBaselineAlignmentCB->set_active( 
m_pWrtShell->GetDoc()->getIDocumentSettingAccess().get( 
DocumentSettingId::MATH_BASELINE_ALIGNMENT ) );
+
m_xMathBaselineAlignmentCB->set_sensitive(!officecfg::Office::Writer::Layout::Other::IsAlignMathObjectsToBaseline::isReadOnly());
+
m_xMathBaselineAlignmentImg->set_visible(officecfg::Office::Writer::Layout::Other::IsAlignMathObjectsToBaseline::isReadOnly());
 m_xMathBaselineAlignmentCB->save_state();
 } else {
 m_xMathBaselineAlignmentCB->hide();
@@ -1538,20 +1558,57 @@ void SwShdwCursorOptionsTabPage::Reset( const 
SfxItemSet* rSet )
 
 if( const SfxBoolItem* pItem = rSet->GetItemIfSet( 
FN_PARAM_CRSR_IN_PROTECTED, false ) )
 m_xCursorInProtCB->set_active(pItem->GetValue());
+
m_xCursorInProtCB->set_sensitive(!officecfg::Office::Writer::Cursor::Option::ProtectedArea::isReadOnly());
+

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

2023-11-13 Thread Balazs Varga (via logerrit)
 include/svx/optgrid.hxx |7 +
 svx/source/dialog/optgrid.cxx   |   28 ++
 svx/uiconfig/ui/optgridpage.ui  |  115 +---
 sw/uiconfig/swriter/ui/optformataidspage.ui |   14 +--
 4 files changed, 145 insertions(+), 19 deletions(-)

New commits:
commit 6c031c31de72a0eda0a24af52aa041049ef16584
Author: Balazs Varga 
AuthorDate: Fri Nov 10 11:56:56 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Nov 13 09:19:59 2023 +0100

resave with newer glade version

Change-Id: Iba7a427b98552cb297f0b764473e3750063369b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159304
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/uiconfig/swriter/ui/optformataidspage.ui 
b/sw/uiconfig/swriter/ui/optformataidspage.ui
index c2595de4a362..62074f3160d9 100644
--- a/sw/uiconfig/swriter/ui/optformataidspage.ui
+++ b/sw/uiconfig/swriter/ui/optformataidspage.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -25,10 +25,10 @@
   
 True
 False
-6
-6
 12
 6
+6
+6
 
   
 Pa_ragraph end
@@ -279,9 +279,9 @@
   
 True
 False
-6
 12
 6
+6
 
   
 Math baseline alignment
@@ -326,9 +326,9 @@
   
 True
 False
-6
 12
 6
+6
 
   
 Enable cursor
@@ -382,9 +382,9 @@
   
 True
 False
-6
 12
 6
+6
 
   
 _Direct cursor
@@ -479,9 +479,9 @@
   
 True
 False
-6
 12
 6
+6
 
   
 True
commit d6f174291003f058f7cd0bec6b838e1c94267b32
Author: Balazs Varga 
AuthorDate: Fri Nov 10 11:19:04 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Nov 13 09:19:46 2023 +0100

tdf#158008 - UI: Part 23 - Unify lockdown behavior of Options dialog

for Writer - Grid Page.

Change-Id: Ia492d0d742050d1ceec3c9ab68bf3378355977e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159290
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
index 223f2da7d00b..f27a4bf78d29 100644
--- a/include/svx/optgrid.hxx
+++ b/include/svx/optgrid.hxx
@@ -106,12 +106,19 @@ private:
 boolbAttrModified;
 
 std::unique_ptr m_xCbxUseGridsnap;
+std::unique_ptr m_xCbxUseGridsnapImg;
 std::unique_ptr m_xCbxGridVisible;
+std::unique_ptr m_xCbxGridVisibleImg;
 std::unique_ptr m_xMtrFldDrawX;
+std::unique_ptr m_xMtrFldDrawXImg;
 std::unique_ptr m_xMtrFldDrawY;
+std::unique_ptr m_xMtrFldDrawYImg;
 std::unique_ptr m_xNumFldDivisionX;
+std::unique_ptr m_xNumFldDivisionXImg;
 std::unique_ptr m_xNumFldDivisionY;
+std::unique_ptr m_xNumFldDivisionYImg;
 std::unique_ptr m_xCbxSynchronize;
+std::unique_ptr m_xCbxSynchronizeImg;
 protected:
 //these controls are used in draw and impress
 std::unique_ptr m_xSnapFrames;
diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index 736c9c798827..cd73ae223961 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -91,12 +92,19 @@ SvxGridTabPage::SvxGridTabPage(weld::Container* pPage, 
weld::DialogController* p
 : SfxTabPage(pPage, pController, "svx/ui/optgridpage.ui", "OptGridPage", 
)
 , bAttrModified(false)
 , m_xCbxUseGridsnap(m_xBuilder->weld_check_button("usegridsnap"))
+, m_xCbxUseGridsnapImg(m_xBuilder->weld_widget("lockusegridsnap"))
 , m_xCbxGridVisible(m_xBuilder->weld_check_button("gridvisible"))
+, m_xCbxGridVisibleImg(m_xBuilder->weld_widget("lockgridvisible"))
 , m_xMtrFldDrawX(m_xBuilder->weld_metric_spin_button("mtrflddrawx", 
FieldUnit::CM))
+, m_xMtrFldDrawXImg(m_xBuilder->weld_widget("lockmtrflddrawx"))
 , m_xMtrFldDrawY(m_xBuilder->weld_metric_spin_button("mtrflddrawy", 
FieldUnit::CM))
+, m_xMtrFldDrawYImg(m_xBuilder->weld_widget("lockmtrflddrawy"))
 , m_xNumFldDivisionX(m_xBuilder->weld_spin_button("numflddivisionx"))
+, m_xNumFldDivisionXImg(m_xBuilder->weld_widget("locknumflddivisionx"))
 , m_xNumFldDivisionY(m_xBuilder->weld_spin_button("numflddivisiony"))
+, 

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

2023-11-10 Thread Balazs Varga (via logerrit)
 cui/source/inc/optlingu.hxx |3 +
 cui/source/options/optlingu.cxx |   61 
 2 files changed, 64 insertions(+)

New commits:
commit 985b404f208559b4a91f31eb31dafa9d0384fdaf
Author: Balazs Varga 
AuthorDate: Wed Nov 8 21:34:41 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 10 11:15:17 2023 +0100

tdf#158003 - UI: Part 22 - Unify lockdown behavior of Options dialog

for Language - Writing Aids Page.

Change-Id: I25723fb616544cd6ee7d894c3ca1aa6742748a73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159186
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index dce8f2ccd11f..6c5657acf7bd 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace com::sun::star{
 namespace beans{
@@ -60,6 +61,8 @@ class SvxEditModulesDlg : public weld::GenericDialogController
 std::unique_ptr m_xClosePB;
 std::unique_ptr m_xLanguageLB;
 
+css::uno::Reference< css::configuration::XReadWriteAccess> 
m_xReadWriteAccess;
+
 DECL_LINK( SelectHdl_Impl, weld::TreeView&, void );
 DECL_LINK( UpDownHdl_Impl, weld::Button&, void );
 DECL_LINK( ClickHdl_Impl, weld::Button&, void );
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index b7ac60f5f186..de908b943995 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -46,6 +47,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -1196,6 +1199,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sSpellAuto, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_SPELL_AUTO));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1205,6 +1209,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sGrammarAuto, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_GRAMMAR_AUTO));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1214,6 +1219,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sCapitalWords, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_SPELL_UPPER_CASE));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1223,6 +1229,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sWordsWithDigits, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_SPELL_WITH_DIGITS));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1232,6 +1239,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sSpellClosedCompound, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_SPELL_CLOSED_COMPOUND));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1241,6 +1249,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sSpellHyphenatedCompound, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_SPELL_HYPHENATED_COMPOUND));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1250,6 +1259,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sSpellSpecial, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_SPELL_SPECIAL));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1258,6 +1268,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 nUserData = OptionsUserData( EID_NUM_MIN_WORDLEN, true, 
static_cast(nVal), 

[Libreoffice-commits] core.git: 2 commits - include/comphelper sw/source sw/uiconfig

2023-11-09 Thread Balazs Varga (via logerrit)
 include/comphelper/configuration.hxx |7 
 sw/source/ui/config/optload.cxx  |   54 +++
 sw/source/uibase/inc/optload.hxx |   11 
 sw/uiconfig/swriter/ui/optgeneralpage.ui |  497 +++
 4 files changed, 387 insertions(+), 182 deletions(-)

New commits:
commit 0012f23ca0b59edbb38da055d3388b465146f7eb
Author: Balazs Varga 
AuthorDate: Thu Nov 9 20:52:42 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 10 08:08:01 2023 +0100

tdf#158007 - UI: Part 23 - Unify lockdown behavior of Options dialog

for Writer - General Page.

Change-Id: I2c679ee7f8e2d282a9f9ff19fc1743cb9bb6dbe1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159250
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/include/comphelper/configuration.hxx 
b/include/comphelper/configuration.hxx
index 45228b700944..652e9afaa640 100644
--- a/include/comphelper/configuration.hxx
+++ b/include/comphelper/configuration.hxx
@@ -246,6 +246,13 @@ private:
 /// to access each given localized configuration property.
 template< typename T, typename U > struct ConfigurationLocalizedProperty
 {
+/// Get the read-only status of the given (localized) configuration
+/// property.
+static bool isReadOnly()
+{
+return detail::ConfigurationWrapper::get().isReadOnly(T::path());
+}
+
 /// Get the value of the given localized configuration property, for the
 /// locale currently set at the
 /// com.sun.star.configuration.theDefaultProvider.
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 92e754113aff..675a2d48e8d6 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -83,16 +83,27 @@ SwLoadOptPage::SwLoadOptPage(weld::Container* pPage, 
weld::DialogController* pCo
 , m_xAlwaysRB(m_xBuilder->weld_radio_button("always"))
 , m_xRequestRB(m_xBuilder->weld_radio_button("onrequest"))
 , m_xNeverRB(m_xBuilder->weld_radio_button("never"))
+, m_xGridupdatelink(m_xBuilder->weld_widget("gridupdatelink"))
+, m_xUpdateLinkImg(m_xBuilder->weld_widget("lockupdatelink"))
 , m_xAutoUpdateFields(m_xBuilder->weld_check_button("updatefields"))
+, m_xAutoUpdateFieldsImg(m_xBuilder->weld_widget("lockupdatefields"))
 , m_xAutoUpdateCharts(m_xBuilder->weld_check_button("updatecharts"))
+, m_xAutoUpdateChartsImg(m_xBuilder->weld_widget("lockupdatecharts"))
 , m_xMetricLB(m_xBuilder->weld_combo_box("metric"))
+, m_xMetricImg(m_xBuilder->weld_widget("lockmetric"))
 , m_xTabFT(m_xBuilder->weld_label("tablabel"))
 , m_xTabMF(m_xBuilder->weld_metric_spin_button("tab", FieldUnit::CM))
+, m_xTabImg(m_xBuilder->weld_widget("locktab"))
 , m_xUseSquaredPageMode(m_xBuilder->weld_check_button("squaremode"))
+, m_xUseSquaredPageModeImg(m_xBuilder->weld_widget("locksquaremode"))
 , m_xUseCharUnit(m_xBuilder->weld_check_button("usecharunit"))
+, m_xUseCharUnitImg(m_xBuilder->weld_widget("lockusecharunit"))
 , m_xWordCountED(m_xBuilder->weld_entry("wordcount"))
+, m_xWordCountImg(m_xBuilder->weld_widget("lockwordcount"))
 , 
m_xShowStandardizedPageCount(m_xBuilder->weld_check_button("standardizedpageshow"))
+, 
m_xShowStandardizedPageCountImg(m_xBuilder->weld_widget("lockstandardizedpageshow"))
 , 
m_xStandardizedPageSizeNF(m_xBuilder->weld_spin_button("standardpagesize"))
+, 
m_xStandardizedPageSizeImg(m_xBuilder->weld_widget("lockstandardpagesize"))
 {
 for (sal_uInt32 i = 0; i < SwFieldUnitTable::Count(); ++i)
 {
@@ -362,16 +373,51 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet)
 }
 m_xUseCharUnit->save_state();
 
+bool bReadOnly = 
officecfg::Office::Writer::Content::Update::Link::isReadOnly();
+m_xGridupdatelink->set_sensitive(!bReadOnly);
+m_xUpdateLinkImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Content::Update::Field::isReadOnly();
+m_xAutoUpdateFields->set_sensitive(!bReadOnly);
+m_xAutoUpdateFieldsImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Content::Update::Chart::isReadOnly();
+m_xAutoUpdateCharts->set_sensitive(!bReadOnly);
+m_xAutoUpdateChartsImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Layout::Other::MeasureUnit::isReadOnly();
+m_xMetricLB->set_sensitive(!bReadOnly);
+m_xMetricImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Layout::Other::TabStop::isReadOnly();
+m_xTabMF->set_sensitive(!bReadOnly);
+m_xTabImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Layout::Other::ApplyCharUnit::isReadOnly();
+m_xUseCharUnit->set_sensitive(!bReadOnly);
+m_xUseCharUnitImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Layout::Other::IsSquaredPageMode::isReadOnly();
+m_xUseSquaredPageMode->set_sensitive(!bReadOnly);
+

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

2023-11-09 Thread Balazs Varga (via logerrit)
 sw/source/ui/config/optpage.cxx   |   84 +
 sw/source/uibase/inc/optpage.hxx  |   16 +
 sw/uiconfig/swriter/ui/viewoptionspage.ui |  254 +++---
 3 files changed, 328 insertions(+), 26 deletions(-)

New commits:
commit 51f4cadfdd50e757e593c3166d4e54c6b2634af9
Author: Balazs Varga 
AuthorDate: Wed Nov 8 12:33:56 2023 +0100
Commit: Balazs Varga 
CommitDate: Thu Nov 9 20:29:02 2023 +0100

tdf#158006 - UI: Part 21 - Unify lockdown behavior of Options dialog

for Writer - View Page.

Change-Id: Icbca23d3ec1dd95bbf703227b9479291a978a426
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159126
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index b1f24d671a92..6fb499f455ad 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -86,25 +87,40 @@ void drawRect(vcl::RenderContext& rRenderContext, const 
tools::Rectangle ,
 SwContentOptPage::SwContentOptPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rCoreSet)
 : SfxTabPage(pPage, pController, "modules/swriter/ui/viewoptionspage.ui", 
"ViewOptionsPage", )
 , m_xCrossCB(m_xBuilder->weld_check_button("helplines"))
+, m_xCrossImg(m_xBuilder->weld_widget("lockhelplines"))
 , m_xHMetric(m_xBuilder->weld_combo_box("hrulercombobox"))
+, m_xHMetricImg(m_xBuilder->weld_widget("lockhruler"))
 , m_xVRulerCBox(m_xBuilder->weld_check_button("vruler"))
+, m_xVRulerImg(m_xBuilder->weld_widget("lockvruler"))
 , m_xVRulerRightCBox(m_xBuilder->weld_check_button("vrulerright"))
+, m_xVRulerRightImg(m_xBuilder->weld_widget("lockvrulerright"))
 , m_xVMetric(m_xBuilder->weld_combo_box("vrulercombobox"))
 , m_xSmoothCBox(m_xBuilder->weld_check_button("smoothscroll"))
+, m_xSmoothImg(m_xBuilder->weld_widget("locksmoothscroll"))
 , m_xGrfCB(m_xBuilder->weld_check_button("graphics"))
+, m_xGrfImg(m_xBuilder->weld_widget("lockgraphics"))
 , m_xTableCB(m_xBuilder->weld_check_button("tables"))
+, m_xTableImg(m_xBuilder->weld_widget("locktables"))
 , m_xDrwCB(m_xBuilder->weld_check_button("drawings"))
+, m_xDrwImg(m_xBuilder->weld_widget("lockdrawings"))
 , m_xPostItCB(m_xBuilder->weld_check_button("comments"))
+, m_xPostItImg(m_xBuilder->weld_widget("lockcomments"))
 , m_xSettingsFrame(m_xBuilder->weld_frame("settingsframe"))
 , m_xSettingsLabel(m_xBuilder->weld_label("settingslabel"))
 , m_xMetricLabel(m_xBuilder->weld_label("measureunitlabel"))
 , m_xMetricLB(m_xBuilder->weld_combo_box("measureunit"))
 , m_xShowInlineTooltips(m_xBuilder->weld_check_button("changestooltip"))
+, m_xShowInlineTooltipsImg(m_xBuilder->weld_widget("lockchangestooltip"))
 , 
m_xShowOutlineContentVisibilityButton(m_xBuilder->weld_check_button("outlinecontentvisibilitybutton"))
+, 
m_xShowOutlineContentVImg(m_xBuilder->weld_widget("lockoutlinecontentvisibility"))
 , 
m_xTreatSubOutlineLevelsAsContent(m_xBuilder->weld_check_button("suboutlinelevelsascontent"))
+, 
m_xTreatSubOutlineLevelsImg(m_xBuilder->weld_widget("locksuboutlinelevels"))
 , m_xShowChangesInMargin(m_xBuilder->weld_check_button("changesinmargin"))
+, m_xShowChangesInMarginImg(m_xBuilder->weld_widget("lockchangesinmargin"))
 , m_xFieldHiddenCB(m_xBuilder->weld_check_button("hiddentextfield"))
+, m_xFieldHiddenImg(m_xBuilder->weld_widget("lockhiddentextfield"))
 , m_xFieldHiddenParaCB(m_xBuilder->weld_check_button("hiddenparafield"))
+, m_xFieldHiddenParaImg(m_xBuilder->weld_widget("lockhiddenparafield"))
 {
 m_xShowOutlineContentVisibilityButton->connect_toggled(LINK(this, 
SwContentOptPage, ShowOutlineContentVisibilityButtonHdl));
 
@@ -187,25 +203,88 @@ static void lcl_SelectMetricLB(weld::ComboBox& rMetric, 
TypedWhichIdGetItemIfSet( FN_PARAM_ELEM , false );
 if(pElemAttr)
 {
+bReadOnly = 
officecfg::Office::Writer::Content::Display::Table::isReadOnly();
 m_xTableCB->set_active(pElemAttr->m_bTable);
+m_xTableCB->set_sensitive(!bReadOnly);
+m_xTableImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Content::Display::GraphicObject::isReadOnly();
 m_xGrfCB->set_active(pElemAttr->m_bGraphic);
+m_xGrfCB->set_sensitive(!bReadOnly);
+m_xGrfImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Content::Display::DrawingControl::isReadOnly();
 m_xDrwCB->set_active(pElemAttr->m_bDrawing);
+m_xDrwCB->set_sensitive(!bReadOnly);
+m_xDrwImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Content::Display::Note::isReadOnly();
 m_xPostItCB->set_active(pElemAttr->m_bNotes);
+m_xPostItCB->set_sensitive(!bReadOnly);

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

2023-11-08 Thread Balazs Varga (via logerrit)
 cui/source/options/doclinkdialog.cxx |   45 +++
 cui/source/options/doclinkdialog.hxx |3 ++
 2 files changed, 48 insertions(+)

New commits:
commit e0dd56acca39524b63b708590f03a3cd6dcbe3ca
Author: Balazs Varga 
AuthorDate: Tue Nov 7 15:17:16 2023 +0100
Commit: Balazs Varga 
CommitDate: Wed Nov 8 10:37:50 2023 +0100

Related: tdf#158004 - UI: Part 20 - Unify lockdown behavior of

Options dialog for Databases Page.

Change-Id: I573479df8048a9ff4d4aedc9780cbe0395900526
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159074
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/doclinkdialog.cxx 
b/cui/source/options/doclinkdialog.cxx
index fac99002401c..f938399140ab 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -20,7 +20,11 @@
 #include "doclinkdialog.hxx"
 
 #include 
+#include 
+#include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -53,6 +57,9 @@ namespace svx
 m_xURL->DisableHistory();
 m_xURL->SetFilter(u"*.odb");
 
+css::uno::Reference < css::uno::XComponentContext > 
xContext(::comphelper::getProcessComponentContext());
+m_xReadWriteAccess = 
css::configuration::ReadWriteAccess::create(xContext, "*");
+
 m_xName->connect_changed( LINK(this, ODocumentLinkDialog, 
OnEntryModified) );
 m_xURL->connect_changed( LINK(this, ODocumentLinkDialog, 
OnComboBoxModified) );
 m_xBrowseFile->connect_clicked( LINK(this, ODocumentLinkDialog, 
OnBrowseFile) );
@@ -81,6 +88,44 @@ namespace svx
 void ODocumentLinkDialog::validate( )
 {
 m_xOK->set_sensitive((!m_xName->get_text().isEmpty()) && 
(!m_xURL->get_active_text().isEmpty()));
+
+if (m_xOK->get_sensitive())
+{
+Reference xItemList = 
officecfg::Office::DataAccess::RegisteredNames::get();
+Sequence< OUString > lNodeNames = xItemList->getElementNames();
+
+for (const OUString& sNodeName : lNodeNames)
+{
+Reference xSet;
+xItemList->getByName(sNodeName) >>= xSet;
+
+OUString aDatabaseName;
+if (xSet->getPropertySetInfo()->hasPropertyByName("Name"))
+xSet->getPropertyValue("Name") >>= aDatabaseName;
+
+if (!aDatabaseName.isEmpty() && m_xName->get_text() == 
aDatabaseName)
+{
+const OUString aConfigPath = 
officecfg::Office::DataAccess::RegisteredNames::path() + "/" + sNodeName;
+if 
(m_xReadWriteAccess->hasPropertyByHierarchicalName(aConfigPath + "/Name"))
+{
+css::beans::Property aProperty = 
m_xReadWriteAccess->getPropertyByHierarchicalName(aConfigPath + "/Name");
+bool bReadOnly = (aProperty.Attributes & 
css::beans::PropertyAttribute::READONLY) != 0;
+
+m_xURL->set_sensitive(!bReadOnly);
+m_xBrowseFile->set_sensitive(!bReadOnly);
+}
+
+if 
(m_xReadWriteAccess->hasPropertyByHierarchicalName(aConfigPath + "/Location"))
+{
+css::beans::Property aProperty = 
m_xReadWriteAccess->getPropertyByHierarchicalName(aConfigPath + "/Location");
+bool bReadOnly = (aProperty.Attributes & 
css::beans::PropertyAttribute::READONLY) != 0;
+
+m_xName->set_sensitive(!bReadOnly);
+}
+break;
+}
+}
+}
 }
 
 IMPL_LINK_NOARG(ODocumentLinkDialog, OnOk, weld::Button&, void)
diff --git a/cui/source/options/doclinkdialog.hxx 
b/cui/source/options/doclinkdialog.hxx
index 371dc6504fe9..3ea0d5027d0f 100644
--- a/cui/source/options/doclinkdialog.hxx
+++ b/cui/source/options/doclinkdialog.hxx
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 
 namespace svx
 {
@@ -30,6 +31,8 @@ namespace svx
 {
 Link  m_aNameValidator;
 
+css::uno::Reference< css::configuration::XReadWriteAccess> 
m_xReadWriteAccess;
+
 std::unique_ptr m_xBrowseFile;
 std::unique_ptr m_xName;
 std::unique_ptr m_xOK;


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

2023-11-07 Thread Balazs Varga (via logerrit)
 cui/source/options/connpooloptions.cxx |   30 +++-
 cui/source/options/connpooloptions.hxx |6 
 cui/uiconfig/ui/connpooloptions.ui |  244 +
 3 files changed, 191 insertions(+), 89 deletions(-)

New commits:
commit ebb51d094d9d58568ad6adf5730b04b5f24c7f25
Author: Balazs Varga 
AuthorDate: Mon Nov 6 11:25:44 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 7 21:40:50 2023 +0100

tdf#158004 - UI: Part 20 - Unify lockdown behavior of Options dialog

for Connections Page.

Change-Id: I76510a893bb35e03e6401aeeb03971969cc42ad2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158989
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/connpooloptions.cxx 
b/cui/source/options/connpooloptions.cxx
index 00101bed4fb6..f6321f2252b1 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -25,6 +25,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 namespace offapp
 {
@@ -49,13 +51,16 @@ namespace offapp
 , m_sYes(CuiResId(RID_CUISTR_YES))
 , m_sNo(CuiResId(RID_CUISTR_NO))
 , m_xEnablePooling(m_xBuilder->weld_check_button("connectionpooling"))
+, m_xEnablePoolingImg(m_xBuilder->weld_widget("lockconnectionpooling"))
 , m_xDriversLabel(m_xBuilder->weld_label("driverslabel"))
 , m_xDriverList(m_xBuilder->weld_tree_view("driverlist"))
 , m_xDriverLabel(m_xBuilder->weld_label("driverlabel"))
 , m_xDriver(m_xBuilder->weld_label("driver"))
 , 
m_xDriverPoolingEnabled(m_xBuilder->weld_check_button("enablepooling"))
+, 
m_xDriverPoolingEnabledImg(m_xBuilder->weld_widget("lockenablepooling"))
 , m_xTimeoutLabel(m_xBuilder->weld_label("timeoutlabel"))
 , m_xTimeout(m_xBuilder->weld_spin_button("timeout"))
+, m_xTimeoutImg(m_xBuilder->weld_widget("locktimeout"))
 {
 
m_xDriverList->set_size_request(m_xDriverList->get_approximate_digit_width() * 
60,
 m_xDriverList->get_height_rows(15));
@@ -68,6 +73,9 @@ namespace offapp
 };
 m_xDriverList->set_column_fixed_widths(aWidths);
 
+css::uno::Reference < css::uno::XComponentContext > 
xContext(::comphelper::getProcessComponentContext());
+m_xReadWriteAccess = 
css::configuration::ReadWriteAccess::create(xContext, "*");
+
 m_xEnablePooling->connect_toggled( LINK(this, 
ConnectionPoolOptionsPage, OnEnabledDisabled) );
 m_xDriverPoolingEnabled->connect_toggled( LINK(this, 
ConnectionPoolOptionsPage, OnEnabledDisabled) );
 
@@ -136,6 +144,8 @@ namespace offapp
 const SfxBoolItem* pEnabled = 
_rSet.GetItem(SID_SB_POOLING_ENABLED);
 OSL_ENSURE(pEnabled, "ConnectionPoolOptionsPage::implInitControls: 
missing the Enabled item!");
 m_xEnablePooling->set_active(pEnabled == nullptr || 
pEnabled->GetValue());
+
m_xEnablePooling->set_sensitive(!officecfg::Office::DataAccess::ConnectionPool::EnablePooling::isReadOnly());
+
m_xEnablePoolingImg->set_visible(officecfg::Office::DataAccess::ConnectionPool::EnablePooling::isReadOnly());
 
 m_xEnablePooling->save_state();
 
@@ -233,6 +243,20 @@ namespace offapp
 m_xDriverPoolingEnabled->set_active(currentSetting.bEnabled);
 m_xTimeout->set_value(currentSetting.nTimeoutSeconds);
 
+OUString aConfigPath = 
officecfg::Office::DataAccess::ConnectionPool::DriverSettings::path() + "/" + 
currentSetting.sName;
+css::beans::Property aProperty = 
m_xReadWriteAccess->getPropertyByHierarchicalName(aConfigPath + "/Enable");
+bool bReadOnly = (aProperty.Attributes & 
css::beans::PropertyAttribute::READONLY) != 0;
+
+m_xDriverPoolingEnabled->set_sensitive(!bReadOnly);
+m_xDriverPoolingEnabledImg->set_visible(bReadOnly);
+
+aProperty = 
m_xReadWriteAccess->getPropertyByHierarchicalName(aConfigPath + "/Timeout");
+bReadOnly = (aProperty.Attributes & 
css::beans::PropertyAttribute::READONLY) != 0;
+
+m_xTimeout->set_sensitive(!bReadOnly);
+m_xTimeoutLabel->set_sensitive(!bReadOnly);
+m_xTimeoutImg->set_visible(bReadOnly);
+
 OnEnabledDisabled(*m_xDriverPoolingEnabled);
 }
 }
@@ -259,13 +283,13 @@ namespace offapp
 m_xDriverList->select(-1);
 m_xDriverLabel->set_sensitive(bGloballyEnabled);
 m_xDriver->set_sensitive(bGloballyEnabled);
-m_xDriverPoolingEnabled->set_sensitive(bGloballyEnabled);
+m_xDriverPoolingEnabled->set_sensitive(bGloballyEnabled && 
!m_xDriverPoolingEnabledImg->get_visible());
 }
 else
 OSL_ENSURE(bLocalDriverChanged, 
"ConnectionPoolOptionsPage::OnEnabledDisabled: where did this come from?");
 
-m_xTimeoutLabel->set_sensitive(bGloballyEnabled && 

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

2023-11-07 Thread Balazs Varga (via logerrit)
 cui/uiconfig/ui/connpooloptions.ui |  128 ++---
 1 file changed, 64 insertions(+), 64 deletions(-)

New commits:
commit 45daaf225ac626f06e876c0a0a6672a1653425b3
Author: Balazs Varga 
AuthorDate: Sat Nov 4 17:28:14 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 7 14:47:27 2023 +0100

resave with newer glade version

Change-Id: Id2c8977d6ab9d0632ac0350a78e52edba2280f4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158988
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/uiconfig/ui/connpooloptions.ui 
b/cui/uiconfig/ui/connpooloptions.ui
index 1385abefa4a1..20440c5284b2 100644
--- a/cui/uiconfig/ui/connpooloptions.ui
+++ b/cui/uiconfig/ui/connpooloptions.ui
@@ -1,13 +1,13 @@
 
-
+
 
   
   
 30
 600
 60
-1
-10
+1
+10
   
   
 
@@ -24,37 +24,37 @@
   
   
 True
-False
+False
 True
 True
-6
-12
+6
+12
 
   
 True
-False
+False
 True
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
-True
-True
-6
+False
 12
 6
+True
+True
+6
 
   
 Connection pooling 
enabled
 True
-True
-False
-True
-True
+True
+False
+True
+True
 
   
 Specifies whether 
the chosen connections are pooled.
@@ -62,46 +62,46 @@
 
   
   
-0
-0
+0
+0
   
 
 
-  
+  
   
 True
-False
+False
 12
 True
 True
-6
+6
 
   
 True
-False
+False
 Drivers known in %PRODUCTNAME
-True
-driverlist
+True
+driverlist
 0
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 12
 
   
 True
-False
+False
 Current driver:
 0
 
-  
+  
 
   
   
@@ -113,11 +113,11 @@
 
   
 True
-False
+False
 True
 0
 
-  
+  
 
   
   
@@ -128,18 +128,18 @@
 
   
   
-0
-2
+0
+2
   
 
 
   
 Enable pooling for this 
driver
 True
-True
-False
-True
-True
+True
+False
+True
+True
 
   
 Select a driver from 
the list and mark the Enable pooling for this driver checkbox in order to pool 
its connection.
@@ -147,23 +147,23 @@
 
   
   
-0
-3
+0
+3
   
 
 
   
 True
-False
+False
 12
 12
 
   
 True
-False
+False
 _Timeout (seconds):
-True
-timeout
+True
+timeout
 0
   
   
@@ -175,12 

  1   2   3   4   5   6   >