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

2023-06-28 Thread Noel Grandin (via logerrit)
 accessibility/source/standard/vclxaccessibletabpage.cxx |   24 ++--
 include/vcl/tabctrl.hxx |   12 --
 vcl/source/control/tabctrl.cxx  |   85 
 3 files changed, 12 insertions(+), 109 deletions(-)

New commits:
commit 160ea29f0003812ab1d4e1f6689c608c879ef509
Author: Noel Grandin 
AuthorDate: Wed Jun 28 14:55:32 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 29 08:36:11 2023 +0200

maLayoutLineToPageId and maLayoutPageIdToLine are dead.

I removed the code in ImplDrawItem that added data to them,
because ImplDrawItem was only ever called with bLayout with false,
and removing the bLayout param removed that code.
That removal happened in:

commit f0f973da8560e16cba85d2c9465c3a8c4c0ebbb3
Author: Noel Grandin 
Date:   Wed Mar 16 08:49:35 2016 +0200
loplugin:constantparams in vcl/

And that happened because
I noticed that ImplPaint was only ever called with bLayout==false,
which meant I removed that param and passed bLayout==false to
ImplDrawItem,
in:

commit 911ae0aeca443fb4b5e400ae0f939567b580e443
Author: Noel Grandin 
Date:   Fri Feb 26 09:36:26 2016 +0200
loplugin:unuseddefaultparams in /include/vcl

which was because the last call to ImplPaint with bLayout == true
was removed in:

commit a6b9d9a19fb8c5c9f166682f52941aee25b89c94
Author: Tomaž Vajngerl 
Date:   Wed May 6 13:00:13 2015 +0900
refactor "TabControl" to use RenderContext

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

diff --git a/accessibility/source/standard/vclxaccessibletabpage.cxx 
b/accessibility/source/standard/vclxaccessibletabpage.cxx
index 0dae45ca840c..89b0d6c29b2a 100644
--- a/accessibility/source/standard/vclxaccessibletabpage.cxx
+++ b/accessibility/source/standard/vclxaccessibletabpage.cxx
@@ -586,7 +586,7 @@ awt::Rectangle VCLXAccessibleTabPage::getCharacterBounds( 
sal_Int32 nIndex )
 if ( m_pTabControl )
 {
 tools::Rectangle aPageRect = m_pTabControl->GetTabBounds( m_nPageId );
-tools::Rectangle aCharRect = m_pTabControl->GetCharacterBounds( 
m_nPageId, nIndex );
+tools::Rectangle aCharRect; // m_pTabControl->GetCharacterBounds( 
m_nPageId, nIndex );
 aCharRect.Move( -aPageRect.Left(), -aPageRect.Top() );
 aBounds = AWTRectangle( aCharRect );
 }
@@ -595,21 +595,21 @@ awt::Rectangle VCLXAccessibleTabPage::getCharacterBounds( 
sal_Int32 nIndex )
 }
 
 
-sal_Int32 VCLXAccessibleTabPage::getIndexAtPoint( const awt::Point& aPoint )
+sal_Int32 VCLXAccessibleTabPage::getIndexAtPoint( const awt::Point& /*aPoint*/ 
)
 {
 OExternalLockGuard aGuard( this );
 
 sal_Int32 nIndex = -1;
-if ( m_pTabControl )
-{
-sal_uInt16 nPageId = 0;
-tools::Rectangle aPageRect = m_pTabControl->GetTabBounds( m_nPageId );
-Point aPnt( VCLPoint( aPoint ) );
-aPnt += aPageRect.TopLeft();
-sal_Int32 nI = m_pTabControl->GetIndexForPoint( aPnt, nPageId );
-if ( nI != -1 && m_nPageId == nPageId )
-nIndex = nI;
-}
+//if ( m_pTabControl )
+//{
+//sal_uInt16 nPageId = 0;
+//tools::Rectangle aPageRect = m_pTabControl->GetTabBounds( m_nPageId 
);
+//Point aPnt( VCLPoint( aPoint ) );
+//aPnt += aPageRect.TopLeft();
+//sal_Int32 nI = m_pTabControl->GetIndexForPoint( aPnt, nPageId );
+//if ( nI != -1 && m_nPageId == nPageId )
+//nIndex = nI;
+//}
 
 return nIndex;
 }
diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx
index 3da709d77807..f7db263d2eac 100644
--- a/include/vcl/tabctrl.hxx
+++ b/include/vcl/tabctrl.hxx
@@ -69,7 +69,6 @@ protected:
 SAL_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& 
rRenderContext, ImplTabItem const * pItem,
  const tools::Rectangle& rCurRect, 
bool bFirstInGroup,
  bool bLastInGroup);
-SAL_DLLPRIVATE void ImplFreeLayoutData();
 SAL_DLLPRIVATE bool ImplHandleKeyEvent( const KeyEvent& rKeyEvent 
);
 
 DECL_DLLPRIVATE_LINK( ImplListBoxSelectHdl, ListBox&, void );
@@ -78,7 +77,6 @@ protected:
 using Window::ImplInit;
 SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle 
);
 
-virtual voidFillLayoutData() const override;
 virtual const vcl::Font&GetCanonicalFont( const StyleSettings& _rStyle 
) const override;
 virtual const Color&GetCanonicalTextColor( const StyleSettings& 
_rStyle ) const override;
 virtual boolImplPlaceTabs( tools::Long nWidth );
@@ -154,16 +152,6 @@ public:
 voidSetActivatePageHdl( const Lin

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

2023-06-28 Thread Balazs Varga (via logerrit)
 sw/source/uibase/uiview/view2.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 0c12b34ac593ea5ac6615f844f709074ab1b6c1c
Author: Balazs Varga 
AuthorDate: Wed Jun 28 18:27:48 2023 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jun 29 08:19:34 2023 +0200

tdf#156031 - UX/A11Y: Clicking on a11y check status bar icon opening a11y

check sidebar deck.

Clicing on the a11y check status bar icon, the a11y check sidebar
deck will be opened.

Change-Id: Iee2e0e9345ed47dd971a9a61e55471d082d5461d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153723
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index ccc1a32dd4de..2903bbf19c03 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -2188,6 +2188,14 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
 }
 break;
 
+case FN_STAT_ACCESSIBILITY_CHECK:
+{
+const SfxStringItem sDeckName(SID_SIDEBAR_DECK, "A11yCheckDeck");
+GetViewFrame().GetDispatcher()->ExecuteList(SID_SIDEBAR_DECK, 
SfxCallMode::RECORD,
+{ &sDeckName });
+}
+break;
+
 case FN_STAT_BOOKMARK:
 if ( pArgs )
 {


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

2023-06-28 Thread Balazs Varga (via logerrit)
 sw/source/core/access/AccessibilityIssue.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit d17603b9ad8b82d98eb2bca0ec4dd9bac02b7766
Author: Balazs Varga 
AuthorDate: Tue Jun 27 13:35:14 2023 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jun 29 08:16:50 2023 +0200

tdf#156023 - A11Y: Add visual hints when fixing an accessibility check issue

Go to the issue object and select it, before fixing the issue.

Change-Id: I0217922c91045c288df7e48965be259e4d4f7ac0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153642
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sw/source/core/access/AccessibilityIssue.cxx 
b/sw/source/core/access/AccessibilityIssue.cxx
index d0366b1ef3e2..c7332f919cf5 100644
--- a/sw/source/core/access/AccessibilityIssue.cxx
+++ b/sw/source/core/access/AccessibilityIssue.cxx
@@ -131,6 +131,9 @@ void AccessibilityIssue::quickFixIssue() const
 if (!m_pDoc)
 return;
 
+if (m_eIssueObject != IssueObject::UNKNOWN)
+gotoIssue();
+
 switch (m_eIssueObject)
 {
 case IssueObject::GRAPHIC:


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

2023-06-28 Thread Laurent Balland (via logerrit)
 chart2/source/controller/dialogs/ObjectNameProvider.cxx |   48 +---
 1 file changed, 28 insertions(+), 20 deletions(-)

New commits:
commit 125b0f6609332523d30bef600979b698c2d216f8
Author: Laurent Balland 
AuthorDate: Tue Jun 27 21:23:19 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Thu Jun 29 08:02:02 2023 +0200

tdf#155526 Restore status bar for moving average

Previous commit dc03f59374d4fc74dd44ddedc903bb9c00a74bb7 broke text in
status bar when a moving average trend line is selected

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

diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx 
b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 41eae9e7f1a8..2097e43c2130 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -597,33 +597,41 @@ OUString ObjectNameProvider::getHelpText( 
std::u16string_view rObjectCID, const
 if ( !(xEqProp->getPropertyValue( "YName") >>= 
aYName) )
 aYName = "f(x)";
 }
-xCalculator->setRegressionProperties(aDegree, 
bForceIntercept, aInterceptValue, 2, aMovingType);
+xCalculator->setRegressionProperties(aDegree, 
bForceIntercept, aInterceptValue, aPeriod, aMovingType);
 xCalculator->setXYNames ( aXName, aYName );
 RegressionCurveHelper::initializeCurveCalculator( 
xCalculator, xSeries, xChartModel );
 
-// replace formula
-OUString aWildcard = "%FORMULA";
-sal_Int32 nIndex = aRet.indexOf( aWildcard );
-if( nIndex != -1 )
+// change text for Moving Average
+if ( RegressionCurveHelper::getRegressionType( xCurve 
) == SvxChartRegress::MovingAverage )
+{
+aRet = xCalculator->getRepresentation();
+}
+else
 {
-OUString aFormula ( 
xCalculator->getRepresentation() );
-if ( cDecSeparator != '.' )
+// replace formula
+OUString aWildcard = "%FORMULA";
+sal_Int32 nIndex = aRet.indexOf( aWildcard );
+if( nIndex != -1 )
 {
-aFormula = aFormula.replace( '.', 
cDecSeparator );
+OUString aFormula ( 
xCalculator->getRepresentation() );
+if ( cDecSeparator != '.' )
+{
+aFormula = aFormula.replace( '.', 
cDecSeparator );
+}
+aRet = aRet.replaceAt( nIndex, 
aWildcard.getLength(), aFormula );
 }
-aRet = aRet.replaceAt( nIndex, 
aWildcard.getLength(), aFormula );
-}
 
-// replace r^2
-aWildcard = "%RSQUARED";
-nIndex = aRet.indexOf( aWildcard );
-if( nIndex != -1 )
-{
-double fR( 
xCalculator->getCorrelationCoefficient());
-aRet = aRet.replaceAt(
-nIndex, aWildcard.getLength(),
-::rtl::math::doubleToUString(
-fR*fR, rtl_math_StringFormat_G, 4, 
cDecSeparator, true ));
+// replace r^2
+aWildcard = "%RSQUARED";
+nIndex = aRet.indexOf( aWildcard );
+if( nIndex != -1 )
+{
+double fR( 
xCalculator->getCorrelationCoefficient());
+aRet = aRet.replaceAt(
+nIndex, aWildcard.getLength(),
+::rtl::math::doubleToUString(
+fR*fR, rtl_math_StringFormat_G, 4, 
cDecSeparator, true ));
+}
 }
 }
 catch( const uno::Exception & )


Re: thesaurus.dic Workday 1, background

2023-06-28 Thread Alex

Hi
 
I have no affiliation with GSoc or any other code program
 
I am looking at the thesaurus files (as «I am not a coder»), with a view to 
providing an updated technical.dic thesaurus with many new terms and «a clear 
upgrade/merge/integrate path from an external data source» (wikipedia).
603 lines of references as opposed to the current 378 lines, each term 
(possibly) searchable directly on wikipedia .Then maybe I will see about 
concept/design to integrate (hypothetical) web search in xml  (help, thesaurus) 
interface. Right click on an item in help or Bayram Cicek’s search interface 
and you get an option to search the internet, or wikipedia article… (as 
concept).
 
Anyway, I deleted the two foreign language thesaurus files hu_AkH11.dic and 
sl.dic, looking at the bug reports mentioned below, but I quickly realized the 
dic files were needed when compiling. But blank placeholders (empty text files) 
are good too.
 
I have edited code references to remove hu_AkH11.dic, and it compiles OK 
without even a placeholder (empty) file.
Aside from Linguistic.backup..xcs, line 217, where else is hu_AkH11.dic 
referenced. I looked in the references below and I believe that it is bloat. I 
will try compiling HU language support if people think it is useful.
I would expect then that even with HU language and dictionary support 
installed, the (original) hu_AkH11.dic thesaurus will not exist or be called 
for. I don’t speak Hungarian though.
 
sl.dic is integrated to the unit test, I can see. Not touching it today. I will 
put the text back into the placeholder file for my next build.
 
«en_US or other language builds get these files unnecessarily, the only task is 
fixing our packaging.»   OK, how can I help with packaging?
 
Laszlo do you have a local repo for your lo code, the en_US spelling 
dictionary? Your language code is different to this specific technical.dic 
thesaurus, yes?
 
Thanks
 
Alex Tao
Tao Submarines and Systems
Chios, Aegean Sea
 
>Thursday, June 29, 2023 1:44 AM +03:00 from Németh László < 
>nem...@numbertext.org >:
> 
>Hi,  
>Andras Timar < tima...@gmail.com > ezt írta (időpont: 2023. jún. 28., Sze, 
>17:55):
>>Hi Alex,  
>>On Wed, Jun 28, 2023 at 5:15PM Alex < taosubmari...@mail.ru > wrote:
>>>Hi everyone
>>> 
>>>Today I try to determine how to remove two unwanted wordbook files from 
>>>libreoffice/extras/source/wordbook:
>>>hu_AkH11.dic and sl.dic.
>>>These foreign language (incomplete) dics should be removed, unless they are 
>>>used in some unit test.
>>>Bug 139961, 68576 etc
>>> 
>>>Can be removed? OK?
>>> 
>> 
>>I'm not sure, if it's OK. We added these dictionaries for a reason. It's 
>>better to ask the maintainers first (I CC-ed them).
>>From the technical point of view, if you remove the files from source, and 
>>all references to them, the build should pass. Maybe you need a clean build 
>>from scratch. Use "git grep  sl.dic" and "git grep  hu_AkH11.dic" commands, 
>>they are more reliable than opengrok.
> 
>You can remove hu_AkH11.dic with the following git command:
> 
>$ git revert 6247c966942a0e43320a234302a67c1f92c2eea7
> 
> Because this was added with that commit:
>  $ git log libreoffice/extras/source/wordbook/hu_AkH11.dic
>commit 6247c966942a0e43320a234302a67c1f92c2eea7
> 
>But these are not unwanted dictionaries, as András wrote.
> 
>In theory, they are packaged only with their language builds, sl-SI and hu-HU. 
>If not, i.e. en_US or other language builds get these files unnecessarily, the 
>only task is fixing our packaging. If the packaging problem is related to some 
>Linux distributions, I believe, our task is only to report that in their bug 
>trackers.
> 
>Is this a GSoC project? I haven't found information about the planned 
>improvement of the (en_US?) thesaurus or the thesaurus code base.
>(By the way, I had an interesting improvement here: English stemming and 
>affixation during thesaurus usage by adding extra language data to the en_US 
>spelling dictionary. Unfortunately, by accident this was removed by the recent 
>maintainer.)
> 
>Best regards,
>László
> 
> 
>> 
>>Best regards,
>>Andras
>> 
>> 
 

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

2023-06-28 Thread Seth Chaiklin (via logerrit)
 source/text/swriter/01/0211.xhp|   20 ++--
 source/text/swriter/guide/arrange_chapters.xhp |8 
 2 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 6bba9672d36c691c779ce6d40bbf816e661ec882
Author: Seth Chaiklin 
AuthorDate: Tue Jun 27 12:42:08 2023 +0200
Commit: Olivier Hallot 
CommitDate: Thu Jun 29 06:18:26 2023 +0200

related tdf#153721 new command names: move/delete "chapter" -> "heading"

Change-Id: I7415fec49fec0319583a5f87e44e7bd3ee96ef4a
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153656
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/swriter/01/0211.xhp 
b/source/text/swriter/01/0211.xhp
index 26fcf8c2b1..c4e95a68ec 100644
--- a/source/text/swriter/01/0211.xhp
+++ b/source/text/swriter/01/0211.xhp
@@ -260,32 +260,32 @@
 
 
 
-Move Chapter 
Up
+Move Heading 
Up
 Moves the selected heading, 
and the text below the heading, up one heading position in the Navigator and in 
the document. To move only the selected heading and not the text associated 
with the heading, hold down CommandCtrl,
 and then click this icon.
 
 
   
 
-   Icon Move Chapter Up
+   Icon Move Heading Up
 
 
-  Move Chapter 
Up
+  Move Heading 
Up
 
   
 
 
 
 
-Move Chapter 
Down
+Move Heading 
Down
 Moves the selected heading, 
and the text below the heading, down one heading position in the Navigator and 
in the document. To move only the selected heading and not the text associated 
with the heading, hold down CommandCtrl,
 and then click this icon.
 
 
   
 
-   Icon Move Chapter Down
+   Icon Move Heading Down
 
 
-  Move Chapter 
Down
+  Move Heading 
Down
 
   
 
@@ -336,14 +336,14 @@
 
 
 Copy
-Copies the heading and 
all contents that belongs to the chapter, including level-less contents and 
headings with levels above the copied heading level. Sibling headings, with 
same heading level, are not copied. You can paste the contents in another place 
in the document.
+Copies the heading and 
the contents that follow the heading until the next heading with the same 
outline level. These contents include paragraphs with outline level “None” and 
headings with an outline level greater than the copied heading. You can paste 
the contents in another place in the document.
 
-Delete 
Chapter
-Deletes the heading and 
all contents that belongs to the chapter, including level-less contents and 
headings with levels above the deleted heading level. Sibling headings, with 
same heading level, are not deleted.
+Delete 
Heading
+Deletes the heading and 
the contents that follow the heading until the next heading with the same 
outline level. These contents include paragraphs with outline level “None” and 
headings with an outline level greater than the deleted heading.
 
 
 Select
-Selects the heading and 
all contents that belongs to the chapter, including level-less contents and 
headings with levels above the selected heading level. Sibling headings, with 
same heading level, are not selected.
+Selects the heading and 
the contents that follow the heading until the next heading with the same 
outline level. These contents include paragraphs with outline level “None” and 
headings with an outline level greater than the selected heading.
 
 Display
 Select the document that you 
want to view.
diff --git a/source/text/swriter/guide/arrange_chapters.xhp 
b/source/text/swriter/guide/arrange_chapters.xhp
index 8bdf7baf37..53b2d3efb0 100644
--- a/source/text/swriter/guide/arrange_chapters.xhp
+++ b/source/text/swriter/guide/arrange_chapters.xhp
@@ -33,9 +33,9 @@
 moving;headings
 demoting outline levels
 promoting outline levels
-Navigator;outline levels and chapters
+Navigator;outline levels and headings
 arranging;headings
-outlines;arranging chapters
+outlines;arranging headings
 
 
 Arranging Headings in the 
Navigator 
@@ -63,10 +63,10 @@
 Drag a 
heading to a new location in the Navigator list.
   
   
-Click a 
heading in the Navigator list, and then click the Move 
Chapter Up Icon 
promote or Move Chapter Down icon Icon demote.
+Click a 
heading in the Navigator list, and then click the Move 
Heading Up Icon 
promote or Move Heading Down icon Icon demote.
   
 
-To move the heading without the subordinate text, 
hold down CommandCtrl
 while you drag or click the Move Chapter Up or 
Move Chapter Down icons.
+To move the heading without the subordinate text, 
hold down CommandCtrl
 while you drag or click the Move Heading Up or 
Move Heading Down icons.
 
 To Promote or Demote the Outline Level of a Heading
 


[Libreoffice-commits] core.git: helpcontent2

2023-06-28 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c2018d21b64ef47ab10228915b8fdd52b36c75bc
Author: Seth Chaiklin 
AuthorDate: Thu Jun 29 06:18:27 2023 +0200
Commit: Gerrit Code Review 
CommitDate: Thu Jun 29 06:18:27 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 6bba9672d36c691c779ce6d40bbf816e661ec882
  - related tdf#153721 new command names: move/delete "chapter" -> "heading"

Change-Id: I7415fec49fec0319583a5f87e44e7bd3ee96ef4a
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153656
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 114401853f33..6bba9672d36c 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 114401853f335d1e85edee8229c4450c575f1f0c
+Subproject commit 6bba9672d36c691c779ce6d40bbf816e661ec882


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

2023-06-28 Thread Tomaž Vajngerl (via logerrit)
 sc/CppunitTest_sc_theme_import_export_test.mk|2 
 sc/qa/unit/ThemeImportExportTest.cxx |   56 
+++---
 sc/qa/unit/data/xlsx/Test_ThemeColor_Text_Background_Border.xlsx |binary
 3 files changed, 45 insertions(+), 13 deletions(-)

New commits:
commit e836e69eb6f2f01a475c5679fb338dda7936643f
Author: Tomaž Vajngerl 
AuthorDate: Fri Jun 23 21:57:14 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Jun 29 04:57:45 2023 +0200

sc: Add import tests for text, background, border theme colors

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

diff --git a/sc/CppunitTest_sc_theme_import_export_test.mk 
b/sc/CppunitTest_sc_theme_import_export_test.mk
index 52f9736e36b9..22b0a2eea6a2 100644
--- a/sc/CppunitTest_sc_theme_import_export_test.mk
+++ b/sc/CppunitTest_sc_theme_import_export_test.mk
@@ -25,6 +25,7 @@ $(eval $(call 
gb_CppunitTest_use_externals,sc_theme_import_export_test, \
 
 $(eval $(call gb_CppunitTest_use_libraries,sc_theme_import_export_test, \
 basegfx \
+docmodel \
 comphelper \
 cppu \
 cppuhelper \
@@ -34,6 +35,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,sc_theme_import_export_test, \
 sc \
 scqahelper \
 sfx \
+svl \
 subsequenttest \
 test \
 tl \
diff --git a/sc/qa/unit/ThemeImportExportTest.cxx 
b/sc/qa/unit/ThemeImportExportTest.cxx
index ae1653837f36..45d29bf7a088 100644
--- a/sc/qa/unit/ThemeImportExportTest.cxx
+++ b/sc/qa/unit/ThemeImportExportTest.cxx
@@ -7,30 +7,24 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
+#include "helper/qahelper.hxx"
 
-#include 
-#include 
 #include 
+#include 
+#include 
 
 using namespace css;
 
-class ThemeImportExportTest : public UnoApiXmlTest
+class ThemeImportExportTest : public ScModelTestBase
 {
 public:
 ThemeImportExportTest()
-: UnoApiXmlTest("sc/qa/unit/data")
+: ScModelTestBase("sc/qa/unit/data")
 {
 }
-
-void test();
-
-CPPUNIT_TEST_SUITE(ThemeImportExportTest);
-CPPUNIT_TEST(test);
-CPPUNIT_TEST_SUITE_END();
 };
 
-void ThemeImportExportTest::test()
+CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testThemeExport)
 {
 loadFromURL(u"xlsx/CalcThemeTest.xlsx");
 
@@ -64,7 +58,43 @@ void ThemeImportExportTest::test()
 assertXPath(pXmlDoc, 
"/x:styleSheet/x:fills/x:fill[4]/x:patternFill/x:fgColor", "theme", "4");
 }
 
-CPPUNIT_TEST_SUITE_REGISTRATION(ThemeImportExportTest);
+CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellBackgroundThemeColor)
+{
+loadFromURL(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx");
+
+ScDocument* pDoc = getScDoc();
+
+{
+const ScPatternAttr* pPattern = pDoc->GetPattern(0, 0, 0);
+const SfxPoolItem* pItem = nullptr;
+pPattern->GetItemSet().HasItem(ATTR_BACKGROUND, &pItem);
+CPPUNIT_ASSERT(pItem);
+
+auto* pBrushItem = static_cast(pItem);
+CPPUNIT_ASSERT_EQUAL(Color(0x27ced7), pBrushItem->GetColor());
+auto aComplexColor = pBrushItem->getComplexColor();
+CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent3, 
aComplexColor.getSchemeType());
+CPPUNIT_ASSERT_EQUAL(size_t(0), 
aComplexColor.getTransformations().size());
+}
+
+{
+const ScPatternAttr* pPattern = pDoc->GetPattern(0, 1, 0);
+const SfxPoolItem* pItem = nullptr;
+pPattern->GetItemSet().HasItem(ATTR_BACKGROUND, &pItem);
+CPPUNIT_ASSERT(pItem);
+
+auto* pBrushItem = static_cast(pItem);
+CPPUNIT_ASSERT_EQUAL(Color(0xd4f5f7), pBrushItem->GetColor());
+auto aComplexColor = pBrushItem->getComplexColor();
+CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent3, 
aComplexColor.getSchemeType());
+auto& rTransformations = aComplexColor.getTransformations();
+CPPUNIT_ASSERT_EQUAL(size_t(2), rTransformations.size());
+CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTransformations[0].meType);
+CPPUNIT_ASSERT_EQUAL(sal_Int16(2000), rTransformations[0].mnValue);
+CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff, 
rTransformations[1].meType);
+CPPUNIT_ASSERT_EQUAL(sal_Int16(7999), rTransformations[1].mnValue);
+}
+}
 
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sc/qa/unit/data/xlsx/Test_ThemeColor_Text_Background_Border.xlsx 
b/sc/qa/unit/data/xlsx/Test_ThemeColor_Text_Background_Border.xlsx
new file mode 100644
index ..339d7539ecfb
Binary files /dev/null and 
b/sc/qa/unit/data/xlsx/Test_ThemeColor_Text_Background_Border.xlsx differ


[Libreoffice-commits] core.git: 2 commits - include/docmodel oox/source sc/inc sc/Library_scqahelper.mk sc/qa sc/source

2023-06-28 Thread Tomaž Vajngerl (via logerrit)
 include/docmodel/color/ComplexColor.hxx |   14 +--
 oox/source/drawingml/color.cxx  |   33 ++---
 sc/Library_scqahelper.mk|1 
 sc/inc/patattr.hxx  |   13 ---
 sc/qa/unit/helper/qahelper.cxx  |   12 +++---
 sc/source/core/data/patattr.cxx |   33 -
 sc/source/filter/excel/excrecds.cxx |2 -
 sc/source/filter/excel/xechart.cxx  |   24 ++---
 sc/source/filter/excel/xecontent.cxx|8 ++--
 sc/source/filter/excel/xehelper.cxx |   26 +++---
 sc/source/filter/excel/xestream.cxx |9 +++-
 sc/source/filter/excel/xestyle.cxx  |   45 
 sc/source/filter/excel/xichart.cxx  |   25 -
 sc/source/filter/excel/xistyle.cxx  |6 +--
 sc/source/filter/excel/xlchart.cxx  |4 +-
 sc/source/filter/excel/xlstyle.cxx  |   59 +---
 sc/source/filter/inc/xechart.hxx|9 ++--
 sc/source/filter/inc/xestyle.hxx|4 +-
 sc/source/filter/inc/xlchart.hxx|6 ++-
 sc/source/filter/inc/xlstyle.hxx|   14 ---
 20 files changed, 193 insertions(+), 154 deletions(-)

New commits:
commit 7501f8928264c48c88ab6ee6b757b295b13b63d4
Author: Tomaž Vajngerl 
AuthorDate: Fri May 19 23:01:58 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Jun 29 04:57:36 2023 +0200

sc: use ComplexColor for font color (+others) in OOXML export

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

diff --git a/include/docmodel/color/ComplexColor.hxx 
b/include/docmodel/color/ComplexColor.hxx
index 19e228b2a858..4952d91ac217 100644
--- a/include/docmodel/color/ComplexColor.hxx
+++ b/include/docmodel/color/ComplexColor.hxx
@@ -133,13 +133,19 @@ public:
 meType = ColorType::CRGB;
 }
 
+void setColor(Color const& rColor)
+{
+mnComponent1 = rColor.GetRed();
+mnComponent2 = rColor.GetGreen();
+mnComponent3 = rColor.GetBlue();
+maFinalColor = rColor;
+meType = ColorType::RGB;
+}
+
 void setRGB(sal_Int32 nRGB)
 {
 ::Color aColor(ColorTransparency, nRGB);
-mnComponent1 = aColor.GetRed();
-mnComponent2 = aColor.GetGreen();
-mnComponent3 = aColor.GetBlue();
-meType = ColorType::RGB;
+setColor(aColor);
 }
 
 void setHSL(sal_Int32 nH, sal_Int32 nS, sal_Int32 nL)
diff --git a/sc/Library_scqahelper.mk b/sc/Library_scqahelper.mk
index a4a6814203bd..6e8c9eca7327 100644
--- a/sc/Library_scqahelper.mk
+++ b/sc/Library_scqahelper.mk
@@ -45,6 +45,7 @@ $(eval $(call gb_Library_use_libraries,scqahelper,\
comphelper \
cppu \
cppuhelper \
+   docmodel \
editeng \
for \
sal \
diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx
index 1df3a31d6fac..cc37c335cfc0 100644
--- a/sc/inc/patattr.hxx
+++ b/sc/inc/patattr.hxx
@@ -30,6 +30,7 @@
 #include "fonthelper.hxx"
 
 namespace vcl { class Font; }
+namespace model { class ComplexColor; }
 class OutputDevice;
 class Fraction;
 class ScStyleSheet;
@@ -107,19 +108,23 @@ public:
 SvtScriptType nScript = 
SvtScriptType::NONE, const Color* pBackConfigColor = nullptr,
 const Color* pTextConfigColor = 
nullptr);
 
-static void fillColor(Color& rColor, const SfxItemSet& rItemSet, 
ScAutoFontColorMode eAutoMode, const SfxItemSet* pCondSet = nullptr,
-const Color* pBackConfigColor = nullptr, const 
Color* pTextConfigColor = nullptr);
+static void fillColor(model::ComplexColor& rComplexColor,
+const SfxItemSet& rItemSet,
+ScAutoFontColorMode eAutoMode,
+const SfxItemSet* pCondSet = nullptr,
+const Color* pBackConfigColor = nullptr,
+const Color* pTextConfigColor = nullptr);
 
 
 static ScDxfFontGetDxfFont(const SfxItemSet& rSet, SvtScriptType 
nScript);
 
-void fillColor(Color& rColor,
+void fillColor(model::ComplexColor& rComplexColor,
 ScAutoFontColorMode eAutoMode,
 const SfxItemSet* pCondSet = nullptr,
 const Color* pBackConfigColor = nullptr,
 const Color* pTextConfigColor = nullptr) const
 {
-fillColor(rColor, GetItemSet(), eAutoMode, pCondSet, pBackConfigColor, 
pTextConfigColor);
+fillColor(rComplexColor, GetItemSet(), eAutoMode, pCondSet, 
pBackConfigColor, pTextConfigColor);
 }
 
 void fillFontOnly(vcl::Font& rFont,
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index eff2c62d9aeb..23ddf5271fc4 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/q

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

2023-06-28 Thread luigiiucci (via logerrit)
 sc/qa/unit/helper/qahelper.cxx   |   38 ++
 sc/source/core/data/dpoutput.cxx |6 +-
 2 files changed, 43 insertions(+), 1 deletion(-)

New commits:
commit 021712f9500910c3433360ec54d35f3564f540ce
Author: luigiiucci 
AuthorDate: Wed May 17 11:02:37 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Thu Jun 29 04:52:40 2023 +0200

Header columns can disappear with filtered data in pivot tables

When we set on a pivot table a filter that filters all the rows,
the pivot table showed only the first header columns and computed
column, but all the columns headers should still be shown so we can
adjust the filter for the column. This fixes this issue.

Also add more debug output and prevent a crash when running pivot
table tests.

Change-Id: I30b4ee72cf8436c4522ab4ba0781462b214816dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151871
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 3551d18404cb19cdaa8edb170a549f5c5405d0cb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153686
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index f9c7af04a813..d21571def5a3 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -404,6 +405,43 @@ bool checkOutput(
 svl::GridPrinter printer(e.Row() - s.Row() + 1, e.Col() - s.Col() + 1, 
CALC_DEBUG_OUTPUT != 0);
 SCROW nOutRowSize = e.Row() - s.Row() + 1;
 SCCOL nOutColSize = e.Col() - s.Col() + 1;
+
+// Check if expected size iz smaller than actual size (and prevent a crash)
+if (aCheck.size() < o3tl::make_unsigned(nOutRowSize) || aCheck[0].size() < 
o3tl::make_unsigned(nOutColSize))
+{
+// Dump the arrays to console, so we can compare
+std::cout << "Expected data:" << std::endl;
+for (size_t nRow = 0; nRow < aCheck.size(); ++nRow)
+{
+for (size_t nCol = 0; nCol < aCheck[nRow].size(); ++nCol)
+{
+const char* p = aCheck[nRow][nCol];
+if (p)
+{
+OUString aCheckVal = OUString::createFromAscii(p);
+std::cout << "'" << aCheckVal << "', ";
+}
+else
+std::cout << "null, ";
+}
+std::cout << std::endl;
+}
+
+std::cout << "Actual data:" << std::endl;
+for (SCROW nRow = 0; nRow < nOutRowSize; ++nRow)
+{
+for (SCCOL nCol = 0; nCol < nOutColSize; ++nCol)
+{
+OUString aVal = pDoc->GetString(nCol + s.Col(), nRow + 
s.Row(), s.Tab());
+std::cout << "'" << aVal << "', ";
+}
+std::cout << std::endl;
+}
+std::cout << std::endl;
+
+return false;
+}
+
 for (SCROW nRow = 0; nRow < nOutRowSize; ++nRow)
 {
 for (SCCOL nCol = 0; nCol < nOutColSize; ++nCol)
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 301e2c83ba4f..ff4335a81420 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -608,7 +608,11 @@ ScDPOutput::ScDPOutput( ScDocument* pD, 
uno::Reference 
aResult = xLevRes->getResults();
 ++nRowDims;
-if (!lcl_MemberEmpty(aResult))
+// We want only to remove the DATA 
column if it is empty
+// and not any other empty columns (to 
still show the
+// header columns)
+bool bSkip = lcl_MemberEmpty(aResult) 
&& bIsDataLayout;
+if (!bSkip)
 {
 bool bFieldCompact = false;
 try


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

2023-06-28 Thread Henry Castro (via logerrit)
 sc/source/filter/inc/condformatbuffer.hxx |2 ++
 sc/source/filter/oox/condformatbuffer.cxx |5 +
 sc/source/filter/oox/extlstcontext.cxx|2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit cffbf2f559cc2092de67b6c25b6ff8c01f863acf
Author: Henry Castro 
AuthorDate: Mon Jun 26 10:43:34 2023 -0400
Commit: Henry Castro 
CommitDate: Thu Jun 29 04:14:07 2023 +0200

sc: filter: oox: fix crash delete ScDatabarFormatData

Unfortunately, the instance of "ScDatabarFormatData" is
deleted before finalizeImport is called.

The "maEntries" is not usable, the global format buffer is
required to hold the reference.

 #1 0x7f2ef19081c0 in oox::xls::CondFormatBuffer::finalizeImport() 
co-23.05-asan/sc/source/filter/oox/condformatbuffer.cxx:1322:23
#2 0x7f2ef1ba in 
oox::xls::WorksheetGlobals::finalizeWorksheetImport() 
co-23.05-asan/sc/source/filter/oox/worksheethelper.cxx:942:22
#3 0x7f2ef58d030e in 
sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource
 const&) co-23.05-asan/sax/source/fastparser/fastparser.cxx:910:36
#4 0x7f2ef23f0e46 in 
oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource 
const&, bool) co-23.05-asan/oox/source/core/fastparser.cxx:121:15
#5 0x7f2ef23f1544 in

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

diff --git a/sc/source/filter/inc/condformatbuffer.hxx 
b/sc/source/filter/inc/condformatbuffer.hxx
index dfb665befe39..acd6f1b398b8 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -307,6 +307,7 @@ public:
 CondFormatRef   importCondFormatting( SequenceInputStream& rStrm );
 ExtCfDataBarRuleRef createExtCfDataBarRule(ScDataBarFormatData* pTarget);
 std::vector< std::unique_ptr >& importExtCondFormat();
+std::vector >& importExtFormatEntries();
 
 /** Converts an OOXML condition operator token to the API constant. */
 static sal_Int32convertToApiOperator( sal_Int32 nToken );
@@ -324,6 +325,7 @@ private:
 CondFormatVec   maCondFormats;  /// All conditional formatting in 
a sheet.
 ExtCfDataBarRuleVecmaCfRules;  /// All external 
conditional formatting rules in a sheet.
 std::vector< std::unique_ptr > maExtCondFormats;
+std::vector > maExtFormatEntries;
 sal_Int32 mnNonPrioritizedRuleNextPriority = 1048576;
 };
 
diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index e8535c78755d..5e64e75b3899 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -1353,6 +1353,11 @@ std::vector< std::unique_ptr >& 
CondFormatBuffer::importExtCond
 return maExtCondFormats;
 }
 
+std::vector >& 
CondFormatBuffer::importExtFormatEntries()
+{
+return maExtFormatEntries;
+}
+
 sal_Int32 CondFormatBuffer::convertToApiOperator( sal_Int32 nToken )
 {
 switch( nToken )
diff --git a/sc/source/filter/oox/extlstcontext.cxx 
b/sc/source/filter/oox/extlstcontext.cxx
index 945e6dbfd988..e12ac00938b7 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -174,7 +174,7 @@ ContextHandlerRef 
ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl
 {
 auto pFormat = 
std::make_unique(&getScDocument());
 pFormat->SetDataBarData(pInfo);
-maEntries.push_back(std::move(pFormat));
+
getCondFormats().importExtFormatEntries().push_back(std::move(pFormat));
 }
 }
 else


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

2023-06-28 Thread Henry Castro (via logerrit)
 sc/qa/unit/data/xls/cell-multi-line.xls   |binary
 sc/qa/unit/data/xlsx/cell-multi-line.xlsx |binary
 sc/qa/unit/subsequent_filters_test2.cxx   |   33 ++
 3 files changed, 33 insertions(+)

New commits:
commit 5af4b57ddcfb77ebdb191d6f4766c1198ce85e0f
Author: Henry Castro 
AuthorDate: Tue Feb 28 09:57:07 2023 -0400
Commit: Henry Castro 
CommitDate: Thu Jun 29 04:13:41 2023 +0200

sc: qa: filter: add import excel unit test

single line.

Change-Id: I2d76f54e0ccf943794bd817b2e80583b8dd69558
Signed-off-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148005
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153473
Tested-by: Jenkins
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153490

diff --git a/sc/qa/unit/data/xls/cell-multi-line.xls 
b/sc/qa/unit/data/xls/cell-multi-line.xls
new file mode 100644
index ..8ed0aded3243
Binary files /dev/null and b/sc/qa/unit/data/xls/cell-multi-line.xls differ
diff --git a/sc/qa/unit/data/xlsx/cell-multi-line.xlsx 
b/sc/qa/unit/data/xlsx/cell-multi-line.xlsx
new file mode 100644
index ..ecaf8124c86b
Binary files /dev/null and b/sc/qa/unit/data/xlsx/cell-multi-line.xlsx differ
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index a00558730d0b..a0a4a92d299b 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -1580,6 +1580,39 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest2, testNamedTableRef)
 }
 }
 
+namespace
+{
+void testCells(ScDocument* pDoc)
+{
+{
+const EditTextObject* pObj = pDoc->GetEditText(ScAddress(0, 0, 0));
+CPPUNIT_ASSERT(pObj);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pObj->GetParagraphCount());
+CPPUNIT_ASSERT_EQUAL(size_t(1), pObj->GetSharedStrings().size());
+}
+
+{
+const EditTextObject* pObj = pDoc->GetEditText(ScAddress(0, 1, 0));
+CPPUNIT_ASSERT(pObj);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pObj->GetParagraphCount());
+CPPUNIT_ASSERT_EQUAL(size_t(3), pObj->GetSharedStrings().size());
+}
+}
+}
+
+CPPUNIT_TEST_FIXTURE(ScFiltersTest2, testSingleLine)
+{
+createScDoc("xls/cell-multi-line.xls");
+ScDocument* pDoc = getScDoc();
+CPPUNIT_ASSERT(pDoc);
+testCells(pDoc);
+
+createScDoc("xlsx/cell-multi-line.xlsx");
+pDoc = getScDoc();
+CPPUNIT_ASSERT(pDoc);
+testCells(pDoc);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2023-06-28 Thread Mike Kaganski (via logerrit)
 sw/source/core/text/itrpaint.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e24a3a3c339d7a175ebfeef31a280becda9d5950
Author: Mike Kaganski 
AuthorDate: Wed Jun 28 18:54:43 2023 +0300
Commit: Justin Luth 
CommitDate: Wed Jun 28 23:02:48 2023 +0200

tdf#156078: Use TabOverSpacing compat option instead of TabOverflow

As Justin Luth noted, "TabOverflow is basically always true", and
using it basically equal to making the test always true. On the
other hand, TabOverSpacing is accurate for the task.

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

diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 9c6dc347a47c..a189e5abf25b 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -167,8 +167,8 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, 
SwSaveClip &rClip,
 //compatibility settings: allow tabstop text to exceed right margin
 const auto& iDSA = 
GetInfo().GetTextFrame()->GetDoc().getIDocumentSettingAccess();
 const bool bTabOverMargin = iDSA.get(DocumentSettingId::TAB_OVER_MARGIN);
-const bool bTabOverflow = iDSA.get(DocumentSettingId::TAB_OVERFLOW);
-if (bTabOverMargin || bTabOverflow)
+const bool bTabOverSpacing = iDSA.get(DocumentSettingId::TAB_OVER_SPACING);
+if (bTabOverMargin || bTabOverSpacing)
 {
 SwLinePortion* pPorIter = pPor;
 while( pPorIter )


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

2023-06-28 Thread Justin Luth (via logerrit)
 sfx2/source/doc/objserv.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 73ac60c4c3a209d23642ac4d0e8c4ac6dba22d86
Author: Justin Luth 
AuthorDate: Wed Jun 28 14:18:53 2023 -0400
Commit: Justin Luth 
CommitDate: Wed Jun 28 22:53:43 2023 +0200

tdf#148416 saveas: preserve loadreadonly with password

If a document is set to load readonly,
and that setting is password protected,
then at least suggest using a password on save-as.

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

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index f321cbfc74a7..caa1b800f41e 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1027,7 +1027,10 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
 
 const SfxStringItem* pOldPasswordItem = 
SfxItemSet::GetItem(GetMedium()->GetItemSet(), SID_PASSWORD, 
false);
 const SfxUnoAnyItem* pOldEncryptionDataItem = 
SfxItemSet::GetItem(GetMedium()->GetItemSet(), 
SID_ENCRYPTIONDATA, false);
-const bool bPreselectPassword = pOldPasswordItem || 
pOldEncryptionDataItem;
+const bool bPreselectPassword
+= pOldPasswordItem || pOldEncryptionDataItem
+  || (IsLoadReadonly()
+  && (GetModifyPasswordHash() || 
GetModifyPasswordInfo().hasElements()));
 
 uno::Sequence< beans::PropertyValue > aDispatchArgs;
 if ( rReq.GetArgs() )


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

2023-06-28 Thread Justin Luth (via logerrit)
 cui/source/dialogs/passwdomdlg.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit 49e34144a8148bf3c77bcfd70bf6c628dcefeedd
Author: Justin Luth 
AuthorDate: Fri Nov 25 15:51:34 2022 -0500
Commit: Justin Luth 
CommitDate: Wed Jun 28 22:53:14 2023 +0200

tdf#148416 password dialog: suggest current loadreadonly status

If a document is set to load readonly,
and the user saves with a password,
then suggest LoadReadOnly status
by pre-populating and displaying the checkbox for that setting

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

diff --git a/cui/source/dialogs/passwdomdlg.cxx 
b/cui/source/dialogs/passwdomdlg.cxx
index 579af0edc9aa..e4981f442fbf 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -133,6 +134,14 @@ 
PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(weld::Window * pParent, s
 m_xOptionsExpander->set_sensitive(bIsPasswordToModify);
 if (!bIsPasswordToModify)
 m_xOptionsExpander->hide();
+else if (SfxObjectShell* pSh = SfxObjectShell::Current())
+{
+if (pSh->IsLoadReadonly())
+{
+m_xOpenReadonlyCB->set_active(true);
+m_xOptionsExpander->set_expanded(true);
+}
+}
 
 m_xOpenReadonlyCB->connect_toggled(LINK(this, PasswordToOpenModifyDialog, 
ReadonlyOnOffHdl));
 ReadonlyOnOffHdl(*m_xOpenReadonlyCB);


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

2023-06-28 Thread Regina Henschel (via logerrit)
 cui/source/tabpages/tparea.cxx   |2 +
 cui/source/tabpages/tpgradnt.cxx |   42 +--
 2 files changed, 29 insertions(+), 15 deletions(-)

New commits:
commit 48a9ade1dacc63e61cc9a5748f29119d1d01d841
Author: Regina Henschel 
AuthorDate: Wed Jun 21 23:04:52 2023 +0200
Commit: Regina Henschel 
CommitDate: Wed Jun 28 22:48:47 2023 +0200

tdf#107787 Sync FillGradientStepCount and StepCount

The FillGradientStepCount property of a shape or page background and
the StepCount member of the Gradient2 API struct or nStepCount member
of the basegfx::BGradient class are used parallel and mixed. Therefore
we need to be careful to keep the values in sync as far as possible.

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

diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index bbdb9733a02f..d1ece1c0e4d4 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -194,6 +195,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
 case drawing::FillStyle_GRADIENT:
 {
 m_rXFSet.Put( rSet.Get( GetWhich( XATTR_FILLGRADIENT ) ) );
+m_rXFSet.Put(rSet.Get(GetWhich(XATTR_GRADIENTSTEPCOUNT)));
 SelectFillType(*m_xBtnGradient);
 break;
 }
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 37c56da9aefc..df629a154ff4 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -37,8 +37,6 @@
 #include 
 #include 
 
-#define DEFAULT_GRADIENTSTEP 64
-
 using namespace com::sun::star;
 
 SvxGradientTabPage::SvxGradientTabPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rInAttrs)
@@ -186,10 +184,17 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
 {
 std::unique_ptr pBGradient;
 size_t nPos = m_xGradientLB->IsNoSelection() ? VALUESET_ITEM_NOTFOUND : 
m_xGradientLB->GetSelectItemPos();
+
+sal_uInt16 nValue = 0; // automatic step count
+if (!m_xCbIncrement->get_active())
+nValue = m_xMtrIncrement->get_value();
+
 if( nPos != VALUESET_ITEM_NOTFOUND )
 {
 pBGradient.reset(new basegfx::BGradient( m_pGradientList->GetGradient( 
static_cast(nPos) )->GetGradient() ));
 OUString aString = m_xGradientLB->GetItemText( 
m_xGradientLB->GetSelectedItemId() );
+// update StepCount to current value to be in sync with 
FillGradientStepCount
+pBGradient->SetSteps(nValue);
 rSet->Put( XFillGradientItem( aString, *pBGradient ) );
 }
 else
@@ -204,14 +209,10 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
 
static_cast(m_xMtrBorder->get_value(FieldUnit::NONE)),
 
static_cast(m_xMtrColorFrom->get_value(FieldUnit::NONE)),
 
static_cast(m_xMtrColorTo->get_value(FieldUnit::NONE)),
-static_cast(m_xMtrIncrement->get_value()) ));
+nValue));
 rSet->Put( XFillGradientItem( OUString(), *pBGradient ) );
 }
 
-sal_uInt16 nValue = 0;
-if (!m_xCbIncrement->get_active())
-nValue = m_xMtrIncrement->get_value();
-
 assert( pBGradient && "basegfx::BGradient could not be created" );
 rSet->Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) );
 rSet->Put( XGradientStepCountItem( nValue ) );
@@ -220,8 +221,7 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
 
 void SvxGradientTabPage::Reset( const SfxItemSet* )
 {
-m_xMtrIncrement->set_value(DEFAULT_GRADIENTSTEP);
-ChangeGradientHdl_Impl();
+ChangeGradientHdl_Impl(); // includes setting m_xCbIncrement and 
m_xMtrIncrement
 
 // determine state of the buttons
 if( m_pGradientList->Count() )
@@ -293,6 +293,10 @@ void SvxGradientTabPage::ModifiedHdl_Impl( void const * 
pControl )
 
 css::awt::GradientStyle eXGS = 
static_cast(m_xLbGradientType->get_active());
 
+sal_uInt16 nValue = 0; // automatic
+if (!m_xCbIncrement->get_active())
+nValue = static_cast(m_xMtrIncrement->get_value());
+
 basegfx::BGradient aBGradient(
   createColorStops(),
   eXGS,
@@ -302,15 +306,12 @@ void SvxGradientTabPage::ModifiedHdl_Impl( void const * 
pControl )
   
static_cast(m_xMtrBorder->get_value(FieldUnit::NONE)),
   
static_cast(m_xMtrColorFrom->get_value(FieldUnit::NONE)),
   
static_cast(m_xMtrColorTo->get_value(FieldUnit::NONE)),
-  
static_cast(m_xMtrIncrement->get_value()) );
+  nValue);
 
 // enable/disable controls
 if (pControl == m_xLbGradientType.get() || pContr

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

2023-06-28 Thread Andrea Gelmini (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0b3518c50c138bd4c4d02c9c2316eb638bdf9460
Author: Andrea Gelmini 
AuthorDate: Mon Jun 26 14:50:46 2023 +0200
Commit: Julien Nabet 
CommitDate: Wed Jun 28 21:44:58 2023 +0200

Fix typo

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

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index e94a2ce4c9ac..528cd5aa7014 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -610,7 +610,7 @@
   
 
   specifies whether the controls should use dynamic border
-  coloring, if possible. Dymamic border coloring means that when the
+  coloring, if possible. Dynamic border coloring means that when the
   mouse is hovered over a control, and when a control receives the
   focus, this is indicated with special border colors.
 


[Libreoffice-commits] core.git: swext/mediawiki

2023-06-28 Thread Andrea Gelmini (via logerrit)
 
swext/mediawiki/src/registry/schema/org/openoffice/Office/Custom/WikiExtension.xcs
 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 985ac59356a62ff30518355235c66e0e3126fbb6
Author: Andrea Gelmini 
AuthorDate: Wed Jun 28 11:21:00 2023 +0200
Commit: Julien Nabet 
CommitDate: Wed Jun 28 21:44:39 2023 +0200

Fix typo

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

diff --git 
a/swext/mediawiki/src/registry/schema/org/openoffice/Office/Custom/WikiExtension.xcs
 
b/swext/mediawiki/src/registry/schema/org/openoffice/Office/Custom/WikiExtension.xcs
index c0147ae7b753..d41478c57c6b 100644
--- 
a/swext/mediawiki/src/registry/schema/org/openoffice/Office/Custom/WikiExtension.xcs
+++ 
b/swext/mediawiki/src/registry/schema/org/openoffice/Office/Custom/WikiExtension.xcs
@@ -90,7 +90,7 @@
The general error shown in case the 
document could not be sent to the wiki server.

 
-   The error is shown in case wiki 
filter is not evailable.
+   The error is shown in case wiki 
filter is not available.

 
The error is shown in case no wiki 
system was found on specified URL.


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

2023-06-28 Thread Aron Budea (via logerrit)
Tag 'cp-22.05.16-1' created by Aron Budea  at 
2023-06-28 18:57 +

cp-22.05.16-1

Changes since cp-22.05.15-2-27:
---
 0 files changed
---


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - configure.ac

2023-06-28 Thread Aron Budea (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 26451099702871030eb9ce6d1b502f529c124dd0
Author: Aron Budea 
AuthorDate: Wed Jun 28 20:53:25 2023 +0200
Commit: Aron Budea 
CommitDate: Wed Jun 28 20:53:25 2023 +0200

Bump version to 22.05.16.1

Change-Id: Ib1b7b82830a8d99056c6044557555c306976aeb4

diff --git a/configure.ac b/configure.ac
index 9802aa37a0f8..72cbed9fe25f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[22.05.15.2],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[22.05.16.1],[],[],[https://collaboraoffice.com/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard


ESC budget ranking final approval: 2023-06-29 16:00 CEST

2023-06-28 Thread Ilmari Lauhakangas

Hi,

some tweaks were still needed to the ranking, apologies for the hassle. 
Let's decide on the final ranking in the ESC meeting tomorrow:


https://pad.documentfoundation.org/p/esc

You can join using Jitsi here:

https://jitsi.documentfoundation.org/esc

Regards,
Ilmari Lauhakangas
Development Marketing at TDF


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sw/qa sw/source

2023-06-28 Thread Michael Stahl (via logerrit)
 sw/qa/extras/layout/data/s4_min2.fodt |  360 ++
 sw/qa/extras/layout/layout.cxx|   12 +
 sw/source/core/layout/newfrm.cxx  |5 
 3 files changed, 377 insertions(+)

New commits:
commit 57c5dc443068ebc4be83b5ebe375e5533ec0ad78
Author: Michael Stahl 
AuthorDate: Wed Jun 28 17:19:02 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Jun 28 18:42:11 2023 +0200

tdf#156077 sw: layout: call AssertFlyPages() in Init()

The bugdoc has 3 pages, and there are at-page flys anchored to the 3rd
page, and these are not displayed - simply missing from the layout.

In LO 6.1, this worked because the layout-cache was read from the file,
and 3 pages were created in SwRootFrame::Init() calling InsertCnt_().

But now this creates only 2 pages, and later SwLayAction creates the 2nd
page between the existing ones on some MoveFwd(), but despite page nr 2
becoming page nr 3 nothing attaches the at-page flys to the now-page-3.

If a document is loaded containing at-page flys, then all pages that
have flys anchored to them should be created in SwRootFrame::Init()
already.

(regression from commit 7e8b4756d95057f069467b34e7849f9354856578)

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

diff --git a/sw/qa/extras/layout/data/s4_min2.fodt 
b/sw/qa/extras/layout/data/s4_min2.fodt
new file mode 100644
index ..e1317de597d8
--- /dev/null
+++ b/sw/qa/extras/layout/data/s4_min2.fodt
@@ -0,0 +1,360 @@
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:formx="urn:openoffice:names:
 experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+ CIB_OfficeDev/6.1.7.41$Linux_X86_64 
LibreOffice_project/1df0ab666a1bb346850daa72aaa2e29a697a252c2023-06-26T22:28:03.054604345de-DE11PT14M3S2023-06-26T23:06:43.147312212
+ 
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+
+   
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+
+ 
+ 
+
+   
+  
+  
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   
+  
+  
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+  
+  
+  
+  
+ 
+ 
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   
+  
+  
+   
+
+   
+  
+  
+   
+
+   
+  
+  
+   
+
+
+   
+   
+   
+  
+  
+   
+
+
+   
+   
+
+   
+   
+  
+  
+   
+
+
+   
+   
+   
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+
+
+   
+   
+
+   
+   
+  
+  
+   
+
+
+   
+   
+   
+
+   
+  
+ 
+ 
+  
+  
+   
+- 2-
+   
+  
+  
+  
+  
+   
+
+  
+

[Libreoffice-commits] core.git: 2 commits - bin/flat-odf-cleanup.py sw/qa sw/source

2023-06-28 Thread Michael Stahl (via logerrit)
 bin/flat-odf-cleanup.py   |   13 +
 sw/qa/extras/layout/data/s4_min2.fodt |  360 ++
 sw/qa/extras/layout/layout.cxx|   12 +
 sw/source/core/layout/newfrm.cxx  |4 
 4 files changed, 388 insertions(+), 1 deletion(-)

New commits:
commit ff8ec4cfe5df1e15c3e9f6adc843dfe31358e097
Author: Michael Stahl 
AuthorDate: Wed Jun 28 17:19:02 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Jun 28 18:33:37 2023 +0200

tdf#156077 sw: layout: call AssertFlyPages() in Init()

The bugdoc has 3 pages, and there are at-page flys anchored to the 3rd
page, and these are not displayed - simply missing from the layout.

In LO 6.1, this worked because the layout-cache was read from the file,
and 3 pages were created in SwRootFrame::Init() calling InsertCnt_().

But now this creates only 2 pages, and later SwLayAction creates the 2nd
page between the existing ones on some MoveFwd(), but despite page nr 2
becoming page nr 3 nothing attaches the at-page flys to the now-page-3.

If a document is loaded containing at-page flys, then all pages that
have flys anchored to them should be created in SwRootFrame::Init()
already.

(regression from commit 7e8b4756d95057f069467b34e7849f9354856578)

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

diff --git a/sw/qa/extras/layout/data/s4_min2.fodt 
b/sw/qa/extras/layout/data/s4_min2.fodt
new file mode 100644
index ..e1317de597d8
--- /dev/null
+++ b/sw/qa/extras/layout/data/s4_min2.fodt
@@ -0,0 +1,360 @@
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:formx="urn:openoffice:names:
 experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+ CIB_OfficeDev/6.1.7.41$Linux_X86_64 
LibreOffice_project/1df0ab666a1bb346850daa72aaa2e29a697a252c2023-06-26T22:28:03.054604345de-DE11PT14M3S2023-06-26T23:06:43.147312212
+ 
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+
+   
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+
+ 
+ 
+
+   
+  
+  
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   
+  
+  
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+   
+
+   
+  
+  
+  
+  
+ 
+ 
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   
+  
+  
+   
+
+   
+  
+  
+   
+
+   
+  
+  
+   
+
+
+   
+   
+   
+  
+  
+   
+
+
+   
+   
+
+   
+   
+  
+  
+   
+
+
+   
+   
+   
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+
+
+   
+   
+
+   
+   
+  
+  
+   
+
+
+   
+   
+   
+
+   
+  
+ 
+ 
+  
+  
+   
+- 2-
+   
+  
+  
+  
+  
+   
+
+  
+   
+ 

Re: thesaurus.dic Workday 1

2023-06-28 Thread Andras Timar
Hi Alex,

On Wed, Jun 28, 2023 at 5:15 PM Alex  wrote:

> Hi everyone
>
> Today I try to determine how to remove two unwanted wordbook files from
> libreoffice/extras/source/wordbook:
> hu_AkH11.dic and sl.dic.
> These foreign language (incomplete) dics should be removed, unless they
> are used in some unit test.
> Bug 139961, 68576 etc
>
> Can be removed? OK?
>
>

I'm not sure, if it's OK. We added these dictionaries for a reason. It's
better to ask the maintainers first (I CC-ed them).
>From the technical point of view, if you remove the files from source, and
all references to them, the build should pass. Maybe you need a clean build
from scratch. Use "git grep sl.dic" and "git grep hu_AkH11.dic" commands,
they are more reliable than opengrok.

Best regards,
Andras


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

2023-06-28 Thread Noel Grandin (via logerrit)
 sc/source/filter/oox/commentsbuffer.cxx |   15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 2c09c15ffbc203c937594d5ec847d80e13045a96
Author: Noel Grandin 
AuthorDate: Sun Jun 4 18:53:36 2023 +0200
Commit: Caolán McNamara 
CommitDate: Wed Jun 28 17:32:28 2023 +0200

avoid some UNO querying

Change-Id: I5fa793ab979221252f66bdd38e6950c06a66b00a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152601
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153587
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/filter/oox/commentsbuffer.cxx 
b/sc/source/filter/oox/commentsbuffer.cxx
index 7dbd5c942e30..5f24cf4cdde2 100644
--- a/sc/source/filter/oox/commentsbuffer.cxx
+++ b/sc/source/filter/oox/commentsbuffer.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -162,12 +163,11 @@ void Comment::finalizeImport()
 ScPostIt* pPostIt = pDocShell->GetDocFunc().ImportNote( 
maModel.maRange.aStart, OUString( ' ' ) );
 SdrCaptionObj* pCaption = pPostIt->GetOrCreateCaption( 
maModel.maRange.aStart );
 
-Reference< XShape > xAnnoShape( pCaption->getUnoShape() ); // 
SvxShapeText
+rtl::Reference< SvxShapeText > xAnnoShape( 
dynamic_cast(pCaption->getUnoShape().get() ) ); // SvxShapeText
 // setting a property triggers expensive process, so set them all at 
once
-Reference< css::beans::XMultiPropertySet > 
xAnnoShapeMultiPropSet(xAnnoShape, UNO_QUERY_THROW);
 
 // Add shape formatting properties (autoFill, colHidden and rowHidden 
are dropped)
-xAnnoShapeMultiPropSet->setPropertyValues(
+static_cast(xAnnoShape.get())->setPropertyValues(
 Sequence { "TextFitToSize", "MoveProtect", 
"TextHorizontalAdjust", "TextVerticalAdjust" },
 Sequence { Any(maModel.mbAutoScale), Any(maModel.mbLocked),
 Any(lcl_ToHorizAlign( maModel.mnTHA )), Any(lcl_ToVertAlign( 
maModel.mnTVA )) });
@@ -188,7 +188,7 @@ void Comment::finalizeImport()
 
 // Setting comment text alignment
 const ::oox::vml::ClientData* xClientData = 
pVmlNoteShape->getClientData();
-xAnnoShapeMultiPropSet->setPropertyValues(
+static_cast(xAnnoShape.get())->setPropertyValues(
 Sequence { "TextVerticalAdjust", "ParaAdjust" },
 Sequence { Any(lcl_ToVertAlign( xClientData->mnTextVAlign 
)), Any(lcl_ToParaAlign( xClientData->mnTextHAlign )) });
 }
@@ -197,11 +197,10 @@ void Comment::finalizeImport()
 
 // insert text and convert text formatting
 maModel.mxText->finalizeImport(*this);
-Reference< XText > xAnnoText( xAnnoShape, UNO_QUERY_THROW );
-Reference< css::document::XActionLockable > xAnnoLock( xAnnoShape, 
UNO_QUERY_THROW );
-xAnnoLock->addActionLock();
+Reference< XText > xAnnoText( xAnnoShape );
+xAnnoShape->addActionLock();
 maModel.mxText->convert( xAnnoText );
-xAnnoLock->removeActionLock();
+xAnnoShape->removeActionLock();
 }
 catch( Exception& )
 {


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

2023-06-28 Thread Noel Grandin (via logerrit)
 sc/source/core/data/table2.cxx   |3 +--
 sc/source/filter/oox/sheetdatabuffer.cxx |9 -
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 4728edd282cdbe756ff39c06310f2937a9beb45c
Author: Noel Grandin 
AuthorDate: Sun Jun 4 18:53:03 2023 +0200
Commit: Caolán McNamara 
CommitDate: Wed Jun 28 17:32:17 2023 +0200

sort row-range-styles

which reduces the amount of data-movement we do in the following loop
when inserting into the sorted_vector.
Shaves 2% off the load time of a large document with lots of styles.

Change-Id: I8df4cc35edcc212613068af108b136c2d5acd219
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152600
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153586
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx 
b/sc/source/filter/oox/sheetdatabuffer.cxx
index ff1828b5591f..0fc56fe77a24 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -393,10 +393,17 @@ void SheetDataBuffer::addColXfStyleProcessRowRanges()
 for ( sal_Int32 nCol = 0; nCol <= nMaxCol; ++nCol )
 {
 RowStyles& rRowStyles = maStylesPerColumn[ nCol ];
-for ( const auto& [nXfId, rRowRangeList] : maXfIdRowRangeList )
+for ( auto& [nXfId, rRowRangeList] : maXfIdRowRangeList )
 {
 if ( nXfId == -1 ) // it's a dud skip it
 continue;
+// sort the row ranges, so we spend less time moving data around
+// when we insert into aStyleRows
+std::sort(rRowRangeList.begin(), rRowRangeList.end(),
+[](const ValueRange& lhs, const ValueRange& rhs)
+{
+return lhs.mnFirst < rhs.mnFirst;
+});
 // get all row ranges for id
 for ( const auto& rRange : rRowRangeList )
 {
commit cebc90f3cf0a1dfa6f4f682dc9fff8d2fecfdd28
Author: Noel Grandin 
AuthorDate: Fri Jun 2 20:51:53 2023 +0200
Commit: Caolán McNamara 
CommitDate: Wed Jun 28 17:32:07 2023 +0200

remove unnecessary ScPatternAttr copy

slightly speeds up loading document with large number of patterns

Change-Id: I1b82145fb0f8a62da0d5a46a43594f7085ce2c22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152564
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit c01fa7ff3bcd3447ea190bcc1833beb7c48a8803)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152535
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153585
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 3ed331fbc908..ebe63974cbbc 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2915,8 +2915,7 @@ namespace
 std::vector aData(rOrigData);
 for (size_t nIdx = 0; nIdx < aData.size(); ++nIdx)
 {
-ScPatternAttr aNewPattern(*aData[nIdx].pPattern);
-aData[nIdx].pPattern = &rDocument.GetPool()->Put(aNewPattern);
+aData[nIdx].pPattern = 
&rDocument.GetPool()->Put(*aData[nIdx].pPattern);
 }
 return aData;
 }


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

2023-06-28 Thread Caolán McNamara (via logerrit)
 sc/qa/unit/data/xls/pass/ofz49713-1.xls |binary
 sc/source/core/data/table2.cxx  |   18 --
 2 files changed, 16 insertions(+), 2 deletions(-)

New commits:
commit a62973bd350f2e9d372765ed99eed423efa0d39f
Author: Caolán McNamara 
AuthorDate: Sun Aug 14 20:46:49 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 28 17:31:47 2023 +0200

ofz#49713 Heap-use-after-free

the dtor of ScAttrArray where the std::vector ends up
will call ScDocumentPool::Remove on each entries pPattern, assuming
that a matching ScDocumentPool::Put was called on each, something
that is elided if we just do a simply copy here.

probably a problem since:

commit dddee125cc32f1ad5228e598a7de04e9654e65c1
Date:   Thu Mar 10 15:03:25 2022 +0100

load ods/xlsx with full row attributes without allocating all columns

Change-Id: I3a5e2e3fa4d40343f30f9eefbabd1579d8a97e02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138262
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 6c81a09e3ef239a2d7a991d00fe3620a67298b99)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153584
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sc/qa/unit/data/xls/pass/ofz49713-1.xls 
b/sc/qa/unit/data/xls/pass/ofz49713-1.xls
new file mode 100644
index ..b32574013e95
Binary files /dev/null and b/sc/qa/unit/data/xls/pass/ofz49713-1.xls differ
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index a7d073c89966..3ed331fbc908 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2908,6 +2908,20 @@ void ScTable::ApplyPatternArea( SCCOL nStartCol, SCROW 
nStartRow, SCCOL nEndCol,
 CreateColumnIfNotExists(i).ApplyPatternArea(nStartRow, nEndRow, rAttr, 
pDataArray, pIsChanged);
 }
 
+namespace
+{
+std::vector duplicateScAttrEntries(ScDocument& rDocument, 
const std::vector& rOrigData)
+{
+std::vector aData(rOrigData);
+for (size_t nIdx = 0; nIdx < aData.size(); ++nIdx)
+{
+ScPatternAttr aNewPattern(*aData[nIdx].pPattern);
+aData[nIdx].pPattern = &rDocument.GetPool()->Put(aNewPattern);
+}
+return aData;
+}
+}
+
 void ScTable::SetAttrEntries( SCCOL nStartCol, SCCOL nEndCol, 
std::vector && vNewData)
 {
 if (!ValidCol(nStartCol) || !ValidCol(nEndCol))
@@ -2919,7 +2933,7 @@ void ScTable::SetAttrEntries( SCCOL nStartCol, SCCOL 
nEndCol, std::vector(vNewData));
+aCol[i].SetAttrEntries(duplicateScAttrEntries(rDocument, 
vNewData));
 aDefaultColData.SetAttrEntries(std::move(vNewData));
 }
 else
@@ -2932,7 +2946,7 @@ void ScTable::SetAttrEntries( SCCOL nStartCol, SCCOL 
nEndCol, std::vector(vNewData));
+aCol[i].SetAttrEntries(duplicateScAttrEntries(rDocument, 
vNewData));
 aCol[nEndCol].SetAttrEntries( std::move(vNewData));
 }
 }


[Libreoffice-commits] core.git: helpcontent2

2023-06-28 Thread Alain Romedenne (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 52831bbdd39f37750ecb1bebb99d3cdfe4b3d315
Author: Alain Romedenne 
AuthorDate: Wed Jun 28 17:16:46 2023 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jun 28 17:16:46 2023 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 114401853f335d1e85edee8229c4450c575f1f0c
  - New features of SF_Dialog and SF_DialogControl services (WiP)
Change-Id: I5806e7c9cd014bd92e58b2f9aa739a610050ea76
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153598
Tested-by: Jenkins
Reviewed-by: Alain Romedenne 

diff --git a/helpcontent2 b/helpcontent2
index d380411c947e..114401853f33 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d380411c947e8fcc3887889497349f45f01c28ac
+Subproject commit 114401853f335d1e85edee8229c4450c575f1f0c


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

2023-06-28 Thread Alain Romedenne (via logerrit)
 source/text/sbasic/shared/0002.xhp|6 
 source/text/sbasic/shared/03/sf_dialog.xhp|   39 +++--
 source/text/sbasic/shared/03/sf_dialogcontrol.xhp |  147 +++---
 3 files changed, 106 insertions(+), 86 deletions(-)

New commits:
commit 114401853f335d1e85edee8229c4450c575f1f0c
Author: Alain Romedenne 
AuthorDate: Mon Jun 26 13:27:08 2023 +0200
Commit: Alain Romedenne 
CommitDate: Wed Jun 28 17:16:45 2023 +0200

New features of SF_Dialog and SF_DialogControl services (WiP)
Change-Id: I5806e7c9cd014bd92e58b2f9aa739a610050ea76
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/153598
Tested-by: Jenkins
Reviewed-by: Alain Romedenne 

diff --git a/source/text/sbasic/shared/0002.xhp 
b/source/text/sbasic/shared/0002.xhp
index 8bc58a475d..43b124e60a 100644
--- a/source/text/sbasic/shared/0002.xhp
+++ b/source/text/sbasic/shared/0002.xhp
@@ -47,7 +47,11 @@
 twips; definition
 
 Twips
-A twip is a 
screen-independent unit which is used to define the uniform position and size 
of screen elements on all display systems. A twip is 1/1440th of an inch or 
1/20 of a printer's point. There are 1440 twips to an inch or about 567 twips 
to a centimeter.
+A 
twip is a screen-independent unit which is used to define the 
uniform position and size of screen elements on all display systems. A twip is 
1/1440th of an inch or 1/20 of a printer's point. There are 1440 twips to an 
inch or about 567 twips to a centimeter.
+
+
+AppFont Units
+Map 
AppFont units are device and resolution independent. One Map AppFont 
unit is equal to one eighth of the average character (Systemfont) height and 
one quarter of the average character width.
 
 
 URL Notation
diff --git a/source/text/sbasic/shared/03/sf_dialog.xhp 
b/source/text/sbasic/shared/03/sf_dialog.xhp
index 86a803c906..9de39dbb4a 100644
--- a/source/text/sbasic/shared/03/sf_dialog.xhp
+++ b/source/text/sbasic/shared/03/sf_dialog.xhp
@@ -284,14 +284,16 @@
   

Event properties
-   Returns a URI string with the reference to the script 
triggered by the event. Read its specification in the https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification";>scripting
 framework URI specification.
+   
+   On… properties return a URI string with the 
reference to the script triggered by the event. On… 
properties can be set programmatically.Read its specification in the https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification";>scripting
 framework URI specification.
+   

   
  
 Name
  
  
-ReadOnly
+Read/Write
  
  
 Basic IDE Description
@@ -299,7 +301,7 @@
   
   
  
-OnFocusGained
+OnFocusGained
  
  
 Yes
@@ -310,7 +312,7 @@
   
   
  
-OnFocusLost
+OnFocusLost
  
  
 Yes
@@ -321,7 +323,7 @@
   
   
  
-OnKeyPressed
+OnKeyPressed
  
  
 Yes
@@ -332,7 +334,7 @@
   
   
  
-OnKeyReleased
+OnKeyReleased
  
  
 Yes
@@ -343,18 +345,18 @@
   
   
  
-OnMouseDragged
+OnMouseDragged
  
  
 Yes
  
  
-Mouse moved while key presses
+Mouse 
moved while key presses
  
   
   
  
-OnMouseEntered
+OnMouseEntered
  
  
 Yes
@@ -365,7 +367,7 @@
   
   
  
-OnMouseExited
+OnMouseExited
  
  
 Yes
@@ -376,7 +378,7 @@
   
   
  
-OnMouseMoved
+OnMouseMoved
  
  
 Yes
@@ -387,7 +389,7 @@
   
   
  
-OnMousePressed
+OnMousePressed
  
  
 Yes
@@ -398,7 +400,7 @@
   
   
  
-OnMouseReleased
+OnMouseReleased
  
  
 Yes
@@ -408,6 +410,9 @@
  
   
 
+
+  Assigning events via the Basic IDE 
and assigning events via macros are mutually exclusive.
+
   
   
   
@@ -442,6 +447,10 @@
   
   
 
+
+Dimensioning a dialog is done by using Map 
AppFont units. A 
dialog or control model also uses AppFont units. While their views use 
pixels.  
+
+
 
Activate 
--
 

@@ -661,7 +670,7 @@
   Dialog service;Resize

Resize
-   Moves the topleft 
corner of a dialog to new coordinates and/or modify its dimensions. All 
distances are expressed 

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

2023-06-28 Thread Paris Oplopoios (via logerrit)
 include/LibreOfficeKit/LibreOfficeKitEnums.h |3 +--
 sw/source/uibase/app/apphdl.cxx  |2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 367e9205e10d10cb564bb462dea821ce554b99da
Author: Paris Oplopoios 
AuthorDate: Wed Jun 28 16:23:16 2023 +0300
Commit: Paris Oplopoios 
CommitDate: Wed Jun 28 17:14:40 2023 +0200

Send writer document background color on theme change

Send the doc background color to the kit on theme change

Change-Id: Ic025e542417da004c1c4a2bfd58a858deb4caa58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153715
Tested-by: Jenkins
Reviewed-by: Paris Oplopoios 

diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h 
b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 0325e62399a5..b7a43acf7d27 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -774,8 +774,7 @@ typedef enum
 LOK_CALLBACK_VALIDITY_INPUT_HELP = 51,
 
 /**
- * This is currently Calc only. Indicates the document background
- * color in the payload as a RGB hex string (RRGGBB).
+ * Indicates the document background color in the payload as a RGB hex 
string (RRGGBB).
  */
 LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR = 52,
 
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index d7ab78d6e392..26a08b03c00b 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -996,6 +996,8 @@ void SwModule::ConfigurationChanged( 
utl::ConfigurationBroadcaster* pBrdCst, Con
 {
 
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR,
 
aViewColors.m_aAppBackgroundColor.AsRGBHexString().toUtf8());
+
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR,
+
aViewColors.m_aAppBackgroundColor.AsRGBHexString().toUtf8());
 }
 }
 if(pSwView !=  nullptr ||


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

2023-06-28 Thread Henry Castro (via logerrit)
 sc/source/ui/inc/select.hxx  |   10 -
 sc/source/ui/view/select.cxx |  268 +--
 2 files changed, 139 insertions(+), 139 deletions(-)

New commits:
commit 56c303a0382003fa0030e55a420c1600fddb6673
Author: Henry Castro 
AuthorDate: Wed Jun 21 11:15:58 2023 -0400
Commit: Henry Castro 
CommitDate: Wed Jun 28 16:52:58 2023 +0200

sc: prefix m_* ScViewFunctionSet class members

..

Signed-off-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153405
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 
(cherry picked from commit 8276b9593a2a9e3a0d5aaeaadd64369667120303)

Change-Id: Ic16ae0fc6580e350444576a087c333d52296ec5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153663
Tested-by: Jenkins
Reviewed-by: Henry Castro 

diff --git a/sc/source/ui/inc/select.hxx b/sc/source/ui/inc/select.hxx
index ea3082f972c6..e1223f91e793 100644
--- a/sc/source/ui/inc/select.hxx
+++ b/sc/source/ui/inc/select.hxx
@@ -40,12 +40,12 @@ public:
 class ScViewFunctionSet : public FunctionSet// View (Gridwin / 
keyboard)
 {
 private:
-ScViewData* pViewData;
-ScViewSelectionEngine*  pEngine;
+ScViewData* m_pViewData;
+ScViewSelectionEngine*  m_pEngine;
 
-boolbAnchor;
-boolbStarted;
-ScAddress   aAnchorPos;
+boolm_bAnchor;
+boolm_bStarted;
+ScAddress   m_aAnchorPos;
 
 ScSplitPos  GetWhich() const;
 
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index e5fcb5e254a5..09a551396d44 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -44,27 +44,27 @@ static bool bDidSwitch = false;
 
 // View (Gridwin / keyboard)
 ScViewFunctionSet::ScViewFunctionSet( ScViewData* pNewViewData ) :
-pViewData( pNewViewData ),
-pEngine( nullptr ),
-bAnchor( false ),
-bStarted( false )
+m_pViewData( pNewViewData ),
+m_pEngine( nullptr ),
+m_bAnchor( false ),
+m_bStarted( false )
 {
-OSL_ENSURE(pViewData, "ViewData==0 at FunctionSet");
+OSL_ENSURE(m_pViewData, "ViewData==0 at FunctionSet");
 }
 
 ScSplitPos ScViewFunctionSet::GetWhich() const
 {
-if (pEngine)
-return pEngine->GetWhich();
+if (m_pEngine)
+return m_pEngine->GetWhich();
 else
-return pViewData->GetActivePart();
+return m_pViewData->GetActivePart();
 }
 
 sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const 
Point& rEffPos,
  bool bLeftScroll, bool 
bTopScroll, bool bRightScroll, bool bBottomScroll )
 {
 sal_uLong nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX;
-vcl::Window* pWin = pEngine->GetWindow();
+vcl::Window* pWin = m_pEngine->GetWindow();
 tools::Rectangle aScrRect = pWin->GetDesktopRectPixel();
 Point aRootPos = pWin->OutputToAbsoluteScreenPixel(Point(0,0));
 if (bRightScroll)
@@ -124,7 +124,7 @@ sal_uLong ScViewFunctionSet::CalcUpdateInterval( const 
Size& rWinSize, const Poi
 }
 
 #ifdef _WIN32
-ScTabViewShell* pViewShell = pViewData->GetViewShell();
+ScTabViewShell* pViewShell = m_pViewData->GetViewShell();
 bool bRefMode = pViewShell && pViewShell->IsRefInputMode();
 if (bRefMode && nUpdateInterval < SC_SELENG_REFMODE_UPDATE_INTERVAL_MIN)
 // Lower the update interval during ref mode, because re-draw can be
@@ -139,25 +139,25 @@ sal_uLong ScViewFunctionSet::CalcUpdateInterval( const 
Size& rWinSize, const Poi
 
 void ScViewFunctionSet::SetSelectionEngine( ScViewSelectionEngine* pSelEngine )
 {
-pEngine = pSelEngine;
+m_pEngine = pSelEngine;
 }
 
 // Drag & Drop
 void ScViewFunctionSet::BeginDrag()
 {
-SCTAB nTab = pViewData->GetTabNo();
+SCTAB nTab = m_pViewData->GetTabNo();
 
 SCCOL nPosX;
 SCROW nPosY;
-if (pEngine)
+if (m_pEngine)
 {
-Point aMPos = pEngine->GetMousePosPixel();
-pViewData->GetPosFromPixel( aMPos.X(), aMPos.Y(), GetWhich(), nPosX, 
nPosY );
+Point aMPos = m_pEngine->GetMousePosPixel();
+m_pViewData->GetPosFromPixel( aMPos.X(), aMPos.Y(), GetWhich(), nPosX, 
nPosY );
 }
 else
 {
-nPosX = pViewData->GetCurX();
-nPosY = pViewData->GetCurY();
+nPosX = m_pViewData->GetCurX();
+nPosY = m_pViewData->GetCurY();
 }
 
 ScModule* pScMod = SC_MOD();
@@ -165,24 +165,24 @@ void ScViewFunctionSet::BeginDrag()
 if (bRefMode)
 return;
 
-pViewData->GetView()->FakeButtonUp( GetWhich() );   // ButtonUp is 
swallowed
+m_pViewData->GetView()->FakeButtonUp( GetWhich() );   // ButtonUp is 
swallowed
 
-ScMarkData& rMark = pViewData->GetMarkData();
+ScMarkData& rMark = m_pViewData->GetMarkData();
 rMark.MarkToSimple();
 if ( !rMark.IsMarked() || rMark.IsMultiMarked() )
 

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

2023-06-28 Thread Noel Grandin (via logerrit)
 include/vcl/tabctrl.hxx|9 -
 vcl/source/control/tabctrl.cxx |   31 +--
 2 files changed, 21 insertions(+), 19 deletions(-)

New commits:
commit 88fcc30cf2f130168eb522a2a2b5f8e5725378b8
Author: Noel Grandin 
AuthorDate: Wed Jun 28 14:17:19 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 28 15:49:48 2023 +0200

these TAB_ constants do not need to be in the header file

they can be inside the .cxx file

Also rename slightly and document.

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

diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx
index c6dc7f2fcb23..3da709d77807 100644
--- a/include/vcl/tabctrl.hxx
+++ b/include/vcl/tabctrl.hxx
@@ -39,15 +39,6 @@ class ToolBox;
 #define TAB_PAGE_NOTFOUND   (sal_uInt16(0x))
 #endif /* !TAB_APPEND */
 
-#define TAB_OFFSET  3
-#define TAB_TABOFFSET_X 3
-#define TAB_TABOFFSET_Y 3
-#define TAB_EXTRASPACE_X6
-#define TAB_BORDER_LEFT 1
-#define TAB_BORDER_TOP  1
-#define TAB_BORDER_RIGHT2
-#define TAB_BORDER_BOTTOM   2
-
 class VCL_DLLPUBLIC TabControl : public Control
 {
 protected:
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index d44554b80b83..f59431401137 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -44,6 +44,17 @@
 #include 
 #include 
 
+#define TAB_OFFSET  3
+/// Space to the left and right of the tabitem
+#define TAB_ITEM_OFFSET_X 3
+/// Space to the top and bottom of the tabitem
+#define TAB_ITEM_OFFSET_Y 3
+#define TAB_EXTRASPACE_X6
+#define TAB_BORDER_LEFT 1
+#define TAB_BORDER_TOP  1
+#define TAB_BORDER_RIGHT2
+#define TAB_BORDER_BOTTOM   2
+
 class ImplTabItem final
 {
 sal_uInt16 m_nId;
@@ -239,14 +250,14 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, 
tools::Long nMaxWidth )
 if( aImageSize.Height() > aSize.Height() )
 aSize.setHeight( aImageSize.Height() );
 
-aSize.AdjustWidth(TAB_TABOFFSET_X*2 );
-aSize.AdjustHeight(TAB_TABOFFSET_Y*2 );
+aSize.AdjustWidth(TAB_ITEM_OFFSET_X*2 );
+aSize.AdjustHeight(TAB_ITEM_OFFSET_Y*2 );
 
 tools::Rectangle aCtrlRegion( Point( 0, 0 ), aSize );
 tools::Rectangle aBoundingRgn, aContentRgn;
-const TabitemValue aControlValue(tools::Rectangle(TAB_TABOFFSET_X, 
TAB_TABOFFSET_Y,
-   aSize.Width() - TAB_TABOFFSET_X 
* 2,
-   aSize.Height() - 
TAB_TABOFFSET_Y * 2));
+const TabitemValue aControlValue(tools::Rectangle(TAB_ITEM_OFFSET_X, 
TAB_ITEM_OFFSET_Y,
+   aSize.Width() - 
TAB_ITEM_OFFSET_X * 2,
+   aSize.Height() - 
TAB_ITEM_OFFSET_Y * 2));
 if(GetNativeControlRegion( ControlType::TabItem, ControlPart::Entire, 
aCtrlRegion,
ControlState::ENABLED, 
aControlValue,
aBoundingRgn, aContentRgn ) )
@@ -270,7 +281,7 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, 
tools::Long nMaxWidth )
 pItem->maFormatText = pItem->maFormatText.replaceAt( 
pItem->maFormatText.getLength()-aAppendStr.getLength()-1, 1, u"" );
 aSize.setWidth( GetOutDev()->GetCtrlTextWidth( pItem->maFormatText 
) );
 aSize.AdjustWidth(aImageSize.Width() );
-aSize.AdjustWidth(TAB_TABOFFSET_X*2 );
+aSize.AdjustWidth(TAB_ITEM_OFFSET_X*2 );
 }
 while ( (aSize.Width()+4 >= nMaxWidth) && 
(pItem->maFormatText.getLength() > aAppendStr.getLength()) );
 if ( aSize.Width()+4 >= nMaxWidth )
@@ -879,10 +890,10 @@ void TabControl::ImplDrawItem(vcl::RenderContext& 
rRenderContext, ImplTabItem co
 bNativeOK = rRenderContext.IsNativeControlSupported(ControlType::TabItem, 
ControlPart::Entire);
 if ( bNativeOK )
 {
-TabitemValue tiValue(tools::Rectangle(pItem->maRect.Left() + 
TAB_TABOFFSET_X,
-   pItem->maRect.Top() + TAB_TABOFFSET_Y,
-   pItem->maRect.Right() - TAB_TABOFFSET_X,
-   pItem->maRect.Bottom() - 
TAB_TABOFFSET_Y));
+TabitemValue tiValue(tools::Rectangle(pItem->maRect.Left() + 
TAB_ITEM_OFFSET_X,
+   pItem->maRect.Top() + TAB_ITEM_OFFSET_Y,
+   pItem->maRect.Right() - 
TAB_ITEM_OFFSET_X,
+   pItem->maRect.Bottom() - 
TAB_ITEM_OFFSET_Y));
 if (pItem->maRect.Left() < 5)
 tiValue.mnAlignment |= TabitemFlags::LeftAligned;
 if (pItem->maRect.Right() > mnLastWidth - 5)


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - include/xmloff sd/source xmloff/qa xmloff/source

2023-06-28 Thread Michael Stahl (via logerrit)
 include/xmloff/xmlimp.hxx |1 
 sd/source/filter/xml/sdxmlwrp.cxx |2 
 xmloff/qa/unit/uxmloff.cxx|   65 --
 xmloff/source/core/xmlimp.cxx |   80 --
 xmloff/source/meta/xmlmetai.cxx   |4 -
 5 files changed, 89 insertions(+), 63 deletions(-)

New commits:
commit b963e5b2007790213c370f781f0872b256fe77a3
Author: Michael Stahl 
AuthorDate: Tue Jun 27 14:50:02 2023 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jun 28 15:33:40 2023 +0200

xmloff: ODF import: adapt generator parsing to 2-digit major versions

DocumentInfo currently assumes that a LO version encoded in "BuildId"
property has only 1 digit major version, which is now wrong and would
start to give incorrect results when major version "30" will be detected
as LO_3x.

Add the dots as separators into the BuildId because it's not going to
work without.

Change-Id: I8918afe3642cbefa8488c57658f1505c9a20eddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153649
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit b1ce8bb078904db1df542f7a1c2ed527dde1a2d3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153689
Reviewed-by: Christian Lohmaier 

diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 26873175268d..3684a7e087b5 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -560,6 +560,7 @@ public:
 static const sal_uInt16 LO_6x = 60 | LO_flag;
 static const sal_uInt16 LO_63x = 63 | LO_flag;
 static const sal_uInt16 LO_7x = 70 | LO_flag;
+static const sal_uInt16 LO_New = 100 | LO_flag;
 static const sal_uInt16 ProductVersionUnknown = SAL_MAX_UINT16;
 
 /** depending on whether the generator version indicates LO, compare
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx 
b/sd/source/filter/xml/sdxmlwrp.cxx
index 43c3d0d7766d..91b02e67e525 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -693,7 +693,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
 if( !sBuildId.isEmpty() )
 {
 sal_Int32 nIndex = sBuildId.indexOf('$');
-if( nIndex != -1 )
+if (sBuildId.indexOf(';') == -1 && nIndex != -1)
 {
 sal_Int32 nUPD = o3tl::toInt32(sBuildId.subView( 0, 
nIndex ));
 
diff --git a/xmloff/qa/unit/uxmloff.cxx b/xmloff/qa/unit/uxmloff.cxx
index 9cad246f976e..2155532e27b1 100644
--- a/xmloff/qa/unit/uxmloff.cxx
+++ b/xmloff/qa/unit/uxmloff.cxx
@@ -171,33 +171,35 @@ void Test::testMetaGenerator()
 { "OpenOffice/4.1.4$Unix OpenOffice.org_project/414m2$Build-9785", 
"414$9785", SvXMLImport::AOO_4x },
 
 // LO versions
-{ "LibreOffice/3.3$Linux LibreOffice_project/330m17$Build-3", 
"330$3;33", SvXMLImport::LO_3x },
-{ "BrOffice/3.3$Win32 LibreOffice_project/330m19$Build-8", "330$8;33", 
SvXMLImport::LO_3x },
-{ "LibreOffice/3.4$Linux LibreOffice_project/340m1$Build-1206", 
"340$1206;34", SvXMLImport::LO_3x },
-{ "LibreOffice/3.5$Linux_X86_64 
LibreOffice_project/3fa2330-e49ffd2-90d118b-705e248-051e21c", ";35", 
SvXMLImport::LO_3x },
-{ "LibreOffice/3.6$Windows_x86 
LibreOffice_project/a9a0717-273e462-768e6e3-978247f-65e65f", ";36", 
SvXMLImport::LO_3x },
-{ "LibreOffice/4.0.2.2$Windows_x86 
LibreOffice_project/4c82dcdd6efcd48b1d8bba66bfe1989deee49c3", ";4022", 
SvXMLImport::LO_41x },
-{ "LibreOffice/4.1.2.3$MacOSX_x86 
LibreOffice_project/40b2d7fde7e8d2d7bc5a449dc65df4d08a7dd38", ";4123", 
SvXMLImport::LO_41x },
-{ "LibreOffice/4.2.8.2$Windows_x86 
LibreOffice_project/48d50dbfc06349262c9d50868e5c1f630a573ebd", ";4282", 
SvXMLImport::LO_42x },
-{ "LibreOffice_from_Collabora_4.2-8/4.2.10.8$Linux_x86 
LibreOffice_project/84584cc237b2eb93f7684d8fcd063bb37e87b5fb", ";42108", 
SvXMLImport::LO_42x },
-{ "LibreOffice/4.3.3.2$Linux_x86 
LibreOffice_project/9bb7eadab57b6755b1265afa86e04bf45fbfc644", ";4332", 
SvXMLImport::LO_43x },
-{ "LibreOffice_from_Collabora_4.4-10/4.4.10.9$Linux_x86 
LibreOffice_project/5600b19b88a01bbb669b0900100760758dff8c26", ";44109", 
SvXMLImport::LO_44x },
-{ "LibreOffice/4.3.3.2$Linux_X86_64 
LibreOffice_project/430m0$Build-2", "430$2;4332", SvXMLImport::LO_43x },
-{ "LibreOffice/4.4.3.2$Linux_x86 
LibreOffice_project/88805f81e9fe61362df02b9941de8e38a9b5fd16", ";4432", 
SvXMLImport::LO_44x },
-{ "LibreOffice/5.0.1.1$Linux_x86 LibreOffice_project/00m0$Build-1", 
"00$1;5011", SvXMLImport::LO_5x },
-{ "LibreOffice/5.0.3.2$Windows_X86_64 
LibreOffice_project/e5f16313668ac592c1bfb310f4390624e3dbfb75", ";5032", 
SvXMLImport::LO_5x },
-{ "Collabora_Office/5.0.10.19$Linux_X86_64 
LibreOffice_project/95060d44300d8866fa81c16fc8fe2afe22d63777", ";501019", 
SvXMLImport::LO_5x },
-{ "Libr

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

2023-06-28 Thread Tünde Tóth (via logerrit)
 oox/source/export/shapes.cxx|5 -
 sw/qa/extras/ooxmlexport/data/tdf155903.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport18.cxx  |6 ++
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 863a32171ed8efdf1aaee59918e49613e7ccd7a9
Author: Tünde Tóth 
AuthorDate: Mon Jun 26 15:01:26 2023 +0200
Commit: László Németh 
CommitDate: Wed Jun 28 13:38:22 2023 +0200

tdf155903 DOCX export: fix corrupt file with embedded media

Regression from commit bc72514f90d90e1ab3fed8167663e835edf03508
"tdf#53970 PPTX: fix export of embedded media files".

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

diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index dceb4ee706f8..efde8de56f72 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1272,7 +1272,10 @@ void ShapeExport::WriteGraphicObjectShapePart( const 
Reference< XShape >& xShape
 xShapeProps->getPropertyValue("Graphic") >>= xGraphic;
 }
 
-bool bHasMediaURL = xShapeProps.is() && 
xShapeProps->getPropertySetInfo()->hasPropertyByName("MediaURL") && 
(xShapeProps->getPropertyValue("MediaURL") >>= sMediaURL);
+// tdf#155903 Only for PPTX, Microsoft does not support this feature in 
Word and Excel.
+bool bHasMediaURL = GetDocumentType() == DOCUMENT_PPTX && xShapeProps.is()
+&& 
xShapeProps->getPropertySetInfo()->hasPropertyByName("MediaURL")
+&& (xShapeProps->getPropertyValue("MediaURL") >>= 
sMediaURL);
 
 if (!xGraphic.is() && !bHasMediaURL)
 {
diff --git a/sw/qa/extras/ooxmlexport/data/tdf155903.odt 
b/sw/qa/extras/ooxmlexport/data/tdf155903.odt
new file mode 100644
index ..97ba58d892dd
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf155903.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
index 9183863c8af7..4d1136f24c42 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
@@ -864,6 +864,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf155736, 
"tdf155736_PageNumbers_footer.docx")
 CPPUNIT_ASSERT_EQUAL(OUString("Page * of *"), 
parseDump("/root/page[2]/footer/txt/text()"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf155903, "tdf155903.odt")
+{
+// Without the accompanying fix in place, this test would have crashed,
+// because the exported file was corrupted.
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2023-06-28 Thread Tibor Nagy (via logerrit)
 sc/qa/uitest/calc_tests8/tdf54768.py |   32 
 sc/qa/uitest/data/tdf54768.ods   |binary
 sc/source/ui/view/drawvie4.cxx   |   16 
 3 files changed, 36 insertions(+), 12 deletions(-)

New commits:
commit d41456c2aa86ecbc70b45e11eb6e411e33b3ac06
Author: Tibor Nagy 
AuthorDate: Thu Jun 22 09:53:59 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 28 13:11:07 2023 +0200

tdf#54768 sc: fix resizing of cropped images to original size

This is a follow up to commit a4e12cbfc69cfe668fa30756a3c5843e911e22b1
(tdf#155863 sd: fix resizing of cropped images to original size)

Change-Id: I923ed8b1df6c6559d527d43e4abe842497c4c28f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153449
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 54550800bf0d0208ea5085a2170100100d0da2d4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153660
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/uitest/calc_tests8/tdf54768.py 
b/sc/qa/uitest/calc_tests8/tdf54768.py
new file mode 100644
index ..a4342fb8e238
--- /dev/null
+++ b/sc/qa/uitest/calc_tests8/tdf54768.py
@@ -0,0 +1,32 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_url_for_data_file
+
+class tdf54768(UITestCase):
+def test_tdf54768(self):
+# This document contains an image with an original size of 7.99cm x 
5.74cm.
+# The image has been cropped 2.73cm at the top.
+# Also, it has been resized to a width of 4.04cm.
+with self.ui_test.load_file(get_url_for_data_file("tdf54768.ods")) as 
document:
+xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+
+# select the image
+xGridWin.executeAction("SELECT", 
mkPropertyValues({"OBJECT":"Image"}))
+
+# click "Original Size"
+self.xUITest.executeCommand(".uno:OriginalSize")
+
+# tdf#155863: Without the fix in place, the image stays cropped,
+# but stretches to the size of original image
+self.assertEqual(7988, 
document.DrawPages[0].getByIndex(0).Size.Width)
+self.assertEqual(3005, 
document.DrawPages[0].getByIndex(0).Size.Height)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/tdf54768.ods b/sc/qa/uitest/data/tdf54768.ods
new file mode 100644
index ..222481db8bb0
Binary files /dev/null and b/sc/qa/uitest/data/tdf54768.ods differ
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index 5cc1655b83c4..2bd329098206 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -476,9 +476,9 @@ void ScDrawView::SetMarkedOriginalSize()
 }
 else if (nIdent == SdrObjKind::Graphic)
 {
-const Graphic& rGraphic = 
static_cast(pObj)->GetGraphic();
+const SdrGrafObj* pSdrGrafObj = static_cast(pObj);
 
-MapMode aSourceMap = rGraphic.GetPrefMapMode();
+MapMode aSourceMap = pSdrGrafObj->GetGraphic().GetPrefMapMode();
 MapMode aDestMap( MapUnit::Map100thMM );
 if (aSourceMap.GetMapUnit() == MapUnit::MapPixel)
 {
@@ -488,16 +488,8 @@ void ScDrawView::SetMarkedOriginalSize()
 aDestMap.SetScaleX(aNormScaleX);
 aDestMap.SetScaleY(aNormScaleY);
 }
-if (pViewData)
-{
-vcl::Window* pActWin = pViewData->GetActiveWin();
-if (pActWin)
-{
-aOriginalSize = pActWin->LogicToLogic(
-rGraphic.GetPrefSize(), &aSourceMap, 
&aDestMap );
-bDo = true;
-}
-}
+aOriginalSize = pSdrGrafObj->getOriginalSize();
+bDo = true;
 }
 
 if ( bDo )


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

2023-06-28 Thread Jaume Pujantell Traserra (via logerrit)
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |   16 +++--
 sc/source/ui/app/inputhdl.cxx  |1 
 sc/source/ui/view/viewfun3.cxx |2 +
 3 files changed, 12 insertions(+), 7 deletions(-)

New commits:
commit 57727c53d69fc352c16674e175b89ef1f2667dd7
Author: Jaume Pujantell Traserra 
AuthorDate: Fri Jun 16 09:01:27 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 28 13:10:58 2023 +0200

fix crash on LOKIT spelling dialog

Update active view before trying to access it's selection.

Change-Id: Ic83d335216304f7122005e447f5bd1c1484d0eb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153136
Tested-by: Jenkins
Reviewed-by: Andras Timar 
(cherry picked from commit 2ab23ac48d5ebbfb87177bcee4acceecd88ce69e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153285
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index cfcd72f37b13..96c4963fe073 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -4269,6 +4269,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* 
pState,
 
 if (comphelper::LibreOfficeKit::isActive() && 
pActiveViewSh)
 {
+UpdateActiveView();
 EditView* pActiveView = pTopView ? pTopView : 
pTableView;
 ESelection aSel = pActiveView ? 
pActiveView->GetSelection() : ESelection();
 
commit adaae622b67f525e0fb58af848a7cece8ac65f45
Author: Luigi Iucci 
AuthorDate: Wed Jun 21 10:16:16 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 28 13:10:52 2023 +0200

problem pasting to calc an image copied from firefox (windows)

Calc tries to paste the image as html.
In case both HTML_SIMPLE and BITMAP flavors are present in
the clipboard, we paste as BITMAP

Change-Id: I2527bedf11eb6986b58329acaf360a397af03101
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153614
Tested-by: Jenkins
Reviewed-by: Henry Castro 
(cherry picked from commit 46fa17b70db0d543518dde52908f46c85838ac12)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153668
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index a3d5c01e370f..8a9b489833fc 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -597,6 +597,8 @@ void ScViewFunc::PasteFromSystem()
 PasteFromSystem(SotClipboardFormatId::RICHTEXT);
 else if (aDataHelper.HasFormat(SotClipboardFormatId::HTML))
 PasteFromSystem(SotClipboardFormatId::HTML);
+else if (aDataHelper.HasFormat(SotClipboardFormatId::BITMAP))
+PasteFromSystem(SotClipboardFormatId::BITMAP);
 else if 
(aDataHelper.HasFormat(SotClipboardFormatId::HTML_SIMPLE))
 PasteFromSystem(SotClipboardFormatId::HTML_SIMPLE);
 else if (aDataHelper.HasFormat(SotClipboardFormatId::SYLK))
commit 170a3cfa47e2e4ec83ec91d654601894e246b9d2
Author: Armin Le Grand (allotropia) 
AuthorDate: Tue Jun 27 13:46:51 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 28 13:10:46 2023 +0200

MCGR: tdf#155479 always propagate SVG-flag for sub-content metafiles

For SVG export it is necessary to always propagate the SVG-flag for
metafiles in *any* case impDumpToMetaFile is used and a new metafile
gets created (aContentMetafile here).
This is due to the subContent again may have any combinations of
gradients/transparenceGradients that are non-vcl-renderable and need
special handling.

Change-Id: I7edee8afa81c0b6f3fb0e183d144c50f29c5bb79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153645
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 
(cherry picked from commit 3b06c1835e9fcbbcdcd6ce2b207301f4f8bb6388)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153666
Reviewed-by: Xisco Fauli 

diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index feb30d33e1ed..e55055024159 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -2293,6 +2293,11 @@ void 
VclMetafileProcessor2D::processUnifiedTransparencePrimitive2D(
 
 // various content, create content-metafile
 GDIMetaFile aContentMetafile;
+
+// tdf#155479 always forward propagate SVG flag for 
sub-content,
+// it may contain cannotBeHandledByVCL gradients or 
transparencyGradients
+
aContentMetafile.setSVG(mpOutputDevice->GetConnectMetaFile()->getSVG());
+
 const tools::Rectangle aPrimitiveRectangle(
 impDumpToMetaFile(

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

2023-06-28 Thread Regina Henschel (via logerrit)
 sd/source/ui/sidebar/SlideBackground.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 2283c4b74eac46ff727145da0a7e593bcc3eae3e
Author: Regina Henschel 
AuthorDate: Tue Jun 27 10:50:23 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 28 13:09:59 2023 +0200

tdf#145130 Keep existing gradient geometry using sidebar

When setting the start or end color of a gradient of a slide using the
sidebar, the new colors were set to a default gradient instead of using
the existing one.

Change-Id: I0212d2d88e7eb144334308dedd057958ae0a8287
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153634
Tested-by: Jenkins
Reviewed-by: Regina Henschel 
(cherry picked from commit 9321f8602ec903e1e311b831da0504826e1e4f90)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153667
Reviewed-by: Xisco Fauli 

diff --git a/sd/source/ui/sidebar/SlideBackground.cxx 
b/sd/source/ui/sidebar/SlideBackground.cxx
index ebdbf0977505..6cd8d6b4c858 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -1133,7 +1133,8 @@ IMPL_LINK_NOARG(SlideBackground, FillColorHdl, 
ColorListBox&, void)
 break;
 case drawing::FillStyle_GRADIENT:
 {
-basegfx::BGradient aGradient(createColorStops());
+basegfx::BGradient aGradient = GetGradientSetOrDefault();
+aGradient.SetColorStops(createColorStops());
 
 // the name doesn't really matter, it'll be converted to unique 
one eventually,
 // but it has to be non-empty


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

2023-06-28 Thread Dennis Francis (via logerrit)
 sc/Library_scfilt.mk |1 
 sc/source/filter/inc/patterncache.hxx|   46 +++
 sc/source/filter/inc/stylesbuffer.hxx|5 ++
 sc/source/filter/oox/patterncache.cxx|   52 +++
 sc/source/filter/oox/sheetdatabuffer.cxx |6 ++-
 sc/source/filter/oox/stylesbuffer.cxx|   23 +
 6 files changed, 124 insertions(+), 9 deletions(-)

New commits:
commit 64dbb50e028e56c224a55affbc17277da40b659e
Author: Dennis Francis 
AuthorDate: Wed Jun 7 11:34:56 2023 +0530
Commit: Caolán McNamara 
CommitDate: Wed Jun 28 13:05:11 2023 +0200

sc: perf: speedup sheets with lots of repetitive...

row styles using a small cache of already allocated patterns that are
tied to extended format id and number format id.

Change-Id: I3136aef9a034635924f7b7b6d2432f9ae5c2bd15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152692
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153588
Reviewed-by: Caolán McNamara 

diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk
index eff7cca485e4..4614e8889ba1 100644
--- a/sc/Library_scfilt.mk
+++ b/sc/Library_scfilt.mk
@@ -188,6 +188,7 @@ $(eval $(call gb_Library_add_exception_objects,scfilt,\
sc/source/filter/oox/numberformatsbuffer \
sc/source/filter/oox/ooxformulaparser \
sc/source/filter/oox/pagesettings \
+   sc/source/filter/oox/patterncache \
sc/source/filter/oox/pivotcachebuffer \
sc/source/filter/oox/pivotcachefragment \
sc/source/filter/oox/pivottablebuffer \
diff --git a/sc/source/filter/inc/patterncache.hxx 
b/sc/source/filter/inc/patterncache.hxx
new file mode 100644
index ..3962dccc37da
--- /dev/null
+++ b/sc/source/filter/inc/patterncache.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include 
+
+class ScPatternAttr;
+
+static constexpr sal_Int32 nPatternCacheSize = 16;
+class ScPatternCache
+{
+struct Entry
+{
+sal_Int32 nXfId;
+sal_Int32 nNumFmtId;
+ScPatternAttr* pPattern;
+
+Entry();
+};
+
+Entry maEntries[nPatternCacheSize];
+sal_Int32 nNextPos;
+
+public:
+ScPatternCache();
+
+ScPatternAttr* query(sal_Int32 nXfId, sal_Int32 nNumFmtId) const;
+void add(sal_Int32 nXfId, sal_Int32 nNumFmtId, ScPatternAttr* pPattern);
+};
diff --git a/sc/source/filter/inc/stylesbuffer.hxx 
b/sc/source/filter/inc/stylesbuffer.hxx
index 4d9e7aeed33d..2cc7590dbcde 100644
--- a/sc/source/filter/inc/stylesbuffer.hxx
+++ b/sc/source/filter/inc/stylesbuffer.hxx
@@ -35,6 +35,8 @@
 #include 
 #include 
 
+class ScPatternCache;
+
 namespace oox { class SequenceInputStream; }
 
 namespace oox { class PropertySet;
@@ -623,7 +625,8 @@ public:
 const Alignment& getAlignment() const { return maAlignment; }
 
 void applyPatternToAttrList(
-AttrList& rAttrs, SCROW nRow1, SCROW nRow2, sal_Int32 nForceScNumFmt );
+AttrList& rAttrs, SCROW nRow1, SCROW nRow2, sal_Int32 nXfId,
+sal_Int32 nForceScNumFmt, ScPatternCache& rCache );
 
 void writeToDoc( ScDocumentImport& rDoc, const ScRange& rRange );
 
diff --git a/sc/source/filter/oox/patterncache.cxx 
b/sc/source/filter/oox/patterncache.cxx
new file mode 100644
index ..2431a36fed20
--- /dev/null
+++ b/sc/source/filter/oox/patterncache.cxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ow

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source

2023-06-28 Thread Michael Stahl (via logerrit)
 sfx2/source/view/viewfrm.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 61b0c6605932873ccf8ef321cbb41464d366cb70
Author: Michael Stahl 
AuthorDate: Tue Jun 27 19:50:51 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Jun 28 12:52:48 2023 +0200

tdf#146547 sfx2: preserve modified state from read-only to editable

SfxViewFrame::ExecReload_Impl() calls DoSaveCompleted() which resets the
modified state, but in this case the document wasn't actually saved.

Change-Id: I54f6508a652cc42a127bc59058c5b435dd1a25a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153676
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 79241a1fd32ab03cd2bb34fb303ce7f2fa93e57e)

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 2b39c4b1ef3c..bbfb37e5291d 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -330,9 +330,12 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 m_pFrame->RemoveInfoBar("readonly");
 if (m_pMed)
 {
+bool const 
isEnableSetModified(m_pSh->IsEnableSetModified());
+m_pSh->EnableSetModified(false);
 // tdf#116066: DoSaveCompleted should be called 
after SetReadOnlyUI
 m_pSh->DoSaveCompleted(m_pMed);
 m_pSh->Broadcast(SfxHint(SfxHintId::ModeChanged));
+m_pSh->EnableSetModified(isEnableSetModified);
 }
 }
 }


[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sfx2/source

2023-06-28 Thread Michael Stahl (via logerrit)
 sfx2/source/view/viewfrm.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 5aa1fee57e362a08d65dd814f5a29e680d3ea24b
Author: Michael Stahl 
AuthorDate: Tue Jun 27 19:50:51 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Jun 28 12:51:38 2023 +0200

tdf#146547 sfx2: preserve modified state from read-only to editable

SfxViewFrame::ExecReload_Impl() calls DoSaveCompleted() which resets the
modified state, but in this case the document wasn't actually saved.

Change-Id: I54f6508a652cc42a127bc59058c5b435dd1a25a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153676
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 79241a1fd32ab03cd2bb34fb303ce7f2fa93e57e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153695

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index f6e8378290ed..e144de203958 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -308,9 +308,12 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 m_pFrame->RemoveInfoBar(u"readonly");
 if (m_pMed)
 {
+bool const 
isEnableSetModified(m_pSh->IsEnableSetModified());
+m_pSh->EnableSetModified(false);
 // tdf#116066: DoSaveCompleted should be called 
after SetReadOnlyUI
 m_pSh->DoSaveCompleted(m_pMed);
 m_pSh->Broadcast(SfxHint(SfxHintId::ModeChanged));
+m_pSh->EnableSetModified(isEnableSetModified);
 }
 }
 }


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

2023-06-28 Thread Mike Kaganski (via logerrit)
 svl/source/items/srchitem.cxx |  252 ++
 1 file changed, 110 insertions(+), 142 deletions(-)

New commits:
commit dbd0f224cfaf669ccfcbf300ccc0c11c904ec037
Author: Mike Kaganski 
AuthorDate: Wed Jun 28 12:08:16 2023 +0300
Commit: Mike Kaganski 
CommitDate: Wed Jun 28 12:43:01 2023 +0200

Simplify SvxSearchItem::PutValue a bit

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

diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx
index d3b2fad7c216..e8447dbb209c 100644
--- a/svl/source/items/srchitem.cxx
+++ b/svl/source/items/srchitem.cxx
@@ -31,6 +31,8 @@
 #include 
 #include 
 
+#include 
+
 using namespace utl;
 using namespace com::sun::star;
 using namespace com::sun::star::beans;
@@ -489,191 +491,157 @@ bool SvxSearchItem::QueryValue( css::uno::Any& rVal, 
sal_uInt8 nMemberId ) const
 bool SvxSearchItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId )
 {
 nMemberId &= ~CONVERT_TWIPS;
-bool bRet = false;
-sal_Int32 nInt = 0;
+auto ExtractNumericAny = [](const css::uno::Any& a, auto& target)
+{
+sal_Int32 nInt;
+if (!(a >>= nInt))
+return false;
+target = static_cast>(nInt);
+return true;
+};
 switch ( nMemberId )
 {
 case 0 :
 {
 Sequence< PropertyValue > aSeq;
-if ( ( rVal >>= aSeq ) && ( aSeq.getLength() == SRCH_PARAMS ) )
+if (!(rVal >>= aSeq) || aSeq.getLength() != SRCH_PARAMS)
+break;
+std::unordered_set aConvertedParams;
+for (const auto& rProp : aSeq)
 {
-sal_Int16 nConvertedCount( 0 );
-for ( const auto& rProp : std::as_const(aSeq) )
+if (rProp.Name == SRCH_PARA_OPTIONS)
 {
-if ( rProp.Name == SRCH_PARA_OPTIONS )
-{
-css::util::SearchOptions2 nTmpSearchOpt2;
-if ( rProp.Value >>= nTmpSearchOpt2 )
-{
-m_aSearchOpt = nTmpSearchOpt2;
-++nConvertedCount;
-}
-}
-else if ( rProp.Name == SRCH_PARA_FAMILY )
-{
-sal_uInt16 nTemp( 0 );
-if ( rProp.Value >>= nTemp )
-{
-m_eFamily = SfxStyleFamily( nTemp );
-++nConvertedCount;
-}
-}
-else if ( rProp.Name == SRCH_PARA_COMMAND )
-{
-sal_uInt16 nTmp;
-if ( rProp.Value >>= nTmp )
-{
-m_nCommand = static_cast(nTmp);
-++nConvertedCount;
-}
-}
-else if ( rProp.Name == SRCH_PARA_CELLTYPE )
+if (css::util::SearchOptions2 nTmpSearchOpt2; rProp.Value 
>>= nTmpSearchOpt2)
 {
-sal_uInt16 nTmp;
-if ( rProp.Value >>= nTmp )
-{
-m_nCellType = static_cast(nTmp);
-++nConvertedCount;
-}
-}
-else if ( rProp.Name == SRCH_PARA_APPFLAG )
-{
-sal_uInt16 nTmp;
-if ( rProp.Value >>= nTmp )
-{
-m_nAppFlag = static_cast(nTmp);
-++nConvertedCount;
-}
-}
-else if ( rProp.Name == SRCH_PARA_ROWDIR )
-{
-if ( rProp.Value >>= m_bRowDirection )
-++nConvertedCount;
-}
-else if ( rProp.Name == SRCH_PARA_ALLTABLES )
-{
-if ( rProp.Value >>= m_bAllTables )
-++nConvertedCount;
-}
-else if ( rProp.Name == SRCH_PARA_SEARCHFILTERED )
-{
-if ( rProp.Value >>= m_bSearchFiltered )
-++nConvertedCount;
-}
-else if ( rProp.Name == SRCH_PARA_SEARCHFORMATTED )
-{
-if ( rProp.Value >>= m_bSearchFormatted )
-++nConvertedCount;
-}
-else if ( rProp.Name == SRCH_PARA_BACKWARD )
-{
-if ( rProp.Value 

[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - include/xmloff sd/source xmloff/qa xmloff/source

2023-06-28 Thread Michael Stahl (via logerrit)
 include/xmloff/xmlimp.hxx |1 
 sd/source/filter/xml/sdxmlwrp.cxx |2 
 xmloff/qa/unit/uxmloff.cxx|   63 +++--
 xmloff/source/core/xmlimp.cxx |   80 --
 xmloff/source/meta/xmlmetai.cxx   |4 -
 5 files changed, 88 insertions(+), 62 deletions(-)

New commits:
commit 1de65a9dcd1788c505303e489e5b7314d3a4e153
Author: Michael Stahl 
AuthorDate: Tue Jun 27 14:50:02 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Jun 28 12:10:42 2023 +0200

xmloff: ODF import: adapt generator parsing to 2-digit major versions

DocumentInfo currently assumes that a LO version encoded in "BuildId"
property has only 1 digit major version, which is now wrong and would
start to give incorrect results when major version "30" will be detected
as LO_3x.

Add the dots as separators into the BuildId because it's not going to
work without.

Change-Id: I8918afe3642cbefa8488c57658f1505c9a20eddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153649
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit b1ce8bb078904db1df542f7a1c2ed527dde1a2d3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153694

diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 3287911f1112..664e26056cef 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -554,6 +554,7 @@ public:
 static const sal_uInt16 LO_6x = 60 | LO_flag;
 static const sal_uInt16 LO_63x = 63 | LO_flag;
 static const sal_uInt16 LO_7x = 70 | LO_flag;
+static const sal_uInt16 LO_New = 100 | LO_flag;
 static const sal_uInt16 ProductVersionUnknown = SAL_MAX_UINT16;
 
 /** depending on whether the generator version indicates LO, compare
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx 
b/sd/source/filter/xml/sdxmlwrp.cxx
index 43c3d0d7766d..91b02e67e525 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -693,7 +693,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
 if( !sBuildId.isEmpty() )
 {
 sal_Int32 nIndex = sBuildId.indexOf('$');
-if( nIndex != -1 )
+if (sBuildId.indexOf(';') == -1 && nIndex != -1)
 {
 sal_Int32 nUPD = o3tl::toInt32(sBuildId.subView( 0, 
nIndex ));
 
diff --git a/xmloff/qa/unit/uxmloff.cxx b/xmloff/qa/unit/uxmloff.cxx
index 86c98989d8cb..d87a3e86eeec 100644
--- a/xmloff/qa/unit/uxmloff.cxx
+++ b/xmloff/qa/unit/uxmloff.cxx
@@ -171,33 +171,35 @@ void Test::testMetaGenerator()
 { "OpenOffice/4.1.4$Unix OpenOffice.org_project/414m2$Build-9785", 
"414$9785", SvXMLImport::AOO_4x },
 
 // LO versions
-{ "LibreOffice/3.3$Linux LibreOffice_project/330m17$Build-3", 
"330$3;33", SvXMLImport::LO_3x },
-{ "BrOffice/3.3$Win32 LibreOffice_project/330m19$Build-8", "330$8;33", 
SvXMLImport::LO_3x },
-{ "LibreOffice/3.4$Linux LibreOffice_project/340m1$Build-1206", 
"340$1206;34", SvXMLImport::LO_3x },
-{ "LibreOffice/3.5$Linux_X86_64 
LibreOffice_project/3fa2330-e49ffd2-90d118b-705e248-051e21c", ";35", 
SvXMLImport::LO_3x },
-{ "LibreOffice/3.6$Windows_x86 
LibreOffice_project/a9a0717-273e462-768e6e3-978247f-65e65f", ";36", 
SvXMLImport::LO_3x },
-{ "LibreOffice/4.0.2.2$Windows_x86 
LibreOffice_project/4c82dcdd6efcd48b1d8bba66bfe1989deee49c3", ";4022", 
SvXMLImport::LO_41x },
-{ "LibreOffice/4.1.2.3$MacOSX_x86 
LibreOffice_project/40b2d7fde7e8d2d7bc5a449dc65df4d08a7dd38", ";4123", 
SvXMLImport::LO_41x },
-{ "LibreOffice/4.2.8.2$Windows_x86 
LibreOffice_project/48d50dbfc06349262c9d50868e5c1f630a573ebd", ";4282", 
SvXMLImport::LO_42x },
-{ "LibreOffice_from_Collabora_4.2-8/4.2.10.8$Linux_x86 
LibreOffice_project/84584cc237b2eb93f7684d8fcd063bb37e87b5fb", ";42108", 
SvXMLImport::LO_42x },
-{ "LibreOffice/4.3.3.2$Linux_x86 
LibreOffice_project/9bb7eadab57b6755b1265afa86e04bf45fbfc644", ";4332", 
SvXMLImport::LO_43x },
-{ "LibreOffice_from_Collabora_4.4-10/4.4.10.9$Linux_x86 
LibreOffice_project/5600b19b88a01bbb669b0900100760758dff8c26", ";44109", 
SvXMLImport::LO_44x },
-{ "LibreOffice/4.3.3.2$Linux_X86_64 
LibreOffice_project/430m0$Build-2", "430$2;4332", SvXMLImport::LO_43x },
-{ "LibreOffice/4.4.3.2$Linux_x86 
LibreOffice_project/88805f81e9fe61362df02b9941de8e38a9b5fd16", ";4432", 
SvXMLImport::LO_44x },
-{ "LibreOffice/5.0.1.1$Linux_x86 LibreOffice_project/00m0$Build-1", 
"00$1;5011", SvXMLImport::LO_5x },
-{ "LibreOffice/5.0.3.2$Windows_X86_64 
LibreOffice_project/e5f16313668ac592c1bfb310f4390624e3dbfb75", ";5032", 
SvXMLImport::LO_5x },
-{ "Collabora_Office/5.0.10.19$Linux_X86_64 
LibreOffice_project/95060d44300d8866fa81c16fc8fe2afe22d63777", ";501019", 
SvXMLImport::LO_5x },
-{ "LibreOffice/5.1.6.2.0$Linux_X86_64 LibreOffice_

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - oox/inc oox/source sd/qa

2023-06-28 Thread Tibor Nagy (via logerrit)
 oox/inc/drawingml/fillproperties.hxx|2 
 oox/source/drawingml/fillproperties.cxx |   89 ++--
 oox/source/drawingml/shape.cxx  |5 +
 oox/source/ppt/slidepersist.cxx |7 ++
 sd/qa/unit/data/pptx/tdf153466.pptx |binary
 sd/qa/unit/import-tests.cxx |   23 
 6 files changed, 110 insertions(+), 16 deletions(-)

New commits:
commit d9e0c76a845857cc8fba32df01aadb5ac36541f6
Author: Tibor Nagy 
AuthorDate: Wed Mar 8 16:26:10 2023 +0100
Commit: Aron Budea 
CommitDate: Wed Jun 28 12:02:06 2023 +0200

tdf#153466 PPTX import: fix "Custom position/size" background image

Custom sized background with the value "tile" was imported as
"stretched", losing the preset size. Restore also the exported
preset positions, and map the other values to the preset positions
supported by OpenDocument/Impress.

Follow-up to commit 11451781d4c562f506a3aae3732e35b92387b4db
(tdf#153105 PPTX export: fix "Custom position/size" background image)

Change-Id: Ibf9b487ecd31b3ad7b06bda668c51e6b7a98c4af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148482
Tested-by: László Németh 
Reviewed-by: László Németh 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153581
Reviewed-by: Jaume Pujantell 
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/oox/inc/drawingml/fillproperties.hxx 
b/oox/inc/drawingml/fillproperties.hxx
index 532cb0ec3975..e4dddac659d9 100644
--- a/oox/inc/drawingml/fillproperties.hxx
+++ b/oox/inc/drawingml/fillproperties.hxx
@@ -24,6 +24,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -145,6 +146,7 @@ struct FillProperties
 const GraphicHelper& rGraphicHelper,
 sal_Int32 nShapeRotation = 0,
 ::Color nPhClr = API_RGB_TRANSPARENT,
+const css::awt::Size& rSize = {},
 sal_Int16 nPhClrTheme = -1,
 bool bFlipH = false,
 bool bFlipV = false,
diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index 50439e5458b5..6026af2773c3 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -391,9 +391,10 @@ Color FillProperties::getBestSolidColor() const
 return aSolidColor;
 }
 
-void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
-const GraphicHelper& rGraphicHelper, sal_Int32 nShapeRotation, ::Color 
nPhClr, sal_Int16 nPhClrTheme,
-bool bFlipH, bool bFlipV, bool bIsCustomShape) const
+void FillProperties::pushToPropMap(ShapePropertyMap& rPropMap, const 
GraphicHelper& rGraphicHelper,
+   sal_Int32 nShapeRotation, ::Color nPhClr,
+   const css::awt::Size& rSize, sal_Int16 
nPhClrTheme, bool bFlipH,
+   bool bFlipV, bool bIsCustomShape) const
 {
 if( !moFillType.has() )
 return;
@@ -789,7 +790,6 @@ void FillProperties::pushToPropMap( ShapePropertyMap& 
rPropMap,
 {
 // bitmap mode (single, repeat, stretch)
 BitmapMode eBitmapMode = lclGetBitmapMode( 
maBlipProps.moBitmapMode.get( XML_TOKEN_INVALID ) );
-rPropMap.setProperty( ShapeProperty::FillBitmapMode, 
eBitmapMode );
 
 // additional settings for repeated bitmap
 if( eBitmapMode == BitmapMode_REPEAT )
@@ -836,21 +836,82 @@ void FillProperties::pushToPropMap( ShapePropertyMap& 
rPropMap,
 // Negative GraphicCrop values means "crop" here.
 bool bNeedCrop = aGraphCrop.Left <= 0 && 
aGraphCrop.Right <= 0 && aGraphCrop.Top <= 0 && aGraphCrop.Bottom <= 0;
 
-if(bIsCustomShape && bHasCropValues && bNeedCrop)
+if (bHasCropValues)
 {
-// Physically crop the image
-// In this case, don't set the 
PROP_GraphicCrop because that
-// would lead to applying the crop twice after 
roundtrip
-xGraphic = lclCropGraphic(xGraphic, 
CropQuotientsFromFillRect(aFillRect));
-if 
(rPropMap.supportsProperty(ShapeProperty::FillBitmapName))
-
rPropMap.setProperty(ShapeProperty::FillBitmapName, xGraphic);
+if (bIsCustomShape && bNeedCrop)
+{
+// Physically crop the image
+// In this case, don't set the 
PROP_GraphicCrop because that
+// would lead to applying the crop twice 
after ro

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

2023-06-28 Thread Tibor Nagy (via logerrit)
 sd/qa/uitest/data/tdf155863.odp |binary
 sd/qa/uitest/impress_tests/tdf155863.py |   34 
 svx/source/svdraw/svdograf.cxx  |   24 ++
 3 files changed, 45 insertions(+), 13 deletions(-)

New commits:
commit 257dbf548a4f844422d793b240e44844b3eb7aea
Author: Tibor Nagy 
AuthorDate: Fri Jun 16 09:34:29 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Jun 28 11:28:12 2023 +0200

tdf#155863 sd: fix resizing of cropped images to original size

Resizing with the function "Original Size" (e.g. in the context menu) 
resulted distortion in case of cropped images, if the original image
and its cropping have different aspect ratios. Now zoom the cropped
image to the original resolution instead of stretching it to the
same size.

Change-Id: I5e59f8b48dc03844a739c3eb803e3195a12d9c6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153170
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit a4e12cbfc69cfe668fa30756a3c5843e911e22b1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153342
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/sd/qa/uitest/data/tdf155863.odp b/sd/qa/uitest/data/tdf155863.odp
new file mode 100644
index ..2ae286c05d31
Binary files /dev/null and b/sd/qa/uitest/data/tdf155863.odp differ
diff --git a/sd/qa/uitest/impress_tests/tdf155863.py 
b/sd/qa/uitest/impress_tests/tdf155863.py
new file mode 100644
index ..bce8936a3d40
--- /dev/null
+++ b/sd/qa/uitest/impress_tests/tdf155863.py
@@ -0,0 +1,34 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+
+class tdf155863(UITestCase):
+def test_tdf155863(self):
+# This document contains an image with an original size of 7.99cm x 
5.74cm.
+# The image has been cropped 0.8cm on the left, 3.59cm on the right, 
0.99cm at the top,
+# and 0.75cm at the bottom.
+# Also, it has been resized to a width of 2.1cm and a height of 2.33cm.
+with self.ui_test.load_file(get_url_for_data_file("tdf155863.odp")) as 
document:
+xImpressDoc = self.xUITest.getTopFocusWindow()
+xEditWin = xImpressDoc.getChild("impress_win")
+
+# select the image on the first slide
+xEditWin.executeAction("SELECT", 
mkPropertyValues({"OBJECT":"Image"}))
+
+# click "Original Size"
+self.xUITest.executeCommand(".uno:OriginalSize")
+
+# tdf#155863: Without the fix in place, the image will be 
distorted due to the wrong size.
+self.assertEqual(3597, 
document.DrawPages[0].getByIndex(0).Size.Width)
+self.assertEqual(3998, 
document.DrawPages[0].getByIndex(0).Size.Height)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 1c1be8a7a69a..946cbee0ba0d 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -480,23 +480,21 @@ Size SdrGrafObj::getOriginalSize() const
 {
 Size aSize = GetGrafPrefSize();
 
-if (aGrafInfo.IsCropped())
-{
-const tools::Long 
aCroppedTop(OutputDevice::LogicToLogic(aGrafInfo.GetTopCrop(), 
getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
-const tools::Long 
aCroppedBottom(OutputDevice::LogicToLogic(aGrafInfo.GetBottomCrop(), 
getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
-const tools::Long 
aCroppedLeft(OutputDevice::LogicToLogic(aGrafInfo.GetLeftCrop(), 
getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
-const tools::Long 
aCroppedRight(OutputDevice::LogicToLogic(aGrafInfo.GetRightCrop(), 
getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
-const tools::Long aCroppedWidth(aSize.getWidth() - aCroppedLeft + 
aCroppedRight);
-const tools::Long aCroppedHeight(aSize.getHeight() - aCroppedTop + 
aCroppedBottom);
-
-aSize = Size ( aCroppedWidth, aCroppedHeight);
-}
-
-if ( GetGrafPrefMapMode().GetMapUnit() == MapUnit::MapPixel )
+if (GetGrafPrefMapMode().GetMapUnit() == MapUnit::MapPixel)
 aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, 
MapMode(getSdrModelFromSdrObject().GetScaleUnit()));
 else
 aSize = OutputDevice::LogicToLogic(aSize, GetGrafPrefMapMode(), 
MapMode(getSdrModelFromSdrObject().GetScaleUnit()));
 
+if (aGrafInfo.IsCropped(

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

2023-06-28 Thread Michael Stahl (via logerrit)
 sfx2/source/view/viewfrm.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 79241a1fd32ab03cd2bb34fb303ce7f2fa93e57e
Author: Michael Stahl 
AuthorDate: Tue Jun 27 19:50:51 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Jun 28 11:23:22 2023 +0200

tdf#146547 sfx2: preserve modified state from read-only to editable

SfxViewFrame::ExecReload_Impl() calls DoSaveCompleted() which resets the
modified state, but in this case the document wasn't actually saved.

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

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 6cde535cc3c3..196a18d3d335 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -308,9 +308,12 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 m_pFrame->RemoveInfoBar(u"readonly");
 if (m_pMed)
 {
+bool const 
isEnableSetModified(m_pSh->IsEnableSetModified());
+m_pSh->EnableSetModified(false);
 // tdf#116066: DoSaveCompleted should be called 
after SetReadOnlyUI
 m_pSh->DoSaveCompleted(m_pMed);
 m_pSh->Broadcast(SfxHint(SfxHintId::ModeChanged));
+m_pSh->EnableSetModified(isEnableSetModified);
 }
 }
 }


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

2023-06-28 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk |1 
 sw/qa/api/SwXFootnoteText.cxx |  118 ++
 2 files changed, 119 insertions(+)

New commits:
commit 50e154fe5cea061a1b820ab2135d4d60b7bc1bc9
Author: anfanite396 
AuthorDate: Mon Jun 26 19:50:13 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 28 11:13:20 2023 +0200

Move SwXFootnoteText Java tests to C++

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

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index f3c0c76bc91a..9960dc51 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -21,6 +21,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXDocumentSettings \
 sw/qa/api/SwXFootnoteProperties \
 sw/qa/api/SwXTextFrame \
+sw/qa/api/SwXFootnoteText \
 sw/qa/api/SwXTextField \
 sw/qa/api/SwXTextTable \
 ))
diff --git a/sw/qa/api/SwXFootnoteText.cxx b/sw/qa/api/SwXFootnoteText.cxx
new file mode 100644
index ..9e8bab00c544
--- /dev/null
+++ b/sw/qa/api/SwXFootnoteText.cxx
@@ -0,0 +1,118 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXFootnoteText.
+ */
+class SwXFootnoteText final : public test::BootstrapFixture,
+  public unotest::MacrosTest,
+  public apitest::XElementAccess,
+  public apitest::XSimpleText,
+  public apitest::XTextRange,
+  public apitest::XText,
+  public apitest::XEnumerationAccess
+{
+public:
+SwXFootnoteText();
+virtual void setUp() override;
+void tearDown() override;
+
+Reference init() override;
+Reference getTextContent() override { return 
mxTextContent; };
+
+CPPUNIT_TEST_SUITE(SwXFootnoteText);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST(testCreateTextCursor);
+CPPUNIT_TEST(testCreateTextCursorByRange);
+CPPUNIT_TEST(testInsertString);
+CPPUNIT_TEST(testInsertControlCharacter);
+CPPUNIT_TEST(testGetEnd);
+CPPUNIT_TEST(testGetSetString);
+CPPUNIT_TEST(testGetStart);
+CPPUNIT_TEST(testGetText);
+// CPPUNIT_TEST(testInsertRemoveTextContent);
+CPPUNIT_TEST(testCreateEnumeration);
+CPPUNIT_TEST_SUITE_END();
+
+private:
+Reference component_;
+Reference mxTextContent;
+};
+
+SwXFootnoteText::SwXFootnoteText()
+: XElementAccess(cppu::UnoType::get())
+{
+}
+
+void SwXFootnoteText::setUp()
+{
+test::BootstrapFixture::setUp();
+mxDesktop.set(
+
frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory(;
+}
+
+void SwXFootnoteText::tearDown()
+{
+if (component_.is())
+component_->dispose();
+
+test::BootstrapFixture::tearDown();
+}
+
+Reference SwXFootnoteText::init()
+{
+component_ = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+Reference xTextDocument(component_, UNO_QUERY_THROW);
+Reference xMSF(component_, UNO_QUERY_THROW);
+
+Reference 
xFootnote(xMSF->createInstance("com.sun.star.text.Footnote"),
+ UNO_QUERY_THROW);
+
+Reference xText = xTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+
+xText->insertTextContent(xCursor, xFootnote, false);
+
+Reference xFootText(xFootnote, UNO_QUERY_THROW);
+xFootText->setString("SwXFootnoteText");
+mxTextContent = Reference(
+xMSF->createInstance("com.sun.star.text.Footnote"), UNO_QUERY_THROW);
+
+return Reference(xFootText->getText(), UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXFootnoteText);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - svgio/inc svgio/Library_svgio.mk svgio/qa svgio/source

2023-06-28 Thread Xisco Fauli (via logerrit)
 svgio/Library_svgio.mk|1 
 svgio/inc/svgfefloodnode.hxx  |   49 +++
 svgio/inc/svgtoken.hxx|3 
 svgio/qa/cppunit/SvgImportTest.cxx|   18 ++
 svgio/qa/cppunit/data/filterFeFlood.svg   |   16 ++
 svgio/source/svgreader/svgdocumenthandler.cxx |   11 +
 svgio/source/svgreader/svgfefloodnode.cxx |  162 ++
 svgio/source/svgreader/svgfilternode.cxx  |6 
 svgio/source/svgreader/svgstyleattributes.cxx |3 
 svgio/source/svgreader/svgtoken.cxx   |5 
 svgio/source/svgreader/svgusenode.cxx |   57 -
 11 files changed, 298 insertions(+), 33 deletions(-)

New commits:
commit c19c3f7a9e3e2cd2d17f1542e81edbe0c1e373e5
Author: Xisco Fauli 
AuthorDate: Tue Jun 27 23:21:25 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 28 11:12:41 2023 +0200

tdf#156066: Add support for feFlood filter

Change-Id: I4d01d40edd6fb91555fd734fc8378df1cbd5743a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153684
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit 6d99d5dc2c6a98b0f4a10adf9c02e4f1c887c658)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153693

diff --git a/svgio/Library_svgio.mk b/svgio/Library_svgio.mk
index 3702806a311c..20797e339a81 100644
--- a/svgio/Library_svgio.mk
+++ b/svgio/Library_svgio.mk
@@ -61,6 +61,7 @@ $(eval $(call gb_Library_add_exception_objects,svgio,\
 svgio/source/svgreader/svggnode \
 svgio/source/svgreader/svganode \
 svgio/source/svgreader/svgfecolormatrixnode \
+svgio/source/svgreader/svgfefloodnode \
 svgio/source/svgreader/svgfegaussianblurnode \
 svgio/source/svgreader/svgfeoffsetnode \
 svgio/source/svgreader/svgfilternode \
diff --git a/svgio/inc/svgfefloodnode.hxx b/svgio/inc/svgfefloodnode.hxx
new file mode 100644
index ..a8cb2da47e51
--- /dev/null
+++ b/svgio/inc/svgfefloodnode.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include "svgnode.hxx"
+#include "svgstyleattributes.hxx"
+
+namespace svgio::svgreader
+{
+class SvgFeFloodNode final : public SvgNode
+{
+private:
+SvgNumber maX;
+SvgNumber maY;
+SvgNumber maWidth;
+SvgNumber maHeight;
+SvgPaint maFloodColor;
+SvgNumber maFloodOpacity;
+
+public:
+SvgFeFloodNode(SvgDocument& rDocument, SvgNode* pParent);
+virtual ~SvgFeFloodNode() override;
+
+virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken,
+const OUString& aContent) override;
+
+void apply(drawinglayer::primitive2d::Primitive2DContainer& rTarget) const;
+};
+
+} // end of namespace svgio::svgreader
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svgio/inc/svgtoken.hxx b/svgio/inc/svgtoken.hxx
index fb2e04c278f4..239cda0eb4cc 100644
--- a/svgio/inc/svgtoken.hxx
+++ b/svgio/inc/svgtoken.hxx
@@ -81,9 +81,12 @@ namespace svgio::svgreader
 ClipPathNode,
 ClipPathProperty,
 FeColorMatrix,
+FeFlood,
 FeGaussianBlur,
 FeOffset,
 Filter,
+FloodColor,
+FloodOpacity,
 Mask,
 ClipPathUnits,
 MaskUnits,
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index 6ae8fea1850d..c96ea02195f5 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -203,6 +203,24 @@ CPPUNIT_TEST_FIXTURE(Test, testFilterFeOffset)
 assertXPath(pDocument, "/primitive2D/transform/mask/transform", "xy33", 
"1");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testFilterFeFlood)
+{
+Primitive2DSequence aSequenceTdf132246 = 
parseSvg(u"/svgio/qa/cppunit/data/filterFeFlood.svg");
+CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequenceTdf132246.getLength()));
+
+drawinglayer::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = dumper.dumpAndParse(aSequenceTdf132246);
+
+CPPUNIT_ASSERT (pDocument);
+
+assertXPath(pDocument, "/primitive2D/trans

[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - download.lst

2023-06-28 Thread Eike Rathke (via logerrit)
 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 05916bdfe0fa29150f6edb7ea7f2a8d33b76ccb4
Author: Eike Rathke 
AuthorDate: Tue Jun 27 13:39:13 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Jun 28 11:10:02 2023 +0200

Update language-subtag-registry to 2023-05-11

Change-Id: Ieb1c3eab66c06c8e7b3d9751d9e4548dbd7efc04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153643
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit bc82afbfd320ecf5e7ed5dc87d1606b97dd10821)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153665
Reviewed-by: Xisco Fauli 
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index 24b3ae91da00..3e7b6beafda4 100644
--- a/download.lst
+++ b/download.lst
@@ -275,8 +275,8 @@ LIBJPEG_TURBO_TARBALL := libjpeg-turbo-2.1.5.1.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LANGTAGREG_SHA256SUM := 
e2d9224e0e50fc8ad12a3cf47396bbcadf45b2515839d4770432653a88972c00
-LANGTAGREG_TARBALL := language-subtag-registry-2022-08-08.tar.bz2
+LANGTAGREG_SHA256SUM := 
9042b64cd473bf36073513b474046f13778107b57c2ac47fb2633104120d69da
+LANGTAGREG_TARBALL := language-subtag-registry-2023-05-11.tar.bz2
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts


[Libreoffice-commits] core.git: include/i18nutil include/svl include/unotools include/vcl sfx2/source svl/source sw/qa sw/source unotools/source vcl/source

2023-06-28 Thread Mike Kaganski (via logerrit)
 include/i18nutil/searchopt.hxx |  113 -
 include/svl/srchitem.hxx   |   13 ---
 include/unotools/textsearch.hxx|7 --
 include/vcl/textview.hxx   |6 -
 include/vcl/xtextedt.hxx   |4 -
 sfx2/source/doc/SfxRedactionHelper.cxx |2 
 svl/source/items/srchitem.cxx  |   27 +++
 sw/qa/core/macros-test.cxx |4 -
 sw/qa/extras/uiwriter/uiwriter7.cxx|3 
 sw/source/core/crsr/findtxt.cxx|6 -
 sw/source/core/edit/edtox.cxx  |1 
 sw/source/core/unocore/unosrch.cxx |3 
 sw/source/ui/index/swuiidxmrk.cxx  |1 
 sw/source/uibase/uiview/view2.cxx  |2 
 unotools/source/i18n/textsearch.cxx|   39 ---
 vcl/source/edit/textview.cxx   |4 -
 vcl/source/edit/xtextedt.cxx   |6 -
 17 files changed, 85 insertions(+), 156 deletions(-)

New commits:
commit 67c807ada5d7930f262ace9798629c06f0175a86
Author: Mike Kaganski 
AuthorDate: Wed Jun 28 05:47:16 2023 +0300
Commit: Mike Kaganski 
CommitDate: Wed Jun 28 11:06:54 2023 +0200

Drop i18nutil::SearchOptions

It was mostly unused by now, only remained in a couple of function
arguments, where callers actually passed SearchOptions2, and where
internally it was converted back to SearchOptions2.

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

diff --git a/include/i18nutil/searchopt.hxx b/include/i18nutil/searchopt.hxx
index c215da0d296f..0fd5f98676d4 100644
--- a/include/i18nutil/searchopt.hxx
+++ b/include/i18nutil/searchopt.hxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -29,12 +30,42 @@
 namespace i18nutil
 {
 
+inline constexpr css::util::SearchAlgorithms 
downgradeSearchAlgorithms2(sal_Int16 searchAlgorithms2)
+{
+switch (searchAlgorithms2)
+{
+case css::util::SearchAlgorithms2::ABSOLUTE:
+return css::util::SearchAlgorithms_ABSOLUTE;
+case css::util::SearchAlgorithms2::REGEXP:
+return css::util::SearchAlgorithms_REGEXP;
+case css::util::SearchAlgorithms2::APPROXIMATE:
+return css::util::SearchAlgorithms_APPROXIMATE;
+default: // default what?
+case css::util::SearchAlgorithms2::WILDCARD: // something valid
+return css::util::SearchAlgorithms_ABSOLUTE;
+}
+}
+
+inline constexpr sal_Int16 upgradeSearchAlgorithms(css::util::SearchAlgorithms 
searchAlgorithms)
+{
+switch (searchAlgorithms)
+{
+default: // default what?
+case css::util::SearchAlgorithms_ABSOLUTE:
+return css::util::SearchAlgorithms2::ABSOLUTE;
+case css::util::SearchAlgorithms_REGEXP:
+return css::util::SearchAlgorithms2::REGEXP;
+case css::util::SearchAlgorithms_APPROXIMATE:
+return css::util::SearchAlgorithms2::APPROXIMATE;
+}
+}
+
 /**
- * This is a wrapper around com::sun::star::util::SearchOptions
- * but using the more type-safe TransliterationFlags enum.
+ * This is a wrapper around com::sun::star::util::SearchOptions and 
SearchOptions2,
+ * but using the more type-safe TransliterationFlags enum, and without obsolete
+ * algorithmType, which is superseded by AlgorithmType2.
  */
-struct SAL_WARN_UNUSED SearchOptions {
-css::util::SearchAlgorithms algorithmType;
+struct SAL_WARN_UNUSED SearchOptions2 {
 sal_Int32 searchFlag;
 OUString searchString;
 OUString replaceString;
@@ -44,9 +75,11 @@ struct SAL_WARN_UNUSED SearchOptions {
 sal_Int32 insertedChars;
 TransliterationFlags transliterateFlags;
 
-SearchOptions& operator=(css::util::SearchOptions const & other)
+sal_Int16 AlgorithmType2;
+sal_Int32 WildcardEscapeCharacter;
+
+SearchOptions2& operator=(css::util::SearchOptions2 const & other)
 {
-algorithmType = other.algorithmType;
 searchFlag = other.searchFlag;
 searchString = other.searchString;
 replaceString = other.replaceString;
@@ -55,58 +88,14 @@ struct SAL_WARN_UNUSED SearchOptions {
 deletedChars = other.deletedChars;
 insertedChars = other.insertedChars;
 transliterateFlags = 
static_cast(other.transliterateFlags);
-return *this;
-}
-
-SearchOptions()
-: algorithmType(::css::util::SearchAlgorithms_ABSOLUTE)
-, searchFlag(0)
-, changedChars(0)
-, deletedChars(0)
-, insertedChars(0)
-, transliterateFlags(TransliterationFlags::NONE)
-{
-}
-
-SearchOptions(const css::util::SearchAlgorithms& algorithmType_, const 
sal_Int32 searchFlag_,
-   OUString searchString_, OUString replaceString_,
-   css::lang::Locale Locale_,
-   const sal_Int32 changedChars_, const sal_Int32 
deletedChars_, const

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

2023-06-28 Thread Michael Stahl (via logerrit)
 include/xmloff/xmlimp.hxx |1 
 sd/source/filter/xml/sdxmlwrp.cxx |2 
 xmloff/qa/unit/uxmloff.cxx|   63 +++--
 xmloff/source/core/xmlimp.cxx |   80 --
 xmloff/source/meta/xmlmetai.cxx   |4 -
 5 files changed, 88 insertions(+), 62 deletions(-)

New commits:
commit b1ce8bb078904db1df542f7a1c2ed527dde1a2d3
Author: Michael Stahl 
AuthorDate: Tue Jun 27 14:50:02 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Jun 28 11:01:02 2023 +0200

xmloff: ODF import: adapt generator parsing to 2-digit major versions

DocumentInfo currently assumes that a LO version encoded in "BuildId"
property has only 1 digit major version, which is now wrong and would
start to give incorrect results when major version "30" will be detected
as LO_3x.

Add the dots as separators into the BuildId because it's not going to
work without.

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

diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index fda180bb7837..04a46be4c10a 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -554,6 +554,7 @@ public:
 static const sal_uInt16 LO_6x = 60 | LO_flag;
 static const sal_uInt16 LO_63x = 63 | LO_flag;
 static const sal_uInt16 LO_7x = 70 | LO_flag;
+static const sal_uInt16 LO_New = 100 | LO_flag;
 static const sal_uInt16 ProductVersionUnknown = SAL_MAX_UINT16;
 
 /** depending on whether the generator version indicates LO, compare
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx 
b/sd/source/filter/xml/sdxmlwrp.cxx
index f1c2d9d29ffa..099f56ee9e22 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -693,7 +693,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
 if( !sBuildId.isEmpty() )
 {
 sal_Int32 nIndex = sBuildId.indexOf('$');
-if( nIndex != -1 )
+if (sBuildId.indexOf(';') == -1 && nIndex != -1)
 {
 sal_Int32 nUPD = o3tl::toInt32(sBuildId.subView( 0, 
nIndex ));
 
diff --git a/xmloff/qa/unit/uxmloff.cxx b/xmloff/qa/unit/uxmloff.cxx
index 86c98989d8cb..d87a3e86eeec 100644
--- a/xmloff/qa/unit/uxmloff.cxx
+++ b/xmloff/qa/unit/uxmloff.cxx
@@ -171,33 +171,35 @@ void Test::testMetaGenerator()
 { "OpenOffice/4.1.4$Unix OpenOffice.org_project/414m2$Build-9785", 
"414$9785", SvXMLImport::AOO_4x },
 
 // LO versions
-{ "LibreOffice/3.3$Linux LibreOffice_project/330m17$Build-3", 
"330$3;33", SvXMLImport::LO_3x },
-{ "BrOffice/3.3$Win32 LibreOffice_project/330m19$Build-8", "330$8;33", 
SvXMLImport::LO_3x },
-{ "LibreOffice/3.4$Linux LibreOffice_project/340m1$Build-1206", 
"340$1206;34", SvXMLImport::LO_3x },
-{ "LibreOffice/3.5$Linux_X86_64 
LibreOffice_project/3fa2330-e49ffd2-90d118b-705e248-051e21c", ";35", 
SvXMLImport::LO_3x },
-{ "LibreOffice/3.6$Windows_x86 
LibreOffice_project/a9a0717-273e462-768e6e3-978247f-65e65f", ";36", 
SvXMLImport::LO_3x },
-{ "LibreOffice/4.0.2.2$Windows_x86 
LibreOffice_project/4c82dcdd6efcd48b1d8bba66bfe1989deee49c3", ";4022", 
SvXMLImport::LO_41x },
-{ "LibreOffice/4.1.2.3$MacOSX_x86 
LibreOffice_project/40b2d7fde7e8d2d7bc5a449dc65df4d08a7dd38", ";4123", 
SvXMLImport::LO_41x },
-{ "LibreOffice/4.2.8.2$Windows_x86 
LibreOffice_project/48d50dbfc06349262c9d50868e5c1f630a573ebd", ";4282", 
SvXMLImport::LO_42x },
-{ "LibreOffice_from_Collabora_4.2-8/4.2.10.8$Linux_x86 
LibreOffice_project/84584cc237b2eb93f7684d8fcd063bb37e87b5fb", ";42108", 
SvXMLImport::LO_42x },
-{ "LibreOffice/4.3.3.2$Linux_x86 
LibreOffice_project/9bb7eadab57b6755b1265afa86e04bf45fbfc644", ";4332", 
SvXMLImport::LO_43x },
-{ "LibreOffice_from_Collabora_4.4-10/4.4.10.9$Linux_x86 
LibreOffice_project/5600b19b88a01bbb669b0900100760758dff8c26", ";44109", 
SvXMLImport::LO_44x },
-{ "LibreOffice/4.3.3.2$Linux_X86_64 
LibreOffice_project/430m0$Build-2", "430$2;4332", SvXMLImport::LO_43x },
-{ "LibreOffice/4.4.3.2$Linux_x86 
LibreOffice_project/88805f81e9fe61362df02b9941de8e38a9b5fd16", ";4432", 
SvXMLImport::LO_44x },
-{ "LibreOffice/5.0.1.1$Linux_x86 LibreOffice_project/00m0$Build-1", 
"00$1;5011", SvXMLImport::LO_5x },
-{ "LibreOffice/5.0.3.2$Windows_X86_64 
LibreOffice_project/e5f16313668ac592c1bfb310f4390624e3dbfb75", ";5032", 
SvXMLImport::LO_5x },
-{ "Collabora_Office/5.0.10.19$Linux_X86_64 
LibreOffice_project/95060d44300d8866fa81c16fc8fe2afe22d63777", ";501019", 
SvXMLImport::LO_5x },
-{ "LibreOffice/5.1.6.2.0$Linux_X86_64 LibreOffice_project/10$Build-2", 
";51620", SvXMLImport::LO_5x },
-{ "Collabora_Office/5.1.10.17$Linux_X86_64 
LibreOffice_project/a104cbe76e

[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - 2 commits - sc/inc sc/qa sc/source solenv/clang-format

2023-06-28 Thread Tomaž Vajngerl (via logerrit)
 sc/inc/CommonProperties.hxx   |   34 
 sc/inc/unonames.hxx   |5 +
 sc/qa/extras/scstyleobj.cxx   |4 +
 sc/qa/extras/sctablecolumnobj.cxx |4 +
 sc/qa/extras/sctablerowobj.cxx|4 +
 sc/source/filter/inc/stylesbuffer.hxx |4 +
 sc/source/filter/oox/stylesbuffer.cxx |   11 +++-
 sc/source/ui/unoobj/cellsuno.cxx  |   91 +++---
 sc/source/ui/unoobj/styleuno.cxx  |   16 +
 solenv/clang-format/excludelist   |1 
 10 files changed, 89 insertions(+), 85 deletions(-)

New commits:
commit d745003efe8b86c45d72b640d39b83763ceb99f4
Author: Tomaž Vajngerl 
AuthorDate: Fri Jun 23 20:03:27 2023 +0900
Commit: Xisco Fauli 
CommitDate: Wed Jun 28 10:49:11 2023 +0200

sc: import and prop. theme color support for cell borders

Adds import for theme colors for cell borders and UNO properties
for the cell border theme (complex) colors.

Change-Id: I9d8dd7e71f74a623f916e19d59964058f43440bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153502
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153681

diff --git a/sc/inc/CommonProperties.hxx b/sc/inc/CommonProperties.hxx
index 2c7d1e0a080b..4a2931753c79 100644
--- a/sc/inc/CommonProperties.hxx
+++ b/sc/inc/CommonProperties.hxx
@@ -17,4 +17,18 @@
 { SC_UNONAME_CCOLOR, ATTR_FONT_COLOR, cppu::UnoType::get(), 0, 
MID_COLOR_RGB }, \
 { SC_UNONAME_CHAR_COMPLEX_COLOR, ATTR_FONT_COLOR, 
cppu::UnoType::get(), 0, MID_COMPLEX_COLOR }, \
 
+#define CELL_BORDER_PROPERTIES \
+{ SC_UNONAME_BOTTBORDER, ATTR_BORDER, 
cppu::UnoType::get(), 0, BOTTOM_BORDER | CONVERT_TWIPS }, \
+{ SC_UNONAME_BOTTBORDER2, ATTR_BORDER, 
cppu::UnoType::get(), 0, BOTTOM_BORDER | CONVERT_TWIPS }, \
+{ SC_UNONAME_LEFTBORDER, ATTR_BORDER, 
cppu::UnoType::get(), 0, LEFT_BORDER | CONVERT_TWIPS }, \
+{ SC_UNONAME_LEFTBORDER2, ATTR_BORDER, 
cppu::UnoType::get(), 0, LEFT_BORDER | CONVERT_TWIPS }, \
+{ SC_UNONAME_RIGHTBORDER, ATTR_BORDER, 
cppu::UnoType::get(), 0, RIGHT_BORDER | CONVERT_TWIPS }, \
+{ SC_UNONAME_RIGHTBORDER2, ATTR_BORDER, 
cppu::UnoType::get(), 0, RIGHT_BORDER | CONVERT_TWIPS }, \
+{ SC_UNONAME_TOPBORDER, ATTR_BORDER, 
cppu::UnoType::get(), 0, TOP_BORDER | CONVERT_TWIPS }, \
+{ SC_UNONAME_TOPBORDER2, ATTR_BORDER, 
cppu::UnoType::get(), 0, TOP_BORDER | CONVERT_TWIPS }, \
+{ SC_UNONAME_BOTTOM_BORDER_COMPLEX_COLOR, ATTR_BORDER, 
cppu::UnoType::get(), 0, MID_BORDER_BOTTOM_COLOR }, \
+{ SC_UNONAME_LEFT_BORDER_COMPLEX_COLOR, ATTR_BORDER, 
cppu::UnoType::get(), 0, MID_BORDER_LEFT_COLOR }, \
+{ SC_UNONAME_RIGHT_BORDER_COMPLEX_COLOR, ATTR_BORDER, 
cppu::UnoType::get(), 0, MID_BORDER_RIGHT_COLOR }, \
+{ SC_UNONAME_TOP_BORDER_COMPLEX_COLOR, ATTR_BORDER, 
cppu::UnoType::get(), 0, MID_BORDER_TOP_COLOR }, \
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 7a7396a358e4..522582a36fb5 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -133,6 +133,11 @@ inline constexpr OUStringLiteral SC_UNONAME_LEFTBORDER2
  = u"LeftBorder2";
 inline constexpr OUStringLiteral SC_UNONAME_RIGHTBORDER2 = u"RightBorder2";
 inline constexpr OUStringLiteral SC_UNONAME_TOPBORDER2   = u"TopBorder2";
 
+inline constexpr OUStringLiteral SC_UNONAME_BOTTOM_BORDER_COMPLEX_COLOR = 
u"BottomBorderComplexColor";
+inline constexpr OUStringLiteral SC_UNONAME_LEFT_BORDER_COMPLEX_COLOR = 
u"LeftBorderComplexColor";
+inline constexpr OUStringLiteral SC_UNONAME_RIGHT_BORDER_COMPLEX_COLOR = 
u"RightBorderComplexColor";
+inline constexpr OUStringLiteral SC_UNONAME_TOP_BORDER_COMPLEX_COLOR = 
u"TopBorderComplexColor";
+
 inline constexpr OUStringLiteral SC_UNONAME_DIAGONAL_TLBR= u"DiagonalTLBR";
 inline constexpr OUStringLiteral SC_UNONAME_DIAGONAL_BLTR= u"DiagonalBLTR";
 
diff --git a/sc/qa/extras/scstyleobj.cxx b/sc/qa/extras/scstyleobj.cxx
index 813a59db944b..12b3b0ebde8d 100644
--- a/sc/qa/extras/scstyleobj.cxx
+++ b/sc/qa/extras/scstyleobj.cxx
@@ -61,6 +61,7 @@ ScStyleObj::ScStyleObj()
 , XNamed("ScStyleObj")
 , XPropertySet({ "BottomBorder",
  "BottomBorder2",
+ "BottomBorderComplexColor",
  "CellProtection",
  "CharLocale",
  "CharLocaleAsian",
@@ -75,14 +76,17 @@ ScStyleObj::ScStyleObj()
  "HoriJustify",
  "LeftBorder",
  "LeftBorder2",
+ "LeftBorderComplexColor",
  "NumberFormat",
  "Orientation",
  "RightBorder",
  "RightBorder2",
+ "RightBorderComplexColor",
  "ShadowFormat",
  "TableBorder",
  "TopBorder",

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

2023-06-28 Thread Henry Castro (via logerrit)
 sc/source/filter/inc/condformatbuffer.hxx |2 ++
 sc/source/filter/oox/condformatbuffer.cxx |5 +
 sc/source/filter/oox/extlstcontext.cxx|2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 61609fe6a7b6acb51a4e9e9711012a3a7ce3f2b6
Author: Henry Castro 
AuthorDate: Mon Jun 26 10:43:34 2023 -0400
Commit: Xisco Fauli 
CommitDate: Wed Jun 28 10:48:38 2023 +0200

sc: filter: oox: fix crash delete ScDatabarFormatData

Unfortunately, the instance of "ScDatabarFormatData" is
deleted before finalizeImport is called.

The "maEntries" is not usable, the global format buffer is
required to hold the reference.

 #1 0x7f2ef19081c0 in oox::xls::CondFormatBuffer::finalizeImport() 
co-23.05-asan/sc/source/filter/oox/condformatbuffer.cxx:1322:23
#2 0x7f2ef1ba in 
oox::xls::WorksheetGlobals::finalizeWorksheetImport() 
co-23.05-asan/sc/source/filter/oox/worksheethelper.cxx:942:22
#3 0x7f2ef58d030e in 
sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource
 const&) co-23.05-asan/sax/source/fastparser/fastparser.cxx:910:36
#4 0x7f2ef23f0e46 in 
oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource 
const&, bool) co-23.05-asan/oox/source/core/fastparser.cxx:121:15
#5 0x7f2ef23f1544 in

Signed-off-by: Henry Castro 
Change-Id: Ieb3840cc10372867d5462a19d9efa9771f633437
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153601
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153683

diff --git a/sc/source/filter/inc/condformatbuffer.hxx 
b/sc/source/filter/inc/condformatbuffer.hxx
index e62917678b9a..9c8896dbf22a 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -307,6 +307,7 @@ public:
 CondFormatRef   importCondFormatting( SequenceInputStream& rStrm );
 ExtCfDataBarRuleRef createExtCfDataBarRule(ScDataBarFormatData* pTarget);
 std::vector< std::unique_ptr >& importExtCondFormat();
+std::vector >& importExtFormatEntries();
 
 /** Converts an OOXML condition operator token to the API constant. */
 static sal_Int32convertToApiOperator( sal_Int32 nToken );
@@ -324,6 +325,7 @@ private:
 CondFormatVec   maCondFormats;  /// All conditional formatting in 
a sheet.
 ExtCfDataBarRuleVecmaCfRules;  /// All external 
conditional formatting rules in a sheet.
 std::vector< std::unique_ptr > maExtCondFormats;
+std::vector > maExtFormatEntries;
 sal_Int32 mnNonPrioritizedRuleNextPriority = 1048576;
 };
 
diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index 75171441c23d..649c2417f348 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -1376,6 +1376,11 @@ std::vector< std::unique_ptr >& 
CondFormatBuffer::importExtCond
 return maExtCondFormats;
 }
 
+std::vector >& 
CondFormatBuffer::importExtFormatEntries()
+{
+return maExtFormatEntries;
+}
+
 sal_Int32 CondFormatBuffer::convertToApiOperator( sal_Int32 nToken )
 {
 switch( nToken )
diff --git a/sc/source/filter/oox/extlstcontext.cxx 
b/sc/source/filter/oox/extlstcontext.cxx
index 3209c846f9ce..58e4c7931729 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -174,7 +174,7 @@ ContextHandlerRef 
ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl
 {
 auto pFormat = 
std::make_unique(&getScDocument());
 pFormat->SetDataBarData(pInfo);
-maEntries.push_back(std::move(pFormat));
+
getCondFormats().importExtFormatEntries().push_back(std::move(pFormat));
 }
 }
 else


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

2023-06-28 Thread Henry Castro (via logerrit)
 sc/source/filter/oox/extlstcontext.cxx |   18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

New commits:
commit ec44a178dbec1c7e3b7691634204fb2183c161c8
Author: Henry Castro 
AuthorDate: Fri Mar 17 11:07:14 2023 -0400
Commit: Xisco Fauli 
CommitDate: Wed Jun 28 10:48:21 2023 +0200

sc: filter: oox: insert a new entry ScDataBarFormat if Id attribute...

does not exist:


 
  
   0
  
  
   1
  
  
  
  
  
  
 


Signed-off-by: Henry Castro 
Change-Id: Ie2c1ba2c85d9eead963f4d9b1684d72b64fe815d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149069
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153092
Tested-by: Jenkins
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153682

diff --git a/sc/source/filter/oox/extlstcontext.cxx 
b/sc/source/filter/oox/extlstcontext.cxx
index 5328accac5c8..3209c846f9ce 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -165,11 +165,23 @@ ContextHandlerRef 
ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl
 if (aType == "dataBar")
 {
 // an ext entry does not need to have an existing corresponding 
entry
+ScDataBarFormatData* pInfo;
 ExtLst::const_iterator aExt = getExtLst().find( aId );
-if(aExt == getExtLst().end())
-return nullptr;
+if (aExt == getExtLst().end())
+{
+pInfo = new ScDataBarFormatData();
+if (pInfo)
+{
+auto pFormat = 
std::make_unique(&getScDocument());
+pFormat->SetDataBarData(pInfo);
+maEntries.push_back(std::move(pFormat));
+}
+}
+else
+{
+pInfo = aExt->second;
+}
 
-ScDataBarFormatData* pInfo = aExt->second;
 if (!pInfo)
 {
 return nullptr;


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

2023-06-28 Thread Heiko Tietze (via logerrit)
 sw/uiconfig/swriter/menubar/menubar.xml |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c2b5ef0ea307203131fa2718984dd7b96e61e4d9
Author: Heiko Tietze 
AuthorDate: Tue Jun 27 13:28:38 2023 +0200
Commit: Heiko Tietze 
CommitDate: Wed Jun 28 10:11:29 2023 +0200

Related tdf#106556 - Spotlight DF on the main menu

Added to the Format menu

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

diff --git a/sw/uiconfig/swriter/menubar/menubar.xml 
b/sw/uiconfig/swriter/menubar/menubar.xml
index 20a0593ac499..bc9b8751b016 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -426,6 +426,7 @@
   
   
   
+  
   
   
   


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

2023-06-28 Thread Heiko Tietze (via logerrit)
 sw/uiconfig/swriter/menubar/menubar.xml |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f1b0aca6bf520626d3c9a1fac67cd2de2c10c78c
Author: Heiko Tietze 
AuthorDate: Tue Jun 27 13:28:38 2023 +0200
Commit: Heiko Tietze 
CommitDate: Wed Jun 28 10:11:18 2023 +0200

Related tdf#106556 - Spotlight DF on the main menu

Added to the Format menu

Change-Id: I9b601aa4b55e9ce5a78fd8306d72baee71fd357f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153641
Reviewed-by: Vernon, Stuart Foote 
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sw/uiconfig/swriter/menubar/menubar.xml 
b/sw/uiconfig/swriter/menubar/menubar.xml
index 20a0593ac499..bc9b8751b016 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -426,6 +426,7 @@
   
   
   
+  
   
   
   


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

2023-06-28 Thread Regina Henschel (via logerrit)
 cui/source/tabpages/tpgradnt.cxx  |   13 ++---
 cui/source/tabpages/tptrans.cxx   |8 
 sd/source/ui/sidebar/SlideBackground.cxx  |   13 ++---
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |   13 ++---
 svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx |9 -
 5 files changed, 26 insertions(+), 30 deletions(-)

New commits:
commit 28235ac85b02020ce7c2f43bb36373ed5fb41010
Author: Regina Henschel 
AuthorDate: Sat Jun 24 16:08:26 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 28 10:06:44 2023 +0200

CID several. Use ctor 'from other' instead 'first..last'

This covers CID#1532461, CID#1532462, CID#1532464, CID#1532467,
CID#1532479.
Now solutions without iterator are used.

In all cases constructions like
maColorStops = basegfx::BColorStops(rGradient.GetColorStops().begin(),
rGradient.GetColorStops().end());
are replaced with solutions like
maColorStops = rGradient.GetColorStops();

And instead of constructions like
aColorStops.emplace_back(maColorStops.front().getStopOffset(),
aStartBColor);
aColorStops.insert(aColorStops.begin(),
   maColorStops.begin() + 1, maColorStops.end() - 1);
aColorStops.emplace_back(maColorStops.back().getStopOffset(),
 aEndBColor);
now it is like
aColorStops = maColorStops;
aColorStops.front() =
basegfx::BColorStop(maColorStops.front().getStopOffset(),
aStartBColor);
aColorStops.back() =
basegfx::BColorStop(maColorStops.back().getStopOffset(),
aEndBColor);

Change-Id: I2d2286e7707b205c58977bc3f850b2a49dda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153555
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 81daca18b69d31995bcd56f804659318398c02e2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153690
Reviewed-by: Xisco Fauli 

diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index d3d066236ae1..37c56da9aefc 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -551,8 +551,7 @@ void SvxGradientTabPage::ChangeGradientHdl_Impl()
 // MCGR: preserve ColorStops if given.
 // tdf#155901 We need offset of first and last stop, so include them.
 if (pGradient->GetColorStops().size() >= 2)
-m_aColorStops = 
basegfx::BColorStops(pGradient->GetColorStops().begin(),
- pGradient->GetColorStops().end());
+m_aColorStops = pGradient->GetColorStops();
 else
 m_aColorStops.clear();
 
@@ -645,11 +644,11 @@ basegfx::BColorStops 
SvxGradientTabPage::createColorStops()
 
 if(m_aColorStops.size() >= 2)
 {
-aColorStops.emplace_back(m_aColorStops.front().getStopOffset(),
- 
m_xLbColorFrom->GetSelectEntryColor().getBColor());
-aColorStops.insert(aColorStops.begin(), m_aColorStops.begin() + 1, 
m_aColorStops.end() - 1);
-aColorStops.emplace_back(m_aColorStops.back().getStopOffset(),
- 
m_xLbColorTo->GetSelectEntryColor().getBColor());
+aColorStops = m_aColorStops;
+aColorStops.front() = 
basegfx::BColorStop(m_aColorStops.front().getStopOffset(),
+  
m_xLbColorFrom->GetSelectEntryColor().getBColor());
+aColorStops.back() = 
basegfx::BColorStop(m_aColorStops.back().getStopOffset(),
+ 
m_xLbColorTo->GetSelectEntryColor().getBColor());
 }
 else
 {
diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx
index 3d157850a526..04cbdfb6b24a 100644
--- a/cui/source/tabpages/tptrans.cxx
+++ b/cui/source/tabpages/tptrans.cxx
@@ -370,7 +370,7 @@ void SvxTransparenceTabPage::Reset(const SfxItemSet* rAttrs)
 // MCGR: preserve ColorStops if given
 // tdf#155901 We need offset of first and last stop, so include them.
 if (rGradient.GetColorStops().size() >= 2)
-maColorStops = basegfx::BColorStops(rGradient.GetColorStops().begin(), 
rGradient.GetColorStops().end());
+maColorStops = rGradient.GetColorStops();
 else
 maColorStops.clear();
 
@@ -519,9 +519,9 @@ basegfx::BColorStops 
SvxTransparenceTabPage::createColorStops()
 
 if(maColorStops.size() >= 2)
 {
-aColorStops.emplace_back(maColorStops.front().getStopOffset(), 
aStartBColor);
-aColorStops.insert(aColorStops.begin(), maColorStops.begin() + 1, 
maColorStops.end() - 1);
-aColorStops.emplace_back(maColorStops.back().getStopOffset(), 
aEndBColor);
+aColorStops = maColorStops;
+aColorStops.front() = 
basegfx::BColorStop(maColorStops.front().getStopOffset(), aStartBColor)

[Libreoffice-commits] core.git: svgio/inc svgio/Library_svgio.mk svgio/qa svgio/source

2023-06-28 Thread Xisco Fauli (via logerrit)
 svgio/Library_svgio.mk|1 
 svgio/inc/svgfefloodnode.hxx  |   49 +++
 svgio/inc/svgtoken.hxx|3 
 svgio/qa/cppunit/SvgImportTest.cxx|   18 ++
 svgio/qa/cppunit/data/filterFeFlood.svg   |   16 ++
 svgio/source/svgreader/svgdocumenthandler.cxx |   11 +
 svgio/source/svgreader/svgfefloodnode.cxx |  162 ++
 svgio/source/svgreader/svgfilternode.cxx  |6 
 svgio/source/svgreader/svgstyleattributes.cxx |3 
 svgio/source/svgreader/svgtoken.cxx   |5 
 svgio/source/svgreader/svgusenode.cxx |   57 -
 11 files changed, 298 insertions(+), 33 deletions(-)

New commits:
commit 0a18f318a13d4a9b81f717498d3a02ee274542de
Author: Xisco Fauli 
AuthorDate: Tue Jun 27 23:21:25 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 28 10:05:50 2023 +0200

tdf#156066: Add support for feFlood filter

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

diff --git a/svgio/Library_svgio.mk b/svgio/Library_svgio.mk
index 3702806a311c..20797e339a81 100644
--- a/svgio/Library_svgio.mk
+++ b/svgio/Library_svgio.mk
@@ -61,6 +61,7 @@ $(eval $(call gb_Library_add_exception_objects,svgio,\
 svgio/source/svgreader/svggnode \
 svgio/source/svgreader/svganode \
 svgio/source/svgreader/svgfecolormatrixnode \
+svgio/source/svgreader/svgfefloodnode \
 svgio/source/svgreader/svgfegaussianblurnode \
 svgio/source/svgreader/svgfeoffsetnode \
 svgio/source/svgreader/svgfilternode \
diff --git a/svgio/inc/svgfefloodnode.hxx b/svgio/inc/svgfefloodnode.hxx
new file mode 100644
index ..a8cb2da47e51
--- /dev/null
+++ b/svgio/inc/svgfefloodnode.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include "svgnode.hxx"
+#include "svgstyleattributes.hxx"
+
+namespace svgio::svgreader
+{
+class SvgFeFloodNode final : public SvgNode
+{
+private:
+SvgNumber maX;
+SvgNumber maY;
+SvgNumber maWidth;
+SvgNumber maHeight;
+SvgPaint maFloodColor;
+SvgNumber maFloodOpacity;
+
+public:
+SvgFeFloodNode(SvgDocument& rDocument, SvgNode* pParent);
+virtual ~SvgFeFloodNode() override;
+
+virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken,
+const OUString& aContent) override;
+
+void apply(drawinglayer::primitive2d::Primitive2DContainer& rTarget) const;
+};
+
+} // end of namespace svgio::svgreader
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svgio/inc/svgtoken.hxx b/svgio/inc/svgtoken.hxx
index fb2e04c278f4..239cda0eb4cc 100644
--- a/svgio/inc/svgtoken.hxx
+++ b/svgio/inc/svgtoken.hxx
@@ -81,9 +81,12 @@ namespace svgio::svgreader
 ClipPathNode,
 ClipPathProperty,
 FeColorMatrix,
+FeFlood,
 FeGaussianBlur,
 FeOffset,
 Filter,
+FloodColor,
+FloodOpacity,
 Mask,
 ClipPathUnits,
 MaskUnits,
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index 7e32e83faf3a..9383b7ac5430 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -203,6 +203,24 @@ CPPUNIT_TEST_FIXTURE(Test, testFilterFeOffset)
 assertXPath(pDocument, "/primitive2D/transform/mask/transform", "xy33", 
"1");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testFilterFeFlood)
+{
+Primitive2DSequence aSequenceTdf132246 = 
parseSvg(u"/svgio/qa/cppunit/data/filterFeFlood.svg");
+CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequenceTdf132246.getLength()));
+
+drawinglayer::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = dumper.dumpAndParse(aSequenceTdf132246);
+
+CPPUNIT_ASSERT (pDocument);
+
+assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence", 
"transparence", "50");
+assertXPath(pDocument, 
"/primitive2D/transform/unifiedtransparence/polypolygonco

[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - download.lst external/libassuan

2023-06-28 Thread Taichi Haradaguchi (via logerrit)
 download.lst|4 ++--
 external/libassuan/ExternalPackage_libassuan.mk |2 +-
 external/libassuan/w32-build-fixes.patch.1  |   14 --
 3 files changed, 3 insertions(+), 17 deletions(-)

New commits:
commit 64148345dfe046e21955ec60042c4e64acb04049
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Sat Jun 24 10:18:55 2023 +0900
Commit: Xisco Fauli 
CommitDate: Wed Jun 28 09:59:54 2023 +0200

Update libassuan to 2.5.6

Change-Id: Iea5af01231e67c24d34287929a54f5ec86af47ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153545
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi  <20001...@ymail.ne.jp>
(cherry picked from commit 88019e3ac34e35c193df0ae682722f6ec3ba5133)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153669
Reviewed-by: Xisco Fauli 

diff --git a/download.lst b/download.lst
index ae37b394ae52..6a76dee49b12 100644
--- a/download.lst
+++ b/download.lst
@@ -289,8 +289,8 @@ LCMS2_TARBALL := lcms2-2.12.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBASSUAN_SHA256SUM := 
8e8c2fcc982f9ca67dcbb1d95e2dc746b1739a4668bc20b3a3c5be632edb34e4
-LIBASSUAN_TARBALL := libassuan-2.5.5.tar.bz2
+LIBASSUAN_SHA256SUM := 
e9fd27218d5394904e4e39788f9b1742711c3e6b41689a31aa3380bd5aa4f426
+LIBASSUAN_TARBALL := libassuan-2.5.6.tar.bz2
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/libassuan/ExternalPackage_libassuan.mk 
b/external/libassuan/ExternalPackage_libassuan.mk
index 0f24e5e2dec4..2df7b562d584 100644
--- a/external/libassuan/ExternalPackage_libassuan.mk
+++ b/external/libassuan/ExternalPackage_libassuan.mk
@@ -15,7 +15,7 @@ ifneq ($(DISABLE_DYNLOADING),TRUE)
 
 ifeq ($(OS),LINUX)
 
-$(eval $(call 
gb_ExternalPackage_add_file,libassuan,$(LIBO_LIB_FOLDER)/libassuan.so.0,src/.libs/libassuan.so.0.8.5))
+$(eval $(call 
gb_ExternalPackage_add_file,libassuan,$(LIBO_LIB_FOLDER)/libassuan.so.0,src/.libs/libassuan.so.0.8.6))
 
 else ifeq ($(OS),MACOSX)
 
diff --git a/external/libassuan/w32-build-fixes.patch.1 
b/external/libassuan/w32-build-fixes.patch.1
index ebf98c5f5093..8d77eef37cd5 100644
--- a/external/libassuan/w32-build-fixes.patch.1
+++ b/external/libassuan/w32-build-fixes.patch.1
@@ -33,20 +33,6 @@ diff -ru libassuan.orig/src/Makefile.am 
libassuan/src/Makefile.am
   `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
   sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
  
-@@ -148,10 +148,10 @@
-   $(DESTDIR)$(bindir)/gpgcedev.dll
- endif
- 
-+mkheader$(EXEEXT): mkheader.c Makefile
--mkheader: mkheader.c Makefile
-   $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) \
-   $(LDFLAGS_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkheader.c
- 
-+assuan.h: assuan.h.in mkheader$(EXEEXT) $(parts_of_assuan_h)
-+  ./mkheader$(EXEEXT) $(host_os) $(srcdir)/assuan.h.in \
--assuan.h: assuan.h.in mkheader $(parts_of_assuan_h)
--  ./mkheader $(host_os) $(srcdir)/assuan.h.in \
-$(PACKAGE_VERSION) $(VERSION_NUMBER) >$@
 diff -ru libassuan.orig/src/assuan-handler.c libassuan/src/assuan-handler.c
 --- libassuan.orig/src/assuan-handler.c 2016-06-25 16:27:49.0 +0200
 +++ libassuan/src/assuan-handler.c  2017-09-24 15:32:51.200956200 +0200


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

2023-06-28 Thread Henry Castro (via logerrit)
 sc/source/filter/inc/condformatbuffer.hxx |2 ++
 sc/source/filter/oox/condformatbuffer.cxx |5 +
 sc/source/filter/oox/extlstcontext.cxx|2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit c9518e47f90994cf75adcc77e32ffa034b2f416f
Author: Henry Castro 
AuthorDate: Mon Jun 26 10:43:34 2023 -0400
Commit: Caolán McNamara 
CommitDate: Wed Jun 28 09:41:42 2023 +0200

sc: filter: oox: fix crash delete ScDatabarFormatData

Unfortunately, the instance of "ScDatabarFormatData" is
deleted before finalizeImport is called.

The "maEntries" is not usable, the global format buffer is
required to hold the reference.

 #1 0x7f2ef19081c0 in oox::xls::CondFormatBuffer::finalizeImport() 
co-23.05-asan/sc/source/filter/oox/condformatbuffer.cxx:1322:23
#2 0x7f2ef1ba in 
oox::xls::WorksheetGlobals::finalizeWorksheetImport() 
co-23.05-asan/sc/source/filter/oox/worksheethelper.cxx:942:22
#3 0x7f2ef58d030e in 
sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource
 const&) co-23.05-asan/sax/source/fastparser/fastparser.cxx:910:36
#4 0x7f2ef23f0e46 in 
oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource 
const&, bool) co-23.05-asan/oox/source/core/fastparser.cxx:121:15
#5 0x7f2ef23f1544 in

Signed-off-by: Henry Castro 
Change-Id: Ieb3840cc10372867d5462a19d9efa9771f633437
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153600
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/filter/inc/condformatbuffer.hxx 
b/sc/source/filter/inc/condformatbuffer.hxx
index e62917678b9a..9c8896dbf22a 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -307,6 +307,7 @@ public:
 CondFormatRef   importCondFormatting( SequenceInputStream& rStrm );
 ExtCfDataBarRuleRef createExtCfDataBarRule(ScDataBarFormatData* pTarget);
 std::vector< std::unique_ptr >& importExtCondFormat();
+std::vector >& importExtFormatEntries();
 
 /** Converts an OOXML condition operator token to the API constant. */
 static sal_Int32convertToApiOperator( sal_Int32 nToken );
@@ -324,6 +325,7 @@ private:
 CondFormatVec   maCondFormats;  /// All conditional formatting in 
a sheet.
 ExtCfDataBarRuleVecmaCfRules;  /// All external 
conditional formatting rules in a sheet.
 std::vector< std::unique_ptr > maExtCondFormats;
+std::vector > maExtFormatEntries;
 sal_Int32 mnNonPrioritizedRuleNextPriority = 1048576;
 };
 
diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index 17747df22461..b9f7bceec0e9 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -1376,6 +1376,11 @@ std::vector< std::unique_ptr >& 
CondFormatBuffer::importExtCond
 return maExtCondFormats;
 }
 
+std::vector >& 
CondFormatBuffer::importExtFormatEntries()
+{
+return maExtFormatEntries;
+}
+
 sal_Int32 CondFormatBuffer::convertToApiOperator( sal_Int32 nToken )
 {
 switch( nToken )
diff --git a/sc/source/filter/oox/extlstcontext.cxx 
b/sc/source/filter/oox/extlstcontext.cxx
index 3209c846f9ce..58e4c7931729 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -174,7 +174,7 @@ ContextHandlerRef 
ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl
 {
 auto pFormat = 
std::make_unique(&getScDocument());
 pFormat->SetDataBarData(pInfo);
-maEntries.push_back(std::move(pFormat));
+
getCondFormats().importExtFormatEntries().push_back(std::move(pFormat));
 }
 }
 else


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

2023-06-28 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/cuicharmap.cxx  |  408 +-
 include/cui/cuicharmap.hxx |   34 --
 include/sfx2/charwin.hxx   |   58 
 sfx2/inc/charmapcontrol.hxx|   16 -
 sfx2/source/control/charmapcontrol.cxx |  440 ++---
 sfx2/uiconfig/ui/charmapcontrol.ui |4 
 6 files changed, 430 insertions(+), 530 deletions(-)

New commits:
commit c706fde1c4ecc6974bcf32ce33aacf3093355ae1
Author: Caolán McNamara 
AuthorDate: Tue Jun 27 12:35:57 2023 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 28 09:41:20 2023 +0200

Resolves: tdf#156067 merge special char dialog/popup logic

there was some cut and paste done to create the popup
at some point, so put it back together and reuse the
"delete recent" etc which is missing from the popup case

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index c075c12326d2..4c4df2fe9cb3 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -58,38 +58,7 @@ SvxCharacterMap::SvxCharacterMap(weld::Widget* pParent, 
const SfxItemSet* pSet,
 , m_xVirDev(VclPtr::Create())
 , isSearchMode(true)
 , m_xFrame(std::move(xFrame))
-, m_aRecentCharView{SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev)}
-, m_aFavCharView{SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev)}
+, m_aCharmapContents(*m_xBuilder, m_xVirDev)
 , m_aShowChar(m_xVirDev)
 , m_xOKBtn(m_xFrame.is() ? m_xBuilder->weld_button("insert") : 
m_xBuilder->weld_button("ok"))
 , m_xFontText(m_xBuilder->weld_label("fontft"))
@@ -101,41 +70,7 @@ SvxCharacterMap::SvxCharacterMap(weld::Widget* pParent, 
const SfxItemSet* pSet,
 , m_xDecimalCodeText(m_xBuilder->weld_entry("decimalvalue"))
 , m_xFavouritesBtn(m_xBuilder->weld_button("favbtn"))
 , m_xCharName(m_xBuilder->weld_label("charname"))
-, m_xRecentGrid(m_xBuilder->weld_widget("viewgrid"))
-, m_xFavGrid(m_xBuilder->weld_widget("favgrid"))
 , m_xShowChar(new weld::CustomWeld(*m_xBuilder, "showchar", m_aShowChar))
-, m_xRecentCharView{std::make_unique(*m_xBuilder, 
"viewchar1", m_aRecentCharView[0]),
-std::make_unique(*m_xBuilder, 
"viewchar2", m_aRecentCharView[1]),
-std::make_unique(*m_xBuilder, 
"viewchar3", m_aRecentCharView[2]),
-std::make_unique(*m_xBuilder, 
"viewchar4", m_aRecentCharView[3]),
-std::make_unique(*m_xBuilder, 
"viewchar5", m_aRecentCharView[4]),
-std::make_unique(*m_xBuilder, 
"viewchar6", m_aRecentCharView[5]),
-std::make_unique(*m_xBuilder, 
"viewchar7", m_aRecentCharView[6]),
-std::make_unique(*m_xBuilder, 
"viewchar8", m_aRecentCharView[7]),
-std::make_unique(*m_xBuilder, 
"viewchar9", m_aRecentCharView[8]),
-std::make_unique(*m_xBuilder, 
"viewchar10", m_aRecentCharView[9]),
-std::make_unique(*m_xBuilder, 
"viewchar11", m_aRecentCharView[10]),
-std::make_unique(*m_xBuilder, 
"viewchar12", m_aRecentCharView[11]),
-std::make_unique(*m_xBuilder, 
"viewchar13", m_aRecentCharView[12]),
-std::make_unique(*m_xBuilder, 
"viewchar14", m_aRecentCharView[13]),
-std::

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

2023-06-28 Thread Noel Grandin (via logerrit)
 svx/source/sdr/contact/viewobjectcontact.cxx |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 363eda3d6e39d657248f3f2ffd9e9d5dcf7c7bdd
Author: Noel Grandin 
AuthorDate: Wed May 31 13:53:43 2023 +0200
Commit: Caolán McNamara 
CommitDate: Wed Jun 28 09:36:19 2023 +0200

speed up tab-switching in a calc document with a lot of graphic objects

if we are in the destructor, and we have never painted the object in
question, then we don't need to do an expensive object-range calculation
and invalidation

Change-Id: I857c3d927142f4e90d54f79fa6c293731382f0d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152434
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Noel Grandin 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153582
Reviewed-by: Caolán McNamara 

diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx 
b/svx/source/sdr/contact/viewobjectcontact.cxx
index c3c12071f878..62b63ee6b72d 100644
--- a/svx/source/sdr/contact/viewobjectcontact.cxx
+++ b/svx/source/sdr/contact/viewobjectcontact.cxx
@@ -158,10 +158,14 @@ ViewObjectContact::ViewObjectContact(ObjectContact& 
rObjectContact, ViewContact&
 
 ViewObjectContact::~ViewObjectContact()
 {
-// invalidate in view
-if(!getObjectRange().isEmpty())
+// if the object range is empty, then we have never had the primitive 
range change, so nothing to invalidate
+if (!maObjectRange.isEmpty())
 {
-GetObjectContact().InvalidatePartOfView(maObjectRange);
+// invalidate in view
+if(!getObjectRange().isEmpty())
+{
+GetObjectContact().InvalidatePartOfView(maObjectRange);
+}
 }
 
 // delete PrimitiveAnimation