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

2023-05-16 Thread Jean-Pierre Ledure (via logerrit)
 wizards/source/sfdatabases/SF_Database.xba |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit d07cc6706ef3b382fa16a104c97b69bc2d2365e5
Author: Jean-Pierre Ledure 
AuthorDate: Tue May 16 17:00:20 2023 +0200
Commit: Jean-Pierre Ledure 
CommitDate: Wed May 17 08:53:58 2023 +0200

ScriptForge - database.GetRows() tdf#155204 error when no data

The complete expected bheviour is:
when there is no data returned by the query,
- either GetRows() returns an empty array, (Header := False)
- or GetRows() returns an array with a single
row containing the column names only (Header := True)

In the example given in the bug report,
GetRows() gives an unexpected error.

Actually the "end-of-file" status is tested
with the isAfterLast() indicator.
It seems better to rely on the Boolean value
returned by the first() and next() methods applied
on the resultset.

Change-Id: Ibe97dbbcb03d45ebb9184fab2733abe4e04963a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151844
Tested-by: Jean-Pierre Ledure 
Reviewed-by: Jean-Pierre Ledure 
Tested-by: Jenkins

diff --git a/wizards/source/sfdatabases/SF_Database.xba 
b/wizards/source/sfdatabases/SF_Database.xba
index de891935be69..f93cf55d74c0 100644
--- a/wizards/source/sfdatabases/SF_Database.xba
+++ b/wizards/source/sfdatabases/SF_Database.xba
@@ -312,7 +312,8 @@ Dim sSql As String  '  SQL 
statement
 Dim bDirect'  Alias of 
DirectSQL
 Dim lCols As Long  '  Number of columns
 Dim lRows As Long  '  Number of rows
-Dim oColumns As Object
+Dim oColumns As Object '  Collection of 
com.sun.star.sdb.ODataColumn
+Dim bRead As Boolean   '  When True, next record has been 
read successfully
 Dim i As Long
 Const cstThisSub = "SFDatabases.Database.GetRows"
 Const cstSubArgs = "SQLCommand, [DirectSQL=False], [Header=False], 
[MaxRows=0]"
@@ -367,8 +368,8 @@ Try:
End If
 
'  Load data
-   .first()
-   Do While Not .isAfterLast() And (MaxRows = 0 Or lRows < 
MaxRows - 1)
+   bRead = .first()
+   Do While bRead And (MaxRows = 0 Or lRows < MaxRows - 1)
lRows = lRows + 1
If lRows = 0 Then
ReDim vResult(0 To lRows, 0 To lCols)
@@ -378,7 +379,7 @@ Try:
For i = 0 To lCols
vResult(lRows, i) = _GetColumnValue(oResult, i 
+ 1)
Next i
-   .next()
+   bRead = .next()
Loop
End With



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

2023-05-16 Thread Vojtěch Doležal (via logerrit)
 xmloff/source/transform/OOo2Oasis.cxx| 1180 +++
 xmloff/source/transform/Oasis2OOo.cxx| 1045 +++
 xmloff/source/transform/StyleOOoTContext.cxx |   56 -
 3 files changed, 992 insertions(+), 1289 deletions(-)

New commits:
commit 24b15bc11b57aaeb3961b26ab636c3cf2d18fddc
Author: Vojtěch Doležal 
AuthorDate: Tue May 16 09:02:45 2023 +0200
Commit: Miklos Vajna 
CommitDate: Wed May 17 08:48:43 2023 +0200

Removed more constant concatenations

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

diff --git a/xmloff/source/transform/OOo2Oasis.cxx 
b/xmloff/source/transform/OOo2Oasis.cxx
index a11baa98a8e9..150de69aebc6 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -76,7 +76,7 @@ enum XMLUserDefinedTransformerAction
 }
 
 #define ENTRY3( n, l, a, p1, p2, p3 ) \
-{ XML_NAMESPACE_##n, XML_##l, a, p1, p2, p3 }
+{ n, l, a, p1, p2, p3 }
 #define ENTRY3QQN( n, l, a, n1, l1, n2, l2, p3 ) \
 ENTRY3( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), \
 XMLTransformerActionInit::QNameParam( n2, l2 ), p3 )
@@ -104,613 +104,447 @@ static constexpr sal_Int32 RENAME_ENTRY( XMLTokenEnum 
f, XMLTokenEnum s )
 XMLTransformerActionInit const aActionTable[] =
 {
 // remove office:class from  and 
-ENTRY0( OFFICE, DOCUMENT, XML_ETACTION_DOCUMENT ),
-ENTRY0( OFFICE, DOCUMENT_CONTENT, XML_ETACTION_DOCUMENT ),
-ENTRY0( OFFICE, DOCUMENT_STYLES, XML_ETACTION_DOCUMENT ),
-ENTRY0( OFFICE, DOCUMENT_SETTINGS, XML_ETACTION_DOCUMENT ),
-ENTRY1Q( OFFICE, AUTO_TEXT_EVENTS, XML_ETACTION_DOCUMENT_RENAME,
-  XML_NAMESPACE_OOO, XML_AUTO_TEXT_EVENTS),
+ENTRY0(  XML_NAMESPACE_OFFICE, XML_DOCUMENT, XML_ETACTION_DOCUMENT ),
+ENTRY0(  XML_NAMESPACE_OFFICE, XML_DOCUMENT_CONTENT, XML_ETACTION_DOCUMENT 
),
+ENTRY0(  XML_NAMESPACE_OFFICE, XML_DOCUMENT_STYLES, XML_ETACTION_DOCUMENT 
),
+ENTRY0(  XML_NAMESPACE_OFFICE, XML_DOCUMENT_SETTINGS, 
XML_ETACTION_DOCUMENT ),
+ENTRY1Q( XML_NAMESPACE_OFFICE, XML_AUTO_TEXT_EVENTS, 
XML_ETACTION_DOCUMENT_RENAME, XML_NAMESPACE_OOO, XML_AUTO_TEXT_EVENTS),
 
 // remove 
-ENTRY0( META, KEYWORDS, XML_ETACTION_COPY_CONTENT ),
+ENTRY0( XML_NAMESPACE_META, XML_KEYWORDS, XML_ETACTION_COPY_CONTENT ),
 
 // rename  to 
-ENTRY1Q( OFFICE, SCRIPT, XML_ETACTION_RENAME_ELEM,
-XML_NAMESPACE_OFFICE, XML_SCRIPTS ),
+ENTRY1Q( XML_NAMESPACE_OFFICE, XML_SCRIPT, XML_ETACTION_RENAME_ELEM, 
XML_NAMESPACE_OFFICE, XML_SCRIPTS ),
 
 // rename  to  and process attributes
-ENTRY2QN( OFFICE, SCRIPT_DATA, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
-XML_NAMESPACE_OFFICE, XML_SCRIPT,
-OOO_SCRIPT_ACTIONS ),
+ENTRY2QN( XML_NAMESPACE_OFFICE, XML_SCRIPT_DATA, 
XML_ETACTION_RENAME_ELEM_PROC_ATTRS, XML_NAMESPACE_OFFICE, XML_SCRIPT, 
OOO_SCRIPT_ACTIONS ),
 
 // rename  to 
-ENTRY1Q( SCRIPT, LIBRARIES, XML_ETACTION_RENAME_ELEM,
-XML_NAMESPACE_OOO, XML_LIBRARIES ),
+ENTRY1Q( XML_NAMESPACE_SCRIPT, XML_LIBRARIES, XML_ETACTION_RENAME_ELEM, 
XML_NAMESPACE_OOO, XML_LIBRARIES ),
 
 // rename  to  and process 
attributes
-ENTRY2QN( SCRIPT, LIBRARY_LINKED, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
-XML_NAMESPACE_OOO, XML_LIBRARY_LINKED,
-OOO_SCRIPT_ACTIONS ),
+ENTRY2QN( XML_NAMESPACE_SCRIPT, XML_LIBRARY_LINKED, 
XML_ETACTION_RENAME_ELEM_PROC_ATTRS, XML_NAMESPACE_OOO, XML_LIBRARY_LINKED, 
OOO_SCRIPT_ACTIONS ),
 
 // rename  to  and process 
attributes
-ENTRY2QN( SCRIPT, LIBRARY_EMBEDDED, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
-XML_NAMESPACE_OOO, XML_LIBRARY_EMBEDDED,
-OOO_SCRIPT_ACTIONS ),
+ENTRY2QN( XML_NAMESPACE_SCRIPT, XML_LIBRARY_EMBEDDED, 
XML_ETACTION_RENAME_ELEM_PROC_ATTRS, XML_NAMESPACE_OOO, XML_LIBRARY_EMBEDDED, 
OOO_SCRIPT_ACTIONS ),
 
 // rename  to  and process attributes
-ENTRY2QN( SCRIPT, MODULE, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
-XML_NAMESPACE_OOO, XML_MODULE,
-OOO_SCRIPT_ACTIONS ),
+ENTRY2QN( XML_NAMESPACE_SCRIPT, XML_MODULE, 
XML_ETACTION_RENAME_ELEM_PROC_ATTRS, XML_NAMESPACE_OOO, XML_MODULE, 
OOO_SCRIPT_ACTIONS ),
 
 // rename  to 
-ENTRY1Q( SCRIPT, SOURCE_CODE, XML_ETACTION_RENAME_ELEM,
-XML_NAMESPACE_OOO, XML_SOURCE_CODE ),
+ENTRY1Q( XML_NAMESPACE_SCRIPT, XML_SOURCE_CODE, XML_ETACTION_RENAME_ELEM, 
XML_NAMESPACE_OOO, XML_SOURCE_CODE ),
 
 // rename  to ,
 // rename  to , process attrs
-ENTRY1Q( OFFICE, FONT_DECLS, XML_ETACTION_RENAME_ELEM,
-XML_NAMESPACE_OFFICE, XML_FONT_FACE_DECLS ),
-ENTRY2QN( STYLE, FONT_DECL, XML_ETACTION_REN

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

2023-05-16 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/htmlexport/htmlexport.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 119190c5237f1e6eb3a8b3d87f1becf3bf39829f
Author: Miklos Vajna 
AuthorDate: Tue May 16 20:14:02 2023 +0200
Commit: Miklos Vajna 
CommitDate: Wed May 17 08:23:21 2023 +0200

CppunitTest_sw_htmlexport: avoid reqif magic in testReqIfTable2

Set the filter options explicitly, rather than inferring it from the
test name.

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

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 793430fec73f..18929a3626f9 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -859,8 +859,12 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfTable)
 "bgcolor");
 }
 
-DECLARE_HTMLEXPORT_TEST(testReqIfTable2, "reqif-table2.odt")
+CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfTable2)
 {
+createSwDoc("reqif-table2.odt");
+setFilterOptions("xhtmlns=reqif-xhtml");
+save(OUString::createFromAscii(mpFilter));
+
 SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
 CPPUNIT_ASSERT(pStream);
 sal_uInt64 nLength = pStream->TellEnd();


Re: new feature for Calc wanted

2023-05-16 Thread Stéphane Guillou

Thank you, Ed.

Enhancement requests are tracked on our Bugzilla, and we already have a 
ticket on the topic. It is about Writer but I guess could also apply to 
Calc:


https://bugs.documentfoundation.org/show_bug.cgi?id=60976

Please feel free to subscribe to that one and comment if need be.

Cheers

On 17/5/23 06:20, Ed Mierzewski wrote:

Hi there,

In Calc, it would be useful to be able to insert a picture as part of 
a comment for a cell. Currently we can do this with text only.


For example, if I create a spreadsheet accounting ledger I could then 
embed a picture of the actual receipt associated with an entry. I 
think this could be quite useful for basic bookkeeping for validating 
entries and storage of records.



Thank you !
*
*
*Ed Mierzewski P.Eng.*
Cleardale Accounting
www.cleardale.ca 
... clear thinking ...
/direct: 780-999-9796 (or text)/
/fax:      1-866-409-0503/
edchem...@gmail.com
/990 Bartholomew Court /
//
/Kelowna, British Columbia /
//
/Canada /
//
/V1W 4N2/



--
Stéphane Guillou
Quality Assurance Analyst | The Document Foundation

Email:stephane.guil...@libreoffice.org
Matrix: @stragu:matrix.org
Fediverse: @str...@mastodon.indie.host
Web:https://stragu.gitlab.io/


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

2023-05-16 Thread Patrick Luby (via logerrit)
 sw/source/uibase/shells/textsh1.cxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit fc157beedabfd08c0991bdd1633be0b9b7a9ff49
Author: Patrick Luby 
AuthorDate: Sun May 14 20:15:12 2023 -0400
Commit: Tomaž Vajngerl 
CommitDate: Wed May 17 06:53:45 2023 +0200

Fix iOS build breakages

Change-Id: Ib30a16f0803638d1b4049ddcbb3829a49ac57cb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151751
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Patrick Luby 
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 573d82d74ca8..76554e923e45 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1670,19 +1670,15 @@ void SwTextShell::Execute(SfxRequest &rReq)
 
 case SID_ATTR_CHAR_COLOR2:
 {
-Color aSet;
 const SfxStringItem* pColorStringItem = nullptr;
 bool bHasItem = false;
 
 if(pItem)
 {
-aSet = static_cast(pItem)->GetValue();
 bHasItem = true;
 }
 else if (pArgs && (pColorStringItem = 
pArgs->GetItemIfSet(SID_ATTR_COLOR_STR, false)))
 {
-OUString sColor = pColorStringItem->GetValue();
-aSet = Color(ColorTransparency, sColor.toInt32(16));
 bHasItem = true;
 }
 


new feature for Calc wanted

2023-05-16 Thread Ed Mierzewski
Hi there,

In Calc, it would be useful to be able to insert a picture as part of a
comment for a cell. Currently we can do this with text only.

For example, if I create a spreadsheet accounting ledger I could then embed
a picture of the actual receipt associated with an entry. I think this
could be quite useful for basic bookkeeping for validating entries and
storage of records.


Thank you !

*Ed Mierzewski P.Eng.*

Cleardale Accounting
www.cleardale.ca

... clear thinking ...

*direct:  780-999-9796 (or text)*
*fax:  1-866-409-0503*
edchem...@gmail.com
*990 Bartholomew Court*
*Kelowna, British Columbia*
*Canada*
*V1W 4N2*


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

2023-05-16 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 1349f140fcc49e5da78482ca3db09663ccdae0a9
Author: Justin Luth 
AuthorDate: Tue May 16 14:31:28 2023 -0400
Commit: Justin Luth 
CommitDate: Wed May 17 02:53:39 2023 +0200

tdf#138726 LRSpaceItem ooxmlexport12: don't test implementation

To get the desired effect, properties were being spammed
as direct formatting. Now that LRSpaceItem has been split,
there is no/less need to spam like that.

Allows https://gerrit.libreoffice.org/c/core/+/151821

make CppunitTest_sw_ooxmlexport12 CPPUNIT_TEST_NAME=testTdf108493

Change-Id: I7b7f109eacb79737d898da5bcf87162b9fa6529e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151850
Tested-by: Jenkins
Tested-by: Justin Luth 
Reviewed-by: Justin Luth 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 3805b8c8f593..e406d546aea6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -1731,14 +1731,13 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf95374)
 assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind", "start", 
"1136");
 }
 
-CPPUNIT_TEST_FIXTURE(Test, testTdf108493)
+DECLARE_OOXMLEXPORT_TEST(testTdf108493, "tdf108493.docx")
 {
-loadAndSave("tdf108493.docx");
-xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
-// set in the paragraph
-assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:ind", "start", 
"709");
+uno::Reference xPara7(getParagraph(7), 
uno::UNO_QUERY);
+// set in the paragraph (709 twips)
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1251), getProperty(xPara7, 
"ParaLeftMargin"));
 // set in the numbering style (this was 0)
-assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:ind", "hanging", 
"709");
+CPPUNIT_ASSERT_EQUAL(sal_Int32(-1251), getProperty(xPara7, 
"ParaFirstLineIndent"));
 }
 
 DECLARE_OOXMLEXPORT_TEST(testTdf118691, "tdf118691.docx")


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

2023-05-16 Thread Henry Castro (via logerrit)
 sc/source/filter/oox/extlstcontext.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit c3d7e44b27f3e30a0d078150c70403374b4cd583
Author: Henry Castro 
AuthorDate: Fri Mar 17 11:03:36 2023 -0400
Commit: Henry Castro 
CommitDate: Wed May 17 01:24:25 2023 +0200

sc: filter: oox: add missing formula if it is a text ...

conditional format:


  NOT(ISERROR(SEARCH("Done",C1)))
  
  
   
  
  
   


   
  
 


Signed-off-by: Henry Castro 
Change-Id: I4da117a1a122b3895788645dcd5de3e36cdcad0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149067
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/filter/oox/extlstcontext.cxx 
b/sc/source/filter/oox/extlstcontext.cxx
index 2646f0969958..5328accac5c8 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -274,6 +274,12 @@ void ExtConditionalFormattingContext::onEndElement()
 break;
 case XLS14_TOKEN( cfRule ):
 {
+if (IsSpecificTextCondMode(maModel.eOperator) && nFormulaCount == 
1)
+{
+maModel.aFormula = aChars;
+maModel.eOperator = ScConditionMode::Direct;
+}
+
 getStyles().getExtDxfs().forEachMem( &Dxf::finalizeImport );
 maModel.aStyle = getStyles().createExtDxfStyle(rStyleIdx);
 rStyleIdx++;


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

2023-05-16 Thread Eike Rathke (via logerrit)
 sc/source/core/tool/token.cxx |   35 ---
 1 file changed, 28 insertions(+), 7 deletions(-)

New commits:
commit fcb66a74ae3af322b2829040bb84669d5c63e568
Author: Eike Rathke 
AuthorDate: Tue May 16 17:33:36 2023 +0200
Commit: Eike Rathke 
CommitDate: Wed May 17 00:42:06 2023 +0200

Resolves: tdf#153790 Suppress duplicated end part sheet reference, 
tdf#103890

Also keep explicitly given sheet reference relative to the same
sheet as user wished.

Affected only when moving formula cell position like with
cut&paste and drag&drop.

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

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 4315f017e67c..337a2fb86d21 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -3416,7 +3416,7 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove(
 }
 
 rRef.SetAddress(*mxSheetLimits, aAbs, rNewPos);
-rRef.SetFlag3D(aAbs.Tab() != rNewPos.Tab() || 
!rRef.IsTabRel());
+rRef.SetFlag3D(rRef.IsFlag3D() || !rRef.IsTabRel() || 
aAbs.Tab() != rNewPos.Tab());
 }
 break;
 case svDoubleRef:
@@ -3446,12 +3446,33 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove(
 }
 
 rRef.SetRange(*mxSheetLimits, aAbs, rNewPos);
-// Absolute sheet reference => set 3D flag.
-// More than one sheet referenced => has to have both 
3D flags.
-// If end part has 3D flag => start part must have it 
too.
-rRef.Ref2.SetFlag3D(aAbs.aStart.Tab() != 
aAbs.aEnd.Tab() || !rRef.Ref2.IsTabRel());
-rRef.Ref1.SetFlag3D(aAbs.aStart.Tab() != rNewPos.Tab() 
|| !rRef.Ref1.IsTabRel() ||
-rRef.Ref2.IsFlag3D());
+bool b1, b2;
+if (aAbs.aStart.Tab() != aAbs.aEnd.Tab())
+{
+// More than one sheet referenced => has to have
+// both 3D flags.
+b1 = b2 = true;
+}
+else
+{
+// Keep given 3D flag even for relative sheet
+// reference to same sheet.
+// Absolute sheet reference => set 3D flag.
+// Reference to another sheet => set 3D flag.
+b1 = rRef.Ref1.IsFlag3D() || !rRef.Ref1.IsTabRel() 
|| rNewPos.Tab() != aAbs.aStart.Tab();
+b2 = rRef.Ref2.IsFlag3D() || !rRef.Ref2.IsTabRel() 
|| rNewPos.Tab() != aAbs.aEnd.Tab();
+// End part has 3D flag => start part must have it 
too.
+if (b2)
+b1 = true;
+// End part sheet reference is identical to start
+// part sheet reference and end part sheet
+// reference was not explicitly given => clear end
+// part 3D flag.
+if (b1 && b2 && rRef.Ref1.IsTabRel() == 
rRef.Ref2.IsTabRel() && !rRef.Ref2.IsFlag3D())
+b2 = false;
+}
+rRef.Ref1.SetFlag3D(b1);
+rRef.Ref2.SetFlag3D(b2);
 }
 break;
 case svExternalSingleRef:


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

2023-05-16 Thread Caolán McNamara (via logerrit)
 sw/source/filter/html/swhtml.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit dff1d54c2d6d84a852f9c2266fec6be1d343af36
Author: Caolán McNamara 
AuthorDate: Tue May 16 20:56:47 2023 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 17 00:37:58 2023 +0200

dynamic_cast followed by static_cast

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

diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 49e3e9a8abce..cfc4a6df2b98 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2678,14 +2678,14 @@ SwViewShell *SwHTMLParser::CallEndAction( bool 
bChkAction, bool bChkPtr )
 if( !m_pActionViewShell || (bChkAction && 
!m_pActionViewShell->ActionPend()) )
 return m_pActionViewShell;
 
-if( dynamic_cast< const SwEditShell *>( m_pActionViewShell ) !=  nullptr )
+if (SwEditShell* pEditShell = 
dynamic_cast(m_pActionViewShell))
 {
 // Already scrolled?, then make sure that the view doesn't move!
 const bool bOldLock = m_pActionViewShell->IsViewLocked();
 m_pActionViewShell->LockView( true );
 const bool bOldEndActionByVirDev = 
m_pActionViewShell->IsEndActionByVirDev();
 m_pActionViewShell->SetEndActionByVirDev( true );
-static_cast(m_pActionViewShell)->EndAction();
+pEditShell->EndAction();
 m_pActionViewShell->SetEndActionByVirDev( bOldEndActionByVirDev );
 m_pActionViewShell->LockView( bOldLock );
 


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

2023-05-16 Thread Michael Meeks (via logerrit)
 sw/source/core/layout/layact.cxx |1 +
 sw/source/core/view/viewsh.cxx   |4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 765cc200fd7e809d4aeca9bc83fa125ee248fce9
Author: Michael Meeks 
AuthorDate: Fri Mar 24 17:42:40 2023 +
Commit: Caolán McNamara 
CommitDate: Wed May 17 00:37:45 2023 +0200

lok: avoid painting writer windows to a giant virtual-device.

When layout changes, we don't want to immediately redraw lots of
windows; we should be able to wait for tiles to be rendered
instead. Certainly we don't want to allocate a giant virtual
device.

Unfortunately we also believe that full document invalidations
are cheap - so warn about that.

Change-Id: Ib56320d4860c4b6f4e100b30cc6d3e490a1c7a90
Signed-off-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149601
Tested-by: Jenkins
(cherry picked from commit 1ed50bb714b8ed657cd422df850a6852cd863f43)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149622
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 583ca4a3b4db..be803a3b00c1 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -2352,6 +2352,7 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp 
*pI ) :
 bool bUnlock = false;
 if ( pViewImp->HasPaintRegion() )
 {
+SAL_INFO("sw.idle", "Disappointing full document 
invalidation");
 pViewImp->DeletePaintRegion();
 
 // Cause a repaint with virtual device.
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 8a99aa5de310..53457942749f 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -475,7 +475,7 @@ void SwViewShell::ImplStartAction()
 
 void SwViewShell::ImplLockPaint()
 {
-if ( GetWin() && GetWin()->IsVisible() )
+if ( GetWin() && GetWin()->IsVisible() && 
!comphelper::LibreOfficeKit::isActive())
 GetWin()->EnablePaint( false ); //Also cut off the controls.
 Imp()->LockPaint();
 }
@@ -485,7 +485,7 @@ void SwViewShell::ImplUnlockPaint( bool bVirDev )
 CurrShell aCurr( this );
 if ( GetWin() && GetWin()->IsVisible() )
 {
-if ( (bInSizeNotify || bVirDev ) && VisArea().HasArea() )
+if ( (bInSizeNotify || bVirDev ) && VisArea().HasArea() && 
!comphelper::LibreOfficeKit::isActive())
 {
 //Refresh with virtual device to avoid flickering.
 VclPtrInstance pVout( *mpOut );


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

2023-05-16 Thread Henry Castro (via logerrit)
 sc/source/filter/html/htmlexp.cxx |   23 ++-
 1 file changed, 22 insertions(+), 1 deletion(-)

New commits:
commit fdc0a082420d511fd0561ba087744518ccade665
Author: Henry Castro 
AuthorDate: Thu May 11 16:29:55 2023 -0400
Commit: Henry Castro 
CommitDate: Wed May 17 00:30:26 2023 +0200

tdf#154477: sc: filter: html: fix missing color scale conditional format

When copying a range cell to an external application that request
html data, the color scale conditional format does not have an
associate a set attribute.

Signed-off-by: Henry Castro 
Change-Id: I82b466a2100abc5070e92f844dc706d9b015c2e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151840
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/filter/html/htmlexp.cxx 
b/sc/source/filter/html/htmlexp.cxx
index 16db15316121..98b2c980f304 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -65,6 +65,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 #include 
@@ -881,10 +883,27 @@ void ScHTMLExport::WriteTables()
 
 void ScHTMLExport::WriteCell( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, 
SCROW nRow, SCTAB nTab )
 {
+std::optional aColorScale;
 ScAddress aPos( nCol, nRow, nTab );
 ScRefCellValue aCell(*pDoc, aPos, rBlockPos);
 const ScPatternAttr* pAttr = pDoc->GetPattern( nCol, nRow, nTab );
 const SfxItemSet* pCondItemSet = pDoc->GetCondResult( nCol, nRow, nTab, 
&aCell );
+if (!pCondItemSet)
+{
+ScConditionalFormatList* pCondList = pDoc->GetCondFormList(nTab);
+const ScCondFormatItem& rCondItem = pAttr->GetItem(ATTR_CONDITIONAL);
+const ScCondFormatIndexes& rCondIndex = rCondItem.GetCondFormatData();
+if (rCondIndex.size() > 0)
+{
+ScConditionalFormat* pCondFmt = 
pCondList->GetFormat(rCondIndex[0]);
+if (pCondFmt)
+{
+const ScColorScaleFormat* pEntry = dynamic_cast(pCondFmt->GetEntry(0));
+if (pEntry)
+aColorScale = pEntry->GetColor(aPos);
+}
+}
+}
 
 const ScMergeFlagAttr& rMergeFlagAttr = pAttr->GetItem( ATTR_MERGE_FLAG, 
pCondItemSet );
 if ( rMergeFlagAttr.IsOverlapped() )
@@ -1023,7 +1042,9 @@ void ScHTMLExport::WriteCell( sc::ColumnBlockPosition& 
rBlockPos, SCCOL nCol, SC
 ATTR_BACKGROUND, pCondItemSet );
 
 Color aBgColor;
-if ( rBrushItem.GetColor().GetAlpha() == 0 )
+if ( aColorScale )
+aBgColor = *aColorScale;
+else if ( rBrushItem.GetColor().GetAlpha() == 0 )
 aBgColor = aHTMLStyle.aBackgroundColor; // No unwanted background color
 else
 aBgColor = rBrushItem.GetColor();


[Libreoffice-commits] core.git: qadevOOo/tests

2023-05-16 Thread Julien Nabet (via logerrit)
 qadevOOo/tests/java/ifc/accessibility/_XAccessibleExtendedComponent.java |   
23 --
 1 file changed, 23 deletions(-)

New commits:
commit 074c62b4e47c1e595f08d90e3811a8baab102dd5
Author: Julien Nabet 
AuthorDate: Tue May 16 18:40:51 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue May 16 23:11:26 2023 +0200

Remove remnant commented code concerning recently dropped 
"XAccessibleStateSet"

Change-Id: Ib11e37dbc6bf9bfc7ba8cdf3b5cb28d5a11f31a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151847
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git 
a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleExtendedComponent.java 
b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleExtendedComponent.java
index dc6355e76554..2156c09a00dc 100644
--- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleExtendedComponent.java
+++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleExtendedComponent.java
@@ -69,29 +69,6 @@ public class _XAccessibleExtendedComponent extends 
MultiMethodTest {
 tRes.tested("getFont()", true);
 }
 
-/**
- * Calls the method and compares returned value with value that was
- * returned by the method
- * XAccessibleStateSet & AccessibleStateType.ENABLED.
- * Has OK status if returned values are equal.
- * deprecated from version srx644g 29.10.02 on
- *
-public void _isEnabled() {
-boolean isEnabled = oObj.isEnabled();
-log.println("isEnabled(): " + isEnabled);
-
-boolean res = true;
-
-XAccessibleStateSet accStateSet = (XAccessibleStateSet)
-UnoRuntime.queryInterface(XAccessibleStateSet.class, oObj);
-
-if (accStateSet != null) {
-res = ((accStateSet &  AccessibleStateType.ENABLED) != 0) == 
isEnabled;
-}
-
-tRes.tested("isEnabled()", res);
-}
-
 /**
  * Calls the method and checks returned value.
  * Has OK status if returned value isn't null.


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

2023-05-16 Thread Henry Castro (via logerrit)
 sc/inc/colorscale.hxx  |2 ++
 sc/source/core/data/colorscale.cxx |   15 +++
 2 files changed, 17 insertions(+)

New commits:
commit b95e81a9b0b584b2439a34737ce269ebb372e604
Author: Henry Castro 
AuthorDate: Thu May 11 16:23:03 2023 -0400
Commit: Henry Castro 
CommitDate: Tue May 16 22:18:36 2023 +0200

tdf#154477: sc: copy cache values when clone color conditional format

When clone a conditional format list, also copy the cache
values that hold the min and max values, otherwise if clone
occurs when copying to the clipboard the values have wrong
data due to limiting range cells copied.

Signed-off-by: Henry Castro 
Change-Id: Id9085a1488a3bde24842e0d2e062c9b425074157
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151839
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index e78baf0871b2..90a973391995 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -224,6 +224,8 @@ public:
 virtual ~ScColorFormat() override;
 
 const ScRangeList& GetRange() const;
+void SetCache(const std::vector& aValues);
+std::vector GetCache() const;
 
 virtual void SetParent(ScConditionalFormat* pParent) override;
 
diff --git a/sc/source/core/data/colorscale.cxx 
b/sc/source/core/data/colorscale.cxx
index 1bb36712fd13..7fd48f47305d 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -378,6 +378,9 @@ ScColorScaleFormat::ScColorScaleFormat(ScDocument* pDoc, 
const ScColorScaleForma
 {
 maColorScales.emplace_back(new ScColorScaleEntry(pDoc, *rxEntry));
 }
+
+auto aCache = rFormat.GetCache();
+SetCache(aCache);
 }
 
 ScColorFormat* ScColorScaleFormat::Clone(ScDocument* pDoc) const
@@ -457,6 +460,18 @@ const ScRangeList& ScColorFormat::GetRange() const
 return mpParent->GetRange();
 }
 
+std::vector ScColorFormat::GetCache() const
+{
+std::vector empty;
+return mpCache ? mpCache->maValues : empty;
+}
+
+void ScColorFormat::SetCache(const std::vector& aValues)
+{
+mpCache.reset(new ScColorFormatCache);
+mpCache->maValues = aValues;
+}
+
 std::vector& ScColorFormat::getValues() const
 {
 if(!mpCache)


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

2023-05-16 Thread Henry Castro (via logerrit)
 sc/inc/colorscale.hxx  |1 +
 sc/inc/conditio.hxx|5 +
 sc/source/core/data/colorscale.cxx |6 ++
 sc/source/core/data/conditio.cxx   |   20 
 sc/source/core/data/table2.cxx |3 +++
 5 files changed, 35 insertions(+)

New commits:
commit da818b2b96368fa088240f9d24586d1cea7650be
Author: Henry Castro 
AuthorDate: Thu May 11 16:07:10 2023 -0400
Commit: Henry Castro 
CommitDate: Tue May 16 22:18:18 2023 +0200

tdf#154477: sc: add "updateValues" method to conditional format list

When copying a range cells to a clipboard, if exists a
color scale conditional format from different ranges,
it should update the min and max values, otherwise
the color scale conditional format could not calculate
min and max values due to limiting range cell copied.

Signed-off-by: Henry Castro 
Change-Id: I660e18090a60b99ddf2b55ce1f713fd41121290e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151838
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index 513eb11cf2f4..e78baf0871b2 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -229,6 +229,7 @@ public:
 
 virtual void startRendering() override;
 virtual void endRendering() override;
+virtual void updateValues() override;
 
 protected:
 std::vector& getValues() const;
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index afd16ba27365..51786d3dc712 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -251,6 +251,7 @@ public:
 
 virtual void startRendering();
 virtual void endRendering();
+virtual void updateValues();
 protected:
 ScDocument* mpDoc;
 
@@ -598,6 +599,8 @@ public:
 void startRendering();
 void endRendering();
 
+void updateValues();
+
 // Forced recalculation for formulas
 void CalcAll();
 };
@@ -683,6 +686,8 @@ public:
 void startRendering();
 void endRendering();
 
+void updateValues();
+
 sal_uInt32 getMaxKey() const;
 
 /// Forced recalculation of formulas
diff --git a/sc/source/core/data/colorscale.cxx 
b/sc/source/core/data/colorscale.cxx
index 192dd1cea78c..1bb36712fd13 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -529,6 +529,12 @@ void ScColorFormat::endRendering()
 mpCache.reset();
 }
 
+void ScColorFormat::updateValues()
+{
+getMinValue();
+getMaxValue();
+}
+
 namespace {
 
 sal_uInt8 GetColorValue( double nVal, double nVal1, sal_uInt8 nColVal1, double 
nVal2, sal_uInt8 nColVal2 )
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 8da18a4a0471..1979d8ab44dd 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -74,6 +74,10 @@ void ScFormatEntry::endRendering()
 {
 }
 
+void ScFormatEntry::updateValues()
+{
+}
+
 static bool lcl_HasRelRef( ScDocument* pDoc, const ScTokenArray* pFormula, 
sal_uInt16 nRecursion = 0 )
 {
 if (pFormula)
@@ -2051,6 +2055,14 @@ void ScConditionalFormat::endRendering()
 }
 }
 
+void ScConditionalFormat::updateValues()
+{
+for(auto& rxEntry : maEntries)
+{
+rxEntry->updateValues();
+}
+}
+
 void ScConditionalFormat::CalcAll()
 {
 for(const auto& rxEntry : maEntries)
@@ -2298,6 +2310,14 @@ void ScConditionalFormatList::endRendering()
 }
 }
 
+void ScConditionalFormatList::updateValues()
+{
+for (auto const& it : m_ConditionalFormats)
+{
+it->updateValues();
+}
+}
+
 void ScConditionalFormatList::clear()
 {
 m_ConditionalFormats.clear();
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 4eb5671f0dc7..47b3d1634c77 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -529,7 +529,10 @@ void ScTable::CopyToClip(
 for (SCCOL i = nCol1; i <= nCol2; i++)
 pTable->aCol[i].RemoveProtected(nRow1, nRow2);
 
+mpCondFormatList->startRendering();
+mpCondFormatList->updateValues();
 pTable->mpCondFormatList.reset(new 
ScConditionalFormatList(pTable->rDocument, *mpCondFormatList));
+mpCondFormatList->endRendering();
 }
 
 void ScTable::CopyToClip(


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

2023-05-16 Thread Regina Henschel (via logerrit)
 oox/qa/unit/data/tdf155327_WordArtDefaultColor.pptx |binary
 oox/qa/unit/shape.cxx   |   17 +
 oox/source/drawingml/shape.cxx  |5 +
 3 files changed, 22 insertions(+)

New commits:
commit 04ae198019cf2c6593023f9ef630e4e99f65defe
Author: Regina Henschel 
AuthorDate: Tue May 16 20:46:28 2023 +0200
Commit: Regina Henschel 
CommitDate: Tue May 16 21:57:28 2023 +0200

tdf#155327 Detect default color in WordArt

It is possible to not set the character color explicitely in a WordArt
shape. In such case MS Office uses the scheme color 'tx1' from current
active scheme. The import of the character properties does not set this
color in the fill properties. The patch adds it, when the character fill
properties are converted to shape fill properties.

Change-Id: Ic72fd9f55bac1e2874cbf701ffa692ca4fbc9435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151851
Tested-by: Jenkins
Reviewed-by: Regina Henschel 

diff --git a/oox/qa/unit/data/tdf155327_WordArtDefaultColor.pptx 
b/oox/qa/unit/data/tdf155327_WordArtDefaultColor.pptx
new file mode 100644
index ..a813f4a329a6
Binary files /dev/null and 
b/oox/qa/unit/data/tdf155327_WordArtDefaultColor.pptx differ
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
index 722d7d6d644b..68ce372335df 100644
--- a/oox/qa/unit/shape.cxx
+++ b/oox/qa/unit/shape.cxx
@@ -795,6 +795,23 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWordArtBitmapFill)
 CPPUNIT_ASSERT_EQUAL(sal_Int32(1592), aSize100thMM.Width);
 CPPUNIT_ASSERT_EQUAL(sal_Int32(1592), aSize100thMM.Height);
 }
+
+CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWordArtDefaultColor)
+{
+// The document has a WordArt shape for which the text color is not 
explicitly set. In such cases
+// MS Office uses the scheme color 'tx1'. Without fix it was imported as 
'fill none'. The shape
+// existed but was not visible on screen.
+loadFromURL(u"tdf155327_WordArtDefaultColor.pptx");
+
+uno::Reference 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+uno::Reference xShapeProps(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_SOLID),
+ xShapeProps->getPropertyValue(u"FillStyle"));
+
+CPPUNIT_ASSERT_EQUAL(uno::Any(Color(3, 74, 144)), 
xShapeProps->getPropertyValue(u"FillColor"));
+}
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 69f3bf5a4d60..9417551b0f86 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -728,7 +728,12 @@ static void lcl_copyCharPropsToShape(const 
uno::Reference& xSha
 
 // Fill
 // ToDo: Replace flip and rotate constants in parameters with 
actual values.
+// tdf#155327 If color is not explicitly set, MS Office uses 
scheme color 'tx1'.
 oox::drawingml::ShapePropertyMap 
aFillShapeProps(rFilter.getModelObjectHelper());
+if (!rCharProps.maFillProperties.moFillType.has_value())
+rCharProps.maFillProperties.moFillType = XML_solidFill;
+if (!rCharProps.maFillProperties.maFillColor.isUsed())
+rCharProps.maFillProperties.maFillColor.setSchemeClr(XML_tx1);
 rCharProps.maFillProperties.pushToPropMap(aFillShapeProps, 
rFilter.getGraphicHelper(),
   /*nShapeRotation*/ 0,
   /*nPhClr*/ 
API_RGB_TRANSPARENT,


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

2023-05-16 Thread Michael Stahl (via logerrit)
 sw/source/core/inc/frmtool.hxx|1 +
 sw/source/core/layout/flowfrm.cxx |   20 
 sw/source/core/layout/sectfrm.cxx |3 ++-
 3 files changed, 23 insertions(+), 1 deletion(-)

New commits:
commit 325fe7ab507fd8f2ca17a3db32181edf30169525
Author: Michael Stahl 
AuthorDate: Fri May 12 17:45:45 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue May 16 20:14:00 2023 +0200

tdf#155324 sw: layout: try not to MoveFwd onto a page created by page break

There is a ToX that is updated; it has about 4 pages worth of entries.

When the old entries are deleted, 2 of the pages become empty, and since
commit b9ef71476fd70bc13f50ebe80390e0730d1b7afb these pages are deleted.

While layouting the new entries, these are moved onto the page following
the ToX, which starts with a page break and contains lots of footnotes.

Now the footnotes reduce the space on the page available for the ToX
entries, and thus after CalcLayout() there are 5 ToX pages instead of 4.

Then the page numbers are inserted into the entries, and another layout
action deletes one of the ToX pages; now all the page numbers are too
large by 1.

Some ideas to fix this:
1) ignore a footnote when formatting a frame that is before the
   footnote anchor frame; similar to commit
   c79bf7865bff4e88cc201357370d8faeef8e6ad9
2) invalidate the last content on the page when moving forward the
   footnote container, similar to commit
   eb85de8e6b61fb3fcb6c03ae0145f7fe5478bccf; this doesn't look easy to
   do because as it turns out the footnote container is moved in
   SwLayoutFrame::Cut() 5 function calls inside MoveFwd() while the frame
   on which MoveFwd() is called is still on the page, so would probably
   somehow need to be detected in MoveFwd() itself?
3) don't move frames forward onto a page that was created by a page
   break - instead create a new frame.

Let's try 3) for now, only in SwFrame::GetNextSctLeaf().

(regression from commit b9ef71476fd70bc13f50ebe80390e0730d1b7afb)

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

diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 7e9d2d3013c5..ffc218b5504e 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -157,6 +157,7 @@ SwTwips CalcRowRstHeight( SwLayoutFrame *pRow );
 tools::Long CalcHeightWithFlys( const SwFrame *pFrame );
 
 namespace sw {
+bool HasPageBreakBefore(SwPageFrame const& rPage);
 bool IsRightPageByNumber(SwRootFrame const& rLayout, sal_uInt16 nPageNum);
 class FlyCreationSuppressor
 {
diff --git a/sw/source/core/layout/flowfrm.cxx 
b/sw/source/core/layout/flowfrm.cxx
index c3690e2984cc..402f47f8004e 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -893,6 +893,26 @@ SwLayoutFrame *SwFrame::GetLeaf( MakePageType eMakePage, 
bool bFwd )
 return bFwd ? GetNextLeaf( eMakePage ) : GetPrevLeaf();
 }
 
+namespace sw {
+
+bool HasPageBreakBefore(SwPageFrame const& rPage)
+{
+SwFrame const* pFlow(rPage.FindFirstBodyContent());
+if (!pFlow)
+{
+return false;
+}
+while (pFlow->GetUpper()->IsInTab())
+{
+pFlow = pFlow->GetUpper()->FindTabFrame();
+}
+return pFlow->GetPageDescItem().GetPageDesc()
+|| pFlow->GetBreakItem().GetBreak() == SvxBreak::PageBefore
+|| pFlow->GetBreakItem().GetBreak() == SvxBreak::PageBoth;
+};
+
+} // namespace sw
+
 bool SwFrame::WrongPageDesc( SwPageFrame* pNew )
 {
 // Now it's getting a bit complicated:
diff --git a/sw/source/core/layout/sectfrm.cxx 
b/sw/source/core/layout/sectfrm.cxx
index bc8930cd4332..1faaae683379 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1742,7 +1742,8 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType 
eMakePage )
 // case pLayLeaf points to our section's cell's follow, which is
 // fine to be on the same page. New page creation is handled when
 // creating / moving the cell frame.
-if( WrongPageDesc( pNxtPg ) && !bLayLeafTableAllowed )
+// It doesn't make sense to move to a page that starts with break?
+if ((WrongPageDesc(pNxtPg) || HasPageBreakBefore(*pNxtPg)) && 
!bLayLeafTableAllowed)
 {
 if( bWrongPage )
 break; // there's a column between me and my right page


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

2023-05-16 Thread Eike Rathke (via logerrit)
 sc/source/core/data/column3.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit cda59e72ea7dbd904012ff377588d71ea8c4a2bc
Author: Eike Rathke 
AuthorDate: Tue May 16 17:56:14 2023 +0200
Commit: Eike Rathke 
CommitDate: Tue May 16 19:42:14 2023 +0200

Remove nonsense OSL_ENSURE()

Apparently a legacy leftover; it's perfectly valid to remove
EDITATTR along with CONTENTS, i.e. in Cut.

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

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 9c035b3b44d0..f615a02e94c3 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -1137,7 +1137,6 @@ void ScColumn::DeleteArea(
 
 if ( nDelFlag & InsertDeleteFlags::EDITATTR )
 {
-OSL_ENSURE( nContFlag == InsertDeleteFlags::NONE, "DeleteArea: Wrong 
Flags" );
 RemoveEditAttribs(aBlockPos, nStartRow, nEndRow);
 }
 


[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - 2 commits - sw/source

2023-05-16 Thread Michael Stahl (via logerrit)
 sw/source/core/layout/ftnfrm.cxx   |   14 --
 sw/source/core/layout/layouter.cxx |   14 +-
 sw/source/core/layout/tabfrm.cxx   |4 +---
 3 files changed, 18 insertions(+), 14 deletions(-)

New commits:
commit ff29d8cd52ec9e15be63b61060f4b9b5b0da9b15
Author: Michael Stahl 
AuthorDate: Thu May 11 18:54:33 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue May 16 19:07:33 2023 +0200

sw: move some loop control debug messages out of #if OSL_DEBUG_LEVEL > 1

Also convert some obvious assert().

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151679
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 85d961200b674b8c8179f85aed752fb179350dbb)

Change-Id: I6ec56920df5b4aceff5e85b7e7e40ee8ce37f93a

diff --git a/sw/source/core/layout/layouter.cxx 
b/sw/source/core/layout/layouter.cxx
index dbb5757bbd1b..993a22b33df8 100644
--- a/sw/source/core/layout/layouter.cxx
+++ b/sw/source/core/layout/layouter.cxx
@@ -183,12 +183,10 @@ void SwLooping::Control( SwPageFrame* pPage )
 static bool bNoLouie = false;
 if( bNoLouie )
 return;
+#endif
 
 // FME 2007-08-30 #i81146# new loop control
-OSL_ENSURE( 0 != mnLoopControlStage, "Looping Louie: Stage 1!" );
-OSL_ENSURE( 1 != mnLoopControlStage, "Looping Louie: Stage 2!!" );
-OSL_ENSURE( 2 >  mnLoopControlStage, "Looping Louie: Stage 3!!!" );
-#endif
+SAL_WARN("sw.layout", "Looping Louie: Stage " << (mnLoopControlStage + 
1) << "!");
 
 Drastic( pPage->Lower() );
 if( nNew > nMinPage && pPage->GetPrev() )
@@ -235,7 +233,7 @@ void SwLayouter::InsertEndnotes( SwSectionFrame const * 
pSect )
 
 void SwLayouter::LoopControl( SwPageFrame* pPage )
 {
-OSL_ENSURE( mpLooping, "Looping: Lost control" );
+assert(mpLooping);
 mpLooping->Control( pPage );
 }
 
@@ -243,9 +241,7 @@ void SwLayouter::LoopingLouieLight( const SwDoc& rDoc, 
const SwTextFrame& rFrame
 {
 if ( mpLooping && mpLooping->IsLoopingLouieLight() )
 {
-#if OSL_DEBUG_LEVEL > 1
-OSL_FAIL( "Looping Louie (Light): Fixating fractious frame" );
-#endif
+SAL_WARN("sw.layout", "Looping Louie (Light): Fixating fractious 
frame");
 SwLayouter::InsertMovedFwdFrame( rDoc, rFrame, 
rFrame.FindPageFrame()->GetPhyPageNum() );
 }
 }
@@ -289,7 +285,7 @@ bool SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrame 
const * pSect, SwFootno
 
 bool SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrame const *pPage )
 {
-OSL_ENSURE( pDoc, "No doc, no fun" );
+assert(pDoc);
 if( !pDoc->getIDocumentLayoutAccess().GetLayouter() )
 pDoc->getIDocumentLayoutAccess().SetLayouter( new SwLayouter() );
 return !pDoc->getIDocumentLayoutAccess().GetLayouter()->mpLooping &&
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 54c2c8889c88..3c40df5447de 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1538,9 +1538,7 @@ bool SwContentFrame::CalcLowers(SwLayoutFrame & rLay, 
SwLayoutFrame const& rDont
 continue;
 }
 
-#if OSL_DEBUG_LEVEL > 1
-OSL_FAIL( "LoopControl in SwContentFrame::CalcLowers" );
-#endif
+SAL_WARN("sw.layout", "LoopControl in 
SwContentFrame::CalcLowers");
 }
 }
 if (!rDontLeave.IsAnLower(pCnt)) // moved backward?
commit 3ce4b5e9077a2e77200e5e9cfe2efd033e2100dc
Author: Michael Stahl 
AuthorDate: Tue Mar 8 17:36:41 2022 +0100
Commit: Michael Stahl 
CommitDate: Tue May 16 19:07:33 2023 +0200

tdf#139687 sw: invalidate text frame in footnote when moving it

The problem (which only reproduces here on copy/paste with
SAL_USE_VCLPLUGIN=kf5, not with gtk3) is that on SwTextFrame 2638 in a
footnote on page 19 containing "Saeed, 100–101." there should be a top
margin of 0 but it's actually 144.

The footnote was initially created on a previous page with another
footnote with SwTextFrame 2635 before it, that's how it got this top
margin.

Invalidate the print area in SwFootnoteFrame::Paste(), which is called
when the footnote is moved to a different container.

(somehow regression from commit 723728cd358693b8f4bc9d913541aa4479f2bd48)

Change-Id: I7346fd03fccad3eddccbbcd56c4b50127a337b24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131217
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 86081afc3021fa0ae6c2b32d11b4b20cc8a190a3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131201
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 3d8533cb894614394f1ecf05b3d6dc60f3bf6dd6)

diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 280e6ed13d82..a41819058588 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftn

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

2023-05-16 Thread Henry Castro (via logerrit)
 sc/source/filter/inc/condformatbuffer.hxx |1 +
 sc/source/filter/inc/extlstcontext.hxx|4 +++-
 sc/source/filter/oox/condformatbuffer.cxx |   13 +
 sc/source/filter/oox/extlstcontext.cxx|   28 
 4 files changed, 45 insertions(+), 1 deletion(-)

New commits:
commit 147527b53f414e2583ecc4d524681351fab2f696
Author: Henry Castro 
AuthorDate: Fri Mar 17 10:47:31 2023 -0400
Commit: Henry Castro 
CommitDate: Tue May 16 18:08:14 2023 +0200

sc: filter: oox: Add a missing tag child of the parent tag "cfvo"


 
  0
 
 
  1
 
 
 
 
 
 


Signed-off-by: Henry Castro 
Change-Id: Ie98507e11a5cdeb0d1adc77a44fd79edb2f26d6a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149066
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/filter/inc/condformatbuffer.hxx 
b/sc/source/filter/inc/condformatbuffer.hxx
index 1180b1e0aa74..cdc8d4727baf 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -242,6 +242,7 @@ struct ExCfRuleModel
 ::Color mnNegativeColor;
 OUString maAxisPosition; // DataBar
 OUString maColorScaleType; // Cfvo
+OUString msScaleTypeValue; // Cfvo
 bool mbGradient; // DataBar
 bool mbIsLower; // Cfvo
 };
diff --git a/sc/source/filter/inc/extlstcontext.hxx 
b/sc/source/filter/inc/extlstcontext.hxx
index 8635c6029523..077ebdbebf8e 100644
--- a/sc/source/filter/inc/extlstcontext.hxx
+++ b/sc/source/filter/inc/extlstcontext.hxx
@@ -32,11 +32,13 @@ public:
 
 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 
nElement, const AttributeList& rAttribs ) override;
 virtual voidonStartElement( const AttributeList& rAttribs ) 
override;
+virtual voidonCharacters( const OUString& rChars ) override;
+virtual voidonEndElement() override;
 
 private:
 ScDataBarFormatData* mpTarget;
-
 bool mbFirstEntry;
+ExtCfDataBarRuleRef mpRule;
 };
 
 struct ExtCondFormatRuleModel
diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index da99d8ab645e..5e3e0d4a18b5 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -1434,6 +1434,19 @@ void ExtCfDataBarRule::finalizeImport()
 pEntry->SetType(COLORSCALE_PERCENT);
 else if (maModel.maColorScaleType == "formula")
 pEntry->SetType(COLORSCALE_FORMULA);
+else if (maModel.maColorScaleType == "num")
+pEntry->SetType(COLORSCALE_VALUE);
+
+if (!maModel.msScaleTypeValue.isEmpty())
+{
+sal_Int32 nSize = 0;
+rtl_math_ConversionStatus eStatus = 
rtl_math_ConversionStatus_Ok;
+double fValue = 
rtl::math::stringToDouble(maModel.msScaleTypeValue, '.', '\0', &eStatus, 
&nSize);
+if (eStatus == rtl_math_ConversionStatus_Ok && nSize == 
maModel.msScaleTypeValue.getLength())
+{
+pEntry->SetValue(fValue);
+}
+}
 break;
 }
 case UNKNOWN: // nothing to do
diff --git a/sc/source/filter/oox/extlstcontext.cxx 
b/sc/source/filter/oox/extlstcontext.cxx
index 760ba26c1727..2646f0969958 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -80,6 +80,7 @@ void ExtCfRuleContext::onStartElement( const AttributeList& 
rAttribs )
 xRule->importCfvo( rAttribs );
 xRule->getModel().mbIsLower = mbFirstEntry;
 mbFirstEntry = false;
+mpRule = xRule;
 break;
 }
 default:
@@ -87,6 +88,33 @@ void ExtCfRuleContext::onStartElement( const AttributeList& 
rAttribs )
 }
 }
 
+void ExtCfRuleContext::onCharacters( const OUString& rChars )
+{
+switch( getCurrentElement() )
+{
+case XM_TOKEN( f ):
+{
+if (mpRule)
+{
+mpRule->getModel().msScaleTypeValue = rChars;
+}
+}
+break;
+}
+}
+
+void ExtCfRuleContext::onEndElement()
+{
+switch( getCurrentElement() )
+{
+case XLS14_TOKEN( cfvo ):
+{
+mpRule.reset();
+break;
+}
+}
+}
+
 namespace {
 bool IsSpecificTextCondMode(ScConditionMode eMode)
 {


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

2023-05-16 Thread Heiko Tietze (via logerrit)
 include/sfx2/strings.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7e3a9c7b82745f8765b5526f400243f0e8eff390
Author: Heiko Tietze 
AuthorDate: Tue May 16 13:30:51 2023 +0200
Commit: Heiko Tietze 
CommitDate: Tue May 16 17:28:40 2023 +0200

Resolves tdf#154787 - Ambiguous item on macOS quick start menu

Change-Id: I3f414bfc15feff67eac3dddbe5e3cd7b557ea82d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151832
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index 83e994bdde77..bd2c0b5d5630 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -136,7 +136,7 @@
 #define STR_QUICKSTART_EXIT NC_("STR_QUICKSTART_EXIT", 
"Exit Quickstarter")
 #define STR_QUICKSTART_TIP  NC_("STR_QUICKSTART_TIP", 
"%PRODUCTNAME %PRODUCTVERSION Quickstarter")
 #define STR_QUICKSTART_FILEOPEN NC_("STR_QUICKSTART_FILEOPEN", 
"Open Document...")
-#define STR_QUICKSTART_FROMTEMPLATE 
NC_("STR_QUICKSTART_FROMTEMPLATE", "From Template...")
+#define STR_QUICKSTART_FROMTEMPLATE 
NC_("STR_QUICKSTART_FROMTEMPLATE", "Template Manager...")
 #define STR_QUICKSTART_PRELAUNCH
NC_("STR_QUICKSTART_PRELAUNCH", "Load %PRODUCTNAME During System Start-Up")
 #define STR_QUICKSTART_LNKNAME  NC_("STR_QUICKSTART_LNKNAME", 
"%PRODUCTNAME %PRODUCTVERSION")
 #define STR_QUICKSTART_FILE NC_("STR_QUICKSTART_FILE", 
"File")


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

2023-05-16 Thread Noel Grandin (via logerrit)
 include/basegfx/matrix/hommatrixtemplate.hxx |  118 ++-
 1 file changed, 12 insertions(+), 106 deletions(-)

New commits:
commit 3d6b0594267e42945a87bc98105a2e820d2229f6
Author: Noel Grandin 
AuthorDate: Tue May 16 12:03:36 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue May 16 15:13:48 2023 +0200

tdf#63130 flatten the extra ImplMatLine into ImplHomMatrixTemplate

on modern CPUs, it is more efficient to just store the extra data, and
lose the branching code and indirection.

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

diff --git a/include/basegfx/matrix/hommatrixtemplate.hxx 
b/include/basegfx/matrix/hommatrixtemplate.hxx
index c40853b4247e..b395b577076b 100644
--- a/include/basegfx/matrix/hommatrixtemplate.hxx
+++ b/include/basegfx/matrix/hommatrixtemplate.hxx
@@ -41,14 +41,7 @@ namespace basegfx::internal
 double  mfValue[RowSize];
 
 public:
-ImplMatLine()
-{
-}
-
-explicit ImplMatLine(const ImplMatLine< RowSize >& rToBeCopied)
-{
-memcpy(&mfValue, &rToBeCopied, sizeof(double) * RowSize);
-}
+ImplMatLine() = default;
 
 explicit ImplMatLine(sal_uInt16 nRow)
 {
@@ -71,30 +64,22 @@ namespace basegfx::internal
 
 template < sal_uInt16 RowSize > class ImplHomMatrixTemplate
 {
-ImplMatLine< RowSize >  maLine[RowSize - 
1];
-std::unique_ptr> mutable mpLine;
+ImplMatLine< RowSize >  maLine[RowSize];
 
 public:
 // Is last line used?
 bool isLastLineDefault() const
 {
-if(!mpLine)
-return true;
-
 for(sal_uInt16 a(0); a < RowSize; a++)
 {
 const double fDefault(implGetDefaultValue((RowSize - 1), 
a));
-const double fLineValue(mpLine->get(a));
+const double fLineValue(maLine[RowSize-1].get(a));
 
-if(!::basegfx::fTools::equal(fDefault, fLineValue))
+if(fDefault != fLineValue)
 {
 return false;
 }
 }
-
-// reset last line, it equals default
-mpLine.reset();
-
 return true;
 }
 
@@ -102,7 +87,7 @@ namespace basegfx::internal
 {
 // complete initialization with identity matrix, all lines
 // were initialized with a trailing 1 followed by 0's.
-for(sal_uInt16 a(0); a < RowSize-1; a++)
+for(sal_uInt16 a(0); a < RowSize; a++)
 {
 for(sal_uInt16 b(0); b < RowSize; b++)
 maLine[a].set(b, implGetDefaultValue(a, b) );
@@ -119,14 +104,9 @@ namespace basegfx::internal
 if (this != &rToBeCopied)
 {
 // complete initialization using copy
-for(sal_uInt16 a(0); a < (RowSize - 1); a++)
-{
-memcpy(&maLine[a], &rToBeCopied.maLine[a], 
sizeof(ImplMatLine< RowSize >));
-}
-mpLine.reset();
-if(rToBeCopied.mpLine)
+for(sal_uInt16 a(0); a < RowSize; a++)
 {
-mpLine.reset( new ImplMatLine< RowSize >( 
*rToBeCopied.mpLine ) );
+maLine[a] = rToBeCopied.maLine[a];
 }
 }
 return *this;
@@ -136,63 +116,12 @@ namespace basegfx::internal
 
 double get(sal_uInt16 nRow, sal_uInt16 nColumn) const
 {
-if(nRow < (RowSize - 1))
-{
-return maLine[nRow].get(nColumn);
-}
-
-if(mpLine)
-{
-return mpLine->get(nColumn);
-}
-
-return implGetDefaultValue((RowSize - 1), nColumn);
+return maLine[nRow].get(nColumn);
 }
 
 void set(sal_uInt16 nRow, sal_uInt16 nColumn, const double& rValue)
 {
-if(nRow < (RowSize - 1))
-{
-maLine[nRow].set(nColumn, rValue);
-}
-else if(mpLine)
-{
-mpLine->set(nColumn, rValue);
-}
-else
-{
-const double fDefault(implGetDefaultValue((RowSize - 1), 
nColumn));
-
-if(!::basegfx::fTools::equal(fDefault, rValue))
-{
-

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

2023-05-16 Thread Noel Grandin (via logerrit)
 include/basegfx/matrix/hommatrixtemplate.hxx |   22 ++
 1 file changed, 10 insertions(+), 12 deletions(-)

New commits:
commit a04fa4ad1dcfc6b7c2a13d9c5326757a1948ed4e
Author: Noel Grandin 
AuthorDate: Tue May 16 09:52:25 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue May 16 15:12:34 2023 +0200

simplify ImplMatLine constructor

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

diff --git a/include/basegfx/matrix/hommatrixtemplate.hxx 
b/include/basegfx/matrix/hommatrixtemplate.hxx
index e31c522c7711..c40853b4247e 100644
--- a/include/basegfx/matrix/hommatrixtemplate.hxx
+++ b/include/basegfx/matrix/hommatrixtemplate.hxx
@@ -45,18 +45,16 @@ namespace basegfx::internal
 {
 }
 
-explicit ImplMatLine(sal_uInt16 nRow, ImplMatLine< RowSize >* 
pToBeCopied)
+explicit ImplMatLine(const ImplMatLine< RowSize >& rToBeCopied)
 {
-if(pToBeCopied)
-{
-memcpy(&mfValue, pToBeCopied, sizeof(double) * RowSize);
-}
-else
+memcpy(&mfValue, &rToBeCopied, sizeof(double) * RowSize);
+}
+
+explicit ImplMatLine(sal_uInt16 nRow)
+{
+for(sal_uInt16 a(0); a < RowSize; a++)
 {
-for(sal_uInt16 a(0); a < RowSize; a++)
-{
-mfValue[a] = implGetDefaultValue(nRow, a);
-}
+mfValue[a] = implGetDefaultValue(nRow, a);
 }
 }
 
@@ -128,7 +126,7 @@ namespace basegfx::internal
 mpLine.reset();
 if(rToBeCopied.mpLine)
 {
-mpLine.reset( new ImplMatLine< RowSize >((RowSize - 
1), rToBeCopied.mpLine.get()) );
+mpLine.reset( new ImplMatLine< RowSize >( 
*rToBeCopied.mpLine ) );
 }
 }
 return *this;
@@ -167,7 +165,7 @@ namespace basegfx::internal
 
 if(!::basegfx::fTools::equal(fDefault, rValue))
 {
-mpLine.reset(new ImplMatLine< RowSize >((RowSize - 1), 
nullptr));
+mpLine.reset(new ImplMatLine< RowSize >((RowSize - 
1)));
 mpLine->set(nColumn, rValue);
 }
 }


[Libreoffice-commits] core.git: configure.ac

2023-05-16 Thread Stephan Bergmann (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 511f4f785e6137dda2589e660dc2f1953c914dfd
Author: Stephan Bergmann 
AuthorDate: Tue May 16 12:16:00 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Tue May 16 14:47:12 2023 +0200

Make --with-latest-c++ support future C++26

...as already supported by


"Add C++26 compile flags."

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

diff --git a/configure.ac b/configure.ac
index e5110cf1e8d7..e7ad75620e59 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7529,7 +7529,7 @@ if test -z "${CXXFLAGS_CXX11+x}"; then
 elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
 my_flags='-std=c++17 -std=c++1z'
 if test "$with_latest_c__" = yes; then
-my_flags="-std=c++23 -std=c++2b -std=c++20 -std=c++2a $my_flags"
+my_flags="-std=c++26 -std=c++2c -std=c++23 -std=c++2b -std=c++20 
-std=c++2a $my_flags"
 fi
 for flag in $my_flags; do
 if test "$COM" = MSC; then


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

2023-05-16 Thread Xisco Fauli (via logerrit)
 xmlsecurity/qa/unit/signing/signing.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a3fa0f1e5320ff6c83a3eb9ecf8b2a5aeeec3f9f
Author: Xisco Fauli 
AuthorDate: Mon May 15 12:00:03 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue May 16 14:18:16 2023 +0200

xmlsecurity: do not run the test with HAVE_FEATURE_PDFIMPORT

The test is meant to test PDFiumLibrary

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

diff --git a/xmlsecurity/qa/unit/signing/signing.cxx 
b/xmlsecurity/qa/unit/signing/signing.cxx
index aad101a3b5cc..d59a0e84a666 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -706,6 +706,8 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testPDFNo)
  
static_cast(pObjectShell->GetDocumentSignatureState()));
 }
 
+#endif
+
 CPPUNIT_TEST_FIXTURE(SigningTest, testPDFAddVisibleSignature)
 {
 std::shared_ptr pPDFium = vcl::pdf::PDFiumLibrary::get();
@@ -770,8 +772,6 @@ CPPUNIT_TEST_FIXTURE(SigningTest, 
testPDFAddVisibleSignature)
 CPPUNIT_ASSERT_EQUAL(4, pAnnot->getObjectCount());
 }
 
-#endif
-
 CPPUNIT_TEST_FIXTURE(SigningTest, test96097Calc)
 {
 loadFromURL(u"tdf96097.ods");


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

2023-05-16 Thread Caolán McNamara (via logerrit)
 sw/source/core/inc/viewimp.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1a3bfd3af113da246b0327e5cc816542682f90ba
Author: Caolán McNamara 
AuthorDate: Mon May 15 21:09:05 2023 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 16 14:08:20 2023 +0200

tdf#155349 std::move of a std::optional leave behind a set std::optional

unlike std::move of a std::unique_ptr which leaves behind an empty
std::unique_ptr

so if HasPaintRegion was true before TakePaintRegion it was
still true after TakePaintRegion

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

diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index f68c9c7f1f90..4b249154c2f8 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -152,7 +152,7 @@ public:
 
 bool AddPaintRect( const SwRect &rRect );
 bool HasPaintRegion()  { return m_oPaintRegion.has_value(); }
-std::optional TakePaintRegion() { return 
std::move(m_oPaintRegion); }
+std::optional TakePaintRegion() { auto ret = 
std::move(m_oPaintRegion); m_oPaintRegion.reset(); return ret; }
 const std::optional& GetPaintRegion() { return 
m_oPaintRegion; }
 void DeletePaintRegion() { m_oPaintRegion.reset(); }
 


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

2023-05-16 Thread Caolán McNamara (via logerrit)
 sw/source/core/inc/viewimp.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit daa451e14b808a8388cc628082f30cbdc080573f
Author: Caolán McNamara 
AuthorDate: Mon May 15 21:09:05 2023 +0100
Commit: Michael Meeks 
CommitDate: Tue May 16 13:50:04 2023 +0200

tdf#155349 std::move of a std::optional leave behind a set std::optional

unlike std::move of a std::unique_ptr which leaves behind an empty
std::unique_ptr

so if HasPaintRegion was true before TakePaintRegion it was
still true after TakePaintRegion

Change-Id: I6569f5ccd8081cbcec42190c474a98c4e28030a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151776
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index f68c9c7f1f90..4b249154c2f8 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -152,7 +152,7 @@ public:
 
 bool AddPaintRect( const SwRect &rRect );
 bool HasPaintRegion()  { return m_oPaintRegion.has_value(); }
-std::optional TakePaintRegion() { return 
std::move(m_oPaintRegion); }
+std::optional TakePaintRegion() { auto ret = 
std::move(m_oPaintRegion); m_oPaintRegion.reset(); return ret; }
 const std::optional& GetPaintRegion() { return 
m_oPaintRegion; }
 void DeletePaintRegion() { m_oPaintRegion.reset(); }
 


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

2023-05-16 Thread Hossein (via logerrit)
 cui/source/inc/connect.hxx  |2 +
 cui/source/tabpages/connect.cxx |   58 +---
 2 files changed, 21 insertions(+), 39 deletions(-)

New commits:
commit c01639c556276e496d9e762468cad6b27f9ed0f4
Author: Hossein 
AuthorDate: Tue May 16 00:50:48 2023 +0200
Commit: Hossein 
CommitDate: Tue May 16 13:44:00 2023 +0200

Simplify the code by introducing a new function

There were a lot of repetitions in the code of the function
SvxConnectionPage::Reset(). This patch Simplifies this function by
introducing SvxConnectionPage::lcl_SetMetricValueAndSave() to do the
repetetive instructions.

Change-Id: I337ccf2281fd8d1bd9b1948beb6d31b2306eb339
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151820
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/cui/source/inc/connect.hxx b/cui/source/inc/connect.hxx
index 8b7119f0dcaf..9aa2cc92dabb 100644
--- a/cui/source/inc/connect.hxx
+++ b/cui/source/inc/connect.hxx
@@ -55,6 +55,8 @@ private:
 DECL_LINK(ChangeAttrEditHdl_Impl, weld::MetricSpinButton&, void);
 DECL_LINK(ChangeAttrListBoxHdl_Impl, weld::ComboBox&, void);
 
+template
+void lcl_SetMetricValueAndSave_new(const SfxItemSet *rAttrs, 
weld::MetricSpinButton &rField, TypedWhichId nWhich);
 public:
 
 SvxConnectionPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rInAttrs);
diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index f26cb485c897..a76de5eff3fd 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -118,6 +118,17 @@ SvxConnectionPage::~SvxConnectionPage()
 m_xCtlPreview.reset();
 }
 
+template
+void SvxConnectionPage::lcl_SetMetricValueAndSave_new(const SfxItemSet* 
rAttrs, weld::MetricSpinButton& rField, TypedWhichId nWhich)
+{
+const SfxPoolItem* pItem = GetItem( *rAttrs,  nWhich);
+const SfxItemPool* pPool = rAttrs->GetPool();
+if( !pItem )
+pItem = &pPool->GetDefaultItem( nWhich );
+SetMetricValue(rField, pItem->StaticWhichCast(nWhich).GetValue(), eUnit);
+rField.save_value();
+}
+
 /*
 |*
 |* reads passed Item-Set
@@ -126,60 +137,29 @@ SvxConnectionPage::~SvxConnectionPage()
 
 void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
 {
-const SfxPoolItem* pItem = GetItem( *rAttrs, SDRATTR_EDGENODE1HORZDIST );
+const SfxPoolItem* pItem;
 const SfxItemPool* pPool = rAttrs->GetPool();
 
 // SdrEdgeNode1HorzDistItem
-if( !pItem )
-pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE1HORZDIST );
-SetMetricValue(*m_xMtrFldHorz1, 
pItem->StaticWhichCast(SDRATTR_EDGENODE1HORZDIST).GetValue(),
-   eUnit);
-m_xMtrFldHorz1->save_value();
+lcl_SetMetricValueAndSave_new(rAttrs, *m_xMtrFldHorz1, 
SDRATTR_EDGENODE1HORZDIST);
 
 // SdrEdgeNode2HorzDistItem
-pItem = GetItem( *rAttrs, SDRATTR_EDGENODE2HORZDIST );
-if( !pItem )
-pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE2HORZDIST );
-SetMetricValue(*m_xMtrFldHorz2, 
pItem->StaticWhichCast(SDRATTR_EDGENODE2HORZDIST).GetValue(),
-   eUnit);
-m_xMtrFldHorz2->save_value();
+lcl_SetMetricValueAndSave_new(rAttrs, *m_xMtrFldHorz2, 
SDRATTR_EDGENODE2HORZDIST);
 
 // SdrEdgeNode1VertDistItem
-pItem = GetItem( *rAttrs, SDRATTR_EDGENODE1VERTDIST );
-if( !pItem )
-pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE1VERTDIST );
-SetMetricValue(*m_xMtrFldVert1, 
pItem->StaticWhichCast(SDRATTR_EDGENODE1VERTDIST).GetValue(),
-   eUnit);
-m_xMtrFldVert1->save_value();
+lcl_SetMetricValueAndSave_new(rAttrs, *m_xMtrFldVert1, 
SDRATTR_EDGENODE1VERTDIST);
 
 // SdrEdgeNode2VertDistItem
-pItem = GetItem( *rAttrs, SDRATTR_EDGENODE2VERTDIST );
-if( !pItem )
-pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE2VERTDIST );
-SetMetricValue(*m_xMtrFldVert2, 
pItem->StaticWhichCast(SDRATTR_EDGENODE2VERTDIST).GetValue(),
-   eUnit);
-m_xMtrFldVert2->save_value();
+lcl_SetMetricValueAndSave_new(rAttrs, *m_xMtrFldVert2, 
SDRATTR_EDGENODE2VERTDIST);
 
 // SdrEdgeLine1DeltaItem
-pItem = GetItem( *rAttrs, SDRATTR_EDGELINE1DELTA );
-if( !pItem )
-pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE1DELTA );
-SetMetricValue(*m_xMtrFldLine1, 
pItem->StaticWhichCast(SDRATTR_EDGELINE1DELTA).GetValue(), eUnit);
-m_xMtrFldLine1->save_value();
+lcl_SetMetricValueAndSave_new(rAttrs, *m_xMtrFldLine1, 
SDRATTR_EDGELINE1DELTA);
 
 // SdrEdgeLine2DeltaItem
-pItem = GetItem( *rAttrs, SDRATTR_EDGELINE2DELTA );
-if( !pItem )
-pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE2DELTA );
-SetMetricValue(*m_xMtrFldLine2, 
pItem->StaticWhichCast(SDRATTR_EDGELINE2DELTA).GetValue(), eUnit);
-m_xMtrFldLine2->save_value();
+lcl_SetMetricValueAndSave_new(rAttrs, *m_xM

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

2023-05-16 Thread Bogdan B (via logerrit)
 sc/qa/uitest/solver/solver.py |6 +++---
 sc/uiconfig/scalc/ui/solverdlg.ui |   24 
 2 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 8107a65b17e5eaab41027cfd69ae227fb2e26ee8
Author: Bogdan B 
AuthorDate: Mon May 15 14:29:59 2023 -0600
Commit: Hossein 
CommitDate: Tue May 16 13:36:51 2023 +0200

tdf#155179 Improve Solver symbols

Co-authored-by: Adolfo Jayme Barrientos 
Change-Id: I608330f175ebf41f282d07752d593661138963b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151623
Tested-by: Jenkins
Tested-by: Hossein 
Reviewed-by: Hossein 

diff --git a/sc/qa/uitest/solver/solver.py b/sc/qa/uitest/solver/solver.py
index dcdb8fa1ea63..faabdfb1ce50 100644
--- a/sc/qa/uitest/solver/solver.py
+++ b/sc/qa/uitest/solver/solver.py
@@ -37,10 +37,10 @@ class solver(UITestCase):
 self.assertEqual("true", get_state_as_dict(xmax)["Checked"])
 
 xvalue.executeAction("CLICK", tuple())
-select_by_text(xop2list, ">=")
+select_by_text(xop2list, "≥")
 
-self.assertEqual("<=", 
get_state_as_dict(xop1list)["SelectEntryText"])
-self.assertEqual(">=", 
get_state_as_dict(xop2list)["SelectEntryText"])
+self.assertEqual("≤", 
get_state_as_dict(xop1list)["SelectEntryText"])
+self.assertEqual("≥", 
get_state_as_dict(xop2list)["SelectEntryText"])
 
 xvalueedit.executeAction("TYPE", 
mkPropertyValues({"TEXT":"1000"}))
 xchangeedit.executeAction("TYPE", 
mkPropertyValues({"TEXT":"C2"}))
diff --git a/sc/uiconfig/scalc/ui/solverdlg.ui 
b/sc/uiconfig/scalc/ui/solverdlg.ui
index eadf5df37e7b..895df3e41c57 100644
--- a/sc/uiconfig/scalc/ui/solverdlg.ui
+++ b/sc/uiconfig/scalc/ui/solverdlg.ui
@@ -594,9 +594,9 @@
 True
 False
 
-  <=
-  =
-  >=
+  ≤
+  =
+  ≥
   Integer
   Binary
 
@@ -616,9 +616,9 @@
 True
 False
 
-  <=
-  =
-  >=
+  ≤
+  =
+  ≥
   Integer
   Binary
 
@@ -638,9 +638,9 @@
 True
 False
 
-  <=
-  =
-  >=
+  ≤
+  =
+  ≥
   Integer
   Binary
 
@@ -660,9 +660,9 @@
 True
 False
 
-  <=
-  =
-  >=
+  ≤
+  =
+  ≥
   Integer
   Binary
 


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

2023-05-16 Thread Caolán McNamara (via logerrit)
 sw/source/core/inc/viewimp.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ae1876f189a1f92aba6a3a40656f9f557b7df23f
Author: Caolán McNamara 
AuthorDate: Mon May 15 21:09:05 2023 +0100
Commit: Michael Stahl 
CommitDate: Tue May 16 12:19:53 2023 +0200

tdf#155349 std::move of a std::optional leave behind a set std::optional

unlike std::move of a std::unique_ptr which leaves behind an empty
std::unique_ptr

so if HasPaintRegion was true before TakePaintRegion it was
still true after TakePaintRegion

Change-Id: I6569f5ccd8081cbcec42190c474a98c4e28030a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151774
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index f68c9c7f1f90..4b249154c2f8 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -152,7 +152,7 @@ public:
 
 bool AddPaintRect( const SwRect &rRect );
 bool HasPaintRegion()  { return m_oPaintRegion.has_value(); }
-std::optional TakePaintRegion() { return 
std::move(m_oPaintRegion); }
+std::optional TakePaintRegion() { auto ret = 
std::move(m_oPaintRegion); m_oPaintRegion.reset(); return ret; }
 const std::optional& GetPaintRegion() { return 
m_oPaintRegion; }
 void DeletePaintRegion() { m_oPaintRegion.reset(); }
 


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

2023-05-16 Thread Vojtěch Doležal (via logerrit)
 xmloff/source/text/txtprmap.cxx | 1163 
 1 file changed, 582 insertions(+), 581 deletions(-)

New commits:
commit 41d96a72fc0e0a9fa35b6ac88a389473f8baedaf
Author: Vojtěch Doležal 
AuthorDate: Mon May 15 23:31:29 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue May 16 12:17:37 2023 +0200

Removed constant concatenation macros from txtprmap.cxx

Removed concatenation from the macros, because due to them I wasn't able to 
find anything relevant with grep when searching for them.

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

diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index 5d8ef1d3471e..418d4e396ff2 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -33,13 +33,13 @@ using namespace ::com::sun::star::uno;
 using namespace ::xmloff::token;
 
 #define M_E_( a, p, l, t, c ) \
-{ a, XML_NAMESPACE_##p, XML_##l, t, c, SvtSaveOptions::ODFSVER_010, false }
+{ a, p, l, t, c, SvtSaveOptions::ODFSVER_010, false }
 
 #define M_EV_( a, p, l, t, c, v ) \
-{ a, XML_NAMESPACE_##p, XML_##l, t, c, v, false }
+{ a, p, l, t, c, v, false }
 
 #define M_ED_( a, p, l, t, c ) \
-{ a, XML_NAMESPACE_##p, XML_##l, (t) | MID_FLAG_DEFAULT_ITEM_EXPORT, c, 
SvtSaveOptions::ODFSVER_010, false }
+{ a, p, l, (t) | MID_FLAG_DEFAULT_ITEM_EXPORT, c, 
SvtSaveOptions::ODFSVER_010, false }
 
 // text properties
 #define MT_E( a, p, l, t, c ) \
@@ -90,7 +90,7 @@ using namespace ::xmloff::token;
 XMLPropertyMapEntry constexpr aXMLParaPropMap[] =
 {
 // RES_UNKNOWNATR_CONTAINER
-MP_E( PROP_ParaUserDefinedAttributes, TEXT, XMLNS, 
XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
+MP_E( PROP_ParaUserDefinedAttributes,  XML_NAMESPACE_TEXT, XML_XMLNS, 
XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
 
 // fill attributes for paragraph backgrounds
 // #i125045# moved to the front to be able to exclude these in 
lcl_txtprmap_getMap
@@ -118,187 +118,187 @@ XMLPropertyMapEntry constexpr aXMLParaPropMap[] =
 
 // RES_LR_SPACE
 // !!! DO NOT REORDER THE MARGINS !!!
-MP_E( PROP_ParaLeftMargin, FO, MARGIN, 
XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARAMARGINALL ),
-MP_E( PROP_ParaLeftMarginRelative, FO, MARGIN, XML_TYPE_PERCENT16, 
CTF_PARAMARGINALL_REL ),
-MP_E( PROP_ParaLeftMargin, FO, MARGIN_LEFT,
XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARALEFTMARGIN ),
-MP_E( PROP_ParaLeftMarginRelative, FO, MARGIN_LEFT,
XML_TYPE_PERCENT16, CTF_PARALEFTMARGIN_REL ),
-MP_E( PROP_ParaRightMargin,FO, MARGIN_RIGHT,   
XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARARIGHTMARGIN ),
-MP_E( PROP_ParaRightMarginRelative,FO, MARGIN_RIGHT,   
XML_TYPE_PERCENT16, CTF_PARARIGHTMARGIN_REL ),
+MP_E( PROP_ParaLeftMargin,  XML_NAMESPACE_FO, XML_MARGIN,   
XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARAMARGINALL ),
+MP_E( PROP_ParaLeftMarginRelative,  XML_NAMESPACE_FO, XML_MARGIN,   
XML_TYPE_PERCENT16, CTF_PARAMARGINALL_REL ),
+MP_E( PROP_ParaLeftMargin,  XML_NAMESPACE_FO, XML_MARGIN_LEFT,  
XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARALEFTMARGIN ),
+MP_E( PROP_ParaLeftMarginRelative,  XML_NAMESPACE_FO, XML_MARGIN_LEFT,  
XML_TYPE_PERCENT16, CTF_PARALEFTMARGIN_REL ),
+MP_E( PROP_ParaRightMargin, XML_NAMESPACE_FO, XML_MARGIN_RIGHT, 
XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARARIGHTMARGIN ),
+MP_E( PROP_ParaRightMarginRelative, XML_NAMESPACE_FO, XML_MARGIN_RIGHT, 
XML_TYPE_PERCENT16, CTF_PARARIGHTMARGIN_REL ),
 // RES_UL_SPACE
-MP_E( PROP_ParaTopMargin,  FO, MARGIN_TOP, 
XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARATOPMARGIN ),
-MP_E( PROP_ParaTopMarginRelative,  FO, MARGIN_TOP, 
XML_TYPE_PERCENT16, CTF_PARATOPMARGIN_REL ),
-MP_E( PROP_ParaBottomMargin,   FO, MARGIN_BOTTOM,  
XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARABOTTOMMARGIN ),
-MP_E( PROP_ParaBottomMarginRelative,FO,MARGIN_BOTTOM,  
XML_TYPE_PERCENT16, CTF_PARABOTTOMMARGIN_REL ),
-MAP_ODF13( PROP_ParaContextMargin, XML_NAMESPACE_STYLE, 
XML_CONTEXTUAL_SPACING, XML_TYPE_BOOL|XML_TYPE_PROP_PARAGRAPH, 0 ),// ODF 
1.3 OFFICE-3767 and was written by LO<=4.2
-MAP_ODF13( PROP_ParaContextMargin, XML_NAMESPACE_LO_EXT, 
XML_CONTEXTUAL_SPACING, XML_TYPE_BOOL|XML_TYPE_PROP_PARAGRAPH, 0 ), // 
extension namespace
+MP_E( PROP_ParaTopMargin,XML_NAMESPACE_FO,XML_MARGIN_TOP,  
   XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARATOPMARGIN ),
+MP_E( PROP_ParaTopMarginRelative,XML_NAMESPACE_FO,XML_MARGIN_TOP,  
   XML_TYPE_PERCENT16, CTF_PARATOPMARGIN_REL ),
+MP_E( PROP_ParaBottomMargin, XML_NAMESPACE_FO,
XML

[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - 2 commits - external/libpagemaker g

2023-05-16 Thread Michael Stahl (via logerrit)
 external/libpagemaker/include.patch.1 |   10 ++
 g |   18 +-
 2 files changed, 19 insertions(+), 9 deletions(-)

New commits:
commit 7d9b1ebce953cf26c2ffd38319820374fc570c73
Author: Michael Stahl 
AuthorDate: Mon May 30 21:30:04 2022 +0200
Commit: Michael Stahl 
CommitDate: Tue May 16 11:22:18 2023 +0200

g: we are not, in fact, in the BUILDDIR

For an out-of-tree build, "make fetch" poinlessly clones all git
submodules.

Change-Id: If4afb218946f49ba934f68b35806fd8143c39387
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135143
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit aa8ef74b475a6fbd6e4ec27c42941aa274998df6)

diff --git a/g b/g
index 746babe23539..dd95b737d492 100755
--- a/g
+++ b/g
@@ -10,9 +10,9 @@ fi
 SUBMODULES_ALL="dictionaries helpcontent2 translations"
 
 pushd $(dirname $0) > /dev/null
-if [ -f config_host.mk ] ; then
-# we are in the BUILDDIR
-SRC_ROOT=$(< config_host.mk grep -a SRC_ROOT | sed -e "s/.*=//")
+if [ -f ${BUILDDIR}/config_host.mk ] ; then
+# we are in the SRCDIR
+SRC_ROOT=$(< ${BUILDDIR}/config_host.mk grep -a SRC_ROOT | sed -e 
"s/.*=//")
 else
 SRC_ROOT=$(pwd)
 fi
@@ -138,8 +138,8 @@ get_active_submodules()
 get_configured_submodules()
 {
 SUBMODULES_CONFIGURED=""
-if [ -f config_host.mk ] ; then
-SUBMODULES_CONFIGURED=$(< config_host.mk grep -a GIT_NEEDED_SUBMODULES 
| sed -e "s/.*=//")
+if [ -f ${BUILDDIR}/config_host.mk ] ; then
+SUBMODULES_CONFIGURED=$(< ${BUILDDIR}/config_host.mk grep -a 
GIT_NEEDED_SUBMODULES | sed -e "s/.*=//")
 else
 # if we need the configured submodule before the configuration is 
done. we assumed you want them all
 SUBMODULES_CONFIGURED=${SUBMODULES_ALL?}
@@ -149,12 +149,12 @@ get_configured_submodules()
 get_git_reference()
 {
 REFERENCED_GIT=""
-if [ -f config_host.mk ]; then
-REFERENCED_GIT=$(< config_host.mk grep -a GIT_REFERENCE_SRC | sed -e 
"s/.*=//")
+if [ -f ${BUILDDIR}/config_host.mk ]; then
+REFERENCED_GIT=$(< ${BUILDDIR}/config_host.mk grep -a 
GIT_REFERENCE_SRC | sed -e "s/.*=//")
 fi
 LINKED_GIT=""
-if [ -f config_host.mk ]; then
-LINKED_GIT=$(< config_host.mk grep -a GIT_LINK_SRC | sed -e "s/.*=//")
+if [ -f ${BUILDDIR}/config_host.mk ]; then
+LINKED_GIT=$(< ${BUILDDIR}/config_host.mk grep -a GIT_LINK_SRC | sed 
-e "s/.*=//")
 fi
 }
 
commit e2e7b6656f2d9657b01972026e8b49658c90bcbe
Author: Michael Stahl 
AuthorDate: Tue May 16 11:21:46 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue May 16 11:21:46 2023 +0200

libpagemaker: argh, forgot to git add the patch

Change-Id: I58b09b3d1198bbdbf469ed26455efe4d17f90933

diff --git a/external/libpagemaker/include.patch.1 
b/external/libpagemaker/include.patch.1
new file mode 100644
index ..ac6cce7f5898
--- /dev/null
+++ b/external/libpagemaker/include.patch.1
@@ -0,0 +1,10 @@
+--- libpagemaker/src/lib/PMDTypes.h.orig   2023-05-10 19:58:32.975142131 
+0200
 libpagemaker/src/lib/PMDTypes.h2023-05-10 19:58:55.511175229 +0200
+@@ -10,6 +10,7 @@
+ #ifndef __PMDTYPES_H__
+ #define __PMDTYPES_H__
+ 
++#include 
+ #include 
+ 
+ #include "Units.h"


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

2023-05-16 Thread Miklos Vajna (via logerrit)
 sw/qa/core/frmedt/frmedt.cxx   |   28 
 sw/source/core/frmedt/feshview.cxx |   23 ---
 2 files changed, 48 insertions(+), 3 deletions(-)

New commits:
commit d19cbc040b0cc06a838858fdd27b4f3fc6865776
Author: Miklos Vajna 
AuthorDate: Mon May 15 08:42:17 2023 +0200
Commit: Miklos Vajna 
CommitDate: Tue May 16 11:07:35 2023 +0200

sw floattable: fix UI / property dialog for shape containing table

The bugdoc contains a shape, containing a table (fly + draw format
pair). Trying to open the shape properties (position & size) dialog in a
debug build crashes.

We hit an assertion failure in SwTextFrame::MapModelToView(), because
the model position does not belong to the text node of the text frame.
This happens because SwFEShell::CalcBoundRect() uses GetCurrFrame(),
that normally points to the anchor frame for draw formats, but pointed
to a text frame inside the table (inside the shape) instead in the
problematic case.

Fix the problem by improving SwFEShell::SelectObj(), so in case it
selects a draw format instead of a fly format, then we don't use
SwCursorShell::SetCursor() (which works with a coordinate, and will find
the in-shape text nodes) but instead use SwCursorShell::SetSelection()
to explicitly set the cursor to the anchor position.

This went wrong in commit 7596e26fd259ce5445212949403e7cd32303b2bd (Add
SwTextBoxHelper::findShapes, 2014-06-24).

(cherry picked from commit 61f3c796702f725f2c65b53b79ab7e190d39b6b8)

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

diff --git a/sw/qa/core/frmedt/frmedt.cxx b/sw/qa/core/frmedt/frmedt.cxx
index 6d6c3735724a..18474ad33bf0 100644
--- a/sw/qa/core/frmedt/frmedt.cxx
+++ b/sw/qa/core/frmedt/frmedt.cxx
@@ -140,6 +140,34 @@ CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, 
testPasteFlyInTextBox)
 CPPUNIT_ASSERT_EQUAL(static_cast(3), 
pDoc->GetSpzFrameFormats()->GetFormatCount());
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testTextBoxSelectCursorPos)
+{
+// Given a document with a fly+draw format pair (textbox):
+createSwDoc("paste-fly-in-textbox.docx");
+
+// When selecting the fly format:
+SwDoc* pDoc = getSwDoc();
+SdrPage* pPage = 
pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+SdrObject* pFlyObject = pPage->GetObj(1);
+SwDrawContact* pFlyContact = 
static_cast(pFlyObject->GetUserCall());
+CPPUNIT_ASSERT_EQUAL(static_cast(RES_FLYFRMFMT), 
pFlyContact->GetFormat()->Which());
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+pWrtShell->SelectObj(Point(), 0, pFlyObject);
+
+// Then make sure the cursor is the anchor of the draw format:
+SdrObject* pDrawObject = pPage->GetObj(0);
+SwDrawContact* pDrawContact = 
static_cast(pDrawObject->GetUserCall());
+SwFrameFormat* pDrawFormat = pDrawContact->GetFormat();
+CPPUNIT_ASSERT_EQUAL(static_cast(RES_DRAWFRMFMT), 
pDrawFormat->Which());
+SwNodeOffset nAnchor = 
pDrawFormat->GetAnchor().GetContentAnchor()->GetNode().GetIndex();
+SwNodeOffset nCursor = 
pWrtShell->GetCurrentShellCursor().GetPointNode().GetIndex();
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 15 (anchor of draw format)
+// - Actual  : 6 (in-fly-format position)
+// i.e. the cursor had a broken position after trying to select the fly 
format.
+CPPUNIT_ASSERT_EQUAL(nAnchor, nCursor);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 4af556edbef4..14b97a620cca 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -151,7 +151,7 @@ SwFlyFrame *GetFlyFromMarked( const SdrMarkList *pLst, 
SwViewShell *pSh )
 return nullptr;
 }
 
-static void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrame* pOldSelFly)
+static void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrame* pOldSelFly, 
SwFrameFormat* pNewDrawFormat = nullptr)
 {
 const SwFrameFormat *pFlyFormat = pSh->SelFlyGrabCursor();
 if( pFlyFormat && !pSh->ActionPend() &&
@@ -171,7 +171,21 @@ static void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrame* 
pOldSelFly)
 // --> assure consistent cursor
 pSh->KillPams();
 pSh->ClearMark();
-pSh->SetCursor( 
pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), true);
+if (pNewDrawFormat)
+{
+// If we selected a draw shape format, move the cursor to its 
anchor position.
+// SetCursor() may pick something inside, which is not wanted: 
code later assumes that
+// the cursor is at the anchor point if a shape is selected.
+const SwPosition* pContentAnchor = 
pNewDr

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

2023-05-16 Thread Andreas Heinisch (via logerrit)
 sc/qa/unit/ucalc_copypaste.cxx   |   14 --
 sc/qa/unit/uicalc/uicalc.cxx |   35 +++
 sc/source/core/data/document.cxx |5 +++--
 3 files changed, 46 insertions(+), 8 deletions(-)

New commits:
commit 535f8fde0c33c435e4a8e9f768003516ce933666
Author: Andreas Heinisch 
AuthorDate: Mon May 15 09:01:21 2023 +0200
Commit: Andreas Heinisch 
CommitDate: Tue May 16 11:05:04 2023 +0200

tdf#141440 - Do not delete notes when pasting contents

Contents include cells with values, datetimes, strings, formulas, outlines, 
and sparklines.

Change-Id: I9acf3a33c7723300d6b85f0abe468db28de6ebcb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151759
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/sc/qa/unit/ucalc_copypaste.cxx b/sc/qa/unit/ucalc_copypaste.cxx
index 43f9272a13c0..695b5b8f6214 100644
--- a/sc/qa/unit/ucalc_copypaste.cxx
+++ b/sc/qa/unit/ucalc_copypaste.cxx
@@ -9407,10 +9407,11 @@ CPPUNIT_TEST_FIXTURE(TestCopyPaste, 
testCopyPasteSkipEmpty)
 
 // Check the content after the paste.
 {
+// tdf#141440 - do not delete notes when pasting contents
 static const Check aChecks[] = {
-{ "Clip1", COL_YELLOW, false }, { "B", COL_BLUE, true },
-{ "Clip2", COL_YELLOW, false }, { "D", COL_BLUE, true },
-{ "Clip3", COL_YELLOW, false },
+{ "Clip1", COL_YELLOW, true }, { "B", COL_BLUE, true },
+{ "Clip2", COL_YELLOW, true }, { "D", COL_BLUE, true },
+{ "Clip3", COL_YELLOW, true },
 };
 
 bool bRes
@@ -9434,10 +9435,11 @@ CPPUNIT_TEST_FIXTURE(TestCopyPaste, 
testCopyPasteSkipEmpty)
 // Redo, and check the content again.
 aUndo.Redo();
 {
+// tdf#141440 - do not delete notes when pasting contents
 static const Check aChecks[] = {
-{ "Clip1", COL_YELLOW, false }, { "B", COL_BLUE, true },
-{ "Clip2", COL_YELLOW, false }, { "D", COL_BLUE, true },
-{ "Clip3", COL_YELLOW, false },
+{ "Clip1", COL_YELLOW, true }, { "B", COL_BLUE, true },
+{ "Clip2", COL_YELLOW, true }, { "D", COL_BLUE, true },
+{ "Clip3", COL_YELLOW, true },
 };
 
 bool bRes
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index d3ae6e4d02fe..a6854ae76d56 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -1893,6 +1893,41 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf150219)
 CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(0, 0, 1)));
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf141440)
+{
+createScDoc();
+ScDocument* pDoc = getScDoc();
+
+// Insert a note to cell A1
+goToCell("A1");
+uno::Sequence aArgs
+= comphelper::InitPropertySequence({ { "Text", uno::Any(OUString("Note 
in A1")) } });
+dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs);
+
+// Insert a formula to cell A2
+insertStringToCell("A2", u"=1+1");
+CPPUNIT_ASSERT_EQUAL(OUString("2"), pDoc->GetString(ScAddress(0, 1, 0)));
+
+// Copy content of A2 to A1 using paste special command as a formula 
(Flags F)
+goToCell("A2");
+dispatchCommand(mxComponent, ".uno:Copy", {});
+goToCell("A1");
+aArgs = comphelper::InitPropertySequence(
+{ { "Flags", uno::Any(OUString("F")) },
+  { "FormulaCommand", uno::Any(sal_uInt16(ScPasteFunc::ADD)) },
+  { "SkipEmptyCells", uno::Any(false) },
+  { "Transpose", uno::Any(false) },
+  { "AsLink", uno::Any(false) },
+  { "MoveMode", uno::Any(sal_uInt16(InsCellCmd::INS_NONE)) } });
+dispatchCommand(mxComponent, ".uno:InsertContents", aArgs);
+
+// Check if string in cell A2 was copied to cell A1
+CPPUNIT_ASSERT_EQUAL(OUString("2"), pDoc->GetString(ScAddress(0, 0, 0)));
+// Without the fix in place, there would be no note in cell A1 after using 
paste special
+CPPUNIT_ASSERT_MESSAGE("There should be a note on A1", 
pDoc->HasNote(ScAddress(0, 0, 0)));
+CPPUNIT_ASSERT_EQUAL(OUString("Note in A1"), pDoc->GetNote(ScAddress(0, 0, 
0))->GetText());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 25d0363c35f4..cab1dc364b31 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2905,8 +2905,9 @@ void ScDocument::CopyFromClip(
 InsertDeleteFlags nDelFlag = InsertDeleteFlags::NONE;
 if ( (nInsFlag & (InsertDeleteFlags::CONTENTS | 
InsertDeleteFlags::ADDNOTES)) == (InsertDeleteFlags::NOTE | 
InsertDeleteFlags::ADDNOTES) )
 nDelFlag |= InsertDeleteFlags::NOTE;
-else if ( nInsFlag & InsertDeleteFlags::CONTENTS )
-nDelFlag |= InsertDeleteFlags::CONTENTS;
+// tdf#141440 - do not delete notes when pasting contents (see 
InsertDeleteFlags::CONTENTS)
+else if 

[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-22.05.14-4'

2023-05-16 Thread Andras Timar (via logerrit)
Tag 'cp-22.05.14-4' created by Andras Timar  at 
2023-05-16 08:44 +

cp-22.05.14-4

Changes since cp-22.05.14-3-4:
---
 0 files changed
---


Re: package / tmp file usage ...

2023-05-16 Thread Mike Kaganski

On 14.05.2023 14:46, Noel Grandin wrote:
What I can see is that we save to a temporary file and then copy the 
temporary file to its final location.
That part however would require major surgery to change since it starts 
in sfx and goes through the dreaded UCB layer.



We introduced osl_replaceFile in 
https://gerrit.libreoffice.org/c/core/+/60163, which is designed to 
minimize the overhead when replacing the target - so that it's still 
possible to create a temporary file next to the destination, and then 
make a cheap replacement. Is the problem that the initial place of 
creation of the temporary file is somewhere else, not next to the target?



--
Best regards,
Mike Kaganski



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

2023-05-16 Thread Andrea Gelmini (via logerrit)
 drawinglayer/qa/unit/vclpixelprocessor2d.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 36eeb7a93174d17b08213eef7344952ae8e2e62e
Author: Andrea Gelmini 
AuthorDate: Mon May 15 23:41:35 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue May 16 09:48:10 2023 +0200

Fix typo

Change-Id: I006c882aacf316dda0ecb3302835ca021d45ecc3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151812
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx 
b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
index 07b68c9eaad7..4362d3e55f19 100644
--- a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
+++ b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
@@ -80,7 +80,7 @@ public:
 // that parameter was originally added. Other hints are: It is *not* 
named
 // 'ClipRange'. Using a B2DRange to define a ClipRange topology would 
be bad due
 // to not being transformable, a PolyPolygon would be used in that 
case. Using as
-// clipping mechanism would offer a 2nd pinciple to add clipping for 
primitives
+// clipping mechanism would offer a 2nd principle to add clipping for 
primitives
 // besides MaskPrimitive2D - always bad style in a sub-system. A quick 
look
 // on it's usages gives hints, too.
 // This means that when defining an outputRange that resides 
completely *inside*


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

2023-05-16 Thread Andrea Gelmini (via logerrit)
 include/basegfx/utils/bgradient.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ef1982d633ece640a54f6ee6dc2886964930cff9
Author: Andrea Gelmini 
AuthorDate: Mon May 15 23:42:26 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue May 16 09:47:46 2023 +0200

Fix typo

Change-Id: Ibbf9a267bbfba02c119fa1995c6b2ae90f391031
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151813
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/include/basegfx/utils/bgradient.hxx 
b/include/basegfx/utils/bgradient.hxx
index d4a9b7e19a78..d1bd55439a41 100644
--- a/include/basegfx/utils/bgradient.hxx
+++ b/include/basegfx/utils/bgradient.hxx
@@ -239,7 +239,7 @@ public:
 
 // check if we need last-ColorStop-correction. This returns true if the 
last
 // two ColorStops have the same offset but different Colors. In that case 
the
-// tesselation for gradients does have to create an extra ending/closing 
entry
+// tessellation for gradients does have to create an extra ending/closing 
entry
 bool checkPenultimate() const;
 
 /* Tooling method to fill a awt::ColorStopSequence with


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

2023-05-16 Thread Andrea Gelmini (via logerrit)
 basegfx/source/tools/bgradient.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 68655b362f8129f6f3762bf7926690c1a40c9821
Author: Andrea Gelmini 
AuthorDate: Mon May 15 23:44:01 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue May 16 09:47:25 2023 +0200

Fix typo

Change-Id: Id590b13237bc148dac955d6f4d56092f86d1dd16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151817
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/basegfx/source/tools/bgradient.cxx 
b/basegfx/source/tools/bgradient.cxx
index f2e7d90190a9..134fda548ece 100644
--- a/basegfx/source/tools/bgradient.cxx
+++ b/basegfx/source/tools/bgradient.cxx
@@ -683,7 +683,7 @@ BGradient::BGradient(const css::uno::Any& rVal)
 SetEndIntens(aGradient.EndIntensity);
 SetSteps(aGradient.StepCount);
 
-// complete data by creating ColorStops from fixe Start/EndColor
+// complete data by creating ColorStops from fixed Start/EndColor
 aColorStops = BColorStops{
 BColorStop(0.0, 
ColorToBColorConverter(aGradient.StartColor).getBColor()),
 BColorStop(1.0, 
ColorToBColorConverter(aGradient.EndColor).getBColor())


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

2023-05-16 Thread Andrea Gelmini (via logerrit)
 include/basegfx/utils/bgradient.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 92159c4b2eb4c588b4c2505bae2be036bafc0372
Author: Andrea Gelmini 
AuthorDate: Mon May 15 23:39:38 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue May 16 09:46:54 2023 +0200

Fix typo

Change-Id: Ibb3cbd37e04beed410c61f93f35be51a59bdc10b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151808
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/include/basegfx/utils/bgradient.hxx 
b/include/basegfx/utils/bgradient.hxx
index fc32683802b9..d4a9b7e19a78 100644
--- a/include/basegfx/utils/bgradient.hxx
+++ b/include/basegfx/utils/bgradient.hxx
@@ -239,7 +239,7 @@ public:
 
 // check if we need last-ColorStop-correction. This returns true if the 
last
 // two ColorStops have the same offset but different Colors. In that case 
the
-// tesselation for gradients does have to create an extra ending/closing 
enty
+// tesselation for gradients does have to create an extra ending/closing 
entry
 bool checkPenultimate() const;
 
 /* Tooling method to fill a awt::ColorStopSequence with


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

2023-05-16 Thread Andrea Gelmini (via logerrit)
 drawinglayer/qa/unit/vclpixelprocessor2d.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e775824b63d61aa9c65560e42c1e4faf1a3fd3a8
Author: Andrea Gelmini 
AuthorDate: Mon May 15 23:42:51 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue May 16 09:45:12 2023 +0200

Fix typo

Change-Id: I77c647c513c4b605917888bd9054385b2f7f7bf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151814
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx 
b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
index b9f6357164ec..07b68c9eaad7 100644
--- a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
+++ b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
@@ -70,7 +70,7 @@ public:
 // It was originally needed to correctly display TextFrames (TF) in 
Writer: If you
 // have a TF in SW filled with a gradient and that TF has sub-frames, 
it inherits
 // the gradient fill. Since you can freely move those sub-TFs even 
outside the
-// parent TF there has to be a way to not only paint gradients in ther 
definition
+// parent TF there has to be a way to not only paint gradients in 
their definition
 // range (classical, all DrawObjects do that), but extended from that. 
This is
 // needed e.g. for linear gradients, but - dependent of e.g. the 
center settings -
 // also for all other ones, all can have geometry 'outside' the 
DefinitionRange.


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

2023-05-16 Thread Miklos Vajna (via logerrit)
 sw/qa/uitest/data/chained-frames.odt |binary
 sw/qa/uitest/ui/frmdlg/frmdlg.py |   17 +
 sw/source/ui/frmdlg/frmpage.cxx  |   23 ---
 3 files changed, 29 insertions(+), 11 deletions(-)

New commits:
commit d9cd177b9b08d454882dd77ffeb825a184a1b540
Author: Miklos Vajna 
AuthorDate: Tue May 16 08:31:21 2023 +0200
Commit: Miklos Vajna 
CommitDate: Tue May 16 09:42:18 2023 +0200

sw floattable: disable UI if the frame is chained already

TextFrames can be chained and we look at those fly frames as shapes. In
this case, we should not offer the "split fly" functionality, which
makes sense only when the fly frame is considered as a floating table.

The combination of these two features have no use-case and it would just
cause trouble when exporting to Word formats.

Fix the problem by making SwFramePage::Reset() more strict: it already
only allowed fly split for the case when the content was a single table,
but now it also requires no chaining.

The other way around (split fly -> no chain) still needs doing.

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

diff --git a/sw/qa/uitest/data/chained-frames.odt 
b/sw/qa/uitest/data/chained-frames.odt
new file mode 100644
index ..281e06520e27
Binary files /dev/null and b/sw/qa/uitest/data/chained-frames.odt differ
diff --git a/sw/qa/uitest/ui/frmdlg/frmdlg.py b/sw/qa/uitest/ui/frmdlg/frmdlg.py
index cfa2dd8ba954..e3aeb67c569c 100644
--- a/sw/qa/uitest/ui/frmdlg/frmdlg.py
+++ b/sw/qa/uitest/ui/frmdlg/frmdlg.py
@@ -13,6 +13,7 @@ import time
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.framework import UITestCase
 from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import get_url_for_data_file
 
 
 class Test(UITestCase):
@@ -44,5 +45,21 @@ class Test(UITestCase):
 # Then make sure the doc model is updated correctly:
 self.assertEqual(xComponent.TextFrames.Frame1.IsSplitAllowed, True)
 
+def test_chained_fly_split(self):
+# Given a document with 2 chained fly frames:
+with 
self.ui_test.load_file(get_url_for_data_file("chained-frames.odt")):
+# When selecting the first and opening the fly frame properties 
dialog:
+self.xUITest.executeCommand(".uno:JumpToNextFrame")
+# Wait until SwTextShell is replaced with SwDrawShell after 120 
ms, as set in the SwView
+# ctor.
+time.sleep(0.2)
+with 
self.ui_test.execute_dialog_through_command(".uno:FrameDialog") as xDialog:
+# Then make sure that the 'split' checkbox is hidden:
+xFlysplit = xDialog.getChild("flysplit")
+# Without the accompanying fix in place, this test would have 
failed with:
+# AssertionError: 'true' != 'false'
+# i.e. the UI didn't hide this option, leading to some weird 
mix of chained shapes
+# and floating tables.
+self.assertEqual(get_state_as_dict(xFlysplit)['Visible'], 
"false")
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 74ccc1a51809..82bb86e7a095 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -798,15 +798,9 @@ namespace
 };
 
 /// Checks if the current fly frame contains exactly one table.
-bool ContainsSingleTable(SwWrtShell* pWrtShell)
+bool ContainsSingleTable(const SwFrameFormat& rFlyFormat)
 {
-const SwFrameFormat* pFlyFormat = pWrtShell->GetFlyFrameFormat();
-if (!pFlyFormat)
-{
-return false;
-}
-
-const SwNodeIndex* pStartNode = pFlyFormat->GetContent().GetContentIdx();
+const SwNodeIndex* pStartNode = rFlyFormat.GetContent().GetContentIdx();
 if (!pStartNode)
 {
 return false;
@@ -830,6 +824,12 @@ bool ContainsSingleTable(SwWrtShell* pWrtShell)
 
 return true;
 }
+
+bool ContainsChain(const SwFrameFormat& rFlyFormat)
+{
+const SwFormatChain& rChain = rFlyFormat.GetChain();
+return rChain.GetPrev() || rChain.GetNext();
+}
 }
 
 void SwFramePage::setOptimalRelWidth()
@@ -1047,10 +1047,11 @@ void SwFramePage::Reset( const SfxItemSet *rSet )
 m_xFlySplitCB->set_sensitive(m_xAnchorAtParaRB->get_active());
 }
 
-if (!ContainsSingleTable(pSh))
+const SwFrameFormat* pFlyFormat = pSh->GetFlyFrameFormat();
+if (!pFlyFormat || !ContainsSingleTable(*pFlyFormat) || 
ContainsChain(*pFlyFormat))
 {
-// Only allow fly split if the frame contains a single table, 
otherwise it would be hard the
-// resulting model to Word formats.
+// Only allow fly split if the frame contains a single table, 
otherwise it would be hard to
+// save the 

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

2023-05-16 Thread Andrea Gelmini (via logerrit)
 include/basegfx/utils/bgradient.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bb0edd05b5595e8b795db6ce521491716661a09a
Author: Andrea Gelmini 
AuthorDate: Mon May 15 23:43:15 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue May 16 09:41:12 2023 +0200

Fix typo

Change-Id: I126f38c126c3f541d451cdafa074d2b8c0248d05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151815
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/include/basegfx/utils/bgradient.hxx 
b/include/basegfx/utils/bgradient.hxx
index 37de614faba7..fc32683802b9 100644
--- a/include/basegfx/utils/bgradient.hxx
+++ b/include/basegfx/utils/bgradient.hxx
@@ -137,7 +137,7 @@ public:
 BColorStops(const css::awt::ColorStopSequence& rColorStops);
 BColorStops(const css::uno::Any& rVal);
 
-// constuctor with two colors to explicitly create a
+// constructor with two colors to explicitly create a
 // BColorStops for StartColor @0.0 & EndColor @1.0
 BColorStops(const BColor& rStart, const BColor& rEnd);
 


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

2023-05-16 Thread Andrea Gelmini (via logerrit)
 basegfx/source/tools/bgradient.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8c76c0538d81a1425caca55c917367492b7cc631
Author: Andrea Gelmini 
AuthorDate: Mon May 15 23:43:29 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue May 16 09:40:44 2023 +0200

Fix typo

Change-Id: I5701a1fdfe9e4f139049ed6c0de1748ec7c06e07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151816
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/basegfx/source/tools/bgradient.cxx 
b/basegfx/source/tools/bgradient.cxx
index 7cb1ed85e859..f2e7d90190a9 100644
--- a/basegfx/source/tools/bgradient.cxx
+++ b/basegfx/source/tools/bgradient.cxx
@@ -101,7 +101,7 @@ BColorStops::BColorStops(const css::uno::Any& rVal)
 }
 }
 
-// constuctor with two colors to explicitly create a
+// constructor with two colors to explicitly create a
 // BColorStops for a single StartColor @0.0 & EndColor @1.0
 BColorStops::BColorStops(const BColor& rStart, const BColor& rEnd)
 {


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

2023-05-16 Thread Andrea Gelmini (via logerrit)
 drawinglayer/qa/unit/vclpixelprocessor2d.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 30984681f9019d267d5cf7c453ff482a2f5bc33c
Author: Andrea Gelmini 
AuthorDate: Mon May 15 23:44:37 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue May 16 09:40:21 2023 +0200

Fix typo

Change-Id: I77c5760a38b07541eaceae765cd0e14eaddb6d11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151818
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx 
b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
index 18bdeb9fdf6e..b9f6357164ec 100644
--- a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
+++ b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
@@ -83,7 +83,7 @@ public:
 // clipping mechanism would offer a 2nd pinciple to add clipping for 
primitives
 // besides MaskPrimitive2D - always bad style in a sub-system. A quick 
look
 // on it's usages gives hints, too.
-// This means that when defining a outputRange tat resides completely 
*inside*
+// This means that when defining an outputRange that resides 
completely *inside*
 // the definitionRange *no change* at all is done by definition since 
this does
 // not *extend* the target area of the gradient paint region at all. 
If an
 // implementation does clip and limit output to 'outputRange' that 
should do no


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

2023-05-16 Thread Andrea Gelmini (via logerrit)
 drawinglayer/qa/unit/vclpixelprocessor2d.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b4a64ea76a4e0d5dcdbb806ae7352d715226b494
Author: Andrea Gelmini 
AuthorDate: Mon May 15 23:40:27 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue May 16 09:38:37 2023 +0200

Fix typo

Change-Id: Idce8a85c80c21ee4667810ec6f397389077432d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151810
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx 
b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
index 8a3605d93280..18bdeb9fdf6e 100644
--- a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
+++ b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
@@ -72,7 +72,7 @@ public:
 // the gradient fill. Since you can freely move those sub-TFs even 
outside the
 // parent TF there has to be a way to not only paint gradients in ther 
definition
 // range (classical, all DrawObjects do that), but extended from that. 
This is
-// needed e.g. for linerar gradients, but - dependent of e.g. the 
center settings -
+// needed e.g. for linear gradients, but - dependent of e.g. the 
center settings -
 // also for all other ones, all can have geometry 'outside' the 
DefinitionRange.
 // This is now also used in various other locations which is proof 
that this is
 // useful and needed. It is possible to see that basic history/reason 
for this


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

2023-05-16 Thread Heiko Tietze (via logerrit)
 cui/source/options/optgdlg.cxx |1 +
 cui/uiconfig/ui/optviewpage.ui |4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 90a8073fa5a6a724de498130476895dfaf4429b5
Author: Heiko Tietze 
AuthorDate: Mon May 15 13:46:58 2023 +0200
Commit: Heiko Tietze 
CommitDate: Tue May 16 09:20:49 2023 +0200

Related tdf#155070 - Tooltips moved from container to controls

* Save log button disabled if Skia is off to prevent error message

Change-Id: Iccd757fb15b347cf9d048115d4b048543814bd99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151764
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 369e48ae265a..249d7b0318b6 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -667,6 +667,7 @@ void OfaViewTabPage::UpdateSkiaStatus()
 // FIXME: should really add code to show a 'lock' icon here.
 
m_xUseSkia->set_sensitive(!officecfg::Office::Common::VCL::UseSkia::isReadOnly());
 m_xForceSkiaRaster->set_sensitive(m_xUseSkia->get_active() && 
!officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly());
+m_xSkiaLog->set_sensitive(bEnabled);
 
 // Technically the 'use hardware acceleration' option could be used to 
mean !forceSkiaRaster, but the implementation
 // of the option is so tied to the implementation of the canvas module 
that it's simpler to ignore it.
diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index d24f7ef7285a..5a9a7579e85b 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -416,7 +416,6 @@
   
 True
 False
-Requires restart
 12
 6
 3
@@ -426,6 +425,7 @@
 True
 True
 False
+Requires restart
 start
 True
 True
@@ -446,6 +446,7 @@
 True
 True
 False
+Requires restart
 start
 True
 True
@@ -466,6 +467,7 @@
 True
 True
 False
+Requires restart
 True
 True
   


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

2023-05-16 Thread Andrea Gelmini (via logerrit)
 drawinglayer/qa/unit/vclpixelprocessor2d.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 64f4bc610ed3ba18f282f1a2b43bf59c87c1df68
Author: Andrea Gelmini 
AuthorDate: Mon May 15 23:41:10 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue May 16 09:04:24 2023 +0200

Fix typo

Change-Id: Ib9150f390574dc9467335451f42a10749bd915d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151811
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx 
b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
index 202bb158e36b..8a3605d93280 100644
--- a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
+++ b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
@@ -93,7 +93,7 @@ public:
 // PolyPolygon) in a MaskPrimitive2D defined by the outline 
PolyPolygon of the
 // shape. Nothing speaks against renderers detecting that combination 
and do
 // something optimized if they want to, especially SDPRs, but this is 
not
-// required. The standard embedded clipping of the mplementations of 
the
+// required. The standard embedded clipping of the implementations of 
the
 // MaskPrimitive2D do the right thing.
 // This test intends to paint the lower part of a gradient, so define 
the
 // gradient for the full target range and embed it to a MaskPrimitive2D


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

2023-05-16 Thread Andrea Gelmini (via logerrit)
 drawinglayer/qa/unit/vclpixelprocessor2d.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 645adce7c7294148f2729e648c37370e788575bf
Author: Andrea Gelmini 
AuthorDate: Mon May 15 23:40:03 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue May 16 09:04:01 2023 +0200

Fix typo

Change-Id: Id6f8a07f62e5861c4ad37b4537436632243b1a1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151809
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx 
b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
index 7f59e7e3edd0..202bb158e36b 100644
--- a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
+++ b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
@@ -68,7 +68,7 @@ public:
 // the case --- it is in fact the *contrary*, it is there to *extend* 
the
 // usual definition/paintRange of a gradient:
 // It was originally needed to correctly display TextFrames (TF) in 
Writer: If you
-// have a TF in SW filled with a gradient and that TF has sub-frames, 
it inhertits
+// have a TF in SW filled with a gradient and that TF has sub-frames, 
it inherits
 // the gradient fill. Since you can freely move those sub-TFs even 
outside the
 // parent TF there has to be a way to not only paint gradients in ther 
definition
 // range (classical, all DrawObjects do that), but extended from that. 
This is