[Libreoffice-commits] core.git: helpcontent2

2022-06-22 Thread Mike Kaganski (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3d71357556b7bddff09c8dc973b2bd0eb8c24e35
Author: Mike Kaganski 
AuthorDate: Wed Jun 22 08:59:25 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jun 22 08:59:25 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to cc62afdf93da53b17e1b7859376d01b03292de9c
  - Drop this nonsense

Phrases like this look like an explanation form a clueless person.
The help should rely on basics (like differentiating text from names),
and not suggest to "place the number in quotation marks" when the
argument is documented to be a text. If needed, the word "text" may
link to a glossary article with syntax explanation.

Change-Id: I32e7a3c68659f74db6bc30c5a3fa9acdd158acb4
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136238
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/helpcontent2 b/helpcontent2
index 3fe1af89c370..cc62afdf93da 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 3fe1af89c370e1cd9058b541cb34f629348c610d
+Subproject commit cc62afdf93da53b17e1b7859376d01b03292de9c


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

2022-06-22 Thread Mike Kaganski (via logerrit)
 source/text/scalc/01/04060110.xhp  |8 
 source/text/shared/00/0005.xhp |4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit a9daf1b47b52f675225f31843b67e186a140845b
Author: Mike Kaganski 
AuthorDate: Wed Jun 22 09:21:16 2022 +0200
Commit: Mike Kaganski 
CommitDate: Wed Jun 22 09:31:49 2022 +0200

Numeral systems are "based" on digits, not numbers nor characters

Change-Id: I9c411fe39e81d734d68c9e98253b3d125978f3bc
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136239
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/source/text/scalc/01/04060110.xhp 
b/source/text/scalc/01/04060110.xhp
index 4b5556bf5..d4a9c0016 100644
--- a/source/text/scalc/01/04060110.xhp
+++ b/source/text/scalc/01/04060110.xhp
@@ -112,7 +112,7 @@
 
 BASE(Number; Radix 
[; MinimumLength])
  
Number is the positive integer to be converted.
- 
Radix indicates the base of the number system. It may be any 
positive integer between 2 and 36.
+ 
Radix indicates the base of the numeral system. It may be any 
positive integer between 2 and 36.
  
MinimumLength (optional) determines the minimum length of the 
character sequence that has been created. If the text is shorter than the 
indicated minimum length, zeros are added to the left of the string.
 
 
@@ -213,13 +213,13 @@
 
 
 DECIMAL
-Converts text that represents a number in a number 
system with the given base radix to a positive integer. The 
radix must be in the range 2 to 36. Spaces and tabs are ignored. The 
Text field is not case-sensitive.
-If the radix 
is 16, a leading x or X or 0x or 0X, and an appended h or H, are disregarded. 
If the radix is 2, an appended b or B is disregarded. Other characters that do 
not belong to the number system generate an error.
+Converts text that represents a number in a numeral 
system with the given base radix to a positive integer. The 
radix must be in the range 2 to 36. Spaces and tabs are ignored. The 
Text field is not case-sensitive.
+If the radix 
is 16, a leading x or X or 0x or 0X, and an appended h or H, are disregarded. 
If the radix is 2, an appended b or B is disregarded. Other characters that do 
not belong to the numeral system generate an error.
 
 
 DECIMAL("Text"; 
Radix)
  
Text is the text to be converted.
- 
Radix indicates the base of the number system. It may be any 
positive integer between 2 and 36.
+ 
Radix indicates the base of the numeral system. It may be any 
positive integer between 2 and 36.
 
 
  =DECIMAL("17";10) returns 17.
diff --git a/source/text/shared/00/0005.xhp 
b/source/text/shared/00/0005.xhp
index bb23d6002..eb8367579 100644
--- a/source/text/shared/00/0005.xhp
+++ b/source/text/shared/00/0005.xhp
@@ -170,8 +170,8 @@
   
   
 
-   Number System
-   A number 
system is determined by the number of characters available for representing 
numbers. The decimal system, for instance is based on the ten numbers (0..9), 
the binary system is based on the two numbers 0 and 1, the hexadecimal system 
is based on 16 characters (0...9 and A...F).
+   Numeral System
+   A numeral 
system is determined by the number of digits available for representing 
numbers. The decimal system, for instance is based on the ten digits (0..9), 
the binary system is based on the two digits 0 and 1, the hexadecimal system is 
based on 16 digits (0...9 and A...F).
 
   
   


[Libreoffice-commits] core.git: helpcontent2

2022-06-22 Thread Mike Kaganski (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4af2fa2a8be04f2c0070f5d61ac296d3a6ea9c7a
Author: Mike Kaganski 
AuthorDate: Wed Jun 22 09:31:51 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jun 22 09:31:51 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to a9daf1b47b52f675225f31843b67e186a140845b
  - Numeral systems are "based" on digits, not numbers nor characters

Change-Id: I9c411fe39e81d734d68c9e98253b3d125978f3bc
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136239
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/helpcontent2 b/helpcontent2
index cc62afdf93da..a9daf1b47b52 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit cc62afdf93da53b17e1b7859376d01b03292de9c
+Subproject commit a9daf1b47b52f675225f31843b67e186a140845b


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

2022-06-22 Thread Noel Grandin (via logerrit)
 include/vcl/settings.hxx   |   12 ++
 vcl/osx/salframe.cxx   |5 ++
 vcl/source/app/settings.cxx|   68 +
 vcl/source/control/imp_listbox.cxx |8 ++--
 4 files changed, 89 insertions(+), 4 deletions(-)

New commits:
commit 3c6a53b9ce64180b2a03e097c1844f7496f26815
Author: Noel Grandin 
AuthorDate: Sat Apr 17 14:49:43 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 22 09:50:46 2022 +0200

improve the look of the macOS combobox

Change-Id: I4484fabcf6d883deeb3e417e46ce3973f2332f94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114251
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 6795150819a7..4926c4b4c509 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -384,6 +384,18 @@ public:
 voidSetMenuHighlightTextColor( const Color& 
rColor );
 const Color&GetMenuHighlightTextColor() const;
 
+voidSetListBoxWindowBackgroundColor( const 
Color& rColor );
+const Color&GetListBoxWindowBackgroundColor() const;
+
+voidSetListBoxWindowTextColor( const Color& 
rColor );
+const Color&GetListBoxWindowTextColor() const;
+
+voidSetListBoxWindowHighlightColor( const 
Color& rColor );
+const Color&GetListBoxWindowHighlightColor() const;
+
+voidSetListBoxWindowHighlightTextColor( const 
Color& rColor );
+const Color&GetListBoxWindowHighlightTextColor() const;
+
 voidSetTabTextColor( const Color& rColor );
 const Color&GetTabTextColor() const;
 
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 984ff8c5f5be..574122a1a91d 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -1283,6 +1283,11 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 aStyleSettings.SetMenuBarRolloverTextColor( aMenuTextColor );
 
aStyleSettings.SetMenuBarHighlightTextColor(aStyleSettings.GetMenuHighlightTextColor());
 
+aStyleSettings.SetListBoxWindowBackgroundColor( aBackgroundColor );
+aStyleSettings.SetListBoxWindowTextColor( aMenuTextColor );
+aStyleSettings.SetListBoxWindowHighlightColor( aMenuHighlightColor );
+aStyleSettings.SetListBoxWindowHighlightTextColor( aMenuHighlightTextColor 
);
+
 // Set text colors for buttons and their different status according to OS 
settings, typically white for selected buttons,
 // black otherwise
 
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index f17c8286f68f..82093fcf2d65 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -125,6 +125,10 @@ struct ImplStyleData
 Color   maMenuHighlightColor;
 Color   maMenuHighlightTextColor;
 Color   maMenuTextColor;
+Color   maListBoxWindowBackgroundColor;
+Color   maListBoxWindowTextColor;
+Color   maListBoxWindowHighlightColor;
+Color   maListBoxWindowHighlightTextColor;
 Color   maMenuBarTextColor;
 Color   maMenuBarRolloverTextColor;
 Color   maMenuBarHighlightTextColor;
@@ -546,6 +550,10 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) 
:
 maMenuHighlightColor( rData.maMenuHighlightColor ),
 maMenuHighlightTextColor( rData.maMenuHighlightTextColor ),
 maMenuTextColor( rData.maMenuTextColor ),
+maListBoxWindowBackgroundColor( rData.maListBoxWindowBackgroundColor ),
+maListBoxWindowTextColor( rData.maListBoxWindowTextColor ),
+maListBoxWindowHighlightColor( rData.maListBoxWindowHighlightColor ),
+maListBoxWindowHighlightTextColor( rData.maListBoxWindowHighlightTextColor 
),
 maMenuBarTextColor( rData.maMenuBarTextColor ),
 maMenuBarRolloverTextColor( rData.maMenuBarRolloverTextColor ),
 maMenuBarHighlightTextColor( rData.maMenuBarHighlightTextColor ),
@@ -692,6 +700,10 @@ void ImplStyleData::SetStandardStyles()
 maMenuBarRolloverColor  = COL_BLUE;
 maMenuBorderColor   = COL_LIGHTGRAY;
 maMenuTextColor = COL_BLACK;
+maListBoxWindowBackgroundColor = COL_LIGHTGRAY;
+maListBoxWindowTextColor= COL_BLACK;
+maListBoxWindowHighlightColor = COL_BLUE;
+maListBoxWindowHighlightTextColor = COL_WHITE;
 maMenuBarTextColor  = COL_BLACK;
 maMenuBarRolloverTextColor  = COL_WHITE;
 maMenuBarHighlightTextColor = COL_WHITE;
@@ -1438,6 +1450,58 @@ StyleSettings::GetMenuHighlightTextColor() const
 return mxData->maMenuHighlightTextColor;
 }
 
+void
+StyleSet

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

2022-06-22 Thread Noel Grandin (via logerrit)
 include/oox/helper/helper.hxx   |1 -
 oox/source/helper/attributelist.cxx |   33 -
 2 files changed, 16 insertions(+), 18 deletions(-)

New commits:
commit e9affc204c1d330b2a7873f44b3f575bcccdf4dc
Author: Noel Grandin 
AuthorDate: Tue Jun 21 12:27:26 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 22 10:06:19 2022 +0200

remove OptValue(bool,Type) constructor

as a step towards converting it to std::optional

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

diff --git a/include/oox/helper/helper.hxx b/include/oox/helper/helper.hxx
index 33ae8689b5eb..9dc43bdc9b34 100644
--- a/include/oox/helper/helper.hxx
+++ b/include/oox/helper/helper.hxx
@@ -176,7 +176,6 @@ class OptValue
 public:
  OptValue() : maValue(), mbHasValue( false ) {}
 explicit OptValue( const Type& rValue ) : maValue( rValue ), 
mbHasValue( true ) {}
-explicit OptValue( bool bHasValue, const Type& rValue ) : maValue( 
rValue ), mbHasValue( bHasValue ) {}
 
 bool has_value() const { return mbHasValue; }
 bool operator!() const { return !mbHasValue; }
diff --git a/oox/source/helper/attributelist.cxx 
b/oox/source/helper/attributelist.cxx
index 25cb1ac5354f..c7b6b0c4cfb6 100644
--- a/oox/source/helper/attributelist.cxx
+++ b/oox/source/helper/attributelist.cxx
@@ -163,7 +163,7 @@ oox::drawingml::Color 
AttributeList::getHighlightColor(sal_Int32 nAttrToken) con
 OptValue< sal_Int32 > AttributeList::getToken( sal_Int32 nAttrToken ) const
 {
 sal_Int32 nToken = mxAttribs->getOptionalValueToken( nAttrToken, 
XML_TOKEN_INVALID );
-return OptValue< sal_Int32 >( nToken != XML_TOKEN_INVALID, nToken );
+return nToken == XML_TOKEN_INVALID ? OptValue< sal_Int32 >() : OptValue< 
sal_Int32 >( nToken );
 }
 
 OptValue< OUString > AttributeList::getString( sal_Int32 nAttrToken ) const
@@ -186,35 +186,35 @@ OptValue< double > AttributeList::getDouble( sal_Int32 
nAttrToken ) const
 {
 double nValue;
 bool bValid = getAttribList()->getAsDouble( nAttrToken, nValue );
-return OptValue< double >( bValid, nValue );
+return bValid ? OptValue< double >( nValue ) : OptValue< double >();
 }
 
 OptValue< sal_Int32 > AttributeList::getInteger( sal_Int32 nAttrToken ) const
 {
 sal_Int32 nValue;
 bool bValid = getAttribList()->getAsInteger( nAttrToken, nValue );
-return OptValue< sal_Int32 >( bValid, nValue );
+return bValid ? OptValue< sal_Int32 >( nValue ) : OptValue< sal_Int32 >();
 }
 
 OptValue< sal_uInt32 > AttributeList::getUnsigned( sal_Int32 nAttrToken ) const
 {
 OUString aValue = mxAttribs->getOptionalValue( nAttrToken );
 bool bValid = !aValue.isEmpty();
-return OptValue< sal_uInt32 >( bValid, 
AttributeConversion::decodeUnsigned( aValue ) );
+return bValid ? OptValue< sal_uInt32 >( 
AttributeConversion::decodeUnsigned( aValue ) ) : OptValue< sal_uInt32 >();
 }
 
 OptValue< sal_Int64 > AttributeList::getHyper( sal_Int32 nAttrToken ) const
 {
 OUString aValue = mxAttribs->getOptionalValue( nAttrToken );
 bool bValid = !aValue.isEmpty();
-return OptValue< sal_Int64 >( bValid, bValid ? 
AttributeConversion::decodeHyper( aValue ) : 0 );
+return bValid ? OptValue< sal_Int64 >( AttributeConversion::decodeHyper( 
aValue ) ) : OptValue< sal_Int64 >();
 }
 
 OptValue< sal_Int32 > AttributeList::getIntegerHex( sal_Int32 nAttrToken ) 
const
 {
 OUString aValue = mxAttribs->getOptionalValue( nAttrToken );
 bool bValid = !aValue.isEmpty();
-return OptValue< sal_Int32 >( bValid, bValid ? 
AttributeConversion::decodeIntegerHex( aValue ) : 0 );
+return bValid ? OptValue< sal_Int32 >( 
AttributeConversion::decodeIntegerHex( aValue ) ) : OptValue< sal_Int32 >();
 }
 
 OptValue< bool > AttributeList::getBool( sal_Int32 nAttrToken ) const
@@ -243,7 +243,7 @@ OptValue< bool > AttributeList::getBool( sal_Int32 
nAttrToken ) const
 case XML_off:   return OptValue< bool >( false );
 }
 OptValue< sal_Int32 > onValue = getInteger( nAttrToken );
-return OptValue< bool >( onValue.has_value(), onValue.get() != 0 );
+return onValue.has_value() ? OptValue< bool >( onValue.get() != 0 ) : 
OptValue< bool >();
 }
 
 OptValue< util::DateTime > AttributeList::getDateTime( sal_Int32 nAttrToken ) 
const
@@ -252,16 +252,15 @@ OptValue< util::DateTime > AttributeList::getDateTime( 
sal_Int32 nAttrToken ) co
 util::DateTime aDateTime;
 bool bValid = (aValue.getLength() == 19) && (aValue[ 4 ] == '-') && 
(aValue[ 7 ] == '-') &&
 (aValue[ 10 ] == 'T') && (aValue[ 13 ] == ':') && (aValue[ 16 ] == 
':');
-if( bValid )
-{
-aDateTime.Year= static_cast< sal_uInt16 >( 
o3tl::toInt32(aValue.subView( 0, 4 )) );
-aDateTime.Month   = static_cast< sal_uInt16 >( 
o3tl::toInt32(aValue.subView( 5, 2 )) );
- 

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

2022-06-22 Thread Noel Grandin (via logerrit)
 include/oox/helper/helper.hxx|8 +++-
 oox/source/drawingml/effectproperties.cxx|   14 +++
 oox/source/drawingml/fillproperties.cxx  |   46 +++
 oox/source/drawingml/lineproperties.cxx  |   16 
 oox/source/drawingml/textcharacterproperties.cxx |   26 ++---
 oox/source/vml/vmlformatting.cxx |   46 +++
 oox/source/vml/vmlshape.cxx  |   10 ++---
 oox/source/vml/vmlshapecontext.cxx   |   20 +-
 sc/source/filter/oox/autofilterbuffer.cxx|2 -
 9 files changed, 97 insertions(+), 91 deletions(-)

New commits:
commit 3ff9582704a024b4a89da9a63322e117157b5857
Author: Noel Grandin 
AuthorDate: Tue Jun 21 12:18:52 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 22 10:08:35 2022 +0200

make oox::OptValue::assignIfUsed a free function

as a step towards making OptValue into std::optional.

Change-Id: I3eae4034a846dd63a16e501abe4a6eba9d186a49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136266
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/include/oox/helper/helper.hxx b/include/oox/helper/helper.hxx
index 9dc43bdc9b34..90890b3ceecb 100644
--- a/include/oox/helper/helper.hxx
+++ b/include/oox/helper/helper.hxx
@@ -191,13 +191,19 @@ public:
  return ( ( !mbHasValue && rValue.mbHasValue == 
false ) ||
  ( mbHasValue == rValue.mbHasValue && maValue 
== rValue.maValue ) );
  }
-void assignIfUsed( const OptValue& rValue ) { if( 
rValue.mbHasValue ) operator=(rValue.maValue); }
 
 private:
 TypemaValue;
 boolmbHasValue;
 };
 
+template< typename Type >
+void assignIfUsed( OptValue& rDestValue, const OptValue& 
rSourceValue )
+{
+if( rSourceValue.has_value() )
+rDestValue = rSourceValue.get();
+}
+
 
 /** Provides platform independent functions to convert from or to little-endian
 byte order, e.g. for reading data from or writing data to memory or a
diff --git a/oox/source/drawingml/effectproperties.cxx 
b/oox/source/drawingml/effectproperties.cxx
index 88d69a16d177..579f4e1ab0ac 100644
--- a/oox/source/drawingml/effectproperties.cxx
+++ b/oox/source/drawingml/effectproperties.cxx
@@ -21,23 +21,23 @@ namespace oox::drawingml {
 
 void EffectGlowProperties ::assignUsed(const EffectGlowProperties& 
rSourceProps)
 {
-moGlowRad.assignIfUsed( rSourceProps.moGlowRad );
+assignIfUsed( moGlowRad, rSourceProps.moGlowRad );
 moGlowColor.assignIfUsed( rSourceProps.moGlowColor );
 }
 
 void EffectSoftEdgeProperties::assignUsed(const EffectSoftEdgeProperties& 
rSourceProps)
 {
-moRad.assignIfUsed(rSourceProps.moRad);
+assignIfUsed(moRad, rSourceProps.moRad);
 }
 
 void EffectShadowProperties::assignUsed(const EffectShadowProperties& 
rSourceProps)
 {
-moShadowDist.assignIfUsed( rSourceProps.moShadowDist );
-moShadowDir.assignIfUsed( rSourceProps.moShadowDir );
-moShadowSx.assignIfUsed( rSourceProps.moShadowSx );
-moShadowSy.assignIfUsed( rSourceProps.moShadowSy );
+assignIfUsed( moShadowDist, rSourceProps.moShadowDist );
+assignIfUsed( moShadowDir, rSourceProps.moShadowDir );
+assignIfUsed( moShadowSx, rSourceProps.moShadowSx );
+assignIfUsed( moShadowSy, rSourceProps.moShadowSy );
 moShadowColor.assignIfUsed( rSourceProps.moShadowColor );
-moShadowBlur.assignIfUsed( rSourceProps.moShadowBlur );
+assignIfUsed( moShadowBlur, rSourceProps.moShadowBlur );
 
 }
 
diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index b26c42b85759..f315f0182245 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -292,51 +292,51 @@ void GradientFillProperties::assignUsed( const 
GradientFillProperties& rSourcePr
 {
 if( !rSourceProps.maGradientStops.empty() )
 maGradientStops = rSourceProps.maGradientStops;
-moFillToRect.assignIfUsed( rSourceProps.moFillToRect );
-moTileRect.assignIfUsed( rSourceProps.moTileRect );
-moGradientPath.assignIfUsed( rSourceProps.moGradientPath );
-moShadeAngle.assignIfUsed( rSourceProps.moShadeAngle );
-moShadeFlip.assignIfUsed( rSourceProps.moShadeFlip );
-moShadeScaled.assignIfUsed( rSourceProps.moShadeScaled );
-moRotateWithShape.assignIfUsed( rSourceProps.moRotateWithShape );
+assignIfUsed( moFillToRect, rSourceProps.moFillToRect );
+assignIfUsed( moTileRect, rSourceProps.moTileRect );
+assignIfUsed( moGradientPath, rSourceProps.moGradientPath );
+assignIfUsed( moShadeAngle, rSourceProps.moShadeAngle );
+assignIfUsed( moShadeFlip, rSourceProps.moShadeFlip );
+assignIfUsed( moShadeScaled, rSourceProps.moShadeScaled );
+assignIfUsed( moRotateWithShape, rSourceProps.moRotateWithShape );
 }
 
 void PatternFillProperties::assign

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

2022-06-22 Thread Noel Grandin (via logerrit)
 include/oox/helper/helper.hxx  |2 -
 oox/source/drawingml/chart/objectformatter.cxx |4 +--
 oox/source/drawingml/chart/plotareaconverter.cxx   |8 +++---
 oox/source/drawingml/chart/seriesconverter.cxx |   24 +-
 oox/source/drawingml/fillproperties.cxx|   28 ++---
 oox/source/drawingml/lineproperties.cxx|   12 -
 oox/source/drawingml/shape.cxx |8 +++---
 oox/source/drawingml/table/tablecell.cxx   |   12 -
 oox/source/drawingml/textbodyproperties.cxx|4 +--
 oox/source/drawingml/textbodypropertiescontext.cxx |4 +--
 oox/source/drawingml/textcharacterproperties.cxx   |   16 ++--
 oox/source/helper/attributelist.cxx|   18 ++---
 oox/source/vml/vmlformatting.cxx   |   20 +++
 oox/source/vml/vmlshape.cxx|8 +++---
 oox/source/vml/vmlshapecontext.cxx |4 +--
 sc/source/filter/oox/autofilterbuffer.cxx  |2 -
 sc/source/filter/oox/drawingfragment.cxx   |   16 ++--
 17 files changed, 95 insertions(+), 95 deletions(-)

New commits:
commit 813939f8e392feff0b6e1bae023bc9c98849
Author: Noel Grandin 
AuthorDate: Tue Jun 21 12:43:56 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 22 10:28:41 2022 +0200

rename oox::OptValue::get(Type) to value_or

as a step towards replacing OptValue with std::optional

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

diff --git a/include/oox/helper/helper.hxx b/include/oox/helper/helper.hxx
index 90890b3ceecb..0c8aa2e6c358 100644
--- a/include/oox/helper/helper.hxx
+++ b/include/oox/helper/helper.hxx
@@ -181,7 +181,7 @@ public:
 bool operator!() const { return !mbHasValue; }
 
 const Type&  get() const { return maValue; }
-const Type&  get( const Type& rDefValue ) const { return mbHasValue ? 
maValue : rDefValue; }
+const Type&  value_or( const Type& rDefValue ) const { return mbHasValue ? 
maValue : rDefValue; }
 
 Type&operator*() { assert(mbHasValue); return maValue; }
 Type&emplace() { mbHasValue = true; maValue = Type(); return 
maValue; }
diff --git a/oox/source/drawingml/chart/objectformatter.cxx 
b/oox/source/drawingml/chart/objectformatter.cxx
index e04bfe5f0ae6..2ef67ebc683e 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -1060,14 +1060,14 @@ void ObjectFormatter::convertTextRotation( PropertySet& 
rPropSet, const ModelRef
 bool bStacked = false;
 if( bSupportsStacked )
 {
-sal_Int32 nVert = rxTextProp->getTextProperties().moVert.get( XML_horz 
);
+sal_Int32 nVert = rxTextProp->getTextProperties().moVert.value_or( 
XML_horz );
 bStacked = (nVert == XML_wordArtVert) || (nVert == XML_wordArtVertRtl);
 rPropSet.setProperty( PROP_StackCharacters, bStacked );
 }
 
 /*  Chart2 expects rotation angle as double value in range of [0,360).
 OOXML counts clockwise, Chart2 counts counterclockwise. */
-double fAngle = static_cast< double >( bStacked ? 0 : 
rxTextProp->getTextProperties().moRotation.get( nDefaultRotation ) );
+double fAngle = static_cast< double >( bStacked ? 0 : 
rxTextProp->getTextProperties().moRotation.value_or( nDefaultRotation ) );
 // MS Office UI allows values only in range of [-90,90].
 if ( fAngle < -540.0 || fAngle > 540.0 )
 {
diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx 
b/oox/source/drawingml/chart/plotareaconverter.cxx
index afbb28adee03..a30b3bdc6249 100644
--- a/oox/source/drawingml/chart/plotareaconverter.cxx
+++ b/oox/source/drawingml/chart/plotareaconverter.cxx
@@ -217,9 +217,9 @@ void View3DConverter::convertFromModel( const Reference< 
XDiagram >& rxDiagram,
 if( rTypeGroup.getTypeInfo().meTypeCategory == TYPECATEGORY_PIE )
 {
 // Y rotation used as 'first pie slice angle' in 3D pie charts
-rTypeGroup.convertPieRotation( aPropSet, mrModel.monRotationY.get( 0 ) 
);
+rTypeGroup.convertPieRotation( aPropSet, 
mrModel.monRotationY.value_or( 0 ) );
 // X rotation a.k.a. elevation (map OOXML [0..90] to Chart2 [-90,0])
-nRotationX = getLimitedValue< sal_Int32, sal_Int32 >( 
mrModel.monRotationX.get( 15 ), 0, 90 ) - 90;
+nRotationX = getLimitedValue< sal_Int32, sal_Int32 >( 
mrModel.monRotationX.value_or( 15 ), 0, 90 ) - 90;
 // no right-angled axes in pie charts
 bRightAngled = false;
 // ambient color (Gray 30%)
@@ -230,9 +230,9 @@ void View3DConverter::convertFromModel( const Reference< 
XDiagram >& rxDiagram,
 else // 3D bar/area/line charts
 {
 // Y rotation (OOXML [0..359], Chart2 [-179,180])
-  

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

2022-06-22 Thread Noel Grandin (via logerrit)
 include/oox/helper/helper.hxx|4 -
 oox/source/drawingml/chart/axisconverter.cxx |   20 +++---
 oox/source/drawingml/chart/chartspaceconverter.cxx   |2 
 oox/source/drawingml/chart/objectformatter.cxx   |4 -
 oox/source/drawingml/chart/seriesconverter.cxx   |   28 -
 oox/source/drawingml/connectorshapecontext.cxx   |   12 +--
 oox/source/drawingml/customshapegeometry.cxx |   26 
 oox/source/drawingml/customshapeproperties.cxx   |   24 +++
 oox/source/drawingml/diagram/datamodelcontext.cxx|   20 +++---
 oox/source/drawingml/diagram/diagramdefinitioncontext.cxx|   14 ++--
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx  |   12 +--
 oox/source/drawingml/diagram/layoutnodecontext.cxx   |   12 +--
 oox/source/drawingml/embeddedwavaudiofile.cxx|4 -
 oox/source/drawingml/fillproperties.cxx  |   18 ++---
 oox/source/drawingml/graphicshapecontext.cxx |   14 ++--
 oox/source/drawingml/hyperlinkcontext.cxx|8 +-
 oox/source/drawingml/lineproperties.cxx  |   22 +++
 oox/source/drawingml/shape.cxx   |   22 +++
 oox/source/drawingml/shapecontext.cxx|8 +-
 oox/source/drawingml/shapegroupcontext.cxx   |6 -
 oox/source/drawingml/table/tablecell.cxx |6 -
 oox/source/drawingml/table/tablecellcontext.cxx  |4 -
 oox/source/drawingml/table/tablecontext.cxx  |2 
 oox/source/drawingml/table/tablerowcontext.cxx   |2 
 oox/source/drawingml/table/tablestylecontext.cxx |4 -
 oox/source/drawingml/table/tablestylelistfragmenthandler.cxx |2 
 oox/source/drawingml/textbodypropertiescontext.cxx   |4 -
 oox/source/drawingml/textcharacterproperties.cxx |   18 ++---
 oox/source/drawingml/textcharacterpropertiescontext.cxx  |8 +-
 oox/source/drawingml/texteffectscontext.cxx  |2 
 oox/source/drawingml/textfield.cxx   |2 
 oox/source/drawingml/textfieldcontext.cxx|4 -
 oox/source/drawingml/textparagraph.cxx   |2 
 oox/source/drawingml/textparagraphpropertiescontext.cxx  |   30 -
 oox/source/drawingml/textrun.cxx |2 
 oox/source/drawingml/textspacingcontext.cxx  |4 -
 oox/source/drawingml/texttabstoplistcontext.cxx  |2 
 oox/source/drawingml/themeelementscontext.cxx|4 -
 oox/source/drawingml/themefragmenthandler.cxx|2 
 oox/source/drawingml/transform2dcontext.cxx  |   20 +++---
 oox/source/helper/attributelist.cxx  |2 
 oox/source/ppt/layoutfragmenthandler.cxx |2 
 oox/source/ppt/pptgraphicshapecontext.cxx|6 -
 oox/source/ppt/pptshape.cxx  |   10 +--
 oox/source/ppt/pptshapecontext.cxx   |6 -
 oox/source/ppt/pptshapegroupcontext.cxx  |8 +-
 oox/source/ppt/presPropsfragmenthandler.cxx  |4 -
 oox/source/ppt/slidefragmenthandler.cxx  |2 
 oox/source/shape/LockedCanvasContext.cxx |4 -
 oox/source/shape/WpsContext.cxx  |   12 +--
 oox/source/vml/vmlformatting.cxx |   34 +--
 oox/source/vml/vmlshape.cxx  |   16 ++---
 oox/source/vml/vmlshapecontext.cxx   |   26 
 oox/source/vml/vmltextbox.cxx|   22 +++
 oox/source/vml/vmltextboxcontext.cxx |8 +-
 sc/source/filter/oox/SparklineFragment.cxx   |4 -
 sc/source/filter/oox/autofilterbuffer.cxx|2 
 sc/source/filter/oox/drawingfragment.cxx |2 
 58 files changed, 287 insertions(+), 287 deletions(-)

New commits:
commit 0feeb94f97332a8e803e1936d66e0f234bd51973
Author: Noel Grandin 
AuthorDate: Tue Jun 21 13:02:53 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 22 11:48:28 2022 +0200

rename oox::OptValue::get to value

as a step in replacing OptValue with std::optional

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

diff --git a/include/oox/helper/helper.hxx b/include/oox/helper/helper.hxx
index 0c8aa2e6c358..9d5b7c3e2549 100644
--- a/include/oox/helper/helper.hxx
+++ b/include/oox/helper/helper.hxx
@@ -180,7 +180,7 @@ public:
 bool has_value() con

Re: 7.3.4.2 crashes

2022-06-22 Thread Caolán McNamara
On Wed, 2022-06-22 at 11:30 +0200, Xisco Fauli wrote:
> Hello,
> 
> two weeks after LibreOffice 7.3.4.2 was released, I've collected all
> the information from 
> https://crashreport.libreoffice.org/stats/version/7.3.4.2 into a .ods
> file, which is attached.

Presorted by number of crashes might be a good idea, get the most
frequent to the top

> If you have a bit of time, I'd appreciate if you could take a look at
> the document to see if any of the crashes can be fixed.

I think https://gerrit.libreoffice.org/c/core/+/136277 would fix the
12th most frequent of:

sfx2/source/view/viewfrm.cxx:3440
svx/source/dialog/srchdlg.cxx:2446
svx/source/tbxctrls/tbunosearchcontrollers.cxx:675
vcl/source/app/salvtables.cxx:6491
vcl/source/control/combobox.cxx:505
vcl/source/control/combobox.cxx:441
vcl/source/control/imp_listbox.cxx:720
vcl/source/control/imp_listbox.cxx:1533
vcl/source/control/imp_listbox.cxx:2416
vcl/source/control/combobox.cxx:788
vcl/source/window/event.cxx:213



[Libreoffice-commits] core.git: vcl/android vcl/headless vcl/inc vcl/ios vcl/source

2022-06-22 Thread Jan-Marek Glogowski (via logerrit)
 vcl/android/androidinst.cxx   |2 
 vcl/headless/headlessinst.cxx |2 
 vcl/headless/svpinst.cxx  |  316 --
 vcl/inc/headless/svpinst.hxx  |  101 -
 vcl/ios/iosinst.cxx   |2 
 vcl/source/app/salplug.cxx|2 
 6 files changed, 130 insertions(+), 295 deletions(-)

New commits:
commit d2de55c93f94bbccff51fa7715b613341f1f4ae6
Author: Jan-Marek Glogowski 
AuthorDate: Mon Jun 28 01:35:00 2021 +
Commit: Jan-Marek Glogowski 
CommitDate: Wed Jun 22 12:06:39 2022 +0200

svp: don't directly yield in main thread

AKA svp: always release SolarMutex on yield, v2

Implement the TODO when yielding a non-main thread: "use a
SolarMutexReleaser here and drop the m_bNoYieldLock usage"

This whole concept of "deferred yield" is prone to spurious
"deadlocks", if DoYield spawns a nested event loop. This will
not only block one yielding threads, but all indefinitly. And
not releasing the SolarMutex is also not fair for any other
threads waiting. That whole m_nNoYieldLock hack is just needed
to defer GUI processing to the main thread without releasing
the SolarMutex, the exact opposite of what yielding does.

While we can't do anything for the main thread as long as the
whole nested event loop concept prevails, we can prevent the
yielding thread deadlock using conditionals.

With all the special m_nNoYieldLock gone from SvpSalYieldMutex
there isn't any reason to keep it around.

Change-Id: I87c006ad36b4959f7e0dd18dda99a58c4e25032d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117900
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index ca130fb1b19f..56497db19270 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -157,7 +157,7 @@ SalFrame *AndroidSalInstance::CreateFrame( SalFrame* 
pParent, SalFrameStyleFlags
 extern "C" SalInstance *create_SalInstance()
 {
 LOGI("Android: create_SalInstance!");
-AndroidSalInstance* pInstance = new AndroidSalInstance( 
std::make_unique() );
+AndroidSalInstance* pInstance = new AndroidSalInstance( 
std::make_unique() );
 new SvpSalData();
 return pInstance;
 }
diff --git a/vcl/headless/headlessinst.cxx b/vcl/headless/headlessinst.cxx
index abe3e1cf92c7..162fd5bd865b 100644
--- a/vcl/headless/headlessinst.cxx
+++ b/vcl/headless/headlessinst.cxx
@@ -47,7 +47,7 @@ SalSystem *HeadlessSalInstance::CreateSalSystem()
 
 extern "C" SalInstance *create_SalInstance()
 {
-HeadlessSalInstance* pInstance = new 
HeadlessSalInstance(std::make_unique());
+HeadlessSalInstance* pInstance = new 
HeadlessSalInstance(std::make_unique());
 new SvpSalData();
 return pInstance;
 }
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index bf53dc24faf3..10beeeb58fbd 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -56,138 +56,55 @@
 #include 
 #include 
 #include 
+#include 
 
 SvpSalInstance* SvpSalInstance::s_pDefaultInstance = nullptr;
 
-#ifndef NDEBUG
-static bool g_CheckedMutex = false;
-
-#define DBG_TESTSVPYIELDMUTEX() \
-do { \
-if (!g_CheckedMutex) \
-{ \
-assert(dynamic_cast(GetYieldMutex()) != nullptr \
-&& "This SvpSalInstance function requires use of 
SvpSalYieldMutex"); \
-g_CheckedMutex = true; \
-} \
-} while(false)
-
-#else // NDEBUG
-#define DBG_TESTSVPYIELDMUTEX() ((void)0)
-#endif
-
-#if !defined(ANDROID) && !defined(IOS)
-
-static void atfork_child()
-{
-if (SvpSalInstance::s_pDefaultInstance != nullptr)
-{
-SvpSalInstance::s_pDefaultInstance->CloseWakeupPipe(false);
-SvpSalInstance::s_pDefaultInstance->CreateWakeupPipe(false);
-}
-}
-
-#endif
-
 SvpSalInstance::SvpSalInstance( std::unique_ptr pMutex )
 : SalGenericInstance( std::move(pMutex) )
+, m_WaitCondition(m_NonMainYieldMutex)
+, m_EventCondition(m_NonMainYieldMutex)
+, m_MainYieldCondition(m_MainYieldMutex)
 {
 m_aTimeout.tv_sec   = 0;
 m_aTimeout.tv_usec  = 0;
 m_nTimeoutMS= 0;
 
 m_MainThread = osl::Thread::getCurrentIdentifier();
-CreateWakeupPipe(true);
 if( s_pDefaultInstance == nullptr )
 s_pDefaultInstance = this;
-#if !defined(ANDROID) && !defined(IOS)
-pthread_atfork(nullptr, nullptr, atfork_child);
-#endif
+
+m_bSupportsOpenGL = false;
 }
 
 SvpSalInstance::~SvpSalInstance()
 {
 if( s_pDefaultInstance == this )
 s_pDefaultInstance = nullptr;
-CloseWakeupPipe(true);
 }
 
-void SvpSalInstance::CloseWakeupPipe(bool log)
+void SvpSalInstance::TriggerUserEventProcessing()
 {
-SvpSalYieldMutex *const 
pMutex(dynamic_cast(GetYieldMutex()));
-if (!pMutex)
-return;
-if (pMutex->m_FeedbackFDs[0] != -1)
-{
-if (log)
-{
-SAL_INFO("vcl.headless", "CloseWakeupPipe: Cl

Re: 7.3.4.2 crashes

2022-06-22 Thread Xisco Fauli

Hello,

On 22/6/22 12:06, Caolán McNamara wrote:

On Wed, 2022-06-22 at 11:30 +0200, Xisco Fauli wrote:

Hello,

two weeks after LibreOffice 7.3.4.2 was released, I've collected all
the information from
https://crashreport.libreoffice.org/stats/version/7.3.4.2 into a .ods
file, which is attached.

Presorted by number of crashes might be a good idea, get the most
frequent to the top

Ok, i'll take it into account for future reports



If you have a bit of time, I'd appreciate if you could take a look at
the document to see if any of the crashes can be fixed.

I think https://gerrit.libreoffice.org/c/core/+/136277 would fix the
12th most frequent of:

sfx2/source/view/viewfrm.cxx:3440
svx/source/dialog/srchdlg.cxx:2446
svx/source/tbxctrls/tbunosearchcontrollers.cxx:675
vcl/source/app/salvtables.cxx:6491
vcl/source/control/combobox.cxx:505
vcl/source/control/combobox.cxx:441
vcl/source/control/imp_listbox.cxx:720
vcl/source/control/imp_listbox.cxx:1533
vcl/source/control/imp_listbox.cxx:2416
vcl/source/control/combobox.cxx:788
vcl/source/window/event.cxx:213


Thanks. I've also found https://gerrit.libreoffice.org/c/core/+/136279 
and https://gerrit.libreoffice.org/c/core/+/136254


--
Xisco Faulí
LibreOffice QA Team
IRC: x1sc0



[Libreoffice-commits] core.git: Branch 'feature/chartdatatable' - 9 commits - chart2/source oox/source

2022-06-22 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit e435fd76f7f03751e5bd5a042ec7e8ae38fb9182
Author: Tomaž Vajngerl 
AuthorDate: Wed Jun 22 13:01:52 2022 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 22 13:12:25 2022 +0200

tdf#149204 revert getSeriesNames method to the original behaviour

The VSeriesPlotter::getSeriesNames returned a filtered list of
series names without the z-axis names, which is not expected from
the name, so when refactoring the assumption was to return all of
them names. This wasn't correct and has broken rendering of some
charts. This change reverts the method to the original behaviour.

Change-Id: I42464495a1a2b68a34efbc8409ae6c1417ff072d

diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx 
b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index c3b96d9912b9..1488dee911fd 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2322,18 +2322,27 @@ uno::Sequence< OUString > 
VSeriesPlotter::getSeriesNames() const
 std::vector aRetVector;
 
 OUString aRole;
-if( m_xChartTypeModel.is() )
+if (m_xChartTypeModel.is())
 aRole = m_xChartTypeModel->getRoleOfSequenceForSeriesLabel();
 
-for (VDataSeries const* pSeries : getAllSeries())
+for (auto const& rGroup : m_aZSlots)
 {
-if (pSeries)
+if (!rGroup.empty())
 {
-OUString aSeriesName( DataSeriesHelper::getDataSeriesLabel( 
pSeries->getModel(), aRole ) );
-aRetVector.push_back( aSeriesName );
+VDataSeriesGroup const & rSeriesGroup(rGroup[0]);
+if (!rSeriesGroup.m_aSeriesVector.empty())
+{
+VDataSeries const * pSeries = 
rSeriesGroup.m_aSeriesVector[0].get();
+rtl::Reference< DataSeries > xSeries( pSeries ? 
pSeries->getModel() : nullptr );
+if( xSeries.is() )
+{
+OUString aSeriesName( 
DataSeriesHelper::getDataSeriesLabel( xSeries, aRole ) );
+aRetVector.push_back( aSeriesName );
+}
+}
 }
-}
-return comphelper::containerToSequence( aRetVector );
+ }
+ return comphelper::containerToSequence( aRetVector );
 }
 
 void VSeriesPlotter::setPageReferenceSize( const css::awt::Size & rPageRefSize 
)
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx 
b/chart2/source/view/inc/VSeriesPlotter.hxx
index 47f787577863..9ab50f3a2550 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -236,8 +236,8 @@ public:
 
 ExplicitCategoriesProvider* getExplicitCategoriesProvider() { return 
m_pExplicitCategoriesProvider; }
 
-//get series names for the z axis labels
-css::uno::Sequence< OUString > getSeriesNames() const;
+// get series names for the z axis labels
+css::uno::Sequence getSeriesNames() const;
 
 void setPageReferenceSize( const css::awt::Size & rPageRefSize );
 //better performance for big data
commit c38fd129769d10d5b3d04c4b6c29a674b68bbc00
Author: Tomaž Vajngerl 
AuthorDate: Fri Jun 17 16:38:54 2022 +0200
Commit: Tomaž Vajngerl 
CommitDate: Fri Jun 17 18:58:24 2022 +0200

chart2: remove unneeded class prefix in ObjectHierarchy.cxx

Change-Id: Iee007f7ff4d9665ee089712e7ba98090a8090609

diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx 
b/chart2/source/controller/main/ObjectHierarchy.cxx
index ab1fa891377e..c696a94d8fcd 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -115,7 +115,7 @@ void ObjectHierarchy::createTree( const 
rtl::Reference<::chart::ChartModel>& xCh
 ObjectIdentifier aDiaOID;
 if( xDiagram.is() )
 aDiaOID = ObjectIdentifier( 
ObjectIdentifier::createClassifiedIdentifierForObject( 
static_cast(xDiagram.get()), xChartDocument ) );
-ObjectHierarchy::tChildContainer aTopLevelContainer;
+tChildContainer aTopLevelContainer;
 
 // First Level
 
@@ -158,7 +158,7 @@ void ObjectHierarchy::createTree( const 
rtl::Reference<::chart::ChartModel>& xCh
 createDiagramTree( aTopLevelContainer, xChartDocument, xDiagram );
 else
 {
-ObjectHierarchy::tChildContainer aSubContainer;
+tChildContainer aSubContainer;
 createDiagramTree( aSubContainer, xChartDocument, xDiagram );
 if( !aSubContainer.empty() )
 m_aChildMap[ aDiaOID ] = aSubContainer;
@@ -179,11 +179,11 @@ void ObjectHierarchy::createTree( const 
rtl::Reference<::chart::ChartModel>& xCh
 aTopLevelContainer.emplace_back( 
ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, u"" ) );
 
 if( ! aTopLevelContainer.empty())
-m_aChildMap[ ObjectHierarchy::getRootNodeOID() ] = aTopLevelContainer;
+m_aChildMap[ObjectHierarchy::getRootNodeOID()] = aTopLevelContainer;
 }
 
 v

[Libreoffice-commits] core.git: Branch 'feature/chartdatatable' - 17 commits - chart2/Library_chartcore.mk chart2/source offapi/com offapi/UnoApi_offapi.mk oox/inc oox/source

2022-06-22 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 92aca010a44ecf26765fef275b58b0cccf58ec52
Author: Tomaž Vajngerl 
AuthorDate: Fri Jun 17 16:38:54 2022 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 22 13:15:14 2022 +0200

chart2: remove unneeded class prefix in ObjectHierarchy.cxx

Change-Id: Iee007f7ff4d9665ee089712e7ba98090a8090609

diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx 
b/chart2/source/controller/main/ObjectHierarchy.cxx
index ab1fa891377e..c696a94d8fcd 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -115,7 +115,7 @@ void ObjectHierarchy::createTree( const 
rtl::Reference<::chart::ChartModel>& xCh
 ObjectIdentifier aDiaOID;
 if( xDiagram.is() )
 aDiaOID = ObjectIdentifier( 
ObjectIdentifier::createClassifiedIdentifierForObject( 
static_cast(xDiagram.get()), xChartDocument ) );
-ObjectHierarchy::tChildContainer aTopLevelContainer;
+tChildContainer aTopLevelContainer;
 
 // First Level
 
@@ -158,7 +158,7 @@ void ObjectHierarchy::createTree( const 
rtl::Reference<::chart::ChartModel>& xCh
 createDiagramTree( aTopLevelContainer, xChartDocument, xDiagram );
 else
 {
-ObjectHierarchy::tChildContainer aSubContainer;
+tChildContainer aSubContainer;
 createDiagramTree( aSubContainer, xChartDocument, xDiagram );
 if( !aSubContainer.empty() )
 m_aChildMap[ aDiaOID ] = aSubContainer;
@@ -179,11 +179,11 @@ void ObjectHierarchy::createTree( const 
rtl::Reference<::chart::ChartModel>& xCh
 aTopLevelContainer.emplace_back( 
ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, u"" ) );
 
 if( ! aTopLevelContainer.empty())
-m_aChildMap[ ObjectHierarchy::getRootNodeOID() ] = aTopLevelContainer;
+m_aChildMap[ObjectHierarchy::getRootNodeOID()] = aTopLevelContainer;
 }
 
 void ObjectHierarchy::createLegendTree(
-ObjectHierarchy::tChildContainer & rContainer,
+tChildContainer & rContainer,
 const rtl::Reference<::chart::ChartModel> & xChartDoc,
 const rtl::Reference< Diagram > & xDiagram  )
 {
@@ -199,7 +199,7 @@ void ObjectHierarchy::createLegendTree(
 rtl::Reference< SvxShapeGroupAnyD > xLegendShapeContainer =
 dynamic_cast(
 m_pExplicitValueProvider->getShapeForCID( 
aLegendOID.getObjectCID() ).get() );
-ObjectHierarchy::tChildContainer aLegendEntryOIDs;
+tChildContainer aLegendEntryOIDs;
 lcl_getChildOIDs( aLegendEntryOIDs, xLegendShapeContainer );
 
 m_aChildMap[ aLegendOID ] = aLegendEntryOIDs;
@@ -207,7 +207,7 @@ void ObjectHierarchy::createLegendTree(
 }
 
 void ObjectHierarchy::createAxesTree(
-ObjectHierarchy::tChildContainer & rContainer,
+tChildContainer & rContainer,
 const rtl::Reference<::chart::ChartModel> & xChartDoc,
 const rtl::Reference< Diagram > & xDiagram  )
 {
@@ -271,7 +271,7 @@ void ObjectHierarchy::createAxesTree(
 }
 
 void ObjectHierarchy::createWallAndFloor(
-ObjectHierarchy::tChildContainer & rContainer,
+tChildContainer & rContainer,
 const rtl::Reference< Diagram > & xDiagram )
 {
 sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
@@ -289,7 +289,7 @@ void ObjectHierarchy::createWallAndFloor(
 }
 
 void ObjectHierarchy::createDiagramTree(
-ObjectHierarchy::tChildContainer & rContainer,
+tChildContainer & rContainer,
 const rtl::Reference<::chart::ChartModel> & xChartDoc,
 const rtl::Reference< Diagram > & xDiagram )
 {
@@ -307,7 +307,7 @@ void ObjectHierarchy::createDiagramTree(
 }
 
 void ObjectHierarchy::createDataSeriesTree(
-ObjectHierarchy::tChildContainer & rOutDiagramSubContainer,
+tChildContainer & rOutDiagramSubContainer,
 const rtl::Reference< Diagram > & xDiagram )
 {
 try
@@ -334,7 +334,7 @@ void ObjectHierarchy::createDataSeriesTree(
 ObjectIdentifier( 
ObjectIdentifier::createClassifiedIdentifierForParticle( aSeriesParticle ) ) );
 rOutDiagramSubContainer.push_back( aSeriesOID );
 
-ObjectHierarchy::tChildContainer aSeriesSubContainer;
+tChildContainer aSeriesSubContainer;
 
 rtl::Reference< DataSeries > const & xSeries = 
aSeriesSeq[nSeriesIdx];
 
@@ -406,7 +406,7 @@ void ObjectHierarchy::createDataSeriesTree(
 }
 }
 
-void ObjectHierarchy::createAdditionalShapesTree( 
ObjectHierarchy::tChildContainer& rContainer )
+void ObjectHierarchy::createAdditionalShapesTree(tChildContainer& rContainer)
 {
 try
 {
@@ -453,7 +453,7 @@ const ObjectHierarchy::tChildContainer & 
ObjectHierarchy::getChildren( const Obj
 if( aIt != m_aChildMap.end())
 return aIt->second;
 }
-static const ObjectHierarchy::tChildContainer EMPTY;
+static const tChildContainer EMPTY;
 return EMPTY;
 }
 
@@ -463,13 +463,13 @@ con

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

2022-06-22 Thread Caolán McNamara (via logerrit)
 svx/source/dialog/srchdlg.cxx |   24 ++--
 1 file changed, 14 insertions(+), 10 deletions(-)

New commits:
commit 4d9bbb7dc9189da962d0f8a21e252a5e34701863
Author: Caolán McNamara 
AuthorDate: Wed Jun 22 11:02:43 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 22 13:23:04 2022 +0200

crashreporting: apparent null derefs of SfxViewFrame::Current()

Change-Id: I0e2c07a7eaa0a13be0a44c7cd187feec8ed4c2c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136240
Reviewed-by: Xisco Fauli 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 1efaa5d8f1ae..b047ef27d1e7 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -2344,16 +2344,12 @@ SfxChildWinInfo SvxSearchDialogWrapper::GetInfo() const
 return aInfo;
 }
 
-static void lcl_SetSearchLabelWindow(const OUString& rStr)
+static void lcl_SetSearchLabelWindow(const OUString& rStr, SfxViewFrame& 
rViewFrame)
 {
-SfxViewFrame* pViewFrame = SfxViewFrame::Current();
-if (!pViewFrame)
-return;
-
 bool bNotFound = rStr == SvxResId(RID_SVXSTR_SEARCH_NOT_FOUND);
 
 css::uno::Reference< css::beans::XPropertySet > xPropSet(
-pViewFrame->GetFrame().GetFrameInterface(), 
css::uno::UNO_QUERY_THROW);
+rViewFrame.GetFrame().GetFrameInterface(), 
css::uno::UNO_QUERY_THROW);
 css::uno::Reference< css::frame::XLayoutManager > xLayoutManager;
 xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager;
 css::uno::Reference< css::ui::XUIElement > xUIElement =
@@ -2424,6 +2420,10 @@ OUString SvxSearchDialogWrapper::GetSearchLabel()
 
 void SvxSearchDialogWrapper::SetSearchLabel(const SearchLabel& rSL)
 {
+SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+if (!pViewFrame)
+return;
+
 OUString sStr;
 if (rSL == SearchLabel::End)
 sStr = SvxResId(RID_SVXSTR_SEARCH_END);
@@ -2444,17 +2444,21 @@ void SvxSearchDialogWrapper::SetSearchLabel(const 
SearchLabel& rSL)
 else if (rSL == SearchLabel::ReminderStartWrapped)
 sStr = SvxResId(RID_SVXSTR_SEARCH_REMINDER_START_WRAPPED);
 
-lcl_SetSearchLabelWindow(sStr);
-if (SvxSearchDialogWrapper *pWrp = static_cast( 
SfxViewFrame::Current()->
+lcl_SetSearchLabelWindow(sStr, *pViewFrame);
+
+if (SvxSearchDialogWrapper *pWrp = static_cast( 
pViewFrame->
 GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId() )))
 pWrp->getDialog()->SetSearchLabel(sStr);
 }
 
 void SvxSearchDialogWrapper::SetSearchLabel(const OUString& sStr)
 {
+SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+if (!pViewFrame)
+return;
 
-lcl_SetSearchLabelWindow(sStr);
-if (SvxSearchDialogWrapper *pWrp = static_cast( 
SfxViewFrame::Current()->
+lcl_SetSearchLabelWindow(sStr, *pViewFrame);
+if (SvxSearchDialogWrapper *pWrp = static_cast( 
pViewFrame->
 GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId() )))
 pWrp->getDialog()->SetSearchLabel(sStr);
 }


[Libreoffice-commits] core.git: Branch 'feature/chartdatatable' - 16 commits - chart2/Library_chartcore.mk chart2/source offapi/com offapi/UnoApi_offapi.mk oox/inc oox/source

2022-06-22 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 79b3991186785e01ab213ba0ad609e9977ad1225
Author: Tomaž Vajngerl 
AuthorDate: Fri Jun 17 16:38:54 2022 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 22 13:22:53 2022 +0200

chart2: remove unneeded class prefix in ObjectHierarchy.cxx

Change-Id: Iee007f7ff4d9665ee089712e7ba98090a8090609

diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx 
b/chart2/source/controller/main/ObjectHierarchy.cxx
index ab1fa891377e..c696a94d8fcd 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -115,7 +115,7 @@ void ObjectHierarchy::createTree( const 
rtl::Reference<::chart::ChartModel>& xCh
 ObjectIdentifier aDiaOID;
 if( xDiagram.is() )
 aDiaOID = ObjectIdentifier( 
ObjectIdentifier::createClassifiedIdentifierForObject( 
static_cast(xDiagram.get()), xChartDocument ) );
-ObjectHierarchy::tChildContainer aTopLevelContainer;
+tChildContainer aTopLevelContainer;
 
 // First Level
 
@@ -158,7 +158,7 @@ void ObjectHierarchy::createTree( const 
rtl::Reference<::chart::ChartModel>& xCh
 createDiagramTree( aTopLevelContainer, xChartDocument, xDiagram );
 else
 {
-ObjectHierarchy::tChildContainer aSubContainer;
+tChildContainer aSubContainer;
 createDiagramTree( aSubContainer, xChartDocument, xDiagram );
 if( !aSubContainer.empty() )
 m_aChildMap[ aDiaOID ] = aSubContainer;
@@ -179,11 +179,11 @@ void ObjectHierarchy::createTree( const 
rtl::Reference<::chart::ChartModel>& xCh
 aTopLevelContainer.emplace_back( 
ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, u"" ) );
 
 if( ! aTopLevelContainer.empty())
-m_aChildMap[ ObjectHierarchy::getRootNodeOID() ] = aTopLevelContainer;
+m_aChildMap[ObjectHierarchy::getRootNodeOID()] = aTopLevelContainer;
 }
 
 void ObjectHierarchy::createLegendTree(
-ObjectHierarchy::tChildContainer & rContainer,
+tChildContainer & rContainer,
 const rtl::Reference<::chart::ChartModel> & xChartDoc,
 const rtl::Reference< Diagram > & xDiagram  )
 {
@@ -199,7 +199,7 @@ void ObjectHierarchy::createLegendTree(
 rtl::Reference< SvxShapeGroupAnyD > xLegendShapeContainer =
 dynamic_cast(
 m_pExplicitValueProvider->getShapeForCID( 
aLegendOID.getObjectCID() ).get() );
-ObjectHierarchy::tChildContainer aLegendEntryOIDs;
+tChildContainer aLegendEntryOIDs;
 lcl_getChildOIDs( aLegendEntryOIDs, xLegendShapeContainer );
 
 m_aChildMap[ aLegendOID ] = aLegendEntryOIDs;
@@ -207,7 +207,7 @@ void ObjectHierarchy::createLegendTree(
 }
 
 void ObjectHierarchy::createAxesTree(
-ObjectHierarchy::tChildContainer & rContainer,
+tChildContainer & rContainer,
 const rtl::Reference<::chart::ChartModel> & xChartDoc,
 const rtl::Reference< Diagram > & xDiagram  )
 {
@@ -271,7 +271,7 @@ void ObjectHierarchy::createAxesTree(
 }
 
 void ObjectHierarchy::createWallAndFloor(
-ObjectHierarchy::tChildContainer & rContainer,
+tChildContainer & rContainer,
 const rtl::Reference< Diagram > & xDiagram )
 {
 sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
@@ -289,7 +289,7 @@ void ObjectHierarchy::createWallAndFloor(
 }
 
 void ObjectHierarchy::createDiagramTree(
-ObjectHierarchy::tChildContainer & rContainer,
+tChildContainer & rContainer,
 const rtl::Reference<::chart::ChartModel> & xChartDoc,
 const rtl::Reference< Diagram > & xDiagram )
 {
@@ -307,7 +307,7 @@ void ObjectHierarchy::createDiagramTree(
 }
 
 void ObjectHierarchy::createDataSeriesTree(
-ObjectHierarchy::tChildContainer & rOutDiagramSubContainer,
+tChildContainer & rOutDiagramSubContainer,
 const rtl::Reference< Diagram > & xDiagram )
 {
 try
@@ -334,7 +334,7 @@ void ObjectHierarchy::createDataSeriesTree(
 ObjectIdentifier( 
ObjectIdentifier::createClassifiedIdentifierForParticle( aSeriesParticle ) ) );
 rOutDiagramSubContainer.push_back( aSeriesOID );
 
-ObjectHierarchy::tChildContainer aSeriesSubContainer;
+tChildContainer aSeriesSubContainer;
 
 rtl::Reference< DataSeries > const & xSeries = 
aSeriesSeq[nSeriesIdx];
 
@@ -406,7 +406,7 @@ void ObjectHierarchy::createDataSeriesTree(
 }
 }
 
-void ObjectHierarchy::createAdditionalShapesTree( 
ObjectHierarchy::tChildContainer& rContainer )
+void ObjectHierarchy::createAdditionalShapesTree(tChildContainer& rContainer)
 {
 try
 {
@@ -453,7 +453,7 @@ const ObjectHierarchy::tChildContainer & 
ObjectHierarchy::getChildren( const Obj
 if( aIt != m_aChildMap.end())
 return aIt->second;
 }
-static const ObjectHierarchy::tChildContainer EMPTY;
+static const tChildContainer EMPTY;
 return EMPTY;
 }
 
@@ -463,13 +463,13 @@ con

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

2022-06-22 Thread Caolán McNamara (via logerrit)
 svx/source/dialog/srchdlg.cxx |   24 ++--
 1 file changed, 14 insertions(+), 10 deletions(-)

New commits:
commit 13161a02952470d06e86cbed711ce69c93e10bca
Author: Caolán McNamara 
AuthorDate: Wed Jun 22 11:02:43 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 22 13:27:50 2022 +0200

crashreporting: apparent null derefs of SfxViewFrame::Current()

Change-Id: I0e2c07a7eaa0a13be0a44c7cd187feec8ed4c2c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136241
Reviewed-by: Xisco Fauli 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index ba5def14777e..1f77456477d4 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -2342,16 +2342,12 @@ SfxChildWinInfo SvxSearchDialogWrapper::GetInfo() const
 return aInfo;
 }
 
-static void lcl_SetSearchLabelWindow(const OUString& rStr)
+static void lcl_SetSearchLabelWindow(const OUString& rStr, SfxViewFrame& 
rViewFrame)
 {
-SfxViewFrame* pViewFrame = SfxViewFrame::Current();
-if (!pViewFrame)
-return;
-
 bool bNotFound = rStr == SvxResId(RID_SVXSTR_SEARCH_NOT_FOUND);
 
 css::uno::Reference< css::beans::XPropertySet > xPropSet(
-pViewFrame->GetFrame().GetFrameInterface(), 
css::uno::UNO_QUERY_THROW);
+rViewFrame.GetFrame().GetFrameInterface(), 
css::uno::UNO_QUERY_THROW);
 css::uno::Reference< css::frame::XLayoutManager > xLayoutManager;
 xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager;
 css::uno::Reference< css::ui::XUIElement > xUIElement =
@@ -2422,6 +2418,10 @@ OUString SvxSearchDialogWrapper::GetSearchLabel()
 
 void SvxSearchDialogWrapper::SetSearchLabel(const SearchLabel& rSL)
 {
+SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+if (!pViewFrame)
+return;
+
 OUString sStr;
 if (rSL == SearchLabel::End)
 sStr = SvxResId(RID_SVXSTR_SEARCH_END);
@@ -2442,17 +2442,21 @@ void SvxSearchDialogWrapper::SetSearchLabel(const 
SearchLabel& rSL)
 else if (rSL == SearchLabel::ReminderStartWrapped)
 sStr = SvxResId(RID_SVXSTR_SEARCH_REMINDER_START_WRAPPED);
 
-lcl_SetSearchLabelWindow(sStr);
-if (SvxSearchDialogWrapper *pWrp = static_cast( 
SfxViewFrame::Current()->
+lcl_SetSearchLabelWindow(sStr, *pViewFrame);
+
+if (SvxSearchDialogWrapper *pWrp = static_cast( 
pViewFrame->
 GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId() )))
 pWrp->getDialog()->SetSearchLabel(sStr);
 }
 
 void SvxSearchDialogWrapper::SetSearchLabel(const OUString& sStr)
 {
+SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+if (!pViewFrame)
+return;
 
-lcl_SetSearchLabelWindow(sStr);
-if (SvxSearchDialogWrapper *pWrp = static_cast( 
SfxViewFrame::Current()->
+lcl_SetSearchLabelWindow(sStr, *pViewFrame);
+if (SvxSearchDialogWrapper *pWrp = static_cast( 
pViewFrame->
 GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId() )))
 pWrp->getDialog()->SetSearchLabel(sStr);
 }


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

2022-06-22 Thread Caolán McNamara (via logerrit)
 svx/source/dialog/srchdlg.cxx |   24 ++--
 1 file changed, 14 insertions(+), 10 deletions(-)

New commits:
commit 257d80b4ab086aae504694d37e43c5b1a7d9a386
Author: Caolán McNamara 
AuthorDate: Wed Jun 22 11:02:43 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 22 13:38:49 2022 +0200

crashreporting: apparent null derefs of SfxViewFrame::Current()

Change-Id: I0e2c07a7eaa0a13be0a44c7cd187feec8ed4c2c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136277
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 
Reviewed-by: Caolán McNamara 

diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 1efaa5d8f1ae..b047ef27d1e7 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -2344,16 +2344,12 @@ SfxChildWinInfo SvxSearchDialogWrapper::GetInfo() const
 return aInfo;
 }
 
-static void lcl_SetSearchLabelWindow(const OUString& rStr)
+static void lcl_SetSearchLabelWindow(const OUString& rStr, SfxViewFrame& 
rViewFrame)
 {
-SfxViewFrame* pViewFrame = SfxViewFrame::Current();
-if (!pViewFrame)
-return;
-
 bool bNotFound = rStr == SvxResId(RID_SVXSTR_SEARCH_NOT_FOUND);
 
 css::uno::Reference< css::beans::XPropertySet > xPropSet(
-pViewFrame->GetFrame().GetFrameInterface(), 
css::uno::UNO_QUERY_THROW);
+rViewFrame.GetFrame().GetFrameInterface(), 
css::uno::UNO_QUERY_THROW);
 css::uno::Reference< css::frame::XLayoutManager > xLayoutManager;
 xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager;
 css::uno::Reference< css::ui::XUIElement > xUIElement =
@@ -2424,6 +2420,10 @@ OUString SvxSearchDialogWrapper::GetSearchLabel()
 
 void SvxSearchDialogWrapper::SetSearchLabel(const SearchLabel& rSL)
 {
+SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+if (!pViewFrame)
+return;
+
 OUString sStr;
 if (rSL == SearchLabel::End)
 sStr = SvxResId(RID_SVXSTR_SEARCH_END);
@@ -2444,17 +2444,21 @@ void SvxSearchDialogWrapper::SetSearchLabel(const 
SearchLabel& rSL)
 else if (rSL == SearchLabel::ReminderStartWrapped)
 sStr = SvxResId(RID_SVXSTR_SEARCH_REMINDER_START_WRAPPED);
 
-lcl_SetSearchLabelWindow(sStr);
-if (SvxSearchDialogWrapper *pWrp = static_cast( 
SfxViewFrame::Current()->
+lcl_SetSearchLabelWindow(sStr, *pViewFrame);
+
+if (SvxSearchDialogWrapper *pWrp = static_cast( 
pViewFrame->
 GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId() )))
 pWrp->getDialog()->SetSearchLabel(sStr);
 }
 
 void SvxSearchDialogWrapper::SetSearchLabel(const OUString& sStr)
 {
+SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+if (!pViewFrame)
+return;
 
-lcl_SetSearchLabelWindow(sStr);
-if (SvxSearchDialogWrapper *pWrp = static_cast( 
SfxViewFrame::Current()->
+lcl_SetSearchLabelWindow(sStr, *pViewFrame);
+if (SvxSearchDialogWrapper *pWrp = static_cast( 
pViewFrame->
 GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId() )))
 pWrp->getDialog()->SetSearchLabel(sStr);
 }


[Libreoffice-commits] core.git: sd/README.vars

2022-06-22 Thread Samuel Mehrbrodt (via logerrit)
 sd/README.vars |1 +
 1 file changed, 1 insertion(+)

New commits:
commit ab943f5bfa221f04195290149927321bb53f26c5
Author: Samuel Mehrbrodt 
AuthorDate: Tue Jun 21 11:54:21 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Jun 22 13:47:50 2022 +0200

Document SD_DEBUG env var

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

diff --git a/sd/README.vars b/sd/README.vars
new file mode 100644
index ..cef7a294fc5e
--- /dev/null
+++ b/sd/README.vars
@@ -0,0 +1 @@
+SD_DEBUG - Dump document as XML when pressing F12 (check model.xml in workdir)


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

2022-06-22 Thread Alain Romedenne (via logerrit)
 source/text/sbasic/shared/03/sf_exception.xhp |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 1e58e8bacdb26bce4eb86485c183f12f87cc3e31
Author: Alain Romedenne 
AuthorDate: Sat Jun 18 16:17:41 2022 +0200
Commit: Alain Romedenne 
CommitDate: Wed Jun 22 14:05:58 2022 +0200

Improve SF.exception PythonPrint() method content

APSO extension is optional despite existing explanation

Change-Id: Ib7615996a04dd770d2ec96e6f6066c272074248b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136051
Tested-by: Jenkins
Reviewed-by: Rafael Lima 
Reviewed-by: Alain Romedenne 

diff --git a/source/text/sbasic/shared/03/sf_exception.xhp 
b/source/text/sbasic/shared/03/sf_exception.xhp
index 416c43457..c85fa4068 100644
--- a/source/text/sbasic/shared/03/sf_exception.xhp
+++ b/source/text/sbasic/shared/03/sf_exception.xhp
@@ -319,21 +319,21 @@
 Exception service;PythonPrint
   
   PythonPrint
-  Displays the list of 
arguments in a readable form in the Python shell (APSO) console. Arguments are 
separated by a TAB character (simulated by spaces).
+  Displays the list of 
arguments in a readable form in the platform console. Arguments are separated 
by a TAB character (simulated by spaces).
   The same string is 
added to the ScriptForge debug console.
+  If https://extensions.libreoffice.org/en/extensions/show/apso-alternative-script-organizer-for-python";
 name="APSO Python shell">Python shell (APSO) is active, 
PythonPrint content is written to APSO console in place of 
the platform console.
   
   
   
   exc.PythonPrint(arg0: any, [arg1: any, 
...])
   
-  
   
   arg0[, arg1, 
...]: Any number of arguments of any type. The maximum length of each 
individual argument is 1024 characters.
   
   
 exc.PythonPrint(a, Array(1, 2, 3), , 
"line1" & Chr(10) & "Line2", DateSerial(2020, 04, 
09))
   
-  In python use simply the builtin print() 
statement.
+  In Python use a print 
statement to print to the APSO console or use the DebugPrint 
method to print to ScriptForge's console.
 
 
 
@@ -389,6 +389,7 @@
   
   
   Number: 
The error code, as a number or as a string. Default value is that of 
Err Basic builtin function.
+  
   Source: The location of the error, as a number or 
as a string. Default value is that of Erl Basic builtin 
function.
   Description: The message to display to the user 
and to report in the console. Default value is that of 
Error$ Basic builtin function.
   


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 4e9b23cb2356cf7019a6ed81e08abf1664a72051
Author: Alain Romedenne 
AuthorDate: Wed Jun 22 14:06:00 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jun 22 14:06:00 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 1e58e8bacdb26bce4eb86485c183f12f87cc3e31
  - Improve SF.exception PythonPrint() method content

APSO extension is optional despite existing explanation

Change-Id: Ib7615996a04dd770d2ec96e6f6066c272074248b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136051
Tested-by: Jenkins
Reviewed-by: Rafael Lima 
Reviewed-by: Alain Romedenne 

diff --git a/helpcontent2 b/helpcontent2
index a9daf1b47b52..1e58e8bacdb2 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit a9daf1b47b52f675225f31843b67e186a140845b
+Subproject commit 1e58e8bacdb26bce4eb86485c183f12f87cc3e31


[Libreoffice-commits] core.git: android/mobile-config.py bin/update

2022-06-22 Thread Lukas (via logerrit)
 android/mobile-config.py|   37 +++
 bin/update/config.py|3 +
 bin/update/create_build_config.py   |   13 --
 bin/update/create_full_mar.py   |   26 -
 bin/update/create_full_mar_for_languages.py |   13 --
 bin/update/create_partial_update.py |   54 
 bin/update/get_update_channel.py|2 +
 bin/update/path.py  |   24 +++-
 bin/update/signing.py   |5 ++
 bin/update/tools.py |   39 +---
 bin/update/uncompress_mar.py|6 ++-
 bin/update/upload_build_config.py   |   18 -
 bin/update/upload_builds.py |9 +++-
 13 files changed, 140 insertions(+), 109 deletions(-)

New commits:
commit 157298bb808a943616991927f9370a86c1f2ca48
Author: Lukas 
AuthorDate: Wed Apr 20 19:54:39 2022 +0200
Commit: Ilmari Lauhakangas 
CommitDate: Wed Jun 22 14:07:19 2022 +0200

android and bin/update: make pythonic

Change-Id: Iaf791bfa8d9822843b26f2a2f2c3d94c55a60a0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133358
Reviewed-by: Arkadiy Illarionov 
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/android/mobile-config.py b/android/mobile-config.py
index 5998e5d1f9b7..596f27f107a8 100755
--- a/android/mobile-config.py
+++ b/android/mobile-config.py
@@ -14,13 +14,13 @@
 # already over-complicated by rampant conditionals.
 
 import sys
-import xml.etree.ElementTree as ET
+import xml.etree.ElementTree as ElementTree
 
 main_xcd_discard = [
-'org.openoffice.Office/TableWizard', # huge
+'org.openoffice.Office/TableWizard',  # huge
 
-'org.openoffice.Office.DataAccess/Drivers', # no database
-'org.openoffice.Office/Addons', # no addons
+'org.openoffice.Office.DataAccess/Drivers',  # no database
+'org.openoffice.Office/Addons',  # no addons
 
 # no conventional UI; reverse sorted by size
 'org.openoffice.Office.UI/GenericCommands',
@@ -46,15 +46,15 @@ main_xcd_discard = [
 'org.openoffice.Office.UI/GlobalSettings',
 'org.openoffice.Office.UI/BibliographyWindowState',
 'org.openoffice.Office.UI/Category',
-]
+]
 
 if __name__ == '__main__':
-tree = ET.parse(sys.argv[1])
+tree = ElementTree.parse(sys.argv[1])
 root = tree.getroot()
 
 total = 0
 for child in root:
-total += len(ET.tostring(child))
+total += len(ElementTree.tostring(child))
 
 saved = 0
 to_remove = []
@@ -62,7 +62,7 @@ if __name__ == '__main__':
 for child in root:
 section = child.attrib['{http://openoffice.org/2001/registry}name']
 package = child.attrib['{http://openoffice.org/2001/registry}package']
-size = len(ET.tostring(child));
+size = len(ElementTree.tostring(child))
 key = '%s/%s' % (package, section)
 if key in main_xcd_discard:
 print('removed %s - saving %d' % (key, size))
@@ -72,7 +72,7 @@ if __name__ == '__main__':
 for child in to_remove:
 root.remove(child)
 
-print("saved %d of %d bytes: %2.f%%" % (saved, total, saved*100.0/total))
+print("saved %d of %d bytes: %2.f%%" % (saved, total, saved * 100.0 / 
total))
 
 # Don't do pointless Word -> Writer and similar conversions when we have 
no UI.
 nsDict = {
@@ -80,28 +80,37 @@ if __name__ == '__main__':
 "component-data": 
"{http://openoffice.org/2001/registry}component-data";,
 "name": "{http://openoffice.org/2001/registry}name";,
 }
-microsoftImport = 
'%(component-schema)s[@%(name)s="Common"]/component/group[@%(name)s="Filter"]/group[@%(name)s="Microsoft"]/group[@%(name)s="Import"]/prop'
 % nsDict
+microsoftImport = 
'%(component-schema)s[@%(name)s="Common"]/component/group[@%(name)s="Filter"]/group[@%('
 +\
+  'name)s="Microsoft"]/group[@%(name)s="Import"]/prop' % 
nsDict
 props = root.findall(microsoftImport)
 for prop in props:
 prop.findall("value")[0].text = "false"
 
 # Disable View -> Text Boundaries
-for prop in 
root.findall('%(component-schema)s[@%(name)s="UI"]/templates/group[@%(name)s="ColorScheme"]/group[@%(name)s="DocBoundaries"]/prop'
 % nsDict):
+for prop in root.findall(
+
'%(component-schema)s[@%(name)s="UI"]/templates/group[@%(name)s="ColorScheme"]/group[@%('
 +
+'name)s="DocBoundaries"]/prop' % nsDict):
 for value in prop.findall("value"):
 value.text = "false"
 
 # Disable Table -> Table Boundaries
-for prop in 
root.findall('%(component-schema)s[@%(name)s="UI"]/templates/group[@%(name)s="ColorScheme"]/group[@%(name)s="TableBoundaries"]/prop'
 % nsDict):
+for prop in root.findall(
+
'%(component-schema)s[@%(name)s="UI"]/templates/group[@%(name)s="ColorScheme"]/group[@%('
 +
+'name)s="Tab

[Libreoffice-commits] core.git: filter/Configuration_filter.mk filter/source

2022-06-22 Thread offtkp (via logerrit)
 filter/Configuration_filter.mk 
   |7 +
 
filter/source/config/fragments/filters/SVGZ___Compressed_Scalable_Vector_Graphics.xcu
 |   30 +++
 filter/source/config/fragments/filters/draw_svgz_Export.xcu
   |   30 +++
 filter/source/config/fragments/internalgraphicfilters/svgz_Export.xcu  
   |   27 ++
 filter/source/config/fragments/internalgraphicfilters/svgz_Import.xcu  
   |   27 ++
 filter/source/config/fragments/types/svg_Scalable_Vector_Graphics.xcu  
   |2 
 
filter/source/config/fragments/types/svgz_Compressed_Scalable_Vector_Graphics.xcu
 |   29 +++
 filter/source/svg/svgexport.cxx
   |   40 +-
 filter/source/svg/svgfilter.cxx
   |5 +
 filter/source/svg/svgfilter.hxx
   |1 
 10 files changed, 196 insertions(+), 2 deletions(-)

New commits:
commit 9a5d46070e70e8cf42bea0dad37063d9ed71e375
Author: offtkp 
AuthorDate: Thu Jun 9 16:22:32 2022 +0300
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 22 14:11:14 2022 +0200

tdf#100522 Add support for exporting SVGZ in Draw

Detect draw_svgz_Export and compress the SVG before exporting if needed

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

diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index 5c451319e95f..939234b1dc15 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -714,6 +714,7 @@ $(eval $(call 
filter_Configuration_add_types,fcfg_langpack,fcfg_drawgraphics_typ
ras_Sun_Rasterfile \
svg_Scalable_Vector_Graphics_Draw \
svg_Scalable_Vector_Graphics \
+   svgz_Compressed_Scalable_Vector_Graphics \
svm_StarView_Metafile \
tga_Truevision_TARGA \
tif_Tag_Image_File \
@@ -744,6 +745,7 @@ $(eval $(call 
filter_Configuration_add_filters,fcfg_langpack,fcfg_drawgraphics_f
RAS___Sun_Rasterfile \
SVG___Scalable_Vector_Graphics_Draw \
SVG___Scalable_Vector_Graphics \
+   SVGZ___Compressed_Scalable_Vector_Graphics \
SVM___StarView_Metafile \
TGA___Truevision_TARGA \
TIF___Tag_Image_File \
@@ -764,6 +766,7 @@ $(eval $(call 
filter_Configuration_add_filters,fcfg_langpack,fcfg_drawgraphics_f
draw_jpg_Export \
draw_png_Export \
draw_svg_Export \
+   draw_svgz_Export \
draw_tif_Export \
draw_webp_Export \
draw_wmf_Export \
@@ -789,6 +792,7 @@ $(eval $(call 
filter_Configuration_add_types,fcfg_langpack,fcfg_impressgraphics_
ras_Sun_Rasterfile \
svg_Scalable_Vector_Graphics_Draw \
svg_Scalable_Vector_Graphics \
+   svgz_Compressed_Scalable_Vector_Graphics \
svm_StarView_Metafile \
tif_Tag_Image_File \
wmf_MS_Windows_Metafile \
@@ -862,6 +866,7 @@ $(eval $(call 
filter_Configuration_add_types,fcfg_langpack,fcfg_internalgraphics
psd_Adobe_Photoshop \
ras_Sun_Rasterfile \
svg_Scalable_Vector_Graphics \
+   svgz_Compressed_Scalable_Vector_Graphics \
svm_StarView_Metafile \
tga_Truevision_TARGA \
tif_Tag_Image_File \
@@ -903,6 +908,8 @@ $(eval $(call 
filter_Configuration_add_internal_filters,fcfg_langpack,fcfg_inter
ras_Import \
svg_Export \
svg_Import \
+   svgz_Export \
+   svgz_Import \
svm_Export \
svm_Import \
tga_Import \
diff --git 
a/filter/source/config/fragments/filters/SVGZ___Compressed_Scalable_Vector_Graphics.xcu
 
b/filter/source/config/fragments/filters/SVGZ___Compressed_Scalable_Vector_Graphics.xcu
new file mode 100644
index ..35753a1f1a8b
--- /dev/null
+++ 
b/filter/source/config/fragments/filters/SVGZ___Compressed_Scalable_Vector_Graphics.xcu
@@ -0,0 +1,30 @@
+
+
+IMPORT ALIEN 3RDPARTYFILTER 
PREFERRED
+
+com.sun.star.comp.Draw.SVGFilter
+
+
+SVGZ - Compressed Scalable Vector 
Graphics
+
+0
+svgz_Compressed_Scalable_Vector_Graphics
+
+com.sun.star.presentation.PresentationDocument
+
diff --git a/filter/source/config/fragments/filters/draw_svgz_Export.xcu 
b/filter/source/config/fragments/filters/draw_svgz_Export.xcu
new file mode 100644
index ..59af9fa1d5d4
--- /dev/null
+++ b/filter/source/config/fragments/filters/draw_svgz_Export.xcu
@@ -0,0 +1,30 @@
+
+
+EXPORT ALIEN 
3RDPARTYFILTER
+
+com.sun.star.comp.Draw.SVGFilter
+
+
+SVGZ - Compressed Scalable Vector 
Graphics
+
+0
+svgz_Compressed_Scalable_Vector_Graphics
+
+ 

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

2022-06-22 Thread offtkp (via logerrit)
 include/vcl/graphicfilter.hxx   |1 +
 vcl/source/filter/graphicfilter.cxx |   16 
 2 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit 29252e78627db79662d89919f77746824c6563c3
Author: offtkp 
AuthorDate: Sun Jun 19 00:42:44 2022 +0300
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 22 14:12:23 2022 +0200

Add support for exporting SVGZ in Writer

When exporting a graphic through Writer, graphicfilters ExportGraphic
is called, which didn't have SVGZ exporting functionality before this
commit. With this commit a valid Z compressed SVG file is exported,
using the functionality that already exists in ExportGraphic.

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

diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 27388da41c28..fb237bc780a4 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -101,6 +101,7 @@ namespace o3tl
 #define EXP_EMZ "SVEMZ"
 #define EXP_JPEG"SVEJPEG"
 #define EXP_SVG "SVESVG"
+#define EXP_SVGZ"SVESVGZ"
 #define EXP_PDF "SVEPDF"
 #define EXP_PNG "SVEPNG"
 #define EXP_TIFF"SVTIFF"
diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index bfe1d3b7d506..f7e3765f4e94 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1844,9 +1844,17 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& 
rGraphic, std::u16string_vi
 if( rOStm.GetError() )
 nStatus = ERRCODE_GRFILTER_IOERROR;
 }
-else if( aFilterName.equalsIgnoreAsciiCase( EXP_SVG ) )
+else if( aFilterName.equalsIgnoreAsciiCase( EXP_SVG ) || 
aFilterName.equalsIgnoreAsciiCase( EXP_SVGZ ) )
 {
 bool bDone(false);
+SvStream* rTempStm = &rOStm;
+if (aFilterName.equalsIgnoreAsciiCase(EXP_SVGZ))
+{
+// Write to a different stream so that we can compress to 
rOStm later
+rCompressableStm.SetBufferSize(rOStm.GetBufferSize());
+rTempStm = &rCompressableStm;
+bShouldCompress = true;
+}
 
 // do we have a native Vector Graphic Data RenderGraphic, 
whose data can be written directly?
 auto const & 
rVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
@@ -1856,9 +1864,9 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& 
rGraphic, std::u16string_vi
 && 
!rVectorGraphicDataPtr->getBinaryDataContainer().isEmpty())
 {
 auto & aDataContainer = 
rVectorGraphicDataPtr->getBinaryDataContainer();
-rOStm.WriteBytes(aDataContainer.getData(), 
aDataContainer.getSize());
+rTempStm->WriteBytes(aDataContainer.getData(), 
aDataContainer.getSize());
 
-if( rOStm.GetError() )
+if( rTempStm->GetError() )
 {
 nStatus = ERRCODE_GRFILTER_IOERROR;
 }
@@ -1890,7 +1898,7 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& 
rGraphic, std::u16string_vi
 if( xActiveDataSource.is() )
 {
 const css::uno::Reference< 
css::uno::XInterface > xStmIf(
-static_cast< ::cppu::OWeakObject* >( new 
ImpFilterOutputStream( rOStm ) ) );
+static_cast< ::cppu::OWeakObject* >( new 
ImpFilterOutputStream( *rTempStm ) ) );
 
 SvMemoryStream aMemStm( 65535, 65535 );
 


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

2022-06-22 Thread offtkp (via logerrit)
 svgio/inc/svgstylenode.hxx  |4 ++--
 svgio/source/svgreader/svgstylenode.cxx |   31 ++-
 2 files changed, 16 insertions(+), 19 deletions(-)

New commits:
commit 99f8e8aa0ccb741c2b5ede6cab75798c1793d899
Author: offtkp 
AuthorDate: Sun Jun 19 23:52:58 2022 +0300
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 22 14:14:27 2022 +0200

tdf#149449 Don't ignore CSS class redefinition inside SVGs

Previously if a css class was redefined like so:

.cls2,.cls3{fill:#fff;}.cls-2{opacity:0.1;}

the second definition of .cls-2 would get ignored and opacity would
remain 1.

This patch keeps track of the names of each previously defined class and
makes sure to append the future redefinition instead of ignoring it.

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

diff --git a/svgio/inc/svgstylenode.hxx b/svgio/inc/svgstylenode.hxx
index 320b4fa17dcc..1a5a43ca858c 100644
--- a/svgio/inc/svgstylenode.hxx
+++ b/svgio/inc/svgstylenode.hxx
@@ -19,6 +19,7 @@
 
 #pragma once
 
+#include 
 #include "svgnode.hxx"
 #include "svgstyleattributes.hxx"
 
@@ -28,7 +29,7 @@ namespace svgio::svgreader
 {
 private:
 /// use styles
-std::vector< SvgStyleAttributes* >  maSvgStyleAttributes;
+std::unordered_map< OUString, std::unique_ptr 
> maSvgStyleAttributes;
 
 boolmbTextCss : 1; // true == 
type is 'text/css'
 
@@ -36,7 +37,6 @@ namespace svgio::svgreader
 SvgStyleNode(
 SvgDocument& rDocument,
 SvgNode* pParent);
-virtual ~SvgStyleNode() override;
 
 /// #i125258# tell if this node is allowed to have a parent style 
(e.g. defs do not)
 virtual bool supportsParentStyle() const override;
diff --git a/svgio/source/svgreader/svgstylenode.cxx 
b/svgio/source/svgreader/svgstylenode.cxx
index 89f6200138bd..f9d33d61ced3 100644
--- a/svgio/source/svgreader/svgstylenode.cxx
+++ b/svgio/source/svgreader/svgstylenode.cxx
@@ -31,15 +31,6 @@ namespace svgio::svgreader
 {
 }
 
-SvgStyleNode::~SvgStyleNode()
-{
-while(!maSvgStyleAttributes.empty())
-{
-delete *(maSvgStyleAttributes.end() - 1);
-maSvgStyleAttributes.pop_back();
-}
-}
-
 // #i125258# no parent when we are a CssStyle holder to break 
potential loops because
 // when using CssStyles we jump uncontrolled inside the node tree 
hierarchy
 bool SvgStyleNode::supportsParentStyle() const
@@ -148,13 +139,6 @@ namespace svgio::svgreader
 if(aSelectors.isEmpty() || aContent.isEmpty())
 return;
 
-// create new style and add to local list (for ownership control)
-SvgStyleAttributes* pNewStyle = new SvgStyleAttributes(*this);
-maSvgStyleAttributes.push_back(pNewStyle);
-
-// fill with content
-pNewStyle->readCssStyle(aContent);
-
 // comma-separated split (Css abbreviation for same style for 
multiple selectors)
 const sal_Int32 nLen(aSelectors.getLength());
 sal_Int32 nPos(0);
@@ -168,9 +152,22 @@ namespace svgio::svgreader
 
 const OUString aSingleName(aToken.makeStringAndClear().trim());
 
+// add the current css class only if wasn't previously added
+auto [aIterator, bIsNew] = 
maSvgStyleAttributes.try_emplace(aSingleName);
+if (bIsNew)
+{
+// create new style and add to local list (for ownership 
control) and
+// in case it's written to again in future classes to 
prevent overwrites
+aIterator->second = 
std::make_unique(*this);
+}
+const std::unique_ptr& pCurrentStyle = 
aIterator->second;
+
+// fill with content
+pCurrentStyle->readCssStyle(aContent);
+
 if(aSingleName.getLength())
 {
-addCssStyleSheet(aSingleName, *pNewStyle);
+addCssStyleSheet(aSingleName, *pCurrentStyle);
 }
 
 if(nInitPos == nPos)


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

2022-06-22 Thread offtkp (via logerrit)
 svgio/qa/cppunit/SvgImportTest.cxx |   22 ++
 svgio/qa/cppunit/data/CssClassRedefinition.svg |   13 +
 2 files changed, 35 insertions(+)

New commits:
commit eedc5b1c576fcaaea85a5278762efc8ba8c5a084
Author: offtkp 
AuthorDate: Mon Jun 20 15:23:14 2022 +0300
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 22 14:14:50 2022 +0200

tdf#149449 Add unit test for CSS class redefinition inside SVGs

Tests what happens when a CSS class is redefined with new attributes
and with already defined attributes

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

diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index 4f9ee58f68db..650dbdde67f6 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -70,6 +70,7 @@ class Test : public test::BootstrapFixture, public 
XmlTestTools
 void testTdf94765();
 void testBehaviourWhenWidthAndHeightIsOrIsNotSet();
 void testTdf97663();
+void testCssClassRedefinition();
 
 Primitive2DSequence parseSvg(std::u16string_view aSource);
 
@@ -106,6 +107,7 @@ public:
 CPPUNIT_TEST(testTdf94765);
 CPPUNIT_TEST(testBehaviourWhenWidthAndHeightIsOrIsNotSet);
 CPPUNIT_TEST(testTdf97663);
+CPPUNIT_TEST(testCssClassRedefinition);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -833,6 +835,26 @@ void Test::testTdf97663()
 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "y", 
"236");
 }
 
+void Test::testCssClassRedefinition()
+{
+// Tests for svg css class redefinition behavior
+// Example:
+// .c1 {fill:#00ff00}
+// .c1 {font-family:Sans}
+// .c1 {fill:#ff}
+// Expected result is .c1 {font-family:Sans; fill:#ff} because
+// the second redefinition appends attributes to the class and the
+// third redefinition replaces the already existing
+// attribute in the original definition
+Primitive2DSequence aSequence = 
parseSvg(u"/svgio/qa/cppunit/data/CssClassRedefinition.svg");
+drawinglayer::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = 
dumper.dumpAndParse(Primitive2DContainer(aSequence));
+CPPUNIT_ASSERT (pDocument);
+assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"text", "test");
+assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"fontcolor", "#ff");
+assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"familyname", "Sans");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 }
diff --git a/svgio/qa/cppunit/data/CssClassRedefinition.svg 
b/svgio/qa/cppunit/data/CssClassRedefinition.svg
new file mode 100644
index ..87eb2023384b
--- /dev/null
+++ b/svgio/qa/cppunit/data/CssClassRedefinition.svg
@@ -0,0 +1,13 @@
+http://www.w3.org/2000/svg"; width="50 px" height="100 px">
+
+.c1 {fill:#00ff00}
+
+.c1 {font-family:Sans}
+
+.c1 {fill:#ff}
+
+
+
+test
+
+


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

2022-06-22 Thread offtkp (via logerrit)
 vcl/source/filter/graphicfilter2.cxx |   64 +++
 1 file changed, 58 insertions(+), 6 deletions(-)

New commits:
commit 56bfb93d0028b735adaddd7d23be96145a7bd2ed
Author: offtkp 
AuthorDate: Tue May 24 16:28:08 2022 +0300
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 22 14:16:37 2022 +0200

Detect WMF from header instead of extension

Change ImpDetectWMF function to detect a WMF file
from its header instead of just comparing the extension.

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

diff --git a/vcl/source/filter/graphicfilter2.cxx 
b/vcl/source/filter/graphicfilter2.cxx
index c02e9d557c44..fb001ee14a25 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -30,9 +30,24 @@
 #include "graphicfilter_internal.hxx"
 
 #define DATA_SIZE   640
-constexpr sal_uInt32 EMF_CHECK_SIZE= 44;
-constexpr sal_uInt32 EMR_HEADER= 0x0001;
-constexpr sal_uInt32 ENHMETA_SIGNATURE = 0x464d4520;
+constexpr sal_uInt32 EMF_CHECK_SIZE  = 44;
+constexpr sal_uInt32 WMF_CHECK_SIZE  = 32;
+constexpr sal_uInt32 EMR_HEADER  = 0x0001;
+constexpr sal_uInt32 ENHMETA_SIGNATURE   = 0x464d4520;
+constexpr sal_uInt32 PLACEABLE_SIGNATURE = 0xd7cdc69a;
+namespace
+{
+enum class MetafileType : sal_uInt16
+{
+Memory = 0x0001,
+Disk   = 0x0002,
+};
+enum class MetafileVersion : sal_uInt16
+{
+Version100 = 0x0100,
+Version300 = 0x0300,
+};
+}
 
 GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) :
 pFileStm( ::utl::UcbStreamHelper::CreateStream( rPath.GetMainURL( 
INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ).release() ),
@@ -1081,12 +1096,49 @@ bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, 
bool bExtendedInfo )
 return bRet;
 }
 
-bool GraphicDescriptor::ImpDetectWMF( SvStream&, bool )
+bool GraphicDescriptor::ImpDetectWMF(SvStream& rStm, bool)
 {
-bool bRet = aPathExt.startsWith( "wmf" ) || aPathExt.startsWith( "wmz" );
-if (bRet)
+bool bRet = false;
+SvStream* aNewStream = &rStm;
+SvMemoryStream aMemStream;
+sal_uInt8 aUncompressedBuffer[WMF_CHECK_SIZE];
+if (ZCodec::IsZCompressed(rStm))
+{
+ZCodec aCodec;
+aCodec.BeginCompression(ZCODEC_DEFAULT_COMPRESSION, /*gzLib*/ true);
+auto nDecompressLength = aCodec.Read(rStm, aUncompressedBuffer, 
WMF_CHECK_SIZE);
+aCodec.EndCompression();
+if (nDecompressLength != WMF_CHECK_SIZE)
+return false;
+aMemStream.SetBuffer(aUncompressedBuffer, WMF_CHECK_SIZE, 
WMF_CHECK_SIZE);
+aNewStream = &aMemStream;
+}
+sal_uInt32 nKey = 0;
+sal_Int32 nStmPos = rStm.Tell();
+aNewStream->SetEndian(SvStreamEndian::LITTLE);
+aNewStream->ReadUInt32(nKey);
+// Check if file is placeable WMF
+if (nKey == PLACEABLE_SIGNATURE)
+{
 nFormat = GraphicFileFormat::WMF;
+bRet = true;
+}
+else
+{
+sal_uInt16 nKeyLSW = nKey & 0x;
+sal_uInt16 nVersion = 0;
+aNewStream->ReadUInt16(nVersion);
+if ((nKeyLSW == static_cast(MetafileType::Memory)
+|| nKeyLSW == static_cast(MetafileType::Disk))
+&& (nVersion == 
static_cast(MetafileVersion::Version100)
+|| nVersion == 
static_cast(MetafileVersion::Version300)))
+{
+nFormat = GraphicFileFormat::WMF;
+bRet = true;
+}
+}
 
+rStm.Seek(nStmPos);
 return bRet;
 }
 


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

2022-06-22 Thread Stephan Bergmann (via logerrit)
 sw/qa/extras/rtfexport/rtfexport3.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 99ecc9732d44d528733e77c361c206ca3b121f99
Author: Stephan Bergmann 
AuthorDate: Wed Jun 22 11:01:27 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 22 14:19:42 2022 +0200

Remove a dumpAsXml that looks like a debugging leftover

...left behind by d4123356c61db269651e950a0a2cc93e6d801c90 "RTF filter: 
allow
measuring page borders from the edge of the page"

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

diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx 
b/sw/qa/extras/rtfexport/rtfexport3.cxx
index bd8a1c8dc795..055c78916e77 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -465,7 +465,6 @@ CPPUNIT_TEST_FIXTURE(Test, testNegativePageBorder)
 xPageStyle->setPropertyValue("TopBorder", uno::Any(aBorder));
 sal_Int32 nTopBorderDistance = -646;
 xPageStyle->setPropertyValue("TopBorderDistance", 
uno::Any(nTopBorderDistance));
-pDocShell->GetDoc()->dumpAsXml();
 }
 
 // When saving that document to RTF:


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

2022-06-22 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_document.xhp |   28 +++
 1 file changed, 28 insertions(+)

New commits:
commit d0868a21f3789d2a73bfbcd4830b3b8ae4648087
Author: Rafael Lima 
AuthorDate: Mon Jun 20 22:18:40 2022 +0200
Commit: Jean-Pierre Ledure 
CommitDate: Wed Jun 22 15:28:51 2022 +0200

Document ExportFilters / ImportFilters in SF_Document

Change-Id: I63469ce9a6ea479f31f98612b0919bbca034e3a6
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136168
Tested-by: Jenkins
Tested-by: Jean-Pierre Ledure 
Reviewed-by: Alain Romedenne 

diff --git a/source/text/sbasic/shared/03/sf_document.xhp 
b/source/text/sbasic/shared/03/sf_document.xhp
index e90658f57..e93311302 100644
--- a/source/text/sbasic/shared/03/sf_document.xhp
+++ b/source/text/sbasic/shared/03/sf_document.xhp
@@ -175,6 +175,34 @@
 String value with the document type ("Base", "Calc", 
"Writer", etc)
 
 
+
+
+ExportFilters
+
+
+Yes
+
+
+String array
+
+
+Returns a list with the export filter names applicable to the 
current document as a zero-based array of strings. Filters used for both 
import/export are also returned.
+
+
+
+
+ImportFilters
+
+
+Yes
+
+
+String array
+
+
+Returns a list with the import filter names applicable to the 
current document as a zero-based array of strings. Filters used for both 
import/export are also returned.
+
+
 
 
 IsBaseIsCalcIsDrawIsImpressIsMathIsWriter


[Libreoffice-commits] core.git: helpcontent2

2022-06-22 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0f57d53f4339a5f39df5ae5d304d5216193d7d1b
Author: Rafael Lima 
AuthorDate: Wed Jun 22 15:28:53 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jun 22 15:28:53 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to d0868a21f3789d2a73bfbcd4830b3b8ae4648087
  - Document ExportFilters / ImportFilters in SF_Document

Change-Id: I63469ce9a6ea479f31f98612b0919bbca034e3a6
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136168
Tested-by: Jenkins
Tested-by: Jean-Pierre Ledure 
Reviewed-by: Alain Romedenne 

diff --git a/helpcontent2 b/helpcontent2
index 1e58e8bacdb2..d0868a21f378 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 1e58e8bacdb26bce4eb86485c183f12f87cc3e31
+Subproject commit d0868a21f3789d2a73bfbcd4830b3b8ae4648087


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

2022-06-22 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_ui.xhp |   56 +
 1 file changed, 56 insertions(+)

New commits:
commit ccf60dc3e77793c242a6188fe18e4faa7f2aa469
Author: Rafael Lima 
AuthorDate: Mon Jun 20 22:49:48 2022 +0200
Commit: Jean-Pierre Ledure 
CommitDate: Wed Jun 22 15:29:50 2022 +0200

Document new properties of the SF_UI service

This patch documents the following new properties in the UI service of the 
ScripfForge library: Height, Width, X and Y

Change-Id: Ie15844c0688c9dbf22146a2e2ea5a8690b1c005a
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136169
Tested-by: Jenkins
Tested-by: Jean-Pierre Ledure 
Reviewed-by: Alain Romedenne 

diff --git a/source/text/sbasic/shared/03/sf_ui.xhp 
b/source/text/sbasic/shared/03/sf_ui.xhp
index c01122a6e..313577f48 100644
--- a/source/text/sbasic/shared/03/sf_ui.xhp
+++ b/source/text/sbasic/shared/03/sf_ui.xhp
@@ -137,6 +137,62 @@
The list of the currently open documents. Special windows are 
ignored. This list consists of a zero-based one dimensional array either of 
filenames (in SF_FileSystem.FileNaming notation) or of window titles for 
unsaved documents.
 
  
+ 
+
+   Height
+
+
+   Yes
+
+
+   Integer
+   
+
+   Returns the height of the active window in pixels.
+
+ 
+ 
+
+   Width
+
+
+   Yes
+
+
+   Integer
+   
+
+   Returns the width of the active window in pixels.
+
+ 
+ 
+
+   X
+
+
+   Yes
+
+
+   Integer
+   
+
+   Returns the X coordinate of the active window, which is the 
distance to the left edge of the screen in pixels.
+
+ 
+ 
+
+   Y
+
+
+   Yes
+
+
+   Integer
+   
+
+   Returns the Y coordinate of the active window, which is the 
distance to the top edge of the screen in pixels. This value does not consider 
window decorations added by your operating system, so even when the window is 
maximized this value may not be zero.
+
+ 

 
 


[Libreoffice-commits] core.git: helpcontent2

2022-06-22 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a3953061b66e8dcdd799109974e7175de311a356
Author: Rafael Lima 
AuthorDate: Wed Jun 22 15:30:03 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jun 22 15:30:03 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to ccf60dc3e77793c242a6188fe18e4faa7f2aa469
  - Document new properties of the SF_UI service

This patch documents the following new properties in the UI service of 
the ScripfForge library: Height, Width, X and Y

Change-Id: Ie15844c0688c9dbf22146a2e2ea5a8690b1c005a
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136169
Tested-by: Jenkins
Tested-by: Jean-Pierre Ledure 
Reviewed-by: Alain Romedenne 

diff --git a/helpcontent2 b/helpcontent2
index d0868a21f378..ccf60dc3e777 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d0868a21f3789d2a73bfbcd4830b3b8ae4648087
+Subproject commit ccf60dc3e77793c242a6188fe18e4faa7f2aa469


[Libreoffice-commits] core.git: android/mobile-config.py

2022-06-22 Thread Ilmari Lauhakangas (via logerrit)
 android/mobile-config.py |   37 ++---
 1 file changed, 14 insertions(+), 23 deletions(-)

New commits:
commit df3942bba54e5588020082e0197b233d0f043282
Author: Ilmari Lauhakangas 
AuthorDate: Wed Jun 22 15:47:00 2022 +0300
Commit: Ilmari Lauhakangas 
CommitDate: Wed Jun 22 16:00:32 2022 +0200

Revert changes to android/mobile-config.py

made in 157298bb808a943616991927f9370a86c1f2ca48

Got Tinderbox failure with

Traceback (most recent call last):
  File 
"/opt/rh/rh-python36/root/usr/lib64/python3.6/xml/etree/ElementPath.py",
line 263, in iterfind
selector = _cache[cache_key]
KeyError: 
('%(component-schema)s[@%(name)s="Common"]/component/group[@%(name)s=

"Filter"]/group[@%(name)s="Microsoft"]/group[@{http://openoffice.org/2001/registry}
name="Import"]/prop', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tinderbox/buildslave/source/libo-master/android/mobile-config.py",
line 85, in 
props = root.findall(microsoftImport)
  File 
"/opt/rh/rh-python36/root/usr/lib64/python3.6/xml/etree/ElementPath.py",
line 304, in findall
return list(iterfind(elem, path, namespaces))
  File 
"/opt/rh/rh-python36/root/usr/lib64/python3.6/xml/etree/ElementPath.py",
line 277, in iterfind
selector.append(ops[token[0]](next, token))
KeyError: '('

Change-Id: I34a770a342417fcbfb9689e3adc4b495d5bd5fe5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136282
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/android/mobile-config.py b/android/mobile-config.py
index 596f27f107a8..5998e5d1f9b7 100755
--- a/android/mobile-config.py
+++ b/android/mobile-config.py
@@ -14,13 +14,13 @@
 # already over-complicated by rampant conditionals.
 
 import sys
-import xml.etree.ElementTree as ElementTree
+import xml.etree.ElementTree as ET
 
 main_xcd_discard = [
-'org.openoffice.Office/TableWizard',  # huge
+'org.openoffice.Office/TableWizard', # huge
 
-'org.openoffice.Office.DataAccess/Drivers',  # no database
-'org.openoffice.Office/Addons',  # no addons
+'org.openoffice.Office.DataAccess/Drivers', # no database
+'org.openoffice.Office/Addons', # no addons
 
 # no conventional UI; reverse sorted by size
 'org.openoffice.Office.UI/GenericCommands',
@@ -46,15 +46,15 @@ main_xcd_discard = [
 'org.openoffice.Office.UI/GlobalSettings',
 'org.openoffice.Office.UI/BibliographyWindowState',
 'org.openoffice.Office.UI/Category',
-]
+]
 
 if __name__ == '__main__':
-tree = ElementTree.parse(sys.argv[1])
+tree = ET.parse(sys.argv[1])
 root = tree.getroot()
 
 total = 0
 for child in root:
-total += len(ElementTree.tostring(child))
+total += len(ET.tostring(child))
 
 saved = 0
 to_remove = []
@@ -62,7 +62,7 @@ if __name__ == '__main__':
 for child in root:
 section = child.attrib['{http://openoffice.org/2001/registry}name']
 package = child.attrib['{http://openoffice.org/2001/registry}package']
-size = len(ElementTree.tostring(child))
+size = len(ET.tostring(child));
 key = '%s/%s' % (package, section)
 if key in main_xcd_discard:
 print('removed %s - saving %d' % (key, size))
@@ -72,7 +72,7 @@ if __name__ == '__main__':
 for child in to_remove:
 root.remove(child)
 
-print("saved %d of %d bytes: %2.f%%" % (saved, total, saved * 100.0 / 
total))
+print("saved %d of %d bytes: %2.f%%" % (saved, total, saved*100.0/total))
 
 # Don't do pointless Word -> Writer and similar conversions when we have 
no UI.
 nsDict = {
@@ -80,37 +80,28 @@ if __name__ == '__main__':
 "component-data": 
"{http://openoffice.org/2001/registry}component-data";,
 "name": "{http://openoffice.org/2001/registry}name";,
 }
-microsoftImport = 
'%(component-schema)s[@%(name)s="Common"]/component/group[@%(name)s="Filter"]/group[@%('
 +\
-  'name)s="Microsoft"]/group[@%(name)s="Import"]/prop' % 
nsDict
+microsoftImport = 
'%(component-schema)s[@%(name)s="Common"]/component/group[@%(name)s="Filter"]/group[@%(name)s="Microsoft"]/group[@%(name)s="Import"]/prop'
 % nsDict
 props = root.findall(microsoftImport)
 for prop in props:
 prop.findall("value")[0].text = "false"
 
 # Disable View -> Text Boundaries
-for prop in root.findall(
-
'%(component-schema)s[@%(name)s="UI"]/templates/group[@%(name)s="ColorScheme"]/group[@%('
 +
-'name)s="DocBoundaries"]/prop' % nsDict):
+for prop in 
root.findall('%(component-schema)s[@%(name)s="UI"]/templates/group[@%(name)s="ColorScheme"]/group[@%(name)s="DocBoundaries"]/prop'
 % nsDict):
 for value in prop.findall("value"):
 value.text = "false"
 
 # Disable Table -> Table B

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - 7 commits - offapi/com officecfg/registry sw/inc sw/qa sw/source sw/uiconfig

2022-06-22 Thread Michael Stahl (via logerrit)
 offapi/com/sun/star/text/ViewSettings.idl  |6 +
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |8 ++
 sw/inc/viewopt.hxx |   17 +++-
 sw/qa/extras/layout/data/abi11870-2.odt|binary
 sw/qa/extras/layout/layout.cxx |6 +
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx |2 
 sw/source/core/crsr/bookmrk.cxx|   18 
 sw/source/core/doc/docbm.cxx   |5 -
 sw/source/core/inc/bookmrk.hxx |6 -
 sw/source/core/inc/scriptinfo.hxx  |1 
 sw/source/core/text/itrform2.cxx   |6 +
 sw/source/core/text/porlay.cxx |   35 +
 sw/source/core/text/pormulti.cxx   |8 +-
 sw/source/core/text/porrst.cxx |   11 ---
 sw/source/core/text/porrst.hxx |7 -
 sw/source/ui/config/optpage.cxx|8 ++
 sw/source/uibase/app/appopt.cxx|1 
 sw/source/uibase/config/cfgitems.cxx   |4 +
 sw/source/uibase/config/usrpref.cxx|   47 +++--
 sw/source/uibase/inc/cfgitems.hxx  |1 
 sw/source/uibase/inc/optpage.hxx   |3 
 sw/source/uibase/uiview/pview.cxx  |1 
 sw/source/uibase/uiview/view0.cxx  |2 
 sw/source/uibase/uno/unomod.cxx|4 +
 sw/source/uibase/uno/unotxdoc.cxx  |1 
 sw/uiconfig/swriter/ui/optformataidspage.ui|   32 
 26 files changed, 187 insertions(+), 53 deletions(-)

New commits:
commit da1f030eec952dcd6d78ecd80a311b7b33320674
Author: Michael Stahl 
AuthorDate: Tue Jun 2 18:16:15 2020 +0200
Commit: Michael Stahl 
CommitDate: Wed Jun 22 15:37:06 2022 +0200

crashtesting: fix abi11870-2.odt assert in SwBookmarkPortion::Unchain()

This m_pPrevious pointer is a bad idea, should just use
FindPrevPortion() to find it, which shouldn't take that long to iterate
all the portions in the current line.

(regression from 4ce8120f1e53f7b81e653b01d141643013bc69ab)

Change-Id: Ibb5f2bb28d959958547ed27c51e5084cc746d642
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91622
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit f68749054f36f070310e70e2dbf0a11c496539c0)

diff --git a/sw/qa/extras/layout/data/abi11870-2.odt 
b/sw/qa/extras/layout/data/abi11870-2.odt
new file mode 100644
index ..b02bb85646aa
Binary files /dev/null and b/sw/qa/extras/layout/data/abi11870-2.odt differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index ea4619f9c1bc..a6015fedaac3 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -3482,6 +3482,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116501)
 createDoc("tdf116501.odt");
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testAbi11870)
+{
+//just care it doesn't assert
+createDoc("abi11870-2.odt");
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118719)
 {
 // Insert a page break.
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 8a906b4bf2e3..7901c10ccadd 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1209,7 +1209,7 @@ SwLinePortion 
*SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
 assert(bookmark & SwScriptInfo::MarkKind::Point);
 mark = '|';
 }
-pPor = new SwBookmarkPortion(rInf.GetLast(), mark);
+pPor = new SwBookmarkPortion(mark);
 }
 }
 
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 650198e8a458..3bd45fee2180 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -2037,7 +2037,13 @@ bool SwTextFormatter::BuildMultiPortion( 
SwTextFormatInfo &rInf,
 if (rInf.GetLast()->GetWhichPor() == PortionType::Bookmark)
 {
 auto const 
pBookmark(static_cast(rInf.GetLast()));
-rInf.SetLast(pBookmark->Unchain());
+auto *const pPrevious = pBookmark->FindPrevPortion(rInf.GetRoot());
+assert(!pPrevious || pPrevious->GetNextPortion() == pBookmark);
+if (pPrevious)
+{
+pPrevious->SetNextPortion(nullptr);
+}
+rInf.SetLast(pPrevious);
 assert(m_pCurr->GetNextPortion() == nullptr);
 m_pCurr->SetNextPortion(pBookmark);
 }
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 47d980183c3c..797725e298f6 100644
--- a/sw/source/core/text/p

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

2022-06-22 Thread Xisco Fauli (via logerrit)
 sw/source/uibase/docvw/edtwin.cxx |  109 +++---
 1 file changed, 56 insertions(+), 53 deletions(-)

New commits:
commit 1f820cd30b3014c72f6711d80679faa8488ffcda
Author: Xisco Fauli 
AuthorDate: Wed Jun 22 12:49:04 2022 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 22 16:45:42 2022 +0200

sw: fix crash in SwEditWin::MouseButtonDown

Since GetPageAtPos might return nullptr

See 
https://crashreport.libreoffice.org/stats/signature/SwEditWin::MouseButtonDown(MouseEvent%20const%20&)

Change-Id: I4ad3492ef46bcd7b263a4de92efd9439a966fb56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136279
Reviewed-by: Caolán McNamara 
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index a0effc7db82a..420da9d0b295 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -2843,69 +2843,72 @@ void SwEditWin::MouseButtonDown(const MouseEvent& 
_rMEvt)
 {
 const SwPageFrame* pPageFrame = rSh.GetLayout()->GetPageAtPos( aDocPos 
);
 
-// Is it active?
-bool bActive = true;
-const SwPageDesc* pDesc = pPageFrame->GetPageDesc();
-
-const SwFrameFormat* pFormat = pDesc->GetLeftFormat();
-if ( pPageFrame->OnRightPage() )
- pFormat = pDesc->GetRightFormat();
-
-if ( pFormat )
+if ( pPageFrame )
 {
-if ( eControl == FrameControlType::Header )
-bActive = pFormat->GetHeader().IsActive();
-else
-bActive = pFormat->GetFooter().IsActive();
-}
+// Is it active?
+bool bActive = true;
+const SwPageDesc* pDesc = pPageFrame->GetPageDesc();
 
-if ( !bActive )
-{
-// When in Hide-Whitespace mode, we don't want header
-// and footer controls.
-if (!rSh.GetViewOptions()->IsHideWhitespaceMode())
-{
-SwPaM aPam(*rSh.GetCurrentShellCursor().GetPoint());
-const bool bWasInHeader = 
aPam.GetPoint()->nNode.GetNode().FindHeaderStartNode() != nullptr;
-const bool bWasInFooter = 
aPam.GetPoint()->nNode.GetNode().FindFooterStartNode() != nullptr;
+const SwFrameFormat* pFormat = pDesc->GetLeftFormat();
+if ( pPageFrame->OnRightPage() )
+ pFormat = pDesc->GetRightFormat();
 
-// Is the cursor in a part like similar to the one we clicked 
on? For example,
-// if the cursor is in a header and we click on an empty 
header... don't change anything to
-// keep consistent behaviour due to header edit mode (and the 
same for the footer as well).
+if ( pFormat )
+{
+if ( eControl == FrameControlType::Header )
+bActive = pFormat->GetHeader().IsActive();
+else
+bActive = pFormat->GetFooter().IsActive();
+}
 
-// Otherwise, we hide the header/footer control if a separator 
is shown, and vice versa.
-if (!(bWasInHeader && eControl == FrameControlType::Header) &&
-!(bWasInFooter && eControl == FrameControlType::Footer))
+if ( !bActive )
+{
+// When in Hide-Whitespace mode, we don't want header
+// and footer controls.
+if (!rSh.GetViewOptions()->IsHideWhitespaceMode())
 {
-const bool bSeparatorWasVisible = 
rSh.IsShowHeaderFooterSeparator(eControl);
-rSh.SetShowHeaderFooterSeparator(eControl, 
!bSeparatorWasVisible);
+SwPaM aPam(*rSh.GetCurrentShellCursor().GetPoint());
+const bool bWasInHeader = 
aPam.GetPoint()->nNode.GetNode().FindHeaderStartNode() != nullptr;
+const bool bWasInFooter = 
aPam.GetPoint()->nNode.GetNode().FindFooterStartNode() != nullptr;
 
-// Repaint everything
-Invalidate();
-
-// tdf#84929. If the footer control had not been showing, 
do not change the cursor position,
-// because the user may have scrolled to turn on the 
separator control and
-// if the cursor cannot be positioned on-screen, then the 
user would need to scroll back again to use the control.
-// This should only be done for the footer. The cursor can 
always be re-positioned near the header. tdf#134023.
-if ( eControl == FrameControlType::Footer && 
!bSeparatorWasVisible
- && rSh.GetViewOptions()->IsUseHeaderFooterMenu() && 
!Application::IsHeadlessModeEnabled() )
-return;
+// Is the cursor in a part like similar to the one we 
clicked on? For example,
+  

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

2022-06-22 Thread Xisco Fauli (via logerrit)
 sw/source/uibase/docvw/edtwin.cxx |  109 +++---
 1 file changed, 56 insertions(+), 53 deletions(-)

New commits:
commit 84e13605dd57ee1978f163d3167b9ba8d3e91187
Author: Xisco Fauli 
AuthorDate: Wed Jun 22 12:49:04 2022 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 22 16:45:26 2022 +0200

sw: fix crash in SwEditWin::MouseButtonDown

Since GetPageAtPos might return nullptr

See 
https://crashreport.libreoffice.org/stats/signature/SwEditWin::MouseButtonDown(MouseEvent%20const%20&)

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

diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index a0effc7db82a..420da9d0b295 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -2843,69 +2843,72 @@ void SwEditWin::MouseButtonDown(const MouseEvent& 
_rMEvt)
 {
 const SwPageFrame* pPageFrame = rSh.GetLayout()->GetPageAtPos( aDocPos 
);
 
-// Is it active?
-bool bActive = true;
-const SwPageDesc* pDesc = pPageFrame->GetPageDesc();
-
-const SwFrameFormat* pFormat = pDesc->GetLeftFormat();
-if ( pPageFrame->OnRightPage() )
- pFormat = pDesc->GetRightFormat();
-
-if ( pFormat )
+if ( pPageFrame )
 {
-if ( eControl == FrameControlType::Header )
-bActive = pFormat->GetHeader().IsActive();
-else
-bActive = pFormat->GetFooter().IsActive();
-}
+// Is it active?
+bool bActive = true;
+const SwPageDesc* pDesc = pPageFrame->GetPageDesc();
 
-if ( !bActive )
-{
-// When in Hide-Whitespace mode, we don't want header
-// and footer controls.
-if (!rSh.GetViewOptions()->IsHideWhitespaceMode())
-{
-SwPaM aPam(*rSh.GetCurrentShellCursor().GetPoint());
-const bool bWasInHeader = 
aPam.GetPoint()->nNode.GetNode().FindHeaderStartNode() != nullptr;
-const bool bWasInFooter = 
aPam.GetPoint()->nNode.GetNode().FindFooterStartNode() != nullptr;
+const SwFrameFormat* pFormat = pDesc->GetLeftFormat();
+if ( pPageFrame->OnRightPage() )
+ pFormat = pDesc->GetRightFormat();
 
-// Is the cursor in a part like similar to the one we clicked 
on? For example,
-// if the cursor is in a header and we click on an empty 
header... don't change anything to
-// keep consistent behaviour due to header edit mode (and the 
same for the footer as well).
+if ( pFormat )
+{
+if ( eControl == FrameControlType::Header )
+bActive = pFormat->GetHeader().IsActive();
+else
+bActive = pFormat->GetFooter().IsActive();
+}
 
-// Otherwise, we hide the header/footer control if a separator 
is shown, and vice versa.
-if (!(bWasInHeader && eControl == FrameControlType::Header) &&
-!(bWasInFooter && eControl == FrameControlType::Footer))
+if ( !bActive )
+{
+// When in Hide-Whitespace mode, we don't want header
+// and footer controls.
+if (!rSh.GetViewOptions()->IsHideWhitespaceMode())
 {
-const bool bSeparatorWasVisible = 
rSh.IsShowHeaderFooterSeparator(eControl);
-rSh.SetShowHeaderFooterSeparator(eControl, 
!bSeparatorWasVisible);
+SwPaM aPam(*rSh.GetCurrentShellCursor().GetPoint());
+const bool bWasInHeader = 
aPam.GetPoint()->nNode.GetNode().FindHeaderStartNode() != nullptr;
+const bool bWasInFooter = 
aPam.GetPoint()->nNode.GetNode().FindFooterStartNode() != nullptr;
 
-// Repaint everything
-Invalidate();
-
-// tdf#84929. If the footer control had not been showing, 
do not change the cursor position,
-// because the user may have scrolled to turn on the 
separator control and
-// if the cursor cannot be positioned on-screen, then the 
user would need to scroll back again to use the control.
-// This should only be done for the footer. The cursor can 
always be re-positioned near the header. tdf#134023.
-if ( eControl == FrameControlType::Footer && 
!bSeparatorWasVisible
- && rSh.GetViewOptions()->IsUseHeaderFooterMenu() && 
!Application::IsHeadlessModeEnabled() )
-return;
+// Is the cursor in a part like similar to the one we 
clicked on? For example,
+// if the cursor is i

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

2022-06-22 Thread Samuel Mehrbrodt (via logerrit)
 chart2/source/controller/sidebar/ChartAreaPanel.cxx |5 +
 chart2/source/controller/sidebar/ChartAreaPanel.hxx |1 
 include/svx/sidebar/AreaPropertyPanelBase.hxx   |5 +
 include/svx/strings.hrc |1 
 include/svx/svxids.hrc  |2 
 include/svx/xfilluseslidebackgrounditem.hxx |9 +--
 sd/sdi/_drvwsh.sdi  |5 +
 sd/source/ui/func/fuarea.cxx|1 
 sd/source/ui/table/tableobjectbar.cxx   |1 
 sd/source/ui/view/drviews2.cxx  |2 
 sd/source/ui/view/drviewsf.cxx  |1 
 sd/source/ui/view/drviewsj.cxx  |3 +
 svx/sdi/svx.sdi |   16 ++
 svx/source/sidebar/area/AreaPropertyPanel.cxx   |9 +++
 svx/source/sidebar/area/AreaPropertyPanel.hxx   |3 +
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx   |   52 +++-
 svx/source/tbxctrls/itemwin.cxx |1 
 svx/source/xoutdev/xpool.cxx|1 
 18 files changed, 111 insertions(+), 7 deletions(-)

New commits:
commit ecfb133598df609037263e06949acbbf520622b3
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jun 16 08:52:13 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Jun 22 16:54:21 2022 +0200

tdf#128150 Adapt sidebar to new "use slide background" property

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

diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx 
b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
index b54df41ebd39..71e978e14543 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
@@ -408,6 +408,11 @@ void ChartAreaPanel::setFillStyleAndBitmap(const 
XFillStyleItem* pStyleItem,
 xPropSet->setPropertyValue("FillBitmapName", aBitmap);
 }
 
+void ChartAreaPanel::setFillUseBackground(const XFillStyleItem* /*pStyleItem*/,
+  const XFillUseSlideBackgroundItem& 
/*rItem*/)
+{
+}
+
 void ChartAreaPanel::updateData()
 {
 if (!mbUpdate || !mbModelValid)
diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.hxx 
b/chart2/source/controller/sidebar/ChartAreaPanel.hxx
index 132513412518..75caf8d0d30a 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.hxx
@@ -57,6 +57,7 @@ public:
 virtual void setFillStyleAndGradient(const XFillStyleItem* pStyleItem, 
const XFillGradientItem& rGradientItem) override;
 virtual void setFillStyleAndHatch(const XFillStyleItem* pStyleItem, const 
XFillHatchItem& rHatchItem) override;
 virtual void setFillStyleAndBitmap(const XFillStyleItem* pStyleItem, const 
XFillBitmapItem& rBitmapItem) override;
+virtual void setFillUseBackground(const XFillStyleItem* pStyleItem, const 
XFillUseSlideBackgroundItem& rItem) override;
 
 virtual void updateData() override;
 virtual void modelInvalid() override;
diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx 
b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index 12fcebe16581..00519eed91e6 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -35,6 +36,7 @@
 
 class ToolbarUnoDispatcher;
 class XFillFloatTransparenceItem;
+class XFillUseSlideBackgroundItem;
 class XFillTransparenceItem;
 class XFillStyleItem;
 class XFillGradientItem;
@@ -84,6 +86,7 @@ public:
 virtual void setFillStyleAndGradient(const XFillStyleItem* pStyleItem, 
const XFillGradientItem& aGradientItem) = 0;
 virtual void setFillStyleAndHatch(const XFillStyleItem* pStyleItem, const 
XFillHatchItem& aHatchItem) = 0;
 virtual void setFillStyleAndBitmap(const XFillStyleItem* pStyleItem, const 
XFillBitmapItem& aHatchItem) = 0;
+virtual void setFillUseBackground(const XFillStyleItem* pStyleItem, const 
XFillUseSlideBackgroundItem& rItem) = 0;
 
 void updateFillTransparence(bool bDisabled, bool bDefaultOrSet, const 
SfxPoolItem* pState);
 void updateFillFloatTransparence(bool bDisabled, bool bDefaultOrSet, const 
SfxPoolItem* pState);
@@ -92,6 +95,7 @@ public:
 void updateFillHatch(bool bDisabled, bool bDefaultOrSet, const 
SfxPoolItem* pState);
 void updateFillColor(bool bDefaultOrSet, const SfxPoolItem* pState);
 void updateFillBitmap(bool BDisabled, bool bDefaultOrSet, const 
SfxPoolItem* pState);
+void updateFillUseBackground(bool BDisabled, bool bDefaultOrSet, const 
SfxPoolItem* pState);
 
 private:
 void Initialize();
@@ -145,6 +149,7 @@ protected:
 OUString  maImgLinear;
 
 std::unique_ptr< XFillFloatTransparenceItem >

[Libreoffice-commits] help.git: help3xsl/online_transform.xsl

2022-06-22 Thread Christian Lohmaier (via logerrit)
 help3xsl/online_transform.xsl |   66 --
 1 file changed, 7 insertions(+), 59 deletions(-)

New commits:
commit 893489db23d56977dbc9f775ffdad9f83a5cde40
Author: Christian Lohmaier 
AuthorDate: Mon Jun 20 23:22:27 2022 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jun 22 16:59:39 2022 +0200

combine switch and switchinline template rules

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

diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 3d6ba7387..fa28ad0ff 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -657,19 +657,14 @@
 
 
 
-
-
+
+
 
 
 
 
-
-
-
-
-
-
-
+
+
 
 
 
@@ -678,60 +673,13 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Unsupported switch condition.
-
-
-
-
-
-
+
 
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-Unsupported switch condition.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
 
 
 


[Libreoffice-commits] core.git: helpcontent2

2022-06-22 Thread Christian Lohmaier (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a9df32c1f693fb79a6b8b4518cefe9ab5db4e03c
Author: Christian Lohmaier 
AuthorDate: Wed Jun 22 16:59:40 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jun 22 16:59:40 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 893489db23d56977dbc9f775ffdad9f83a5cde40
  - combine switch and switchinline template rules

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

diff --git a/helpcontent2 b/helpcontent2
index ccf60dc3e777..893489db23d5 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ccf60dc3e77793c242a6188fe18e4faa7f2aa469
+Subproject commit 893489db23d56977dbc9f775ffdad9f83a5cde40


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

2022-06-22 Thread Xisco Fauli (via logerrit)
 sw/source/uibase/docvw/edtwin.cxx |  109 +++---
 1 file changed, 56 insertions(+), 53 deletions(-)

New commits:
commit c9cacb99123b420a593a8fa857dfac451085
Author: Xisco Fauli 
AuthorDate: Wed Jun 22 12:49:04 2022 +0200
Commit: Caolán McNamara 
CommitDate: Wed Jun 22 17:08:58 2022 +0200

sw: fix crash in SwEditWin::MouseButtonDown

Since GetPageAtPos might return nullptr

See 
https://crashreport.libreoffice.org/stats/signature/SwEditWin::MouseButtonDown(MouseEvent%20const%20&)

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

diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index ca94c561eadd..4898ba948f4e 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -2825,69 +2825,72 @@ void SwEditWin::MouseButtonDown(const MouseEvent& 
_rMEvt)
 {
 const SwPageFrame* pPageFrame = rSh.GetLayout()->GetPageAtPos( aDocPos 
);
 
-// Is it active?
-bool bActive = true;
-const SwPageDesc* pDesc = pPageFrame->GetPageDesc();
-
-const SwFrameFormat* pFormat = pDesc->GetLeftFormat();
-if ( pPageFrame->OnRightPage() )
- pFormat = pDesc->GetRightFormat();
-
-if ( pFormat )
+if ( pPageFrame )
 {
-if ( eControl == FrameControlType::Header )
-bActive = pFormat->GetHeader().IsActive();
-else
-bActive = pFormat->GetFooter().IsActive();
-}
+// Is it active?
+bool bActive = true;
+const SwPageDesc* pDesc = pPageFrame->GetPageDesc();
 
-if ( !bActive )
-{
-// When in Hide-Whitespace mode, we don't want header
-// and footer controls.
-if (!rSh.GetViewOptions()->IsHideWhitespaceMode())
-{
-SwPaM aPam(*rSh.GetCurrentShellCursor().GetPoint());
-const bool bWasInHeader = 
aPam.GetPoint()->nNode.GetNode().FindHeaderStartNode() != nullptr;
-const bool bWasInFooter = 
aPam.GetPoint()->nNode.GetNode().FindFooterStartNode() != nullptr;
+const SwFrameFormat* pFormat = pDesc->GetLeftFormat();
+if ( pPageFrame->OnRightPage() )
+ pFormat = pDesc->GetRightFormat();
 
-// Is the cursor in a part like similar to the one we clicked 
on? For example,
-// if the cursor is in a header and we click on an empty 
header... don't change anything to
-// keep consistent behaviour due to header edit mode (and the 
same for the footer as well).
+if ( pFormat )
+{
+if ( eControl == FrameControlType::Header )
+bActive = pFormat->GetHeader().IsActive();
+else
+bActive = pFormat->GetFooter().IsActive();
+}
 
-// Otherwise, we hide the header/footer control if a separator 
is shown, and vice versa.
-if (!(bWasInHeader && eControl == FrameControlType::Header) &&
-!(bWasInFooter && eControl == FrameControlType::Footer))
+if ( !bActive )
+{
+// When in Hide-Whitespace mode, we don't want header
+// and footer controls.
+if (!rSh.GetViewOptions()->IsHideWhitespaceMode())
 {
-const bool bSeparatorWasVisible = 
rSh.IsShowHeaderFooterSeparator(eControl);
-rSh.SetShowHeaderFooterSeparator(eControl, 
!bSeparatorWasVisible);
+SwPaM aPam(*rSh.GetCurrentShellCursor().GetPoint());
+const bool bWasInHeader = 
aPam.GetPoint()->nNode.GetNode().FindHeaderStartNode() != nullptr;
+const bool bWasInFooter = 
aPam.GetPoint()->nNode.GetNode().FindFooterStartNode() != nullptr;
 
-// Repaint everything
-Invalidate();
-
-// tdf#84929. If the footer control had not been showing, 
do not change the cursor position,
-// because the user may have scrolled to turn on the 
separator control and
-// if the cursor cannot be positioned on-screen, then the 
user would need to scroll back again to use the control.
-// This should only be done for the footer. The cursor can 
always be re-positioned near the header. tdf#134023.
-if ( eControl == FrameControlType::Footer && 
!bSeparatorWasVisible
- && rSh.GetViewOptions()->IsUseHeaderFooterMenu() && 
!Application::IsHeadlessModeEnabled() )
-return;
+// Is the cursor in a part like similar to the one we 
clicked on? For example,
+// if the cur

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

2022-06-22 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/pasteSpecial/tdf65856.py |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 575cfa6aebbea714f08e303a3e78d1ac8d99a7e0
Author: Xisco Fauli 
AuthorDate: Tue Jun 21 16:29:46 2022 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 22 17:23:56 2022 +0200

tdf#69750: sc: Add UItest

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

diff --git a/sc/qa/uitest/pasteSpecial/tdf65856.py 
b/sc/qa/uitest/pasteSpecial/tdf65856.py
index 7a3b1f90e21b..6b9e928b4255 100644
--- a/sc/qa/uitest/pasteSpecial/tdf65856.py
+++ b/sc/qa/uitest/pasteSpecial/tdf65856.py
@@ -7,7 +7,7 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 from uitest.framework import UITestCase
-from uitest.uihelper.common import get_url_for_data_file
+from uitest.uihelper.common import get_url_for_data_file, get_state_as_dict
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from libreoffice.calc.document import get_cell_by_position
 from libreoffice.calc.paste_special import reset_default_values
@@ -57,10 +57,10 @@ class tdf65856(UITestCase):
 #mark cell B2
 gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B2"}))
 with 
self.ui_test.execute_dialog_through_command(".uno:PasteSpecial") as xDialog:
-reset_default_values(self, xDialog)
-
 xmove_right = xDialog.getChild("move_right")
-xmove_right.executeAction("CLICK", tuple())
+
+# tdf#69750: Without the fix in place, this test would have 
failed here
+self.assertEqual("true", 
get_state_as_dict(xmove_right)["Checked"])
 
 #check
 self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 
1).getString(), "1")


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

2022-06-22 Thread Michael Stahl (via logerrit)
 sw/qa/extras/uiwriter/uiwriter2.cxx |   22 +-
 sw/source/core/docnode/nodes.cxx|1 -
 sw/source/core/edit/edatmisc.cxx|   34 ++
 sw/source/core/edit/edfcol.cxx  |   15 ---
 4 files changed, 3 insertions(+), 69 deletions(-)

New commits:
commit 81273c65dd9cec5acd9464b9041f452a5481e10e
Author: Michael Stahl 
AuthorDate: Thu Jun 16 19:38:43 2022 +0200
Commit: Michael Stahl 
CommitDate: Wed Jun 22 18:01:36 2022 +0200

tdf#134759 sw: do CopyToModify() for both start and end node

... in SwNodes::MoveRange().

SwRangeRedline::Hide() does CopyToSection()/DelCopyOfSection() so the
previous commit fixed it, and SwRangeRedline::Show() does
MoveFromSection() so hopefully this should fix it to restore the
situation before hiding.

This caused several tests to fail, and the reason appears to be that
they pretty much tested exactly the problem that's being fixed with this
commit, but the pre-existing fixes and the new one cancel each other
out.

In all cases the pre-exising fix moves all redlines and moves them back
again, which is the sort of thing that sw_redlinehide wanted to get rid
of; not sure why i didn't notice this earlier.

The check for the 3rd paragraph where the style was applied still
succeeds with the new bugfix, but the one for the 1st paragraph fails;
it is unclear why applying a style to the 3rd paragraph should have an
effect on the 1st one.

Hence:

Revert code changes of commit 1d65ffc5a37be21e0316019b1c96eb9a1c871ac0
"tdf#105413 track changes: keep paragraph styles"

Revert code changes of commit d97fc64a819f834302e384792668507df4cc412c
"tdf#122893 track changes: keep paragraph alignment"

Revert code changes of commit 6a54dd844d1821165642bbcc16bd12a01a23393d
"tdf#122901 track changes: keep paragraph top and bottom borders"

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

diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 0ff16f74e59d..8e78a70f97c1 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -2147,9 +2147,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf105413)
 
IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
 
 // Set Heading 1 paragraph style in the 3th paragraph.
-// Because of the tracked deleted region between them,
-// this sets also the same style in the first paragraph automatically
-// to keep the changed paragraph style at hiding tracked changes or saving 
the document
 SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
 pWrtShell->Down(/*bSelect=*/false);
 pWrtShell->Down(/*bSelect=*/false);
@@ -2165,9 +2162,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf105413)
  getProperty(getParagraph(3), 
"ParaStyleName"));
 CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
  getProperty(getParagraph(2), 
"ParaStyleName"));
-// first paragraph gets the same heading style
-CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
- getProperty(getParagraph(1), 
"ParaStyleName"));
 }
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf76817)
@@ -2589,9 +2583,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf122893)
 
IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
 
 // Set center-aligned paragraph with preset double line spacing in the 3th 
paragraph.
-// Because of the tracked deleted region between them,
-// this sets also the same formatting in the first paragraph automatically
-// to keep the changed paragraph formatting at hiding tracked changes or 
saving the document
 SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
 pWrtShell->Down(/*bSelect=*/false);
 pWrtShell->Down(/*bSelect=*/false);
@@ -2610,10 +2601,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf122893)
 CPPUNIT_ASSERT_EQUAL(sal_Int16(100),
  getProperty(getParagraph(2), 
"ParaLineSpacing")
  .Height); // single line spacing
-// first paragraph is also center-aligned with double line spacing
-CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty(getParagraph(1), 
"ParaAdjust"));
-CPPUNIT_ASSERT_EQUAL(
-sal_Int16(200), getProperty(getParagraph(1), 
"ParaLineSpacing").Height);
 }
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf122901)
@@ -2639,9 +2626,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf122901)
 
IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
 
 // Increase paragraph borders in the 3th paragraph, similar to the default

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

2022-06-22 Thread Mike Kaganski (via logerrit)
 sc/qa/unit/data/ods/LargeAnchorOffset.ods |binary
 sc/qa/unit/scshapetest.cxx|   34 ++
 sc/source/filter/xml/xmlexprt.cxx |8 ++-
 3 files changed, 37 insertions(+), 5 deletions(-)

New commits:
commit 7d5dcf5f547e29d61e788b88f7a3f7b4feafb6b2
Author: Mike Kaganski 
AuthorDate: Wed Jun 22 16:22:50 2022 +0300
Commit: Mike Kaganski 
CommitDate: Wed Jun 22 19:28:19 2022 +0200

Fix shape rectangle calculation

At specific screen resolutions, caused failed CppunitTest_sc_shapetest:

  C:/lo/src/core/sc/qa/unit/scshapetest.cxx(169) : error : Assertion
  Test name: 
sc_apitest::ScShapeTest::testTdf137576_LogicRectInDefaultMeasureline
  assertion failed
  - Expression: std::abs(rExpected.Y() - rActual.Y()) <= nTolerance
  - after reload Y expected 9731 actual 10287 Tolerance 1

which manifested the actual wrong position of shape written into ODF.
Commit cd966aac6ecd8ce606ac3f2ccd602e467114ba3f
  Author Regina Henschel 
  Date   Fri Dec 25 19:27:51 2020 +0100
tdf#137033 improve save of cell anchored shapes

had corrected the calculation of anchor point, but the overlook was
that in some cases of non-transformed shapes, rMyCell.maCellAddress
may differ from pObjData->maStart. Since aSnapStartAddress could be
not set to pObjData->maStart for such shapes, the wrong cell range
could be calculated for resized-with-cell objects.

Fix this by using pObjData->maStart whenever there is pObjData. If
it turns out that in some cases, rMyCell.maCellAddress is needed in
calculations before the 'if (rShape.bResizeWithCell && pObjData)',
aSnapStartAddress should be assigned to pObjData->maStart after the
check.

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

diff --git a/sc/qa/unit/data/ods/LargeAnchorOffset.ods 
b/sc/qa/unit/data/ods/LargeAnchorOffset.ods
new file mode 100644
index ..c7e44527e235
Binary files /dev/null and b/sc/qa/unit/data/ods/LargeAnchorOffset.ods differ
diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index 761db2da687c..dc47be21b0d3 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -71,6 +71,7 @@ public:
 void testCustomShapeCellAnchoredRotatedShape();
 void testTdf144242_Line_noSwapWH();
 void testTdf144242_OpenBezier_noSwapWH();
+void testLargeAnchorOffset();
 
 CPPUNIT_TEST_SUITE(ScShapeTest);
 CPPUNIT_TEST(testTdf143619_validation_circle_pos);
@@ -100,6 +101,7 @@ public:
 CPPUNIT_TEST(testCustomShapeCellAnchoredRotatedShape);
 CPPUNIT_TEST(testTdf144242_Line_noSwapWH);
 CPPUNIT_TEST(testTdf144242_OpenBezier_noSwapWH);
+CPPUNIT_TEST(testLargeAnchorOffset);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -1234,6 +1236,38 @@ void 
ScShapeTest::testCustomShapeCellAnchoredRotatedShape()
 pDocSh->DoClose();
 }
 
+void ScShapeTest::testLargeAnchorOffset()
+{
+// The example doc contains a resize-with-cell-anchored measure line
+// with a large vertical offset that shifts the start point onto the
+// next cell below.
+OUString aFileURL;
+createFileURL(u"LargeAnchorOffset.ods", aFileURL);
+uno::Reference xComponent = 
loadFromDesktop(aFileURL);
+
+ScDocShell* pDocSh = lcl_getScDocShellWithAssert(xComponent);
+SdrObject* pObj = lcl_getSdrObjectWithAssert(pDocSh->GetDocument(), 0);
+
+const Point aOldPos = pObj->GetRelativePos();
+// Just to check that it imports correctly
+lcl_AssertPointEqualWithTolerance("before reload", { 9504, 9089 }, 
aOldPos, 1);
+
+saveAndReload(xComponent, "calc8");
+
+pDocSh = lcl_getScDocShellWithAssert(xComponent);
+pObj = lcl_getSdrObjectWithAssert(pDocSh->GetDocument(), 0);
+
+// Without the fix, this would fail:
+//   Test name: sc_apitest::ScShapeTest::testLargeAnchorOffset
+//   assertion failed
+//   - Expression: std::abs(rExpected.Y() - rActual.Y()) <= nTolerance
+//   - after reload Y expected 9089 actual 9643 Tolerance 1
+const Point aNewPos = pObj->GetRelativePos();
+lcl_AssertPointEqualWithTolerance("after reload", aOldPos, aNewPos, 1);
+
+pDocSh->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScShapeTest);
 }
 
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 57c041f7f5ee..8a781127035a 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3481,14 +3481,12 @@ void ScXMLExport::WriteShapes(const ScMyCell& rMyCell)
 // end cell address of snap rect. In case of a transformed shape, 
it is not in rMyCell.
 ScAddress aSnapStartAddress = rMyCell.maCellAddress;
 ScDrawObjData* pObjData = nullptr;
-bool bIsShapeTransformed = false;
 if (pObj)
 {
   

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

2022-06-22 Thread Caolán McNamara (via logerrit)
 basic/source/inc/scanner.hxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 5bb823073f9df786eb6dbaaec71f572b2059e818
Author: Caolán McNamara 
AuthorDate: Wed Jun 22 15:56:53 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 22 20:08:57 2022 +0200

crashtesting: assert seen with forum-mso-de-125088

where at restoring the SaveIndex the underlying aLine string had
been replaced, so the index is for a different string. Save and
restore the aLine too. Not entirely sure this is what we want,
but it does seem to be what this restoring code expects.

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

diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx
index 3f2c7e2e2cff..2a1b48ffdda2 100644
--- a/basic/source/inc/scanner.hxx
+++ b/basic/source/inc/scanner.hxx
@@ -33,6 +33,7 @@ class SbiScanner
 {
 OUString   aBuf; // input buffer
 OUString   aLine;
+OUString   aSaveLine;
 sal_Int32 nLineIdx;
 sal_Int32 nSaveLineIdx;
 StarBASIC* pBasic;  // instance for error callbacks
@@ -80,8 +81,8 @@ public:
 sal_Int32 GetCol1() const   { return nCol1;   }
 void  SetCol1( sal_Int32 n ){ nCol1 = n;  }
 StarBASIC* GetBasic()   { return pBasic;  }
-void  SaveLine(){ nSaveLineIdx = nLineIdx; }
-void  RestoreLine() { nLineIdx = nSaveLineIdx; }
+void  SaveLine(){ aSaveLine = aLine; nSaveLineIdx = 
nLineIdx; }
+void  RestoreLine() { nLineIdx = nSaveLineIdx; aLine = 
aSaveLine; }
 void  LockColumn();
 void  UnlockColumn();
 bool  DoesColonFollow();


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - formula/source

2022-06-22 Thread Caolán McNamara (via logerrit)
 formula/source/core/api/token.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 05f2af8f8251d53ac8e6937759f7bf4d8c8f10e1
Author: Caolán McNamara 
AuthorDate: Wed Jun 22 16:05:53 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 22 20:34:41 2022 +0200

crashtesting: assert seen with forum-mso-de-53682

not reproducible for me, but appears to be an empty string here
sometimes.

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

diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index 2ca7af78f963..9a22d9cd2205 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1256,8 +1256,12 @@ bool FormulaMissingContext::AddMissingExternal( 
FormulaTokenArray *pNewArr ) con
 
 const OUString &rName = mpFunc->GetExternal();
 
-// initial (fast) check:
-sal_Unicode nLastChar = rName[ rName.getLength() - 1];
+// initial (fast) checks:
+sal_Int32 nLength = rName.getLength();
+if (!nLength)
+return false;
+
+sal_Unicode nLastChar = rName[ nLength - 1];
 if ( nLastChar != 't' && nLastChar != 'm' )
 return false;
 


[Libreoffice-commits] help.git: Branch 'libreoffice-7-3' - help3xsl/online_transform.xsl

2022-06-22 Thread Christian Lohmaier (via logerrit)
 help3xsl/online_transform.xsl |   73 +++---
 1 file changed, 41 insertions(+), 32 deletions(-)

New commits:
commit fa41fa02307248077c426b0916004b43c13d46c2
Author: Christian Lohmaier 
AuthorDate: Mon Jun 20 21:36:02 2022 +0200
Commit: Caolán McNamara 
CommitDate: Wed Jun 22 20:42:12 2022 +0200

make generated help files deterministic/reproducible

generate-id() is only stable within a single invocation, the results
vary from run to run, causing two builds of the same codebase result in
different output.
Due to help including snippets from different files, a simple count
won't be unique enough, but combining it with the sourcefile's topic-ID
does the trick.

Change-Id: I2ab8988bc34c9136fcd99d074cf0b189a8f40eb7
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136197
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit b48ace599e8c109c4090c178823c6718f78103da)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136171
Reviewed-by: Caolán McNamara 

diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 7ccb97b76..31b32d3b0 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -658,16 +658,17 @@
 
 
 
+
+
+
 
 
-
-
+
 
 
 
 
-
-
+
 
 
 
@@ -677,16 +678,17 @@
 
 
 
+
+
+
 
 
-
-
+
 
 
 
 
-
-
+
 
 
 
@@ -698,16 +700,17 @@
 
 
 
+
+
+
 
 
-
-
+
 
 
 
 
-
-
+
 
 
 
@@ -717,16 +720,17 @@
 
 
 
+
+
+
 
 
-
-
+
 
 
 
 
-
-
+
 
 
 
@@ -1093,13 +1097,15 @@
 
 
 
-
+
+
+
 
 
-
+
 
 
-
+
 
 
 
@@ -1107,26 +1113,27 @@
 
 
 
+
+
+
 
 
-
 
 
-
+
 
 
-
+
 
 
 
 
-
 
 
-
+
 
 
-
+
 
 
 
@@ -1262,6 +1269,9 @@
 
 
 
+
+
+
 
 
 
@@ -1274,7 +1284,6 @@
 
 
 
-
 
 
 
@@ -1297,7 +1306,7 @@
 
 
 
-
+
 
 
 
@@ -1308,7 +1317,7 @@
 
 
 
-
+
 
 
 
@@ -1319,7 +1328,7 @@
 
 
 
-
+
 
 
 
@@ -1330,7 +1339,7 @@
 
 
 
-
+
 
 
 
@@ -1341,7 +1350,7 @@
 
 
 
-
+
 
 
 
@@ -1352,7 +1361,7 @@
 
 
 
-
+
 
 
 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - helpcontent2

2022-06-22 Thread Christian Lohmaier (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9ccd84fb9df1767ff01a99378ff240c4d5fed7c3
Author: Christian Lohmaier 
AuthorDate: Wed Jun 22 20:42:14 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jun 22 20:42:14 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'libreoffice-7-3'
  to fa41fa02307248077c426b0916004b43c13d46c2
  - make generated help files deterministic/reproducible

generate-id() is only stable within a single invocation, the results
vary from run to run, causing two builds of the same codebase result in
different output.
Due to help including snippets from different files, a simple count
won't be unique enough, but combining it with the sourcefile's topic-ID
does the trick.

Change-Id: I2ab8988bc34c9136fcd99d074cf0b189a8f40eb7
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136197
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit b48ace599e8c109c4090c178823c6718f78103da)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136171
Reviewed-by: Caolán McNamara 

diff --git a/helpcontent2 b/helpcontent2
index 0f12f8a4dcf3..fa41fa023072 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 0f12f8a4dcf3b3ee34864d50f06e77d495fb9133
+Subproject commit fa41fa02307248077c426b0916004b43c13d46c2


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

2022-06-22 Thread Eike Rathke (via logerrit)
 sc/source/ui/app/inputhdl.cxx |   20 
 sc/source/ui/inc/inputhdl.hxx |2 ++
 2 files changed, 18 insertions(+), 4 deletions(-)

New commits:
commit 2f6b667ce9bf3d3d1bfd13d25b6c7605fc01577c
Author: Eike Rathke 
AuthorDate: Tue Jun 21 09:49:31 2022 +0200
Commit: Caolán McNamara 
CommitDate: Wed Jun 22 20:43:15 2022 +0200

Resolves: tdf#149589 No "+ or - may start formula" when editing content

If it was a formula already it would start with = anyway.

Change-Id: Ib3c0ebcaf99231d387f1aace8e1a5642061de3a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136208
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 909cdd552199d35f7c10be0a8be370158aea0815)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136173
Tested-by: Eike Rathke 
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 042fed788ff8..088d3ecfc297 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -830,6 +830,7 @@ ScInputHandler::ScInputHandler()
 bLastIsSymbol( false ),
 mbDocumentDisposing(false),
 mbPartialPrefix(false),
+mbEditingExistingContent(false),
 nValidation( 0 ),
 eAttrAdjust( SvxCellHorJustify::Standard ),
 aScaleX( 1,1 ),
@@ -1768,6 +1769,9 @@ void ScInputHandler::LOKPasteFunctionData(const OUString& 
rFunctionName)
 if (pEditEngine)
 {
 aFormula = pEditEngine->GetText(0);
+/* TODO: LOK: are you sure you want '+' and '-' let start formulas with
+ * function names? That was meant for "data typist" numeric keyboard
+ * input. */
 bEdit = aFormula.getLength() > 1 && (aFormula[0] == '=' || aFormula[0] 
== '+' || aFormula[0] == '-');
 }
 
@@ -2556,6 +2560,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool 
bFromCommand, bool bIn
 }
 else
 aStr = GetEditText(mpEditEngine.get());
+mbEditingExistingContent = !aStr.isEmpty();
 
 if (aStr.startsWith("{=") && aStr.endsWith("}") )  // Matrix 
formula?
 {
@@ -2570,8 +2575,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool 
bFromCommand, bool bIn
 if ( bAutoComplete )
 GetColData();
 
-if ( !aStr.isEmpty() && ( aStr[0] == '=' || aStr[0] == '+' || 
aStr[0] == '-' ) &&
- !cTyped && !bCreatingFuncView )
+if (!cTyped && !bCreatingFuncView && StartsLikeFormula(aStr))
 InitRangeFinder(aStr); // Formula is being edited -> 
RangeFinder
 
 bNewTable = true; // -> PostEditView Call
@@ -2762,6 +2766,13 @@ void ScInputHandler::DataChanged( bool bFromTopNotify, 
bool bSetModified )
 bInOwnChange = false;
 }
 
+bool ScInputHandler::StartsLikeFormula( std::u16string_view rStr ) const
+{
+// For new input '+' and '-' may start the dreaded "lazy data typist"
+// formula input, editing existing formula content can only start with '='.
+return !rStr.empty() && (rStr[0] == '=' || (!mbEditingExistingContent && 
(rStr[0] == '+' || rStr[0] == '-')));
+}
+
 void ScInputHandler::UpdateFormulaMode()
 {
 SfxApplication* pSfxApp = SfxGetpApp();
@@ -2770,8 +2781,7 @@ void ScInputHandler::UpdateFormulaMode()
 if (bIsFormula)
 {
 const OUString& rText = mpEditEngine->GetText(0);
-bIsFormula = !rText.isEmpty() &&
-(rText[0] == '=' || rText[0] == '+' || rText[0] == '-');
+bIsFormula = StartsLikeFormula(rText);
 }
 
 if ( bIsFormula )
@@ -3377,6 +3387,7 @@ void ScInputHandler::EnterHandler( ScEnterMode 
nBlockMode, bool bBeforeSavingInL
 nFormSelStart = nFormSelEnd = 0;
 aFormText.clear();
 
+mbEditingExistingContent = false;
 bInOwnChange = false;
 bInEnterHandler = false;
 }
@@ -3389,6 +3400,7 @@ void ScInputHandler::CancelHandler()
 
 bModified = false;
 mbPartialPrefix = false;
+mbEditingExistingContent = false;
 
 // Don't rely on ShowRefFrame switching the active view synchronously
 // execute the function directly on the correct view's bindings instead
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index f66688a257ca..88ec1dd81adc 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -105,6 +105,7 @@ private:
 boolmbDocumentDisposing:1;
 /// To indicate if there is a partial prefix completion.
 boolmbPartialPrefix:1;
+boolmbEditingExistingContent:1;
 
 sal_uLong   nValidation;
 SvxCellHorJustify   eAttrAdjust;
@@ -146,6 +147,7 @@ private:
 boolStartTable( sal_Unicode cTyped, bool bFromCommand, bool 
bInputActivated,
 ScEditEngineDefaulter* pTopEngine );
 voidRemoveSelection();
+boolStar

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

2022-06-22 Thread Tomaž Vajngerl (via logerrit)
 chart2/source/view/charttypes/VSeriesPlotter.cxx |   21 +++--
 chart2/source/view/inc/VSeriesPlotter.hxx|4 +++-
 2 files changed, 18 insertions(+), 7 deletions(-)

New commits:
commit ccf84ce0de2580eadb1407f11707f05fb042a8bd
Author: Tomaž Vajngerl 
AuthorDate: Wed Jun 22 13:01:52 2022 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 22 20:53:43 2022 +0200

tdf#149204 revert getSeriesNames method to the original behaviour

The VSeriesPlotter::getSeriesNames returned a filtered list of
series names without the z-axis names, which is not expected from
the name, so when refactoring the assumption was to return all of
them names. This wasn't correct and has broken rendering of some
charts. This change reverts the method to the original behaviour.

Change-Id: I42464495a1a2b68a34efbc8409ae6c1417ff072d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136280
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
Reviewed-by: Tomaž Vajngerl 

diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx 
b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index c3b96d9912b9..360bce2c275f 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2317,20 +2317,29 @@ std::vector VSeriesPlotter::getAllSeries()
 return aAllSeries;
 }
 
-uno::Sequence< OUString > VSeriesPlotter::getSeriesNames() const
+uno::Sequence VSeriesPlotter::getSeriesNames() const
 {
 std::vector aRetVector;
 
 OUString aRole;
-if( m_xChartTypeModel.is() )
+if (m_xChartTypeModel.is())
 aRole = m_xChartTypeModel->getRoleOfSequenceForSeriesLabel();
 
-for (VDataSeries const* pSeries : getAllSeries())
+for (auto const& rGroup : m_aZSlots)
 {
-if (pSeries)
+if (!rGroup.empty())
 {
-OUString aSeriesName( DataSeriesHelper::getDataSeriesLabel( 
pSeries->getModel(), aRole ) );
-aRetVector.push_back( aSeriesName );
+VDataSeriesGroup const & rSeriesGroup(rGroup[0]);
+if (!rSeriesGroup.m_aSeriesVector.empty())
+{
+VDataSeries const * pSeries = 
rSeriesGroup.m_aSeriesVector[0].get();
+rtl::Reference< DataSeries > xSeries( pSeries ? 
pSeries->getModel() : nullptr );
+if( xSeries.is() )
+{
+OUString aSeriesName( 
DataSeriesHelper::getDataSeriesLabel( xSeries, aRole ) );
+aRetVector.push_back( aSeriesName );
+}
+}
 }
 }
 return comphelper::containerToSequence( aRetVector );
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx 
b/chart2/source/view/inc/VSeriesPlotter.hxx
index 82cc45e6ace8..1b7961194ab2 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -234,8 +234,10 @@ public:
 
 void setExplicitCategoriesProvider( ExplicitCategoriesProvider* 
pExplicitCategoriesProvider );
 
+ExplicitCategoriesProvider* getExplicitCategoriesProvider() { return 
m_pExplicitCategoriesProvider; }
+
 //get series names for the z axis labels
-css::uno::Sequence< OUString > getSeriesNames() const;
+css::uno::Sequence getSeriesNames() const;
 
 void setPageReferenceSize( const css::awt::Size & rPageRefSize );
 //better performance for big data


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

2022-06-22 Thread Caolán McNamara (via logerrit)
 formula/source/core/api/token.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit eacd9b08fa9914c674f287b7bdceacf94d93a6ad
Author: Caolán McNamara 
AuthorDate: Wed Jun 22 16:05:53 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 22 21:02:00 2022 +0200

crashtesting: assert seen with forum-mso-de-53682

not reproducible for me, but appears to be an empty string here
sometimes.

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

diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index 2ca7af78f963..9a22d9cd2205 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1256,8 +1256,12 @@ bool FormulaMissingContext::AddMissingExternal( 
FormulaTokenArray *pNewArr ) con
 
 const OUString &rName = mpFunc->GetExternal();
 
-// initial (fast) check:
-sal_Unicode nLastChar = rName[ rName.getLength() - 1];
+// initial (fast) checks:
+sal_Int32 nLength = rName.getLength();
+if (!nLength)
+return false;
+
+sal_Unicode nLastChar = rName[ nLength - 1];
 if ( nLastChar != 't' && nLastChar != 'm' )
 return false;
 


Minutes from the UX/design meeting 2022-Jun-22

2022-06-22 Thread Heiko Tietze

Present: Cor, Heiko
Comments: Regina, Mike, Eike

Tickets/Topics

 * EDITING: The "Increase Indent" and "Decrease Indent" increment step should
   be the width of 3 space chars (using the default style font) when working
   in an xlsx document
   + https://bugs.documentfoundation.org/show_bug.cgi?id=144991
   + indentation should depend on the default font size at three spaces
 + makes sense (Mike) and is what MSO does (Eike)
   + change the indentation when the default font is altered
 + rather not but offer new the defaults at the interactions (Mike)
   => no-brainer if it's a standard

 * Prototype UI for new Inking feature
   + https://bugs.documentfoundation.org/show_bug.cgi?id=146968
   + proposal to improve drawing capabilities (essentially bug 89369
 with a different approach)
   + functional difference apparently, unclear for other objects (Cor)
 + the "styles" are probably just combinations of attributes (Heiko)
 + combining frequently used attributes such as color and seldom like cap
   style into one "style" is probably not user-focused
 + there is bug 127348 related to this incl. a mockup (Heiko)
   => NEEDINFO

  * UI: PNG export dialog has radio button doesn't allow 'dimensions' or
'DPI' to be set both
+ https://bugs.documentfoundation.org/show_bug.cgi?id=144195
+ setting one attribute affects another; works for me (Regina, c8)
+ suggest a toggle button between mutually dependent settings meaning
  "auto adjust setting" (Regina)
+ afraid of side-effects, commented on bug 115464 incl. a mockup (Heiko)
+ welcome the suggested modification (Cor)
=> do it

  * Comment box arrows should be visually separate when pointing to the
same line
+ https://bugs.documentfoundation.org/show_bug.cgi?id=86888
+ don't show any lines but highlight in author's color on focus (Heiko)
+ MSO cannot do zero length comments and selects the whole word,
  would be a prerequisite to see a comment without the pointing line (Cor)
+ show the line only when a comment is selected (Heiko)
+ NAB/INV since the comment becomes framed and the dashed line solid (Cor)
  + bug: dashed lines may become solid depending on spaces (Heiko)
=> resolve INV

  * No way for Glow and Soft Edge settings in drawing styles and in any dialogs
+ https://bugs.documentfoundation.org/show_bug.cgi?id=136123
+ mockup attached
+ if possible, we should remove the enabled checkbox and bind shadow on/off
  to distance >0;
+ like to have the default (Cor), maybe the other way around and on/off
  for the two options
=> do it


OpenPGP_signature
Description: OpenPGP digital signature


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

2022-06-22 Thread Mike Kaganski (via logerrit)
 sc/qa/unit/scshapetest.cxx |   12 
 1 file changed, 12 deletions(-)

New commits:
commit 424a293664cbdffcceaa79756d59bb2d29080613
Author: Mike Kaganski 
AuthorDate: Wed Jun 22 20:46:11 2022 +0300
Commit: Mike Kaganski 
CommitDate: Wed Jun 22 21:41:47 2022 +0200

Re-enable the test

After commit 7d5dcf5f547e29d61e788b88f7a3f7b4feafb6b2
  Author Mike Kaganski 
  Date   Wed Jun 22 16:22:50 2022 +0300
Fix shape rectangle calculation

the test should not fail anymore, both on macOS, and with
non-default DPI.

This reverts commit 5c6139ac36134a21345525c21e167a356b0892b9
  Author Caolán McNamara 
  Date   Thu Dec 31 19:40:17 2020 +
disable contantly failing test

and commit d0f6c9f924fdbeed4c466e3a6eff7d6980ebc659
  Author Noel Grandin 
  Date   Wed Jan 06 09:22:57 2021 +0200
exclude more tests for non-default DPI

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

diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index dc47be21b0d3..8417d0bf51b9 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -55,10 +55,7 @@ public:
 void testTdf137033_FlipHori_Resize();
 void testTdf137033_RotShear_ResizeHide();
 void testTdf137033_RotShear_Hide();
-// this test has starting failing under OSX
-#if !defined MACOSX
 void testTdf137576_LogicRectInDefaultMeasureline();
-#endif
 void testTdf137576_LogicRectInNewMeasureline();
 void testMeasurelineHideColSave();
 void testHideColsShow();
@@ -85,10 +82,7 @@ public:
 CPPUNIT_TEST(testTdf137033_FlipHori_Resize);
 CPPUNIT_TEST(testTdf137033_RotShear_ResizeHide);
 CPPUNIT_TEST(testTdf137033_RotShear_Hide);
-// this test has starting failing under OSX
-#if !defined MACOSX
 CPPUNIT_TEST(testTdf137576_LogicRectInDefaultMeasureline);
-#endif
 CPPUNIT_TEST(testTdf137576_LogicRectInNewMeasureline);
 CPPUNIT_TEST(testMeasurelineHideColSave);
 CPPUNIT_TEST(testHideColsShow);
@@ -769,13 +763,8 @@ void ScShapeTest::testTdf137033_RotShear_Hide()
 pDocSh->DoClose();
 }
 
-// this test has starting failing under OSX
-#if !defined MACOSX
 void ScShapeTest::testTdf137576_LogicRectInDefaultMeasureline()
 {
-if (!IsDefaultDPI())
-return;
-
 // Error was, that the empty logical rectangle of a default measure line 
(Ctrl+Click)
 // resulted in zeros in NonRotatedAnchor and a wrong position when 
reloading.
 
@@ -828,7 +817,6 @@ void 
ScShapeTest::testTdf137576_LogicRectInDefaultMeasureline()
 
 pDocSh->DoClose();
 }
-#endif
 
 void ScShapeTest::testTdf137576_LogicRectInNewMeasureline()
 {


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

2022-06-22 Thread Noel Grandin (via logerrit)
 helpcompiler/source/HelpIndexer.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1eaf11278a2f2f81fbff774fef73f72a6b1a4efb
Author: Noel Grandin 
AuthorDate: Wed Jun 22 14:16:55 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 22 22:21:10 2022 +0200

fix build --with-help

after
commit 966d9757de471f2a5ea1ffa87cef019dcf1e0cb3
Author: Noel Grandin 
Date:   Tue Jun 21 09:05:15 2022 +0200
clang-tidy modernize-pass-by-value in helpcompiler

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

diff --git a/helpcompiler/source/HelpIndexer.cxx 
b/helpcompiler/source/HelpIndexer.cxx
index fc6da05f1d56..e55f0760400b 100644
--- a/helpcompiler/source/HelpIndexer.cxx
+++ b/helpcompiler/source/HelpIndexer.cxx
@@ -34,7 +34,7 @@ HelpIndexer::HelpIndexer(OUString lang, OUString module,
 std::u16string_view srcDir, std::u16string_view outDir)
 : d_lang(std::move(lang)), d_module(std::move(module))
 {
-d_indexDir = outDir + OUStringChar('/') + module + ".idxl";
+d_indexDir = outDir + OUStringChar('/') + d_module + ".idxl";
 d_captionDir = OUString::Concat(srcDir) + "/caption";
 d_contentDir = OUString::Concat(srcDir) + "/content";
 }


Re: 7.3.4.2 crashes

2022-06-22 Thread Stephan Bergmann

On 6/22/22 11:30, Xisco Fauli wrote:
If you have a bit of time, I'd appreciate if you could take a look at 
the document to see if any of the crashes can be fixed.


 "Pump XInputStream into 
an SvMemoryStream rather than an OStringBuffer" should fix 
d9613c81-de37-4de2-8c64-e36634d10ddc




[Libreoffice-commits] core.git: vcl/android vcl/headless vcl/inc vcl/ios vcl/source

2022-06-22 Thread Stephan Bergmann (via logerrit)
 vcl/android/androidinst.cxx   |2 
 vcl/headless/headlessinst.cxx |2 
 vcl/headless/svpinst.cxx  |  316 +-
 vcl/inc/headless/svpinst.hxx  |  101 +
 vcl/ios/iosinst.cxx   |2 
 vcl/source/app/salplug.cxx|2 
 6 files changed, 295 insertions(+), 130 deletions(-)

New commits:
commit 07295115f5742e0d06a21d280610903ad55a75f0
Author: Stephan Bergmann 
AuthorDate: Wed Jun 22 22:26:04 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jun 23 07:55:06 2022 +0200

Revert "svp: don't directly yield in main thread"

This reverts commit d2de55c93f94bbccff51fa7715b613341f1f4ae6 for now, 
because it
appears to have caused a massive uptick in hung UITest_impress_tests
(sd/qa/uitest/impress_tests/save_readonly_with_password.py, line 95) and
UITest_writer_test6 
(sw/qa/uitest/writer_tests6/save_readonly_with_password.py,
line 54) tests across Jenkins, see the comments starting at


"svp: don't directly yield in main thread".

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

diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 56497db19270..ca130fb1b19f 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -157,7 +157,7 @@ SalFrame *AndroidSalInstance::CreateFrame( SalFrame* 
pParent, SalFrameStyleFlags
 extern "C" SalInstance *create_SalInstance()
 {
 LOGI("Android: create_SalInstance!");
-AndroidSalInstance* pInstance = new AndroidSalInstance( 
std::make_unique() );
+AndroidSalInstance* pInstance = new AndroidSalInstance( 
std::make_unique() );
 new SvpSalData();
 return pInstance;
 }
diff --git a/vcl/headless/headlessinst.cxx b/vcl/headless/headlessinst.cxx
index 162fd5bd865b..abe3e1cf92c7 100644
--- a/vcl/headless/headlessinst.cxx
+++ b/vcl/headless/headlessinst.cxx
@@ -47,7 +47,7 @@ SalSystem *HeadlessSalInstance::CreateSalSystem()
 
 extern "C" SalInstance *create_SalInstance()
 {
-HeadlessSalInstance* pInstance = new 
HeadlessSalInstance(std::make_unique());
+HeadlessSalInstance* pInstance = new 
HeadlessSalInstance(std::make_unique());
 new SvpSalData();
 return pInstance;
 }
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 10beeeb58fbd..bf53dc24faf3 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -56,55 +56,138 @@
 #include 
 #include 
 #include 
-#include 
 
 SvpSalInstance* SvpSalInstance::s_pDefaultInstance = nullptr;
 
+#ifndef NDEBUG
+static bool g_CheckedMutex = false;
+
+#define DBG_TESTSVPYIELDMUTEX() \
+do { \
+if (!g_CheckedMutex) \
+{ \
+assert(dynamic_cast(GetYieldMutex()) != nullptr \
+&& "This SvpSalInstance function requires use of 
SvpSalYieldMutex"); \
+g_CheckedMutex = true; \
+} \
+} while(false)
+
+#else // NDEBUG
+#define DBG_TESTSVPYIELDMUTEX() ((void)0)
+#endif
+
+#if !defined(ANDROID) && !defined(IOS)
+
+static void atfork_child()
+{
+if (SvpSalInstance::s_pDefaultInstance != nullptr)
+{
+SvpSalInstance::s_pDefaultInstance->CloseWakeupPipe(false);
+SvpSalInstance::s_pDefaultInstance->CreateWakeupPipe(false);
+}
+}
+
+#endif
+
 SvpSalInstance::SvpSalInstance( std::unique_ptr pMutex )
 : SalGenericInstance( std::move(pMutex) )
-, m_WaitCondition(m_NonMainYieldMutex)
-, m_EventCondition(m_NonMainYieldMutex)
-, m_MainYieldCondition(m_MainYieldMutex)
 {
 m_aTimeout.tv_sec   = 0;
 m_aTimeout.tv_usec  = 0;
 m_nTimeoutMS= 0;
 
 m_MainThread = osl::Thread::getCurrentIdentifier();
+CreateWakeupPipe(true);
 if( s_pDefaultInstance == nullptr )
 s_pDefaultInstance = this;
-
-m_bSupportsOpenGL = false;
+#if !defined(ANDROID) && !defined(IOS)
+pthread_atfork(nullptr, nullptr, atfork_child);
+#endif
 }
 
 SvpSalInstance::~SvpSalInstance()
 {
 if( s_pDefaultInstance == this )
 s_pDefaultInstance = nullptr;
+CloseWakeupPipe(true);
 }
 
-void SvpSalInstance::TriggerUserEventProcessing()
+void SvpSalInstance::CloseWakeupPipe(bool log)
 {
-Wakeup();
+SvpSalYieldMutex *const 
pMutex(dynamic_cast(GetYieldMutex()));
+if (!pMutex)
+return;
+if (pMutex->m_FeedbackFDs[0] != -1)
+{
+if (log)
+{
+SAL_INFO("vcl.headless", "CloseWakeupPipe: Closing inherited 
feedback pipe: [" << pMutex->m_FeedbackFDs[0] << "," << 
pMutex->m_FeedbackFDs[1] << "]");
+}
+close (pMutex->m_FeedbackFDs[0]);
+close (pMutex->m_FeedbackFDs[1]);
+pMutex->m_FeedbackFDs[0] = pMutex->m_FeedbackFDs[1] = -1;
+}
 }
 
-void SvpSalInstance::Wakeup()
+void SvpSalInstance::CreateWakeupPipe(bool log)
 {
-if (IsMainThread())

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

2022-06-22 Thread Noel Grandin (via logerrit)
 libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx |5 +++--
 libreofficekit/source/gtk/lokdocview.cxx |5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 154cffd87ee4a21b5c0c291f84c95d74cde2a143
Author: Noel Grandin 
AuthorDate: Wed Jun 22 09:11:15 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 23 08:53:17 2022 +0200

clang-tidy modernize-pass-by-value in libreofficekit

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

diff --git a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
index dc106e58dcb4..22aadbe2f337 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
@@ -16,6 +16,7 @@
 
 #include 
 #include 
+#include 
 
 namespace {
 
@@ -26,9 +27,9 @@ struct GtvCalcHeaderBarPrivateImpl
 {
 int m_nSize;
 std::string m_aText;
-Header(int nSize, const std::string& rText)
+Header(int nSize, std::string aText)
 : m_nSize(nSize),
-  m_aText(rText)
+  m_aText(std::move(aText))
 { }
 };
 
diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index 39f2281b0c7d..a092a1dbf1ab 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -11,6 +11,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -358,9 +359,9 @@ struct CallbackData
 std::string m_aPayload;
 LOKDocView* m_pDocView;
 
-CallbackData(int nType, const std::string& rPayload, LOKDocView* pDocView)
+CallbackData(int nType, std::string aPayload, LOKDocView* pDocView)
 : m_nType(nType),
-  m_aPayload(rPayload),
+  m_aPayload(std::move(aPayload)),
   m_pDocView(pDocView) {}
 };
 


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

2022-06-22 Thread Noel Grandin (via logerrit)
 l10ntools/inc/cfgmerge.hxx |9 +
 l10ntools/inc/export.hxx   |4 ++--
 l10ntools/inc/helpmerge.hxx|2 +-
 l10ntools/inc/lngmerge.hxx |2 +-
 l10ntools/inc/propmerge.hxx|2 +-
 l10ntools/inc/treemerge.hxx|2 +-
 l10ntools/inc/xmlparse.hxx |   25 +
 l10ntools/inc/xrmmerge.hxx |4 ++--
 l10ntools/source/cfgmerge.cxx  |   10 +-
 l10ntools/source/helpmerge.cxx |5 +++--
 l10ntools/source/lngmerge.cxx  |5 +++--
 l10ntools/source/merge.cxx |   11 ++-
 l10ntools/source/propmerge.cxx |7 ---
 l10ntools/source/treemerge.cxx |5 +++--
 l10ntools/source/xmlparse.cxx  |9 +
 l10ntools/source/xrmmerge.cxx  |9 +
 16 files changed, 60 insertions(+), 51 deletions(-)

New commits:
commit 6cac364376785bfc82fabf7f9ae82c94d3b2825f
Author: Noel Grandin 
AuthorDate: Wed Jun 22 09:09:57 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 23 08:54:00 2022 +0200

clang-tidy modernize-pass-by-value in l10ntools

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

diff --git a/l10ntools/inc/cfgmerge.hxx b/l10ntools/inc/cfgmerge.hxx
index 12e5cace11f2..a2f59e1e6e8f 100644
--- a/l10ntools/inc/cfgmerge.hxx
+++ b/l10ntools/inc/cfgmerge.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include "po.hxx"
 #include "export.hxx"
@@ -50,8 +51,8 @@ private:
 
 OStringHashMap sText;
 public:
-CfgStackData(const OString &rTag, const OString &rId)
-: sTagType( rTag ), sIdentifier( rId )
+CfgStackData(OString _sTag, OString _sId)
+: sTagType(std::move( _sTag )), sIdentifier(std::move( _sId ))
 {}
 
 const OString &GetTagType() const { return sTagType; }
@@ -145,7 +146,7 @@ protected:
 public:
 CfgExport(
 const OString &rOutputFile,
-const OString &rFilePath
+OString sFilePath
 );
 virtual ~CfgExport() override;
 };
@@ -172,7 +173,7 @@ protected:
 public:
 CfgMerge(
 const OString &rMergeSource, const OString &rOutputFile,
-const OString &rFilename, const OString &rLanguage );
+OString sFilename, const OString &rLanguage );
 virtual ~CfgMerge() override;
 };
 
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index 3f46c552f575..251d059ac2c6 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -54,8 +54,8 @@ typedef std::unordered_map
 class ResData
 {
 public:
-ResData( const OString &rGId );
-ResData( const OString &rGId , const OString &rFilename );
+ResData( OString rGId );
+ResData( OString sGId , OString sFilename );
 
 OString sResTyp;
 OString sId;
diff --git a/l10ntools/inc/helpmerge.hxx b/l10ntools/inc/helpmerge.hxx
index 9420f2356b2f..9da891e6b0f2 100644
--- a/l10ntools/inc/helpmerge.hxx
+++ b/l10ntools/inc/helpmerge.hxx
@@ -44,7 +44,7 @@ private:
 #endif
 
 public:
-HelpParser( const OString &rHelpFile );
+HelpParser( OString sHelpFile );
 
 /// Method append a PO file with the content of a parsed XML file
 /// @PRECOND rHelpFile is valid
diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx
index 7b60e4ff231b..430fdd13936f 100644
--- a/l10ntools/inc/lngmerge.hxx
+++ b/l10ntools/inc/lngmerge.hxx
@@ -50,7 +50,7 @@ private:
 static void WritePO(PoOfstream &aPOStream, OStringHashMap &rText_inout,
 const OString &rActFileName, const OString &rID);
 public:
-LngParser(const OString &rLngFile);
+LngParser(OString sLngFile);
 ~LngParser();
 
 void CreatePO( const OString &rPOFile );
diff --git a/l10ntools/inc/propmerge.hxx b/l10ntools/inc/propmerge.hxx
index 7e9eb594da2a..cc9764cccb06 100644
--- a/l10ntools/inc/propmerge.hxx
+++ b/l10ntools/inc/propmerge.hxx
@@ -30,7 +30,7 @@ private:
 
 public:
 PropParser(
-const OString& rInputFile, const OString& rLang,
+OString sInputFile, OString sLang,
 const bool bMergeMode );
 ~PropParser();
 
diff --git a/l10ntools/inc/treemerge.hxx b/l10ntools/inc/treemerge.hxx
index 8e87188d8b69..7f1a72fc7fe3 100644
--- a/l10ntools/inc/treemerge.hxx
+++ b/l10ntools/inc/treemerge.hxx
@@ -29,7 +29,7 @@ private:
 
 public:
 /// Parse tree file
-TreeParser( const OString& rInputFile, const OString& rLang );
+TreeParser( const OString& rInputFile, OString sLang );
 ~TreeParser();
 
 bool isInitialized() const { return m_bIsInitialized; }
diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx
index 9a8b1e673213..a1fc321c05ec 100644
--- a/l10ntools/inc/xmlparse.hxx
+++ b/l10ntools/inc/xmlparse.hxx
@@ -24,6 +24,8 @@
 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 #include 
@@ -54,10 +56,10 @@ private:
 public:
 /// creates an attribute
 XMLAttribute(
-const OString &rName,// attributes name
-const OS