[Libreoffice-commits] core.git: extras/Module_extras.mk extras/source scp2/source

2020-04-03 Thread andreas kainz (via logerrit)
 dev/null  |binary
 extras/Module_extras.mk   |1 -
 extras/source/gallery/environment/environment.str |2 --
 scp2/source/ooo/file_extra_ooo.scp|1 -
 4 files changed, 4 deletions(-)

New commits:
commit 962b415edb47187737a5f05c4ff3f6724a19c564
Author: andreas kainz 
AuthorDate: Sat Apr 4 00:14:46 2020 +0200
Commit: andreas_kainz 
CommitDate: Sat Apr 4 01:04:26 2020 +0200

tdf#131789 Remove Environment gallery

Change-Id: I3ed3c2be50457b1ace70f62c23e4495483c80bf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91674
Tested-by: Jenkins
Reviewed-by: andreas_kainz 

diff --git a/extras/Module_extras.mk b/extras/Module_extras.mk
index e69cab07c698..63be557a7d9a 100644
--- a/extras/Module_extras.mk
+++ b/extras/Module_extras.mk
@@ -61,7 +61,6 @@ $(eval $(call gb_Module_add_targets,extras,\
Gallery_arrows \
Gallery_backgrounds \
Gallery_diagrams \
-   Gallery_environment \
Gallery_finance \
Gallery_people \
Gallery_symbols \
diff --git a/extras/source/gallery/environment/DrippingFaucet.png 
b/extras/source/gallery/environment/DrippingFaucet.png
deleted file mode 100644
index 4cb5fa5afd08..
Binary files a/extras/source/gallery/environment/DrippingFaucet.png and 
/dev/null differ
diff --git a/extras/source/gallery/environment/Earth.png 
b/extras/source/gallery/environment/Earth.png
deleted file mode 100644
index 841957c424a9..
Binary files a/extras/source/gallery/environment/Earth.png and /dev/null differ
diff --git a/extras/source/gallery/environment/EndangeredAnimals1.png 
b/extras/source/gallery/environment/EndangeredAnimals1.png
deleted file mode 100644
index 2393e9ac6c0f..
Binary files a/extras/source/gallery/environment/EndangeredAnimals1.png and 
/dev/null differ
diff --git a/extras/source/gallery/environment/EndangeredAnimals2.png 
b/extras/source/gallery/environment/EndangeredAnimals2.png
deleted file mode 100644
index 1b2b40887458..
Binary files a/extras/source/gallery/environment/EndangeredAnimals2.png and 
/dev/null differ
diff --git a/extras/source/gallery/environment/GreenCar.png 
b/extras/source/gallery/environment/GreenCar.png
deleted file mode 100644
index 8ac109904000..
Binary files a/extras/source/gallery/environment/GreenCar.png and /dev/null 
differ
diff --git a/extras/source/gallery/environment/GreenFactory.png 
b/extras/source/gallery/environment/GreenFactory.png
deleted file mode 100644
index 7e6a8b4a583f..
Binary files a/extras/source/gallery/environment/GreenFactory.png and /dev/null 
differ
diff --git a/extras/source/gallery/environment/GreenHouse.png 
b/extras/source/gallery/environment/GreenHouse.png
deleted file mode 100644
index 3c4e4d6083be..
Binary files a/extras/source/gallery/environment/GreenHouse.png and /dev/null 
differ
diff --git a/extras/source/gallery/environment/Leaf1.png 
b/extras/source/gallery/environment/Leaf1.png
deleted file mode 100644
index 670a2c989d43..
Binary files a/extras/source/gallery/environment/Leaf1.png and /dev/null differ
diff --git a/extras/source/gallery/environment/Leaf2.png 
b/extras/source/gallery/environment/Leaf2.png
deleted file mode 100644
index 1436feb7c412..
Binary files a/extras/source/gallery/environment/Leaf2.png and /dev/null differ
diff --git a/extras/source/gallery/environment/LightBulb-Flourescent-Off.png 
b/extras/source/gallery/environment/LightBulb-Flourescent-Off.png
deleted file mode 100644
index 9321ee412e45..
Binary files a/extras/source/gallery/environment/LightBulb-Flourescent-Off.png 
and /dev/null differ
diff --git a/extras/source/gallery/environment/LightBulb-Flourescent-On.png 
b/extras/source/gallery/environment/LightBulb-Flourescent-On.png
deleted file mode 100644
index df60a6352a23..
Binary files a/extras/source/gallery/environment/LightBulb-Flourescent-On.png 
and /dev/null differ
diff --git a/extras/source/gallery/environment/LightBulb-Standard-Off1.png 
b/extras/source/gallery/environment/LightBulb-Standard-Off1.png
deleted file mode 100644
index cb9dfe027a40..
Binary files a/extras/source/gallery/environment/LightBulb-Standard-Off1.png 
and /dev/null differ
diff --git a/extras/source/gallery/environment/LightBulb-Standard-Off2.png 
b/extras/source/gallery/environment/LightBulb-Standard-Off2.png
deleted file mode 100644
index bc3b493f14ba..
Binary files a/extras/source/gallery/environment/LightBulb-Standard-Off2.png 
and /dev/null differ
diff --git a/extras/source/gallery/environment/LightBulb-Standard-On.png 
b/extras/source/gallery/environment/LightBulb-Standard-On.png
deleted file mode 100644
index f76e52ffa31e..
Binary files a/extras/source/gallery/environment/LightBulb-Standard-On.png and 
/dev/null differ
diff --git a/extras/source/gallery/environment/Pollution-Car.png 

[Libreoffice-commits] online.git: loleaflet/src

2020-04-03 Thread Tamás Zolnai (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 05752cececa6707ad8edcd2e46b66480209b8ca7
Author: Tamás Zolnai 
AuthorDate: Fri Apr 3 16:50:10 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Sat Apr 4 00:28:30 2020 +0200

mobile: fix type error in cell cursor handler code.

Added in:
9374a2883537d41d6994e5a77fd45bb5fbe9a0d7

getWest and getNorth is a float value, not a pair of values.
We don't need actual subtraction here.

Change-Id: I2ffa964863eefcdb2758e5e920563c31f22b77b8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91646
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index d5aa0c18d..3d3c86bf1 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1070,8 +1070,8 @@ L.TileLayer = L.GridLayer.extend({
}
else if (!this._isEmptyRectangle(this._cellCursor)) {
// This is needed for jumping view to cursor position 
on tab switch
-   horizontalDirection = sign(this._cellCursor.getWest() - 
L.Point(0, 0));
-   verticalDirection = sign(this._cellCursor.getNorth() - 
L.Point(0, 0));
+   horizontalDirection = sign(this._cellCursor.getWest());
+   verticalDirection = sign(this._cellCursor.getNorth());
}
 
var onPgUpDn = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: remove attribute table:cell-range-address at element in ODF 1.4

2020-04-03 Thread Regina Henschel

Hi Eike,

thank you for looking at it.

Eike Rathke schrieb am 02-Apr-20 um 14:50:

Hi Regina,

On Tuesday, 2020-03-31 16:56:59 +0200, Regina Henschel wrote:


Does anyone know, whether there exists a scenario (besides sx* import
filter) where it makes a difference for LibreOffice, whether the attribute
exists or not?


Of the places that  git grep -w XML_CELL_RANGE_ADDRESS   lists there may
be one of interest

xmloff/source/chart/SchXMLImport.cxx
SchXMLImportHelper::GetPlotAreaAttrTokenMap() has

 { XML_NAMESPACE_TABLE,  XML_CELL_RANGE_ADDRESS, 
XML_TOK_PA_CHART_ADDRESS },

XML_TOK_PA_CHART_ADDRESS is used in
xmloff/source/chart/SchXMLPlotAreaContext.cxx
SchXMLPlotAreaContext::StartElement() to set mrChartAddress and
m_rbHasRangeAtPlotArea = true (that both are references, so wherever
used outside..) and m_rbHasRangeAtPlotArea being true _may_ lead to an
internal data provider not being created as a last fallback further
down. >
I don't know of the consequences or how things are later used from there.


I have made some tests. I seems the "normal" charts are currently always 
written with the needed chart:value-cell-range-address attribute of 
 element.


One problem are charts in reports. The report builder has severe 
problems with charts that make testing impossible.


Another problem are pivot charts. But their use of 
table:cell-range-address is faulty anyway. So a rework can use a 
solution without it.


I have put all these into
https://bugs.documentfoundation.org/show_bug.cgi?id=131862

Kind regards
Regina
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: extras/Gallery_education.mk extras/Module_extras.mk extras/source scp2/source

2020-04-03 Thread andreas kainz (via logerrit)
 dev/null  |binary
 extras/Gallery_education.mk   |   28 --
 extras/Module_extras.mk   |1 
 extras/source/gallery/education/education.str |2 -
 scp2/source/ooo/file_extra_ooo.scp|1 
 5 files changed, 32 deletions(-)

New commits:
commit 8b594c7f16fb08b71009b13d5af2e8497fad38c3
Author: andreas kainz 
AuthorDate: Fri Apr 3 21:53:25 2020 +0200
Commit: andreas_kainz 
CommitDate: Fri Apr 3 23:55:32 2020 +0200

tdf#131789 Remove Environment gallery will be available as extension

Change-Id: Ifb27b0999450b0af1659aea14d50b721712c23db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91662
Tested-by: Jenkins
Reviewed-by: andreas_kainz 

diff --git a/extras/Gallery_education.mk b/extras/Gallery_education.mk
deleted file mode 100644
index 2697a1cbfb0e..
--- a/extras/Gallery_education.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Gallery_Gallery,education,extras/source/gallery/education))
-
-$(eval $(call 
gb_Gallery_add_files,education,$(LIBO_SHARE_FOLDER)/gallery/education,\
-   extras/source/gallery/education/Blackboard.png \
-   extras/source/gallery/education/Books.png \
-   extras/source/gallery/education/Chalk.png \
-   extras/source/gallery/education/Globe.png \
-   extras/source/gallery/education/Glue.png \
-   extras/source/gallery/education/GraduationCap.png \
-   extras/source/gallery/education/Microscope.png \
-   extras/source/gallery/education/Notebook.png \
-   extras/source/gallery/education/PaperClip-Blue.png \
-   extras/source/gallery/education/PaperClip-Red.png \
-   extras/source/gallery/education/Pencil.png \
-   extras/source/gallery/education/Ruler.png \
-   extras/source/gallery/education/TestTubes.png \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/extras/Module_extras.mk b/extras/Module_extras.mk
index 9e7481bb1ce4..e69cab07c698 100644
--- a/extras/Module_extras.mk
+++ b/extras/Module_extras.mk
@@ -61,7 +61,6 @@ $(eval $(call gb_Module_add_targets,extras,\
Gallery_arrows \
Gallery_backgrounds \
Gallery_diagrams \
-   Gallery_education \
Gallery_environment \
Gallery_finance \
Gallery_people \
diff --git a/extras/source/gallery/education/Blackboard.png 
b/extras/source/gallery/education/Blackboard.png
deleted file mode 100644
index 7c8fead7e1bd..
Binary files a/extras/source/gallery/education/Blackboard.png and /dev/null 
differ
diff --git a/extras/source/gallery/education/Books.png 
b/extras/source/gallery/education/Books.png
deleted file mode 100644
index c57884fff5e9..
Binary files a/extras/source/gallery/education/Books.png and /dev/null differ
diff --git a/extras/source/gallery/education/Chalk.png 
b/extras/source/gallery/education/Chalk.png
deleted file mode 100644
index c0af9e0b47ef..
Binary files a/extras/source/gallery/education/Chalk.png and /dev/null differ
diff --git a/extras/source/gallery/education/Globe.png 
b/extras/source/gallery/education/Globe.png
deleted file mode 100644
index bd14965ce624..
Binary files a/extras/source/gallery/education/Globe.png and /dev/null differ
diff --git a/extras/source/gallery/education/Glue.png 
b/extras/source/gallery/education/Glue.png
deleted file mode 100644
index 2c8776542680..
Binary files a/extras/source/gallery/education/Glue.png and /dev/null differ
diff --git a/extras/source/gallery/education/GraduationCap.png 
b/extras/source/gallery/education/GraduationCap.png
deleted file mode 100644
index 6d048685138f..
Binary files a/extras/source/gallery/education/GraduationCap.png and /dev/null 
differ
diff --git a/extras/source/gallery/education/Microscope.png 
b/extras/source/gallery/education/Microscope.png
deleted file mode 100644
index c6dfba02dd8b..
Binary files a/extras/source/gallery/education/Microscope.png and /dev/null 
differ
diff --git a/extras/source/gallery/education/Notebook.png 
b/extras/source/gallery/education/Notebook.png
deleted file mode 100644
index d2cdbf4798df..
Binary files a/extras/source/gallery/education/Notebook.png and /dev/null differ
diff --git a/extras/source/gallery/education/PaperClip-Blue.png 
b/extras/source/gallery/education/PaperClip-Blue.png
deleted file mode 100644
index 6d0d3f6a1c91..
Binary files a/extras/source/gallery/education/PaperClip-Blue.png and /dev/null 
differ
diff --git a/extras/source/gallery/education/PaperClip-Red.png 
b/extras/source/gallery/education/PaperClip-Red.png
deleted file mode

[Libreoffice-commits] online.git: ios/Mobile

2020-04-03 Thread Tor Lillqvist (via logerrit)
 ios/Mobile/AppDelegate.mm   |2 +-
 ios/Mobile/CODocument.h |2 +-
 ios/Mobile/CODocument.mm|6 +++---
 ios/Mobile/DocumentBrowserViewController.mm |4 ++--
 ios/Mobile/DocumentViewController.h |4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 95de5a74cce717cda5e1819761eead8e908b3dcf
Author: Tor Lillqvist 
AuthorDate: Sat Apr 4 00:04:20 2020 +0300
Commit: Tor Lillqvist 
CommitDate: Sat Apr 4 00:07:35 2020 +0300

Rename our Objective-C Document class to CODocument

There are already several classes called Document on the C++ side.
Let's reduce confusion a bit. (Also, we might need to use the
Objective-C Document class from some of the Online C++ code (which is
actually compiled as Objective-C++).)

Change-Id: I34347ba0161c067b14bb125c3410eefd89bbca31

diff --git a/ios/Mobile/AppDelegate.mm b/ios/Mobile/AppDelegate.mm
index 50f323883..074230ff8 100644
--- a/ios/Mobile/AppDelegate.mm
+++ b/ios/Mobile/AppDelegate.mm
@@ -21,8 +21,8 @@
 #import "ios.h"
 #import "AppDelegate.h"
 #import "DocumentBrowserViewController.h"
+#import "CODocument.h"
 #import "DocumentViewController.h"
-#import "Document.h"
 
 #import "FakeSocket.hpp"
 #import "Kit.hpp"
diff --git a/ios/Mobile/Document.h b/ios/Mobile/CODocument.h
similarity index 95%
rename from ios/Mobile/Document.h
rename to ios/Mobile/CODocument.h
index a843dc7f1..82e2e80e3 100644
--- a/ios/Mobile/Document.h
+++ b/ios/Mobile/CODocument.h
@@ -15,7 +15,7 @@
 
 @class DocumentViewController;
 
-@interface Document : UIDocument {
+@interface CODocument : UIDocument {
 @public
 int fakeClientFd;
 }
diff --git a/ios/Mobile/Document.mm b/ios/Mobile/CODocument.mm
similarity index 96%
rename from ios/Mobile/Document.mm
rename to ios/Mobile/CODocument.mm
index 3dba318d4..0a08d59f8 100644
--- a/ios/Mobile/Document.mm
+++ b/ios/Mobile/CODocument.mm
@@ -22,7 +22,7 @@
 
 #import "ios.h"
 #import "AppDelegate.h"
-#import "Document.h"
+#import "CODocument.h"
 #import "DocumentViewController.h"
 
 #import "ClientSession.hpp"
@@ -34,7 +34,7 @@
 #import "LOOLWSD.hpp"
 #import "Protocol.hpp"
 
-@implementation Document
+@implementation CODocument
 
 - (id)contentsForType:(NSString*)typeName error:(NSError **)errorPtr {
 // Somehow this doesn't feel right, creating an NSFileWrapper around the 
file that was given to
@@ -49,7 +49,7 @@
 
 - (BOOL)loadFromContents:(id)contents ofType:(NSString *)typeName 
error:(NSError **)errorPtr {
 
-// If this method is called a second time on the same Document object, 
just ignore it. This
+// If this method is called a second time on the same CODocument object, 
just ignore it. This
 // seems to happen occastionally when the device is awakened after sleep. 
See tdf#122543.
 if (fakeClientFd >= 0)
 return YES;
diff --git a/ios/Mobile/DocumentBrowserViewController.mm 
b/ios/Mobile/DocumentBrowserViewController.mm
index bea28774a..92a9dedf0 100644
--- a/ios/Mobile/DocumentBrowserViewController.mm
+++ b/ios/Mobile/DocumentBrowserViewController.mm
@@ -9,8 +9,8 @@
 #import "config.h"
 
 #import "AppDelegate.h"
+#import "CODocument.h"
 #import "DocumentBrowserViewController.h"
-#import "Document.h"
 #import "DocumentViewController.h"
 #import "TemplateCollectionViewController.h"
 
@@ -67,7 +67,7 @@
 - (void)presentDocumentAtURL:(NSURL *)documentURL {
 UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" 
bundle:nil];
 DocumentViewController *documentViewController = [storyBoard 
instantiateViewControllerWithIdentifier:@"DocumentViewController"];
-documentViewController.document = [[Document alloc] 
initWithFileURL:documentURL];
+documentViewController.document = [[CODocument alloc] 
initWithFileURL:documentURL];
 documentViewController.document->fakeClientFd = -1;
 documentViewController.document.viewController = documentViewController;
 [self presentViewController:documentViewController animated:YES 
completion:nil];
diff --git a/ios/Mobile/DocumentViewController.h 
b/ios/Mobile/DocumentViewController.h
index 1f443b206..297255999 100644
--- a/ios/Mobile/DocumentViewController.h
+++ b/ios/Mobile/DocumentViewController.h
@@ -9,11 +9,11 @@
 #import 
 #import 
 
-#import "Document.h"
+#import "CODocument.h"
 
 @interface DocumentViewController : UIViewController
 
-@property (strong) Document *document;
+@property (strong) CODocument *document;
 @property (strong) WKWebView *webView;
 @property (strong) WKWebView *slideshowWebView;
 @property std::string slideshowFile;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: extras/Package_gallmytheme.mk extras/source

2020-04-03 Thread andreas kainz (via logerrit)
 extras/Package_gallmytheme.mk   |3 +++
 extras/source/gallery/gallery_mytheme/flowchart.sdg |binary
 extras/source/gallery/gallery_mytheme/flowchart.sdv |binary
 extras/source/gallery/gallery_mytheme/flowchart.thm |binary
 4 files changed, 3 insertions(+)

New commits:
commit 279ffdbdf0344d5f2d92fdc719d8b0abd8606129
Author: andreas kainz 
AuthorDate: Fri Apr 3 22:20:36 2020 +0200
Commit: andreas_kainz 
CommitDate: Fri Apr 3 23:16:20 2020 +0200

tdf#99674 Add Flowchart gallery

Change-Id: Ia7304b2a58d5da9fe559902b64accc3eaa57262c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91663
Tested-by: Jenkins
Reviewed-by: andreas_kainz 

diff --git a/extras/Package_gallmytheme.mk b/extras/Package_gallmytheme.mk
index fdc180415e0b..b689df1fdf65 100644
--- a/extras/Package_gallmytheme.mk
+++ b/extras/Package_gallmytheme.mk
@@ -15,4 +15,7 @@ $(eval $(call 
gb_Package_add_files,extras_gallmytheme,$(LIBO_SHARE_PRESETS_FOLDE
bpmn.sdg \
bpmn.sdv \
bpmn.thm \
+   flowchart.sdg \
+   flowchart.sdv \
+   flowchart.thm \
 ))
diff --git a/extras/source/gallery/gallery_mytheme/flowchart.sdg 
b/extras/source/gallery/gallery_mytheme/flowchart.sdg
new file mode 100644
index ..c3d82bbdba7d
Binary files /dev/null and 
b/extras/source/gallery/gallery_mytheme/flowchart.sdg differ
diff --git a/extras/source/gallery/gallery_mytheme/flowchart.sdv 
b/extras/source/gallery/gallery_mytheme/flowchart.sdv
new file mode 100644
index ..14f373501efc
Binary files /dev/null and 
b/extras/source/gallery/gallery_mytheme/flowchart.sdv differ
diff --git a/extras/source/gallery/gallery_mytheme/flowchart.thm 
b/extras/source/gallery/gallery_mytheme/flowchart.thm
new file mode 100644
index ..16d304022144
Binary files /dev/null and 
b/extras/source/gallery/gallery_mytheme/flowchart.thm differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Caolán McNamara (via logerrit)
 oox/source/export/chartexport.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit b9867f8b884ae8870a71b61e36f23eda91987e2a
Author: Caolán McNamara 
AuthorDate: Fri Apr 3 19:02:43 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 3 22:14:16 2020 +0200

crashtesting: mismatched start/end tag assert on reexport of 
tdf113187-1.pptx

since...

commit 86be3422cd55fa9e44104f1628648061bb6a3495
Date:   Wed Dec 18 16:46:36 2019 +0100

tdf#129857 Chart OOXML export: fix deleted legend entries

The legend showed deleted legend entries too after export.

the bare return leaves a start inserted, but no end

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

diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index d6eaac8eedb2..ba0fdb3c94fd 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1088,8 +1088,6 @@ void ChartExport::exportLegend( const Reference< 
css::chart::XChartDocument >& x
 // legendEntry
 Reference 
xCooSysContainer(mxNewDiagram, UNO_QUERY_THROW);
 const Sequence> 
xCooSysSequence(xCooSysContainer->getCoordinateSystems());
-if (!xCooSysSequence.hasElements())
-return;
 
 sal_Int32 nIndex = 0;
 bool bShowLegendEntry;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: uitest/writer_tests4

2020-04-03 Thread Xisco Fauli (via logerrit)
 uitest/writer_tests4/insertTableDialog.py |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 870314d155d37d6ad110aaaeb8ba2efa41446d5b
Author: Xisco Fauli 
AuthorDate: Fri Apr 3 13:55:57 2020 +0200
Commit: Xisco Faulí 
CommitDate: Fri Apr 3 20:45:07 2020 +0200

uitest: add asserts to table dialog

Change-Id: Id44531def1a0b6e7c0ab5686ed651633ccb502b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91655
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/uitest/writer_tests4/insertTableDialog.py 
b/uitest/writer_tests4/insertTableDialog.py
index ff9e3349943a..0cb020d19da0 100644
--- a/uitest/writer_tests4/insertTableDialog.py
+++ b/uitest/writer_tests4/insertTableDialog.py
@@ -6,6 +6,7 @@
 
 from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
 
 class WriterInsertTableDialog(UITestCase):
 
@@ -29,6 +30,10 @@ class WriterInsertTableDialog(UITestCase):
 xRowSpin.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
 xRowSpin.executeAction("TYPE", mkPropertyValues({"TEXT": str(rows)}))
 
+self.assertEqual(get_state_as_dict(xNameEdit)["Text"], name)
+self.assertEqual(get_state_as_dict(xColSpin)["Text"], str(cols))
+self.assertEqual(get_state_as_dict(xRowSpin)["Text"], str(rows))
+
 xOkBtn = xDialog.getChild("ok")
 xOkBtn.executeAction("CLICK", tuple())
 
@@ -83,13 +88,17 @@ class WriterInsertTableDialog(UITestCase):
 
 self.ui_test.close_doc()
 
-def test_cancel_button_insert_line_break_dialog(self):
+def test_cancel_button_insert_table_dialog(self):
 self.ui_test.create_doc_in_start_center("writer")
 self.ui_test.execute_dialog_through_command(".uno:InsertTable")
 Dialog = self.xUITest.getTopFocusWindow()
 CancelBtn = Dialog.getChild("cancel")
 self.ui_test.close_dialog_through_button(CancelBtn)
 
+document = self.ui_test.get_component()
+tables = document.getTextTables()
+self.assertEqual(len(tables), 0)
+
 self.ui_test.close_doc()
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Caolán McNamara (via logerrit)
 vcl/source/graphic/Manager.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 6fa2891da4852716fe62d925ffdbeeb380a2ed66
Author: Caolán McNamara 
AuthorDate: Fri Apr 3 16:35:36 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 3 20:02:07 2020 +0200

crashtesting: crash on reexport of tdf118346-1.odg to odg

make a copy of m_pImpGraphicList because if we swap out a svg, the svg 
filter
may create more temp Graphics which are auto-added to m_pImpGraphicList
invalidating a loop over m_pImpGraphicList

 #0  0x70d25ae5 in vcl::graphic::Manager::reduceGraphicMemory() 
(this=0x71bc4760 )
at vcl/source/graphic/Manager.cxx:88
 #1  0x70d25ee9 in 
vcl::graphic::Manager::registerGraphic(std::shared_ptr const&, 
rtl::OUString const&)
(this=0x71bc4760 , 
pImpGraphic=std::shared_ptr (use count 1, weak count 0) = {...})
at vcl/source/graphic/Manager.cxx:139
 #2  0x70d26406 in vcl::graphic::Manager::newInstance() 
(this=0x71bc4760 )
at vcl/source/graphic/Manager.cxx:184
 #3  0x70b6735c in Graphic::Graphic() (this=0x7fff84f0) at 
vcl/source/gdi/graph.cxx:182
 #4  0x7fffdc526600 in 
svgio::svgreader::SvgImageNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x56817940, rTarget=...) at 
svgio/source/svgreader/svgimagenode.cxx:219
 #5  0x7fffdc52e75d in 
svgio::svgreader::SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a6a93d0, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svgnode.cxx:529
 #6  0x7fffdc522339 in 
svgio::svgreader::SvgGNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a6a93d0, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svggnode.cxx:106
 #7  0x7fffdc52e75d in 
svgio::svgreader::SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a6a9070, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svgnode.cxx:529
 #8  0x7fffdc522339 in 
svgio::svgreader::SvgGNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a6a9070, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svggnode.cxx:106
 #9  0x7fffdc52e75d in 
svgio::svgreader::SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a5f9150, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svgnode.cxx:529
 #10 0x7fffdc54d19f in 
svgio::svgreader::SvgSvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a5f9150, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svgsvgnode.cxx:304
 #11 0x7fffdc571373 in svgio::svgreader::(anonymous 
namespace)::XSvgParser::getDecomposition(com::sun::star::uno::Reference
 const&, rtl::OUString const&) (this=0x5a69c6d0, xSVGStream=uno::Reference 
to (comphelper::SequenceInputStream *) 0x57480668, aAbsolutePath="")
at svgio/source/svguno/xsvgparser.cxx:160
 #12 0x70cf849b in VectorGraphicData::ensureSequenceAndRange() 
(this=0x56ea7540)
at vcl/source/gdi/vectorgraphicdata.cxx:196
 #13 0x70cf9124 in VectorGraphicData::getRange() const 
(this=0x56ea7540)
at vcl/source/gdi/vectorgraphicdata.cxx:323
 #14 0x70b74da7 in ImpGraphic::ImplGetPrefSize() const 
(this=0x588b00f0) at vcl/source/gdi/impgraph.cxx:778
 #15 0x70b76623 in ImpGraphic::ImplWriteEmbedded(SvStream&) 
(this=0x588b00f0, rOStm=...)
at vcl/source/gdi/impgraph.cxx:1235
 #16 0x70b770a1 in ImpGraphic::ImplSwapOut(SvStream*) 
(this=0x588b00f0, xOStm=0x5826b7d0)
at vcl/source/gdi/impgraph.cxx:1377
 #17 0x70b76bdb in ImpGraphic::ImplSwapOut() (this=0x588b00f0) 
at vcl/source/gdi/impgraph.cxx:1328
 #18 0x70d25c88 in vcl::graphic::Manager::reduceGraphicMemory() 
(this=0x71bc4760 )
at vcl/source/graphic/Manager.cxx:107
 #19 0x70d25ee9 in 
vcl::graphic::Manager::registerGraphic(std::shared_ptr const&, 
rtl::OUString const&)
(this=0x71bc4760 , 
pImpGraphic=std::shared_ptr (use count 1, weak count 0) = {...})
at vcl/source/graphic/Manager.cxx:139
 #20 0x70d26406 in vcl::graphic::Manager::newInstance() 
(this=0x71bc4760 )
at vcl/source/graphic/Manager.cxx:184
 #21 0x70b6735c in Graphic::Graphic() (this=0x56d5ea68) at 
vcl/source/gdi/graph.cxx:182

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

diff --git a/vcl/source/graphic/Manager.cxx b/vcl/source

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

2020-04-03 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/uiwriter/uiwriter3.cxx   |   75 ++
 uitest/writer_tests4/insertTableDialog.py |   35 --
 2 files changed, 75 insertions(+), 35 deletions(-)

New commits:
commit 820a5155973fef28891c7cc9f9547c21b0f2bf1a
Author: Xisco Fauli 
AuthorDate: Fri Apr 3 13:12:51 2020 +0200
Commit: Xisco Faulí 
CommitDate: Fri Apr 3 19:59:47 2020 +0200

tdf#80663, tdf#96067: move UItest to CppunitTest

Change-Id: I1af2de672db7124faec473202ce858ec292a2c6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91654
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 0a7d61695821..49e60f6bc0d9 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -11,6 +11,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace
 {
@@ -342,4 +343,78 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130680)
 //dispatchCommand(mxComponent, ".uno:Undo", {});
 //CPPUNIT_ASSERT_EQUAL(sal_Int32(23), xIndexAccess->getCount());
 }
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf80663)
+{
+mxComponent = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+
+uno::Sequence aArgs(comphelper::InitPropertySequence(
+{ { "Rows", uno::makeAny(sal_Int32(2)) }, { "Columns", 
uno::makeAny(sal_Int32(2)) } }));
+
+dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+Scheduler::ProcessEventsToIdle();
+
+uno::Reference xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+uno::Reference xTextTable(xIndexAccess->getByIndex(0), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getRows()->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
+
+dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTextTable->getRows()->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
+
+dispatchCommand(mxComponent, ".uno:Undo", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getRows()->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf96067)
+{
+mxComponent = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+
+uno::Sequence aArgs(comphelper::InitPropertySequence(
+{ { "Rows", uno::makeAny(sal_Int32(3)) }, { "Columns", 
uno::makeAny(sal_Int32(3)) } }));
+
+dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+Scheduler::ProcessEventsToIdle();
+
+uno::Reference xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+uno::Reference xTextTable(xIndexAccess->getByIndex(0), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getRows()->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getColumns()->getCount());
+
+dispatchCommand(mxComponent, ".uno:SelectTable", {});
+dispatchCommand(mxComponent, ".uno:InsertRowsBefore", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xTextTable->getRows()->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getColumns()->getCount());
+
+dispatchCommand(mxComponent, ".uno:Undo", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getRows()->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getColumns()->getCount());
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uitest/writer_tests4/insertTableDialog.py 
b/uitest/writer_tests4/insertTableDialog.py
index 60d427954a4c..ff9e3349943a 100644
--- a/uitest/writer_tests4/insertTableDialog.py
+++ b/uitest/writer_tests4/insertTableDialog.py
@@ -44,41 +44,6 @@ class WriterInsertTableDialog(UITestCase):
 tableText = table.getCellByName( cellName )
 tableText.setString( text )
 
-de

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sw/qa sw/source writerfilter/source

2020-04-03 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/data/arabic-zero3-numbering.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx|   13 +
 sw/source/filter/ww8/docxattributeoutput.cxx  |   34 +++---
 sw/source/filter/ww8/docxexport.cxx   |3 +
 writerfilter/source/dmapper/ConversionHelper.cxx  |   12 
 writerfilter/source/dmapper/ConversionHelper.hxx  |1 
 writerfilter/source/dmapper/NumberingManager.cxx  |   25 +-
 writerfilter/source/dmapper/NumberingManager.hxx  |3 +
 8 files changed, 83 insertions(+), 8 deletions(-)

New commits:
commit 6ce8e5ac1425f4a5dd8e1d46d97d060a5bb4784f
Author: Miklos Vajna 
AuthorDate: Thu Mar 19 17:54:26 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 19:21:57 2020 +0200

sw pad-to-3 numbering: add DOCX filter

There is no NS_ooxml::LN_Value_ST_NumberFormat_foo code for this on the
import side, rather the number format code is set to
NS_ooxml::LN_Value_ST_NumberFormat_custom, then a separate
NS_ooxml::LN_CT_NumFmt_format contains the number format string.

Declare w14 as an XML namespace on the export side, even if we write no
 elements. This is needed by ,
which refers to an XML namespace in the OOXML markup. (Interestingly
officeotron doesn't check for this, though.)

(cherry picked from commit 52ed1091be05d5a07a021403095c52f0f3986ed6)

Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
sw/source/filter/ww8/docxattributeoutput.cxx
sw/source/filter/ww8/docxexport.cxx

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

diff --git a/sw/qa/extras/ooxmlexport/data/arabic-zero3-numbering.docx 
b/sw/qa/extras/ooxmlexport/data/arabic-zero3-numbering.docx
new file mode 100644
index ..bd95186a6091
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/arabic-zero3-numbering.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index f40d0cf0a111..a4ad95ff7901 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -613,6 +613,19 @@ CPPUNIT_TEST_FIXTURE(Test, testChicagoNumberingFootnote)
 assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:footnotePr/w:numFmt", 
"val", "chicago");
 }
 
+DECLARE_ODFEXPORT_TEST(testArabicZero3Numbering, "arabic-zero3-numbering.docx")
+{
+auto xNumberingRules
+= 
getProperty>(getParagraph(1), 
"NumberingRules");
+comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 65
+// - Actual  : 4
+// i.e. numbering type was ARABIC, not ARABIC_ZERO3.
+
CPPUNIT_ASSERT_EQUAL(static_cast(style::NumberingType::ARABIC_ZERO3),
+ aMap["NumberingType"].get());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index f17af3b3544f..9ae8d551668e 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6439,7 +6439,7 @@ static OString impl_NumberingType( sal_uInt16 
nNumberingType )
 }
 
 // Converting Level Numbering Format Code to string
-static OString impl_LevelNFC( sal_uInt16 nNumberingType , const SfxItemSet 
*pOutSet)
+static OString impl_LevelNFC(sal_uInt16 nNumberingType, const SfxItemSet* 
pOutSet, OString& rFormat)
 {
 OString aType;
 
@@ -6492,6 +6492,10 @@ static OString impl_LevelNFC( sal_uInt16 nNumberingType 
, const SfxItemSet *pOut
 case style::NumberingType::TEXT_ORDINAL: aType="ordinalText"; break;
 case style::NumberingType::SYMBOL_CHICAGO: aType="chicago"; break;
 case style::NumberingType::ARABIC_ZERO: aType = "decimalZero"; break;
+case style::NumberingType::ARABIC_ZERO3:
+aType = "custom";
+rFormat = "001, 002, 003, ...";
+break;
 /*
 Fallback the rest to decimal.
 case style::NumberingType::NATIVE_NUMBERING:
@@ -6849,12 +6853,32 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 
nLevel,
 FSEND );
 }
 // format
-OString aFormat( impl_LevelNFC( nNumberingType ,pOutSet) );
+OString aCustomFormat;
+OString aFormat(impl_LevelNFC(nNumberingType, pOutSet, aCustomFormat));
 
 if ( !aFormat.isEmpty() )
-m_pSerializer->singleElementNS( XML_w, XML_numFmt,
-FSNS( XML_w, XML_val ), aFormat.getStr(),
-FSEND );
+{
+if (aCustomFormat.isEmpty())
+{
+m_pSerializer->singleElementNS( XML_w, XML_numFmt,
+FSNS( XM

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - i18npool/qa i18npool/source include/editeng offapi/com

2020-04-03 Thread Miklos Vajna (via logerrit)
 i18npool/qa/cppunit/test_defaultnumberingprovider.cxx |   29 
++
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |4 +
 include/editeng/svxenum.hxx   |1 
 offapi/com/sun/star/style/NumberingType.idl   |7 ++
 4 files changed, 41 insertions(+)

New commits:
commit 409d7bba96b194080791e12ed15290b5c3adedd4
Author: Miklos Vajna 
AuthorDate: Fri Mar 20 13:38:45 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 19:22:18 2020 +0200

sw pad-to-4 numbering: add doc model, UNO API and layout

This is the actual numbering the customer needed, pad-to-2 and pad-to-3
was added just for compleness (since Word has it and it's related).

(cherry picked from commit fcef4857e042ff3c9dd8a6c60cf1a58e07f3224c)

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

diff --git a/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx 
b/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx
index 4418a283de2b..e5991ee6461d 100644
--- a/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx
+++ b/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx
@@ -81,6 +81,35 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, 
testArabicZero3)
 CPPUNIT_ASSERT_EQUAL(OUString("100"), aActual);
 }
 
+CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero4)
+{
+uno::Reference xComponentContext
+= comphelper::getComponentContext(getMultiServiceFactory());
+
+// 100 -> "0100"
+uno::Reference xFormatter(
+text::DefaultNumberingProvider::create(xComponentContext), 
uno::UNO_QUERY);
+uno::Sequence aProperties = {
+comphelper::makePropertyValue("NumberingType",
+  
static_cast(style::NumberingType::ARABIC_ZERO4)),
+comphelper::makePropertyValue("Value", static_cast(100)),
+};
+lang::Locale aLocale;
+OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
+// Without the accompanying fix in place, this test would have failed with 
a
+// lang.IllegalArgumentException, support for ARABIC_ZERO4 was missing.
+CPPUNIT_ASSERT_EQUAL(OUString("0100"), aActual);
+
+// 1000 -> "1000"
+aProperties = {
+comphelper::makePropertyValue("NumberingType",
+  
static_cast(style::NumberingType::ARABIC_ZERO4)),
+comphelper::makePropertyValue("Value", static_cast(1000)),
+};
+aActual = xFormatter->makeNumberingString(aProperties, aLocale);
+CPPUNIT_ASSERT_EQUAL(OUString("1000"), aActual);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 85b0b55bcc00..0cb55a04b701 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -947,6 +947,10 @@ DefaultNumberingProvider::makeNumberingString( const 
Sequencehttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - writerfilter/source

2020-04-03 Thread Miklos Vajna (via logerrit)
 writerfilter/source/dmapper/DomainMapper.cxx  |   43 +-
 writerfilter/source/dmapper/NumberingManager.cxx  |   21 +++-
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |1 
 writerfilter/source/ooxml/model.xml   |   10 +++-
 writerfilter/source/rtftok/rtfdispatchflag.cxx|   23 ++---
 writerfilter/source/rtftok/rtfdispatchvalue.cxx   |   11 ++--
 6 files changed, 89 insertions(+), 20 deletions(-)

New commits:
commit 1b03ca23961c5661adfbcae5fe705001d649ea30
Author: Miklos Vajna 
AuthorDate: Mon Mar 16 13:45:20 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 19:21:35 2020 +0200

DOCX import: declare w14 as a supported feature

This is needed (but not enough) to support markup like this:

  

  


  

  

Change-Id: I598b0452b5d29624ed0a6795682c29a09fd0dcfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90564
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit b0887393ceb0bf283841fe212baf5be3571782b9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91635
Tested-by: Jenkins CollaboraOffice 

diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx 
b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index be825d2f01d3..906320088987 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -116,6 +116,7 @@ bool OOXMLFastContextHandler::prepareMceContext(Token_t 
nElement, const uno::Ref
 static const char* aFeatures[] = {
 "wps",
 "wpg",
+"w14",
 };
 for (const char *p : aFeatures)
 {
commit e677f2724c9a6838f90542881457029eaffc11cd
Author: Miklos Vajna 
AuthorDate: Mon Mar 16 17:25:31 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 19:21:20 2020 +0200

DOCX import: tokenize 

Which means CT_NumFmt has to be a property resource, not a single value,
and also ST_NumberFormat needs to recognize "custom" as a valid value.

Adapt the RTF tokenizer to emit the new token format.

This is needed (but not enough) to support markup like this:



(cherry picked from commit 496197fe4dff2cd94ceeb42fc04d0263ac8d8971)

Conflicts:
writerfilter/source/rtftok/rtfdispatchflag.cxx
writerfilter/source/rtftok/rtfdispatchvalue.cxx

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

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 9e3080927a96..6c7af1c34b04 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1159,6 +1159,37 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
 m_pImpl->startOrEndPermissionRange(nIntValue);
 break;
 }
+case NS_ooxml::LN_CT_NumFmt_val:
+{
+try
+{
+uno::Reference xFtnEdnSettings;
+if (m_pImpl->IsInFootnoteProperties())
+{
+uno::Reference 
xFootnotesSupplier(
+m_pImpl->GetTextDocument(), uno::UNO_QUERY);
+if (xFootnotesSupplier.is())
+xFtnEdnSettings = 
xFootnotesSupplier->getFootnoteSettings();
+}
+else
+{
+uno::Reference xEndnotesSupplier(
+m_pImpl->GetTextDocument(), uno::UNO_QUERY);
+if (xEndnotesSupplier.is())
+xFtnEdnSettings = 
xEndnotesSupplier->getEndnoteSettings();
+}
+if (xFtnEdnSettings.is())
+{
+sal_Int16 nNumType = 
ConversionHelper::ConvertNumberingType(nIntValue);
+
xFtnEdnSettings->setPropertyValue(getPropertyName(PROP_NUMBERING_TYPE),
+  uno::makeAny(nNumType));
+}
+}
+catch (const uno::Exception&)
+{
+}
+}
+break;
 default:
 SAL_WARN("writerfilter", "DomainMapper::lcl_attribute: unhandled 
token: " << nName);
 }
@@ -2221,10 +2252,18 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
 //endnotes in word can be at section end or document end - writer supports 
only the latter
 // -> so this property can be ignored
 break;
-case NS_ooxml::LN_EG_FtnEdnNumProps_numStart:
-case NS_ooxml::LN_EG_FtnEdnNumProps_numRestart:
 case NS_ooxml::LN_CT_FtnProps_numFmt:
 

[Libreoffice-commits] online.git: wsd/Auth.cpp

2020-04-03 Thread Miklos Vajna (via logerrit)
 wsd/Auth.cpp |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit fe1399fab5bc649a97b7124314210a6d0cc195f9
Author: Miklos Vajna 
AuthorDate: Fri Apr 3 18:01:44 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 19:20:01 2020 +0200

JWTAuth::verify: avoid working with RTTI without a reason

The purpose of the convert() function (without arguments) is to either
return fast in case the type of the JSON value and the argument match or
do a conversion.

We generate this JSON, so we know the JSON type will be always a string
and the argument type will be a size_t, so use the variant that always
does a conversion.

(Additional benefit is that I seem to hit a false alarm with
admin_fuzzer in the old code and it goes away with this change.)

Change-Id: I40851ab3ddd46fb1515ea9f0c9f40d9ec2006de7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91652
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/wsd/Auth.cpp b/wsd/Auth.cpp
index a5f1a9fd0..8c53c367c 100644
--- a/wsd/Auth.cpp
+++ b/wsd/Auth.cpp
@@ -148,7 +148,8 @@ bool JWTAuth::verify(const std::string& accessToken)
 Poco::JSON::Parser parser;
 Poco::Dynamic::Var result = parser.parse(decodedPayload);
 Poco::JSON::Object::Ptr object = 
result.extract();
-std::time_t decodedExptime = object->get("exp").convert();
+std::time_t decodedExptime = 0;
+object->get("exp").convert(decodedExptime);
 
 std::chrono::system_clock::time_point now = 
std::chrono::system_clock::now();
 std::time_t curtime = std::chrono::system_clock::to_time_t(now);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Noel Grandin (via logerrit)
 writerfilter/source/dmapper/StyleSheetTable.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a9a397eeece146b1ea8e12be50685313ea1f14d8
Author: Noel Grandin 
AuthorDate: Fri Apr 3 14:21:17 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 3 18:54:39 2020 +0200

fix wrong variable checked in AddTblStylePr

regression from
commit 4c3ba3a413be7339115ea5e6edc825a8434cd345
Date:   Sat Jul 26 17:17:27 2014 +0100
fdo#75757: Remove inheritance from std::map.
found by my new unusedvariableplus loplugin

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

diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx 
b/writerfilter/source/dmapper/StyleSheetTable.cxx
index f3dfe000c55b..864149a66cb4 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -118,7 +118,7 @@ void TableStyleSheetEntry::AddTblStylePr( TblStyleType 
nType, const PropertyMapP
 PropertyIds nInsideProp = ( i < 2 ) ? META_PROP_HORIZONTAL_BORDER 
: META_PROP_VERTICAL_BORDER;
 std::optional pInside = 
pProps->getProperty(nInsideProp);
 
-if ( pChecked && pProps )
+if ( pChecked && pInside )
 {
 // In this case, remove the inside border
 pProps->Erase( nInsideProp );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Linux SAL_USE_VCLPLUGIN=svp and the clipboard

2020-04-03 Thread Jan-Marek Glogowski
Am 03.04.20 um 17:09 schrieb Stephan Bergmann:
> It is not clear to me what the intended behavior of
> SalInstance::CreateClipboard is, and thus how the two tests (and the
> expected tiledrendering behavior that
> ScTiledRenderingTest::testMultiViewCopyPaste apparently tests?) should
> be fixed.

I was thinking about this, when we were talking about clipboard on IRC a
few days ago.

LO has three use cases for a clipboard:

1. "normal" LO usage, where the clipboard maps to the system clipboard
and is a system-wide shared resource (all backends, except svp). Works
as expected.

2. headless LO test usage, where it probably would make sense to have
one abstract clipboard per LO instance.

3. LO online, where you want a clipboard per user in the best case, or a
never shared clipboard, so different users don't share a clipboard.

I did expect back then, that SalInstance::CreateClipboard would also be
a shared instance for LO, with some special handling for LOOL, but I
never checked that.

I guess LOOL works, because of 3. and that every view holds it's own
XTransferable clipboard content on copy. And it "registers" its own
css/datatransfer/clipboard/XClipboardOwner.idl when it sets the
clipboard by setting the context.

So the view sets the clipboard and is informed, if it loses the
clipboard. With the non-shared instances, you never lose the clipboard,
so you don't need to check it for changed content on paste, as you're
the sole possible owner and paste in LOOL works fine.

Or there must be some comphelper::LibreOfficeKit::isActive() handling
somewhere in all modules, as Miklos suggested.

And as you realized, UItest running without the SVP backend can't
reliably use clipboard functions, as these tests don't run with
--headless. Guess some new environment var or --no-system-clipboard is
needed, if we want to test VCL backends with UI tests together with C'n'P.

Jan-Marek
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-04-03 Thread Noel Grandin (via logerrit)
 vcl/source/filter/ipdf/pdfread.cxx |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 9383baa32182215e071a58dbbb950531b513a47d
Author: Noel Grandin 
AuthorDate: Fri Apr 3 14:59:10 2020 +0200
Commit: Michael Weghorn 
CommitDate: Fri Apr 3 18:36:38 2020 +0200

fix android/non-pdfium build

after
commit 101a9b4a3fcf1fd0a7163dac3a5dcd69431f4fee
Date:   Fri Apr 3 09:36:41 2020 +0200
loplugin:constantparam

Change-Id: Ieabd64498961ddeabdf1d6f09db886c85d881c16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91633
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins

diff --git a/vcl/source/filter/ipdf/pdfread.cxx 
b/vcl/source/filter/ipdf/pdfread.cxx
index b6e4f8936d8c..386ede2d0f42 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -117,11 +117,10 @@ bool getCompatibleStream(SvStream& rInStream, SvStream& 
rOutStream)
 return rOutStream.good();
 }
 #else
-bool getCompatibleStream(SvStream& rInStream, SvStream& rOutStream, sal_uInt64 
nPos,
- sal_uInt64 nSize)
+bool getCompatibleStream(SvStream& rInStream, SvStream& rOutStream)
 {
-rInStream.Seek(nPos);
-rOutStream.WriteStream(rInStream, nSize);
+rInStream.Seek(STREAM_SEEK_TO_BEGIN);
+rOutStream.WriteStream(rInStream, STREAM_SEEK_TO_END);
 return rOutStream.good();
 }
 #endif // HAVE_FEATURE_PDFIUM
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/Makefile.am

2020-04-03 Thread Tamás Zolnai (via logerrit)
 cypress_test/Makefile.am |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4246d1e73a763c7a18d49fa99052281d653528b6
Author: Tamás Zolnai 
AuthorDate: Fri Apr 3 18:05:27 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Apr 3 18:19:33 2020 +0200

cypress: Catch also timout error of the new cypress-wait-until package.

Change-Id: I0b9856bbf933040a107c6cb8fe738d7a9f30a4a1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91653
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index a5a2f30ef..486014cde 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -202,7 +202,7 @@ endef
 define execute_run_parallel
@mkdir -p $(dir $(2)) && touch $(2) && \
echo "`echo $(1) && $(1)`" > $(2) 2>&1 && \
-   if [ -z `grep -o -m 1 "CypressError\|AssertionError\|Uncaught 
TypeError" $(2)` ];\
+   if [ -z `grep -o -m 1 "CypressError\|AssertionError\|Uncaught 
TypeError\|Error: Timed out retrying" $(2)` ];\
then cat $(2);\
else cat $(2) >> $(ERROR_LOG);\
fi;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Linux SAL_USE_VCLPLUGIN=svp and the clipboard

2020-04-03 Thread Miklos Vajna
Hi Stephan,

My understanding is that in when svp is active and
comphelper::LibreOfficeKit::isActive() returns true, then the
expectation is that each view has its own clipboard. A "view" is the
Window -> New Window menu item. The LOK case wants this, as such a view
actually ends up in the web browser of different users. This is the same
as the "tiled rendering" case, these tests always set the LOK mode to
true.

When comphelper::LibreOfficeKit::isActive() return false, then then
expectation is that this is a desktop session where both views belong to
the same user, so a shared clipboard makes sense. The UITests probably
want to mimic the desktop case, so they would be in this category.
(Actually, any kind of test which is not a tiled rendering test.)

Does that help?

Regards,

Miklos


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4-3' - dbaccess/source wizards/com

2020-04-03 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/control/FieldDescControl.cxx|   31 +
 dbaccess/source/ui/inc/FieldControls.hxx   |1 
 dbaccess/source/ui/inc/FieldDescControl.hxx|7 +++
 dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx |   24 -
 dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx |7 ---
 wizards/com/sun/star/wizards/table/FieldFormatter.java |2 -
 6 files changed, 41 insertions(+), 31 deletions(-)

New commits:
commit 9e00a9c487b622f35d6b274cee605798f0d24e6e
Author: Caolán McNamara 
AuthorDate: Mon Mar 30 12:59:14 2020 +0100
Commit: Michael Weghorn 
CommitDate: Fri Apr 3 17:51:32 2020 +0200

tdf#131576 Fields not displayed as expected in Base's Table Wizard

this is similar to the problem of tdf#130623 "Base: Empty Field Properties"
so take that solution and move it down the the shared component

includes: tdf#131576 overlapping windows, move bottom one down a little

Change-Id: I567c5a2519edd5921984a27405cddd6a4904fbba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91370
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 
(cherry picked from commit 8de35cf85a0d595c3b0a0ee71325366084940948)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91400
Reviewed-by: Michael Stahl 
Reviewed-by: Michael Weghorn 
Tested-by: Michael Weghorn 

diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx 
b/dbaccess/source/ui/control/FieldDescControl.cxx
index c7f5f0127968..6356bfc21a2c 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -76,6 +77,7 @@ namespace
 // class OFieldDescControl
 OFieldDescControl::OFieldDescControl(weld::Container* pPage, vcl::Window* 
pParent, OTableDesignHelpBar* pHelpBar)
 :TabPage(pPage ? Application::GetDefDialogParent() : pParent, WB_3DLOOK | 
WB_DIALOGCONTROL)
+,m_pPage(pPage)
 ,m_xBuilder(pPage ? Application::CreateBuilder(pPage, 
"dbaccess/ui/fielddescpage.ui")
   : Application::CreateInterimBuilder(this, 
"dbaccess/ui/fielddescpage.ui"))
 ,m_xContainer(m_xBuilder->weld_container("FieldDescPage"))
@@ -90,6 +92,32 @@ OFieldDescControl::OFieldDescControl(weld::Container* pPage, 
vcl::Window* pParen
 ,m_bAdded(false)
 ,pActFieldDescr(nullptr)
 {
+m_aLayoutIdle.SetPriority(TaskPriority::RESIZE);
+m_aLayoutIdle.SetInvokeHandler( LINK( this, OFieldDescControl, 
ImplHandleLayoutTimerHdl ) );
+m_aLayoutIdle.SetDebugName( "OFieldDescControl m_aLayoutIdle" );
+}
+
+void OFieldDescControl::queue_resize(StateChangedType eReason)
+{
+TabPage::queue_resize(eReason);
+if (m_pPage)
+return;
+if (m_aLayoutIdle.IsActive())
+return;
+m_aLayoutIdle.Start();
+}
+
+void OFieldDescControl::Resize()
+{
+TabPage::Resize();
+if (m_pPage)
+return;
+queue_resize();
+}
+
+IMPL_LINK_NOARG(OFieldDescControl, ImplHandleLayoutTimerHdl, Timer*, void)
+{
+VclContainer::setLayoutAllocation(*GetWindow(GetWindowType::FirstChild), 
Point(0, 0), GetSizePixel());
 }
 
 OFieldDescControl::~OFieldDescControl()
@@ -99,6 +127,8 @@ OFieldDescControl::~OFieldDescControl()
 
 void OFieldDescControl::dispose()
 {
+m_aLayoutIdle.Stop();
+
 if ( m_bAdded )
 
::dbaui::notifySystemWindow(this,this,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
 
@@ -488,6 +518,7 @@ void OFieldDescControl::ActivateAggregate( EControlType 
eType )
 m_xType->append_text(elem.second->aUIName);
 }
 m_xType->set_active(0);
+m_xType->set_size_request(42, -1); // let the other widgets determine 
the over all width
 InitializeControl(m_xType.get(),HID_TAB_ENT_TYPE, true);
 m_xType->show();
 break;
diff --git a/dbaccess/source/ui/inc/FieldControls.hxx 
b/dbaccess/source/ui/inc/FieldControls.hxx
index 59600a0b91a5..76612cfdd88f 100644
--- a/dbaccess/source/ui/inc/FieldControls.hxx
+++ b/dbaccess/source/ui/inc/FieldControls.hxx
@@ -111,6 +111,7 @@ namespace dbaui
 void append_text(const OUString &rText) { 
m_xComboBox->append_text(rText); }
 void remove_text(const OUString &rText) { 
m_xComboBox->remove_text(rText); }
 int find_text(const OUString &rText) const { return 
m_xComboBox->find_text(rText); }
+void set_size_request(int nWidth, int nHeight) { 
m_xComboBox->set_size_request(nWidth, nHeight); }
 
 short GetPos() const { return m_nPos; }
 const OUString& GetHelp() const { return m_strHelpText; }
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx 
b/dbaccess/source/ui/inc/FieldDescControl.hxx
index 24cdedc7da27..331dfe3aa718 100644
--- a/dbaccess/source/ui/inc/FieldDescControl.hxx
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -19,6 +19,7 @@
 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_FIELDDESCCONTROL_HXX

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

2020-04-03 Thread Noel Grandin (via logerrit)
 vcl/inc/headless/svpdummies.hxx |2 +-
 vcl/inc/headless/svpframe.hxx   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9c8aea3f8c3d30c02fba2af640b08e75833cc92d
Author: Noel Grandin 
AuthorDate: Fri Apr 3 15:02:24 2020 +0200
Commit: Rene Engelhard 
CommitDate: Fri Apr 3 17:47:47 2020 +0200

fix android build

after
commit d9e478330243cbd120f2de33dffec2ef9217
Date:   Fri Apr 3 10:16:22 2020 +0200
loplugin:finalclasses in xmlsecurity..UnoControls

Change-Id: Ia6566d33b4a2d6c81e009f8baebce8367bba2486
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91641
Reviewed-by: Michael Weghorn 
Reviewed-by: Rene Engelhard 
Tested-by: Rene Engelhard 
Tested-by: Jenkins

diff --git a/vcl/inc/headless/svpdummies.hxx b/vcl/inc/headless/svpdummies.hxx
index 69d02ec544c8..51007916b43b 100644
--- a/vcl/inc/headless/svpdummies.hxx
+++ b/vcl/inc/headless/svpdummies.hxx
@@ -45,7 +45,7 @@ public:
 virtual const SystemEnvData*GetSystemData() const override;
 };
 
-class SvpSalSystem final : public SalGenericSystem
+class SvpSalSystem : public SalGenericSystem
 {
 public:
 SvpSalSystem() {}
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 1a5aff05bfe6..7245a31d5c8c 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -35,7 +35,7 @@
 class SvpSalInstance;
 class SvpSalGraphics;
 
-class SvpSalFrame final : public SalFrame
+class SvpSalFrame : public SalFrame
 {
 SvpSalInstance* m_pInstance;
 SvpSalFrame*m_pParent;   // pointer to parent 
frame
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Eike Rathke (via logerrit)
 sc/source/core/tool/interpr8.cxx |   41 +--
 1 file changed, 31 insertions(+), 10 deletions(-)

New commits:
commit b9728374522326364d8d579360319f7b7ebe639b
Author: Eike Rathke 
AuthorDate: Fri Mar 27 17:54:09 2020 +0100
Commit: Michael Weghorn 
CommitDate: Fri Apr 3 17:45:49 2020 +0200

Resolves: tdf#131096 Handle argument error and propagate

For etsPIAdd and etsPIMult also check if the fPILevel parameter
was actually specified (explicitly or missing/omitted) and do not
pop the 3rd parameter if not. GetDoubleWithDefault() can't handle
that as apparently was erroneously assumed.

Use IllegalArgument error instead of IllegalParameter in most
cases (the parameter is fine but the argument value is not).

Actually propagate ScETSForecastCalculation::mnErrorValue if set
as PushMatrix() does not, on purpose.

Change-Id: Ia2db5b0a7a388f0f40b73c6a4f66debbedec41e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91232
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 811b36e4db240be3a21a4d184b085630efcc09b7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91185
Reviewed-by: Michael Stahl 
Reviewed-by: Xisco Faulí 
Reviewed-by: Michael Weghorn 
Tested-by: Michael Weghorn 

diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index ce4234d0853e..18a65e86f86c 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -981,6 +981,12 @@ void ScETSForecastCalculation::GetETSPredictionIntervals( 
const ScMatrixRef& rTM
 if ( fmod( fMaxTarget, mfStepSize ) != 0.0 )
 nSize++;
 
+if (nSize == 0)
+{
+mnErrorValue = FormulaError::IllegalArgument;
+return;
+}
+
 std::unique_ptr< double[] > xScenRange( new double[nSize]);
 std::unique_ptr< double[] > xScenBase( new double[nSize]);
 std::unique_ptr< double[] > xScenTrend( new double[nSize]);
@@ -,6 +1117,12 @@ void 
ScETSForecastCalculation::GetEDSPredictionIntervals( const ScMatrixRef& rTM
 if ( fmod( fMaxTarget, mfStepSize ) != 0.0 )
 nSize++;
 
+if (nSize == 0)
+{
+mnErrorValue = FormulaError::IllegalArgument;
+return;
+}
+
 double z = ScInterpreter::gaussinv( ( 1.0 + fPILevel ) / 2.0 );
 double o = 1 - fPILevel;
 std::vector< double > c( nSize );
@@ -1181,7 +1193,7 @@ void ScInterpreter::ScForecast_Ets( ScETSType eETSType )
 nAggregation = 1;
 if ( nAggregation < 1 || nAggregation > 7 )
 {
-PushIllegalParameter();
+PushIllegalArgument();
 return;
 }
 
@@ -1195,7 +1207,7 @@ void ScInterpreter::ScForecast_Ets( ScETSType eETSType )
 bDataCompletion = nTemp;
 else
 {
-PushIllegalParameter();
+PushIllegalArgument();
 return;
 }
 }
@@ -1222,16 +1234,16 @@ void ScInterpreter::ScForecast_Ets( ScETSType eETSType )
 double fPILevel = 0.0;
 if ( nParamCount < 3 && !( nParamCount == 2 && eETSType == etsSeason ) )
 {
-PushIllegalArgument();
+PushParameterExpected();
 return;
 }
 
 if ( eETSType == etsPIAdd || eETSType == etsPIMult )
 {
-fPILevel = GetDoubleWithDefault( 0.95 );
+fPILevel = (nParamCount < 4 ? 0.95 : GetDoubleWithDefault( 0.95 ));
 if ( fPILevel < 0 || fPILevel > 1 )
 {
-PushIllegalParameter();
+PushIllegalArgument();
 return;
 }
 }
@@ -1249,7 +1261,7 @@ void ScInterpreter::ScForecast_Ets( ScETSType eETSType )
 if ( static_cast< int >( pTypeMat->GetDouble( j, i ) ) < 1 ||
  static_cast< int >( pTypeMat->GetDouble( j, i ) ) > 9 )
 {
-PushIllegalParameter();
+PushIllegalArgument();
 return;
 }
 }
@@ -1304,7 +1316,10 @@ void ScInterpreter::ScForecast_Ets( ScETSType eETSType )
 pTMat->GetDimensions( nC, nR );
 ScMatrixRef pFcMat = GetNewMat( nC, nR );
 aETSCalc.GetForecastRange( pTMat, pFcMat );
-PushMatrix( pFcMat );
+if (aETSCalc.GetError() != FormulaError::NONE)
+PushError( aETSCalc.GetError());// explicitly push 
error, PushMatrix() does not
+else
+PushMatrix( pFcMat );
 }
 break;
 case etsPIAdd :
@@ -1316,13 +1331,15 @@ void ScInterpreter::ScForecast_Ets( ScETSType eETSType )
 if ( nSmplInPrd == 0 )
 {
 aETSCalc.GetEDSPredictionIntervals( pTMat, pPIMat, 
fPILevel );
-PushMatrix( pPIMat );
 }
 else
 {
 aETSCalc.GetETSPredictionIntervals( pTMat, pPIMat, 
fPILeve

[Libreoffice-commits] core.git: drawinglayer/inc drawinglayer/source include/drawinglayer sc/source sfx2/inc sfx2/source svgio/source svx/inc svx/source sw/inc sw/source

2020-04-03 Thread Tomaž Vajngerl (via logerrit)
 drawinglayer/inc/pch/precompiled_drawinglayer.hxx|   11 
 drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx   |2 
 drawinglayer/source/primitive2d/borderlineprimitive2d.cxx|2 
 drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx  |2 
 drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx |2 
 drawinglayer/source/primitive2d/mediaprimitive2d.cxx |2 
 drawinglayer/source/primitive2d/polygonprimitive2d.cxx   |3 
 drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx   |   10 
 drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx  |3 
 drawinglayer/source/primitive2d/svggradientprimitive2d.cxx   |2 
 drawinglayer/source/primitive2d/textprimitive2d.cxx  |2 
 drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx   |2 
 drawinglayer/source/processor2d/contourextractor2d.cxx   |2 
 drawinglayer/source/processor2d/hittestprocessor2d.cxx   |2 
 drawinglayer/source/processor2d/linegeometryextractor2d.cxx  |2 
 drawinglayer/source/processor2d/textaspolygonextractor2d.cxx |3 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx   |8 
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx  |9 
 drawinglayer/source/processor2d/vclprocessor2d.cxx   |9 
 drawinglayer/source/processor3d/geometry2dextractor.cxx  |2 
 drawinglayer/source/processor3d/shadow3dextractor.cxx|2 
 drawinglayer/source/tools/emfphelperdata.cxx |8 
 drawinglayer/source/tools/primitive2dxmldump.cxx |8 
 drawinglayer/source/tools/wmfemfhelper.cxx   |9 
 include/drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx |   67 +
 include/drawinglayer/primitive2d/PolyPolygonGradientPrimitive2D.hxx  |   76 +
 include/drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx   |   73 +
 include/drawinglayer/primitive2d/PolyPolygonHairlinePrimitive2D.hxx  |   79 +
 include/drawinglayer/primitive2d/PolyPolygonHatchPrimitive2D.hxx |   83 ++
 include/drawinglayer/primitive2d/PolyPolygonMarkerPrimitive2D.hxx|   88 ++
 include/drawinglayer/primitive2d/PolyPolygonSelectionPrimitive2D.hxx |   85 ++
 include/drawinglayer/primitive2d/PolyPolygonStrokePrimitive2D.hxx|   87 ++
 include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx  |  415 
--
 sc/source/ui/view/hintwin.cxx|2 
 sc/source/ui/view/overlayobject.cxx  |2 
 sfx2/inc/pch/precompiled_sfx.hxx |   12 
 sfx2/source/control/emojiviewitem.cxx|2 
 sfx2/source/control/templateviewitem.cxx |3 
 sfx2/source/control/thumbnailview.cxx|2 
 sfx2/source/control/thumbnailviewitem.cxx|2 
 sfx2/source/dialog/infobar.cxx   |3 
 svgio/source/svgreader/svgstyleattributes.cxx|3 
 svx/inc/pch/precompiled_svxcore.hxx  |   79 -
 svx/source/sdr/contact/viewcontactofsdrpage.cxx  |3 
 svx/source/sdr/contact/viewobjectcontactofpageobj.cxx|2 
 svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx |2 
 svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx|2 
 svx/source/sdr/overlay/overlayobjectcell.cxx |2 
 svx/source/sdr/overlay/overlaypolypolygon.cxx|3 
 svx/source/sdr/overlay/overlayrollingrectangle.cxx   |4 
 svx/source/sdr/overlay/overlayselection.cxx  |3 
 svx/source/sdr/overlay/overlaytools.cxx  |4 
 svx/source/sdr/overlay/overlaytriangle.cxx   |2 
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |5 
 svx/source/svdraw/svddrgmt.cxx   |3 
 svx/source/table/tablehandles.cxx|2 
 svx/source/xoutdev/xtabgrdt.cxx  |2 
 svx/source/xoutdev/xtabhtch.cxx  |2 
 sw/inc/pch/precompiled_sw.hxx|3 
 sw/source/core/crsr/overlayrangesoutline.cxx |2 
 sw/source/core/layout/paintfrm.cxx   |2 
 sw/source/uibase/docvw/AnchorOverlayObject.cxx   |2 
 sw/source/uibase/docvw/DashedLine.cxx|2 
 sw/source/uibase/docvw/HeaderFooterWin.cxx  

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

2020-04-03 Thread Stephan Bergmann (via logerrit)
 sd/source/core/sdpage.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 60797d61e4d8641a4177089b204c1af8c8a3b594
Author: Stephan Bergmann 
AuthorDate: Fri Apr 3 16:40:18 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 3 17:31:37 2020 +0200

Fix uses of MAX_PRESOBJS

...broken in 10055ff899ed8f9c205155cd15c6de81cba37471 "convert PresObjKind 
to
scoped enum", causing CppunitTest_sd_import_tests to fail with

> sd/source/core/sdpage.cxx:1462:68: runtime error: index 7 out of bounds 
for type 'PresObjKind const[7]'
>  #0 in findAutoLayoutShapesImpl(SdPage&, (anonymous 
namespace)::LayoutDescriptor const&, std::__debug::array&, 
bool, bool) at sd/source/core/sdpage.cxx:1462:68
>  #1 in SdPage::SetAutoLayout(AutoLayout, bool, bool) at 
sd/source/core/sdpage.cxx:1639:5
>  #2 in SdGenericDrawPage::setPropertyValue(rtl::OUString const&, 
com::sun::star::uno::Any const&) at sd/source/ui/unoidl/unopage.cxx:624:28
[...]

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

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 8f697e1ec2f5..7f8178dea79f 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1459,7 +1459,7 @@ static void findAutoLayoutShapesImpl( SdPage& rPage, 
const LayoutDescriptor& rDe
 bool bMissing = false;
 
 // for each entry in the layoutdescriptor, arrange a presentation shape
-for (int i = 0; (i <= static_cast(PresObjKind::LAST)) && 
(rDescriptor.meKind[i] != PresObjKind::NONE); i++)
+for (int i = 0; (i < MAX_PRESOBJS) && (rDescriptor.meKind[i] != 
PresObjKind::NONE); i++)
 {
 PresObjKind eKind = rDescriptor.meKind[i];
 SdrObject* pObj = nullptr;
@@ -1482,7 +1482,7 @@ static void findAutoLayoutShapesImpl( SdPage& rPage, 
const LayoutDescriptor& rDe
 return;
 
 // for each entry in the layoutdescriptor, look for an alternative shape
-for (int i = 0; (i <= static_cast(PresObjKind::LAST)) && 
(rDescriptor.meKind[i] != PresObjKind::NONE); i++)
+for (int i = 0; (i < MAX_PRESOBJS) && (rDescriptor.meKind[i] != 
PresObjKind::NONE); i++)
 {
 if( rShapes[i] )
 continue;
@@ -1639,7 +1639,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, bool 
bInit, bool bCreate )
 findAutoLayoutShapesImpl( *this, aDescriptor, aLayoutShapes, bInit, 
bSwitchLayout );
 
 // for each entry in the layoutdescriptor, arrange a presentation shape
-for (int i = 0; (i <= static_cast(PresObjKind::LAST)) && 
(aDescriptor.meKind[i] != PresObjKind::NONE); i++)
+for (int i = 0; (i < MAX_PRESOBJS) && (aDescriptor.meKind[i] != 
PresObjKind::NONE); i++)
 {
 PresObjKind eKind = aDescriptor.meKind[i];
 SdrObject* pObj = InsertAutoLayoutShape( aLayoutShapes[i], eKind, 
aDescriptor.mbVertical[i], aRectangle[i], bInit );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Michael Stahl (via logerrit)
 sw/source/core/text/txtfrm.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 58353884dc86bdb3c1464f8bbf8c3e131584b78a
Author: Michael Stahl 
AuthorDate: Thu Apr 2 17:21:32 2020 +0200
Commit: Michael Stahl 
CommitDate: Fri Apr 3 17:21:37 2020 +0200

(related: tdf#130685) sw: adapt definition of sw_redlinehide index 0

... to the change to use the last node - not the first node - for
paragraph properties.

The problem is that if you move the cursor around at some step of 
reproducing the bug, this happens:
sw/source/core/crsr/crsrsh.cxx:544: bool SwCursorShell::LRMargin(bool, 
bool): Assertion `sw::GetParaPropsNode(*GetLayout(), 
GetCursor_()->GetPoint()->nNode) == pTextNd' failed.

For a fully deleted range, it looks more plausible to map index 0 to the 
end of the last node instead of the start of the first node now.

This means that text will be inserted at the end of the last node too.

(regression from fa5eb82b398e29ae033f7b7c8c8195dfc10cf5b0)

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

diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 8b6051b8da73..5292cc6d3965 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1166,7 +1166,7 @@ MapViewToModel(MergedPara const& rMerged, TextFrameIndex 
const i_nIndex)
 assert(nIndex == 0 && "view index out of bounds");
 return pExtent
 ? std::make_pair(pExtent->pNode, pExtent->nEnd) //1-past-the-end index
-: std::make_pair(rMerged.pFirstNode, sal_Int32(0));
+: std::make_pair(const_cast(rMerged.pLastNode), 
rMerged.pLastNode->Len());
 }
 
 TextFrameIndex MapModelToView(MergedPara const& rMerged, SwTextNode 
const*const pNode, sal_Int32 const nIndex)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Michael Stahl (via logerrit)
 sw/source/core/docnode/node.cxx  |2 ++
 sw/source/core/text/redlnitr.cxx |3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 520b0e1679d7a97aa3d91cfc95ca647339da7e84
Author: Michael Stahl 
AuthorDate: Thu Apr 2 18:59:40 2020 +0200
Commit: Michael Stahl 
CommitDate: Fri Apr 3 17:20:52 2020 +0200

(related: tdf#130685) sw_redlinehide: fix update of pLastNode/pParaPropsNode

If you Select All, Cut then move the cursor around a bit then paste, then 
this happens:

sw/source/core/text/txtfrm.cxx:3461: void 
SwTextFrame::CalcAdditionalFirstLineOffset(): Assertion 
`pTextNode->IsNumbered(getRootFrame()) == pTextNode->IsNumbered(nullptr)' 
failed.

The reason is this borked MergedPara, which really only has 1 node it's 
listening on, but pLastNode and pParaPropsNode point to a node that is actually 
part of a different MergedPara now.

$6 = {
  listener = {
m_rToTell = @0x6c02700,
m_vDepends = std::__debug::vector of length 1, capacity 256 = {{
 = {
  m_pRegisteredIn = 0x6af5f20
},
  }}
  },
  extents = std::__debug::vector of length 0, capacity 0,
  mergedText = "",
  pParaPropsNode = 0x6d1c390,
  pFirstNode = 0x6af5f20,
  pLastNode = 0x6d1c390
}

The reason is that SwContentNode::DelFrames() doesn't update these members 
properly; at the time when it's called for the previous pLastNode, the 
offending node has Merge::NonFirst set already in the call of 
CheckParaRedlineMerge() so it sets the wrong new pLastNode.

Fix this by iterating DelFrames() loop backward.

(regression from sw_redlinehide)

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

diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index eacf62d4c56f..5c5b648f7cb5 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1386,6 +1386,7 @@ void SwContentNode::DelFrames(SwRootFrame const*const 
pLayout)
 break;
 }
 }
+
assert(pMerged->listener.IsListeningTo(pMerged->pParaPropsNode));
 }
 assert(GetIndex() <= pMerged->pLastNode->GetIndex());
 if (this == pMerged->pLastNode)
@@ -1407,6 +1408,7 @@ void SwContentNode::DelFrames(SwRootFrame const*const 
pLayout)
 }
 }
 assert(pMerged->pFirstNode->GetIndex() <= 
pMerged->pLastNode->GetIndex());
+
assert(pMerged->listener.IsListeningTo(pMerged->pLastNode));
 }
 // avoid re-parenting mess (ModifyChangedHint)
 pMerged->listener.EndListening(this);
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 53f614d84b68..d4be4a1d3d8d 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -276,7 +276,8 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & 
rTextNode,
 }
 // unfortunately DelFrames() must be done before StartListening too,
 // otherwise footnotes cannot be deleted by SwTextFootnote::DelFrames!
-for (auto iter = ++nodes.begin(); iter != nodes.end(); ++iter)
+auto const end(--nodes.rend());
+for (auto iter = nodes.rbegin(); iter != end; ++iter)
 {
 (**iter).DelFrames(rFrame.getRootFrame());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Michael Stahl (via logerrit)
 sw/source/core/doc/DocumentContentOperationsManager.cxx |   36 
 sw/source/core/inc/txtfrm.hxx   |2 
 sw/source/core/layout/frmtool.cxx   |   32 ++
 sw/source/core/undo/undel.cxx   |   25 ---
 4 files changed, 64 insertions(+), 31 deletions(-)

New commits:
commit 166b5010b402a41b192b1659093a25acf9065fd9
Author: Michael Stahl 
AuthorDate: Thu Apr 2 17:18:37 2020 +0200
Commit: Michael Stahl 
CommitDate: Fri Apr 3 17:20:22 2020 +0200

tdf#130685 sw_redlinehide: fix copying to position following redline

In DocumentContentOperationsManager::CopyWithFlyInFly(), first
CopyNodes() also creates all layout frames, then SaveRedlEndPosForRestore
fixes the end position of all redlines that were moved by CopyNodes()
(they were moved not by changing their position but by inserting
new nodes before their end position).

Of course this means that the layout frames are created with redlines
that have only a temporary end position, and then things go wrong when
the end positions are adjusted, so add something similar to
SwUndoDelete::UndoImpl() to recreate the frames in CopyWithFlyInFly().

This hit the assert:
sw/source/core/text/redlnitr.cxx:94: std::unique_ptr 
sw::CheckParaRedlineMerge(SwTextFrame&, SwTextNode&, sw::FrameMode): Assertion 
`pNode != &rTextNode || &pStart->nNode.GetNode() == &rTextNode' failed.

(regression from ... sw_redlinehide)

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

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 7cb7901912cb..98c39021af17 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -44,6 +44,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -3407,22 +3408,43 @@ void DocumentContentOperationsManager::CopyWithFlyInFly(
 assert(!pCopiedPaM || pCopiedPaM->second.nNode <= rInsPos);
 
 SwDoc* pDest = rInsPos.GetNode().GetDoc();
-SwNodeIndex aSavePos( rInsPos, -1 );
-bool bEndIsEqualEndPos = rInsPos == rRg.aEnd;
+SwNodeIndex aSavePos( rInsPos );
 
 if (rRg.aStart != rRg.aEnd)
 {
+bool bEndIsEqualEndPos = rInsPos == rRg.aEnd;
+--aSavePos;
 SaveRedlEndPosForRestore aRedlRest( rInsPos, 0 );
 
 // insert behind the already copied start node
-m_rDoc.GetNodes().CopyNodes( rRg, rInsPos, bMakeNewFrames, true );
+m_rDoc.GetNodes().CopyNodes( rRg, rInsPos, false, true );
 aRedlRest.Restore();
+if (bMakeNewFrames) // tdf#130685 only after aRedlRest
+{   // recreate from previous node (could be merged now)
+if (SwTextNode *const pNode = aSavePos.GetNode().GetTextNode())
+{
+sw::RecreateStartTextFrames(*pNode);
+}
+}
+bool const isAtStartOfSection(aSavePos.GetNode().IsStartNode());
+++aSavePos;
+if (bMakeNewFrames)
+{
+// it's possible that CheckParaRedlineMerge() deleted frames
+// on rInsPos so have to include it, but it must not be included
+// if it was the first node in the document so that MakeFrames()
+// will find the existing (wasn't deleted) frame on it
+SwNodeIndex const end(rInsPos,
+(rInsPos.GetNode().IsEndNode() || isAtStartOfSection)
+? 0 : +1);
+::MakeFrames(pDest, aSavePos, end);
+}
+if (bEndIsEqualEndPos)
+{
+const_cast(rRg.aEnd) = aSavePos;
+}
 }
 
-++aSavePos;
-if( bEndIsEqualEndPos )
-const_cast(rRg.aEnd) = aSavePos;
-
 #if OSL_DEBUG_LEVEL > 0
 {
 //JP 17.06.99: Bug 66973 - check count only if the selection is in
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index a1a7833e21a3..61377d2a73ca 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -142,6 +142,8 @@ bool IsMarkHidden(SwRootFrame const& rLayout, 
::sw::mark::IMark const& rMark);
 bool IsMarkHintHidden(SwRootFrame const& rLayout,
 SwTextNode const& rNode, SwTextAttrEnd const& rHint);
 
+void RecreateStartTextFrames(SwTextNode & rNode);
+
 } // namespace sw
 
 /// Represents the visualization of a paragraph. Typical upper is an
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index c7424c95d4a8..c99eb61b82d8 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1356,6 +1356,38 @@ void AppendAllObjs(const SwFrameFormats* pTable, const 
SwFrame* pSib)
 }
 }
 
+namespace sw {
+
+void RecreateStartTextFram

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

2020-04-03 Thread Michael Stahl (via logerrit)
 sw/source/core/doc/DocumentContentOperationsManager.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 27aa4b16bf704d0246595750daf57b57ff2577b3
Author: Michael Stahl 
AuthorDate: Tue Mar 31 17:37:51 2020 +0200
Commit: Michael Stahl 
CommitDate: Fri Apr 3 17:19:33 2020 +0200

(related: tdf#130685) sw: fix ~SwIndexReg asserts from ...

... lcl_DeleteRedlines(), if there are redlines immediately consecutive
that get deleted; merge the SwPaM ring in that case which should help.

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

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index cad942607c0b..7cb7901912cb 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -384,6 +384,12 @@ namespace
 lcl_SetCpyPos( *pREnd, *pStt, *pCpyStt,
 *pDelPam->GetPoint(), 
nDelCount );
 }
+
+if (pDelPam->GetNext() && 
*pDelPam->GetNext()->End() == *pDelPam->Start())
+{
+*pDelPam->GetNext()->End() = *pDelPam->End();
+pDelPam.reset(pDelPam->GetNext());
+}
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Julien Nabet (via logerrit)
 sc/source/ui/docshell/impex.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 41d90ebc2f53df095c8b66d3cd31adef2a5304c9
Author: Julien Nabet 
AuthorDate: Thu Mar 12 19:44:34 2020 +0100
Commit: Eike Rathke 
CommitDate: Fri Apr 3 17:17:14 2020 +0200

tdf#131273: fix crash when pasting quotes with fixed width

See bt https://bugs.documentfoundation.org/show_bug.cgi?id=131273#c2

Change-Id: I78f592bb2ee59b50e7301fe4e6f282e53c4eeb7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90438
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
(cherry picked from commit cf3fec9e7cadd0a6c4f42a4015df429d9e32b7e8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90398
Reviewed-by: Xisco Faulí 
(cherry picked from commit 3d264dc8742733a797a3e315033851d0bda3bffd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90952
Reviewed-by: Eike Rathke 

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 58d848a3095e..c7cdc06186b2 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1265,7 +1265,7 @@ static OUString lcl_GetFixed( const OUString& rLine, 
sal_Int32 nStart, sal_Int32
 bool bFits = (nSpace - nStart - 3 <= SAL_MAX_UINT16);
 OSL_ENSURE( bFits, "lcl_GetFixed: line doesn't fit into data");
 if (bFits)
-return rLine.copy(nStart+1, nSpace-nStart-2);
+return rLine.copy(nStart+1, std::max< sal_Int32 >(0, 
nSpace-nStart-2));
 else
 {
 rbOverflowCell = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Linux SAL_USE_VCLPLUGIN=svp and the clipboard

2020-04-03 Thread Stephan Bergmann

On 03/04/2020 17:09, Stephan Bergmann wrote:
It is not clear to me what the intended behavior of 
SalInstance::CreateClipboard is, and thus how the two tests (and the 
expected tiledrendering behavior that 
ScTiledRenderingTest::testMultiViewCopyPaste apparently tests?) should 
be fixed.


Also, what is curious is that both those tests involve Calc.  Could it 
be that that clipboard-per-document-view thing with 
SAL_USE_VCLPLUGIN=svp is specifically relevant for Calc?


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-04-03 Thread Luboš Luňák (via logerrit)
 sc/source/ui/unoobj/chart2uno.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 0d631aad92e874a95d9cd31ab50c63085fcabced
Author: Luboš Luňák 
AuthorDate: Thu Apr 2 11:14:59 2020 +0200
Commit: Eike Rathke 
CommitDate: Fri Apr 3 17:10:20 2020 +0200

use mdds position hint (tdf#131716)

Otherwise this is the usual case of possible quadratic mdds slowness.

Change-Id: I5b33df65e127702c011517d79b9cd41a7e820ca0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91553
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit 55220e7bc6576a7575c675ba425e757a3aefa243)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91517
Reviewed-by: Eike Rathke 

diff --git a/sc/source/ui/unoobj/chart2uno.cxx 
b/sc/source/ui/unoobj/chart2uno.cxx
index 0f404ba5d780..8916ee2cf09d 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -2453,6 +2454,8 @@ void ScChart2DataSequence::BuildDataCache()
 {
 for (SCCOL nCol = aRange.aStart.Col(); nCol <= 
aRange.aEnd.Col(); ++nCol)
 {
+sc::ColumnBlockPosition hint;
+m_pDocument->InitColumnBlockPosition( hint, nTab, nCol );
 for (SCROW nRow = aRange.aStart.Row(); nRow <= 
aRange.aEnd.Row(); ++nRow)
 {
 bool bColHidden = m_pDocument->ColHidden(nCol, nTab, 
nullptr, &nLastCol);
@@ -2472,7 +2475,7 @@ void ScChart2DataSequence::BuildDataCache()
 ScAddress aAdr(nCol, nRow, nTab);
 aItem.maString = m_pDocument->GetString(aAdr);
 
-ScRefCellValue aCell(*m_pDocument, aAdr);
+ScRefCellValue aCell(*m_pDocument, aAdr, hint);
 switch (aCell.meType)
 {
 case CELLTYPE_VALUE:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Linux SAL_USE_VCLPLUGIN=svp and the clipboard

2020-04-03 Thread Stephan Bergmann

I ran into this when trying `SAL_USE_VCLPLUGIN=gen make uicheck` on Linux.

On the one hand we have 
 
"uitest for bug tdf#118189" introducing test_tdf118189 in 
sc/qa/uitest/calc_tests2/tdf118189.py.  It copies a row of cells (where 
A1 contains the text "On Back Order") from one Calc document to the 
clipboard.  Then it creates a fresh Calc document and does the following 
with it:



#4. Paste it
gridwin2.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
self.xUITest.executeCommand(".uno:Paste")
#5. Cut it
self.xUITest.executeCommand(".uno:Cut")
#6. Undo
self.xUITest.executeCommand(".uno:Undo")

#-> CRASH
self.assertEqual(get_cell_by_position(document2, 0, 0, 0).getString(), 
"")


What one would assume happens is that after step 4 the new document's A1 
should contain "On Back Order", after step 5 A1 should be empty, and 
after step 6 it should contain "On Back Order" again.  So the final test 
of A1 against "" should fail (and that's what happens e.g. when your run 
that test with SAL_USE_VCLPLUGIN=gen on Linux, as suggested by 
solenv/gbuild/uitest-failed-default.sh, or when you run that test on 
Windows).  What actually happens is that with SAL_USE_VCLPLUGIN=svp 
(which is the default for UITests) each Calc document (view) apparently 
has its own clipboard (see next), so step 4 actually pastes nothing, so 
the final content of A1 is indeed the empty string.


It is unclear to me why the above test checks for the empty string 
rather than "On Back Order" ever since that first commit.  Maybe just 
because it happened to succeed that way in the "default" environment for 
running UITests (i.e., on Linux and with the default 
SAL_USE_VCLPLUGIN=svp).  That we first copy a row from another document 
to the clipboard suggests that the test was written under the assumption 
that that row would indeed be pasted into the second document?  (And 
completely ignoring the issue that a UITest using .uno:Cut/Paste, which 
can interact with a system-wide clipboard IIUC, is probably a bad idea 
to begin with.)


The reason for the clipboard-per-document is 
SalInstance::CreateClipboard in vcl/source/components/dtranscomp.cxx, 
which creates a new instance on each call.  (In contrast to e.g. 
X11SalInstance::CreateClipboard in 
vcl/unx/generic/dtrans/X11_service.cxx, used by SAL_USE_VCLPLUGIN=gen, 
which keeps returning the same instance for all calls with empty arguments.)


However, if we change SalInstance::CreateClipboard to behave like 
X11SalInstance::CreateClipboard and use a single clipboard instance for 
at least all those calls with empty arguments, we run into a different 
problem:


Because, on the other hand we have 
 
"sc lok: 1 view has 1 clipboard to transfer data".  It introduces 
ScTiledRenderingTest::testMultiViewCopyPaste in 
sc/qa/unit/tiledrendering/tiledrendering.cxx which specifically tests 
that SID_COPY/PASTE in two different views of the same Calc document do 
not interact.  (And thus would start to fail with the above change.) 
The test is part of CppunitTest_sc_tiledrendering, which only exists on 
Linux (cf. sc/Module_sc.mk), where it again defaults to 
SAL_USE_VCLPLUGIN=svp.  And again, if you run `SAL_USE_VCLPLUGIN=gen 
make CppunitTest_sc_tiledrendering` on Linux (where overriding 
SAL_USE_VCLPLUGIN for CppunitTests appears to be explicitly supported by 
gbuild, see



# Common environment variables passed into all gb_*Test classes:

[...]

ifeq (,$(SAL_USE_VCLPLUGIN))
gb_TEST_ENV_VARS += SAL_USE_VCLPLUGIN=svp
endif


in solenv/gbuild/gbuild.mk), the test fails.

Does that test check for behavior that is vital for the tiledrendering 
use case, or does it just for some reason want to verify the status quo, 
whether or not that status quo is actually use- or harmful for the 
tiledrendering use case?  (And again ignoring the issue that a 
CppunitTest using SID_COPY/PASTE, which can interact with a system-wide 
clipboard IIUC, is probably a bad idea to begin with.)


It is not clear to me what the intended behavior of 
SalInstance::CreateClipboard is, and thus how the two tests (and the 
expected tiledrendering behavior that 
ScTiledRenderingTest::testMultiViewCopyPaste apparently tests?) should 
be fixed.


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - sfx2/source

2020-04-03 Thread Michael Weghorn (via logerrit)
 sfx2/source/view/viewprn.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 766184c23f57617d3559b52ea6f021c0a4740e20
Author: Michael Weghorn 
AuthorDate: Fri Apr 3 11:54:42 2020 +0200
Commit: Michael Weghorn 
CommitDate: Fri Apr 3 16:58:49 2020 +0200

tdf#131849 Handle changed doc print options when printer changed

Previously, the SfxPrinterChangeFlags::OPTIONS flag was
only set for the case that the printer itself was considered
unchanged ('else' case below).

However, this also needs to be done when the printer is
considered to have changed, so the flag is properly
passed in the call to 'SetPrinter' below, to make
sure that changes in document-specific options are
properly propagated.

Change-Id: Id91ebbbf40888e52149b40ac25f188af4be425f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91626
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 21fc54777d5dedc33d6bfa23b9f1072a6667eebe)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91520
Tested-by: Michael Weghorn 

diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 19534cb129e1..3dca87ebf4f7 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -529,6 +529,11 @@ void SfxViewShell::SetPrinter_Impl( VclPtr& 
pNewPrinter )
 if ( (aTempPrtName != aDocPrtName) || (pDocPrinter->IsDefPrinter() != 
pNewPrinter->IsDefPrinter()) )
 {
 nChangedFlags |= 
SfxPrinterChangeFlags::PRINTER|SfxPrinterChangeFlags::JOBSETUP;
+if ( ! (pNewPrinter->GetOptions() == pDocPrinter->GetOptions()) )
+{
+nChangedFlags |= SfxPrinterChangeFlags::OPTIONS;
+}
+
 pDocPrinter = pNewPrinter;
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Need Help - How to Build Starter project from command line

2020-04-03 Thread Harish Kumar
Hi Team,

I am currently building LibreOffice starter project - (Java  version) in
Eclipse with the help of LOEclipse plugin.
I want to integrate the build process with my Jenkins server for which* i
want to know if there is any way to build the project from  command line.
Please help.*
My Operating System is Windows 10.

-- 
Best Regards,
Harish Kumar.B
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-04-03 Thread Olivier Hallot (via logerrit)
 source/text/scalc/01/04060109.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4fbaf6fc9e52d9f444e2c37fd69bf059680721cd
Author: Olivier Hallot 
AuthorDate: Fri Apr 3 08:48:44 2020 -0300
Commit: Olivier Hallot 
CommitDate: Fri Apr 3 16:26:56 2020 +0200

Mute L10n on heading

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

diff --git a/source/text/scalc/01/04060109.xhp 
b/source/text/scalc/01/04060109.xhp
index 74acea530..061c1dbb9 100644
--- a/source/text/scalc/01/04060109.xhp
+++ b/source/text/scalc/01/04060109.xhp
@@ -168,7 +168,7 @@
  If 
cell A1 displays Err:518, the function =ERRORTYPE(A1) 
returns the number 518.
   
 
-
+
 
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2020-04-03 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d7c9bb6b51f44b01b23134fb22c0902d85f31329
Author: Olivier Hallot 
AuthorDate: Fri Apr 3 11:26:56 2020 -0300
Commit: Gerrit Code Review 
CommitDate: Fri Apr 3 16:26:56 2020 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 4fbaf6fc9e52d9f444e2c37fd69bf059680721cd
  - Mute L10n on heading

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

diff --git a/helpcontent2 b/helpcontent2
index 27b94eb0ef05..4fbaf6fc9e52 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 27b94eb0ef058daa252f98391c081e64ecd89a6d
+Subproject commit 4fbaf6fc9e52d9f444e2c37fd69bf059680721cd
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: drawinglayer/source include/drawinglayer solenv/clang-format

2020-04-03 Thread Tomaž Vajngerl (via logerrit)
 drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx  |  931 ++--
 include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx |  729 -
 solenv/clang-format/blacklist   |2 
 3 files changed, 838 insertions(+), 824 deletions(-)

New commits:
commit ab931bf1148123ac262633f195efebb7babf9ce1
Author: Tomaž Vajngerl 
AuthorDate: Wed Apr 1 13:05:16 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Fri Apr 3 16:08:37 2020 +0200

remove polypolygonprimitive2d.{hxx,cxx} from clang-format blacklist

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

diff --git a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx 
b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
index 1a521ab65243..959ae69a2159 100644
--- a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
@@ -31,531 +31,534 @@
 #include 
 #include 
 
-
 using namespace com::sun::star;
 
-
 namespace drawinglayer::primitive2d
 {
-void 
PolyPolygonHairlinePrimitive2D::create2DDecomposition(Primitive2DContainer& 
rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
-{
-const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon());
-const sal_uInt32 nCount(aPolyPolygon.count());
-
-if(nCount)
-{
-for(sal_uInt32 a(0); a < nCount; a++)
-{
-rContainer.push_back(new 
PolygonHairlinePrimitive2D(aPolyPolygon.getB2DPolygon(a), getBColor()));
-}
-}
-}
-
-PolyPolygonHairlinePrimitive2D::PolyPolygonHairlinePrimitive2D(const 
basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor)
-:   BufferedDecompositionPrimitive2D(),
-maPolyPolygon(rPolyPolygon),
-maBColor(rBColor)
-{
-}
-
-bool PolyPolygonHairlinePrimitive2D::operator==(const BasePrimitive2D& 
rPrimitive) const
-{
-if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
-{
-const PolyPolygonHairlinePrimitive2D& rCompare = 
static_cast(rPrimitive);
-
-return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
-&& getBColor() == rCompare.getBColor());
-}
-
-return false;
-}
+void PolyPolygonHairlinePrimitive2D::create2DDecomposition(
+Primitive2DContainer& rContainer, const geometry::ViewInformation2D& 
/*rViewInformation*/) const
+{
+const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon());
+const sal_uInt32 nCount(aPolyPolygon.count());
 
-basegfx::B2DRange PolyPolygonHairlinePrimitive2D::getB2DRange(const 
geometry::ViewInformation2D& /*rViewInformation*/) const
+if (nCount)
+{
+for (sal_uInt32 a(0); a < nCount; a++)
 {
-// return range
-return basegfx::utils::getRange(getB2DPolyPolygon());
+rContainer.push_back(
+new PolygonHairlinePrimitive2D(aPolyPolygon.getB2DPolygon(a), 
getBColor()));
 }
+}
+}
+
+PolyPolygonHairlinePrimitive2D::PolyPolygonHairlinePrimitive2D(
+const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& 
rBColor)
+: BufferedDecompositionPrimitive2D()
+, maPolyPolygon(rPolyPolygon)
+, maBColor(rBColor)
+{
+}
 
-// provide unique ID
-sal_uInt32 PolyPolygonHairlinePrimitive2D::getPrimitive2DID() const { 
return PRIMITIVE2D_ID_POLYPOLYGONHAIRLINEPRIMITIVE2D; }
-
-void 
PolyPolygonMarkerPrimitive2D::create2DDecomposition(Primitive2DContainer& 
rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
-{
-const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon());
-const sal_uInt32 nCount(aPolyPolygon.count());
+bool PolyPolygonHairlinePrimitive2D::operator==(const BasePrimitive2D& 
rPrimitive) const
+{
+if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
+{
+const PolyPolygonHairlinePrimitive2D& rCompare
+= static_cast(rPrimitive);
 
-if(nCount)
-{
-for(sal_uInt32 a(0); a < nCount; a++)
-{
-rContainer.push_back(
-new PolygonMarkerPrimitive2D(
-aPolyPolygon.getB2DPolygon(a),
-getRGBColorA(),
-getRGBColorB(),
-getDiscreteDashLength()));
-}
-}
-}
+return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
+&& getBColor() == rCompare.getBColor());
+}
 
-PolyPolygonMarkerPrimitive2D::PolyPolygonMarkerPrimitive2D(
-const 

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

2020-04-03 Thread Michael Weghorn (via logerrit)
 sfx2/source/view/viewprn.cxx |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit aa191f35978ea48bbacc0e613ae8f0e6536ebcfc
Author: Michael Weghorn 
AuthorDate: Fri Apr 3 13:38:46 2020 +0200
Commit: Michael Weghorn 
CommitDate: Fri Apr 3 15:24:35 2020 +0200

Drop extra "temporary of class String"

It's unclear to me why it was necessary

> For the MAC to have its "temporary of class String" in next if()

but that comment (or the German successor) was there
since fd069bee7e57ad529c3c0974559fd2d84ec3151a
("initial import", 2000-09-18) and that's
presumably no longer necessary.

Comparing two 'const OUString&'s should be just fine.

Change-Id: I85c3be050ff7120aa354e6cf3726f166eb7e364a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91627
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 871ed0104556..4db985c961d9 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -536,13 +536,10 @@ void SfxViewShell::SetPrinter_Impl( VclPtr& 
pNewPrinter )
 }
 }
 
-// For the MAC to have its "temporary of class String" in next if()
-OUString aTempPrtName = pNewPrinter->GetName();
-OUString aDocPrtName = pDocPrinter->GetName();
-
 // Was the printer selection changed from Default to Specific
 // or the other way around?
-if ( (aTempPrtName != aDocPrtName) || (pDocPrinter->IsDefPrinter() != 
pNewPrinter->IsDefPrinter()) )
+if ( (pNewPrinter->GetName() != pDocPrinter->GetName())
+ || (pDocPrinter->IsDefPrinter() != pNewPrinter->IsDefPrinter()) )
 {
 nChangedFlags |= 
SfxPrinterChangeFlags::PRINTER|SfxPrinterChangeFlags::JOBSETUP;
 if ( ! (pNewPrinter->GetOptions() == pDocPrinter->GetOptions()) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Michael Weghorn (via logerrit)
 sfx2/source/view/viewprn.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 21fc54777d5dedc33d6bfa23b9f1072a6667eebe
Author: Michael Weghorn 
AuthorDate: Fri Apr 3 11:54:42 2020 +0200
Commit: Michael Weghorn 
CommitDate: Fri Apr 3 15:22:30 2020 +0200

tdf#131849 Handle changed doc print options when printer changed

Previously, the SfxPrinterChangeFlags::OPTIONS flag was
only set for the case that the printer itself was considered
unchanged ('else' case below).

However, this also needs to be done when the printer is
considered to have changed, so the flag is properly
passed in the call to 'SetPrinter' below, to make
sure that changes in document-specific options are
properly propagated.

Change-Id: Id91ebbbf40888e52149b40ac25f188af4be425f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91626
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 9dc713e82007..871ed0104556 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -545,6 +545,11 @@ void SfxViewShell::SetPrinter_Impl( VclPtr& 
pNewPrinter )
 if ( (aTempPrtName != aDocPrtName) || (pDocPrinter->IsDefPrinter() != 
pNewPrinter->IsDefPrinter()) )
 {
 nChangedFlags |= 
SfxPrinterChangeFlags::PRINTER|SfxPrinterChangeFlags::JOBSETUP;
+if ( ! (pNewPrinter->GetOptions() == pDocPrinter->GetOptions()) )
+{
+nChangedFlags |= SfxPrinterChangeFlags::OPTIONS;
+}
+
 pDocPrinter = pNewPrinter;
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Michael Weghorn (via logerrit)
 sfx2/source/view/viewprn.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 77ce19a9c63737f6b8a0281807cda5176d217251
Author: Michael Weghorn 
AuthorDate: Fri Apr 3 09:47:06 2020 +0200
Commit: Michael Weghorn 
CommitDate: Fri Apr 3 15:21:57 2020 +0200

SfxViewShell::SetPrinter_Impl: Adapt comments a bit

based on original German version of the comments, which
have been translated to English in comment
f5f7b4ef39034094546c176b884601fbc40dfcd6
("Transalations (5)", 2011-03-11).

Change-Id: I5aa378bf519a17fe9d9e0d4ab049ec8d3a254ad1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91625
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 57cd026b8990..9dc713e82007 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -501,7 +501,7 @@ void SfxViewShell::SetPrinter_Impl( VclPtr& 
pNewPrinter )
 ( bOriChg ? aNewPgSz.Height() : aNewPgSz.Width() ) ) &&
 bSizeToDoc;
 
-// Message and Flags for page format, summaries changes
+// Message and Flags for page format changes
 OUString aMsg;
 SfxPrinterChangeFlags nNewOpt = SfxPrinterChangeFlags::NONE;
 if( bOriChg && bPgSzChg )
@@ -520,7 +520,7 @@ void SfxViewShell::SetPrinter_Impl( VclPtr& 
pNewPrinter )
 nNewOpt = SfxPrinterChangeFlags::CHG_SIZE;
 }
 
-// Summaries in this variable what has been changed.
+// Summarize in this variable what has been changed.
 SfxPrinterChangeFlags nChangedFlags = SfxPrinterChangeFlags::NONE;
 
 // Ask if possible, if page format should be taken over from printer.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Regényi Balázs (via logerrit)
 oox/source/drawingml/textcharacterpropertiescontext.cxx  |6 +++
 sw/qa/extras/ooxmlexport/data/tdf131776_StrikeoutGroupShapeText.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx   |   20 
++
 3 files changed, 26 insertions(+)

New commits:
commit 143e6641cea7a06faeec8b3b65aa09b153a6490f
Author: Regényi Balázs 
AuthorDate: Thu Apr 2 10:56:08 2020 +0200
Commit: László Németh 
CommitDate: Fri Apr 3 14:34:48 2020 +0200

tdf#131776 DOCX DrawingML shape import: fix missing strikeout

The absence of simple and double strikeouts is fixed.
Co-Author: Szabolcs Toth
Co-Author: Tibor Nagy

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

diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx 
b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index b7bb876044cf..cd98b9564825 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -210,6 +210,12 @@ ContextHandlerRef 
TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl
 break;
 case W_TOKEN( bCs ):
 break;
+case W_TOKEN( strike ):
+mrTextCharacterProperties.moStrikeout = XML_sngStrike;
+break;
+case W_TOKEN( dstrike ):
+mrTextCharacterProperties.moStrikeout = XML_dblStrike;
+break;
 case W_TOKEN( color ):
 if (rAttribs.getInteger(W_TOKEN(val)).has())
 {
diff --git 
a/sw/qa/extras/ooxmlexport/data/tdf131776_StrikeoutGroupShapeText.docx 
b/sw/qa/extras/ooxmlexport/data/tdf131776_StrikeoutGroupShapeText.docx
new file mode 100644
index ..b464f35e2f7e
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf131776_StrikeoutGroupShapeText.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index cff728463f28..fafe1cfe2b02 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -759,6 +759,26 @@ DECLARE_OOXMLEXPORT_TEST(testHyphenationAuto, 
"hyphenation.odt")
 assertXPath(pXmlStyles, 
"/w:styles/w:docDefaults/w:pPrDefault/w:pPr/w:suppressAutoHyphens", "val", 
"true");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testStrikeoutGroupShapeText, 
"tdf131776_StrikeoutGroupShapeText.docx")
+{
+// tdf#131776: Check if strikeout is used in shape group texts
+xmlDocPtr pXml = parseExport("word/document.xml");
+if (!pXml)
+return;
+
+// double strike
+assertXPath(pXml, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+"wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:dstrike");
+assertXPathNoAttribute(pXml, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+"wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:dstrike", "val");
+
+// simple strike
+assertXPath(pXml, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+"wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:strike");
+assertXPathNoAttribute(pXml, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+"wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:strike", "val");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/gbuild

2020-04-03 Thread Rene Engelhard (via logerrit)
 solenv/gbuild/UITest.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d5a1378d5d78d7bc88ad8754de9dbc174b636944
Author: Rene Engelhard 
AuthorDate: Fri Apr 3 13:45:49 2020 +0200
Commit: Rene Engelhard 
CommitDate: Fri Apr 3 14:34:05 2020 +0200

tdf#131835: don't set PYTHONWARNINGS=error if --enable-werror isn't set

python 3.8 at least throws DeprecationWarnings for imp->importlib and some
FutureWarnings.
Allow to disable as for the build warnings-are-errors.

Change-Id: Id5ada39f960f014108f2584e3e333741f6345acd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91623
Reviewed-by: Noel Grandin 
Reviewed-by: Rene Engelhard 
Tested-by: Jenkins
Tested-by: Rene Engelhard 

diff --git a/solenv/gbuild/UITest.mk b/solenv/gbuild/UITest.mk
index e428dbd03c48..5b5c6d47298e 100644
--- a/solenv/gbuild/UITest.mk
+++ b/solenv/gbuild/UITest.mk
@@ -73,7 +73,7 @@ else
PYTHONPATH="$(PYPATH)" \
TestUserDir="$(call gb_Helper_make_url,$(dir $(call 
gb_UITest_get_target,$*)))" \
PYTHONDONTWRITEBYTECODE=0 \
-   PYTHONWARNINGS=error \
+   $(if $(ENABLE_WERROR),PYTHONWARNINGS=error) \
$(gb_TEST_ENV_VARS) \
$(gb_UITest_COMMAND) \
--soffice="$(gb_UITest_SOFFICEARG)" \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/inc/content.hxx   |   15 +++
 sw/source/uibase/utlui/content.cxx |   13 +++--
 2 files changed, 26 insertions(+), 2 deletions(-)

New commits:
commit f79a67a3d09db860b7bb783cdf9e28a5dcd39ea4
Author: Caolán McNamara 
AuthorDate: Fri Apr 3 12:01:23 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 3 14:11:49 2020 +0200

restore pseudo-level indent for sections

which went missing in...

commit 5a2c0ab29719ac914d30d8789c0e386541702cbf
Author: Caolán McNamara 
Date:   Fri Feb 28 11:13:12 2020 +

weld writer navigator

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

diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx
index 4bb37efaa544..414db7068dcb 100644
--- a/sw/source/uibase/inc/content.hxx
+++ b/sw/source/uibase/inc/content.hxx
@@ -53,6 +53,21 @@ class SwOutlineContent : public SwContent
 boolIsMoveable() const {return bIsMoveable;};
 };
 
+class SwRegionContent : public SwContent
+{
+
+sal_uInt8   nRegionLevel;
+
+public:
+SwRegionContent(const SwContentType* pCnt,
+const OUString& rName,
+sal_uInt8 nLevel,
+long nYPos) :
+SwContent(pCnt, rName, nYPos),
+nRegionLevel(nLevel){}
+sal_uInt8   GetRegionLevel() const {return nRegionLevel;}
+};
+
 class SwURLFieldContent : public SwContent
 {
 OUString sURL;
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 54f3c6e94caf..db829431569f 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -369,7 +369,8 @@ void SwContentType::Init(bool* pbInvalidateWindow)
 pParentFormat = pParentFormat->GetParent();
 }
 
-std::unique_ptr pCnt(new SwContent(this, 
rSectionName,
+std::unique_ptr pCnt(new SwRegionContent(this, 
rSectionName,
+nLevel,
 pFormat->FindLayoutRect( false, &aNullPt ).Top()));
 
 SwPtrMsgPoolItem aAskItem( RES_CONTENT_VISIBLE, nullptr );
@@ -674,7 +675,8 @@ void SwContentType::FillMemberList(bool* 
pbLevelOrVisibilityChanged)
 pParentFormat = pParentFormat->GetParent();
 }
 
-std::unique_ptr pCnt(new SwContent(this, 
sSectionName,
+std::unique_ptr pCnt(new SwRegionContent(this, 
sSectionName,
+nLevel,
 pFormat->FindLayoutRect( false, &aNullPt ).Top()));
 if( !pFormat->GetInfo( aAskItem ) &&
 !aAskItem.pObject ) // not visible
@@ -1482,6 +1484,7 @@ bool SwContentTree::RequestingChildren(const 
weld::TreeIter& rParent)
 }
 else
 {
+bool bRegion = pCntType->GetType() == ContentTypeId::REGION;
 for(size_t i = 0; i < nCount; ++i)
 {
 const SwContent* pCnt = pCntType->GetMember(i);
@@ -1493,6 +1496,8 @@ bool SwContentTree::RequestingChildren(const 
weld::TreeIter& rParent)
 OUString 
sId(OUString::number(reinterpret_cast(pCnt)));
 insert(&rParent, sEntry, sId, nullptr, false, 
xChild.get());
 m_xTreeView->set_sensitive(*xChild, !pCnt->IsInvisible());
+if (bRegion)
+m_xTreeView->set_extra_row_indent(*xChild, 
static_cast(pCnt)->GetRegionLevel());
 bChild = true;
 }
 }
@@ -1954,6 +1959,8 @@ void SwContentTree::Display( bool bActive )
 
 if (!bChOnDemand)
 {
+bool bRegion = rpRootContentT->GetType() == 
ContentTypeId::REGION;
+
 std::unique_ptr xChild = 
m_xTreeView->make_iterator();
 for (size_t i = 0; i < rpRootContentT->GetMemberCount(); ++i)
 {
@@ -1966,6 +1973,8 @@ void SwContentTree::Display( bool bActive )
 OUString 
sSubId(OUString::number(reinterpret_cast(pCnt)));
 insert(xEntry.get(), sEntry, sSubId, nullptr, false, 
xChild.get());
 m_xTreeView->set_sensitive(*xChild, 
!pCnt->IsInvisible());
+if (bRegion)
+m_xTreeView->set_extra_row_indent(*xChild, 
static_cast(pCnt)->GetRegionLevel());
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/protocol.txt

2020-04-03 Thread Tor Lillqvist (via logerrit)
 wsd/protocol.txt |8 
 1 file changed, 8 insertions(+)

New commits:
commit 07a3dcf65152fb5739afa4497e745e8e230670fc
Author: Tor Lillqvist 
AuthorDate: Fri Apr 3 13:46:06 2020 +0300
Commit: Tor Lillqvist 
CommitDate: Fri Apr 3 14:54:35 2020 +0300

Mention that parameters in some messages are actually positional

Change-Id: Ifeb09f96ab43784d428f6ad1cbcdbfc27e6595c9

diff --git a/wsd/protocol.txt b/wsd/protocol.txt
index fd94c741f..40ceb0de1 100644
--- a/wsd/protocol.txt
+++ b/wsd/protocol.txt
@@ -21,6 +21,14 @@ spontaneously. For 'tile' messages, the client may send a 
bunch of
 tile requests without waiting for return messages. The server may send
 tiles proactively (guessing what the client might need). Etc.
 
+The original intent was that the parameters of the messages can be in
+any order, as they are in a name=value form anyway and the name
+indicates which parameter is which. Sadly, this was not explicitly
+mentioned in this document, or tested by unit tests. So now we have
+code here and there that assumes that parameters are in a specific
+order anyway, thus losing the benefits of the named parameters. Oh
+well.
+
 client -> server
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2020-04-03 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 65c2ba2daa61e1a7e9faca680abefb13544f04fc
Author: Seth Chaiklin 
AuthorDate: Fri Apr 3 11:59:45 2020 +0100
Commit: Gerrit Code Review 
CommitDate: Fri Apr 3 12:59:45 2020 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 27b94eb0ef058daa252f98391c081e64ecd89a6d
  - update variable name in Field help page

Change-Id: I0b383bc1c59f1627549844f998dfa0389053434a
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/91518
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/helpcontent2 b/helpcontent2
index b6a60949a44d..27b94eb0ef05 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b6a60949a44df45c1ea13dcd5c7330d327860233
+Subproject commit 27b94eb0ef058daa252f98391c081e64ecd89a6d
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Seth Chaiklin (via logerrit)
 source/text/swriter/01/04090002.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 27b94eb0ef058daa252f98391c081e64ecd89a6d
Author: Seth Chaiklin 
AuthorDate: Fri Apr 3 11:56:42 2020 +0100
Commit: Seth Chaiklin 
CommitDate: Fri Apr 3 12:59:45 2020 +0200

update variable name in Field help page

Change-Id: I0b383bc1c59f1627549844f998dfa0389053434a
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/91518
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/source/text/swriter/01/04090002.xhp 
b/source/text/swriter/01/04090002.xhp
index 8bc1fdfd0..0478817a3 100644
--- a/source/text/swriter/01/04090002.xhp
+++ b/source/text/swriter/01/04090002.xhp
@@ -234,7 +234,7 @@
 
 Name
 
-Type the name 
of the user-defined field that you want to create. To set a 
target, click "Set Reference" in the Type list, type a name in 
this box, and then click Insert. To reference the new target, 
click the target name in the Selection list.
+Type the name of 
the user-defined field that you want to create. To set a 
target, click "Set Reference" in the Type list, type a name in 
this box, and then click Insert. To reference the new target, 
click the target name in the Selection list.
 
 In a master 
document, targets that are in different sub-documents are not displayed in 
the Selection list. If you want to insert a reference to the 
target, you must type the path and the name in the Name 
box.
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - opencl/source package/source

2020-04-03 Thread Noel Grandin (via logerrit)
 opencl/source/OpenCLZone.cxx|   24 
 package/source/manifest/ManifestImport.cxx  |  252 
 package/source/xstor/owriteablestream.cxx   |  316 +-
 package/source/xstor/xstorage.cxx   |  534 -
 package/source/zipapi/XUnbufferedStream.cxx |   34 -
 package/source/zipapi/ZipOutputEntry.cxx|   44 -
 package/source/zippackage/ZipPackage.cxx|  876 ++--
 7 files changed, 1041 insertions(+), 1039 deletions(-)

New commits:
commit 7bf522852570b562757818ae0cef379e2408bc7b
Author: Noel Grandin 
AuthorDate: Fri Apr 3 10:49:37 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 3 12:39:54 2020 +0200

loplugin:flatten in package

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

diff --git a/package/source/manifest/ManifestImport.cxx 
b/package/source/manifest/ManifestImport.cxx
index 0841c7be402c..952309ca82ec 100644
--- a/package/source/manifest/ManifestImport.cxx
+++ b/package/source/manifest/ManifestImport.cxx
@@ -215,94 +215,97 @@ void ManifestImport::doEncryptionData(StringHashMap 
&rConvertedAttribs)
 // to import the initialisation vector, salt and iteration count used
 nDerivedKeySize = 0;
 OUString aString = rConvertedAttribs[gsChecksumTypeAttribute];
-if ( !bIgnoreEncryptData ) {
-if ( aString == gsSHA1_1k_Name || aString == gsSHA1_1k_URL ) {
-aSequence[PKG_MNFST_DIGESTALG].Name = gsDigestAlgProperty;
-aSequence[PKG_MNFST_DIGESTALG].Value <<= 
xml::crypto::DigestID::SHA1_1K;
-} else if ( aString == gsSHA256_1k_URL ) {
-aSequence[PKG_MNFST_DIGESTALG].Name = gsDigestAlgProperty;
-aSequence[PKG_MNFST_DIGESTALG].Value <<= 
xml::crypto::DigestID::SHA256_1K;
-} else
-bIgnoreEncryptData = true;
+if ( bIgnoreEncryptData )
+return;
 
-if ( !bIgnoreEncryptData ) {
-aString = rConvertedAttribs[gsChecksumAttribute];
-uno::Sequence < sal_Int8 > aDecodeBuffer;
-::comphelper::Base64::decode(aDecodeBuffer, aString);
-aSequence[PKG_MNFST_DIGEST].Name = gsDigestProperty;
-aSequence[PKG_MNFST_DIGEST].Value <<= aDecodeBuffer;
-}
+if ( aString == gsSHA1_1k_Name || aString == gsSHA1_1k_URL ) {
+aSequence[PKG_MNFST_DIGESTALG].Name = gsDigestAlgProperty;
+aSequence[PKG_MNFST_DIGESTALG].Value <<= 
xml::crypto::DigestID::SHA1_1K;
+} else if ( aString == gsSHA256_1k_URL ) {
+aSequence[PKG_MNFST_DIGESTALG].Name = gsDigestAlgProperty;
+aSequence[PKG_MNFST_DIGESTALG].Value <<= 
xml::crypto::DigestID::SHA256_1K;
+} else
+bIgnoreEncryptData = true;
+
+if ( !bIgnoreEncryptData ) {
+aString = rConvertedAttribs[gsChecksumAttribute];
+uno::Sequence < sal_Int8 > aDecodeBuffer;
+::comphelper::Base64::decode(aDecodeBuffer, aString);
+aSequence[PKG_MNFST_DIGEST].Name = gsDigestProperty;
+aSequence[PKG_MNFST_DIGEST].Value <<= aDecodeBuffer;
 }
 }
 
 void ManifestImport::doAlgorithm(StringHashMap &rConvertedAttribs)
 {
-if ( !bIgnoreEncryptData ) {
-OUString aString = rConvertedAttribs[gsAlgorithmNameAttribute];
-if ( aString == gsBlowfish_Name || aString == gsBlowfish_URL ) {
-aSequence[PKG_MNFST_ENCALG].Name = gsEncryptionAlgProperty;
-aSequence[PKG_MNFST_ENCALG].Value <<= 
xml::crypto::CipherID::BLOWFISH_CFB_8;
-} else if ( aString == gsAES256_URL ) {
-aSequence[PKG_MNFST_ENCALG].Name = gsEncryptionAlgProperty;
-aSequence[PKG_MNFST_ENCALG].Value <<= 
xml::crypto::CipherID::AES_CBC_W3C_PADDING;
-OSL_ENSURE( !nDerivedKeySize || nDerivedKeySize == 32, "Unexpected 
derived key length!" );
-nDerivedKeySize = 32;
-} else if ( aString == gsAES192_URL ) {
-aSequence[PKG_MNFST_ENCALG].Name = gsEncryptionAlgProperty;
-aSequence[PKG_MNFST_ENCALG].Value <<= 
xml::crypto::CipherID::AES_CBC_W3C_PADDING;
-OSL_ENSURE( !nDerivedKeySize || nDerivedKeySize == 24, "Unexpected 
derived key length!" );
-nDerivedKeySize = 24;
-} else if ( aString == gsAES128_URL ) {
-aSequence[PKG_MNFST_ENCALG].Name = gsEncryptionAlgProperty;
-aSequence[PKG_MNFST_ENCALG].Value <<= 
xml::crypto::CipherID::AES_CBC_W3C_PADDING;
-OSL_ENSURE( !nDerivedKeySize || nDerivedKeySize == 16, "Unexpected 
derived key length!" );
-nDerivedKeySize = 16;
-} else
-bIgnoreEncryptData = true;
+if ( bIgnoreEncryptData )
+return;
 
-if ( !bIgnoreEncryptData ) {
-aString = rConvertedAttribs[gsInitialisationVectorAttribute];
-uno::Sequence < sal_Int8 > aDecodeBuffer;
-::comphelper::Base64::decode(aDecodeBuffer, aString)

[Libreoffice-commits] core.git: translations

2020-04-03 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit af95bda66d4f114c5935a8ff4ca7ac0e6faec86a
Author: Christian Lohmaier 
AuthorDate: Fri Apr 3 12:31:39 2020 +0200
Commit: Gerrit Code Review 
CommitDate: Fri Apr 3 12:31:39 2020 +0200

Update git submodules

* Update translations from branch 'master'
  to 0a73e51795ef412006c59d3723f265fed445dea1
  - update translations from weblate

and force-fix errors using pocheck

Change-Id: I64fe815a46b844bc1c9e53327d7e9367f0f589ec

diff --git a/translations b/translations
index 7b4a46ae144e..0a73e51795ef 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 7b4a46ae144ea71701de6d479c3c6ef74610e52c
+Subproject commit 0a73e51795ef412006c59d3723f265fed445dea1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Noel Grandin (via logerrit)
 oox/source/core/filterbase.cxx  |   34 -
 oox/source/core/filterdetect.cxx|   32 
 oox/source/core/xmlfilterbase.cxx   |  114 +--
 oox/source/docprop/docprophandler.cxx   |  126 +--
 oox/source/docprop/ooxmldocpropimport.cxx   |   42 -
 oox/source/drawingml/chart/chartdrawingfragment.cxx |   42 -
 oox/source/drawingml/chart/converterbase.cxx|   85 +-
 oox/source/drawingml/chart/objectformatter.cxx  |  232 +++---
 oox/source/drawingml/chart/plotareaconverter.cxx|   10 
 oox/source/drawingml/chart/seriesconverter.cxx  |   86 +-
 oox/source/drawingml/chart/titleconverter.cxx   |   62 +
 oox/source/drawingml/chart/typegroupconverter.cxx   |  158 ++--
 oox/source/drawingml/fillproperties.cxx |  680 ++--
 oox/source/drawingml/lineproperties.cxx |  108 +--
 oox/source/drawingml/shape.cxx  |   36 -
 oox/source/drawingml/textbodyproperties.cxx |   31 
 oox/source/dump/dumperbase.cxx  |   48 -
 oox/source/dump/oledumper.cxx   |   96 +-
 oox/source/export/chartexport.cxx   |  511 +++
 oox/source/export/drawingml.cxx |  380 +--
 oox/source/export/vmlexport.cxx |   64 -
 oox/source/helper/binaryoutputstream.cxx|   24 
 oox/source/helper/propertymap.cxx   |   22 
 oox/source/helper/storagebase.cxx   |   36 -
 oox/source/helper/zipstorage.cxx|5 
 oox/source/ole/axcontrol.cxx|5 
 oox/source/ole/olehelper.cxx|   92 +-
 oox/source/ole/vbacontrol.cxx   |  225 +++---
 oox/source/ole/vbaproject.cxx   |   16 
 oox/source/ppt/pptimport.cxx|   35 -
 oox/source/ppt/pptshapegroupcontext.cxx |   30 
 oox/source/ppt/presentationfragmenthandler.cxx  |   84 +-
 oox/source/ppt/slidepersist.cxx |  174 ++---
 oox/source/ppt/soundactioncontext.cxx   |   40 -
 oox/source/ppt/timenodelistcontext.cxx  |  214 +++---
 oox/source/shape/ShapeContextHandler.cxx|   26 
 oox/source/vml/vmlformatting.cxx|   80 +-
 oox/source/vml/vmlshape.cxx |   52 -
 oox/source/vml/vmltextbox.cxx   |   30 
 39 files changed, 2104 insertions(+), 2063 deletions(-)

New commits:
commit b8f15244054aea276152494ee9f79318a70658e7
Author: Noel Grandin 
AuthorDate: Fri Apr 3 11:09:04 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 3 12:18:17 2020 +0200

loplugin:flatten in oox

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

diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index 0cb7f2a264b1..94f7c08c9b20 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -407,25 +407,25 @@ void SAL_CALL FilterBase::initialize( const Sequence< Any 
>& rArgs )
 {
 }
 
-if (rArgs.hasElements())
+if (!rArgs.hasElements())
+return;
+
+Sequence aSeq;
+rArgs[0] >>= aSeq;
+for (const auto& rVal : std::as_const(aSeq))
 {
-Sequence aSeq;
-rArgs[0] >>= aSeq;
-for (const auto& rVal : std::as_const(aSeq))
+if (rVal.Name == "UserData")
+{
+css::uno::Sequence aUserDataSeq;
+rVal.Value >>= aUserDataSeq;
+if (comphelper::findValue(aUserDataSeq, "macro-enabled") != -1)
+mxImpl->mbExportVBA = true;
+}
+else if (rVal.Name == "Flags")
 {
-if (rVal.Name == "UserData")
-{
-css::uno::Sequence aUserDataSeq;
-rVal.Value >>= aUserDataSeq;
-if (comphelper::findValue(aUserDataSeq, "macro-enabled") != -1)
-mxImpl->mbExportVBA = true;
-}
-else if (rVal.Name == "Flags")
-{
-sal_Int32 nFlags(0);
-rVal.Value >>= nFlags;
-mxImpl->mbExportTemplate = 
bool(static_cast(nFlags) & SfxFilterFlags::TEMPLATE);
-}
+sal_Int32 nFlags(0);
+rVal.Value >>= nFlags;
+mxImpl->mbExportTemplate = 
bool(static_cast(nFlags) & SfxFilterFlags::TEMPLATE);
 }
 }
 }
diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx
index b63d355ed506..c8ce03acb75c 100644
--- a/oox/source/core/filterdetect.cxx
+++ b/oox/source/core/filterdetect.cxx
@@ -142,25 +142,25 @@ void SAL_CALL FilterDetectDocHandler::characters( const 
OUString& /*aChars*/ )
 void FilterDetectDocHandler::parseRelationship( const AttributeList& rAttribs )
 {
 OUString aType = rA

[Libreoffice-commits] core.git: extras/Gallery_bullets.mk extras/Module_extras.mk extras/Package_gallbullets.mk extras/Package_gallsystem.mk extras/source Repository.mk scp2/source

2020-04-03 Thread Heiko Tietze (via logerrit)
 Repository.mk |1 
 extras/Gallery_bullets.mk |   39 -
 extras/Module_extras.mk   |2 
 extras/Package_gallbullets.mk |  107 ++
 extras/Package_gallsystem.mk  |3 
 extras/source/gallery/bullets/Bullet01-Circle-DarkRed.svg |1 
 extras/source/gallery/bullets/Bullet02-Circle-Blue.svg|1 
 extras/source/gallery/bullets/Bullet03-Circle-Green.svg   |1 
 extras/source/gallery/bullets/Bullet04-Square-Black.svg   |1 
 extras/source/gallery/bullets/Bullet05-Square-Orange.svg  |1 
 extras/source/gallery/bullets/Bullet06-Square-Purple.svg  |1 
 extras/source/gallery/bullets/Bullet07-Diamond-Blue.svg   |1 
 extras/source/gallery/bullets/Bullet08-Diamond-LightBlue.svg  |1 
 extras/source/gallery/bullets/Bullet09-Diamond-Red.svg|1 
 extras/source/gallery/bullets/Bullet10-Star-Yellow.svg|1 
 extras/source/gallery/bullets/Bullet11-Star-Blue.svg  |1 
 extras/source/gallery/bullets/Bullet12-Triangle-Blue.svg  |1 
 extras/source/gallery/bullets/Bullet13-Triangle-DarkGreen.svg |1 
 extras/source/gallery/bullets/Bullet14-Arrow-Red.svg  |1 
 extras/source/gallery/bullets/Bullet15-Arrow-Blue.svg |1 
 extras/source/gallery/bullets/Bullet16-Box-Blue.svg   |1 
 extras/source/gallery/bullets/Bullet17-Box-Red.svg|1 
 extras/source/gallery/bullets/Bullet18-Asterisk-LightBlue.svg |1 
 extras/source/gallery/bullets/Bullet19-Leaves-Red.svg |1 
 extras/source/gallery/bullets/Bullet20-Target-Blue.svg|1 
 extras/source/gallery/bullets/Bullet21-Arrow-Blue.svg |1 
 extras/source/gallery/bullets/Bullet22-Arrow-DarkBlue.svg |1 
 extras/source/gallery/bullets/Bullet23-Arrow-Brown.svg|1 
 extras/source/gallery/bullets/Bullet24-Flag-Red.svg   |1 
 extras/source/gallery/bullets/Bullet25-Flag-Green.svg |1 
 extras/source/gallery/bullets/Bullet26-X-Red.svg  |1 
 extras/source/gallery/bullets/Bullet27-X-Black.svg|1 
 extras/source/gallery/bullets/Bullet28-Checkmark-Green.svg|1 
 extras/source/gallery/bullets/Bullet29-Checkmark-Blue.svg |1 
 extras/source/gallery/bullets/Bullet30-Square-DarkRed.svg |1 
 extras/source/gallery/bullets/ball.svg|  386 --
 extras/source/gallery/bullets/blkpearl.gif|binary
 extras/source/gallery/bullets/bluarrow.gif|binary
 extras/source/gallery/bullets/bluball.gif |binary
 extras/source/gallery/bullets/bludiamd.gif|binary
 extras/source/gallery/bullets/bluered.gif |binary
 extras/source/gallery/bullets/blusqare.gif|binary
 extras/source/gallery/bullets/blustar.gif |binary
 extras/source/gallery/bullets/book.svg|  322 
 extras/source/gallery/bullets/bullets.str |2 
 extras/source/gallery/bullets/check.svg   |1 
 extras/source/gallery/bullets/checkbox.svg|2 
 extras/source/gallery/bullets/circle-gray.svg |1 
 extras/source/gallery/bullets/circle-green.svg|1 
 extras/source/gallery/bullets/circle-red.svg  |1 
 extras/source/gallery/bullets/circle-yellow.svg   |1 
 extras/source/gallery/bullets/coffee_1.gif|binary
 extras/source/gallery/bullets/coffee_2.gif|binary
 extras/source/gallery/bullets/coffee_3.gif|binary
 extras/source/gallery/bullets/coffee_4.gif|binary
 extras/source/gallery/bullets/coffee_5.gif|binary
 extras/source/gallery/bullets/con-blue.gif|binary
 extras/source/gallery/bullets/con-cyan.gif|binary
 extras/source/gallery/bullets/con-green.gif   |binary
 extras/source/gallery/bullets/con-lilac.gif   |binary
 extras/source/gallery/bullets/con-oran.gif|binary
 extras/source/gallery/bullets/con-pink.gif|binary
 extras/source/gallery/bullets/con-red.gif |binary
 extras/source/gallery/bullets/con-yellow.gif  |binary
 extras/source/gallery/bullets/corner_1.gif|binary
 extras/source/gallery/bullets/corner_2.gif|binary
 extras/source/gallery/bullets/corner_3.gif|binary
 extras/source/gallery/bullets/corner_4.gif|binary
 extras/source/gallery/bullets/cross.svg   |1 
 extras/source/gallery/bullets/darkball.gif|binary
 extras/

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

2020-04-03 Thread Xisco Fauli (via logerrit)
 dev/null |binary
 sc/qa/unit/uicalc/uicalc.cxx |4 +++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 9edd1b74edc222650d19b9feff6e40c3cfbfa477
Author: Xisco Fauli 
AuthorDate: Fri Apr 3 11:03:05 2020 +0200
Commit: Xisco Faulí 
CommitDate: Fri Apr 3 12:13:42 2020 +0200

uicalc: no need to use an empty document

Change-Id: Id1c42b7c4f0f406d2979334d7b71fc20d7ff8620
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91615
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/sc/qa/unit/uicalc/data/empty.ods b/sc/qa/unit/uicalc/data/empty.ods
deleted file mode 100644
index 0c797725af28..
Binary files a/sc/qa/unit/uicalc/data/empty.ods and /dev/null differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 222849673095..694644b77df3 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -151,7 +151,9 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf124815)
 
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf83901)
 {
-ScModelObj* pModelObj = createDoc("empty.ods");
+mxComponent = loadFromDesktop("private:factory/scalc");
+ScModelObj* pModelObj = dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pModelObj);
 ScDocument* pDoc = pModelObj->GetDocument();
 CPPUNIT_ASSERT(pDoc);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Xisco Fauli (via logerrit)
 sd/qa/unit/uiimpress.cxx |   39 +++
 1 file changed, 39 insertions(+)

New commits:
commit 3acf7f20bdf8a54544b459235a84b5c26539a561
Author: Xisco Fauli 
AuthorDate: Thu Apr 2 18:49:05 2020 +0200
Commit: Xisco Faulí 
CommitDate: Fri Apr 3 12:13:10 2020 +0200

tdf#127481: Add unittest

Change-Id: I8e0fa60eb6a10be6c7f7b1d1742e236a790e74a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91599
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 0950215e00b3..31c76fdbd0a9 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -15,12 +15,14 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -226,6 +228,43 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf129346)
 checkCurrentPageNumber(1);
 }
 
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf127481)
+{
+mxComponent = loadFromDesktop("private:factory/simpress",
+  
"com.sun.star.presentation.PresentationDocument");
+
+CPPUNIT_ASSERT(mxComponent.is());
+
+auto pXImpressDocument = 
dynamic_cast(mxComponent.get());
+sd::ViewShell* pViewShell = 
pXImpressDocument->GetDocShell()->GetViewShell();
+SdPage* pActualPage = pViewShell->GetActualPage();
+CPPUNIT_ASSERT_EQUAL(static_cast(2), pActualPage->GetObjCount());
+
+uno::Sequence aArgs(comphelper::InitPropertySequence(
+{ { "Rows", uno::makeAny(sal_Int32(1)) }, { "Columns", 
uno::makeAny(sal_Int32(1)) } }));
+
+dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(static_cast(3), pActualPage->GetObjCount());
+
+dispatchCommand(mxComponent, ".uno:DuplicatePage", aArgs);
+Scheduler::ProcessEventsToIdle();
+
+checkCurrentPageNumber(2);
+
+pActualPage = pViewShell->GetActualPage();
+CPPUNIT_ASSERT_EQUAL(static_cast(3), pActualPage->GetObjCount());
+
+auto pTableObject = 
dynamic_cast(pActualPage->GetObj(2));
+CPPUNIT_ASSERT(pTableObject);
+
+//without the fix, it would crash here
+pViewShell->GetView()->SdrBeginTextEdit(pTableObject);
+
+CPPUNIT_ASSERT_EQUAL(static_cast(3), pActualPage->GetObjCount());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/clang UnoControls/source vcl/inc xmlhelp/source xmlsecurity/inc

2020-04-03 Thread Noel Grandin (via logerrit)
 UnoControls/source/inc/OConnectionPointContainerHelper.hxx |2 +-
 UnoControls/source/inc/OConnectionPointHelper.hxx  |2 +-
 UnoControls/source/inc/framecontrol.hxx|7 +++
 UnoControls/source/inc/progressbar.hxx |5 ++---
 UnoControls/source/inc/progressmonitor.hxx |6 ++
 UnoControls/source/inc/statusindicator.hxx |5 ++---
 compilerplugins/clang/finalclasses.py  |6 --
 vcl/inc/headless/svpdummies.hxx|2 +-
 vcl/inc/headless/svpframe.hxx  |2 +-
 vcl/inc/salvtables.hxx |6 +++---
 vcl/inc/skia/x11/textrender.hxx|2 +-
 vcl/inc/watchdog.hxx   |2 +-
 xmlhelp/source/cxxhelp/inc/tvfactory.hxx   |2 +-
 xmlhelp/source/cxxhelp/inc/tvread.hxx  |2 +-
 xmlsecurity/inc/certificatechooser.hxx |2 +-
 xmlsecurity/inc/certificateviewer.hxx  |2 +-
 xmlsecurity/inc/digitalsignaturesdialog.hxx|2 +-
 17 files changed, 27 insertions(+), 30 deletions(-)

New commits:
commit d9e478330243cbd120f2de33dffec2ef9217
Author: Noel Grandin 
AuthorDate: Fri Apr 3 10:16:22 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 3 11:37:53 2020 +0200

loplugin:finalclasses in xmlsecurity..UnoControls

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

diff --git a/UnoControls/source/inc/OConnectionPointContainerHelper.hxx 
b/UnoControls/source/inc/OConnectionPointContainerHelper.hxx
index 45579f33f200..a1a8a34178a7 100644
--- a/UnoControls/source/inc/OConnectionPointContainerHelper.hxx
+++ b/UnoControls/source/inc/OConnectionPointContainerHelper.hxx
@@ -27,7 +27,7 @@ namespace com::sun::star::lang { class XConnectionPoint; }
 
 namespace unocontrols {
 
-class OConnectionPointContainerHelper   :   public  
css::lang::XConnectionPointContainer
+class OConnectionPointContainerHelper final :   public  
css::lang::XConnectionPointContainer
 ,   public  ::cppu::OWeakObject
 {
 public:
diff --git a/UnoControls/source/inc/OConnectionPointHelper.hxx 
b/UnoControls/source/inc/OConnectionPointHelper.hxx
index 9cd5a7907396..f075b071a3cb 100644
--- a/UnoControls/source/inc/OConnectionPointHelper.hxx
+++ b/UnoControls/source/inc/OConnectionPointHelper.hxx
@@ -28,7 +28,7 @@ namespace unocontrols { class 
OConnectionPointContainerHelper; }
 
 namespace unocontrols {
 
-class OConnectionPointHelper:   public  css::lang::XConnectionPoint
+class OConnectionPointHelper final :   public  css::lang::XConnectionPoint
 ,   public  ::cppu::OWeakObject
 {
 public:
diff --git a/UnoControls/source/inc/framecontrol.hxx 
b/UnoControls/source/inc/framecontrol.hxx
index 2261490421b8..dad27d8f8f2f 100644
--- a/UnoControls/source/inc/framecontrol.hxx
+++ b/UnoControls/source/inc/framecontrol.hxx
@@ -31,7 +31,7 @@ namespace unocontrols { class 
OConnectionPointContainerHelper; }
 
 namespace unocontrols {
 
-class FrameControl  : public css::awt::XControlModel
+class FrameControl final : public css::awt::XControlModel
 , public css::lang::XConnectionPointContainer
 , public BaseControl// 
This order is necessary for right initialization of m_aMutex!
 , public ::cppu::OBroadcastHelper
@@ -130,7 +130,8 @@ public:
 
 static OUString impl_getStaticImplementationName();
 
-protected:
+private:
+
 using OPropertySetHelper::getFastPropertyValue;
 
 //  OPropertySetHelper
@@ -162,8 +163,6 @@ protected:
 const css::uno::Reference< css::awt::XWindowPeer >& xParentPeer
 ) override;
 
-private:
-
 void impl_createFrame(  const css::uno::Reference< css::awt::XWindowPeer 
>&   xPeer   ,
 const OUString&
 sURL,
 const css::uno::Sequence< 
css::beans::PropertyValue >&seqArguments);
diff --git a/UnoControls/source/inc/progressbar.hxx 
b/UnoControls/source/inc/progressbar.hxx
index 8a3f4db1b181..a85fd731de4a 100644
--- a/UnoControls/source/inc/progressbar.hxx
+++ b/UnoControls/source/inc/progressbar.hxx
@@ -39,7 +39,7 @@ namespace unocontrols {
 #define PROGRESSBAR_LINECOLOR_BRIGHTsal_Int32(Color( 0x00, 0xFF, 0xFF, 
0xFF )) // white
 #define PROGRESSBAR_LINECOLOR_SHADOWsal_Int32(Color( 0x00, 0x00, 0x00, 
0x00 )) // black
 
-class ProgressBar   : public css::awt::XControlModel
+class ProgressBar final : public css::awt::XControlModel
 , public css::awt::XProgressBar

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

2020-04-03 Thread Noel Grandin (via logerrit)
 pyuno/source/loader/pyuno_loader.cxx  |   82 +-
 pyuno/source/module/pyuno_module.cxx  |   26 +-
 pyuno/source/module/pyuno_runtime.cxx |   60 
 pyuno/source/module/pyuno_util.cxx|   54 +++---
 4 files changed, 111 insertions(+), 111 deletions(-)

New commits:
commit 50abf47628ad20c3104149a900313f62c34bac9f
Author: Noel Grandin 
AuthorDate: Fri Apr 3 10:43:38 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 3 11:37:36 2020 +0200

loplugin:flatten in pyuno

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

diff --git a/pyuno/source/loader/pyuno_loader.cxx 
b/pyuno/source/loader/pyuno_loader.cxx
index b2a89749b98d..c7b7b7289b86 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -180,62 +180,62 @@ namespace {
 struct PythonInit
 {
 PythonInit() {
-if (! Py_IsInitialized()) // may be inited by getComponentContext() already
-{
-OUString pythonPath;
-OUString pythonHome;
-OUString path( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" 
SAL_CONFIGFILE("pythonloader.uno" ));
-rtl::Bootstrap::expandMacros(path); //TODO: detect failure
-rtl::Bootstrap bootstrap(path);
+if ( Py_IsInitialized()) // may be inited by getComponentContext() already
+return;
 
-// look for pythonhome
-bootstrap.getFrom( "PYUNO_LOADER_PYTHONHOME", pythonHome );
-bootstrap.getFrom( "PYUNO_LOADER_PYTHONPATH", pythonPath );
+OUString pythonPath;
+OUString pythonHome;
+OUString path( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" 
SAL_CONFIGFILE("pythonloader.uno" ));
+rtl::Bootstrap::expandMacros(path); //TODO: detect failure
+rtl::Bootstrap bootstrap(path);
 
-// pythonhome+pythonpath must be set before Py_Initialize(), otherwise 
there appear warning on the console
-// sadly, there is no api for setting the pythonpath, we have to use 
the environment variable
-if( !pythonHome.isEmpty() )
-setPythonHome( pythonHome );
+// look for pythonhome
+bootstrap.getFrom( "PYUNO_LOADER_PYTHONHOME", pythonHome );
+bootstrap.getFrom( "PYUNO_LOADER_PYTHONPATH", pythonPath );
 
-if( !pythonPath.isEmpty() )
-prependPythonPath( pythonPath );
+// pythonhome+pythonpath must be set before Py_Initialize(), otherwise 
there appear warning on the console
+// sadly, there is no api for setting the pythonpath, we have to use the 
environment variable
+if( !pythonHome.isEmpty() )
+setPythonHome( pythonHome );
+
+if( !pythonPath.isEmpty() )
+prependPythonPath( pythonPath );
 
 #ifdef _WIN32
-//extend PATH under windows to include the branddir/program so ssl 
libs will be found
-//for use by terminal mailmerge dependency _ssl.pyd
-OUString sEnvName("PATH");
-OUString sPath;
-osl_getEnvironment(sEnvName.pData, &sPath.pData);
-OUString sBrandLocation("$BRAND_BASE_DIR/program");
-rtl::Bootstrap::expandMacros(sBrandLocation);
-osl::FileBase::getSystemPathFromFileURL(sBrandLocation, 
sBrandLocation);
-sPath = OUStringBuffer(sPath).
-append(static_cast(SAL_PATHSEPARATOR)).
-append(sBrandLocation).makeStringAndClear();
-osl_setEnvironment(sEnvName.pData, sPath.pData);
+//extend PATH under windows to include the branddir/program so ssl libs 
will be found
+//for use by terminal mailmerge dependency _ssl.pyd
+OUString sEnvName("PATH");
+OUString sPath;
+osl_getEnvironment(sEnvName.pData, &sPath.pData);
+OUString sBrandLocation("$BRAND_BASE_DIR/program");
+rtl::Bootstrap::expandMacros(sBrandLocation);
+osl::FileBase::getSystemPathFromFileURL(sBrandLocation, sBrandLocation);
+sPath = OUStringBuffer(sPath).
+append(static_cast(SAL_PATHSEPARATOR)).
+append(sBrandLocation).makeStringAndClear();
+osl_setEnvironment(sEnvName.pData, sPath.pData);
 #endif
 
 #if PY_MAJOR_VERSION >= 3
-PyImport_AppendInittab( "pyuno", PyInit_pyuno );
+PyImport_AppendInittab( "pyuno", PyInit_pyuno );
 #else
-PyImport_AppendInittab( (char*)"pyuno", initpyuno );
+PyImport_AppendInittab( (char*)"pyuno", initpyuno );
 #endif
 
 #if HAVE_FEATURE_READONLY_INSTALLSET
-Py_DontWriteBytecodeFlag = 1;
+Py_DontWriteBytecodeFlag = 1;
 #endif
 
-// initialize python
-Py_Initialize();
-PyEval_InitThreads();
+// initialize python
+Py_Initialize();
+PyEval_InitThreads();
 
-PyThreadState *tstate = PyThreadState_Get();
-PyEval_ReleaseThread( tstate );
-// This tstate is never used again, so delete it here.
-// This prevents an assertion in PyThreadState_Swap on the
-// PyThreadAttach below.
-PyThr

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

2020-04-03 Thread Serge Krot (via logerrit)
 sw/source/core/layout/paintfrm.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 8666dfecbaac69b9dc9a9c23a05654d847608907
Author: Serge Krot 
AuthorDate: Wed Apr 1 21:08:29 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Fri Apr 3 11:11:23 2020 +0200

tdf#131004 fix unstable paint of writer consecutive section frames

Change-Id: I565129dcd077ddbfccedb37dfbf1b9e1acf4eb95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91532
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 2f7f4e4d4dc3..ec99cacfd9f6 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -853,8 +853,8 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const 
SwLineRects &rRects, S
 
 void SwLineRects::LockLines( bool bLock )
 {
-for (iterator it = aLineRects.begin(); it != aLineRects.end(); ++it)
-   (*it).Lock( bLock );
+for (SwLineRect& rLRect : aLineRects)
+   rLRect.Lock( bLock );
 }
 
 static void lcl_DrawDashedRect( OutputDevice * pOut, SwLineRect const & rLRect 
)
@@ -1033,7 +1033,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
  ((nLi < rLk.Left() && nLi+21 > rLk.Left()) ||
   (nLk < rLi.Left() && nLk+21 > rLi.Left(
 {
-aLineRects.erase(aLineRects.begin() + k);
+aLineRects.erase(aLineRects.begin() + i);
 // don't continue with inner loop any more:
 // the array may shrink!
 --i;
@@ -1048,7 +1048,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
  ((nLi < rLk.Top() && nLi+21 > rLk.Top()) ||
   (nLk < rLi.Top() && nLk+21 > rLi.Top(
 {
-aLineRects.erase(aLineRects.begin() + k);
+aLineRects.erase(aLineRects.begin() + i);
 // don't continue with inner loop any more:
 // the array may shrink!
 --i;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Stephan Bergmann (via logerrit)
 ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 50d2a3820283d0b1cba6d924625b2718e2d5d331
Author: Stephan Bergmann 
AuthorDate: Fri Apr 3 09:40:50 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 3 10:48:42 2020 +0200

Improve handling of non-ASCII HTTP header field values

...following up on afad46c4e891359aad7a829e704e627e1039fc33 "crashtesting:
assert on loading fdo102527-1.html" (and partially reverting it).

Loading that fdo102527-1.html as of today causes LO to send a HTTP GET 
request
for  that is answered 
by

> HTTP/1.1 301 Moved Permanently
> Connection: Keep-Alive
> Date: Fri, 03 Apr 2020 06:59:55 GMT
> Server: LiteSpeed
> Location: https://aplikasikita.com/styles/style.css”
> Vary: User-Agent

(i.e., the "Location" header value containing the three octets %xE2 %x80 
%x9D).

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

diff --git a/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx 
b/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx
index 8ac37f2524c0..68f24f440d94 100644
--- a/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx
@@ -53,8 +53,14 @@ void process_headers( ne_request * req,
 #endif
 while ( ( cursor = ne_response_header_iterate( req, cursor,
&name, &value ) ) != 
nullptr ) {
-OUString aHeaderName(name, strlen(name), RTL_TEXTENCODING_ASCII_US);
-OUString aHeaderValue(value, strlen(value), RTL_TEXTENCODING_ASCII_US);
+// The HTTP header `field-name` must be a `token`, which can only 
contain a subset of ASCII;
+// assume that Neon will already have rejected any invalid data, so 
that it is guaranteed
+// that `name` is ASCII-only:
+OUString aHeaderName( OUString::createFromAscii( name ) );
+// The HTTP header `field-value` may contain obsolete (as per RFC 
7230) `obs-text` non-ASCII
+// %x80-FF octets, lets preserve them as individual characters in 
`aHeaderValue` by treating
+// `value` as ISO 8859-1:
+OUString aHeaderValue(value, strlen(value), 
RTL_TEXTENCODING_ISO_8859_1);
 
 SAL_INFO( "ucb.ucp.webdav", "HEAD - received header: " << aHeaderName 
<< ":" << aHeaderValue);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Miklos Vajna (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a4c5e940881520834c19573c5b1119afa1c17744
Author: Miklos Vajna 
AuthorDate: Fri Apr 3 10:01:21 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 10:44:46 2020 +0200

tdf#125268 officecfg: export LO character background as MSO shading by 
default

This restores commit 701238ea7d8a06fe7a90de15b7660b7c6d854f09
(tdf#125268: Export LO character background as MSO shading by default.,
2020-03-23).

As per ESC discussion, see

for the details. Summary: the benefit is that this way we don't loose
data, and the cost is that LO's highlighting is called shading in MSO
now.

The minutes has several good ideas how to improve this further in
follow-up commits.

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

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index f52ac45291de..1307269765fb 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -3973,7 +3973,7 @@
   Specifies if character background is exported as 
highlighting
   (and not as shading) when saving to Word document
 
-true
+false
   
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - i18npool/source sw/qa

2020-04-03 Thread Miklos Vajna (via logerrit)
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |1 
 sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt|binary
 sw/qa/extras/odfexport/odfexport.cxx  |   13 
++
 3 files changed, 14 insertions(+)

New commits:
commit 36b257b17c3a6d6b79f3b0488808398e1b034551
Author: Miklos Vajna 
AuthorDate: Wed Mar 18 10:18:42 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 10:42:23 2020 +0200

sw pad-to-3 numbering: add ODF filter

This makes the UI work as well.

(cherry picked from commit 086bfde59232076644995ae862cd43865419ad98)

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

diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 21a0eb8e7d7e..85b0b55bcc00 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -1045,6 +1045,7 @@ static const Supported_NumberingType aSupportedTypes[] =
 {style::NumberingType::CHARS_GREEK_UPPER_LETTER,   C_GR_A ", " C_GR_B 
", ... (gr)", LANG_ALL},
 {style::NumberingType::CHARS_GREEK_LOWER_LETTER,   S_GR_A ", " S_GR_B 
", ... (gr)", LANG_ALL},
 {style::NumberingType::ARABIC_ZERO, "01, 02, 03, ...", LANG_ALL},
+{style::NumberingType::ARABIC_ZERO3, "001, 002, 003, ...", LANG_ALL},
 };
 static const sal_Int32 nSupported_NumberingTypes = 
SAL_N_ELEMENTS(aSupportedTypes);
 
diff --git a/sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt 
b/sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt
new file mode 100644
index ..0bdca270eece
Binary files /dev/null and 
b/sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index afb17337be13..86c55f2a5984 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2241,6 +2241,19 @@ DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, 
"arabic-zero-numbering.odt")
 
CPPUNIT_ASSERT_EQUAL(static_cast(style::NumberingType::ARABIC_ZERO),
  aMap["NumberingType"].get());
 }
+
+DECLARE_ODFEXPORT_TEST(testArabicZero3Numbering, "arabic-zero3-numbering.odt")
+{
+auto xNumberingRules
+= 
getProperty>(getParagraph(1), 
"NumberingRules");
+comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 65
+// - Actual  : 4
+// i.e. numbering type was ARABIC, not ARABIC_ZERO3.
+
CPPUNIT_ASSERT_EQUAL(static_cast(style::NumberingType::ARABIC_ZERO3),
+ aMap["NumberingType"].get());
+}
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/vi_VN.xml |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 7a302dee87224d02853a5955cc6f715a40186803
Author: Eike Rathke 
AuthorDate: Thu Apr 2 18:14:14 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Apr 3 10:35:13 2020 +0200

Resolves: tdf#131829 [vi-VN] set currency VND decimals to 0

Change-Id: I865d6b3dcb7f3bff037a4015aa98db2fa2578672
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91593
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 28ccea8b7feed20d33e2ca7d6197d947dbbad848)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91516
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/i18npool/source/localedata/data/vi_VN.xml 
b/i18npool/source/localedata/data/vi_VN.xml
index 86f149dba1ca..945cf65cc707 100644
--- a/i18npool/source/localedata/data/vi_VN.xml
+++ b/i18npool/source/localedata/data/vi_VN.xml
@@ -90,19 +90,19 @@
   #.##0 [CURRENCY];-#.##0 [CURRENCY]
 
 
-  #.##0,00 [CURRENCY];-#.##0,00 [CURRENCY]
+  #.##0 [CURRENCY];-#.##0 [CURRENCY]
 
 
   #.##0 [CURRENCY];[RED]-#.##0 [CURRENCY]
 
 
-  #.##0,00 [CURRENCY];[RED]-#.##0,00 [CURRENCY]
+  #.##0 [CURRENCY];[RED]-#.##0 [CURRENCY]
 
 
-  #.##0,00 CCC
+  #.##0 CCC
 
 
-  #.##0,-- [CURRENCY];[RED]-#.##0,-- [CURRENCY]
+  #.##0 [CURRENCY];[RED]-#.##0 [CURRENCY]
 
 
   D/M/YY
@@ -339,7 +339,7 @@
   ₫
   VND
   Việt Nam Đồng
-  2
+  0
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/clang include/vcl include/xmloff sw/qa sw/source vcl/source

2020-04-03 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/constantparam.bitmask.results  |   12 
 compilerplugins/clang/constantparam.booleans.results |  512 +++
 compilerplugins/clang/constantparam.constructors.results |  122 +--
 compilerplugins/clang/constantparam.numbers.results  |  402 +--
 include/vcl/treelist.hxx |4 
 include/vcl/treelistbox.hxx  |2 
 include/xmloff/xmltkmap.hxx  |6 
 sw/qa/uibase/shells/shells.cxx   |   11 
 sw/source/uibase/inc/navipi.hxx  |2 
 sw/source/uibase/utlui/content.cxx   |2 
 sw/source/uibase/utlui/navipi.cxx|   11 
 vcl/source/filter/ipdf/pdfread.cxx   |7 
 vcl/source/treelist/treelistbox.cxx  |2 
 13 files changed, 561 insertions(+), 534 deletions(-)

New commits:
commit 101a9b4a3fcf1fd0a7163dac3a5dcd69431f4fee
Author: Noel Grandin 
AuthorDate: Fri Apr 3 09:36:41 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 3 10:29:57 2020 +0200

loplugin:constantparam

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

diff --git a/compilerplugins/clang/constantparam.bitmask.results 
b/compilerplugins/clang/constantparam.bitmask.results
index 9b4c4b09b169..f0ee360d2b23 100644
--- a/compilerplugins/clang/constantparam.bitmask.results
+++ b/compilerplugins/clang/constantparam.bitmask.results
@@ -4,13 +4,13 @@ codemaker/source/javamaker/classfile.hxx:153
 codemaker/source/javamaker/classfile.hxx:168
 void codemaker::javamaker::ClassFile::addField(enum 
codemaker::javamaker::ClassFile::AccessFlags,const class rtl::OString &,const 
class rtl::OString &,unsigned short,const class rtl::OString &)
 enum codemaker::javamaker::ClassFile::AccessFlags accessFlags setBits=0x1
-dbaccess/source/filter/xml/xmlExport.hxx:170
+dbaccess/source/filter/xml/xmlExport.hxx:165
 void dbaxml::ODBExport::ODBExport(const class 
com::sun::star::uno::Reference 
&,const class rtl::OUString &,enum SvXMLExportFlags)
 enum SvXMLExportFlags nExportFlag setBits=0x400 clearBits=0x200
 include/basegfx/polygon/b2dpolygontools.hxx:146
 enum CutFlagValue findCut(const class basegfx::B2DPoint &,const class 
basegfx::B2DVector &,const class basegfx::B2DPoint &,const class 
basegfx::B2DVector &,enum CutFlagValue,double *,double *)
 enum CutFlagValue aCutFlags setBits=0x1
-include/framework/framelistanalyzer.hxx:184
+include/framework/framelistanalyzer.hxx:185
 void framework::FrameListAnalyzer::FrameListAnalyzer(const class 
com::sun::star::uno::Reference 
&,const class com::sun::star::uno::Reference &,enum FrameAnalyzerFlags)
 enum FrameAnalyzerFlags eDetectMode setBits=0x4
 include/sfx2/objsh.hxx:461
@@ -31,19 +31,19 @@ sc/inc/rangeutl.hxx:162
 sc/inc/xmlwrap.hxx:89
 _Bool ScXMLImportWrapper::Import(enum ImportFlags,class ErrCode &)
 enum ImportFlags nMode setBits=0x1
-sc/source/ui/view/cellsh1.cxx:102
+sc/source/ui/view/cellsh1.cxx:104
 enum InsertDeleteFlags FlagsFromString(const class rtl::OUString &,enum 
InsertDeleteFlags)
 enum InsertDeleteFlags nFlagsMask setBits=0x87f clearBits=0x700
-sc/source/ui/view/cellsh1.cxx:125
+sc/source/ui/view/cellsh1.cxx:127
 class rtl::OUString FlagsToString(enum InsertDeleteFlags,enum 
InsertDeleteFlags)
 enum InsertDeleteFlags nFlagsMask setBits=0x87f clearBits=0x700
-sw/source/core/view/viewsh.cxx:715
+sw/source/core/view/viewsh.cxx:717
 void lcl_InvalidateAllContent(class SwViewShell &,enum SwInvalidateFlags)
 enum SwInvalidateFlags nInv setBits=0x2
 sw/source/filter/html/swhtml.hxx:672
 void SwHTMLParser::SetFrameFormatAttrs(class SfxItemSet &,enum 
HtmlFrameFormatFlags,class SfxItemSet &)
 enum HtmlFrameFormatFlags nFlags setBits=0x1
-sw/source/filter/ww8/wrtw8esh.cxx:1544
+sw/source/filter/ww8/wrtw8esh.cxx:1545
 enum ShapeFlag AddMirrorFlags(enum ShapeFlag,const class SwMirrorGrf &)
 enum ShapeFlag nFlags setBits=0xa00 clearBits=0x5ef
 xmloff/inc/MetaExportComponent.hxx:32
diff --git a/compilerplugins/clang/constantparam.booleans.results 
b/compilerplugins/clang/constantparam.booleans.results
index 030005c1ada4..f3aae5d23682 100644
--- a/compilerplugins/clang/constantparam.booleans.results
+++ b/compilerplugins/clang/constantparam.booleans.results
@@ -54,7 +54,7 @@ canvas/inc/verifyinput.hxx:520
 void verifyRange(type-parameter-?-?,type-parameter-?-?,_Bool)
 _Bool bLowerBound
 1
-canvas/source/cairo/cairo_canvashelper.hxx:249
+canvas/source/cairo/cairo_canvashelper.hxx:248
 void cairocanvas::CanvasHelper::useStates(const struct 
com::sun::star::rendering::ViewState &,const struct 
com::sun::star::rendering::RenderState &,_Bool)
 _Bool setColor
 1
@@ -70,7 +70,7 @@ chart2/qa/extras/chart2dump/cha

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

2020-04-03 Thread Luboš Luňák (via logerrit)
 sc/source/ui/unoobj/chart2uno.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 55220e7bc6576a7575c675ba425e757a3aefa243
Author: Luboš Luňák 
AuthorDate: Thu Apr 2 11:14:59 2020 +0200
Commit: Luboš Luňák 
CommitDate: Fri Apr 3 10:28:44 2020 +0200

use mdds position hint (tdf#131716)

Otherwise this is the usual case of possible quadratic mdds slowness.

Change-Id: I5b33df65e127702c011517d79b9cd41a7e820ca0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91553
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/sc/source/ui/unoobj/chart2uno.cxx 
b/sc/source/ui/unoobj/chart2uno.cxx
index 03787f78009b..47e39f038c68 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -2454,6 +2455,8 @@ void ScChart2DataSequence::BuildDataCache()
 {
 for (SCCOL nCol = aRange.aStart.Col(); nCol <= 
aRange.aEnd.Col(); ++nCol)
 {
+sc::ColumnBlockPosition hint;
+m_pDocument->InitColumnBlockPosition( hint, nTab, nCol );
 for (SCROW nRow = aRange.aStart.Row(); nRow <= 
aRange.aEnd.Row(); ++nRow)
 {
 bool bColHidden = m_pDocument->ColHidden(nCol, nTab, 
nullptr, &nLastCol);
@@ -2473,7 +2476,7 @@ void ScChart2DataSequence::BuildDataCache()
 ScAddress aAdr(nCol, nRow, nTab);
 aItem.maString = m_pDocument->GetString(aAdr);
 
-ScRefCellValue aCell(*m_pDocument, aAdr);
+ScRefCellValue aCell(*m_pDocument, aAdr, hint);
 switch (aCell.meType)
 {
 case CELLTYPE_VALUE:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: chart2/source include/editeng include/svx sc/inc sw/inc sw/source

2020-04-03 Thread Mike Kaganski (via logerrit)
 chart2/source/inc/chartview/ChartSfxItemIds.hxx |  253 ++--
 include/editeng/eeitem.hxx  |  133 +++---
 include/svx/svddef.hxx  |  449 ++---
 include/svx/xdef.hxx|  110 ++---
 sc/inc/scitems.hxx  |  222 +-
 sw/inc/hintids.hxx  |  503 
 sw/source/core/edit/edlingu.cxx |2 
 sw/source/filter/basflt/fltshell.cxx|2 
 sw/source/filter/ww8/wrtw8sty.cxx   |2 
 9 files changed, 871 insertions(+), 805 deletions(-)

New commits:
commit 15984a6778f88982f135965a703c1e829fe8325c
Author: Mike Kaganski 
AuthorDate: Fri Apr 3 00:04:27 2020 +0300
Commit: Mike Kaganski 
CommitDate: Fri Apr 3 10:22:34 2020 +0200

Turn defines into constexprs

This allows to see actual values of the WhichIds in IDE easier

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

diff --git a/chart2/source/inc/chartview/ChartSfxItemIds.hxx 
b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
index 82e3f0a535f4..7c0ef374 100644
--- a/chart2/source/inc/chartview/ChartSfxItemIds.hxx
+++ b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
@@ -19,6 +19,8 @@
 #ifndef INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_CHARTSFXITEMIDS_HXX
 #define INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_CHARTSFXITEMIDS_HXX
 
+#include 
+
 class SvxSizeItem;
 class SfxIntegerListItem;
 class SfxBoolItem;
@@ -28,164 +30,167 @@ class SfxUInt32Item;
 class SvxChartIndicateItem;
 class SvxDoubleItem;
 class SvxBrushItem;
+class SvxChartKindErrorItem;
+class SvxChartTextOrderItem;
+class SvxChartRegressItem;
 
 // SCHATTR
 
 // can't this be changed to 0?
-#define SCHATTR_START   1
-
-#define SCHATTR_DATADESCR_START SCHATTR_START
-#define SCHATTR_DATADESCR_SHOW_NUMBER   
TypedWhichId(SCHATTR_DATADESCR_START)
-#define SCHATTR_DATADESCR_SHOW_PERCENTAGE   
TypedWhichId(SCHATTR_DATADESCR_START + 1)
-#define SCHATTR_DATADESCR_SHOW_CATEGORY 
TypedWhichId(SCHATTR_DATADESCR_START + 2)
-#define SCHATTR_DATADESCR_SHOW_SYMBOL   
TypedWhichId(SCHATTR_DATADESCR_START + 3)
-#define SCHATTR_DATADESCR_WRAP_TEXT 
TypedWhichId(SCHATTR_DATADESCR_START + 4)
-#define SCHATTR_DATADESCR_SEPARATOR 
TypedWhichId(SCHATTR_DATADESCR_START + 5)
-#define SCHATTR_DATADESCR_PLACEMENT 
TypedWhichId(SCHATTR_DATADESCR_START + 6)
-#define SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS   
TypedWhichId(SCHATTR_DATADESCR_START + 7)
-#define SCHATTR_DATADESCR_NO_PERCENTVALUE   
TypedWhichId(SCHATTR_DATADESCR_START + 8) //percentage values 
should not be offered
-#define SCHATTR_PERCENT_NUMBERFORMAT_VALUE  
TypedWhichId(SCHATTR_DATADESCR_START + 9)
-#define SCHATTR_PERCENT_NUMBERFORMAT_SOURCE 
TypedWhichId(SCHATTR_DATADESCR_START + 10)
-#define SCHATTR_DATADESCR_END   SCHATTR_PERCENT_NUMBERFORMAT_SOURCE
+constexpr sal_uInt16 SCHATTR_START = 1;
+
+constexpr sal_uInt16   SCHATTR_DATADESCR_START 
   (SCHATTR_START);
+constexpr TypedWhichIdSCHATTR_DATADESCR_SHOW_NUMBER   
   (SCHATTR_DATADESCR_START);
+constexpr TypedWhichIdSCHATTR_DATADESCR_SHOW_PERCENTAGE   
   (SCHATTR_DATADESCR_START + 1);
+constexpr TypedWhichIdSCHATTR_DATADESCR_SHOW_CATEGORY 
   (SCHATTR_DATADESCR_START + 2);
+constexpr TypedWhichIdSCHATTR_DATADESCR_SHOW_SYMBOL   
   (SCHATTR_DATADESCR_START + 3);
+constexpr TypedWhichIdSCHATTR_DATADESCR_WRAP_TEXT 
   (SCHATTR_DATADESCR_START + 4);
+constexpr TypedWhichId  SCHATTR_DATADESCR_SEPARATOR 
   (SCHATTR_DATADESCR_START + 5);
+constexpr TypedWhichId   SCHATTR_DATADESCR_PLACEMENT 
   (SCHATTR_DATADESCR_START + 6);
+constexpr TypedWhichId 
SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS (SCHATTR_DATADESCR_START + 7);
+constexpr TypedWhichIdSCHATTR_DATADESCR_NO_PERCENTVALUE   
   (SCHATTR_DATADESCR_START + 8); //percentage values should not be offered
+constexpr TypedWhichId  SCHATTR_PERCENT_NUMBERFORMAT_VALUE  
   (SCHATTR_DATADESCR_START + 9);
+constexpr TypedWhichIdSCHATTR_PERCENT_NUMBERFORMAT_SOURCE 
   (SCHATTR_DATADESCR_START + 10);
+constexpr sal_uInt16   SCHATTR_DATADESCR_END   
   (SCHATTR_PERCENT_NUMBERFORMAT_SOURCE);
 
 //legend
-#define SCHATTR_LEGEND_START(SCHATTR_DATADESCR_END + 1)
-#define SCHATTR_LEGEND_POS  
TypedWhichId(SCHATTR_LEGEND_START)
-#define SCHATTR_LEGEND_SHOW 
TypedWhichId(SCHATTR_LEGEND_START + 1)
-#define SCHATTR_LEGEND_NO_OVERLAY   
TypedWhichId(SCHATTR_LEGEND_START + 2)
-#define SCHATTR_LEGEND_END  SCHATTR_LEGEND_NO_OVERLAY
+constexpr sal_uInt16 SCHATTR_LEGEND_START  
(SCHATTR_DATADESCR_END + 1);
+cons

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

2020-04-03 Thread Noel Grandin (via logerrit)
 sd/inc/pres.hxx   |   41 -
 sd/source/core/anminfo.cxx|4 
 sd/source/core/sdpage.cxx |  383 +++---
 sd/source/core/sdpage2.cxx|6 
 sd/source/core/undo/undoobjects.cxx   |   12 
 sd/source/filter/html/htmlex.cxx  |   20 
 sd/source/filter/ppt/pptin.cxx|   86 +--
 sd/source/filter/xml/sdxmlwrp.cxx |4 
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |2 
 sd/source/ui/dlg/PhotoAlbumDialog.cxx |4 
 sd/source/ui/dlg/headerfooterdlg.cxx  |   14 
 sd/source/ui/dlg/masterlayoutdlg.cxx  |   24 
 sd/source/ui/func/fuexpand.cxx|   10 
 sd/source/ui/func/fuinsert.cxx|4 
 sd/source/ui/func/fuinsfil.cxx|2 
 sd/source/ui/func/fusumry.cxx |6 
 sd/source/ui/func/futext.cxx  |   10 
 sd/source/ui/inc/DrawViewShell.hxx|2 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx|4 
 sd/source/ui/table/tablefunction.cxx  |4 
 sd/source/ui/unoidl/unoobj.cxx|2 
 sd/source/ui/unoidl/unopage.cxx   |   85 +--
 sd/source/ui/view/DocumentRenderer.cxx|2 
 sd/source/ui/view/drawview.cxx|   26 
 sd/source/ui/view/drviews1.cxx|2 
 sd/source/ui/view/drviews2.cxx|8 
 sd/source/ui/view/drviews7.cxx|6 
 sd/source/ui/view/drviewse.cxx|4 
 sd/source/ui/view/outlnvsh.cxx|   10 
 sd/source/ui/view/outlview.cxx|   20 
 sd/source/ui/view/sdview.cxx  |   34 -
 sd/source/ui/view/sdview2.cxx |2 
 sd/source/ui/view/sdview4.cxx |6 
 sd/source/ui/view/sdview5.cxx |   14 
 34 files changed, 433 insertions(+), 430 deletions(-)

New commits:
commit 10055ff899ed8f9c205155cd15c6de81cba37471
Author: Noel Grandin 
AuthorDate: Thu Apr 2 21:04:59 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 3 10:19:24 2020 +0200

convert PresObjKind to scoped enum

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

diff --git a/sd/inc/pres.hxx b/sd/inc/pres.hxx
index d5b29c3cb04d..6019283af66b 100644
--- a/sd/inc/pres.hxx
+++ b/sd/inc/pres.hxx
@@ -19,28 +19,27 @@
 #ifndef INCLUDED_SD_INC_PRES_HXX
 #define INCLUDED_SD_INC_PRES_HXX
 
-enum PresObjKind
+enum class PresObjKind
 {
-PRESOBJ_NONE = 0,
-PRESOBJ_TITLE,
-PRESOBJ_OUTLINE,
-PRESOBJ_TEXT,
-PRESOBJ_GRAPHIC,
-PRESOBJ_OBJECT,
-PRESOBJ_CHART,
-PRESOBJ_ORGCHART,
-PRESOBJ_TABLE,
-PRESOBJ_PAGE,
-PRESOBJ_HANDOUT,
-PRESOBJ_NOTES,
-PRESOBJ_HEADER,
-PRESOBJ_FOOTER,
-PRESOBJ_DATETIME,
-PRESOBJ_SLIDENUMBER,
-PRESOBJ_CALC,
-PRESOBJ_MEDIA,
-
-PRESOBJ_MAX
+NONE = 0,
+Title,
+Outline,
+Text,
+Graphic,
+Object,
+Chart,
+OrgChart,
+Table,
+Page,
+Handout,
+Notes,
+Header,
+Footer,
+DateTime,
+SlideNumber,
+Calc,
+Media,
+LAST = Media
 };
 
 enum class PageKind
diff --git a/sd/source/core/anminfo.cxx b/sd/source/core/anminfo.cxx
index d54a318d67d4..5abc0accf39e 100644
--- a/sd/source/core/anminfo.cxx
+++ b/sd/source/core/anminfo.cxx
@@ -28,7 +28,7 @@ using namespace ::com::sun::star;
 
 SdAnimationInfo::SdAnimationInfo(SdrObject& rObject)
: SdrObjUserData(SdrInventor::StarDrawUserData, 
SD_ANIMATIONINFO_ID),
- mePresObjKind  (PRESOBJ_NONE),
+ mePresObjKind  (PresObjKind::NONE),
  meEffect   
(presentation::AnimationEffect_NONE),
  meTextEffect   
(presentation::AnimationEffect_NONE),
  meSpeed
(presentation::AnimationSpeed_SLOW),
@@ -52,7 +52,7 @@ SdAnimationInfo::SdAnimationInfo(SdrObject& rObject)
 
 SdAnimationInfo::SdAnimationInfo(const SdAnimationInfo& rAnmInfo, SdrObject& 
rObject)
: SdrObjUserData (rAnmInfo),
- mePresObjKind   (PRESOBJ_NONE),
+ mePresObjKind   (PresObjKind::NONE),
  meEffect   (rAnmInfo.meEffect),
  meTextEffect   (rAnmInfo.meTextEffect),
  meSpeed(r

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

2020-04-03 Thread Justin Luth (via logerrit)
 sw/qa/extras/layout/data/tdf131707_flyWrap.doc |binary
 sw/qa/extras/layout/layout.cxx |   10 
 sw/source/core/layout/frmtool.cxx  |   31 -
 3 files changed, 25 insertions(+), 16 deletions(-)

New commits:
commit f497d1dc27b4fee3db1e2228647a00971922eb5f
Author: Justin Luth 
AuthorDate: Tue Mar 31 14:49:13 2020 +0300
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 10:06:18 2020 +0200

tdf#131707 sw layout try2: ConsiderTextWrap on positioning

rework 7.0 commit 1052acae9a599c54e518c8fc17d6a994d8778757

jmux and I were working on related bugs at the same time.
My patch happened to get committed before his. Since mine
regressed, use jmux's version instead.

This should fix tdf#119748 and tdf#123257

Change-Id: I705d9f6c4ac81216c31009948cf1c9150017bbf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91420
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/layout/data/tdf131707_flyWrap.doc 
b/sw/qa/extras/layout/data/tdf131707_flyWrap.doc
new file mode 100755
index ..c32e5dafd924
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf131707_flyWrap.doc 
differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 2a24e68ccd35..70cf21c1ef8a 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2279,6 +2279,16 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf114163)
 // This failed, if the legend first label is not "Data3". The legend 
position is right.
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf131707)
+{
+createDoc("tdf131707_flyWrap.doc");
+xmlDocPtr pXmlDoc = parseLayoutDump();
+
+assertXPath(pXmlDoc, "//body/tab/row[3]/cell[2]/txt/infos/bounds", "top", 
"2185");
+// the image should be inside of the cell boundary - so the same top or 
higher
+assertXPath(pXmlDoc, 
"//body/tab/row[3]/cell[2]/txt/anchored/fly/infos/bounds", "top", "2185");
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf125335)
 {
 SwDoc* pDoc = createDoc("tdf125335.odt");
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index a7ffd2c51920..c7424c95d4a8 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -702,8 +702,7 @@ SwFlyNotify::~SwFlyNotify()
 // #i54138# - suppress restart of the layout process
 // on changed frame height.
 // Note: It doesn't seem to be necessary and can cause layout loops.
-// Also suppress on initial positioning - required to trigger text 
wrapping (tdf#119748).
-if ( bPosChgd && maFrame.Pos().X() != FAR_AWAY )
+if ( bPosChgd )
 {
 // indicate a restart of the layout process
 pFly->SetRestartLayoutProcess( true );
@@ -712,21 +711,21 @@ SwFlyNotify::~SwFlyNotify()
 {
 // lock position
 pFly->LockPosition();
+}
 
-if ( !pFly->ConsiderForTextWrap() )
-{
-// indicate that object has to be considered for text wrap
-pFly->SetConsiderForTextWrap( true );
-// invalidate 'background' in order to allow its 'background'
-// to wrap around it.
-pFly->NotifyBackground( pFly->GetPageFrame(),
-pFly->GetObjRectWithSpaces(),
-PrepareHint::FlyFrameArrive );
-// invalidate position of anchor frame in order to force
-// a re-format of the anchor frame, which also causes a
-// re-format of the invalid previous frames of the anchor 
frame.
-pFly->AnchorFrame()->InvalidatePos();
-}
+if ( !pFly->ConsiderForTextWrap() )
+{
+// indicate that object has to be considered for text wrap
+pFly->SetConsiderForTextWrap( true );
+// invalidate 'background' in order to allow its 'background'
+// to wrap around it.
+pFly->NotifyBackground( pFly->GetPageFrame(),
+pFly->GetObjRectWithSpaces(),
+PrepareHint::FlyFrameArrive );
+// invalidate position of anchor frame in order to force
+// a re-format of the anchor frame, which also causes a
+// re-format of the invalid previous frames of the anchor frame.
+pFly->AnchorFrame()->InvalidatePos();
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: start calc if resolve fails

2020-04-03 Thread Stephan Bergmann

On 02/04/2020 17:38, Iain wrote:

Ok thank you.  Unfortunately my Ubuntu system has neither of these files.
What part of libreoffice contains them?


I was talking about files in the LO source code, 
, which 
you could look at for inspiration.


Another option could be to use the LO SDK (see 
) and its "Transparent Use of Office UNO 
Components" feature (see 
 
for C++ resp. 
 
for Java).


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-04-03 Thread Justin Luth (via logerrit)
 editeng/source/editeng/editattr.cxx |8 ++--
 editeng/source/editeng/editdoc.cxx  |6 +-
 editeng/source/editeng/impedit4.cxx |   14 --
 editeng/source/items/svxfont.cxx|   31 +++
 include/editeng/svxfont.hxx |2 ++
 5 files changed, 48 insertions(+), 13 deletions(-)

New commits:
commit 0f29d36aa9e6ac7d0914a6e1749c16ecec216904
Author: Justin Luth 
AuthorDate: Sat Mar 14 14:45:39 2020 +0300
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 10:04:56 2020 +0200

tdf#80194 autoEsc: use fontmetrics in calculation

This replaces the previous 7.0 patch in
commit 2940d1905b921d9909b08b1e32014d3c44474ef0
where the following is still true:
THIS WILL CHANGE THE POSITION OF EDITENG SUBSCRIPTS
AND SUPERSCRIPTS IN EXISTING DOCUMENTS!
That is because they were very poorly placed
before - using a formula that is very different
from how Writer does it. Everyone in the bug reports
indicates that Writer does it good, but Impress
does it really bad. (tdf#89849, tdf#63083).

Instead of using the previous patch's 80%/20%
generalization, copy Writer's use of the actual
ascent and descent of the font to determine
the best position for the subscript or superscript.

Change-Id: I0f10f6174b0709f3bc3b9acdc54b7b1fd59c5ee2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90489
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 
Tested-by: Justin Luth 

diff --git a/editeng/source/editeng/editattr.cxx 
b/editeng/source/editeng/editattr.cxx
index a99e4d496f74..e48445c27c30 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -266,17 +266,13 @@ EditCharAttribEscapement::EditCharAttribEscapement( const 
SvxEscapementItem& rAt
 assert(rAttr.Which() == EE_CHAR_ESCAPEMENT);
 }
 
-void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* )
+void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
 {
 sal_uInt16 const nProp = static_cast(GetItem())->GetProportionalHeight();
 rFont.SetPropr( static_cast(nProp) );
 
 short nEsc = static_cast(GetItem())->GetEsc();
-if ( nEsc == DFLT_ESC_AUTO_SUPER )
-nEsc =  .8 * (100 - nProp);
-else if ( nEsc == DFLT_ESC_AUTO_SUB )
-nEsc =  .2 * -(100 - nProp);
-rFont.SetEscapement( nEsc );
+rFont.SetNonAutoEscapement( nEsc, pOutDev );
 }
 
 
diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index 42fc1f3cc22c..9e9eb17e6177 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -2007,11 +2007,7 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, 
bool bSearchInParent, S
 rFont.SetPropr( static_cast(nProp) );
 
 short nEsc = rEsc.GetEsc();
-if ( nEsc == DFLT_ESC_AUTO_SUPER )
-nEsc = .8 * (100 - nProp);
-else if ( nEsc == DFLT_ESC_AUTO_SUB )
-nEsc = .2 * -(100 - nProp);
-rFont.SetEscapement( nEsc );
+rFont.SetNonAutoEscapement( nEsc );
 }
 if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_PAIRKERNING ) == 
SfxItemState::SET ) )
 rFont.SetKerning( rSet.Get( EE_CHAR_PAIRKERNING ).GetValue() ? 
FontKerning::FontSpecific : FontKerning::NONE );
diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 25d7ecc0aa8a..050eed8667f4 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -69,6 +69,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -928,14 +929,23 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& 
rItem, SvStream& rOutput,
 sal_uInt16 const nProp = static_cast(rItem).GetProportionalHeight();
 sal_uInt16 nProp100 = nProp*100;// For SWG-Token Prop in 100th 
percent.
 short nEsc = static_cast(rItem).GetEsc();
+const FontMetric& rFontMetric = GetRefDevice()->GetFontMetric();
+double fFontHeight = rFontMetric.GetAscent() + 
rFontMetric.GetDescent();
+double fAutoAscent = .8;
+double fAutoDescent = .2;
+if ( fFontHeight )
+{
+fAutoAscent = rFontMetric.GetAscent() / fFontHeight;
+fAutoDescent = rFontMetric.GetDescent() / fFontHeight;
+}
 if ( nEsc == DFLT_ESC_AUTO_SUPER )
 {
-nEsc =  .8 * (100 - nProp);
+nEsc =  fAutoAscent * (100 - nProp);
 nProp100++; // A 1 afterwards means 'automatic'.
 }
 else if ( nEsc == DFLT_ESC_AUTO_SUB )
 {
-nEsc =  .2 * -(100 - nProp);
+nEsc =  fAutoDescent * -(100 - nProp);
 nProp100++;
 }
 // SWG:
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/sv

[Libreoffice-commits] core.git: extras/Package_palettes.mk extras/source

2020-04-03 Thread Heiko Tietze (via logerrit)
 extras/Package_palettes.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 730c5317a968f4e99d4d2d28499b1d6204a07285
Author: Heiko Tietze 
AuthorDate: Thu Apr 2 16:58:35 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 10:03:27 2020 +0200

Rename mso-highlight color palette to customizatio

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

diff --git a/extras/Package_palettes.mk b/extras/Package_palettes.mk
index ed911286593b..19b07555919c 100644
--- a/extras/Package_palettes.mk
+++ b/extras/Package_palettes.mk
@@ -19,7 +19,7 @@ $(eval $(call 
gb_Package_add_files,extras_palettes,$(LIBO_SHARE_FOLDER)/palette,
libreoffice.soc \
material.soc \
modern.sog \
-   mso-highlight.soc \
+   compatibility.soc \
standard.sob \
standard.soc \
standard.sod \
diff --git a/extras/source/palettes/mso-highlight.soc 
b/extras/source/palettes/compatibility.soc
similarity index 100%
rename from extras/source/palettes/mso-highlight.soc
rename to extras/source/palettes/compatibility.soc
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread László Németh (via logerrit)
 sw/qa/extras/tiledrendering/data/tdf117448.fodt |3 +-
 sw/qa/extras/tiledrendering/tiledrendering.cxx  |   33 +++-
 2 files changed, 29 insertions(+), 7 deletions(-)

New commits:
commit a0bf48991bcbcbeefdd2fcb928809b18987d8133
Author: László Németh 
AuthorDate: Thu Apr 2 12:57:39 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 09:44:55 2020 +0200

clean-up test of tdf#117448: set fixed font features

(font face, color and size) and narrower line height
with bigger margins to avoid false alarms with font
replacements.

See commit b6ef43f678c55330d7d8174201fadc55d5381f42
(tdf#117448 Writer table: don't clip text on margins).

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

diff --git a/sw/qa/extras/tiledrendering/data/tdf117448.fodt 
b/sw/qa/extras/tiledrendering/data/tdf117448.fodt
index eccadee25974..20846d8cdd1a 100644
--- a/sw/qa/extras/tiledrendering/data/tdf117448.fodt
+++ b/sw/qa/extras/tiledrendering/data/tdf117448.fodt
@@ -8,7 +8,8 @@
  
  
   
-   
+   
+   
   
  
  
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index e6272136f4ab..ab92e84b672c 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -2406,12 +2406,33 @@ void SwTiledRenderingTest::testClipText()
 Bitmap aBitmap = pDevice->GetBitmap(Point(0, 0), Size(nTileSize, 
nTileSize));
 Bitmap::ScopedReadAccess pAccess(aBitmap);
 
-// check top of the letter "T", it's not a white pixel
-Color aTopTextColor(pAccess->GetPixel(98, 100));
-CPPUNIT_ASSERT_LESS(255, static_cast(aTopTextColor.R));
-// check bottom of the letter "g", it's not a white pixel
-Color aBottomTextColor(pAccess->GetPixel(112, 228));
-CPPUNIT_ASSERT_LESS(255, static_cast(aBottomTextColor.R));
+// check top margin, it's not white completely (i.e. showing top of letter 
"T")
+bool bClipTop = true;
+for (int i = 0; i < 150; i++)
+{
+Color aTopTextColor(pAccess->GetPixel(98, 98 + i));
+if (aTopTextColor.R < 255)
+{
+bClipTop = false;
+break;
+}
+}
+CPPUNIT_ASSERT(!bClipTop);
+// switch off because of false alarm on some platform, maybe related to 
font replacements
+#if 0
+// check bottom margin, it's not white completely (i.e. showing bottom of 
letter "g")
+bool bClipBottom = true;
+for (int i = 0; i < 150; i++)
+{
+Color aBottomTextColor(pAccess->GetPixel(110, 98 + i));
+if (aBottomTextColor.R < 255)
+{
+bClipBottom = false;
+break;
+}
+}
+CPPUNIT_ASSERT(!bClipBottom);
+#endif
 }
 
 void SwTiledRenderingTest::testAnchorTypes()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/bin xmloff/inc xmloff/source xmloff/util

2020-04-03 Thread Miklos Vajna (via logerrit)
 solenv/bin/native-code.py|1 +
 xmloff/inc/facreg.hxx|5 -
 xmloff/source/chart/SchXMLExport.cxx |   17 +
 xmloff/source/core/facreg.cxx|3 +--
 xmloff/util/xo.component |3 ++-
 5 files changed, 9 insertions(+), 20 deletions(-)

New commits:
commit 1742d70c696e5adda1edc59d9905d0b6fc321933
Author: Miklos Vajna 
AuthorDate: Thu Apr 2 21:34:12 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 09:31:13 2020 +0200

xmloff: create SchXMLExport_Oasis_Styles instances with an uno constructor

See tdf#74608 for motivation.

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

diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 769e60c02e18..c076128cb506 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -326,6 +326,7 @@ core_constructor_list = [
 "com_sun_star_comp_Chart_XMLOasisImporter_get_implementation",
 "com_sun_star_comp_Chart_XMLOasisMetaImporter_get_implementation",
 "com_sun_star_comp_Chart_XMLOasisMetaExporter_get_implementation",
+"com_sun_star_comp_Chart_XMLOasisStylesExporter_get_implementation",
 "com_sun_star_comp_Chart_XMLOasisStylesImporter_get_implementation",
 "com_sun_star_comp_Chart_XMLOasisContentImporter_get_implementation",
 "com_sun_star_comp_Chart_XMLOasisExporter_get_implementation",
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index 842689322022..6c9fff91ea18 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -32,11 +32,6 @@ namespace com { namespace sun { namespace star {
 } } }
 
 // chart oasis export
-OUString SchXMLExport_Oasis_Styles_getImplementationName() throw();
-css::uno::Sequence 
SchXMLExport_Oasis_Styles_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference 
SchXMLExport_Oasis_Styles_createInstance(
-css::uno::Reference const & rSMgr);
 OUString SchXMLExport_Oasis_Content_getImplementationName() throw();
 css::uno::Sequence 
SchXMLExport_Oasis_Content_getSupportedServiceNames() throw();
 /// @throws css::uno::Exception
diff --git a/xmloff/source/chart/SchXMLExport.cxx 
b/xmloff/source/chart/SchXMLExport.cxx
index f438fc3abf0c..b38edd87571b 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -3798,19 +3798,12 @@ Reference< uno::XInterface > 
SchXMLExport_Styles_createInstance(const Reference<
 }
 
 // Oasis format
-Sequence< OUString > SchXMLExport_Oasis_Styles_getSupportedServiceNames() 
throw()
-{
-return Sequence< OUString > { 
"com.sun.star.comp.Chart.XMLOasisStylesExporter" };
-}
-
-OUString SchXMLExport_Oasis_Styles_getImplementationName() throw()
-{
-return "SchXMLExport.Oasis.Styles";
-}
-
-Reference< uno::XInterface > SchXMLExport_Oasis_Styles_createInstance(const 
Reference< lang::XMultiServiceFactory > & rSMgr)
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Chart_XMLOasisStylesExporter_get_implementation(
+uno::XComponentContext* pCtx, uno::Sequence const& /*rSeq*/)
 {
-return static_cast(new SchXMLExport( 
comphelper::getComponentContext(rSMgr), 
SchXMLExport_Oasis_Styles_getImplementationName(), SvXMLExportFlags::STYLES | 
SvXMLExportFlags::OASIS ));
+return cppu::acquire(new SchXMLExport(pCtx, "SchXMLExport.Oasis.Styles",
+  SvXMLExportFlags::STYLES | 
SvXMLExportFlags::OASIS));
 }
 
 Sequence< OUString > SchXMLExport_Content_getSupportedServiceNames() throw()
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 99ca465e9956..0f3f84fb21e0 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -55,8 +55,7 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const char * 
pImplName, void *
 const sal_Int32 nImplNameLen = strlen( pImplName );
 
 // chart oasis export
-SINGLEFACTORY( SchXMLExport_Oasis_Styles )
-else SINGLEFACTORY( SchXMLExport_Oasis_Content )
+SINGLEFACTORY( SchXMLExport_Oasis_Content )
 
 // chart OOo export
 else SINGLEFACTORY( SchXMLExport )
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index 5f78db088f04..a5953b44c4ab 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -36,7 +36,8 @@
   
constructor="com_sun_star_comp_Chart_XMLOasisMetaExporter_get_implementation">
 
   
-  
+  
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - i18npool/qa i18npool/source include/editeng offapi/com

2020-04-03 Thread Miklos Vajna (via logerrit)
 i18npool/qa/cppunit/test_defaultnumberingprovider.cxx |   29 
++
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |   12 
++--
 include/editeng/svxenum.hxx   |3 -
 offapi/com/sun/star/style/NumberingType.idl   |7 ++
 4 files changed, 46 insertions(+), 5 deletions(-)

New commits:
commit a2aaf28bdd01653ea3e35ee6f965257921785b92
Author: Miklos Vajna 
AuthorDate: Tue Mar 17 17:01:05 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 09:20:33 2020 +0200

sw pad-to-3 numbering: add doc model, UNO API and layout

This is similar to the existing padded numbering, but that one padded to
2.  Another difference is pad-to-2 has more file format support:
pad-to-3 is not supported in DOC and RTF.

(cherry picked from commit f4dd9ecdc21696b360dedf7fefa371c8858c1830)

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

diff --git a/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx 
b/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx
index 2a1cb55502e2..4418a283de2b 100644
--- a/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx
+++ b/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx
@@ -52,6 +52,35 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, 
testArabicZero)
 CPPUNIT_ASSERT_EQUAL(OUString("10"), aActual);
 }
 
+CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero3)
+{
+uno::Reference xComponentContext
+= comphelper::getComponentContext(getMultiServiceFactory());
+
+// 10 -> "010"
+uno::Reference xFormatter(
+text::DefaultNumberingProvider::create(xComponentContext), 
uno::UNO_QUERY);
+uno::Sequence aProperties = {
+comphelper::makePropertyValue("NumberingType",
+  
static_cast(style::NumberingType::ARABIC_ZERO3)),
+comphelper::makePropertyValue("Value", static_cast(10)),
+};
+lang::Locale aLocale;
+OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
+// Without the accompanying fix in place, this test would have failed with 
a
+// lang.IllegalArgumentException, support for ARABIC_ZERO3 was missing.
+CPPUNIT_ASSERT_EQUAL(OUString("010"), aActual);
+
+// 100 -> "100"
+aProperties = {
+comphelper::makePropertyValue("NumberingType",
+  
static_cast(style::NumberingType::ARABIC_ZERO3)),
+comphelper::makePropertyValue("Value", static_cast(100)),
+};
+aActual = xFormatter->makeNumberingString(aProperties, aLocale);
+CPPUNIT_ASSERT_EQUAL(OUString("100"), aActual);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 3b5cb977d33a..21a0eb8e7d7e 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -556,11 +556,11 @@ bool should_ignore( const OUString& s )
 }
 
 /**
- * Turn nNumber into a string and pad the result to 2 using zero characters.
+ * Turn nNumber into a string and pad the result to nLimit by inserting zero 
characters at the
+ * start.
  */
-static OUString lcl_formatArabicZero(sal_Int32 nNumber)
+static OUString lcl_formatArabicZero(sal_Int32 nNumber, sal_Int32 nLimit)
 {
-sal_Int32 nLimit = 2;
 OUString aRet = OUString::number(nNumber);
 sal_Int32 nDiff = nLimit - aRet.getLength();
 
@@ -940,7 +940,11 @@ DefaultNumberingProvider::makeNumberingString( const 
Sequencehttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx   |   28 +++
 sw/source/filter/ww8/docxattributeoutput.cxx |3 ++
 2 files changed, 31 insertions(+)

New commits:
commit 18cd1c2683c546caa81212ea2850fb514daf0796
Author: Miklos Vajna 
AuthorDate: Fri Mar 6 09:05:07 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 09:19:52 2020 +0200

sw chicago numbering: add DOCX footnote export

Only this was missing, paragraph numbering import/export and footnote
numbering import was already working.

(cherry picked from commit ddbad5612e4322665bc70f4a026e5b052bcaf344)

Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index a1f1c330d533..f40d0cf0a111 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -585,6 +585,34 @@ CPPUNIT_TEST_FIXTURE(Test, testArabicZeroNumberingFootnote)
 assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:footnotePr/w:numFmt", 
"val", "decimalZero");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testChicagoNumberingFootnote)
+{
+// Create a document, set footnote numbering type to SYMBOL_CHICAGO.
+loadURL("private:factory/swriter", nullptr);
+uno::Reference xFootnotesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xFootnoteSettings
+= xFootnotesSupplier->getFootnoteSettings();
+sal_uInt16 nNumberingType = style::NumberingType::SYMBOL_CHICAGO;
+xFootnoteSettings->setPropertyValue("NumberingType", 
uno::makeAny(nNumberingType));
+
+// Insert a footnote.
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xFootnote(
+xFactory->createInstance("com.sun.star.text.Footnote"), 
uno::UNO_QUERY);
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTextContentAppend(xTextDocument->getText(),
+
uno::UNO_QUERY);
+xTextContentAppend->appendTextContent(xFootnote, {});
+
+reload("Office Open XML Text", "");
+
+xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+// Without the accompanying fix in place, this test would have failed with:
+// XPath '/w:document/w:body/w:sectPr/w:footnotePr/w:numFmt' number of 
nodes is incorrect
+// because the exporter had no idea what markup to use for SYMBOL_CHICAGO.
+assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:footnotePr/w:numFmt", 
"val", "chicago");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 81d24638a901..f17af3b3544f 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7855,6 +7855,9 @@ void DocxAttributeOutput::WriteFootnoteEndnotePr( 
::sax_fastparser::FSHelperPtr
 case SVX_NUM_CHAR_SPECIAL:
 fmt = "bullet";
 break;
+case SVX_NUM_SYMBOL_CHICAGO:
+fmt = "chicago";
+break;
 case SVX_NUM_ARABIC_ZERO:
 fmt = "decimalZero";
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - include/svtools sw/qa sw/source

2020-04-03 Thread Miklos Vajna (via logerrit)
 include/svtools/rtfkeywd.hxx|   12 
 sw/qa/extras/rtfexport/rtfexport3.cxx   |   32 
 sw/qa/extras/ww8export/ww8export3.cxx   |   30 +++
 sw/source/filter/ww8/rtfattributeoutput.cxx |   71 
 sw/source/filter/ww8/rtfattributeoutput.hxx |4 +
 sw/source/filter/ww8/rtfexport.cxx  |5 +
 sw/source/filter/ww8/wrtw8num.cxx   |1 
 sw/source/filter/ww8/ww8atr.cxx |4 +
 sw/source/filter/ww8/ww8par3.cxx|4 +
 9 files changed, 161 insertions(+), 2 deletions(-)

New commits:
commit 140f286303118d0436efd51806e63415454424cc
Author: Miklos Vajna 
AuthorDate: Fri Mar 6 16:16:56 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 09:20:22 2020 +0200

sw chicago numbering: add RTF footnote export

Chicago numbering is not supported for paragraph numbering (same as
DOC), so focus on footnote/endnote export only.

There is markup in RTF to store doc-global footnote/endnote numbering
type and the same for per-section. DOC writes both, then Writer only
reads the global setting and Word only reads the per-section setting.

This means only export is needed here, import already handled the
doc-global markup, and that's enough.

(cherry picked from commit 4ba09be7e260ce2a79a23465db7b2837422cde30)

Conflicts:
sw/qa/extras/rtfexport/rtfexport5.cxx

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

diff --git a/include/svtools/rtfkeywd.hxx b/include/svtools/rtfkeywd.hxx
index ec6053f14434..991bcca060e7 100644
--- a/include/svtools/rtfkeywd.hxx
+++ b/include/svtools/rtfkeywd.hxx
@@ -410,6 +410,12 @@
 #define OOO_STRING_SVTOOLS_RTF_AFTNNCHI "\\aftnnchi"
 #define OOO_STRING_SVTOOLS_RTF_AFTNNRLC "\\aftnnrlc"
 #define OOO_STRING_SVTOOLS_RTF_AFTNNRUC "\\aftnnruc"
+#define OOO_STRING_SVTOOLS_RTF_SAFTNNALC "\\saftnnalc"
+#define OOO_STRING_SVTOOLS_RTF_SAFTNNAR "\\saftnnar"
+#define OOO_STRING_SVTOOLS_RTF_SAFTNNAUC "\\saftnnauc"
+#define OOO_STRING_SVTOOLS_RTF_SAFTNNCHI "\\saftnnchi"
+#define OOO_STRING_SVTOOLS_RTF_SAFTNNRLC "\\saftnnrlc"
+#define OOO_STRING_SVTOOLS_RTF_SAFTNNRUC "\\saftnnruc"
 #define OOO_STRING_SVTOOLS_RTF_AFTNRESTART "\\aftnrestart"
 #define OOO_STRING_SVTOOLS_RTF_AFTNRSTCONT "\\aftnrstcont"
 #define OOO_STRING_SVTOOLS_RTF_AFTNSEP "\\aftnsep"
@@ -551,6 +557,12 @@
 #define OOO_STRING_SVTOOLS_RTF_FTNNCHI "\\ftnnchi"
 #define OOO_STRING_SVTOOLS_RTF_FTNNRLC "\\ftnnrlc"
 #define OOO_STRING_SVTOOLS_RTF_FTNNRUC "\\ftnnruc"
+#define OOO_STRING_SVTOOLS_RTF_SFTNNALC "\\sftnnalc"
+#define OOO_STRING_SVTOOLS_RTF_SFTNNAR "\\sftnnar"
+#define OOO_STRING_SVTOOLS_RTF_SFTNNAUC "\\sftnnauc"
+#define OOO_STRING_SVTOOLS_RTF_SFTNNCHI "\\sftnnchi"
+#define OOO_STRING_SVTOOLS_RTF_SFTNNRLC "\\sftnnrlc"
+#define OOO_STRING_SVTOOLS_RTF_SFTNNRUC "\\sftnnruc"
 #define OOO_STRING_SVTOOLS_RTF_FTNRSTCONT "\\ftnrstcont"
 #define OOO_STRING_SVTOOLS_RTF_FTNRSTPG "\\ftnrstpg"
 #define OOO_STRING_SVTOOLS_RTF_FTTRUETYPE "\\fttruetype"
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx 
b/sw/qa/extras/rtfexport/rtfexport3.cxx
index 40f7c9e25c81..4d2c808e3756 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class Test : public SwModelTestBase
 {
@@ -290,6 +291,37 @@ DECLARE_RTFEXPORT_TEST(testBtlrFrame, "btlr-frame.odt")
 CPPUNIT_ASSERT_EQUAL(text::WritingMode2::BT_LR, nActual);
 }
 
+CPPUNIT_TEST_FIXTURE(SwModelTestBase, testChicagoNumberingFootnote)
+{
+// Create a document, set footnote numbering type to SYMBOL_CHICAGO.
+loadURL("private:factory/swriter", nullptr);
+uno::Reference xFootnotesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xFootnoteSettings
+= xFootnotesSupplier->getFootnoteSettings();
+sal_uInt16 nNumberingType = style::NumberingType::SYMBOL_CHICAGO;
+xFootnoteSettings->setPropertyValue("NumberingType", 
uno::makeAny(nNumberingType));
+
+// Insert a footnote.
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xFootnote(
+xFactory->createInstance("com.sun.star.text.Footnote"), 
uno::UNO_QUERY);
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTextContentAppend(xTextDocument->getText(),
+
uno::UNO_QUERY);
+xTextContentAppend->appendTextContent(xFootnote, {});
+
+reload("Rich Text Format", "");
+xFootnotesSupplier.set(mxComponent, uno::UNO_QUERY);
+sal_uInt16 nExpected = style::NumberingType::SYMBOL_CHICAGO;
+auto nActual
+= getProperty(xFootnotesSupplier->getFootnoteSettings(), 
"NumberingType");
+// Without the accompanying fix in place, this test would have failed

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

2020-04-03 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx   |   29 +++
 sw/source/filter/ww8/docxattributeoutput.cxx |3 ++
 2 files changed, 32 insertions(+)

New commits:
commit 9aaf5bcbf41260993cdf7716cdaf3f6b6dd82627
Author: Miklos Vajna 
AuthorDate: Thu Mar 5 13:12:27 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 09:19:11 2020 +0200

sw padded numbering: add DOCX footnote export

This is mapping separate from paragraph numbering. I'm not exactly why;
perhaps because this is modeled after DOC, where certain numbering types
are not allowed for paragraph numbering (but are allowed for other
numbering types).

(cherry picked from commit 3ea32f2b6cbe515353218bc1f3d5746ca66f6a5a)

Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx

Change-Id: I06503389da520bd3bfd39252c4dcef39bac03eee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91562
Tested-by: Miklos Vajna 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index 073844d6c75d..a1f1c330d533 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -556,6 +557,34 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, 
testSemiTransparentText)
 CPPUNIT_ASSERT_EQUAL(nTransparence, nActual);
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testArabicZeroNumberingFootnote)
+{
+// Create a document, set footnote numbering type to ARABIC_ZERO.
+loadURL("private:factory/swriter", nullptr);
+uno::Reference xFootnotesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xFootnoteSettings
+= xFootnotesSupplier->getFootnoteSettings();
+sal_uInt16 nNumberingType = style::NumberingType::ARABIC_ZERO;
+xFootnoteSettings->setPropertyValue("NumberingType", 
uno::makeAny(nNumberingType));
+
+// Insert a footnote.
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xFootnote(
+xFactory->createInstance("com.sun.star.text.Footnote"), 
uno::UNO_QUERY);
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTextContentAppend(xTextDocument->getText(),
+
uno::UNO_QUERY);
+xTextContentAppend->appendTextContent(xFootnote, {});
+
+reload("Office Open XML Text", "");
+
+xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+// Without the accompanying fix in place, this test would have failed with:
+// XPath '/w:document/w:body/w:sectPr/w:footnotePr/w:numFmt' number of 
nodes is incorrect
+// because the exporter had no idea what markup to use for ARABIC_ZERO.
+assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:footnotePr/w:numFmt", 
"val", "decimalZero");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 02c6b8f370d0..81d24638a901 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7855,6 +7855,9 @@ void DocxAttributeOutput::WriteFootnoteEndnotePr( 
::sax_fastparser::FSHelperPtr
 case SVX_NUM_CHAR_SPECIAL:
 fmt = "bullet";
 break;
+case SVX_NUM_ARABIC_ZERO:
+fmt = "decimalZero";
+break;
 case SVX_NUM_PAGEDESC:
 case SVX_NUM_BITMAP:
 default:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-03 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ww8export/ww8export3.cxx |   33 ++-
 sw/source/filter/ww8/wrtw8num.cxx |5 +
 sw/source/filter/ww8/wrtw8sty.cxx |8 +
 sw/source/filter/ww8/wrtww8.hxx   |6 +
 sw/source/filter/ww8/ww8atr.cxx   |4 
 sw/source/filter/ww8/ww8par.cxx   |   18 ---
 sw/source/filter/ww8/ww8par.hxx   |2 
 sw/source/filter/ww8/ww8par3.cxx  |  160 +-
 8 files changed, 160 insertions(+), 76 deletions(-)

New commits:
commit 6c9968885c10e5d1a6ef193ac45d349e598d6e49
Author: Miklos Vajna 
AuthorDate: Thu Mar 5 15:57:33 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 09:19:26 2020 +0200

sw padded numbering: add DOC footnote filter

Import side: remove the duplication between SwWW8ImplReader::CoreLoad()
and WW8ListManager::ReadLVL(). The CoreLoad() version did not support
reading 0x16 as it did a "& 0xf" on the value before parsing.

Export side: Writer supports footnote numbering type per-document, Word
supports it per-section. So next to the per-document export add a
per-section one, that's what Word actually reads. Similar code was there
already for DOCX.

(cherry picked from commit 5c7d0c5bafd244f1bfb3930e0229f1f3f2371c82)

Conflicts:
sw/source/filter/ww8/ww8par.cxx

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

diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index b9531e3159bc..8d1378dab410 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -17,6 +17,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -48,7 +49,7 @@ DECLARE_WW8EXPORT_TEST(testTdf37778_readonlySection, 
"tdf37778_readonlySection.d
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Number of Sections", sal_Int32(0), 
xSections->getCount());
 }
 
-DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.doc")
+DECLARE_WW8EXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.doc")
 {
 auto xNumberingRules
 = 
getProperty>(getParagraph(1), 
"NumberingRules");
@@ -61,6 +62,36 @@ DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, 
"arabic-zero-numbering.doc")
  aMap["NumberingType"].get());
 }
 
+CPPUNIT_TEST_FIXTURE(SwModelTestBase, testArabicZeroNumberingFootnote)
+{
+// Create a document, set footnote numbering type to ARABIC_ZERO.
+loadURL("private:factory/swriter", nullptr);
+uno::Reference xFootnotesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xFootnoteSettings
+= xFootnotesSupplier->getFootnoteSettings();
+sal_uInt16 nNumberingType = style::NumberingType::ARABIC_ZERO;
+xFootnoteSettings->setPropertyValue("NumberingType", 
uno::makeAny(nNumberingType));
+
+// Insert a footnote.
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xFootnote(
+xFactory->createInstance("com.sun.star.text.Footnote"), 
uno::UNO_QUERY);
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTextContentAppend(xTextDocument->getText(),
+
uno::UNO_QUERY);
+xTextContentAppend->appendTextContent(xFootnote, {});
+
+reload("MS Word 97", "");
+xFootnotesSupplier.set(mxComponent, uno::UNO_QUERY);
+sal_uInt16 nExpected = style::NumberingType::ARABIC_ZERO;
+auto nActual = 
getProperty(xFootnotesSupplier->getFootnoteSettings(), 
"NumberingType");
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 64
+// - Actual  : 4
+// i.e. the numbering type was ARABIC, not ARABIC_ZERO.
+CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
+}
+
 DECLARE_WW8EXPORT_TEST(testTdf122429_header, "tdf122429_header.doc")
 {
 uno::Reference pageStyles = 
getStyles("PageStyles");
diff --git a/sw/source/filter/ww8/wrtw8num.cxx 
b/sw/source/filter/ww8/wrtw8num.cxx
index 1302a68e7404..e149bb266534 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -185,6 +185,11 @@ void MSWordExportBase::NumberingDefinitions()
 }
 }
 
+/**
+ * Converts the SVX numbering type to MSONFC.
+ *
+ * This is used for paragraph numbering purposes.
+ */
 static sal_uInt8 GetLevelNFC(  sal_uInt16 eNumType, const SfxItemSet *pOutSet)
 {
 sal_uInt8 nRet = 0;
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx 
b/sw/source/filter/ww8/wrtw8sty.cxx
index 2768429ea5a5..9fd09a9b92a2 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1317,6 +1317,7 @@ void WW8AttributeOutput::StartSection()
 void WW8AttributeOutput::SectFootnoteEndnotePr()
 {
 const SwFootnoteInfo& rInfo = m_rWW8Export.m_pDoc->GetFootnoteInfo();
+const SwEndNoteInfo& rEndNoteInfo = 

[Libreoffice-commits] online.git: fuzzer/admin-data wsd/Auth.cpp

2020-04-03 Thread Miklos Vajna (via logerrit)
 fuzzer/admin-data/crash-4e217e0c18bc938cbe7b4c7eeec25208c09b0f56 |binary
 fuzzer/admin-data/crash-ba9e8295835983c8b0b3f92ec5ef65cc76e78f12 |1 +
 wsd/Auth.cpp |6 ++
 3 files changed, 7 insertions(+)

New commits:
commit fc88a872c2af0bae41d6e48c9e493900bfc78b38
Author: Miklos Vajna 
AuthorDate: Thu Apr 2 17:30:14 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri Apr 3 09:18:18 2020 +0200

admin console: log when JWTAuth::verify() doesn't have enough tokens

This is no longer a huge problem, but it's still a good idea to return
early in that case.

Found with the recently added admin_fuzzer, when I locally disabled the
StringVector safety checks for test purposes.

(If you view the diff with -U30, then you see that we access tokens[2]
later, so if size is < 3, we should give up.)

Change-Id: I46fc531fb042cc1485a17a9e994ad37e9ff0cd80
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91587
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/fuzzer/admin-data/crash-4e217e0c18bc938cbe7b4c7eeec25208c09b0f56 
b/fuzzer/admin-data/crash-4e217e0c18bc938cbe7b4c7eeec25208c09b0f56
new file mode 100644
index 0..73143ee96
Binary files /dev/null and 
b/fuzzer/admin-data/crash-4e217e0c18bc938cbe7b4c7eeec25208c09b0f56 differ
diff --git a/fuzzer/admin-data/crash-ba9e8295835983c8b0b3f92ec5ef65cc76e78f12 
b/fuzzer/admin-data/crash-ba9e8295835983c8b0b3f92ec5ef65cc76e78f12
new file mode 100644
index 0..7b3507ff5
--- /dev/null
+++ b/fuzzer/admin-data/crash-ba9e8295835983c8b0b3f92ec5ef65cc76e78f12
@@ -0,0 +1 @@
+auth 
jwt=eyJakilliwiZXhwIjoiMTU4NTU3O3hbGciOiJ�UzI1NiIsInR5MJ0.DM1NeyJpc3MiOiJiJ9
\ No newline at end of file
diff --git a/wsd/Auth.cpp b/wsd/Auth.cpp
index c1a159748..a5f1a9fd0 100644
--- a/wsd/Auth.cpp
+++ b/wsd/Auth.cpp
@@ -105,6 +105,12 @@ bool JWTAuth::verify(const std::string& accessToken)
 
 try
 {
+if (tokens.size() < 3)
+{
+LOG_INF("JWTAuth: verification failed; Not enough tokens");
+return false;
+}
+
 const std::string encodedBody = tokens[0] + '.' + tokens[1];
 _digestEngine.update(encodedBody.c_str(), 
static_cast(encodedBody.length()));
 Poco::Crypto::DigestEngine::Digest digest = _digestEngine.signature();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/clang include/tools vcl/headless vcl/inc vcl/source

2020-04-03 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/singlevalfields.could-be-bool.results |   10 -
 compilerplugins/clang/singlevalfields.results   |   92 ++--
 include/tools/wintypes.hxx  |4 
 vcl/headless/svpgdi.cxx |2 
 vcl/inc/listbox.hxx |1 
 vcl/source/control/imp_listbox.cxx  |8 -
 6 files changed, 58 insertions(+), 59 deletions(-)

New commits:
commit 301133e0a8c0ef761c3067b4d76fd9af114f4a6a
Author: Noel Grandin 
AuthorDate: Thu Apr 2 15:56:28 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 3 09:02:21 2020 +0200

loplugin:singlevalfields

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

diff --git a/compilerplugins/clang/singlevalfields.could-be-bool.results 
b/compilerplugins/clang/singlevalfields.could-be-bool.results
index 0f39baf9354b..97c7f22cb8ec 100644
--- a/compilerplugins/clang/singlevalfields.could-be-bool.results
+++ b/compilerplugins/clang/singlevalfields.could-be-bool.results
@@ -7,7 +7,7 @@ connectivity/source/inc/dbase/dindexnode.hxx:122
 cui/source/inc/cfg.hxx:233
 SvxConfigEntry nId
 sal_uInt16
-dbaccess/source/ui/inc/tabletree.hxx:149
+dbaccess/source/ui/inc/tabletree.hxx:146
 dbaui::TableTreeListBox m_nTextColumn
 int
 desktop/source/app/main.c:29
@@ -46,7 +46,7 @@ include/vcl/toolkit/dialog.hxx:52
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx:191
 (anonymous) g_bInGetJavaVM
 sig_atomic_t
-libreofficekit/source/gtk/tilebuffer.hxx:229
+libreofficekit/source/gtk/tilebuffer.hxx:227
 LOEvent m_nSetGraphicSelectionType
 int
 sal/rtl/cipher.cxx:113
@@ -70,7 +70,7 @@ 
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1087
 sc/source/ui/vba/vbahyperlink.hxx:83
 ScVbaHyperlink mnType
 long
-sd/qa/unit/tiledrendering/tiledrendering.cxx:959
+sd/qa/unit/tiledrendering/tiledrendering.cxx:967
 (anonymous namespace)::ViewCallback m_nPart
 int
 soltools/cpp/_tokens.c:35
@@ -82,10 +82,10 @@ soltools/cpp/_tokens.c:36
 soltools/cpp/cpp.h:121
 includelist always
 char
-svx/source/inc/cell.hxx:204
+svx/source/inc/cell.hxx:205
 sdr::table::Cell mnCellContentType
 css::table::CellContentType
-svx/source/table/tablertfimporter.cxx:57
+svx/source/table/tablertfimporter.cxx:55
 sdr::table::(anonymous namespace)::RTFCellDefault mnRowSpan
 sal_Int32
 sw/source/filter/ww8/docxexport.hxx:99
diff --git a/compilerplugins/clang/singlevalfields.results 
b/compilerplugins/clang/singlevalfields.results
index e1401dc69377..7d090ca4ac62 100644
--- a/compilerplugins/clang/singlevalfields.results
+++ b/compilerplugins/clang/singlevalfields.results
@@ -55,7 +55,7 @@ canvas/inc/rendering/irendermodule.hxx:37
 chart2/source/controller/dialogs/DataBrowser.cxx:209
 chart::impl::SeriesHeader m_aUpdateDataTimer
 UpdateDataTimer
-chart2/source/controller/inc/ChartController.hxx:382
+chart2/source/controller/inc/ChartController.hxx:378
 chart::ChartController m_aLifeTimeManager
 0
 chart2/source/controller/inc/TitleDialogData.hxx:34
@@ -109,7 +109,7 @@ connectivity/source/inc/writer/WTable.hxx:65
 cppu/source/uno/copy.hxx:39
 cppu::(anonymous namespace)::SequencePrefix nRefCount
 1
-cui/source/inc/acccfg.hxx:97
+cui/source/inc/acccfg.hxx:99
 SfxAcceleratorConfigPage m_aUpdateDataTimer
 UpdateDataTimer
 cui/source/inc/cfg.hxx:375
@@ -121,13 +121,13 @@ cui/source/inc/linkdlg.hxx:46
 cui/source/inc/thesdlg.hxx:32
 SvxThesaurusDialog m_aModifyIdle
 cui SvxThesaurusDialog LookUp Modify
-cui/source/options/optgdlg.cxx:1277
+cui/source/options/optgdlg.cxx:1259
 LanguageConfig_Impl aLanguageOptions
 0
 cui/source/options/optjava.hxx:60
 SvxJavaOptionsPage m_aResetIdle
 cui options SvxJavaOptionsPage Reset
-dbaccess/source/ui/inc/directsql.hxx:64
+dbaccess/source/ui/inc/directsql.hxx:66
 dbaui::DirectSQLDialog m_aHighlighter
 1
 desktop/source/app/app.cxx:491
@@ -166,7 +166,7 @@ editeng/source/editeng/impedit.hxx:470
 emfio/source/reader/emfreader.cxx:1495
 emfio::EmfReader::ReadEnhWMF bDoSaveForVisualControl
 0
-extensions/source/bibliography/bibcont.hxx:69
+extensions/source/bibliography/bibcont.hxx:68
 BibBookContainer aIdle
 extensions BibBookContainer Split Idle
 filter/source/msfilter/msdffimp.cxx:2690
@@ -175,7 +175,7 @@ filter/source/msfilter/msdffimp.cxx:2690
 filter/source/msfilter/viscache.hxx:30
 Impl_OlePres nFormat
 3
-framework/source/services/autorecovery.cxx:397
+framework/source/services/autorecovery.cxx:398
 (anonymous namespace)::AutoRecovery m_aTimer
 Auto save timer
 framework/source/uiconfiguration/imagemanagerimpl.hxx:173
@@ -223,7 +223,7 @@ include/filter/msfilter/dffpropset.hxx:34
 include/filter/msfilter/dffpropset.hxx:35
 DffPropFlags bBlip
 

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

2020-04-03 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/unusedfields.only-used-in-constructor.results |  248 
++
 compilerplugins/clang/unusedfields.readonly.results |  370 
+-
 compilerplugins/clang/unusedfields.untouched.results|   96 +-
 compilerplugins/clang/unusedfields.writeonly.results|  128 +--
 svx/source/svdraw/svdpdf.cxx|5 
 svx/source/svdraw/svdpdf.hxx|1 
 sw/source/uibase/inc/conttree.hxx   |1 
 sw/source/uibase/utlui/content.cxx  |3 
 8 files changed, 401 insertions(+), 451 deletions(-)

New commits:
commit 4c4a1caf0d4d223ff8479197160d121012c1c1ac
Author: Noel Grandin 
AuthorDate: Thu Apr 2 15:33:34 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 3 09:01:21 2020 +0200

loplugin:unusedfields

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

diff --git 
a/compilerplugins/clang/unusedfields.only-used-in-constructor.results 
b/compilerplugins/clang/unusedfields.only-used-in-constructor.results
index 20780329b2c4..3e3f69937977 100644
--- a/compilerplugins/clang/unusedfields.only-used-in-constructor.results
+++ b/compilerplugins/clang/unusedfields.only-used-in-constructor.results
@@ -1,18 +1,18 @@
-avmedia/source/vlc/vlcframegrabber.hxx:36
+avmedia/source/vlc/vlcframegrabber.hxx:35
 avmedia::vlc::VLCFrameGrabber mInstance wrapper::Instance
-avmedia/source/vlc/vlcframegrabber.hxx:37
+avmedia/source/vlc/vlcframegrabber.hxx:36
 avmedia::vlc::VLCFrameGrabber mMedia wrapper::Media
-avmedia/source/vlc/wrapper/Types.hxx:39
+avmedia/source/vlc/wrapper/Types.hxx:38
 libvlc_event_t p_obj void *
-avmedia/source/vlc/wrapper/Types.hxx:44
+avmedia/source/vlc/wrapper/Types.hxx:43
 libvlc_event_t::(anonymous union)::(anonymous) dummy1 const char *
-avmedia/source/vlc/wrapper/Types.hxx:45
+avmedia/source/vlc/wrapper/Types.hxx:44
 libvlc_event_t::(anonymous union)::(anonymous) dummy2 const char *
+avmedia/source/vlc/wrapper/Types.hxx:45
+libvlc_event_t::(anonymous) padding struct (anonymous struct at 
/media/disk2/libo4/avmedia/source/vlc/wrapper/Types.hxx:42:7)
 avmedia/source/vlc/wrapper/Types.hxx:46
-libvlc_event_t::(anonymous) padding struct (anonymous struct at 
/home/noel/libo2/avmedia/source/vlc/wrapper/Types.hxx:43:7)
-avmedia/source/vlc/wrapper/Types.hxx:47
-libvlc_event_t u union (anonymous union at 
/home/noel/libo2/avmedia/source/vlc/wrapper/Types.hxx:41:5)
-avmedia/source/vlc/wrapper/Types.hxx:53
+libvlc_event_t u union (anonymous union at 
/media/disk2/libo4/avmedia/source/vlc/wrapper/Types.hxx:40:5)
+avmedia/source/vlc/wrapper/Types.hxx:52
 libvlc_track_description_t psz_name char *
 basegfx/source/polygon/b2dpolygontriangulator.cxx:112
 basegfx::(anonymous namespace)::Triangulator maStartEntries 
basegfx::(anonymous namespace)::EdgeEntries
@@ -130,7 +130,7 @@ cppu/source/uno/check.cxx:138
 (anonymous namespace)::Char4 chars struct (anonymous namespace)::Char3
 cui/source/dialogs/colorpicker.cxx:737
 cui::(anonymous namespace)::ColorPickerDialog m_aColorPrevious class 
cui::(anonymous namespace)::ColorPreviewControl
-cui/source/factory/dlgfact.cxx:1408
+cui/source/factory/dlgfact.cxx:1413
 (anonymous namespace)::SvxMacroAssignDialog m_aItems class SfxItemSet
 cui/source/inc/cfgutil.hxx:239
 SvxScriptSelectorDialog m_aStylesInfo struct SfxStylesInfo_Impl
@@ -146,12 +146,6 @@ cui/source/inc/tabstpge.hxx:87
 SvxTabulatorTabPage m_aCenterWin class TabWin_Impl
 cui/source/inc/tabstpge.hxx:88
 SvxTabulatorTabPage m_aDezWin class TabWin_Impl
-cui/source/inc/textanim.hxx:40
-SvxTextAnimationPage rOutAttrs const class SfxItemSet &
-cui/source/inc/transfrm.hxx:167
-SvxAngleTabPage rOutAttrs const class SfxItemSet &
-cui/source/inc/transfrm.hxx:217
-SvxSlantTabPage rOutAttrs const class SfxItemSet &
 cui/source/options/optcolor.cxx:237
 (anonymous namespace)::ColorConfigWindow_Impl::Entry m_aDefaultColor class 
Color
 dbaccess/source/core/api/RowSet.hxx:108
@@ -176,24 +170,20 @@ dbaccess/source/core/dataaccess/connection.hxx:102
 dbaccess::OConnection m_nInAppend std::atomic
 dbaccess/source/core/inc/databasecontext.hxx:85
 dbaccess::ODatabaseContext m_aBasicDLL class BasicDLL
-dbaccess/source/filter/xml/xmlComponent.hxx:30
-dbaxml::OXMLComponent m_sName class rtl::OUString
-dbaccess/source/filter/xml/xmlComponent.hxx:31
-dbaxml::OXMLComponent m_sHREF class rtl::OUString
-dbaccess/source/filter/xml/xmlComponent.hxx:32
-dbaxml::OXMLComponent m_bAsTemplate _Bool
-dbaccess/source/filter/xml/xmlHierarchyCollection.hxx:33
-dbaxml::OXMLHierarchyCollection m_sName class rtl::OUString
+desktop/qa/desktop_lib/test_desktop_lib.cxx:2771
+  class AllSettings &
+drawinglayer/inc/texture/