[Libreoffice-commits] core.git: 2 commits - helpcontent2 sc/inc

2020-11-13 Thread Seth Chaiklin (via logerrit)
 helpcontent2   |2 +-
 sc/inc/scfuncs.hrc |6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 4200a025df1cadecf03904e54f7cfe6aa1a249ef
Author: Seth Chaiklin 
AuthorDate: Sat Nov 14 09:03:12 2020 +0200
Commit: Gerrit Code Review 
CommitDate: Sat Nov 14 08:03:12 2020 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to b63c7644809e62a5f179ccd62b9975695e8f1d2b
  - tdf#103419  add missing functions to "Logical" category help page in 
Calc

  ( scalc/01/04060105.xhp )
  embed headers and link to SWITCH and IFS
  embed full sections for IFERROR and IFNA
  update select ID to "logical"
  rename variable ID "logischtext" --> "logicaltext"
(only embedded in scalc/01/04060100.xhp )

  ( scalc/00/0404.xhp )
  rename variable ID "eikalo" --> "logical"
  only embedded in scalc/01/04060105.xhp )

  ( scalc/01/04060100.xhp )
   update select ID to "logicaltext"
   update to ,some 

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

diff --git a/helpcontent2 b/helpcontent2
index 56bbf73adfd3..b63c7644809e 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 56bbf73adfd3c4258db6822dad27d4b5ca7b9beb
+Subproject commit b63c7644809e62a5f179ccd62b9975695e8f1d2b
commit b8480abd38016378e92e2e3f6690f1c219dbadd2
Author: Seth Chaiklin 
AuthorDate: Tue Nov 10 01:38:08 2020 +0200
Commit: Seth Chaiklin 
CommitDate: Sat Nov 14 08:00:13 2020 +0100

Resolves: tdf#103419 - update tooltip for SWITCH in Calc

Change-Id: I931ae2d4b2a26f5369c78b4f91ecd53a1b1fd4bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105464
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 

diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc
index 9a96b3d9975c..a5a5e2449fc6 100644
--- a/sc/inc/scfuncs.hrc
+++ b/sc/inc/scfuncs.hrc
@@ -3603,11 +3603,11 @@ const char* SC_OPCODE_IFS_MS_ARY[] =
 // -=*# Resource for function SWITCH #*=-
 const char* SC_OPCODE_SWITCH_MS_ARY[] =
 {
-NC_("SC_OPCODE_SWITCH_MS", "Checks 1 or more values and returns a result 
corresponding to the first value equal to the given expression."),
+NC_("SC_OPCODE_SWITCH_MS", "Compares expression against list of 
value/result pairs, and returns result for first value that matches the 
expression.  If expression does not match any value, a default result is 
returned, if it is placed as final item in parameter list without a value."),
 NC_("SC_OPCODE_SWITCH_MS", "Expression"),
-NC_("SC_OPCODE_SWITCH_MS", "Value that will be compared against 
value1-valueN."),
+NC_("SC_OPCODE_SWITCH_MS", "Value to be compared against value1…valueN (N 
≤ 127)"),
 NC_("SC_OPCODE_SWITCH_MS", "Value"),
-NC_("SC_OPCODE_SWITCH_MS", "Value that will be compared against 
expression."),
+NC_("SC_OPCODE_SWITCH_MS", "Value to compare against expression. If no 
result is given, then value is returned as default result."),
 NC_("SC_OPCODE_SWITCH_MS", "Result"),
 NC_("SC_OPCODE_SWITCH_MS", "Value to return when corresponding value 
argument matches expression.")
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Seth Chaiklin (via logerrit)
 source/text/scalc/00/0404.xhp |2 +-
 source/text/scalc/01/04060100.xhp |   12 +---
 source/text/scalc/01/04060105.xhp |   24 +++-
 3 files changed, 25 insertions(+), 13 deletions(-)

New commits:
commit b63c7644809e62a5f179ccd62b9975695e8f1d2b
Author: Seth Chaiklin 
AuthorDate: Sun Nov 8 16:15:14 2020 +0200
Commit: Seth Chaiklin 
CommitDate: Sat Nov 14 08:03:12 2020 +0100

tdf#103419  add missing functions to "Logical" category help page in Calc

  ( scalc/01/04060105.xhp )
  embed headers and link to SWITCH and IFS
  embed full sections for IFERROR and IFNA
  update select ID to "logical"
  rename variable ID "logischtext" --> "logicaltext"
(only embedded in scalc/01/04060100.xhp )

  ( scalc/00/0404.xhp )
  rename variable ID "eikalo" --> "logical"
  only embedded in scalc/01/04060105.xhp )

  ( scalc/01/04060100.xhp )
   update select ID to "logicaltext"
   update to ,some 

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

diff --git a/source/text/scalc/00/0404.xhp 
b/source/text/scalc/00/0404.xhp
index 495c4cffe..270b85347 100644
--- a/source/text/scalc/00/0404.xhp
+++ b/source/text/scalc/00/0404.xhp
@@ -132,7 +132,7 @@
 
 Insert - Function - Category Information
 
-Insert - Function - Category Logical
+Insert - Function - Category Logical
 
 Insert - Function - Category Mathematical
 
diff --git a/source/text/scalc/01/04060100.xhp 
b/source/text/scalc/01/04060100.xhp
index aa8b5b207..d5aa76ba5 100644
--- a/source/text/scalc/01/04060100.xhp
+++ b/source/text/scalc/01/04060100.xhp
@@ -1,6 +1,5 @@
 
 
-   
 
- 
-   
+
 
   
  Functions by Category
@@ -31,9 +29,9 @@
   categories of functions
   list of functions
 MW deleted "Calc functions"
-Functions by Category
+Functions by 
Category
   This 
section describes the functions of $[officename] Calc. The various functions 
are divided into categories in the Function Wizard.
-  Database
+  Database
   
   Date 
& Time
   
@@ -41,8 +39,8 @@
   
   Information
   
-  Logical
-  
+  Logical
+  
   Mathematical
   
   Array
diff --git a/source/text/scalc/01/04060105.xhp 
b/source/text/scalc/01/04060105.xhp
index 8957265b2..3dbcab1a4 100644
--- a/source/text/scalc/01/04060105.xhp
+++ b/source/text/scalc/01/04060105.xhp
@@ -1,6 +1,5 @@
 
 
-
 
-
-
 
   
  Logical Functions
@@ -32,7 +29,7 @@
   functions; logical functions
 
 Logical Functions
-  This category contains the 
Logical functions.
+  This category contains the 
Logical functions.
 
 Handling non-logical arguments in logical 
functions
 
@@ -53,9 +50,26 @@
 
 
   
- 
+ 
   
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 AND function
 
___
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' - external/libmspub

2020-11-13 Thread Stephan Bergmann (via logerrit)
 external/libmspub/UnpackedTarball_libmspub.mk |1 +
 external/libmspub/stdint.patch|   10 ++
 2 files changed, 11 insertions(+)

New commits:
commit 7fb8e6748a5dd8df11f50f6d846af4315a2c3831
Author: Stephan Bergmann 
AuthorDate: Tue Jun 11 11:56:33 2019 +0200
Commit: Aron Budea 
CommitDate: Sat Nov 14 03:45:00 2020 +0100

external/libmspub: missing include

Change-Id: I446b26b3c0ffd0d62178f374b570c9fbd1885dd4
Reviewed-on: https://gerrit.libreoffice.org/73813
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit d0e38b8f1efc6a0b2b519ce1f82a83c5766f5633)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105795
Tested-by: Aron Budea 
Reviewed-by: Aron Budea 

diff --git a/external/libmspub/UnpackedTarball_libmspub.mk 
b/external/libmspub/UnpackedTarball_libmspub.mk
index 5e5bedb27d83..89b06437a399 100644
--- a/external/libmspub/UnpackedTarball_libmspub.mk
+++ b/external/libmspub/UnpackedTarball_libmspub.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libmspub,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libmspub,\
 external/libmspub/ubsan.patch \
+external/libmspub/stdint.patch \
 ))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libmspub))
diff --git a/external/libmspub/stdint.patch b/external/libmspub/stdint.patch
new file mode 100644
index ..61f1dd122904
--- /dev/null
+++ b/external/libmspub/stdint.patch
@@ -0,0 +1,10 @@
+--- src/lib/MSPUBMetaData.h
 src/lib/MSPUBMetaData.h
+@@ -13,6 +13,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ #include 
+ 
___
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.4' - chart2/source chart2/uiconfig

2020-11-13 Thread Jan Holesovsky (via logerrit)
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |   39 
 chart2/source/controller/sidebar/ChartElementsPanel.hxx |4 +
 chart2/uiconfig/ui/sidebarelements.ui   |   49 +---
 3 files changed, 83 insertions(+), 9 deletions(-)

New commits:
commit b831f4e0ffb45b7e0fbe3ce034302a75162e3297
Author: Jan Holesovsky 
AuthorDate: Wed Oct 14 16:18:17 2020 +0200
Commit: Muhammet Kara 
CommitDate: Sat Nov 14 02:12:40 2020 +0100

chart2: Add the possibility to edit title & subtitle from the sidebar.

Change-Id: I4be15acbc2127ebb6eca8864a0209ba57b488100
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104313
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105614
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx 
b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 14fd14dad5d5..68175acd46d2 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -277,7 +277,9 @@ ChartElementsPanel::ChartElementsPanel(
 mbModelValid(true)
 {
 get(mpCBTitle,  "checkbutton_title");
+get(mpEditTitle, "edit_title");
 get(mpCBSubtitle,  "checkbutton_subtitle");
+get(mpEditSubtitle, "edit_subtitle");
 get(mpCBXAxis,  "checkbutton_x_axis");
 get(mpCBXAxisTitle,  "checkbutton_x_axis_title");
 get(mpCBYAxis,  "checkbutton_y_axis");
@@ -319,7 +321,9 @@ void ChartElementsPanel::dispose()
 css::uno::Reference xBroadcaster(mxModel, 
css::uno::UNO_QUERY_THROW);
 xBroadcaster->removeModifyListener(mxListener);
 mpCBTitle.clear();
+mpEditTitle.clear();
 mpCBSubtitle.clear();
+mpEditSubtitle.clear();
 mpCBXAxis.clear();
 mpCBXAxisTitle.clear();
 mpCBYAxis.clear();
@@ -374,6 +378,10 @@ void ChartElementsPanel::Initialize()
 mpCBGridHorizontalMinor->SetClickHdl(aLink);
 
 mpLBLegendPosition->SetSelectHdl(LINK(this, ChartElementsPanel, 
LegendPosHdl));
+
+Link aEditLink = LINK(this, ChartElementsPanel, EditHdl);
+mpEditTitle->SetModifyHdl(aEditLink);
+mpEditSubtitle->SetModifyHdl(aEditLink);
 }
 
 namespace {
@@ -416,8 +424,23 @@ void ChartElementsPanel::updateData()
 
 mpCBLegend->Check(isLegendVisible(mxModel));
 mpBoxLegend->Enable( isLegendVisible(mxModel) );
-mpCBTitle->Check(isTitleVisisble(mxModel, TitleHelper::MAIN_TITLE));
-mpCBSubtitle->Check(isTitleVisisble(mxModel, TitleHelper::SUB_TITLE));
+
+bool hasTitle = isTitleVisisble(mxModel, TitleHelper::MAIN_TITLE);
+mpCBTitle->Check(hasTitle);
+if (!mpEditTitle->HasFocus())
+{
+
mpEditTitle->SetText(TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::MAIN_TITLE,
 mxModel)));
+mpEditTitle->Enable(hasTitle);
+}
+
+bool hasSubtitle = isTitleVisisble(mxModel, TitleHelper::SUB_TITLE);
+mpCBSubtitle->Check(hasSubtitle);
+if (!mpEditSubtitle->HasFocus())
+{
+
mpEditSubtitle->SetText(TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::SUB_TITLE,
 mxModel)));
+mpEditSubtitle->Enable(hasSubtitle);
+}
+
 mpCBXAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::X_AXIS_TITLE));
 mpCBYAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::Y_AXIS_TITLE));
 mpCBZAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::Z_AXIS_TITLE));
@@ -577,6 +600,18 @@ IMPL_LINK(ChartElementsPanel, CheckBoxHdl, Button*, 
pButton, void)
 setGridVisible(mxModel, GridType::HOR_MINOR, bChecked);
 }
 
+IMPL_LINK(ChartElementsPanel, EditHdl, Edit&, rEdit, void)
+{
+// title or subtitle?
+TitleHelper::eTitleType aTitleType = TitleHelper::MAIN_TITLE;
+if (&rEdit == mpEditSubtitle.get())
+aTitleType = TitleHelper::SUB_TITLE;
+
+// set it
+OUString aText(rEdit.GetText());
+TitleHelper::setCompleteString(aText, TitleHelper::getTitle(aTitleType, 
mxModel), comphelper::getProcessComponentContext());
+}
+
 IMPL_LINK_NOARG(ChartElementsPanel, LegendPosHdl, ListBox&, void)
 {
 sal_Int32 nPos = mpLBLegendPosition->GetSelectedEntryPos();
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.hxx 
b/chart2/source/controller/sidebar/ChartElementsPanel.hxx
index eca293645cc4..dfb624b48362 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.hxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include "ChartSidebarModifyListener.hxx"
 #include 
@@ -71,7 +72,9 @@ public:
 private:
 //ui controls
 VclPtr mpCBTitle;
+VclPtr mpEditTitle;
 VclPtr mpCBSubtitle;
+VclPtr mpEditSubtitle;
 VclPtr mpCBXAxis;
 VclPtr mpCBXAxisTitle;
 VclPtr mpCBYAxis;
@@ -110,6 +113,7 @@ private:
 void setTitleVisible(TitleHelper::eTitleType eTitle, boo

getting started with libreoffice online

2020-11-13 Thread Marc Roos


I tried in October to get the docker image running, but cannot find 
anything usefull in the documentation to get started with libreoffice 
online, there is more written there about other products. 

Eg docs on api calls I can not find. How to create a new empty file? How 
to view this empty file? Basically I just want to mount a docker volume 
and be able to open these files. Authentication is for now not an issue. 
I just want to see how this works.

I tried copying a file to the docker image. But still this url won't 
open it.
https://localhost:9980/loleaflet/dist/loleaflet.html?file_path=file:///test.odt&host=wss://localhost:9980

I am getting these errors in the docker image:

[1]
pkill: killing pid 6844 failed: Operation not permitted
sh: 1: /usr/bin/loolmount: Operation not permitted

[2]
wsd-07060-07091 2020-10-22 21:59:46.631783 [ websrv_poll ] ERR  Socket 
#24 SSL BIO error: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 
alert unknown ca (0: Success)| ./net/SslSocket.hpp:291
wsd-07060-07091 2020-10-22 21:59:46.633129 [ websrv_poll ] ERR  Error 
while handling poll for socket #24 in websrv_poll: error:14094418:SSL 
routines:ssl3_read_bytes:tlsv1 alert unknown ca| net/Socket.cp
p:314
kit-07089-07087 2020-10-22 21:59:55.689551 [ kit_spare_001 ] SIG   Fatal 
signal received: SIGABRT
Backtrace 7089:
/usr/bin/loolforkit(_ZN7SigUtil13dumpBacktraceEv+0x5e)[0x55e9fa3206ae]
/usr/bin/loolforkit(+0xd5ea5)[0x55e9fa320ea5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0)[0x7fb24ea5c8a0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7fb24e697f47]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7fb24e6998b1]
/opt/libreoffice/program/libuno_sal.so.3(+0x3416a)[0x7fb24437416a]
/opt/libreoffice/program/libuno_sal.so.3(+0x2e576)[0x7fb24436e576]
/opt/libreoffice/program/libmergedlo.so(+0xfeb883)[0x7fb249111883]
/opt/libreoffice/program/libmergedlo.so(_ZN3psp16PrintFontManager15conve
rtSfntNameEPv+0x53f)[0x7fb24b3f8f9f]
/opt/libreoffice/program/libmergedlo.so(_ZN3psp16PrintFontManager21analy
zeSfntFamilyNameEPKvRSt6vectorIN3rtl8OUStringESaIS5_EE+0x1c3)[0x7fb24b3f
9923]
/opt/libreoffice/program/libmergedlo.so(_ZNK3psp16PrintFontManager15anal
yzeSfntFileEPNS0_9PrintFontE+0xa2)[0x7fb24b3f9dc2]
/opt/libreoffice/program/libmergedlo.so(_ZNK3psp16PrintFontManager15anal
yzeFontFileEiRKN3rtl7OStringEPKc+0x294)[0x7fb24b3fa6f4]
/opt/libreoffice/program/libmergedlo.so(_ZN3psp16PrintFontManager20count
FontconfigFontsERSt13unordered_mapIN3rtl7OStringEiSt4hashIS3_ESt8equal_t
oIS3_ESaISt4pairIKS3_iEEE+0x4ca)[0x7fb24b3f60aa]
/opt/libreoffice/program/libmergedlo.so(_ZN3psp16PrintFontManager10initi
alizeEv+0x11f)[0x7fb24b3f969f]
/opt/libreoffice/program/libmergedlo.so(_ZN3psp16PrintFontManager3getEv+
0x20)[0x7fb24b3f89c0]
/opt/libreoffice/program/libmergedlo.so(_ZN22FreeTypeTextRenderImpl14Get
DevFontListEP22PhysicalFontCollection+0x40)[0x7fb24b3edd60]
/opt/libreoffice/program/libmergedlo.so(+0x3009f19)[0x7fb24b12ff19]
/opt/libreoffice/program/libmergedlo.so(+0x300a42c)[0x7fb24b13042c]
/opt/libreoffice/program/libmergedlo.so(+0x300ab8e)[0x7fb24b130b8e]
/opt/libreoffice/program/libmergedlo.so(_ZNK12OutputDevice13GetTextHeigh
tEv+0x9)[0x7fb24b1343a9]
/opt/libreoffice/program/libmergedlo.so(+0x2f2d787)[0x7fb24b053787]
/opt/libreoffice/program/libmergedlo.so(_ZN11Application11SetSettingsERK
11AllSettings+0x1c8)[0x7fb24b3345f8]
/opt/libreoffice/program/libmergedlo.so(+0x224d0c7)[0x7fb24a3730c7]
/opt/libreoffice/program/libmergedlo.so(+0x224d930)[0x7fb24a373930]
/opt/libreoffice/program/libmergedlo.so(+0x224dcb1)[0x7fb24a373cb1]
/opt/libreoffice/program/libmergedlo.so(_ZN14SvtMiscOptionsC1Ev+0x11d)[0
x7fb24a374cad]
/opt/libreoffice/program/libmergedlo.so(+0x209b987)[0x7fb24a1c1987]
/opt/libreoffice/program/libmergedlo.so(_Z10ImplSVMainv+0x46)[0x7fb24b33
ad86]
/opt/libreoffice/program/libmergedlo.so(soffice_main+0x11d)[0x7fb24a1e26
cd]
/opt/libreoffice/program/libmergedlo.so(+0x20cc151)[0x7fb24a1f2151]
/usr/bin/loolforkit(_Z10lokit_mainRKNSt7__cxx1112basic_stringIcSt11char_
traitsIcESaIcEEES6_S6_S6_S6_m+0x2562)[0x55e9fa2c6142]
/usr/bin/loolforkit(+0x64677)[0x55e9fa2af677]
/usr/bin/loolforkit(main+0x1693)[0x55e9fa280853]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7fb24e67ab97]
/usr/bin/loolforkit(_start+0x2a)[0x55e9fa28221a]
frk-07087-07087 2020-10-22 21:59:56.214826 [ forkit ] WRN  No live Kits 
exist, and we are not terminating yet.| kit/ForKit.cpp:271

[3]
wsd-07135-07855 2020-10-22 22:09:46.058033 [ docbroker_00a ] WRN  
link("/tmp/test.txt", 
"/opt/lool/child-roots/m4jCsG5GwcSzlEgS/tmp/user/docs/m4jCsG5GwcSzlEgS/t
est.txt") failed. Will copy. Linking error: EPERM Operation not 
permitted| wsd/Storage.cpp:335

[4]
/loleaflet/dist/admin/adminAnalytics.html#memview

wsd-07982-08021 2020-10-23 07:50:44.865044 [ websrv_poll ] WRN  client - 
server version mismatch, disabling browser cache. Expected: 215a76e21| 
wsd/FileServer.cpp:287
wsd-07982-08021 2020-10-23 07:50:44.994165 [ websrv_poll ] WRN  
FileServerRequestHandle

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

2020-11-13 Thread Julien Nabet (via logerrit)
 sc/source/ui/view/tabvwsh3.cxx |8 
 sc/source/ui/view/tabvwsha.cxx |8 
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit bbbcd382af9e60bd1c23205804740b8dae9272c3
Author: Julien Nabet 
AuthorDate: Fri Nov 13 19:49:04 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Nov 13 22:18:26 2020 +0100

loplugin:toolslong

following:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=95b27dd2e5b5bdcb39962f72882dcdf406bcb393
author  Jim Raykowski2020-10-11 16:15:47 -0800
committer   Jim Raykowski2020-11-13 17:53:20 
+0100
commit  95b27dd2e5b5bdcb39962f72882dcdf406bcb393 (patch)
tree84c49a7daadf1ce908a9f5608d40494af164917d
parent  d40f2d02df26e216f367b5da3f9546b73f250469 (diff)
tdf#45705 rework zoom in and zoom out UI commands in Calc
Similar to commit 2cddaa6e199ed8bb6185b7825791199f9da4a670 done for
Writer view shell, this patch makes zoom in and zoom out commands
functional for Calc view shell in addition to the preview shell.

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

diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index c2f496b3e2cd..72e6a72707ab 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -706,12 +706,12 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 //  and can't be changed directly
 
 const Fraction& rOldY = GetViewData().GetZoomY();
-long nOld = static_cast(rOldY * 100);
-long nNew;
+tools::Long nOld = tools::Long(rOldY * 100);
+tools::Long nNew;
 if (SID_ZOOM_OUT == nSlot)
-nNew = std::max(long(MINZOOM), 
basegfx::zoomtools::zoomOut(nOld));
+nNew = std::max(tools::Long(MINZOOM), 
basegfx::zoomtools::zoomOut(nOld));
 else
-nNew = std::min(long(MAXZOOM), 
basegfx::zoomtools::zoomIn(nOld));
+nNew = std::min(tools::Long(MAXZOOM), 
basegfx::zoomtools::zoomIn(nOld));
 if ( nNew != nOld)
 {
 bool bSyncZoom = 
SC_MOD()->GetAppOptions().GetSynchronizeZoom();
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 8b6674dca3c9..4a6062fddff5 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -294,16 +294,16 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
 case SID_ZOOM_IN:
 {
 const Fraction& rZoomY = GetViewData().GetZoomY();
-long nZoom = static_cast(rZoomY * 100);
-if (nZoom >= long(MAXZOOM))
+tools::Long nZoom = tools::Long(rZoomY * 100);
+if (nZoom >= tools::Long(MAXZOOM))
 rSet.DisableItem(nWhich);
 }
 break;
 case SID_ZOOM_OUT:
 {
 const Fraction& rZoomY = GetViewData().GetZoomY();
-long nZoom = static_cast(rZoomY * 100);
-if (nZoom <= long(MINZOOM))
+tools::Long nZoom = tools::Long(rZoomY * 100);
+if (nZoom <= tools::Long(MINZOOM))
 rSet.DisableItem(nWhich);
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Rafael Lima License Statement

2020-11-13 Thread Rafael Lima
Hi!

All of my past & future contributions to LibreOffice may be licensed under
the MPLv2/LGPLv3+ dual license.

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


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

2020-11-13 Thread Caolán McNamara (via logerrit)
 include/vcl/weld.hxx  |1 +
 vcl/inc/salvtables.hxx|2 ++
 vcl/source/app/salvtables.cxx |5 +
 vcl/unx/gtk3/gtk3gtkinst.cxx  |8 
 4 files changed, 16 insertions(+)

New commits:
commit 64c93c950e191d8c6ee7cf138ff60d085c9486de
Author: Caolán McNamara 
AuthorDate: Fri Nov 13 09:24:19 2020 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 13 22:08:04 2020 +0100

add set_accessible_description

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

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 51f2f9d44506..7387db806350 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -165,6 +165,7 @@ public:
  int& height) const = 0;
 
 virtual void set_accessible_name(const OUString& rName) = 0;
+virtual void set_accessible_description(const OUString& rDescription) = 0;
 virtual OUString get_accessible_name() const = 0;
 
 virtual OUString get_accessible_description() const = 0;
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 7717502833e8..7eff04d56c7e 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -275,6 +275,8 @@ public:
 
 virtual void set_accessible_name(const OUString& rName) override;
 
+virtual void set_accessible_description(const OUString& rDescription) 
override;
+
 virtual OUString get_accessible_name() const override;
 
 virtual OUString get_accessible_description() const override;
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 1327e9d6e4f3..585dd36325a3 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -362,6 +362,11 @@ void SalInstanceWidget::set_accessible_name(const 
OUString& rName)
 m_xWidget->SetAccessibleName(rName);
 }
 
+void SalInstanceWidget::set_accessible_description(const OUString& 
rDescription)
+{
+m_xWidget->SetAccessibleDescription(rDescription);
+}
+
 OUString SalInstanceWidget::get_accessible_name() const { return 
m_xWidget->GetAccessibleName(); }
 
 OUString SalInstanceWidget::get_accessible_description() const
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 3105a4e3056b..a74533faa787 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2731,6 +2731,14 @@ public:
 atk_object_set_name(pAtkObject, OUStringToOString(rName, 
RTL_TEXTENCODING_UTF8).getStr());
 }
 
+virtual void set_accessible_description(const OUString& rDescription) 
override
+{
+AtkObject* pAtkObject = gtk_widget_get_accessible(m_pWidget);
+if (!pAtkObject)
+return;
+atk_object_set_description(pAtkObject, OUStringToOString(rDescription, 
RTL_TEXTENCODING_UTF8).getStr());
+}
+
 virtual OUString get_accessible_name() const override
 {
 AtkObject* pAtkObject = gtk_widget_get_accessible(m_pWidget);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Ayhan Yalçınsoy (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 471f2bf1ee9256f5b8196b6cc713666729654e59
Author: Ayhan Yalçınsoy 
AuthorDate: Fri Nov 13 15:52:36 2020 +0300
Commit: Heiko Tietze 
CommitDate: Fri Nov 13 21:56:04 2020 +0100

tdf#137808: Renamed Track Changes as Show Tracked Changes

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

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index d4f3f0c70b4b..c420fc2f2359 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -367,7 +367,7 @@
   
   
 
-  ~Track Changes
+  Show ~Tracked Changes
 
 
   .uno:ShowTrackedChanges
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - cui/source include/svx sc/qa svx/source

2020-11-13 Thread Serge Krot (via logerrit)
 cui/source/tabpages/border.cxx |  120 +
 include/svx/frmsel.hxx |2 
 sc/qa/uitest/calc_tests/formatCells.py |   53 ++
 svx/source/dialog/frmsel.cxx   |5 +
 4 files changed, 151 insertions(+), 29 deletions(-)

New commits:
commit 63540cbef6484fa9dc017c93676d0b5e85075303
Author: Serge Krot 
AuthorDate: Tue Oct 27 11:26:55 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Fri Nov 13 21:29:45 2020 +0100

tdf#137790 calc: Minimal line width for different line styles

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

tdf#137790 calc: set minimal line width: unit test

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

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 84bdcd8f92c1..5ded87ea6659 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -81,6 +81,43 @@ static void lcl_SetDecimalDigitsTo1(weld::MetricSpinButton& 
rField)
 rField.set_min(rField.normalize(nMin), FieldUnit::TWIP);
 }
 
+// returns in pt
+static sal_Int64 lcl_GetMinLineWidth(SvxBorderLineStyle aStyle)
+{
+switch (aStyle)
+{
+case SvxBorderLineStyle::NONE:
+return 0;
+
+case SvxBorderLineStyle::SOLID:
+case SvxBorderLineStyle::DOTTED:
+case SvxBorderLineStyle::DASHED:
+case SvxBorderLineStyle::FINE_DASHED:
+case SvxBorderLineStyle::DASH_DOT:
+case SvxBorderLineStyle::DASH_DOT_DOT:
+return 15;
+
+// Double lines
+case SvxBorderLineStyle::DOUBLE: return 22;
+case SvxBorderLineStyle::DOUBLE_THIN: return 22;
+case SvxBorderLineStyle::THINTHICK_SMALLGAP: return 20;
+case SvxBorderLineStyle::THINTHICK_MEDIUMGAP: return 15;
+case SvxBorderLineStyle::THINTHICK_LARGEGAP: return 15;
+case SvxBorderLineStyle::THICKTHIN_SMALLGAP: return 20;
+case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP: return 15;
+case SvxBorderLineStyle::THICKTHIN_LARGEGAP: return 15;
+
+case SvxBorderLineStyle::EMBOSSED: return 15;
+case SvxBorderLineStyle::ENGRAVED: return 15;
+
+case SvxBorderLineStyle::OUTSET: return 10;
+case SvxBorderLineStyle::INSET: return 10;
+
+default:
+return 15;
+}
+}
+
 // number of preset images to show
 const sal_uInt16 SVX_BORDER_PRESET_COUNT = 5;
 
@@ -1170,15 +1207,37 @@ IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthHdl_Impl, 
weld::MetricSpinButton&,
 
 IMPL_LINK_NOARG(SvxBorderTabPage, SelStyleHdl_Impl, SvtLineListBox&, void)
 {
-sal_Int64 nVal = m_xLineWidthMF->get_value(FieldUnit::NONE);
-nVal = static_cast(MetricField::ConvertDoubleValue(
-nVal,
-m_xLineWidthMF->get_digits(),
-FieldUnit::POINT, MapUnit::MapTwip ));
-m_aFrameSel.SetStyleToSelection ( nVal,
+sal_Int64 nOldWidth = m_xLineWidthMF->get_value(FieldUnit::NONE);
+nOldWidth = static_cast(MetricField::ConvertDoubleValue(
+nOldWidth,
+m_xLineWidthMF->get_digits(),
+FieldUnit::POINT,
+MapUnit::MapTwip));
+
+const sal_Int64 nOldMinWidth = 
lcl_GetMinLineWidth(m_aFrameSel.getCurrentStyleLineStyle());
+const sal_Int64 nNewMinWidth = 
lcl_GetMinLineWidth(m_xLbLineStyle->GetSelectEntryStyle());
+
+// auto change line-width if it doesn't correspond to minimal value
+// let's change only in case when user has not changed the line-width into 
some custom value
+const sal_Int64 nNewWidth = (nOldMinWidth == nOldWidth)? nNewMinWidth : 
nOldWidth;
+
+// set value inside edit box
+if (nOldWidth != nNewWidth)
+{
+const sal_Int64 nNewWidthPt = 
static_cast(MetricField::ConvertDoubleValue(
+nNewWidth,
+m_xLineWidthMF->get_digits(),
+MapUnit::MapTwip,
+FieldUnit::POINT));
+m_xLineWidthMF->set_value(nNewWidthPt, FieldUnit::POINT);
+}
+
+// set value inside style box
+m_aFrameSel.SetStyleToSelection( nNewWidth,
 m_xLbLineStyle->GetSelectEntryStyle() );
 }
 
+
 // ValueSet handling
 sal_uInt16 SvxBorderTabPage::GetPresetImageId( sal_uInt16 nValueSetIdx ) const
 {
@@ -1309,34 +1368,33 @@ void SvxBorderTabPage::FillLineListBox_Impl()
 
 static struct {
 SvxBorderLineStyle mnStyle;
-long mnMinWidth;
 SvtLineListBox::ColorFunc mpColor1Fn;
 SvtLineListBox::ColorFunc mpColor2Fn;
 SvtLineListBox::ColorDistFunc mpColorDistFn;
 } const aLines[] = {
 // Simple lines
-{ SvxBorderLineStyle::SOLID,0, &sameColor, &sameColor, 
&sameDistColor },
-{ SvxBorderLineStyle::DOTTED,   0, &sam

[Libreoffice-commits] core.git: compilerplugins/clang sc/qa sd/qa sw/qa vcl/qa

2020-11-13 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/toolslong.cxx|2 ++
 sc/qa/unit/subsequent_filters-test.cxx |2 +-
 sd/qa/unit/export-tests-ooxml2.cxx |4 ++--
 sd/qa/unit/export-tests.cxx|8 
 sd/qa/unit/import-tests.cxx|   12 ++--
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |8 
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx  |4 ++--
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |4 ++--
 8 files changed, 23 insertions(+), 21 deletions(-)

New commits:
commit 8182a3e03cf9eb50e43347a288bacefbed98c497
Author: Noel Grandin 
AuthorDate: Fri Nov 13 15:15:47 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 13 21:01:27 2020 +0100

fix some tools::Long fallout

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

diff --git a/compilerplugins/clang/toolslong.cxx 
b/compilerplugins/clang/toolslong.cxx
index 96c2716bd827..26105a2697d8 100644
--- a/compilerplugins/clang/toolslong.cxx
+++ b/compilerplugins/clang/toolslong.cxx
@@ -155,6 +155,8 @@ void ToolsLong::run()
 if (loplugin::isSamePathname(fn,
  SRCDIR 
"/writerperfect/source/calc/MSWorksCalcImportFilter.cxx"))
 return;
+if (loplugin::isSamePathname(fn, SRCDIR 
"/writerperfect/qa/unit/WPXSvStreamTest.cxx"))
+return;
 if (loplugin::isSamePathname(fn, SRCDIR "/desktop/source/lib/init.cxx"))
 return;
 
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 229d0b3df8fa..74a06737a0c8 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -1875,7 +1875,7 @@ void ScFiltersTest::testChartImportXLS()
 const SdrOle2Obj* pOleObj = getSingleChartObject(rDoc, 0);
 CPPUNIT_ASSERT_MESSAGE("Failed to retrieve a chart object from the 2nd 
sheet.", pOleObj);
 
-CPPUNIT_ASSERT_EQUAL(11137L, pOleObj->GetLogicRect().getWidth());
+CPPUNIT_ASSERT_EQUAL(tools::Long(11137), 
pOleObj->GetLogicRect().getWidth());
 CPPUNIT_ASSERT(8640L > pOleObj->GetLogicRect().getHeight());
 
 xDocSh->DoClose();
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index 71f44a0776b6..fba5f93f5499 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -2695,14 +2695,14 @@ void SdOOXMLExportTest2::testTdf1225573_FontWorkScaleX()
 awt::Rectangle aBoundRectArch;
 xShapeArchProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= 
aBoundRectArch;
 // difference should be zero, but allow some range for stroke thickness
-CPPUNIT_ASSERT_LESS(static_cast(50), 
labs(aBoundRectArch.Width - 13081));
+CPPUNIT_ASSERT_LESS(50L, labs(aBoundRectArch.Width - 13081));
 
 // Error was, that text in shapes of category "Warp" was not scaled to the 
path.
 uno::Reference xShapeWaveProps(getShapeFromPage(0, 1, 
xDocShRef));
 awt::Rectangle aBoundRectWave;
 xShapeWaveProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= 
aBoundRectWave;
 // difference should be zero, but allow some range for stroke thickness
-CPPUNIT_ASSERT_LESS(static_cast(50), 
labs(aBoundRectWave.Width - 11514));
+CPPUNIT_ASSERT_LESS(50L, labs(aBoundRectWave.Width - 11514));
 
 xDocShRef->DoClose();
 }
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 2a0603456bee..e54e02ddecd5 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -1112,13 +1112,13 @@ void SdExportTest::testBulletsAsImage()
 
 if (nExportFormat == ODP || nExportFormat == PPT)
 {
-CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 16L, 
aGraphic.GetSizePixel().Width());
-CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 16L, 
aGraphic.GetSizePixel().Height());
+CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 
tools::Long(16), aGraphic.GetSizePixel().Width());
+CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 
tools::Long(16), aGraphic.GetSizePixel().Height());
 }
 else // FIXME: what happened here
 {
-CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 64L, 
aGraphic.GetSizePixel().Width());
-CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 64L, 
aGraphic.GetSizePixel().Height());
+CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 
tools::Long(64), aGraphic.GetSizePixel().Width());
+CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 
tools::Long(64), aGraphic.GetSizePixel().Height());
 }
 
 // Graphic Size
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 6e6b08d2bad2..acac88729506 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1795,10 +1795,10 @@ void SdImportTest

[Libreoffice-commits] core.git: testtools/com testtools/source

2020-11-13 Thread Tor Lillqvist (via logerrit)
 testtools/com/sun/star/comp/bridge/TestComponent.java  |   32 
 testtools/source/bridgetest/bridgetest.cxx |   31 ++--
 testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx |   34 +++--
 testtools/source/bridgetest/cli/cli_cs_bridgetest.cs   |   30 ++-
 testtools/source/bridgetest/cli/cli_cs_testobj.cs  |   24 +
 testtools/source/bridgetest/cli/cli_vb_bridgetest.vb   |   43 -
 testtools/source/bridgetest/cppobj.cxx |   32 +++-
 testtools/source/bridgetest/idl/bridgetest.idl |   10 +++
 8 files changed, 209 insertions(+), 27 deletions(-)

New commits:
commit 76fc34baeb4257e71092690b7039c0befe371bae
Author: Tor Lillqvist 
AuthorDate: Thu Nov 12 21:46:06 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Fri Nov 13 20:01:08 2020 +0100

Make bridgetest exercise parameter passing in the C++/UNO bridge harder

The C++/UNO bridge for macOS on arm64 currently uses the Linux code.
Apple's ABI uses slightly different parameter passing on the stack,
though. See

https://developer.apple.com/documentation/xcode/writing_arm64_code_for_apple_platforms?language=objc

That has not been taken into account yet in the bridge code. The
bridgetest, when run on macOS on arm64, didn't notice, sadly, but
succeeded. With this change it crashes, as one would expect it to do.

Add one more byte and short parameter to the setValues(), setValues2()
and getValues() calls in the XBridgeTestBase interface. The stack
allocation for those [in] parameters to setValues() differ between the
Linux and Apple ABIs. Add corresponding attributes to the interface,
and members to the SimpleTest struct.

The changes to the source files in the cli subdirectory (C++/CLI,
VB.NET, and C#) are done blindly as they aren't compiled even on
Windows currently. Most likely the changes to them are incomplete and
erroneous.

Change-Id: I6f689a130d89b23cad9918829107d7da49a79c55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105770
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 

diff --git a/testtools/com/sun/star/comp/bridge/TestComponent.java 
b/testtools/com/sun/star/comp/bridge/TestComponent.java
index f8b50f23e222..7d59de570591 100644
--- a/testtools/com/sun/star/comp/bridge/TestComponent.java
+++ b/testtools/com/sun/star/comp/bridge/TestComponent.java
@@ -304,6 +304,8 @@ public class TestComponent {
 private float_float;
 private double   _double;
 private String   _string;
+private byte _byte2;
+private short_short2;
 private Object   _xInterface;
 private Object   _any;
 private TestEnum _testEnum = TestEnum.TEST;
@@ -353,6 +355,8 @@ public class TestComponent {
   double   fDouble,
   TestEnum testEnum,
   String   string,
+  byte nByte2,
+  shortnShort2,
   Object   xInterface,
   Object   any,
   TestElement  testElements[],
@@ -373,6 +377,8 @@ public class TestComponent {
 _double   = fDouble;
 _testEnum = testEnum;
 _string   = string;
+_byte2= nByte2;
+_short2   = nShort2;
 _xInterface   = xInterface;
 _any  = any;
 _testElements = testElements;
@@ -394,6 +400,8 @@ public class TestComponent {
/*INOUT*/double[]   
io_double,
/*INOUT*/TestEnum[] 
io_testEnum,
/*INOUT*/String[]   
io_string,
+   /*INOUT*/byte[] 
io_byte2,
+   /*INOUT*/short[]
io_short2,
/*INOUT*/Object[]   
io_xInterface,
/*INOUT*/Object[]   io_any,
/*INOUT*/TestElement[][]
io_testElements,
@@ -414,6 +422,8 @@ public class TestComponent {
 _double   = io_double[0];
 _testEnum = io_testEnum[0];
 _string   = io_string[0];
+_byte2= io_byte2[0];
+_short2   = io_short2[0];
 _xInterface   = io_xInterface[0];
 _any  = io_any[0];
 _testElements = io_testElements[0];
@@ -438,6 +448,8 @@ public class TestComponent {
   /*OUT*/double[]   o_doubl

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

2020-11-13 Thread Tor Lillqvist (via logerrit)
 bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx |  139 ++
 bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx |  121 +++
 2 files changed, 258 insertions(+), 2 deletions(-)

New commits:
commit e0df85554b533fab67a5a91193024e4876c5ec02
Author: Tor Lillqvist 
AuthorDate: Thu Nov 12 23:49:57 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Fri Nov 13 20:01:51 2020 +0100

Improve the C++/UNO bridge for macOS on Apple Silicon

Now bridgetest (as improved by my previous commit) passes. That
doesn't necessarily prove much, though, I am sure there are
interesting corner cases that it doesn't exercise. Anyway, making this
work was easier than I had feared.

Unlike the arm64 ABI used on Linux, on macOS (and iOS, but we don't
really use the C++/UNO bridge for iOS) we need to pack parameters
smaller than eight bytes according to their natural alignment. Bytes
take one byte, shorts two bytes aligned at a two-byte boundary, etc.

Change-Id: I5b7dc2f8fce41ddec88df0e688898a074d8b2dad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105773
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 

diff --git a/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx
index a67f2ca611ea..830c42eb52f8 100644
--- a/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx
@@ -70,11 +70,142 @@ void call(
 sal_Int32 ngpr = 1;
 sal_Int32 nfpr = 0;
 sal_Int32 sp = 0;
+#ifdef MACOSX
+sal_Int32 subsp = 0;
+#endif
 for (sal_Int32 i = 0; i != count; ++i) {
 if (!parameters[i].bOut
 && bridges::cpp_uno::shared::isSimpleType(parameters[i].pTypeRef))
 {
 switch (parameters[i].pTypeRef->eTypeClass) {
+#ifdef MACOSX
+case typelib_TypeClass_BOOLEAN:
+case typelib_TypeClass_BYTE:
+if (ngpr < 8)
+{
+args[i] = gpr + ngpr;
+ngpr++;
+}
+else
+{
+args[i] = reinterpret_cast(reinterpret_cast(stack + sp) + subsp);
+subsp += 1;
+if (subsp == 8)
+{
+sp++;
+subsp = 0;
+}
+}
+break;
+case typelib_TypeClass_SHORT:
+case typelib_TypeClass_UNSIGNED_SHORT:
+case typelib_TypeClass_CHAR:
+if (ngpr < 8)
+{
+args[i] = gpr + ngpr;
+ngpr++;
+}
+else
+{
+subsp = (subsp + 1) & ~0x1;
+if (subsp == 8)
+{
+sp++;
+subsp = 0;
+}
+args[i] = reinterpret_cast(reinterpret_cast(stack + sp) + subsp);
+subsp += 2;
+if (subsp == 8)
+{
+sp++;
+subsp = 0;
+}
+}
+break;
+case typelib_TypeClass_LONG:
+case typelib_TypeClass_UNSIGNED_LONG:
+case typelib_TypeClass_ENUM:
+if (ngpr < 8)
+{
+args[i] = gpr + ngpr;
+ngpr++;
+}
+else
+{
+subsp = (subsp + 3) & ~0x3;
+if (subsp == 8)
+{
+sp++;
+subsp = 0;
+}
+args[i] = reinterpret_cast(reinterpret_cast(stack + sp) + subsp);
+subsp += 4;
+if (subsp == 8)
+{
+sp++;
+subsp = 0;
+}
+}
+break;
+case typelib_TypeClass_HYPER:
+case typelib_TypeClass_UNSIGNED_HYPER:
+if (ngpr < 8)
+{
+args[i] = gpr + ngpr;
+ngpr++;
+}
+else
+{
+if (subsp > 0)
+{
+sp++;
+subsp = 0;
+}
+args[i] = stack + sp;
+sp++;
+}
+break;
+case typelib_TypeClass_FLOAT:
+if (nfpr < 8)
+{
+args[i] = fpr + nfpr;
+nfpr++;
+}
+else
+{
+subsp = (subsp + 3) & ~0x3;
+if (subsp == 8)
+   

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

2020-11-13 Thread Andrea Gelmini (via logerrit)
 0 files changed

New commits:
commit 7392394028275f05377ace11b1cab850e1fcf521
Author: Andrea Gelmini 
AuthorDate: Thu Nov 12 18:09:34 2020 +0100
Commit: Julien Nabet 
CommitDate: Fri Nov 13 18:28:14 2020 +0100

Removed executable permission on docx file

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf137850_compat15ZOrder.docx 
b/sw/qa/extras/ooxmlexport/data/tdf137850_compat15ZOrder.docx
old mode 100755
new mode 100644
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: officecfg/registry sc/inc sc/sdi sc/source

2020-11-13 Thread Jim Raykowski (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |6 +
 sc/inc/sc.hrc |2 
 sc/sdi/prevwsh.sdi|4 
 sc/sdi/scalc.sdi  |   36 

 sc/sdi/tabvwsh.sdi|2 
 sc/source/ui/unoobj/viewuno.cxx   |2 
 sc/source/ui/view/preview.cxx |   10 +-
 sc/source/ui/view/prevwsh.cxx |   10 +-
 sc/source/ui/view/tabview.cxx |4 
 sc/source/ui/view/tabview3.cxx|2 
 sc/source/ui/view/tabvwsh3.cxx|   42 
++
 sc/source/ui/view/tabvwsha.cxx|   17 
 12 files changed, 89 insertions(+), 48 deletions(-)

New commits:
commit 95b27dd2e5b5bdcb39962f72882dcdf406bcb393
Author: Jim Raykowski 
AuthorDate: Sun Oct 11 16:15:47 2020 -0800
Commit: Jim Raykowski 
CommitDate: Fri Nov 13 17:53:20 2020 +0100

tdf#45705 rework zoom in and zoom out UI commands in Calc

Similar to commit 2cddaa6e199ed8bb6185b7825791199f9da4a670 done for
Writer view shell, this patch makes zoom in and zoom out commands
functional for Calc view shell in addition to the preview shell.

Change-Id: Ibf1fd92e79c82cdea91d0d01491ac25577df54fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104196
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index f96f82b6259a..eaa4e6f6c184 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -319,6 +319,9 @@
 
   Zoom In
 
+
+  .uno:ZoomPlus
+
 
   1
 
@@ -327,6 +330,9 @@
 
   Zoom Out
 
+
+  .uno:ZoomMinus
+
 
   1
 
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index f13b1fb78ab4..b493545ec810 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -458,8 +458,6 @@
 #define SID_PREVIEW_PREVIOUS(SID_PREVIEW_START+1)
 #define SID_PREVIEW_FIRST   (SID_PREVIEW_START+2)
 #define SID_PREVIEW_LAST(SID_PREVIEW_START+3)
-#define SID_PREVIEW_ZOOMIN  (SID_PREVIEW_START+5)
-#define SID_PREVIEW_ZOOMOUT (SID_PREVIEW_START+6)
 #define SID_PREVIEW_CLOSE   (SID_PREVIEW_START+7)
 #define SID_PREVIEW_MARGIN  (SID_PREVIEW_START+8)
 #define SID_PREVIEW_SCALINGFACTOR   (SID_PREVIEW_START+9)
diff --git a/sc/sdi/prevwsh.sdi b/sc/sdi/prevwsh.sdi
index 2dc6211ed86a..58cba8eaf47a 100644
--- a/sc/sdi/prevwsh.sdi
+++ b/sc/sdi/prevwsh.sdi
@@ -119,8 +119,8 @@ interface TablePrintPreview
 StateMethod = GetState ;
 GroupId = SfxGroupId::Intern ;
 ]
-SID_PREVIEW_ZOOMIN  [ ExecMethod = Execute; StateMethod = GetState; ]
-SID_PREVIEW_ZOOMOUT [ ExecMethod = Execute; StateMethod = GetState; ]
+SID_ZOOM_IN  [ ExecMethod = Execute; StateMethod = GetState; ]
+SID_ZOOM_OUT [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_REPAINT [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_UNDO[ ExecMethod = Execute; StateMethod = GetState; ]
 SID_REDO[ ExecMethod = Execute; StateMethod = GetState; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 86ae80497a77..077fa4adf9d9 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -5876,42 +5876,6 @@ SfxBoolItem WrapText SID_ATTR_ALIGN_LINEBREAK
 ]
 
 
-SfxVoidItem ZoomIn SID_PREVIEW_ZOOMIN
-()
-[
-AutoUpdate = FALSE,
-FastCall = FALSE,
-ReadOnlyDoc = TRUE,
-Toggle = FALSE,
-Container = FALSE,
-RecordAbsolute = FALSE,
-RecordPerSet;
-
-AccelConfig = TRUE,
-MenuConfig = FALSE,
-ToolBoxConfig = TRUE,
-GroupId = SfxGroupId::View;
-]
-
-
-SfxVoidItem ZoomOut SID_PREVIEW_ZOOMOUT
-()
-[
-AutoUpdate = FALSE,
-FastCall = FALSE,
-ReadOnlyDoc = TRUE,
-Toggle = FALSE,
-Container = FALSE,
-RecordAbsolute = FALSE,
-RecordPerSet;
-
-AccelConfig = TRUE,
-MenuConfig = FALSE,
-ToolBoxConfig = TRUE,
-GroupId = SfxGroupId::View;
-]
-
-
 SfxVoidItem FocusInputLine SID_FOCUS_INPUTLINE
 ()
 [
diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi
index 1026c3e98105..50049bad7abc 100644
--- a/sc/sdi/tabvwsh.sdi
+++ b/sc/sdi/tabvwsh.sdi
@@ -161,6 +161,8 @@ interface TableEditView
 SID_CREATE_SW_DRAWVIEW [ ExecMethod = Execute; ]
 SID_ATTR_ZOOM   [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_ATTR_ZOOMSLIDER [ ExecMethod = Execute; StateMethod = GetState; ]
+SID_ZOOM_IN [ ExecMethod = Execute; StateMethod = 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - chart2/source

2020-11-13 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 121bbf069a0c2dd5990c8da89a3fc060ae83cb92
Author: Muhammet Kara 
AuthorDate: Wed Mar 18 13:56:43 2020 +0300
Commit: Muhammet Kara 
CommitDate: Fri Nov 13 16:31:58 2020 +0100

Sidebar tdf#92768: Fix title & subtitle checkboxes on the ChartDeck

Turns out the 2nd part of tdf#92768 was not implemented yet, so it is
still necessary to remove the title/subtitle for good, otherwise we set
the "Visibility" property, but nothing actually reads that when
rendering.

So the titles now work as they did before the regression. An uncheck action
removes the title/subtitle, and a check action just makes the existing
title/subtitle visible or creates a new one if it doesn't exist

Change-Id: I23122d1be2d95af878b824ba194bd1aeed5f4f89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90692
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105640
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx 
b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index ac48b0a7e9cb..14fd14dad5d5 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -592,7 +592,9 @@ void 
ChartElementsPanel::setTitleVisible(TitleHelper::eTitleType eTitle, bool bV
 }
 else
 {
-TitleHelper::hideTitle(eTitle, mxModel);
+// TODO tdf#92768 use TitleHelper::hideTitle() here once there is
+// rendering suport for the property "Visible"
+TitleHelper::removeTitle(eTitle, mxModel);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread László Németh (via logerrit)
 i18npool/qa/cppunit/test_textsearch.cxx |  115 
 i18npool/source/search/textsearch.cxx   |   30 
 i18npool/source/search/textsearch.hxx   |3 
 3 files changed, 148 insertions(+)

New commits:
commit d40f2d02df26e216f367b5da3f9546b73f250469
Author: László Németh 
AuthorDate: Thu Nov 12 11:33:05 2020 +0100
Commit: László Németh 
CommitDate: Fri Nov 13 16:06:25 2020 +0100

tdf#117643 Writer: fix apostrophe search regression

During text search, ASCII apostrophe ' (U+0027)
of the search term matches the typographic
apostrophe ’ (U+2019) of the text, too.

There was a UX regression in document editing from
commit e6fade1ce133039d28369751b77ac8faff6e40cb
(tdf#38395 enable smart apostrophe replacement by default),
because Find and Replace window and Find toolbar
doesn't replace ASCII apostrophe, so the search term
hadn't matched the text (now with the automatically
replaced typographic apostrophes), as before the commit.

Regex search hasn't been modified, i.e. searching U+2019
is still necessary a search term with U+2019.

The typographic apostrophes of a search term only match
ASCII apostrophes of the text, if the search term contain
also an ASCII apostrophe, too.

Note: as a more sophisticated solution, it's possible to
add a new default transliteration option for this later.

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

diff --git a/i18npool/qa/cppunit/test_textsearch.cxx 
b/i18npool/qa/cppunit/test_textsearch.cxx
index 3d157e2cbdb4..51e6a11bfc83 100644
--- a/i18npool/qa/cppunit/test_textsearch.cxx
+++ b/i18npool/qa/cppunit/test_textsearch.cxx
@@ -38,11 +38,13 @@ public:
 void testICU();
 void testSearches();
 void testWildcardSearch();
+void testApostropheSearch();
 
 CPPUNIT_TEST_SUITE(TestTextSearch);
 CPPUNIT_TEST(testICU);
 CPPUNIT_TEST(testSearches);
 CPPUNIT_TEST(testWildcardSearch);
+CPPUNIT_TEST(testApostropheSearch);
 CPPUNIT_TEST_SUITE_END();
 private:
 uno::Reference m_xSearch;
@@ -265,6 +267,119 @@ void TestTextSearch::testWildcardSearch()
 CPPUNIT_ASSERT((aRes.startOffset[0] == 6) && (aRes.endOffset[0] == 0));
 }
 
+void TestTextSearch::testApostropheSearch()
+{
+// A) find typographic apostrophes also by using ASCII apostrophe in 
searchString
+OUString str( u"It\u2019s an apostrophe." );
+sal_Int32 startPos = 0, endPos = str.getLength();
+
+// set options
+util::SearchOptions aOptions;
+aOptions.algorithmType = util::SearchAlgorithms_ABSOLUTE;
+aOptions.searchFlag = util::SearchFlags::ALL_IGNORE_CASE;
+aOptions.searchString = "'";
+m_xSearch->setOptions( aOptions );
+
+util::SearchResult aRes;
+
+// search forward
+aRes = m_xSearch->searchForward( str, startPos, endPos );
+// This was 0.
+CPPUNIT_ASSERT( aRes.subRegExpressions > 0 );
+CPPUNIT_ASSERT_EQUAL( static_cast(2), aRes.startOffset[0] );
+CPPUNIT_ASSERT_EQUAL( static_cast(3), aRes.endOffset[0] );
+
+// search backwards
+aRes = m_xSearch->searchBackward( str, endPos, startPos );
+// This was 0.
+CPPUNIT_ASSERT( aRes.subRegExpressions > 0 );
+CPPUNIT_ASSERT_EQUAL( static_cast(3), aRes.startOffset[0] );
+CPPUNIT_ASSERT_EQUAL( static_cast(2), aRes.endOffset[0] );
+
+// check with transliteration
+aOptions.transliterateFlags = 
static_cast(TransliterationFlags::IGNORE_CASE
+| TransliterationFlags::IGNORE_WIDTH);
+m_xSearch->setOptions(aOptions);
+
+// search forward
+aRes = m_xSearch->searchForward( str, startPos, endPos );
+// This was 0.
+CPPUNIT_ASSERT( aRes.subRegExpressions > 0 );
+CPPUNIT_ASSERT_EQUAL( static_cast(2), aRes.startOffset[0] );
+CPPUNIT_ASSERT_EQUAL( static_cast(3), aRes.endOffset[0] );
+
+// search backwards
+aRes = m_xSearch->searchBackward( str, endPos, startPos );
+// This was 0.
+CPPUNIT_ASSERT( aRes.subRegExpressions > 0 );
+CPPUNIT_ASSERT_EQUAL( static_cast(3), aRes.startOffset[0] );
+CPPUNIT_ASSERT_EQUAL( static_cast(2), aRes.endOffset[0] );
+
+// B) search ASCII apostrophe in a text with ASCII apostrophes
+str = str.replace(u'\u2019', '\'');
+
+// search forward
+aRes = m_xSearch->searchForward( str, startPos, endPos );
+CPPUNIT_ASSERT( aRes.subRegExpressions > 0 );
+CPPUNIT_ASSERT_EQUAL( static_cast(2), aRes.startOffset[0] );
+CPPUNIT_ASSERT_EQUAL( static_cast(3), aRes.endOffset[0] );
+
+// search backwards
+aRes = m_xSearch->searchBackward( str, endPos, startPos );
+CPPUNIT_ASSERT( aRes.subRegExpressions > 0 );
+CPPUNIT_ASSERT_EQUAL( static_cast(3), aRes.startOffset[0] );
+CPPUNIT_ASSERT_EQUAL( static_cast(2), aRes.endOffset[0] );
+
+// C) search typographic apo

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

2020-11-13 Thread Luboš Luňák (via logerrit)
 vcl/skia/skia_denylist_vulkan.xml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f413852e657dc524b3d2773862e788dfc6595d8d
Author: Luboš Luňák 
AuthorDate: Thu Nov 12 12:37:17 2020 +0100
Commit: Luboš Luňák 
CommitDate: Fri Nov 13 16:05:31 2020 +0100

block nvidia drivers for vulkan only for version<457.36.0 (tdf#138145)

Reportedly that one works fine, although the situation is somewhat
unclear to me (tdf#135370 appears to have been worked around as
a side effect of d18731f71c60cbb6c02cabb042004b1aa9454de8,
and both tdf#136036 and tdf#136407 do not have confirmation from
anybody else than the reporters). If things do not go well,
the blocklist can get more fine-grained.

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

diff --git a/vcl/skia/skia_denylist_vulkan.xml 
b/vcl/skia/skia_denylist_vulkan.xml
index 5bcab2940ace..8c01a0956664 100644
--- a/vcl/skia/skia_denylist_vulkan.xml
+++ b/vcl/skia/skia_denylist_vulkan.xml
@@ -27,7 +27,7 @@
 
 
 
-
+
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Luboš Luňák (via logerrit)
 vcl/source/outdev/gradient.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c98467b7069ff06a8ff42832c3f2bdf193c487bd
Author: Luboš Luňák 
AuthorDate: Thu Nov 12 15:38:43 2020 +0100
Commit: Luboš Luňák 
CommitDate: Fri Nov 13 16:04:54 2020 +0100

properly clip native VCL gradients (tdf#137563)

If I'm getting it right, OutputDevice::InitClipRegion() sets
mbOutputClipped = true if the entire output would be clipped,
and it doesn't call SalGraphics::SetClipRegion() at all, instead
OutputDevice draw calls are supposed to avoid the drawing entirely.
But while the polygon fallback in OutputDevice::DrawGradient()
does so, the call to SalGraphics::DrawGradient() didn't.

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

diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 32852eefc34e..f37bad807845 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -106,7 +106,8 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& 
rPolyPoly,
 InitClipRegion();
 
 // try to draw gradient natively
-bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, aGradient );
+if (!mbOutputClipped)
+bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, 
aGradient );
 
 if (!bDrawn && !mbOutputClipped)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Miklos Vajna (via logerrit)
 xmlsecurity/qa/unit/pdfsigning/data/good-custom-magic.pdf |binary
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |   23 +
 xmlsecurity/source/helper/pdfsignaturehelper.cxx  |  293 +++---
 3 files changed, 175 insertions(+), 141 deletions(-)

New commits:
commit 2f89aa232302368201383b1a168f31a02f80077b
Author: Miklos Vajna 
AuthorDate: Thu Nov 12 21:09:03 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Nov 13 15:29:09 2020 +0100

xmlsecurity: verify signatures using pdfium

And add a testcase with an odd PDF which were not handled by the old
tokenizer but is handled by pdfium.

Signature verification is happening implicitly while a document is
opened, so it makes sense to use the more battle-tested pdfium to do
this verification, instead of own code. (The APIs are somewhat
low-level, so we can easily keep using our crypto stack for digest
verification and our own certificate validation.) Signature creation
still happens with the same own code, though.

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

diff --git a/xmlsecurity/qa/unit/pdfsigning/data/good-custom-magic.pdf 
b/xmlsecurity/qa/unit/pdfsigning/data/good-custom-magic.pdf
new file mode 100644
index ..2c532cbf6a44
Binary files /dev/null and 
b/xmlsecurity/qa/unit/pdfsigning/data/good-custom-magic.pdf differ
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index fb47b9887f15..283223b9c409 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -511,6 +511,29 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testUnknownSubFilter)
 CPPUNIT_ASSERT_EQUAL(static_cast(2), rInformations.size());
 }
 
+CPPUNIT_TEST_FIXTURE(PDFSigningTest, testGoodCustomMagic)
+{
+// Tokenize the bugdoc.
+uno::Reference xSEInitializer
+= xml::crypto::SEInitializer::create(mxComponentContext);
+uno::Reference xSecurityContext
+= xSEInitializer->createSecurityContext(OUString());
+std::unique_ptr pStream = utl::UcbStreamHelper::CreateStream(
+m_directories.getURLFromSrc(DATA_DIRECTORY) + "good-custom-magic.pdf",
+StreamMode::STD_READ);
+uno::Reference xStream(new 
utl::OStreamWrapper(std::move(pStream)));
+DocumentSignatureManager aManager(mxComponentContext, 
DocumentSignatureMode::Content);
+aManager.setSignatureStream(xStream);
+aManager.read(/*bUseTempStream=*/false);
+
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1 (SecurityOperationStatus_OPERATION_SUCCEEDED)
+// - Actual  : 0 (SecurityOperationStatus_UNKNOWN)
+// i.e. no signatures were found due to a custom non-comment magic after 
the header.
+std::vector& rInformations = 
aManager.getCurrentSignatureInformations();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), rInformations.size());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/pdfsignaturehelper.cxx 
b/xmlsecurity/source/helper/pdfsignaturehelper.cxx
index 72f7618a2253..6b8eefef7099 100644
--- a/xmlsecurity/source/helper/pdfsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/pdfsignaturehelper.cxx
@@ -35,6 +35,9 @@
 #include 
 #include 
 #include 
+#if HAVE_FEATURE_PDFIUM
+#include 
+#endif
 
 using namespace ::com::sun::star;
 
@@ -116,82 +119,91 @@ void GetSignatureLineShape(const 
uno::Reference& xModel, sal_Int3
 aStream.ReadBytes(rSignatureLineShape.data(), rSignatureLineShape.size());
 }
 
+#if HAVE_FEATURE_PDFIUM
+/// Represents a parsed signature.
+struct Signature
+{
+FPDF_SIGNATURE m_pSignature;
+/// Offset+length pairs.
+std::vector> m_aByteRanges;
+};
+
 /// Turns an array of floats into offset + length pairs.
-bool GetByteRangesFromPDF(const vcl::filter::PDFArrayElement& rArray,
+void GetByteRangesFromPDF(FPDF_SIGNATURE pSignature,
   std::vector>& rByteRanges)
 {
-size_t nByteRangeOffset = 0;
-const std::vector& rByteRangeElements = 
rArray.GetElements();
-for (size_t i = 0; i < rByteRangeElements.size(); ++i)
+int nByteRangeLen = FPDFSignatureObj_GetByteRange(pSignature, nullptr, 0);
+if (nByteRangeLen <= 0)
 {
-auto pNumber = 
dynamic_cast(rByteRangeElements[i]);
-if (!pNumber)
-{
-SAL_WARN("xmlsecurity.helper",
- "ValidateSignature: signature offset and length has to be 
a number");
-return false;
-}
+SAL_WARN("xmlsecurity.helper", "GetByteRangesFromPDF: no byte ranges");
+return;
+}
+
+std::vector aByteRange(nByteRangeLen);
+FPDFSignatureObj_GetByteRange(pSignature, aByteRange.data(), 
aByteRange.size());
 
+size_t nByteRangeOffset = 0;
+for 

[Libreoffice-commits] core.git: 2 commits - hwpfilter/source idlc/inc idlc/source idl/source solenv/clang-format

2020-11-13 Thread Philipp Hofer (via logerrit)
 hwpfilter/source/datecode.h |5 -
 hwpfilter/source/hfont.cxx  |   18 ++-
 hwpfilter/source/hstream.cxx|   12 +---
 hwpfilter/source/hstyle.cxx |   35 +
 hwpfilter/source/htags.h|   12 ++--
 hwpfilter/source/precompile.h   |6 +-
 hwpfilter/source/solver.h   |   20 +++
 idl/source/objects/module.cxx   |   13 +
 idlc/inc/astconstants.hxx   |3 -
 idlc/inc/astenum.hxx|8 +--
 idlc/inc/astexception.hxx   |5 +
 idlc/inc/astmodule.hxx  |9 +--
 idlc/inc/astneeds.hxx   |7 +-
 idlc/inc/astobserves.hxx|9 +--
 idlc/inc/astscope.hxx   |   21 +++-
 idlc/inc/astsequence.hxx|   17 +++---
 idlc/inc/aststack.hxx   |4 -
 idlc/inc/asttype.hxx|3 -
 idlc/source/astexpression.cxx   |   92 +++-
 idlc/source/aststack.cxx|   12 +---
 idlc/source/attributeexceptions.hxx |   10 ++-
 solenv/clang-format/excludelist |   21 
 22 files changed, 150 insertions(+), 192 deletions(-)

New commits:
commit 9c9a8229201bd134df923420c97db84688a7813c
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 13:00:40 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:19:47 2020 +0100

tdf#123936 Formatting files in module idl with clang-format

Change-Id: I0a2681218773288c14b6faf98dd0bb8a7dbac56d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105679
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index fe64287ae8e2..17c483a3243e 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -22,17 +22,14 @@
 #include 
 #include 
 
+SvMetaModule::SvMetaModule() {}
 
-SvMetaModule::SvMetaModule()
+void SvMetaModule::WriteSfx(SvIdlDataBase& rBase, SvStream& rOutStm)
 {
-}
-
-void SvMetaModule::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
-{
-for( sal_uLong n = 0; n < aClassList.size(); n++ )
+for (sal_uLong n = 0; n < aClassList.size(); n++)
 {
-SvMetaClass * pClass = aClassList[n];
-pClass->WriteSfx( rBase, rOutStm );
+SvMetaClass* pClass = aClassList[n];
+pClass->WriteSfx(rBase, rOutStm);
 }
 }
 
diff --git a/idlc/inc/astconstants.hxx b/idlc/inc/astconstants.hxx
index cf97e2cc6971..6add23a45359 100644
--- a/idlc/inc/astconstants.hxx
+++ b/idlc/inc/astconstants.hxx
@@ -26,7 +26,8 @@ class AstConstants final : public AstModule
 public:
 AstConstants(const OString& name, AstScope* pScope)
 : AstModule(NT_constants, name, pScope)
-{}
+{
+}
 };
 
 #endif // INCLUDED_IDLC_INC_ASTCONSTANTS_HXX
diff --git a/idlc/inc/astenum.hxx b/idlc/inc/astenum.hxx
index 085a397b0f22..dc89d430adb2 100644
--- a/idlc/inc/astenum.hxx
+++ b/idlc/inc/astenum.hxx
@@ -23,23 +23,21 @@
 #include "astscope.hxx"
 #include "astconstant.hxx"
 
-class AstEnum final : public AstType
-  , public AstScope
+class AstEnum final : public AstType, public AstScope
 {
 public:
 AstEnum(const OString& name, AstScope* pScope);
 
 virtual ~AstEnum() override;
 
-sal_Int32 getEnumValueCount()
-{ return m_enumValueCount++; }
+sal_Int32 getEnumValueCount() { return m_enumValueCount++; }
 
 AstConstant* checkValue(AstExpression* pExpr);
 
 virtual bool dump(RegistryKey& rKey) override;
 
 private:
-sal_Int32   m_enumValueCount;
+sal_Int32 m_enumValueCount;
 };
 
 #endif // INCLUDED_IDLC_INC_ASTENUM_HXX
diff --git a/idlc/inc/astexception.hxx b/idlc/inc/astexception.hxx
index 70c1ffc9c706..6c2d549bc9a2 100644
--- a/idlc/inc/astexception.hxx
+++ b/idlc/inc/astexception.hxx
@@ -24,9 +24,10 @@
 class AstException final : public AstStruct
 {
 public:
-AstException(const OString& name, AstException const * pBaseType, 
AstScope* pScope)
+AstException(const OString& name, AstException const* pBaseType, AstScope* 
pScope)
 : AstStruct(NT_exception, name, pBaseType, pScope)
-{}
+{
+}
 };
 
 #endif // INCLUDED_IDLC_INC_ASTEXCEPTION_HXX
diff --git a/idlc/inc/astmodule.hxx b/idlc/inc/astmodule.hxx
index df50ac95df5f..6178cfbb63da 100644
--- a/idlc/inc/astmodule.hxx
+++ b/idlc/inc/astmodule.hxx
@@ -22,18 +22,19 @@
 #include "astdeclaration.hxx"
 #include "astscope.hxx"
 
-class AstModule : public AstDeclaration
-, public AstScope
+class AstModule : public AstDeclaration, public AstScope
 {
 public:
 AstModule(const OString& name, AstScope* pScope)
 : AstDeclaration(NT_module, name, pScope)
 , AstScope(NT_module)
-{}
+{
+}
 AstModule(NodeType type, const OString& name, AstScope* pScope)
 : AstDeclaration(type, name, pScope)
 , AstScope(type)
-{}
+{
+}
 
 virtual bool dump(RegistryKey& rKey) override;
 };
diff --git a/idlc/inc/astneeds.

[Libreoffice-commits] core.git: 2 commits - fpicker/inc fpicker/source helpcompiler/source solenv/clang-format

2020-11-13 Thread Philipp Hofer (via logerrit)
 fpicker/inc/fpsofficeResMgr.hxx   |5 +
 fpicker/source/aqua/CFStringUtilities.hxx |5 +++--
 fpicker/source/aqua/NSString_OOoAdditions.hxx |4 ++--
 fpicker/source/aqua/SalAquaPicker.hxx |   26 ++
 fpicker/source/office/QueryFolderName.hxx |6 +++---
 fpicker/source/office/autocmpledit.hxx|   13 -
 fpicker/source/office/breadcrumb.hxx  |   14 +++---
 fpicker/source/win32/WinImplHelper.hxx|7 +++
 fpicker/source/win32/resourceprovider.hxx |3 +--
 fpicker/source/win32/shared.hxx   |6 +++---
 helpcompiler/source/HelpLinker_main.cxx   |   10 +-
 helpcompiler/source/LuceneHelper.cxx  |6 +++---
 helpcompiler/source/LuceneHelper.hxx  |8 
 solenv/clang-format/excludelist   |   13 -
 14 files changed, 53 insertions(+), 73 deletions(-)

New commits:
commit 11aa7dc7a6009c02e681f41f7255902fe578ab7e
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:59:08 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:18:57 2020 +0100

tdf#123936 Formatting files in module helpcompiler with clang-format

Change-Id: Ibf7baa3de0a8cd7952044909c00c55e7c5b008a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105675
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/helpcompiler/source/HelpLinker_main.cxx 
b/helpcompiler/source/HelpLinker_main.cxx
index 36826b49209c..5c8fe8807336 100644
--- a/helpcompiler/source/HelpLinker_main.cxx
+++ b/helpcompiler/source/HelpLinker_main.cxx
@@ -23,25 +23,25 @@
 #include 
 #include 
 
-SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
+SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
+{
 std::vector args;
 for (int i = 1; i < argc; ++i)
 args.push_back(std::string(argv[i]));
 try
 {
 std::unique_ptr pHelpLinker(new HelpLinker());
-pHelpLinker->main( args );
+pHelpLinker->main(args);
 }
-catch( const HelpProcessingException& e )
+catch (const HelpProcessingException& e)
 {
 std::cerr << e.m_aErrorMsg;
 exit(1);
 }
-catch (const std::exception &e)
+catch (const std::exception& e)
 {
 std::cerr << e.what();
 exit(1);
 }
 return 0;
 }
-
diff --git a/helpcompiler/source/LuceneHelper.cxx 
b/helpcompiler/source/LuceneHelper.cxx
index 7002162a7862..d6a2de2523e8 100644
--- a/helpcompiler/source/LuceneHelper.cxx
+++ b/helpcompiler/source/LuceneHelper.cxx
@@ -9,7 +9,7 @@
 
 #include "LuceneHelper.hxx"
 
-std::vector OUStringToTCHARVec(OUString const &rStr)
+std::vector OUStringToTCHARVec(OUString const& rStr)
 {
 //UTF-16
 if (sizeof(TCHAR) == sizeof(sal_Unicode))
@@ -17,7 +17,7 @@ std::vector OUStringToTCHARVec(OUString const &rStr)
 
 //UTF-32
 std::vector aRet;
-for (sal_Int32 nStrIndex = 0; nStrIndex < rStr.getLength(); )
+for (sal_Int32 nStrIndex = 0; nStrIndex < rStr.getLength();)
 {
 const sal_uInt32 nCode = rStr.iterateCodePoints(&nStrIndex);
 aRet.push_back(nCode);
@@ -26,7 +26,7 @@ std::vector OUStringToTCHARVec(OUString const &rStr)
 return aRet;
 }
 
-OUString TCHARArrayToOUString(TCHAR const *str)
+OUString TCHARArrayToOUString(TCHAR const* str)
 {
 // UTF-16
 if (sizeof(TCHAR) == sizeof(sal_Unicode))
diff --git a/helpcompiler/source/LuceneHelper.hxx 
b/helpcompiler/source/LuceneHelper.hxx
index a84346e25faf..781f30bba416 100644
--- a/helpcompiler/source/LuceneHelper.hxx
+++ b/helpcompiler/source/LuceneHelper.hxx
@@ -11,20 +11,20 @@
 #define INCLUDED_HELPCOMPILER_SOURCE_LUCENEHELPER_HXX
 
 #if defined(__GNUC__)
-#  pragma GCC visibility push (default)
+#pragma GCC visibility push(default)
 #endif
 
 #include 
 
 #if defined(__GNUC__)
-#  pragma GCC visibility pop
+#pragma GCC visibility pop
 #endif
 
 #include 
 #include 
 
-std::vector OUStringToTCHARVec(OUString const &rStr);
-OUString TCHARArrayToOUString(TCHAR const *str);
+std::vector OUStringToTCHARVec(OUString const& rStr);
+OUString TCHARArrayToOUString(TCHAR const* str);
 
 #endif
 
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 28f484cfb5f9..b4bc8c6fa988 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -4809,10 +4809,7 @@ helpcompiler/source/HelpCompiler.cxx
 helpcompiler/source/HelpIndexer.cxx
 helpcompiler/source/HelpIndexer_main.cxx
 helpcompiler/source/HelpLinker.cxx
-helpcompiler/source/HelpLinker_main.cxx
 helpcompiler/source/HelpSearch.cxx
-helpcompiler/source/LuceneHelper.cxx
-helpcompiler/source/LuceneHelper.hxx
 hwpfilter/qa/cppunit/test_hwpfilter.cxx
 hwpfilter/source/attributes.cxx
 hwpfilter/source/attributes.hxx
commit 4d9e9f2125867adde3558b9866d08f7bafb4386b
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:58:22 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:18:38 2020 +0100

tdf#123936 Format

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

2020-11-13 Thread Philipp Hofer (via logerrit)
 formula/source/core/resource/core_resource.cxx |5 -
 formula/source/ui/dlg/funcpage.cxx |   70 -
 solenv/clang-format/excludelist|2 
 3 files changed, 26 insertions(+), 51 deletions(-)

New commits:
commit 36074893c87f80daf889287c736d604f590c0ae5
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:58:00 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:19:14 2020 +0100

tdf#123936 Formatting files in module formula with clang-format

Change-Id: Id70a78e38749c6b402d6f709525a8c6b9a8701a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105671
Tested-by: Christian Lohmaier 
Reviewed-by: Christian Lohmaier 

diff --git a/formula/source/core/resource/core_resource.cxx 
b/formula/source/core/resource/core_resource.cxx
index e89a1ce367aa..b9e1347f0b5a 100644
--- a/formula/source/core/resource/core_resource.cxx
+++ b/formula/source/core/resource/core_resource.cxx
@@ -19,9 +19,6 @@
 #include 
 #include 
 
-OUString ForResId(const char *pId)
-{
-return Translate::get(pId, Translate::Create("for"));
-}
+OUString ForResId(const char* pId) { return Translate::get(pId, 
Translate::Create("for")); }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/dlg/funcpage.cxx 
b/formula/source/ui/dlg/funcpage.cxx
index e8370d54938d..338f37bd2dd7 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -27,7 +27,6 @@
 
 namespace formula
 {
-
 IMPL_LINK(FuncPage, KeyInputHdl, const KeyEvent&, rKEvt, bool)
 {
 if (rKEvt.GetCharCode() == ' ')
@@ -52,7 +51,7 @@ FuncPage::FuncPage(weld::Container* pParent, const 
IFunctionManager* _pFunctionM
 m_pFunctionManager->fillLastRecentlyUsedFunctions(aLRUList);
 
 const sal_uInt32 nCategoryCount = m_pFunctionManager->getCount();
-for(sal_uInt32 j= 0; j < nCategoryCount; ++j)
+for (sal_uInt32 j = 0; j < nCategoryCount; ++j)
 {
 const IFunctionCategory* pCategory = 
m_pFunctionManager->getCategory(j);
 OUString sId(OUString::number(reinterpret_cast(pCategory)));
@@ -65,23 +64,21 @@ FuncPage::FuncPage(weld::Container* pParent, const 
IFunctionManager* _pFunctionM
 // lock to its initial size
 
m_xLbFunction->set_size_request(m_xLbFunction->get_preferred_size().Width(),
 m_xLbFunction->get_height_rows(15));
-m_xLbCategory->connect_changed( LINK( this, FuncPage, SelComboBoxHdl ) );
-m_xLbFunction->connect_changed( LINK( this, FuncPage, SelTreeViewHdl ) );
-m_xLbFunction->connect_row_activated( LINK( this, FuncPage, DblClkHdl ) );
-m_xLbFunction->connect_key_press( LINK( this, FuncPage, KeyInputHdl ) );
-m_xLbFunctionSearchString->connect_changed( LINK( this, FuncPage, 
ModifyHdl ) );
+m_xLbCategory->connect_changed(LINK(this, FuncPage, SelComboBoxHdl));
+m_xLbFunction->connect_changed(LINK(this, FuncPage, SelTreeViewHdl));
+m_xLbFunction->connect_row_activated(LINK(this, FuncPage, DblClkHdl));
+m_xLbFunction->connect_key_press(LINK(this, FuncPage, KeyInputHdl));
+m_xLbFunctionSearchString->connect_changed(LINK(this, FuncPage, 
ModifyHdl));
 
 m_xLbFunctionSearchString->grab_focus();
 }
 
-FuncPage::~FuncPage()
-{
-}
+FuncPage::~FuncPage() {}
 
 void FuncPage::impl_addFunctions(const IFunctionCategory* _pCategory)
 {
 const sal_uInt32 nCount = _pCategory->getCount();
-for(sal_uInt32 i = 0 ; i < nCount; ++i)
+for (sal_uInt32 i = 0; i < nCount; ++i)
 {
 TFunctionDesc pDesc(_pCategory->getFunction(i));
 if (!pDesc->isHidden())
@@ -102,14 +99,15 @@ void FuncPage::UpdateFunctionList(const OUString& aStr)
 
 if (aStr.isEmpty() || nSelPos == 0)
 {
-const IFunctionCategory* pCategory = reinterpret_cast(m_xLbCategory->get_id(nSelPos).toInt64());
+const IFunctionCategory* pCategory
+= reinterpret_cast(m_xLbCategory->get_id(nSelPos).toInt64());
 
-if ( nSelPos > 0 )
+if (nSelPos > 0)
 {
-if ( pCategory == nullptr )
+if (pCategory == nullptr)
 {
 const sal_uInt32 nCount = m_pFunctionManager->getCount();
-for(sal_uInt32 i = 0 ; i < nCount; ++i)
+for (sal_uInt32 i = 0; i < nCount; ++i)
 {
 impl_addFunctions(m_pFunctionManager->getCategory(i));
 }
@@ -123,7 +121,7 @@ void FuncPage::UpdateFunctionList(const OUString& aStr)
 {
 for (auto const& elem : aLRUList)
 {
-if (elem)  // may be null if a function is no longer available
+if (elem) // may be null if a function is no longer available
 {
 OUString 
sId(OUString::number(reinterpret_cast(elem)));
 m_xLbFunction->append(sId, elem->getFunctionName());
@@ -135,7 +133,7 @@ void FuncPage::UpdateFunctionList(const OUString&

[Libreoffice-commits] core.git: framework/inc framework/source solenv/clang-format

2020-11-13 Thread Philipp Hofer (via logerrit)
 framework/inc/helper/wakeupthread.hxx |   15 +--
 framework/inc/jobs/jobconst.hxx   |   12 +-
 framework/inc/services/uriabbreviation.hxx|   18 ++--
 framework/source/classes/framecontainer.cxx   |   60 +++---
 framework/source/dispatch/isstartmoduledispatch.hxx   |8 -
 framework/source/fwe/classes/fwkresid.cxx |5 -
 framework/source/fwe/xml/toolboxconfiguration.cxx |   44 --
 framework/source/fwi/helper/shareablemutex.cxx|   16 ---
 framework/source/helper/statusindicator.cxx   |   27 ++
 framework/source/jobs/jobresult.cxx   |   27 +++---
 framework/source/uiconfiguration/CommandImageResolver.hxx |8 -
 framework/source/xml/imagesconfiguration.cxx  |   41 -
 solenv/clang-format/excludelist   |   12 --
 13 files changed, 132 insertions(+), 161 deletions(-)

New commits:
commit 49494bb703107835f83671d9272a0326feec8bb4
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:58:48 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:18:12 2020 +0100

tdf#123936 Formatting files in module framework with clang-format

Change-Id: I8210a1d4bb51519f59265f370f5e8bab8a3c4179
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105674
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/framework/inc/helper/wakeupthread.hxx 
b/framework/inc/helper/wakeupthread.hxx
index 51cf859f0462..49f268a821e8 100644
--- a/framework/inc/helper/wakeupthread.hxx
+++ b/framework/inc/helper/wakeupthread.hxx
@@ -28,13 +28,15 @@
 #include 
 #include 
 
-namespace com::sun::star::util {
-class XUpdatable;
+namespace com::sun::star::util
+{
+class XUpdatable;
 }
 
-namespace framework{
-
-class WakeUpThread final : public salhelper::Thread {
+namespace framework
+{
+class WakeUpThread final : public salhelper::Thread
+{
 css::uno::WeakReference updatable_;
 osl::Condition condition_;
 
@@ -44,11 +46,10 @@ class WakeUpThread final : public salhelper::Thread {
 void execute() override;
 
 public:
-WakeUpThread(css::uno::Reference const & updatable);
+WakeUpThread(css::uno::Reference const& updatable);
 
 void stop();
 };
-
 }
 
 #endif
diff --git a/framework/inc/jobs/jobconst.hxx b/framework/inc/jobs/jobconst.hxx
index b2efb749e3a9..31a504a9d360 100644
--- a/framework/inc/jobs/jobconst.hxx
+++ b/framework/inc/jobs/jobconst.hxx
@@ -22,8 +22,8 @@
 
 #include 
 
-namespace framework{
-
+namespace framework
+{
 /**
 @short  defines all constant values used within a job environment.
 
@@ -34,10 +34,10 @@ namespace framework{
  */
 class JobConst
 {
-public:
-static constexpr OUStringLiteral ANSWER_DEACTIVATE_JOB = u"Deactivate";
-static constexpr OUStringLiteral ANSWER_SAVE_ARGUMENTS = 
u"SaveArguments";
-static constexpr OUStringLiteral ANSWER_SEND_DISPATCHRESULT = 
u"SendDispatchResult";
+public:
+static constexpr OUStringLiteral ANSWER_DEACTIVATE_JOB = u"Deactivate";
+static constexpr OUStringLiteral ANSWER_SAVE_ARGUMENTS = u"SaveArguments";
+static constexpr OUStringLiteral ANSWER_SEND_DISPATCHRESULT = 
u"SendDispatchResult";
 };
 
 } // namespace framework
diff --git a/framework/inc/services/uriabbreviation.hxx 
b/framework/inc/services/uriabbreviation.hxx
index 200296da2df9..f4e3ef10dc4b 100644
--- a/framework/inc/services/uriabbreviation.hxx
+++ b/framework/inc/services/uriabbreviation.hxx
@@ -28,23 +28,25 @@
 
 namespace framework
 {
-
-class UriAbbreviation final : public ::cppu::WeakImplHelper< 
css::util::XStringAbbreviation, css::lang::XServiceInfo>
+class UriAbbreviation final
+: public ::cppu::WeakImplHelper
 {
 public:
-explicit UriAbbreviation(css::uno::Reference< css::uno::XComponentContext 
> const & context);
+explicit UriAbbreviation(css::uno::Reference 
const& context);
 
 /* interface XServiceInfo */
 virtual OUString SAL_CALL getImplementationName() override;
-virtual sal_Bool SAL_CALL supportsService( const OUString& sServiceName ) 
override;
-virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 
override;
+virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) 
override;
+virtual css::uno::Sequence SAL_CALL getSupportedServiceNames() 
override;
 
 // css::util::XStringAbbreviation:
-virtual OUString SAL_CALL abbreviateString(const css::uno::Reference< 
css::util::XStringWidth > & xStringWidth, ::sal_Int32 nWidth, const OUString & 
aString) override;
+virtual OUString SAL_CALL
+abbreviateString(const css::uno::Reference& 
xStringWidth,
+ ::sal_Int32 nWidth, const OUString& aString) override;
 
 private:
-UriAbbreviation(UriAbbreviation const &) = delete;
-UriAbbreviation& operator =(UriAbbreviation const &) = delete;
+UriAbbreviation(UriAbbreviation const&) = delet

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

2020-11-13 Thread Philipp Hofer (via logerrit)
 forms/source/component/BaseListBox.hxx  |9 
 forms/source/component/findpos.hxx  |   10 +---
 forms/source/xforms/boolexpression.cxx  |   17 ++--
 forms/source/xforms/enumeration.cxx |   18 +++-
 forms/source/xforms/mip.hxx |   21 --
 forms/source/xforms/pathexpression.hxx  |   21 --
 forms/source/xforms/submission/serialization.hxx|9 +---
 forms/source/xforms/submission/serialization_app_xml.hxx|6 +-
 forms/source/xforms/submission/serialization_urlencoded.hxx |6 +-
 forms/source/xforms/submission/submission_get.hxx   |7 +--
 forms/source/xforms/submission/submission_put.hxx   |7 +--
 forms/source/xforms/unohelper.cxx   |   25 
 forms/source/xforms/xpathlib/extension.hxx  |   19 -
 solenv/clang-format/excludelist |   13 --
 14 files changed, 75 insertions(+), 113 deletions(-)

New commits:
commit 951764106e2d82fc59dcf39e14bc17838856a00c
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:57:37 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:17:55 2020 +0100

tdf#123936 Formatting files in module forms with clang-format

Change-Id: I230375bd002147642db37728fa0287b6a554e330
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105670
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/forms/source/component/BaseListBox.hxx 
b/forms/source/component/BaseListBox.hxx
index ec3b11510307..1e3ee87a1136 100644
--- a/forms/source/component/BaseListBox.hxx
+++ b/forms/source/component/BaseListBox.hxx
@@ -22,17 +22,12 @@
 
 #include 
 
-
 namespace frm
 {
-
-const sal_uInt16 ENTRY_NOT_FOUND =  0x;
-const sal_uInt16 BOUNDCOLUMN =  0x0001;
-
-
+const sal_uInt16 ENTRY_NOT_FOUND = 0x;
+const sal_uInt16 BOUNDCOLUMN = 0x0001;
 }
 
-
 #endif // INCLUDED_FORMS_SOURCE_COMPONENT_BASELISTBOX_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/component/findpos.hxx 
b/forms/source/component/findpos.hxx
index 3c108ba1d425..b279558fdab0 100644
--- a/forms/source/component/findpos.hxx
+++ b/forms/source/component/findpos.hxx
@@ -24,13 +24,9 @@
 #include 
 #include 
 
-
-namespace detail {
-
-sal_Int32 findPos(
-const OUString& aStr,
-const css::uno::Sequence< OUString >& rList);
-
+namespace detail
+{
+sal_Int32 findPos(const OUString& aStr, const css::uno::Sequence& 
rList);
 }
 
 #endif
diff --git a/forms/source/xforms/boolexpression.cxx 
b/forms/source/xforms/boolexpression.cxx
index 01fd522d7170..6b3f57564d66 100644
--- a/forms/source/xforms/boolexpression.cxx
+++ b/forms/source/xforms/boolexpression.cxx
@@ -17,34 +17,29 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include "boolexpression.hxx"
 
-
 namespace xforms
 {
-
 /** BoolExpression represents a computed XPath expression that returns
  * a bool value and caches the results.
  *
  * As this class has no virtual methods, it should never be used
  * polymorphically. */
 
-BoolExpression::BoolExpression() : ComputedExpression()
+BoolExpression::BoolExpression()
+: ComputedExpression()
 {
 }
 
-BoolExpression::~BoolExpression()
-{
-}
+BoolExpression::~BoolExpression() {}
 
-void BoolExpression::setExpression( const OUString& rExpression )
+void BoolExpression::setExpression(const OUString& rExpression)
 {
-ComputedExpression::setExpression( rExpression );
-mbIsSimple = _checkExpression( " *(true)|(false) *\\( *\\) *" );
+ComputedExpression::setExpression(rExpression);
+mbIsSimple = _checkExpression(" *(true)|(false) *\\( *\\) *");
 }
 
-
 } // namespace xforms
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/xforms/enumeration.cxx 
b/forms/source/xforms/enumeration.cxx
index 103803f69ac7..e02881fbbfce 100644
--- a/forms/source/xforms/enumeration.cxx
+++ b/forms/source/xforms/enumeration.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include "enumeration.hxx"
 
 #include 
@@ -32,17 +31,16 @@ using com::sun::star::container::XIndexAccess;
 using com::sun::star::uno::Any;
 using com::sun::star::uno::RuntimeException;
 
-
-Enumeration::Enumeration( XIndexAccess* pContainer )
-: mxContainer( pContainer ),
-  mnIndex( 0 )
+Enumeration::Enumeration(XIndexAccess* pContainer)
+: mxContainer(pContainer)
+, mnIndex(0)
 {
-OSL_ENSURE( mxContainer.is(), "no container?" );
+OSL_ENSURE(mxContainer.is(), "no container?");
 }
 
 sal_Bool Enumeration::hasMoreElements()
 {
-if( ! mxContainer.is() )
+if (!mxContainer.is())
 throw RuntimeException();
 
 return mnIndex < mxContainer->getCount();
@@ -50,12 +48,12 @@ sal_Bool Enumeration::hasMoreElements()
 
 Any Enumeration::nextElement()
 {
-i

[Libreoffice-commits] core.git: 2 commits - desktop/inc desktop/source desktop/test embedserv/source solenv/clang-format

2020-11-13 Thread Philipp Hofer (via logerrit)
 desktop/inc/migration.hxx  
|4 -
 desktop/source/app/cmdlinehelp.hxx 
|4 -
 desktop/source/app/desktopcontext.cxx  
|   17 ++---
 desktop/source/app/langselect.hxx  
|5 -
 desktop/source/app/main.c  
|6 +-
 desktop/source/app/userinstall.hxx 
|8 +-
 desktop/source/deployment/gui/dp_gui_dependencydialog.cxx  
|8 --
 desktop/source/deployment/gui/dp_gui_dependencydialog.hxx  
|   17 +++--
 desktop/source/deployment/gui/license_dialog.hxx   
|   15 ++---
 desktop/source/deployment/inc/dp_persmap.h 
|   17 ++---
 desktop/source/deployment/inc/dp_platform.hxx  
|   10 +--
 desktop/source/deployment/inc/dp_resource.h
|7 +-
 desktop/source/deployment/manager/dp_properties.hxx
|   30 --
 desktop/source/deployment/misc/dp_resource.cxx 
|   24 +++-
 desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx 
|   25 
 desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx   
|   20 +++---
 desktop/source/deployment/registry/help/dp_helpbackenddb.hxx   
|   27 -
 desktop/source/deployment/registry/package/dp_extbackenddb.hxx 
|   26 
 desktop/source/migration/services/jvmfwk.hxx   
|4 -
 desktop/source/pkgchk/unopkg/unopkg_main.c 
|4 -
 desktop/test/deployment/executable_content/build/hello.c   
|6 --
 embedserv/source/embed/ed_iinplace.cxx 
|   30 +++---
 embedserv/source/embed/esdll.cxx   
|7 --
 embedserv/source/embed/guid.hxx
|6 +-
 embedserv/source/inc/embservconst.h
|6 +-
 embedserv/source/inprocserv/advisesink.hxx 
|   29 +
 solenv/clang-format/excludelist
|   26 
 27 files changed, 159 insertions(+), 229 deletions(-)

New commits:
commit 5035f265cd6e19ef3589db55ca0b780944812365
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:55:42 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:15:46 2020 +0100

tdf#123936 Formatting files in module embedserv with clang-format

Change-Id: I475628cbec4c22a4b5ec535991d4f68154e3919e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105665
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/embedserv/source/embed/ed_iinplace.cxx 
b/embedserv/source/embed/ed_iinplace.cxx
index 0c6e869e633c..eb33bf5ac4d0 100644
--- a/embedserv/source/embed/ed_iinplace.cxx
+++ b/embedserv/source/embed/ed_iinplace.cxx
@@ -20,30 +20,26 @@
 #include 
 #include 
 
-
-COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::GetWindow(HWND *hWnd)
+COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::GetWindow(HWND* hWnd)
 {
-OSL_ENSURE(m_pDocHolder,"no document for inplace activation");
+OSL_ENSURE(m_pDocHolder, "no document for inplace activation");
 
 *hWnd = m_pDocHolder->GetTopMostWinHandle();
-if(*hWnd != nullptr)
+if (*hWnd != nullptr)
 return NOERROR;
 else
 return ERROR;
 }
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP 
EmbedDocument_Impl::ContextSensitiveHelp(BOOL)
-{
-return NOERROR;
-}
+COM_DECLSPEC_NOTHROW STDMETHODIMP 
EmbedDocument_Impl::ContextSensitiveHelp(BOOL) { return NOERROR; }
 
 COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::InPlaceDeactivate()
 {
 // no locking is used since the OLE must use the same thread always
-if ( m_bIsInVerbHandling )
+if (m_bIsInVerbHandling)
 return E_UNEXPECTED;
 
-BooleanGuard_Impl aGuard( m_bIsInVerbHandling );
+BooleanGuard_Impl aGuard(m_bIsInVerbHandling);
 
 m_pDocHolder->InPlaceDeactivate();
 
@@ -57,11 +53,10 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
EmbedDocument_Impl::InPlaceDeactivate()
 COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::UIDeactivate()
 {
 // no locking is used since the OLE must use the same thread always
-if ( m_bIsInVerbHandling )
+if (m_bIsInVerbHandling)
 return E_UNEXPECTED;
 
-BooleanGuard_Impl aGuard( m_bIsInVerbHandling );
-
+BooleanGuard_Impl aGuard(m_bIsInVerbHandling);
 
 m_pDocHolder->UIDeactivate();
 
@@ -74,14 +69,11 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
EmbedDocument_Impl::UIDeactivate()
 
 COM_DECLSPEC_NOTHROW STDMETHODIMP Embed

[Libreoffice-commits] core.git: editeng/inc editeng/source solenv/clang-format

2020-11-13 Thread Philipp Hofer (via logerrit)
 editeng/inc/editeng.hxx  |   10 +++
 editeng/inc/editxml.hxx  |5 +--
 editeng/inc/unopracc.hxx |   17 +---
 editeng/source/items/svdfield.cxx|5 ---
 editeng/source/misc/edtdlg.cxx   |7 +
 editeng/source/misc/forbiddencharacterstable.cxx |   32 ---
 solenv/clang-format/excludelist  |6 
 7 files changed, 36 insertions(+), 46 deletions(-)

New commits:
commit 32b57a159ea6ab3b0cdef7ca9d746639d42aa192
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:55:03 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:15:59 2020 +0100

tdf#123936 Formatting files in module editeng with clang-format

Change-Id: I745057f4a6dc0d8103ed7fa29d0f662226a5cee5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105663
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/editeng/inc/editeng.hxx b/editeng/inc/editeng.hxx
index cce3d79d4e10..5b831efa3b5e 100644
--- a/editeng/inc/editeng.hxx
+++ b/editeng/inc/editeng.hxx
@@ -19,10 +19,10 @@
 
 #pragma once
 
-#define MN_WORDLANGUAGE  998
-#define MN_PARALANGUAGE  999
-#define MN_ALTSTART 1000
-#define MN_AUTOSTART2000
-#define MN_DICTSTART3000
+#define MN_WORDLANGUAGE 998
+#define MN_PARALANGUAGE 999
+#define MN_ALTSTART 1000
+#define MN_AUTOSTART 2000
+#define MN_DICTSTART 3000
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/inc/editxml.hxx b/editeng/inc/editxml.hxx
index 51ded36f684e..650b7dfdef48 100644
--- a/editeng/inc/editxml.hxx
+++ b/editeng/inc/editxml.hxx
@@ -25,10 +25,9 @@ struct ESelection;
 class EditPaM;
 
 /** this function exports the selected content of an edit engine into a xml 
stream*/
-extern void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const 
ESelection& rSel );
+extern void SvxWriteXML(EditEngine& rEditEngine, SvStream& rStream, const 
ESelection& rSel);
 
 /** this function imports xml from the stream into the selected of an edit 
engine */
-extern EditPaM SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const 
ESelection& rSel );
-
+extern EditPaM SvxReadXML(EditEngine& rEditEngine, SvStream& rStream, const 
ESelection& rSel);
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/inc/unopracc.hxx b/editeng/inc/unopracc.hxx
index 7617bed0a86e..d6b8b8235762 100644
--- a/editeng/inc/unopracc.hxx
+++ b/editeng/inc/unopracc.hxx
@@ -21,7 +21,6 @@
 
 #include 
 
-
 class SvxEditSource;
 
 /** Wraps SvxUnoTextRangeBase and provides us with the text properties
@@ -31,27 +30,27 @@ class SvxEditSource;
 required text range and return a reference to a XPropertySet.
  */
 class SvxAccessibleTextPropertySet final : public SvxUnoTextRangeBase,
- public css::lang::XTypeProvider,
- public ::cppu::OWeakObject
+   public css::lang::XTypeProvider,
+   public ::cppu::OWeakObject
 {
 public:
-SvxAccessibleTextPropertySet( const SvxEditSource*, const 
SvxItemPropertySet* );
+SvxAccessibleTextPropertySet(const SvxEditSource*, const 
SvxItemPropertySet*);
 virtual ~SvxAccessibleTextPropertySet() throw() override;
 
 // XTextRange
-virtual css::uno::Reference< css::text::XText > SAL_CALL getText() 
override;
+virtual css::uno::Reference SAL_CALL getText() override;
 
-virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & 
rType ) override;
+virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& rType) 
override;
 virtual void SAL_CALL acquire() throw() override;
 virtual void SAL_CALL release() throw() override;
 
 // lang::XServiceInfo
 virtual OUString SAL_CALL getImplementationName() override;
-virtual sal_Bool SAL_CALL supportsService( const OUString& ) override;
+virtual sal_Bool SAL_CALL supportsService(const OUString&) override;
 
 // lang::XTypeProvider
-virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
-virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 
override;
+virtual css::uno::Sequence SAL_CALL getTypes() override;
+virtual css::uno::Sequence SAL_CALL getImplementationId() 
override;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/items/svdfield.cxx 
b/editeng/source/items/svdfield.cxx
index 288826406551..a9b78148c003 100644
--- a/editeng/source/items/svdfield.cxx
+++ b/editeng/source/items/svdfield.cxx
@@ -17,12 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include 
 
-SdrMeasureField::~SdrMeasureField()
-{
-}
+SdrMeasureField::~SdrMeasureField() {}
 
 std::unique_ptr SdrMeasureField::Clone() const
 {
diff --git a/editeng/source/misc/edtdlg.cxx b/editeng/source/misc/edtdlg.cxx
i

[Libreoffice-commits] core.git: 2 commits - cli_ure/source cppuhelper/source cppu/source solenv/clang-format

2020-11-13 Thread Philipp Hofer (via logerrit)
 cli_ure/source/native/assembly.cxx  |8 +++
 cli_ure/source/uno_bridge/cli_environment.h |   29 
 cppu/source/uno/IdentityMapping.hxx |7 --
 cppu/source/uno/loadmodule.hxx  |   12 ++-
 cppuhelper/source/paths.hxx |   14 +++--
 cppuhelper/source/supportsservice.cxx   |6 +
 solenv/clang-format/excludelist |6 -
 7 files changed, 39 insertions(+), 43 deletions(-)

New commits:
commit fddcbd5d28bb58993ee3d210f1d11e57c70a8894
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:52:55 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:14:36 2020 +0100

tdf#123936 Formatting files in module cppu with clang-format

Change-Id: I98281fce06c2a8c094db9e80c1f6bdf35ce70ccd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105657
Tested-by: Christian Lohmaier 
Reviewed-by: Christian Lohmaier 

diff --git a/cppu/source/uno/IdentityMapping.hxx 
b/cppu/source/uno/IdentityMapping.hxx
index 4a6db6d81bc1..8ba081b0099f 100644
--- a/cppu/source/uno/IdentityMapping.hxx
+++ b/cppu/source/uno/IdentityMapping.hxx
@@ -21,8 +21,11 @@
 
 #include 
 
-namespace com::sun::star::uno { class Environment; }
+namespace com::sun::star::uno
+{
+class Environment;
+}
 
-uno_Mapping * createIdentityMapping(const css::uno::Environment & rEnv);
+uno_Mapping* createIdentityMapping(const css::uno::Environment& rEnv);
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppu/source/uno/loadmodule.hxx b/cppu/source/uno/loadmodule.hxx
index 4d6c322c1078..694b1402492e 100644
--- a/cppu/source/uno/loadmodule.hxx
+++ b/cppu/source/uno/loadmodule.hxx
@@ -22,10 +22,13 @@
 #include 
 #include 
 
-namespace osl { class Module; }
-
-namespace cppu::detail {
+namespace osl
+{
+class Module;
+}
 
+namespace cppu::detail
+{
 #ifndef DISABLE_DYNLOADING
 
 /** Load a module.
@@ -36,10 +39,9 @@ namespace cppu::detail {
 
 @return false if the module could not be loaded, otherwise true
 */
-bool loadModule(osl::Module & rModule, OUString const & name);
+bool loadModule(osl::Module& rModule, OUString const& name);
 
 #endif
-
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppuhelper/source/paths.hxx b/cppuhelper/source/paths.hxx
index 9ce486fa772a..c1e3724c0aa1 100644
--- a/cppuhelper/source/paths.hxx
+++ b/cppuhelper/source/paths.hxx
@@ -22,16 +22,18 @@
 #include 
 #include 
 
-namespace osl { class Directory; }
-
-namespace cppu {
+namespace osl
+{
+class Directory;
+}
 
+namespace cppu
+{
 OUString getUnoIniUri();
 
-bool nextDirectoryItem(osl::Directory & directory, OUString * url);
-
-void decodeRdbUri(OUString * uri, bool * optional, bool * directory);
+bool nextDirectoryItem(osl::Directory& directory, OUString* url);
 
+void decodeRdbUri(OUString* uri, bool* optional, bool* directory);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppuhelper/source/supportsservice.cxx 
b/cppuhelper/source/supportsservice.cxx
index f7f267ea0fd5..40dca8c0c269 100644
--- a/cppuhelper/source/supportsservice.cxx
+++ b/cppuhelper/source/supportsservice.cxx
@@ -17,12 +17,10 @@
 #include 
 #include 
 
-bool cppu::supportsService(
-css::lang::XServiceInfo * implementation, OUString const & name)
+bool cppu::supportsService(css::lang::XServiceInfo* implementation, OUString 
const& name)
 {
 assert(implementation != nullptr);
-const css::uno::Sequence< OUString > s(
-implementation->getSupportedServiceNames());
+const css::uno::Sequence 
s(implementation->getSupportedServiceNames());
 return std::find(s.begin(), s.end(), name) != s.end();
 }
 
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index b002207f44ff..a5c4affa2c16 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -2457,7 +2457,6 @@ cppu/source/typelib/typelib.hxx
 cppu/source/uno/EnvDcp.cxx
 cppu/source/uno/EnvStack.cxx
 cppu/source/uno/IdentityMapping.cxx
-cppu/source/uno/IdentityMapping.hxx
 cppu/source/uno/any.cxx
 cppu/source/uno/assign.hxx
 cppu/source/uno/cascade_mapping.cxx
@@ -2471,7 +2470,6 @@ cppu/source/uno/eq.hxx
 cppu/source/uno/lbenv.cxx
 cppu/source/uno/lbmap.cxx
 cppu/source/uno/loadmodule.cxx
-cppu/source/uno/loadmodule.hxx
 cppu/source/uno/prim.hxx
 cppu/source/uno/sequence.cxx
 cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx
@@ -2496,13 +2494,11 @@ cppuhelper/source/loadsharedlibcomponentfactory.hxx
 cppuhelper/source/macro_expander.cxx
 cppuhelper/source/macro_expander.hxx
 cppuhelper/source/paths.cxx
-cppuhelper/source/paths.hxx
 cppuhelper/source/propertysetmixin.cxx
 cppuhelper/source/propshlp.cxx
 cppuhelper/source/servicemanager.cxx
 cppuhelper/source/servicemanager.hxx
 cppuhelper/source/shlib.cxx
-cppuhelper/source/supportsservice.cxx
 cppuhelper/source/tdmgr.cxx
 cppuhelper/source/typemanager.cxx
 cppuhelper/source/typemanager.hxx
commit 7ebd82e885b60552464e060236e86

[Libreoffice-commits] core.git: 2 commits - binaryurp/source codemaker/source solenv/clang-format

2020-11-13 Thread Philipp Hofer (via logerrit)
 binaryurp/source/currentcontext.hxx|   12 +++-
 binaryurp/source/outgoingrequests.hxx  |   26 --
 binaryurp/source/reader.hxx|   25 +
 binaryurp/source/readerstate.hxx   |9 +
 binaryurp/source/specialfunctionids.hxx|8 
 codemaker/source/codemaker/options.cxx |   15 ---
 codemaker/source/cppumaker/cppuoptions.hxx |   10 ++
 codemaker/source/cppumaker/dumputils.hxx   |   18 +-
 codemaker/source/javamaker/javaoptions.hxx |   10 ++
 solenv/clang-format/excludelist|9 -
 10 files changed, 70 insertions(+), 72 deletions(-)

New commits:
commit a079d78439cd371dd270fb5a1de125d5de9cf472
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:51:06 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:13:38 2020 +0100

tdf#123936 Formatting files in module codemaker with clang-format

Change-Id: Icd006d12942489a10fc2b3b801233c9527284721
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105652
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/codemaker/source/codemaker/options.cxx 
b/codemaker/source/codemaker/options.cxx
index 9b8dbf61f6bf..2d85b35a9823 100644
--- a/codemaker/source/codemaker/options.cxx
+++ b/codemaker/source/codemaker/options.cxx
@@ -17,18 +17,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include 
 
-Options::Options()
-{
-}
-
-Options::~Options()
-{
-
-}
+Options::Options() {}
 
+Options::~Options() {}
 
 bool Options::isValid(const OString& option) const
 {
@@ -38,11 +31,11 @@ bool Options::isValid(const OString& option) const
 const OString& Options::getOption(const OString& option) const
 {
 OptionMap::const_iterator i(m_options.find(option));
-if (i == m_options.end()) {
+if (i == m_options.end())
+{
 throw IllegalArgument("Option is not valid or currently not set.");
 }
 return i->second;
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/codemaker/source/cppumaker/cppuoptions.hxx 
b/codemaker/source/cppumaker/cppuoptions.hxx
index 76dba06b1210..f3d65e4fa8ed 100644
--- a/codemaker/source/cppumaker/cppuoptions.hxx
+++ b/codemaker/source/cppumaker/cppuoptions.hxx
@@ -25,13 +25,15 @@ class CppuOptions : public Options
 {
 public:
 CppuOptions()
-: Options() {}
+: Options()
+{
+}
 
-bool initOptions(int ac, char* av[], bool bCmdFile=false) override;
+bool initOptions(int ac, char* av[], bool bCmdFile = false) override;
 
-OString  prepareHelp() override;
+OString prepareHelp() override;
 
-OString  prepareVersion() const;
+OString prepareVersion() const;
 
 protected:
 };
diff --git a/codemaker/source/cppumaker/dumputils.hxx 
b/codemaker/source/cppumaker/dumputils.hxx
index 965b64eda93f..58ccdc93fac5 100644
--- a/codemaker/source/cppumaker/dumputils.hxx
+++ b/codemaker/source/cppumaker/dumputils.hxx
@@ -21,19 +21,19 @@
 
 #include 
 
-namespace rtl { class OUString; }
+namespace rtl
+{
+class OUString;
+}
 class FileStream;
 
-namespace codemaker::cppumaker {
-
-bool dumpNamespaceOpen(
-FileStream & out, rtl::OUString const & entityName, bool fullModuleType);
-
-bool dumpNamespaceClose(
-FileStream & out, rtl::OUString const & entityName, bool fullModuleType);
+namespace codemaker::cppumaker
+{
+bool dumpNamespaceOpen(FileStream& out, rtl::OUString const& entityName, bool 
fullModuleType);
 
-void dumpTypeIdentifier(FileStream & out, rtl::OUString const & entityName);
+bool dumpNamespaceClose(FileStream& out, rtl::OUString const& entityName, bool 
fullModuleType);
 
+void dumpTypeIdentifier(FileStream& out, rtl::OUString const& entityName);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/codemaker/source/javamaker/javaoptions.hxx 
b/codemaker/source/javamaker/javaoptions.hxx
index 956f24ccc8c9..5e6161c0470e 100644
--- a/codemaker/source/javamaker/javaoptions.hxx
+++ b/codemaker/source/javamaker/javaoptions.hxx
@@ -25,13 +25,15 @@ class JavaOptions : public Options
 {
 public:
 JavaOptions()
-: Options() {}
+: Options()
+{
+}
 
-bool initOptions(int ac, char* av[], bool bCmdFile=false) override;
+bool initOptions(int ac, char* av[], bool bCmdFile = false) override;
 
-OString  prepareHelp() override;
+OString prepareHelp() override;
 
-OString  prepareVersion() const;
+OString prepareVersion() const;
 
 protected:
 };
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index d9346c570ffc..01e90e8b7c1f 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -1429,27 +1429,23 @@ cli_ure/source/uno_bridge/cli_uno.cxx
 codemaker/source/codemaker/codemaker.cxx
 codemaker/source/codemaker/exceptiontree.cxx
 codemaker/source/codemaker/global.cxx
-codemaker/source/codemaker/options.cx

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

2020-11-13 Thread Philipp Hofer (via logerrit)
 connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx |  135 
--
 connectivity/source/drivers/calc/CCatalog.cxx  |   22 -
 connectivity/source/drivers/component/CStatement.cxx   |5 
 connectivity/source/drivers/dbase/DCatalog.cxx |   22 -
 connectivity/source/drivers/dbase/DIndexIter.cxx   |   88 
++
 connectivity/source/drivers/dbase/DPreparedStatement.cxx   |5 
 connectivity/source/drivers/file/FDateFunctions.cxx|   62 
++--
 connectivity/source/drivers/file/FStringFunctions.cxx  |   93 
+++---
 connectivity/source/drivers/firebird/Indexes.cxx   |4 
 connectivity/source/drivers/flat/ECatalog.cxx  |   22 -
 connectivity/source/drivers/flat/EPreparedStatement.cxx|6 
 connectivity/source/drivers/hsqldb/HTerminateListener.cxx  |   21 -
 connectivity/source/drivers/jdbc/Boolean.cxx   |   11 
 connectivity/source/drivers/jdbc/Class.cxx |   20 -
 connectivity/source/drivers/jdbc/Date.cxx  |7 
 connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx|8 
 connectivity/source/drivers/jdbc/Exception.cxx |6 
 connectivity/source/drivers/jdbc/Ref.cxx   |   16 -
 connectivity/source/drivers/jdbc/SQLWarning.cxx|6 
 connectivity/source/drivers/jdbc/String.cxx|   14 -
 connectivity/source/drivers/jdbc/Throwable.cxx |   19 -
 connectivity/source/drivers/mork/MTables.cxx   |   22 -
 connectivity/source/inc/RowFunctionParser.hxx  |   16 -
 solenv/clang-format/excludelist|   23 -
 24 files changed, 274 insertions(+), 379 deletions(-)

New commits:
commit 71b69ac75b623fc2f36c5c1a0ba632152aa101b8
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:52:36 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:13:58 2020 +0100

tdf#123936 Formatting files in module connectivity with clang-format

Change-Id: I2c2f170c19663002637c702e9168c19c067ebbc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105656
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git 
a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx 
b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx
index 9a4365abfcce..94dbfddb34f9 100644
--- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx
@@ -21,7 +21,6 @@
 #include 
 #include 
 
-
 using namespace connectivity;
 using namespace connectivity::ado;
 using namespace com::sun::star::uno;
@@ -29,194 +28,184 @@ using namespace com::sun::star::lang;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::sdbc;
 
-
 ODatabaseMetaDataResultSetMetaData::~ODatabaseMetaDataResultSetMetaData()
 {
-if(m_pRecordSet)
+if (m_pRecordSet)
 m_pRecordSet->Release();
 }
 
-sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnDisplaySize( 
sal_Int32 column )
+sal_Int32 SAL_CALL 
ODatabaseMetaDataResultSetMetaData::getColumnDisplaySize(sal_Int32 column)
 {
 sal_Int32 nSize = 0;
-if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != 
m_mColumns.end())
+if (m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != 
m_mColumns.end())
 nSize = (*m_mColumnsIter).second.getColumnDisplaySize();
-else if(m_pRecordSet)
+else if (m_pRecordSet)
 {
-WpADOField aField = ADOS::getField(m_pRecordSet,m_vMapping[column]);
-if(aField.IsValid())
+WpADOField aField = ADOS::getField(m_pRecordSet, m_vMapping[column]);
+if (aField.IsValid())
 nSize = aField.GetActualSize();
 }
 return nSize;
 }
 
-
-sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnType( 
sal_Int32 column )
+sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnType(sal_Int32 
column)
 {
-sal_Int32  nType = 0;
-if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != 
m_mColumns.end())
+sal_Int32 nType = 0;
+if (m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != 
m_mColumns.end())
 nType = (*m_mColumnsIter).second.getColumnType();
-else if(m_pRecordSet)
+else if (m_pRecordSet)
 {
-WpADOField aField = ADOS::getField(m_pRecordSet,m_vMapping[column]);
+WpADOField aField = ADOS::getField(m_pRecordSet, m_vMapping[column]);
 nType = ADOS::MapADOType2Jdbc(aField.GetADOType());
 }
 return nType;
 }
 
-
-sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnCount(  )

[Libreoffice-commits] core.git: cui/inc cui/qa cui/source solenv/clang-format

2020-11-13 Thread Philipp Hofer (via logerrit)
 cui/inc/strings.hxx|2 -
 cui/qa/unit/cui-dialogs-test.cxx   |   12 ++
 cui/qa/unit/cui-dialogs-test_2.cxx |9 +---
 cui/qa/unit/cui-dialogs-test_3.cxx |9 +---
 cui/qa/unit/cui-dialogs-test_4.cxx |9 +---
 cui/source/dialogs/cuiimapwnd.cxx  |   12 ++
 cui/source/dialogs/cuitbxform.cxx  |6 +--
 cui/source/dialogs/dlgname.cxx |5 +-
 cui/source/dialogs/newtabledlg.cxx |4 +-
 cui/source/dialogs/showcols.cxx|   25 ++---
 cui/source/factory/cuiexp.cxx  |   18 +++--
 cui/source/factory/cuiresmgr.cxx   |5 --
 cui/source/inc/cuifmsearch.hxx |   55 -
 cui/source/inc/dlgname.hxx |   17 +++-
 cui/source/inc/headertablistbox.hxx|6 +--
 cui/source/inc/hlmarkwn_def.hxx|6 +--
 cui/source/inc/linkdlg.hxx |   32 
 cui/source/inc/optasian.hxx|   12 +++---
 cui/source/inc/screenshotannotationdlg.hxx |6 +--
 cui/source/options/tsaurls.cxx |   26 +++--
 solenv/clang-format/excludelist|   20 --
 21 files changed, 128 insertions(+), 168 deletions(-)

New commits:
commit ec35fc62993111e4e7dd917e7dbc91ef82b02f74
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:53:37 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:12:03 2020 +0100

tdf#123936 Formatting files in module cui with clang-format

Change-Id: I473e2950bb9bd53043feeae31a27ae0c2fc7801d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105659
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/cui/inc/strings.hxx b/cui/inc/strings.hxx
index 616a5daa6bcb..5b72f3873df4 100644
--- a/cui/inc/strings.hxx
+++ b/cui/inc/strings.hxx
@@ -9,6 +9,6 @@
 
 #pragma once
 
-#define RID_SVXSTR_KEY_BASIC_PATH   "BASIC"
+#define RID_SVXSTR_KEY_BASIC_PATH "BASIC"
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/cui/qa/unit/cui-dialogs-test.cxx b/cui/qa/unit/cui-dialogs-test.cxx
index f580644e37c9..85f6b5f55bbf 100644
--- a/cui/qa/unit/cui-dialogs-test.cxx
+++ b/cui/qa/unit/cui-dialogs-test.cxx
@@ -44,9 +44,7 @@ public:
 CPPUNIT_TEST_SUITE_END();
 };
 
-CuiDialogsTest::CuiDialogsTest()
-{
-}
+CuiDialogsTest::CuiDialogsTest() {}
 
 void CuiDialogsTest::initialize()
 {
@@ -67,19 +65,17 @@ VclPtr 
CuiDialogsTest::createDialogByID(sal_uInt32 nID)
 {
 VclPtr pReturnDialog;
 
-switch ( nID )
+switch (nID)
 {
 case 0: // "cui/ui/formatcellsdialog.ui"
 {
-pReturnDialog = mpFact->CreateSvxFormatCellsDialog(
-nullptr, mxAttr.get(), *mxModel);
+pReturnDialog = mpFact->CreateSvxFormatCellsDialog(nullptr, 
mxAttr.get(), *mxModel);
 break;
 }
 
 case 1: // "cui/ui/textdialog.ui"
 {
-pReturnDialog = mpFact->CreateTextTabDialog(
-nullptr, mxAttr.get(), nullptr);
+pReturnDialog = mpFact->CreateTextTabDialog(nullptr, mxAttr.get(), 
nullptr);
 break;
 }
 
diff --git a/cui/qa/unit/cui-dialogs-test_2.cxx 
b/cui/qa/unit/cui-dialogs-test_2.cxx
index af1b27fc5b78..2f9b07f7d465 100644
--- a/cui/qa/unit/cui-dialogs-test_2.cxx
+++ b/cui/qa/unit/cui-dialogs-test_2.cxx
@@ -36,19 +36,14 @@ public:
 CPPUNIT_TEST_SUITE_END();
 };
 
-CuiDialogsTest2::CuiDialogsTest2()
-{
-}
+CuiDialogsTest2::CuiDialogsTest2() {}
 
 void CuiDialogsTest2::registerKnownDialogsByID(mapType& /*rKnownDialogs*/)
 {
 // leave empty should be in CuiDialogTest if any
 }
 
-VclPtr CuiDialogsTest2::createDialogByID(sal_uInt32 /*nID*/)
-{
-return nullptr;
-}
+VclPtr CuiDialogsTest2::createDialogByID(sal_uInt32 
/*nID*/) { return nullptr; }
 
 void CuiDialogsTest2::openAnyDialog()
 {
diff --git a/cui/qa/unit/cui-dialogs-test_3.cxx 
b/cui/qa/unit/cui-dialogs-test_3.cxx
index e369fd11fd39..9c3a09a8d240 100644
--- a/cui/qa/unit/cui-dialogs-test_3.cxx
+++ b/cui/qa/unit/cui-dialogs-test_3.cxx
@@ -36,19 +36,14 @@ public:
 CPPUNIT_TEST_SUITE_END();
 };
 
-CuiDialogsTest3::CuiDialogsTest3()
-{
-}
+CuiDialogsTest3::CuiDialogsTest3() {}
 
 void CuiDialogsTest3::registerKnownDialogsByID(mapType& /*rKnownDialogs*/)
 {
 // leave empty should be in CuiDialogTest if any
 }
 
-VclPtr CuiDialogsTest3::createDialogByID(sal_uInt32 /*nID*/)
-{
-return nullptr;
-}
+VclPtr CuiDialogsTest3::createDialogByID(sal_uInt32 
/*nID*/) { return nullptr; }
 
 void CuiDialogsTest3::openAnyDialog()
 {
diff --git a/cui/qa/unit/cui-dialogs-test_4.cxx 
b/cui/qa/unit/cui-dialogs-test_4.cxx
index 7183811b98f1..11820389968c 100644
--- a/cui/qa/unit/cui-dialogs-test_4.cxx
+++ b/cui/qa/unit/cui-dialogs-test_4.cxx
@@ -36,19 +36,14 @@ public:
 CPPUNIT_TEST_SUITE_END();
 };
 
-CuiDialogsTest4::CuiDialogsTest4()
-{
-}
+CuiDialogsTest4::Cu

[Libreoffice-commits] core.git: comphelper/qa comphelper/source solenv/clang-format

2020-11-13 Thread Philipp Hofer (via logerrit)
 comphelper/qa/unit/base64_test.cxx |   15 +++---
 comphelper/qa/weakbag/test_weakbag.cxx |   19 
 comphelper/source/misc/fileurl.cxx |4 -
 comphelper/source/misc/random.cxx  |   20 -
 comphelper/source/misc/simplefileaccessinteraction.cxx |   25 +--
 comphelper/source/misc/types.cxx   |   37 +
 solenv/clang-format/excludelist|6 --
 7 files changed, 52 insertions(+), 74 deletions(-)

New commits:
commit d66683f86a719b9961a076237aba07d6b4fea359
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:51:27 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:11:37 2020 +0100

tdf#123936 Formatting files in module comphelper with clang-format

Change-Id: I01cf258f8fedb4d98f64d2a18735764463f1b2af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105653
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/comphelper/qa/unit/base64_test.cxx 
b/comphelper/qa/unit/base64_test.cxx
index 97f7b78aae7a..dd89951e6430 100644
--- a/comphelper/qa/unit/base64_test.cxx
+++ b/comphelper/qa/unit/base64_test.cxx
@@ -30,12 +30,11 @@
 
 using namespace css;
 
-namespace {
-
+namespace
+{
 class Base64Test : public CppUnit::TestFixture
 {
 public:
-
 void testBase64Encode();
 void testBase64Decode();
 void testBase64EncodeForOStringBuffer();
@@ -73,15 +72,18 @@ void Base64Test::testBase64Decode()
 
 uno::Sequence expectedSequence = { 0, 0, 0, 0, 0, 1, 2, 3 };
 comphelper::Base64::decode(decodedSequence, "AAABAgM=");
-CPPUNIT_ASSERT(std::equal(expectedSequence.begin(), 
expectedSequence.end(), decodedSequence.begin()));
+CPPUNIT_ASSERT(
+std::equal(expectedSequence.begin(), expectedSequence.end(), 
decodedSequence.begin()));
 
 expectedSequence = { 5, 2, 3, 0, 0, 1, 2, 3 };
 comphelper::Base64::decode(decodedSequence, "BQIDAAABAgM=");
-CPPUNIT_ASSERT(std::equal(expectedSequence.begin(), 
expectedSequence.end(), decodedSequence.begin()));
+CPPUNIT_ASSERT(
+std::equal(expectedSequence.begin(), expectedSequence.end(), 
decodedSequence.begin()));
 
 expectedSequence = { sal_Int8(sal_uInt8(200)), 31, 77, 111, 0, 1, 2, 3 };
 comphelper::Base64::decode(decodedSequence, "yB9NbwABAgM=");
-CPPUNIT_ASSERT(std::equal(expectedSequence.begin(), 
expectedSequence.end(), decodedSequence.begin()));
+CPPUNIT_ASSERT(
+std::equal(expectedSequence.begin(), expectedSequence.end(), 
decodedSequence.begin()));
 }
 
 void Base64Test::testBase64EncodeForOStringBuffer()
@@ -105,7 +107,6 @@ void Base64Test::testBase64EncodeForOStringBuffer()
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Base64Test);
-
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/comphelper/qa/weakbag/test_weakbag.cxx 
b/comphelper/qa/weakbag/test_weakbag.cxx
index d58c12501633..b646ca7aef42 100644
--- a/comphelper/qa/weakbag/test_weakbag.cxx
+++ b/comphelper/qa/weakbag/test_weakbag.cxx
@@ -26,15 +26,17 @@
 #include 
 #include 
 
-namespace {
-
-class Test: public CppUnit::TestFixture {
+namespace
+{
+class Test : public CppUnit::TestFixture
+{
 public:
-void test() {
-css::uno::Reference< css::uno::XInterface > ref1(new 
cppu::OWeakObject);
-css::uno::Reference< css::uno::XInterface > ref2(new 
cppu::OWeakObject);
-css::uno::Reference< css::uno::XInterface > ref3(new 
cppu::OWeakObject);
-comphelper::WeakBag< css::uno::XInterface > bag;
+void test()
+{
+css::uno::Reference ref1(new cppu::OWeakObject);
+css::uno::Reference ref2(new cppu::OWeakObject);
+css::uno::Reference ref3(new cppu::OWeakObject);
+comphelper::WeakBag bag;
 bag.add(ref1);
 bag.add(ref1);
 bag.add(ref2);
@@ -54,7 +56,6 @@ public:
 };
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
-
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/comphelper/source/misc/fileurl.cxx 
b/comphelper/source/misc/fileurl.cxx
index 9abf1a97f62d..4f361ab4ba7a 100644
--- a/comphelper/source/misc/fileurl.cxx
+++ b/comphelper/source/misc/fileurl.cxx
@@ -22,8 +22,6 @@
 #include 
 #include 
 
-bool comphelper::isFileUrl(OUString const & url) {
-return url.startsWithIgnoreAsciiCase("file:");
-}
+bool comphelper::isFileUrl(OUString const& url) { return 
url.startsWithIgnoreAsciiCase("file:"); }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/comphelper/source/misc/random.cxx 
b/comphelper/source/misc/random.cxx
index 260db3a544ca..ea9e7273756b 100644
--- a/comphelper/source/misc/random.cxx
+++ b/comphelper/source/misc/random.cxx
@@ -27,17 +27,16 @@
 
 namespace comphelper::rng
 {
-
 // underlying random number generator
 // std::mt19937 implements the Mersenne twister algorithm which
 // is fast and has good statistical properties, it produces integers
 // in the range of [0, 2^32-1] internally
 /

[Libreoffice-commits] core.git: 2 commits - basctl/inc basctl/source bridges/inc bridges/source solenv/clang-format

2020-11-13 Thread Philipp Hofer (via logerrit)
 basctl/inc/iderdll.hxx  |7 -
 basctl/source/basicide/basicmod.hxx |6 -
 basctl/source/basicide/brkdlg.cxx   |   54 --
 basctl/source/basicide/brkdlg.hxx   |   12 --
 basctl/source/basicide/linenumberwindow.cxx |   22 +---
 basctl/source/basicide/linenumberwindow.hxx |   11 --
 basctl/source/basicide/textwindowpeer.hxx   |   13 +-
 basctl/source/dlged/dlgedmod.cxx|   12 --
 basctl/source/inc/dlgedfac.hxx  |   10 -
 basctl/source/inc/dlgedfunc.hxx |   44 +++-
 basctl/source/inc/dlgedlist.hxx |   30 ++---
 basctl/source/inc/dlgedmod.hxx  |8 -
 basctl/source/inc/dlgedpage.hxx |   12 --
 basctl/source/inc/iderid.hxx|3 
 basctl/source/inc/layout.hxx|   58 +--
 bridges/inc/types.hxx   |   11 --
 bridges/inc/vtables.hxx |   18 +--
 bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.hxx   |7 -
 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx |  105 +---
 solenv/clang-format/excludelist |   19 ---
 20 files changed, 196 insertions(+), 266 deletions(-)

New commits:
commit 79368f81028a05f1d3685f0052806d3f93cd2da8
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:49:31 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 15:11:21 2020 +0100

tdf#123936 Formatting files in module bridges with clang-format

Change-Id: Ice8b5ff4ddde1b0eca19cf29c418e3281389926d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105648
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/bridges/inc/types.hxx b/bridges/inc/types.hxx
index d35529342672..597d55909d09 100644
--- a/bridges/inc/types.hxx
+++ b/bridges/inc/types.hxx
@@ -22,8 +22,8 @@
 #include 
 #include 
 
-namespace bridges::cpp_uno::shared {
-
+namespace bridges::cpp_uno::shared
+{
 /**
  * Determines whether a type is a "simple" type (VOID, BOOLEAN, BYTE, SHORT,
  * UNSIGNED SHORT, LONG, UNSIGNED LONG, HYPER, UNSIGNED HYPER, FLOAT, DOUBLE,
@@ -42,7 +42,7 @@ bool isSimpleType(typelib_TypeClass typeClass);
  * @param type a non-null pointer to a type description reference
  * @return true if the given type is "simple"
  */
-bool isSimpleType(typelib_TypeDescriptionReference const * type);
+bool isSimpleType(typelib_TypeDescriptionReference const* type);
 
 /**
  * Determines whether a type is a "simple" type (VOID, BOOLEAN, BYTE, SHORT,
@@ -52,7 +52,7 @@ bool isSimpleType(typelib_TypeDescriptionReference const * 
type);
  * @param type a non-null pointer to a type description
  * @return true if the given type is "simple"
  */
-bool isSimpleType(typelib_TypeDescription const * type);
+bool isSimpleType(typelib_TypeDescription const* type);
 
 /**
  * Determines whether a type relates to an interface type (is itself an
@@ -61,8 +61,7 @@ bool isSimpleType(typelib_TypeDescription const * type);
  * @param type a non-null pointer to a type description
  * @return true if the given type relates to an interface type
  */
-bool relatesToInterfaceType(typelib_TypeDescription const * type);
-
+bool relatesToInterfaceType(typelib_TypeDescription const* type);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/vtables.hxx b/bridges/inc/vtables.hxx
index 2dc604f0a64f..57ee58f53a85 100644
--- a/bridges/inc/vtables.hxx
+++ b/bridges/inc/vtables.hxx
@@ -22,8 +22,8 @@
 #include 
 #include 
 
-namespace bridges::cpp_uno::shared {
-
+namespace bridges::cpp_uno::shared
+{
 /**
  * Calculate the number of local functions of an interface type.
  *
@@ -37,7 +37,7 @@ namespace bridges::cpp_uno::shared {
  * executed
  * @return the number of local functions of the given interface type
  */
-sal_Int32 getLocalFunctions(typelib_InterfaceTypeDescription const * type);
+sal_Int32 getLocalFunctions(typelib_InterfaceTypeDescription const* type);
 
 /**
  * Calculate the number of primary functions of an interface type.
@@ -51,12 +51,13 @@ sal_Int32 
getLocalFunctions(typelib_InterfaceTypeDescription const * type);
  * @return the number of primary functions of the given interface type, or zero
  * if the given interface type is null
  */
-sal_Int32 getPrimaryFunctions(typelib_InterfaceTypeDescription * type);
+sal_Int32 getPrimaryFunctions(typelib_InterfaceTypeDescription* type);
 
 /**
  * Represents a vtable slot of a C++ class.
  */
-struct VtableSlot {
+struct VtableSlot
+{
 /**
  * The offset of the vtable.
  *
@@ -82,8 +83,7 @@ struct VtableSlot {
  * description
  * @return the vtable slot associated with the given interface member
  */
-VtableSlot getVtableSlot(
-typelib_InterfaceAttributeTypeDescription const * ifcMember);
+VtableSlot getVtableSlot(typelib_InterfaceAttributeTypeDescription c

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

2020-11-13 Thread Miklos Vajna (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx|9 
+
 writerfilter/qa/cppunittests/dmapper/data/field-if-inside-if.docx |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   10 
+-
 3 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 65d6173152deab49f9c9ed138f6d9fa56008b800
Author: Miklos Vajna 
AuthorDate: Fri Nov 13 09:45:47 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Nov 13 14:54:36 2020 +0100

DOCX import: lost cached result of fields: fix leading whitespace

" IF " and "IF " is the same, but "IFF " is something different.

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

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
index c7df72b25703..77bd616f37d6 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
@@ -179,6 +179,15 @@ CPPUNIT_TEST_FIXTURE(Test, testFieldIfInsideIf)
 // - Actual  : 0** Expression is faulty **2
 // i.e. some of the inner fields escaped outside the outer field.
 CPPUNIT_ASSERT_EQUAL(OUString("2"), xCell->getString());
+
+// Test the second cell: it contains "IF ", not the usual " IF ".
+xCell.set(xTable->getCellByName("A2"), uno::UNO_QUERY);
+
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 25
+// - Actual  : 025
+// i.e. some of the inner fields escaped outside the outer field.
+CPPUNIT_ASSERT_EQUAL(OUString("25"), xCell->getString());
 }
 }
 
diff --git a/writerfilter/qa/cppunittests/dmapper/data/field-if-inside-if.docx 
b/writerfilter/qa/cppunittests/dmapper/data/field-if-inside-if.docx
index 93aaab52d497..65e238869b1b 100644
Binary files 
a/writerfilter/qa/cppunittests/dmapper/data/field-if-inside-if.docx and 
b/writerfilter/qa/cppunittests/dmapper/data/field-if-inside-if.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 0a7ae26d937e..d1d0309a6b83 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -206,7 +206,15 @@ static FieldContextPtr GetParentFieldContext(const 
std::deque&
 static bool IsFieldNestingAllowed(const FieldContextPtr& pOuter, const 
FieldContextPtr& pInner)
 {
 std::optional oOuterFieldId = pOuter->GetFieldId();
-if (!oOuterFieldId && pOuter->GetCommand().startsWith(" IF "))
+OUString aCommand = pOuter->GetCommand();
+
+// Ignore leading space before the field name, but don't accept IFF when 
we check for IF.
+if (!aCommand.isEmpty() && aCommand[0] == ' ')
+{
+aCommand = aCommand.subView(1);
+}
+
+if (!oOuterFieldId && aCommand.startsWith("IF "))
 {
 // This will be FIELD_IF once the command is closed.
 oOuterFieldId = FIELD_IF;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Jan Holesovsky (via logerrit)
 desktop/source/lib/init.cxx |   57 +++-
 1 file changed, 25 insertions(+), 32 deletions(-)

New commits:
commit dd2532203b7928d5f06de96da7f15d45d9c38d80
Author: Jan Holesovsky 
AuthorDate: Thu Oct 15 18:05:35 2020 +0200
Commit: Jan Holesovsky 
CommitDate: Fri Nov 13 14:34:50 2020 +0100

lok: Simplify the check for command in sendDialogEvent.

Change-Id: I1d2c967b68113d2528b80e91c32170f749ed9335
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104434
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105738
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9aec16e027cb..b31d68dc5391 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3740,43 +3740,36 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* 
/*pThis*/, unsigned long
 WindowUIObject aUIObject(pWindow);
 std::unique_ptr 
pUIWindow(aUIObject.get_visible_child(aMap["id"]));
 if (pUIWindow) {
-bool bIsClickAction = false;
+OUString sAction((aMap.find("cmd") != aMap.end())? 
aMap["cmd"]: "");
 
-if (aMap.find("cmd") != aMap.end()) {
-if (aMap["cmd"] == "selected")
-{
-aMap["POS"] = aMap["data"];
-aMap["TEXT"] = aMap["data"];
+if (sAction == "selected")
+{
+aMap["POS"] = aMap["data"];
+aMap["TEXT"] = aMap["data"];
 
-pUIWindow->execute(sSelectAction, aMap);
-}
-else if (aMap["cmd"] == "plus")
-{
-pUIWindow->execute(sUpAction, aMap);
-}
-else if (aMap["cmd"] == "minus")
-{
-pUIWindow->execute(sDownAction, aMap);
-}
-else if (aMap["cmd"] == "set")
-{
-aMap["TEXT"] = aMap["data"];
+pUIWindow->execute(sSelectAction, aMap);
+}
+else if (sAction == "plus")
+{
+pUIWindow->execute(sUpAction, aMap);
+}
+else if (sAction == "minus")
+{
+pUIWindow->execute(sDownAction, aMap);
+}
+else if (sAction == "set")
+{
+aMap["TEXT"] = aMap["data"];
 
-pUIWindow->execute(sClearAction, aMap);
-pUIWindow->execute(sTypeAction, aMap);
-}
-else if (aMap["cmd"] == "value")
-{
-aMap["VALUE"] = aMap["data"];
-pUIWindow->execute(sValue, aMap);
-}
-else
-bIsClickAction = true;
+pUIWindow->execute(sClearAction, aMap);
+pUIWindow->execute(sTypeAction, aMap);
+}
+else if (sAction == "value")
+{
+aMap["VALUE"] = aMap["data"];
+pUIWindow->execute(sValue, aMap);
 }
 else
-bIsClickAction = true;
-
-if (bIsClickAction)
 pUIWindow->execute(sClickAction, aMap);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 5858f628829ccd14e4915c138d798e03dba20edc
Author: Muhammet Kara 
AuthorDate: Wed Mar 18 13:56:43 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Nov 13 14:34:14 2020 +0100

Sidebar tdf#92768: Fix title & subtitle checkboxes on the ChartDeck

Turns out the 2nd part of tdf#92768 was not implemented yet, so it is
still necessary to remove the title/subtitle for good, otherwise we set
the "Visibility" property, but nothing actually reads that when
rendering.

So the titles now work as they did before the regression. An uncheck action
removes the title/subtitle, and a check action just makes the existing
title/subtitle visible or creates a new one if it doesn't exist

Change-Id: I23122d1be2d95af878b824ba194bd1aeed5f4f89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90692
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105737
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx 
b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 4158924fbfb0..c380459cfd9f 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -663,7 +663,9 @@ void 
ChartElementsPanel::setTitleVisible(TitleHelper::eTitleType eTitle, bool bV
 }
 else
 {
-TitleHelper::hideTitle(eTitle, mxModel);
+// TODO tdf#92768 use TitleHelper::hideTitle() here once there is
+// rendering suport for the property "Visible"
+TitleHelper::removeTitle(eTitle, mxModel);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Jan Holesovsky (via logerrit)
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |   44 +-
 chart2/source/controller/sidebar/ChartElementsPanel.hxx |3 +
 chart2/uiconfig/ui/sidebarelements.ui   |   47 +---
 vcl/source/control/ivctrl.cxx   |1 
 4 files changed, 86 insertions(+), 9 deletions(-)

New commits:
commit ca35aea6ed6481c4b090eff2258412684b3e7099
Author: Jan Holesovsky 
AuthorDate: Wed Oct 14 16:18:17 2020 +0200
Commit: Jan Holesovsky 
CommitDate: Fri Nov 13 14:33:45 2020 +0100

chart2: Add the possibility to edit title & subtitle from the sidebar.

Change-Id: I4be15acbc2127ebb6eca8864a0209ba57b488100
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104313
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105736
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx 
b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 1c7e60157aef..4158924fbfb0 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -302,7 +302,9 @@ ChartElementsPanel::ChartElementsPanel(
 ChartController* pController)
 : PanelLayout(pParent, "ChartElementsPanel", 
"modules/schart/ui/sidebarelements.ui", rxFrame)
 , mxCBTitle(m_xBuilder->weld_check_button("checkbutton_title"))
+, mxEditTitle(m_xBuilder->weld_entry("edit_title"))
 , mxCBSubtitle(m_xBuilder->weld_check_button("checkbutton_subtitle"))
+, mxEditSubtitle(m_xBuilder->weld_entry("edit_subtitle"))
 , mxCBXAxis(m_xBuilder->weld_check_button("checkbutton_x_axis"))
 , mxCBXAxisTitle(m_xBuilder->weld_check_button("checkbutton_x_axis_title"))
 , mxCBYAxis(m_xBuilder->weld_check_button("checkbutton_y_axis"))
@@ -346,7 +348,9 @@ void ChartElementsPanel::dispose()
 css::uno::Reference xBroadcaster(mxModel, 
css::uno::UNO_QUERY_THROW);
 xBroadcaster->removeModifyListener(mxListener);
 mxCBTitle.reset();
+mxEditTitle.reset();
 mxCBSubtitle.reset();
+mxEditSubtitle.reset();
 mxCBXAxis.reset();
 mxCBXAxisTitle.reset();
 mxCBYAxis.reset();
@@ -403,6 +407,10 @@ void ChartElementsPanel::Initialize()
 mxCBGridHorizontalMinor->connect_toggled(aLink);
 
 mxLBLegendPosition->connect_changed(LINK(this, ChartElementsPanel, 
LegendPosHdl));
+
+Link aEditLink = LINK(this, ChartElementsPanel, 
EditHdl);
+mxEditTitle->connect_changed(aEditLink);
+mxEditSubtitle->connect_changed(aEditLink);
 }
 
 namespace {
@@ -447,8 +455,27 @@ void ChartElementsPanel::updateData()
 mxCBLegendNoOverlay->set_sensitive(isLegendVisible(mxModel));
 mxCBLegendNoOverlay->set_active(!isLegendOverlay(mxModel));
 mxBoxLegend->set_sensitive(isLegendVisible(mxModel));
-mxCBTitle->set_active(isTitleVisible(mxModel, TitleHelper::MAIN_TITLE));
-mxCBSubtitle->set_active(isTitleVisible(mxModel, TitleHelper::SUB_TITLE));
+
+bool hasTitle = isTitleVisible(mxModel, TitleHelper::MAIN_TITLE);
+mxCBTitle->set_active(hasTitle);
+
+OUString title = mxEditTitle->get_text();
+OUString newTitle = 
TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::MAIN_TITLE, 
mxModel));
+if (title != newTitle)
+mxEditTitle->set_text(newTitle);
+if (mxEditTitle->get_sensitive() != hasTitle)
+ mxEditTitle->set_sensitive(hasTitle);
+
+bool hasSubtitle = isTitleVisible(mxModel, TitleHelper::SUB_TITLE);
+mxCBSubtitle->set_active(hasSubtitle);
+
+OUString subtitle = mxEditSubtitle->get_text();
+OUString newSubtitle = 
TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::SUB_TITLE, 
mxModel));
+if (subtitle != newSubtitle)
+mxEditSubtitle->set_text(newSubtitle);
+if (mxEditSubtitle->get_sensitive() != hasSubtitle)
+ mxEditSubtitle->set_sensitive(hasSubtitle);
+
 mxCBXAxisTitle->set_active(isTitleVisible(mxModel, 
TitleHelper::X_AXIS_TITLE));
 mxCBYAxisTitle->set_active(isTitleVisible(mxModel, 
TitleHelper::Y_AXIS_TITLE));
 mxCBZAxisTitle->set_active(isTitleVisible(mxModel, 
TitleHelper::Z_AXIS_TITLE));
@@ -464,7 +491,6 @@ void ChartElementsPanel::updateData()
 mxCB2ndXAxis->set_active(isAxisVisible(mxModel, AxisType::X_SECOND));
 mxCB2ndYAxis->set_active(isAxisVisible(mxModel, AxisType::Y_SECOND));
 
-
 bool bSupportsMainAxis = ChartTypeHelper::isSupportingMainAxis(
 getChartType(mxModel), 0, 0);
 if (bSupportsMainAxis)
@@ -610,6 +636,18 @@ IMPL_LINK(ChartElementsPanel, CheckBoxHdl, 
weld::ToggleButton&, rCheckBox, void)
 setGridVisible(mxModel, GridType::HOR_MINOR, bChecked);
 }
 
+IMPL_LINK(ChartElementsPanel, EditHdl, weld::Entry&, rEdit, void)
+{
+// title or subtitle?
+TitleHelper::eTitleType aTitleType = TitleHelper::MAIN_TITLE;
+if (&rEdit == mxEditSubtitle.get())
+aTitleType 

[Libreoffice-commits] core.git: basic/inc basic/qa basic/source solenv/clang-format

2020-11-13 Thread Philipp Hofer (via logerrit)
 basic/inc/global.hxx|5 -
 basic/inc/sb.hxx|4 
 basic/inc/sbxbase.hxx   |   10 +-
 basic/inc/sbxfac.hxx|6 -
 basic/qa/cppunit/basictest.hxx  |   10 +-
 basic/qa/cppunit/test_scanner.cxx   |  143 
 basic/source/inc/errobject.hxx  |   11 +-
 basic/source/inc/sbjsmeth.hxx   |6 -
 basic/source/inc/sbjsmod.hxx|   10 +-
 basic/source/inc/stdobj.hxx |   11 +-
 basic/source/runtime/comenumwrapper.hxx |   10 +-
 basic/source/uno/modsizeexceeded.cxx|   19 ++--
 solenv/clang-format/excludelist |   12 --
 13 files changed, 123 insertions(+), 134 deletions(-)

New commits:
commit 16389aae367ebfa8ce19f8ee1c26232fec7ff729
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:48:50 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 14:31:50 2020 +0100

tdf#123936 Formatting files in module basic with clang-format

Change-Id: I87736d6f1a1d069c990b4e7b9ca291634ab4fb44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105646
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/basic/inc/global.hxx b/basic/inc/global.hxx
index aa101a562ced..0f380cad3fdd 100644
--- a/basic/inc/global.hxx
+++ b/basic/inc/global.hxx
@@ -9,8 +9,9 @@
 
 #pragma once
 
-namespace utl {
-class TransliterationWrapper;
+namespace utl
+{
+class TransliterationWrapper;
 }
 
 class SbGlobal
diff --git a/basic/inc/sb.hxx b/basic/inc/sb.hxx
index 4f3132fcf569..f94c52a6e045 100644
--- a/basic/inc/sb.hxx
+++ b/basic/inc/sb.hxx
@@ -22,8 +22,8 @@
 #include 
 
 // create object from user-type  (+StringID+StringID)
-SbxObject* createUserTypeImpl( const OUString& rClassName );
+SbxObject* createUserTypeImpl(const OUString& rClassName);
 
-SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj );
+SbxObject* cloneTypeObjectImpl(const SbxObject& rTypeObj);
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/sbxbase.hxx b/basic/inc/sbxbase.hxx
index 40255c485a8f..80552c2fbf08 100644
--- a/basic/inc/sbxbase.hxx
+++ b/basic/inc/sbxbase.hxx
@@ -35,15 +35,15 @@ class SbxBasicFormater;
 // AppData structure for SBX:
 struct SbxAppData
 {
-ErrCode eErrCode;  // Error code
-SbxVariableRef  m_aGlobErr; // Global error object
+ErrCode eErrCode; // Error code
+SbxVariableRef m_aGlobErr; // Global error object
 std::vector m_Factories; // these are owned by fields in 
SbiGlobals
-tools::SvRef  mrImplRepository;
+tools::SvRef mrImplRepository;
 
 // Pointer to Format()-Command helper class
-std::unique_ptr   pBasicFormater;
+std::unique_ptr pBasicFormater;
 
-LanguageTypeeBasicFormaterLangType;
+LanguageType eBasicFormaterLangType;
 // It might be useful to store this class 'global' because some string 
resources are saved here
 
 SbxAppData();
diff --git a/basic/inc/sbxfac.hxx b/basic/inc/sbxfac.hxx
index 7e92f895adaf..28257b17a6d7 100644
--- a/basic/inc/sbxfac.hxx
+++ b/basic/inc/sbxfac.hxx
@@ -28,9 +28,9 @@ class SbxFactory
 {
 public:
 virtual ~SbxFactory();
-SbxFactory()  {}
-virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 );
-virtual SbxObject* CreateObject( const OUString& );
+SbxFactory() {}
+virtual SbxBase* Create(sal_uInt16 nSbxId, sal_uInt32);
+virtual SbxObject* CreateObject(const OUString&);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/qa/cppunit/basictest.hxx b/basic/qa/cppunit/basictest.hxx
index f5fb79f557ba..c0afeb5bd18c 100644
--- a/basic/qa/cppunit/basictest.hxx
+++ b/basic/qa/cppunit/basictest.hxx
@@ -29,21 +29,21 @@ private:
 StarBASICRef mpBasic;
 
 void InitSnippet();
-void MakeModule( const OUString& sSource );
+void MakeModule(const OUString& sSource);
 
 public:
-explicit MacroSnippet( const OUString& sSource );
+explicit MacroSnippet(const OUString& sSource);
 MacroSnippet();
 
-void LoadSourceFromFile( const OUString& sMacroFileURL );
+void LoadSourceFromFile(const OUString& sMacroFileURL);
 
-SbxVariableRef Run( const css::uno::Sequence< css::uno::Any >& rArgs );
+SbxVariableRef Run(const css::uno::Sequence& rArgs);
 
 SbxVariableRef Run();
 
 bool Compile();
 
-DECL_LINK( BasicErrorHdl, StarBASIC *, bool );
+DECL_LINK(BasicErrorHdl, StarBASIC*, bool);
 
 bool HasError() const;
 const ErrCode& getError() const;
diff --git a/basic/qa/cppunit/test_scanner.cxx 
b/basic/qa/cppunit/test_scanner.cxx
index 7515b0d07862..ed340755deba 100644
--- a/basic/qa/cppunit/test_scanner.cxx
+++ b/basic/qa/cppunit/test_scanner.cxx
@@ -19,22 +19,22 @@
 
 namespace
 {
-  struct Symbol
-  {
+struct Symbol
+{
 sal_uInt16 line;
 sal_uInt16 col1;
 OUString text;
 double number;
 SbxDataType type;
 bool ws;
-  };
+};
 
-  /**
+/**
* Perform tests on Scanner.
   

[Libreoffice-commits] core.git: basegfx/test solenv/clang-format

2020-11-13 Thread Philipp Hofer (via logerrit)
 basegfx/test/basegfx3d.cxx  |   20 +---
 basegfx/test/basegfxtools.cxx   |   31 +++
 basegfx/test/boxclipper.hxx |7 +++
 solenv/clang-format/excludelist |3 ---
 4 files changed, 23 insertions(+), 38 deletions(-)

New commits:
commit 0eaf2092940dc604926d31ef11b6ffb07abedc5a
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:48:28 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 14:29:07 2020 +0100

tdf#123936 Formatting files in module basegfx with clang-format

Change-Id: I29bfa5de3bfd8ad2989cba0269f48f79edd58fd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105645
Tested-by: Christian Lohmaier 
Reviewed-by: Christian Lohmaier 

diff --git a/basegfx/test/basegfx3d.cxx b/basegfx/test/basegfx3d.cxx
index 279cc9a67756..b03560d6588e 100644
--- a/basegfx/test/basegfx3d.cxx
+++ b/basegfx/test/basegfx3d.cxx
@@ -22,16 +22,14 @@
 
 namespace basegfx3d
 {
-
 class b3dhommatrix : public CppUnit::TestFixture
 {
 public:
-
 // insert your test code here.
 // this is only demonstration code
 void EmptyMethod()
 {
-  // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1);
+// CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1);
 }
 
 // Change the following lines only, if you add, remove or rename
@@ -46,12 +44,11 @@ public:
 class b3dpoint : public CppUnit::TestFixture
 {
 public:
-
 // insert your test code here.
 // this is only demonstration code
 void EmptyMethod()
 {
-  // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1);
+// CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1);
 }
 
 // Change the following lines only, if you add, remove or rename
@@ -66,11 +63,8 @@ public:
 class b3drange : public CppUnit::TestFixture
 {
 public:
-
 // insert your test code here.
-void EmptyMethod()
-{
-}
+void EmptyMethod() {}
 
 // Change the following lines only, if you add, remove or rename
 // member functions of the current class,
@@ -84,12 +78,11 @@ public:
 class b3dtuple : public CppUnit::TestFixture
 {
 public:
-
 // insert your test code here.
 // this is only demonstration code
 void EmptyMethod()
 {
-  // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1);
+// CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1);
 }
 
 // Change the following lines only, if you add, remove or rename
@@ -104,11 +97,8 @@ public:
 class b3dvector : public CppUnit::TestFixture
 {
 public:
-
 // insert your test code here.
-void EmptyMethod()
-{
-}
+void EmptyMethod() {}
 
 // Change the following lines only, if you add, remove or rename
 // member functions of the current class,
diff --git a/basegfx/test/basegfxtools.cxx b/basegfx/test/basegfxtools.cxx
index 7259a9980c70..a768357c13a5 100644
--- a/basegfx/test/basegfxtools.cxx
+++ b/basegfx/test/basegfxtools.cxx
@@ -28,7 +28,6 @@ using namespace ::basegfx;
 
 namespace basegfxtools
 {
-
 class KeyStopLerpTest : public CppUnit::TestFixture
 {
 utils::KeyStopLerp maKeyStops;
@@ -43,41 +42,41 @@ class KeyStopLerpTest : public CppUnit::TestFixture
 }
 
 public:
-KeyStopLerpTest() :
-maKeyStops(getTestVector())
-{}
-
+KeyStopLerpTest()
+: maKeyStops(getTestVector())
+{
+}
 
 void test()
 {
 double fAlpha;
 std::ptrdiff_t nIndex;
 
-std::tie(nIndex,fAlpha) = maKeyStops.lerp(-1.0);
+std::tie(nIndex, fAlpha) = maKeyStops.lerp(-1.0);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("-1.0", std::ptrdiff_t(0), nIndex);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("-1.0", 0.0, fAlpha);
 
-std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.1);
+std::tie(nIndex, fAlpha) = maKeyStops.lerp(0.1);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("0.1", std::ptrdiff_t(0), nIndex);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("0.1", 0.0, fAlpha);
 
-std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.3);
+std::tie(nIndex, fAlpha) = maKeyStops.lerp(0.3);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("0.3", std::ptrdiff_t(0), nIndex);
-CPPUNIT_ASSERT_MESSAGE("0.3", fTools::equal(fAlpha,0.5));
+CPPUNIT_ASSERT_MESSAGE("0.3", fTools::equal(fAlpha, 0.5));
 
-std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.5);
+std::tie(nIndex, fAlpha) = maKeyStops.lerp(0.5);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("0.5", std::ptrdiff_t(0), nIndex);
-CPPUNIT_ASSERT_MESSAGE("0.5", fTools::equal(fAlpha,1.0));
+CPPUNIT_ASSERT_MESSAGE("0.5", fTools::equal(fAlpha, 1.0));
 
-std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.51);
+std::tie(nIndex, fAlpha) = maKeyStops.lerp(0.51);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("0.51", std::ptrdiff_t(1), nIndex);
-CPPUNIT_ASSERT_MESSAGE("0.51", fTools::equal(fAlpha,0.025));
+CPPUNIT_ASSERT_MESSAGE("0.51", fTools::equal(fAlpha, 0.025));
 
-std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.9);
+std::tie(nIndex, fAlpha) = maKeyS

[Libreoffice-commits] core.git: ios/LibreOfficeLight solenv/clang-format

2020-11-13 Thread Philipp Hofer (via logerrit)
 ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h |2 --
 solenv/clang-format/excludelist   |1 -
 2 files changed, 3 deletions(-)

New commits:
commit 26573395db55ddbd56d4dde39c8d5e5306c7a6ce
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 13:03:37 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Nov 13 14:26:28 2020 +0100

tdf#123936 Formatting files in module ios with clang-format

Change-Id: I9ab70d93ce0bbb72683aca30e1122046abffe11b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105682
Tested-by: Christian Lohmaier 
Reviewed-by: Christian Lohmaier 

diff --git a/ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h 
b/ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h
index 67feadb801f3..5a4e07ffdc5e 100644
--- a/ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h
+++ b/ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h
@@ -6,8 +6,6 @@
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 //
 
-
-
 // LibreOfficeKit is a prelink of all used LO libraries, generated
 // as its own xCode project.
 #define LOK_USE_UNSTABLE_API
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 4495c0572f2b..45d28f6d4a38 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -7398,7 +7398,6 @@ io/test/stm/testfactreg.cxx
 io/test/stm/testfactreg.hxx
 io/test/testcomponent.cxx
 io/test/testconnection.cxx
-ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h
 ios/source/LibreOfficeKit.c
 ios/source/LibreOfficeKit.h
 javaunohelper/source/bootstrap.cxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/eszka' - sc/source

2020-11-13 Thread Szymon Kłos (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |5 -
 sc/source/ui/inc/checklistmenu.hxx   |3 ++-
 sc/source/ui/view/gridwin.cxx|9 ++---
 3 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 9b6b6260f04f3538b879b03dec76d53fe3133717
Author: Szymon Kłos 
AuthorDate: Fri Nov 13 12:30:51 2020 +0100
Commit: Szymon Kłos 
CommitDate: Fri Nov 13 13:33:19 2020 +0100

autofilter: make working with multiple users in online

Change-Id: Ib0255178112fae5d964cd6155d42848e7c7c51e8

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 98421847ccd6..0df3819e686c 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -558,11 +558,14 @@ ScCheckListMenuControl::~ScCheckListMenuControl()
 }
 
 ScCheckListMenuWindow::ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* 
pDoc, bool bCanHaveSubMenu,
- bool bTreeMode, int nWidth, 
ScCheckListMenuWindow* pParentMenu)
+ bool bTreeMode, int nWidth, 
ScCheckListMenuWindow* pParentMenu,
+ vcl::ILibreOfficeKitNotifier* 
pNotifier)
 : DockingWindow(pParent, "InterimDockParent", 
"svx/ui/interimdockparent.ui")
 , mxParentMenu(pParentMenu)
 , mxBox(get("box"))
 {
+if (pNotifier)
+SetLOKNotifier(pNotifier);
 setDeferredProperties();
 mxControl.reset(new ScCheckListMenuControl(this, mxBox.get(), pDoc, 
bCanHaveSubMenu, bTreeMode, nWidth));
 
SetBackground(Application::GetSettings().GetStyleSettings().GetMenuColor());
diff --git a/sc/source/ui/inc/checklistmenu.hxx 
b/sc/source/ui/inc/checklistmenu.hxx
index 49d4822ecd3b..5d4d6a6abd33 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -304,7 +304,8 @@ class ScCheckListMenuWindow : public DockingWindow
 public:
 explicit ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* pDoc,
bool bCanHaveSubMenu, bool bTreeMode, int 
nWidth = -1,
-   ScCheckListMenuWindow* pParentMenu = 
nullptr);
+   ScCheckListMenuWindow* pParentMenu = 
nullptr,
+   vcl::ILibreOfficeKitNotifier* pNotifier = 
nullptr);
 virtual void dispose() override;
 virtual ~ScCheckListMenuWindow() override;
 
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 35788177cbf1..40cb77f85b53 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -635,13 +635,16 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW 
nRow)
 ScFilterEntries aFilterEntries;
 pDoc->GetFilterEntries(nCol, nRow, nTab, aFilterEntries);
 
+vcl::ILibreOfficeKitNotifier* pNotifier = nullptr;
+if (bLOKActive)
+pNotifier = SfxViewShell::Current();
+
 int nColWidth = ScViewData::ToPixel(pDoc->GetColWidth(nCol, nTab), 
pViewData->GetPPTX());
 mpAutoFilterPopup.reset(VclPtr::Create(this, pDoc, 
false,
-  
aFilterEntries.mbHasDates, nColWidth));
+  
aFilterEntries.mbHasDates,
+  nColWidth, 
nullptr, pNotifier));
 ScCheckListMenuControl& rControl = mpAutoFilterPopup->get_widget();
 
-if (bLOKActive)
-mpAutoFilterPopup->SetLOKNotifier(SfxViewShell::Current());
 rControl.setOKAction(new AutoFilterAction(this, AutoFilterMode::Normal));
 rControl.setPopupEndAction(
 new AutoFilterPopupEndAction(this, ScAddress(nCol, nRow, nTab)));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Noel (via logerrit)
 compilerplugins/clang/constantparam.py |   14 +-
 compilerplugins/clang/constfields.py   |6 +-
 compilerplugins/clang/countusersofdefaultparams.py |6 +-
 compilerplugins/clang/expandablemethods.py |8 ++--
 compilerplugins/clang/finalclasses.py  |   10 +++---
 compilerplugins/clang/inlinefields.py  |6 +-
 compilerplugins/clang/methodcycles.py  |8 ++--
 compilerplugins/clang/unnecessaryvirtual.py|8 ++--
 compilerplugins/clang/unusedmethods.py |8 ++--
 compilerplugins/clang/unusedvarsglobal.py  |   10 +++---
 compilerplugins/clang/virtualdead.py   |8 ++--
 compilerplugins/clang/virtualdown.py   |6 +-
 12 files changed, 73 insertions(+), 25 deletions(-)

New commits:
commit 95b2ee0070b1c885f18e620e1204da5fe978ad68
Author: Noel 
AuthorDate: Thu Nov 12 10:49:44 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 13 13:44:12 2020 +0100

improve sorting in global-analysis plugins

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

diff --git a/compilerplugins/clang/constantparam.py 
b/compilerplugins/clang/constantparam.py
index 1e2cbeee7e4b..9e1c7e74aa9b 100755
--- a/compilerplugins/clang/constantparam.py
+++ b/compilerplugins/clang/constantparam.py
@@ -97,10 +97,14 @@ for callInfo, callValues in iter(callDict.items()):
 def natural_sort_key(s, _nsre=re.compile('([0-9]+)')):
 return [int(text) if text.isdigit() else text.lower()
 for text in re.split(_nsre, s)]
-tmp1list.sort(key=lambda v: natural_sort_key(v[0]))
-tmp2list.sort(key=lambda v: natural_sort_key(v[0]))
-tmp3list.sort(key=lambda v: natural_sort_key(v[0]))
-tmp4list.sort(key=lambda v: natural_sort_key(v[0]))
+# sort by both the source-line and the datatype, so the output file ordering 
is stable
+# when we have multiple items on the same source line
+def v_sort_key(v):
+return natural_sort_key(v[0]) + [v[1]]
+tmp1list.sort(key=lambda v: v_sort_key(v))
+tmp2list.sort(key=lambda v: v_sort_key(v))
+tmp3list.sort(key=lambda v: v_sort_key(v))
+tmp4list.sort(key=lambda v: v_sort_key(v))
 
 # print out the results
 with open("compilerplugins/clang/constantparam.booleans.results", "wt") as f:
@@ -184,7 +188,7 @@ for callInfo, callValues in iter(callDict.items()):
 
 
 # sort results by filename:lineno
-tmp2list.sort(key=lambda v: natural_sort_key(v[0]))
+tmp2list.sort(key=lambda v: v_sort_key(v))
 
 # print out the results
 with open("compilerplugins/clang/constantparam.bitmask.results", "wt") as f:
diff --git a/compilerplugins/clang/constfields.py 
b/compilerplugins/clang/constfields.py
index 980363f78eb9..e81d3f3043f5 100755
--- a/compilerplugins/clang/constfields.py
+++ b/compilerplugins/clang/constfields.py
@@ -70,9 +70,13 @@ for d in definitionSet:
 def natural_sort_key(s, _nsre=re.compile('([0-9]+)')):
 return [int(text) if text.isdigit() else text.lower()
 for text in re.split(_nsre, s)]
+# sort by both the source-line and the datatype, so the output file ordering 
is stable
+# when we have multiple items on the same source line
+def v_sort_key(v):
+return natural_sort_key(v[1]) + [v[0]]
 
 # sort results by name and line number
-tmp6list = sorted(canBeConstFieldSet, key=lambda v: natural_sort_key(v[1]))
+tmp6list = sorted(canBeConstFieldSet, key=lambda v: v_sort_key(v))
 
 # print out the results
 with open("compilerplugins/clang/constfields.results", "wt") as f:
diff --git a/compilerplugins/clang/countusersofdefaultparams.py 
b/compilerplugins/clang/countusersofdefaultparams.py
index eabb7d5ef30e..57af9ea29caa 100755
--- a/compilerplugins/clang/countusersofdefaultparams.py
+++ b/compilerplugins/clang/countusersofdefaultparams.py
@@ -66,9 +66,13 @@ for k,v in callDict.iteritems():
 def natural_sort_key(s, _nsre=re.compile('([0-9]+)')):
 return [int(text) if text.isdigit() else text.lower()
 for text in re.split(_nsre, s)]
+# sort by both the source-line and the datatype, so the output file ordering 
is stable
+# when we have multiple items on the same source line
+def v_sort_key(v):
+return natural_sort_key(v[1]) + [v[0]]
 
 # sort results by name and line number
-tmp1list.sort(key=lambda v: natural_sort_key(v[1]))
+tmp1list.sort(key=lambda v: v_sort_key(v))
 
 # print out the results
 with open("loplugin.countusersofdefaultparams.report", "wt") as f:
diff --git a/compilerplugins/clang/expandablemethods.py 
b/compilerplugins/clang/expandablemethods.py
index 9a7b828a4ad5..0fa61747d368 100755
--- a/compilerplugins/clang/expandablemethods.py
+++ b/compilerplugins/clang/expandablemethods.py
@@ -99,10 +99,14 @@ def isOtherConstness( d, callSet ):
 def natural_sort_key(s, _nsre=re.compile('([0-9]+)')):
 return [int(text) if text.isdigit() el

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

2020-11-13 Thread Caolán McNamara (via logerrit)
 sc/source/ui/view/gridwin4.cxx |   28 +---
 1 file changed, 17 insertions(+), 11 deletions(-)

New commits:
commit c54e1c22f30c23d00e2fe7521217569fcec59cc4
Author: Caolán McNamara 
AuthorDate: Thu Nov 12 14:16:38 2020 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 13 13:39:11 2020 +0100

tdf#138157 turn off cursor earlier

Before the first time SetMapMode is changed, because that triggers a
redraw of the cursor using the new mapmode and so it appears in the
wrong place. We are going to turn off the cursor anyway, so do that
earlier.

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

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index cc3fa9c7ff0b..c5230e949fea 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -709,6 +709,20 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
 aDrawingRectLogic = PixelToLogic(aDrawingRectPixel, aDrawMode);
 }
 
+bool bInPlaceEditing = bEditMode && (mrViewData.GetRefTabNo() == 
mrViewData.GetTabNo());
+vcl::Cursor* pInPlaceCrsr = nullptr;
+bool bInPlaceVisCursor = false;
+if (bInPlaceEditing)
+{
+// toggle the cursor off if its on to ensure the cursor invert
+// background logic remains valid after the background is cleared on
+// the next cursor flash
+pInPlaceCrsr = pEditView->GetCursor();
+bInPlaceVisCursor = pInPlaceCrsr && pInPlaceCrsr->IsVisible();
+if (bInPlaceVisCursor)
+pInPlaceCrsr->Hide();
+}
+
 OutputDevice* pContentDev = &rDevice;   // device for document content, 
used by overlay manager
 SdrPaintWindow* pTargetPaintWindow = nullptr; // #i74769# work with 
SdrPaintWindow directly
 
@@ -1074,7 +1088,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
 // using the editeng.
 // It's being done after EndDrawLayers() to get it outside the overlay
 // buffer and on top of everything.
-if ( bEditMode && (mrViewData.GetRefTabNo() == mrViewData.GetTabNo()) )
+if (bInPlaceEditing)
 {
 // get the coordinates of the area we need to clear (overpaint by
 // the background)
@@ -1092,14 +1106,6 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
 aEnd.AdjustX( -(2 * nLayoutSign) );
 aEnd.AdjustY( -2 );
 
-// toggle the cursor off if its on to ensure the cursor invert
-// background logic remains valid after the background is cleared on
-// the next cursor flash
-vcl::Cursor* pCrsr = pEditView->GetCursor();
-const bool bVisCursor = pCrsr && pCrsr->IsVisible();
-if (bVisCursor)
-pCrsr->Hide();
-
 // set the correct mapmode
 tools::Rectangle aBackground(aStart, aEnd);
 tools::Rectangle aBGAbs(aStart, aEnd);
@@ -1199,8 +1205,8 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
 rDevice.SetMapMode(MapMode(MapUnit::MapPixel));
 
 // restore the cursor it was originally visible
-if (bVisCursor)
-pCrsr->Show();
+if (bInPlaceVisCursor)
+pInPlaceCrsr->Show();
 }
 
 if (mrViewData.HasEditView(eWhich))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/editeng include/tools svx/source sw/source tools/source vcl/source

2020-11-13 Thread Noel Grandin (via logerrit)
 include/editeng/itemtype.hxx  |2 +-
 include/tools/bigint.hxx  |   14 ++
 svx/source/svdraw/svdattr.cxx |2 +-
 svx/source/svdraw/svdedtv1.cxx|8 
 svx/source/svdraw/svdobj.cxx  |8 
 svx/source/svdraw/svdotxdr.cxx|8 
 svx/source/svdraw/svdtrans.cxx|2 +-
 svx/source/svdraw/svdxcgv.cxx |4 ++--
 svx/source/xoutdev/xattr.cxx  |2 +-
 sw/source/uibase/wrtsh/wrtsh1.cxx |4 ++--
 tools/source/generic/poly.cxx |4 ++--
 vcl/source/control/longcurr.cxx   |8 
 vcl/source/filter/wmf/wmfwr.cxx   |4 ++--
 vcl/source/outdev/map.cxx |   12 ++--
 14 files changed, 48 insertions(+), 34 deletions(-)

New commits:
commit d55e0fbde49ad3b1e678419588dd58df6d9e06c4
Author: Noel Grandin 
AuthorDate: Thu Nov 12 09:31:42 2020 +0100
Commit: Noel Grandin 
CommitDate: Fri Nov 13 13:38:26 2020 +0100

Revert "remove BigInt::operator tools::Long()"

This reverts commit 1397a1c8e4995b0dd336478e564880fe8ad91d1d.

Reason for revert: Some discussion required

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

diff --git a/include/editeng/itemtype.hxx b/include/editeng/itemtype.hxx
index 9adcb98cb370..19d2a19b4ee3 100644
--- a/include/editeng/itemtype.hxx
+++ b/include/editeng/itemtype.hxx
@@ -42,7 +42,7 @@ inline tools::Long Scale( tools::Long nVal, tools::Long 
nMult, tools::Long nDiv
 aVal *= nMult;
 aVal += nDiv/2;
 aVal /= nDiv;
-return static_cast(aVal);
+return aVal;
 }
 
 #endif
diff --git a/include/tools/bigint.hxx b/include/tools/bigint.hxx
index 6683f07e3121..db8c3bcd1b1c 100644
--- a/include/tools/bigint.hxx
+++ b/include/tools/bigint.hxx
@@ -88,6 +88,9 @@ public:
 operatorsal_Int32() const;
 operatorsal_uInt32() const;
 operatordouble() const;
+#if SAL_TYPES_SIZEOFPOINTER == 8
+operatortools::Long() const;
+#endif
 
 boolIsSet() const { return bIsSet; }
 boolIsNeg() const;
@@ -153,6 +156,17 @@ inline BigInt::operator sal_uInt32() const
 return 0;
 }
 
+#if SAL_TYPES_SIZEOFPOINTER == 8
+inline BigInt::operator tools::Long() const
+{
+// Clamp to int32 since long is int32 on Windows.
+if (!bIsBig)
+return nVal;
+assert(false && "out of range");
+return 0;
+}
+#endif
+
 inline BigInt& BigInt::operator =( sal_Int32 nValue )
 {
 bIsSet = true;
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 58aa365e02ae..2e007ea7d513 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -855,7 +855,7 @@ void SdrMetricItem::ScaleMetrics(tools::Long nMul, 
tools::Long nDiv)
 aVal*=nMul;
 aVal+=nDiv/2; // to round accurately
 aVal/=nDiv;
-SetValue(sal_Int32(aVal));
+SetValue(tools::Long(aVal));
 }
 }
 
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 5f98c816c65f..0beba3a215aa 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -131,10 +131,10 @@ void SdrEditView::SetMarkedObjRect(const 
tools::Rectangle& rRect)
 } else {
 t=0; b=h1;
 }
-aR1.SetLeft(sal_Int32(l) );
-aR1.SetRight(sal_Int32(r) );
-aR1.SetTop(sal_Int32(t) );
-aR1.SetBottom(sal_Int32(b) );
+aR1.SetLeft(tools::Long(l) );
+aR1.SetRight(tools::Long(r) );
+aR1.SetTop(tools::Long(t) );
+aR1.SetBottom(tools::Long(b) );
 aR1.Move(x1,y1);
 }
 pO->SetSnapRect(aR1);
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 6b2db29caf7d..638c590a52cd 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1236,12 +1236,12 @@ tools::Rectangle SdrObject::ImpDragCalcRect(const 
SdrDragStat& rDrag) const
 if (bEcke) { // corner point handles
 bool bUseX=(aXFactSetLogicRect(aR);
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 072448f7121c..f8b532ab554e 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -103,7 +103,7 @@ static tools::Long ScaleMetricValue( tools::Long nVal, 
tools::Long nMul, tools::
 
 aVal/=nDiv;
 
-return sal_Int32( aVal );
+return tools::Long( aVal );
 }
 
 NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, sal_Int32 nIndex) :
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 1bab729db9a5..8251a9978142 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -337,13 +337,13 @@ void SwWrtShell::Insert( const OUString &rPath, const 
OUString &rFilter,
 if( aGrfSi

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

2020-11-13 Thread Tor Lillqvist (via logerrit)
 configure.ac |   17 +
 1 file changed, 13 insertions(+), 4 deletions(-)

New commits:
commit f7f122f34183ce79b1337d8e2a6bc32f4c865f83
Author: Tor Lillqvist 
AuthorDate: Tue Jun 23 00:52:38 2020 +0300
Commit: Tor Lillqvist 
CommitDate: Fri Nov 13 13:25:57 2020 +0100

Accept macOS SDK 11.0

Change-Id: I92275eabe3c6a9442f675ec211c1dd1a8b58bd1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96909
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105787
Tested-by: Jenkins CollaboraOffice 

diff --git a/configure.ac b/configure.ac
index c079302a6df2..0ce51d381e08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2809,7 +2809,7 @@ if test $_os = Darwin; then
 # higher than or equal to the minimum required should be found.
 
 AC_MSG_CHECKING([what macOS SDK to use])
-for _macosx_sdk in ${with_macosx_sdk-10.15 10.14 10.13 10.12}; do
+for _macosx_sdk in ${with_macosx_sdk-11.0 10.15 10.14 10.13 10.12}; do
 MACOSX_SDK_PATH=`xcrun --sdk macosx${_macosx_sdk} --show-sdk-path 2> 
/dev/null`
 if test -d "$MACOSX_SDK_PATH"; then
 with_macosx_sdk="${_macosx_sdk}"
@@ -2841,8 +2841,11 @@ if test $_os = Darwin; then
 10.15)
 MACOSX_SDK_VERSION=101500
 ;;
+11.0)
+MACOSX_SDK_VERSION=11
+;;
 *)
-AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported 
value, supported values are 10.12--15])
+AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported 
value, supported values are 10.12--11.0])
 ;;
 esac
 
@@ -2890,8 +2893,11 @@ if test $_os = Darwin; then
 10.15)
 MAC_OS_X_VERSION_MIN_REQUIRED="101500"
 ;;
+11.0)
+MAC_OS_X_VERSION_MIN_REQUIRED="11"
+;;
 *)
-AC_MSG_ERROR([with-macosx-version-min-required 
$with_macosx_version_min_required is not a supported value, supported values 
are 10.10--15])
+AC_MSG_ERROR([with-macosx-version-min-required 
$with_macosx_version_min_required is not a supported value, supported values 
are 10.10--11.0])
 ;;
 esac
 MAC_OS_X_VERSION_MIN_REQUIRED_DOTS=$with_macosx_version_min_required
@@ -2943,8 +2949,11 @@ if test $_os = Darwin; then
 10.15)
 MAC_OS_X_VERSION_MAX_ALLOWED="101500"
 ;;
+11.0)
+MAC_OS_X_VERSION_MAX_ALLOWED="11"
+;;
 *)
-AC_MSG_ERROR([with-macosx-version-max-allowed 
$with_macosx_version_max_allowed is not a supported value, supported values are 
10.10--15])
+AC_MSG_ERROR([with-macosx-version-max-allowed 
$with_macosx_version_max_allowed is not a supported value, supported values are 
10.10--11.0])
 ;;
 esac
 
___
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.4' - configure.ac

2020-11-13 Thread Tor Lillqvist (via logerrit)
 configure.ac |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 990200dce1381e2788590e58f343283c84c3f8b8
Author: Tor Lillqvist 
AuthorDate: Fri Nov 13 13:39:17 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Fri Nov 13 13:26:22 2020 +0100

Accept iOS SDK 14.2

Change-Id: Icd30133588f3cffb5de41303dc03cb325c20fe83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105788
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 

diff --git a/configure.ac b/configure.ac
index 0ce51d381e08..75f36372e32b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3075,8 +3075,8 @@ dnl 
===
 
 if test $_os = iOS; then
 AC_MSG_CHECKING([what iOS SDK to use])
-current_sdk_ver=14.1
-older_sdk_vers="14.0 13.7 13.6 13.5 13.4 13.2 13.1 13.0 12.4 12.2"
+current_sdk_ver=14.2
+older_sdk_vers="14.1 14.0 13.7 13.6 13.5 13.4 13.2 13.1 13.0 12.4 12.2"
 if test "$enable_ios_simulator" = "yes"; then
 platform=iPhoneSimulator
 versionmin=-mios-simulator-version-min=12.2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Noel (via logerrit)
 vcl/source/gdi/salmisc.cxx |   16 +++-
 1 file changed, 3 insertions(+), 13 deletions(-)

New commits:
commit 811b77e0f63b91eeb05311c724e3e209bff30f68
Author: Noel 
AuthorDate: Thu Nov 12 09:34:23 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 13 12:52:48 2020 +0100

remove unused #ifdef

been this way since
commit 8ab086b6cc054501bfbf7ef6fa509c393691e860
Author: Jens-Heiner Rechtien 
Date:   Mon Sep 18 16:07:07 2000 +
initial import

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

diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 14af546fca67..65ac13656db6 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -41,23 +41,13 @@ while( ( nActY < nHeight1 ) && ( pMapY[ nActY + 1 ] == 
nMapY ) )
 nActY++;   
 \
 }
 
-#define TC_TO_PAL_COLORS4096
+constexpr int TC_TO_PAL_COLORS = 4096;
 
 static tools::Long ImplIndexFromColor( const BitmapColor& rCol )
 {
-#if TC_TO_PAL_COLORS == 4096
-
-return( ( ( static_cast(rCol.GetBlue()) >> 4) << 8 ) |
+return  ( ( static_cast(rCol.GetBlue()) >> 4) << 8 ) |
 ( ( static_cast(rCol.GetGreen()) >> 4 ) << 4 ) |
-( static_cast(rCol.GetRed()) >> 4 ) );
-
-#elif TC_TO_PAL_COLORS == 32768
-
-return( ( ( (tools::Long) rCol.GetBlue() >> 3) << 10 ) |
-( ( (tools::Long) rCol.GetGreen() >> 3 ) << 5 ) |
-( (tools::Long) rCol.GetRed() >> 3 ) );
-
-#endif
+( static_cast(rCol.GetRed()) >> 4 );
 }
 
 static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& 
rDstBuffer,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Gokce Kuler (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf64531.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx  |8 
 2 files changed, 8 insertions(+)

New commits:
commit fc12aeac3d5238607ba67238fe0da2d73b6da8ba
Author: Gokce Kuler 
AuthorDate: Thu Nov 12 14:30:53 2020 +0300
Commit: Gülşah Köse 
CommitDate: Fri Nov 13 12:51:13 2020 +0100

tdf#64531 add test for Word shows the page numbers cropped off

Change-Id: I9787ccc6d57153d15f4a780b988325a3f8546d81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105641
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf64531.docx 
b/sw/qa/extras/ooxmlexport/data/tdf64531.docx
new file mode 100644
index ..ae9d232ac92b
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf64531.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index d7d76898c86a..db2137081b18 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -1276,6 +1276,14 @@ 
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testRelativeAnchorHeightFromTopMarginNoHeade
 assertXPath(pXmlDoc, "//SwAnchoredDrawObject/bounds", "height", "2551");
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf64531,"tdf64531.docx")
+{
+xmlDocUniquePtr pXmlDoc= parseExport("word/document.xml");
+OString sPathToTabs= 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[2]/w:pPr/w:tabs/";
+assertXPath(pXmlDoc, sPathToTabs+"w:tab[1]", "pos","720");
+assertXPath(pXmlDoc, sPathToTabs+"w:tab[2]", "pos","12950");
+}
+
 DECLARE_OOXMLEXPORT_TEST(testVmlShapeTextWordWrap, 
"tdf97618_testVmlShapeTextWordWrap.docx")
 {
 // tdf#97618 The text wrapping of a shape was not handled in a canvas.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Noel (via logerrit)
 include/vcl/BitmapConvolutionMatrixFilter.hxx   |4 +--
 vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx |6 ++---
 vcl/source/bitmap/bitmappaint.cxx   |   24 ++--
 3 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit abd42bdc86904d1b310e8298393c887e0c195499
Author: Noel 
AuthorDate: Thu Nov 12 14:50:16 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 13 12:25:12 2020 +0100

tools::Long->sal_Int32 in vcl filters

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

diff --git a/include/vcl/BitmapConvolutionMatrixFilter.hxx 
b/include/vcl/BitmapConvolutionMatrixFilter.hxx
index 2d787cefe19f..a504ff0eebbe 100644
--- a/include/vcl/BitmapConvolutionMatrixFilter.hxx
+++ b/include/vcl/BitmapConvolutionMatrixFilter.hxx
@@ -20,7 +20,7 @@ class BitmapEx;
 class VCL_DLLPUBLIC BitmapConvolutionMatrixFilter : public BitmapFilter
 {
 public:
-BitmapConvolutionMatrixFilter(const tools::Long (&rMatrix)[9])
+BitmapConvolutionMatrixFilter(const sal_Int32 (&rMatrix)[9])
 : mrMatrix(rMatrix)
 {
 }
@@ -28,7 +28,7 @@ public:
 virtual BitmapEx execute(BitmapEx const& rBitmapEx) const override;
 
 private:
-const tools::Long (&mrMatrix)[9];
+const sal_Int32 (&mrMatrix)[9];
 };
 
 #endif
diff --git a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx 
b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
index b92a0124b458..2d050b5cc117 100644
--- a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
+++ b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
@@ -45,8 +45,8 @@ BitmapEx BitmapConvolutionMatrixFilter::execute(BitmapEx 
const& rBitmapEx) const
 BitmapColor* pRowTmp3 = pColRow3.get();
 BitmapColor* pColor;
 tools::Long nY, nX, i, nSumR, nSumG, nSumB, nMatrixVal, nTmp;
-std::array, 9> aKoeff;
-tools::Long* pTmp;
+std::array, 9> aKoeff;
+sal_Int32* pTmp;
 
 // create LUT of products of matrix value and possible color 
component values
 for (nY = 0; nY < 9; nY++)
@@ -199,7 +199,7 @@ BitmapEx BitmapConvolutionMatrixFilter::execute(BitmapEx 
const& rBitmapEx) const
 return BitmapEx();
 }
 
-const tools::Long g_SharpenMatrix[] = { -1, -1, -1, -1, 16, -1, -1, -1, -1 };
+const sal_Int32 g_SharpenMatrix[] = { -1, -1, -1, -1, 16, -1, -1, -1, -1 };
 
 BitmapSharpenFilter::BitmapSharpenFilter()
 : BitmapConvolutionMatrixFilter(g_SharpenMatrix)
diff --git a/vcl/source/bitmap/bitmappaint.cxx 
b/vcl/source/bitmap/bitmappaint.cxx
index dd9eb1a5999b..49713869069b 100644
--- a/vcl/source/bitmap/bitmappaint.cxx
+++ b/vcl/source/bitmap/bitmappaint.cxx
@@ -926,12 +926,12 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 
 if (pAcc)
 {
-std::unique_ptr pMinR(new tools::Long[nColorCount]);
-std::unique_ptr pMaxR(new tools::Long[nColorCount]);
-std::unique_ptr pMinG(new tools::Long[nColorCount]);
-std::unique_ptr pMaxG(new tools::Long[nColorCount]);
-std::unique_ptr pMinB(new tools::Long[nColorCount]);
-std::unique_ptr pMaxB(new tools::Long[nColorCount]);
+std::unique_ptr pMinR(new sal_Int8[nColorCount]);
+std::unique_ptr pMaxR(new sal_Int8[nColorCount]);
+std::unique_ptr pMinG(new sal_Int8[nColorCount]);
+std::unique_ptr pMaxG(new sal_Int8[nColorCount]);
+std::unique_ptr pMinB(new sal_Int8[nColorCount]);
+std::unique_ptr pMaxB(new sal_Int8[nColorCount]);
 
 if (pTols)
 {
@@ -940,12 +940,12 @@ bool Bitmap::Replace(const Color* pSearchColors, const 
Color* pReplaceColors, sa
 const Color& rCol = pSearchColors[i];
 const sal_uInt8 nTol = pTols[i];
 
-pMinR[i] = MinMax(rCol.GetRed() - nTol, 0, 255);
-pMaxR[i] = MinMax(rCol.GetRed() + nTol, 0, 255);
-pMinG[i] = MinMax(rCol.GetGreen() - nTol, 0, 255);
-pMaxG[i] = MinMax(rCol.GetGreen() + nTol, 0, 255);
-pMinB[i] = MinMax(rCol.GetBlue() - nTol, 0, 255);
-pMaxB[i] = MinMax(rCol.GetBlue() + nTol, 0, 255);
+pMinR[i] = std::clamp(rCol.GetRed() - nTol, 0, 255);
+pMaxR[i] = std::clamp(rCol.GetRed() + nTol, 0, 255);
+pMinG[i] = std::clamp(rCol.GetGreen() - nTol, 0, 255);
+pMaxG[i] = std::clamp(rCol.GetGreen() + nTol, 0, 255);
+pMinB[i] = std::clamp(rCol.GetBlue() - nTol, 0, 255);
+pMaxB[i] = std::clamp(rCol.GetBlue() + nTol, 0, 255);
 }
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa slideshow/test svx/qa vcl/qa writerperfect/qa

2020-11-13 Thread Mike Kaganski (via logerrit)
 sc/qa/unit/helper/qahelper.cxx|4 +--
 sc/qa/unit/ucalc_pivottable.cxx   |8 +++
 slideshow/test/slidetest.cxx  |   16 +++---
 svx/qa/unit/customshapes.cxx  |4 +--
 vcl/qa/cppunit/BitmapFilterTest.cxx   |   28 +-
 vcl/qa/cppunit/GraphicDescriptorTest.cxx  |   12 +--
 vcl/qa/cppunit/GraphicTest.cxx|   20 +-
 vcl/qa/cppunit/complextext.cxx|6 ++---
 vcl/qa/cppunit/fontmetric.cxx |   28 +-
 vcl/qa/cppunit/graphicfilter/filters-test.cxx |4 +--
 vcl/qa/cppunit/jpeg/JpegReaderTest.cxx|   12 +--
 vcl/qa/cppunit/png/PngFilterTest.cxx  |   16 +++---
 writerperfect/qa/unit/WPXSvStreamTest.cxx |6 ++---
 13 files changed, 82 insertions(+), 82 deletions(-)

New commits:
commit f2dfa6bec9895892b58e22682ecdc5865fc249a3
Author: Mike Kaganski 
AuthorDate: Fri Nov 13 09:04:59 2020 +0300
Commit: Mike Kaganski 
CommitDate: Fri Nov 13 11:16:08 2020 +0100

Fix (some of) fallouts from tools::Long change to 64 bit on _WIN64

Change-Id: I297d43c594c5d8c3378e8b7f29ad798e89e4ebaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105776
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index db5efcea77e7..2ba82ae91944 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -189,11 +189,11 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* 
pDoc, sal_Int32 nFormat)
 const ScPatternAttr* pPattern = pDoc->GetPattern(0, 0, 1);
 vcl::Font aFont;
 pPattern->GetFont(aFont,SC_AUTOCOL_RAW);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 10", 200l, 
aFont.GetFontSize().getHeight());
+CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 10", tools::Long(200), 
aFont.GetFontSize().getHeight());
 CPPUNIT_ASSERT_EQUAL_MESSAGE("font color should be black", COL_AUTO, 
aFont.GetColor());
 pPattern = pDoc->GetPattern(0,1,1);
 pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 12", 240l, 
aFont.GetFontSize().getHeight());
+CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 12", tools::Long(240), 
aFont.GetFontSize().getHeight());
 pPattern = pDoc->GetPattern(0,2,1);
 pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be italic", ITALIC_NORMAL, 
aFont.GetItalic());
diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx
index 50c21b672a7b..54a4e85d6dcf 100644
--- a/sc/qa/unit/ucalc_pivottable.cxx
+++ b/sc/qa/unit/ucalc_pivottable.cxx
@@ -776,7 +776,7 @@ void Test::testPivotTableCache()
 ScDPCache aCache(*m_pDoc);
 aCache.InitFromDoc(*m_pDoc, aDataRange);
 tools::Long nDimCount = aCache.GetColumnCount();
-CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension count.", 3L, nDimCount);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension count.", tools::Long(3), 
nDimCount);
 OUString aDimName = aCache.GetDimensionName(0);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension name", OUString("F1"), 
aDimName);
 aDimName = aCache.GetDimensionName(1);
@@ -791,7 +791,7 @@ void Test::testPivotTableCache()
 
 // Dimension 0 - a mix of strings and values.
 tools::Long nMemCount = aCache.GetDimMemberCount(0);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 6L, 
nMemCount);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 
tools::Long(6), nMemCount);
 const ScDPItemData* pItem = aCache.GetItemDataById(0, 0);
 CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::Value &&
@@ -821,7 +821,7 @@ void Test::testPivotTableCache()
 
 // Dimension 1 - duplicate values in source.
 nMemCount = aCache.GetDimMemberCount(1);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 3L, 
nMemCount);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 
tools::Long(3), nMemCount);
 pItem = aCache.GetItemDataById(1, 0);
 CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::String &&
@@ -839,7 +839,7 @@ void Test::testPivotTableCache()
 
 // Dimension 2 - values only.
 nMemCount = aCache.GetDimMemberCount(2);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 6L, 
nMemCount);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 
tools::Long(6), nMemCount);
 pItem = aCache.GetItemDataById(2, 0);
 CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::Value &&
diff --git a/slideshow/test/slidetest.cxx b/slideshow/test/slidetest.cxx
index 469ed059260d..b5e0cd687f56 100644
--- a/slideshow/test/slidetest.cxx
+++ b/s

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

2020-11-13 Thread Tomaž Vajngerl (via logerrit)
Tag 'cp-6.4-12' created by Andras Timar  at 
2020-11-13 10:16 +

cp-6.4-12

Changes since cp-6.4-11-7:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: Changes to 'refs/tags/cp-6.4-12'

2020-11-13 Thread Andras Timar (via logerrit)
Tag 'cp-6.4-12' created by Andras Timar  at 
2020-11-13 10:16 +

cp-6.4-12

Changes since cp-6.4-9-1:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Regina Henschel (via logerrit)
 sc/qa/unit/subsequent_filters-test.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6532bdc0a27eb31dcacf02e3bb1a587270a48b6f
Author: Regina Henschel 
AuthorDate: Fri Nov 13 01:15:04 2020 +0100
Commit: Mike Kaganski 
CommitDate: Fri Nov 13 11:15:51 2020 +0100

Force number constants to tools::Long in asserts

Change-Id: I404b0edb31fb4eb797baf814136b00fd605724eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105775
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 891cc326b907..229d0b3df8fa 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -1069,7 +1069,7 @@ void ScFiltersTest::testBorderODS()
 
 CPPUNIT_ASSERT(pRight);
 CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::SOLID, 
pRight->GetBorderLineStyle());
-CPPUNIT_ASSERT_EQUAL(20L, pRight->GetWidth());
+CPPUNIT_ASSERT_EQUAL(tools::Long(20), pRight->GetWidth());
 
 rDoc.GetBorderLines( 2, 8, 0, &pLeft, &pTop, &pRight, &pBottom );
 
@@ -1078,7 +1078,7 @@ void ScFiltersTest::testBorderODS()
 CPPUNIT_ASSERT(pBottom);
 CPPUNIT_ASSERT(pRight);
 CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::SOLID, 
pRight->GetBorderLineStyle());
-CPPUNIT_ASSERT_EQUAL(5L, pRight->GetWidth());
+CPPUNIT_ASSERT_EQUAL(tools::Long(5), pRight->GetWidth());
 CPPUNIT_ASSERT_EQUAL(COL_BLUE, pRight->GetColor());
 
 xDocSh->DoClose();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-6.4-12'

2020-11-13 Thread Andras Timar (via logerrit)
Tag 'cp-6.4-12' created by Andras Timar  at 
2020-11-13 10:16 +

cp-6.4-12

Changes since cp-6.4-branch-point-11:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/cp-6.4-12'

2020-11-13 Thread Andras Timar (via logerrit)
Tag 'cp-6.4-12' created by Andras Timar  at 
2020-11-13 10:16 +

cp-6.4-12

Changes since cp-6.4-7:
Andras Timar (1):
  more/better suggestions for Spanish

---
 es/es_ANY.aff |3 +++
 es/es_ANY.dic |   20 ++--
 2 files changed, 13 insertions(+), 10 deletions(-)
---
___
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.4' - vcl/source

2020-11-13 Thread Tomaž Vajngerl (via logerrit)
 vcl/source/gdi/pdfobjectcopier.cxx |   19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

New commits:
commit b62725ad8afa6fe9c426f968287b9e3528eb8268
Author: Tomaž Vajngerl 
AuthorDate: Thu Nov 12 22:24:02 2020 +0100
Commit: Andras Timar 
CommitDate: Fri Nov 13 11:08:57 2020 +0100

pdf: Improve dict and array format when copying with PDFObjectCopier

Change-Id: I4fcc4d912d4ce9d7800782b69811f877b85d9857
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105782
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/vcl/source/gdi/pdfobjectcopier.cxx 
b/vcl/source/gdi/pdfobjectcopier.cxx
index 4e5575c25952..0d67fe735561 100644
--- a/vcl/source/gdi/pdfobjectcopier.cxx
+++ b/vcl/source/gdi/pdfobjectcopier.cxx
@@ -100,17 +100,21 @@ sal_Int32 
PDFObjectCopier::copyExternalResource(SvMemoryStream& rDocBuffer,
 if (rObject.GetDictionary())
 {
 aLine.append("<< ");
-
+bool bFirst = true;
 for (auto const& rPair : rObject.GetDictionaryItems())
 {
+if (bFirst)
+bFirst = false;
+else
+aLine.append(" ");
+
 aLine.append("/");
 aLine.append(rPair.first);
 aLine.append(" ");
 copyRecursively(aLine, rPair.second, rDocBuffer, rCopiedResources);
-aLine.append(" ");
 }
 
-aLine.append(">>\n");
+aLine.append(" >>\n");
 }
 
 if (filter::PDFStreamElement* pStream = rObject.GetStream())
@@ -127,10 +131,14 @@ sal_Int32 
PDFObjectCopier::copyExternalResource(SvMemoryStream& rDocBuffer,
 
 const std::vector& rElements = 
pArray->GetElements();
 
+bool bFirst = true;
 for (auto const& pElement : rElements)
 {
+if (bFirst)
+bFirst = false;
+else
+aLine.append(" ");
 copyRecursively(aLine, pElement, rDocBuffer, rCopiedResources);
-aLine.append(" ");
 }
 aLine.append("]\n");
 }
@@ -138,8 +146,7 @@ sal_Int32 
PDFObjectCopier::copyExternalResource(SvMemoryStream& rDocBuffer,
 // If the object has a number element outside a dictionary or array, copy 
that.
 if (filter::PDFNumberElement* pNumber = rObject.GetNumberElement())
 {
-aLine.append(static_cast(pObjectStream->GetData()) + 
pNumber->GetLocation(),
- pNumber->GetLength());
+pNumber->writeString(aLine);
 aLine.append("\n");
 }
 
___
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.4' - vcl/CppunitTest_vcl_pdfium_library_test.mk vcl/qa

2020-11-13 Thread Tomaž Vajngerl (via logerrit)
 vcl/CppunitTest_vcl_pdfium_library_test.mk |1 
 vcl/qa/cppunit/PDFDocumentTest.cxx |  588 +
 vcl/qa/cppunit/data/basic.pdf  |   71 +++
 vcl/qa/cppunit/data/basicSource.pdf|   60 ++
 4 files changed, 720 insertions(+)

New commits:
commit 48b11946136b86ca6048f1e57a3df92cf09bfde6
Author: Tomaž Vajngerl 
AuthorDate: Mon Nov 9 19:19:19 2020 +0100
Commit: Andras Timar 
CommitDate: Fri Nov 13 11:08:38 2020 +0100

pdf: test PDFDocument parsing

basic.pdf is custom created so it covers all different parsing
use-cases.

Change-Id: I6eefa55b1cec5bf7eb91518d6a2df2cb48746dcc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105781
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/vcl/CppunitTest_vcl_pdfium_library_test.mk 
b/vcl/CppunitTest_vcl_pdfium_library_test.mk
index 0f4a480c8254..37acb1125506 100644
--- a/vcl/CppunitTest_vcl_pdfium_library_test.mk
+++ b/vcl/CppunitTest_vcl_pdfium_library_test.mk
@@ -11,6 +11,7 @@ $(eval $(call 
gb_CppunitTest_CppunitTest,vcl_pdfium_library_test))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,vcl_pdfium_library_test, \
 vcl/qa/cppunit/PDFiumLibraryTest \
+vcl/qa/cppunit/PDFDocumentTest \
 ))
 
 $(eval $(call gb_CppunitTest_use_sdk_api,vcl_pdfium_library_test))
diff --git a/vcl/qa/cppunit/PDFDocumentTest.cxx 
b/vcl/qa/cppunit/PDFDocumentTest.cxx
new file mode 100644
index ..66de7dfc77d4
--- /dev/null
+++ b/vcl/qa/cppunit/PDFDocumentTest.cxx
@@ -0,0 +1,588 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+
+#include 
+#include 
+
+#include 
+
+class PDFDocumentTest : public test::BootstrapFixture, public 
unotest::MacrosTest
+{
+public:
+PDFDocumentTest() = default;
+};
+
+char const DATA_DIRECTORY[] = "/vcl/qa/cppunit/data/";
+
+CPPUNIT_TEST_FIXTURE(PDFDocumentTest, testParseBasicPDF)
+{
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "basic.pdf";
+vcl::filter::PDFDocument aDocument;
+SvFileStream aStream(aURL, StreamMode::READ);
+CPPUNIT_ASSERT(aDocument.Read(aStream));
+
+std::vector aPages = aDocument.GetPages();
+CPPUNIT_ASSERT_EQUAL(size_t(1), aPages.size());
+
+vcl::filter::PDFObjectElement* pResources = 
aPages[0]->LookupObject("Resources");
+CPPUNIT_ASSERT(pResources);
+
+vcl::filter::PDFObjectElement* pTest = pResources->LookupObject("Test");
+CPPUNIT_ASSERT(pTest);
+
+vcl::filter::PDFObjectElement* pTestArray1 = 
pTest->LookupObject("TestArray1");
+CPPUNIT_ASSERT(pTestArray1);
+{
+CPPUNIT_ASSERT_EQUAL(size_t(5), 
pTestArray1->GetArray()->GetElements().size());
+}
+
+vcl::filter::PDFObjectElement* pTestArray2 = 
pTest->LookupObject("TestArray2");
+CPPUNIT_ASSERT(pTestArray2);
+{
+CPPUNIT_ASSERT_EQUAL(size_t(2), 
pTestArray2->GetArray()->GetElements().size());
+}
+
+vcl::filter::PDFObjectElement* pTestDictionary = 
pTest->LookupObject("TestDictionary");
+{
+sal_uInt64 nOffset = pTestDictionary->GetDictionaryOffset();
+sal_uInt64 nLength = pTestDictionary->GetDictionaryLength();
+
+aStream.Seek(nOffset);
+std::vector aBuffer(nLength + 1, 0);
+aStream.ReadBytes(aBuffer.data(), nLength);
+OString aString(aBuffer.data());
+
+CPPUNIT_ASSERT_EQUAL(
+OString("/TestReference 7 0 R/TestNumber "
+
"123/TestName/SomeName/TestDictionary<>/TestArray[1 2 3]"),
+aString);
+}
+
+CPPUNIT_ASSERT(pTestDictionary);
+{
+auto const& rItems = pTestDictionary->GetDictionaryItems();
+CPPUNIT_ASSERT_EQUAL(size_t(5), rItems.size());
+auto* pReference = dynamic_cast(
+pTestDictionary->Lookup("TestReference"));
+CPPUNIT_ASSERT(pReference);
+CPPUNIT_ASSERT_EQUAL(7, pReference->GetObjectValue());
+
+auto* pNumber
+= 
dynamic_cast(pTestDictionary->Lookup("TestNumber"));
+CPPUNIT_ASSERT(pNumber);
+CPPUNIT_ASSERT_EQUAL(123.0, pNumber->GetValue());
+
+auto* pName
+= 
dynamic_cast(pTestDictionary->Lookup("TestName"));
+CPPUNIT_ASSERT(pName);
+CPPUNIT_ASSERT_EQUAL(OString("SomeName"), pName->GetValue());
+
+auto* pDictionary = dynamic_cast(
+pTestDictionary->Lookup("TestDictionary"));
+CPPUNIT_ASSERT(pDictionary);
+
+auto* pArray
+= 
dynamic_cast(pTestDictionary->Lookup("TestArray"));
+CPPUNIT_ASSERT(pArray);
+
+// Check offsets and lengths
+{
+sal_uInt64 nOffset = 
pTestDictionary->GetDictionary()-

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/inc vcl/source

2020-11-13 Thread Tomaž Vajngerl (via logerrit)
 vcl/inc/pdf/objectcopier.hxx   |5 +
 vcl/source/gdi/pdfobjectcopier.cxx |  162 +
 2 files changed, 63 insertions(+), 104 deletions(-)

New commits:
commit e979b4ff044a0325157f24c8bb235dd4df78c9ba
Author: Tomaž Vajngerl 
AuthorDate: Mon Nov 9 19:16:27 2020 +0100
Commit: Andras Timar 
CommitDate: Fri Nov 13 11:08:00 2020 +0100

pdf: improve PDFObjectCopier, copy arrays/dicts recursively

Change-Id: Ia2f8d86ae012b530f3e9c39842bb75ef8ca27718
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105779
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/vcl/inc/pdf/objectcopier.hxx b/vcl/inc/pdf/objectcopier.hxx
index 487d03186682..50c123eeaf42 100644
--- a/vcl/inc/pdf/objectcopier.hxx
+++ b/vcl/inc/pdf/objectcopier.hxx
@@ -25,6 +25,7 @@ class PDFObjectContainer;
 namespace filter
 {
 class PDFObjectElement;
+class PDFElement;
 }
 
 /// Copies objects from one PDF file into an other one.
@@ -32,6 +33,10 @@ class VCL_DLLPUBLIC PDFObjectCopier
 {
 PDFObjectContainer& m_rContainer;
 
+void copyRecursively(OStringBuffer& rLine, filter::PDFElement* 
pInputElement,
+ SvMemoryStream& rDocBuffer,
+ std::map& rCopiedResources);
+
 public:
 PDFObjectCopier(PDFObjectContainer& rContainer);
 
diff --git a/vcl/source/gdi/pdfobjectcopier.cxx 
b/vcl/source/gdi/pdfobjectcopier.cxx
index 129a4c8bda35..4e5575c25952 100644
--- a/vcl/source/gdi/pdfobjectcopier.cxx
+++ b/vcl/source/gdi/pdfobjectcopier.cxx
@@ -26,6 +26,52 @@ PDFObjectCopier::PDFObjectCopier(PDFObjectContainer& 
rContainer)
 {
 }
 
+void PDFObjectCopier::copyRecursively(OStringBuffer& rLine, 
filter::PDFElement* pInputElement,
+  SvMemoryStream& rDocBuffer,
+  std::map& 
rCopiedResources)
+{
+if (auto pReference = 
dynamic_cast(pInputElement))
+{
+filter::PDFObjectElement* pReferenced = pReference->LookupObject();
+if (pReferenced)
+{
+// Copy the referenced object.
+sal_Int32 nRef = copyExternalResource(rDocBuffer, *pReferenced, 
rCopiedResources);
+
+// Write the updated reference.
+rLine.append(nRef);
+rLine.append(" 0 R");
+}
+}
+else if (auto pInputArray = 
dynamic_cast(pInputElement))
+{
+rLine.append("[ ");
+for (auto pElement : pInputArray->GetElements())
+{
+copyRecursively(rLine, pElement, rDocBuffer, rCopiedResources);
+rLine.append(" ");
+}
+rLine.append("] ");
+}
+else if (auto pInputDictionary = 
dynamic_cast(pInputElement))
+{
+rLine.append("<< ");
+for (auto pPair : pInputDictionary->GetItems())
+{
+rLine.append("/");
+rLine.append(pPair.first);
+rLine.append(" ");
+copyRecursively(rLine, pPair.second, rDocBuffer, rCopiedResources);
+rLine.append(" ");
+}
+rLine.append(">> ");
+}
+else
+{
+pInputElement->writeString(rLine);
+}
+}
+
 sal_Int32 PDFObjectCopier::copyExternalResource(SvMemoryStream& rDocBuffer,
 filter::PDFObjectElement& 
rObject,
 std::map& rCopiedResources)
@@ -50,63 +96,20 @@ sal_Int32 
PDFObjectCopier::copyExternalResource(SvMemoryStream& rDocBuffer,
 OStringBuffer aLine;
 aLine.append(nObject);
 aLine.append(" 0 obj\n");
+
 if (rObject.GetDictionary())
 {
-aLine.append("<<");
+aLine.append("<< ");
 
-// Complex case: can't copy the dictionary byte array as is, as it may 
contain references.
-bool bDone = false;
-sal_uInt64 nCopyStart = 0;
-for (auto pReference : rObject.GetDictionaryReferences())
+for (auto const& rPair : rObject.GetDictionaryItems())
 {
-if (pReference)
-{
-filter::PDFObjectElement* pReferenced = 
pReference->LookupObject();
-if (pReferenced)
-{
-// Copy the referenced object.
-sal_Int32 nRef
-= copyExternalResource(rDocBuffer, *pReferenced, 
rCopiedResources);
-
-sal_uInt64 nReferenceStart = 
pReference->GetObjectElement().GetLocation();
-sal_uInt64 nReferenceEnd = pReference->GetOffset();
-sal_uInt64 nOffset = 0;
-if (nCopyStart == 0)
-// Dict start -> reference start.
-nOffset = rObject.GetDictionaryOffset();
-else
-// Previous reference end -> reference start.
-nOffset = nCopyStart;
-aLine.append(static_cast(pObjectStream->GetData()) + nOffset,
-  

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/vcl vcl/source

2020-11-13 Thread Tomaž Vajngerl (via logerrit)
 include/vcl/filter/pdfdocument.hxx |  141 +
 vcl/source/filter/ipdf/pdfdocument.cxx |  834 +
 2 files changed, 587 insertions(+), 388 deletions(-)

New commits:
commit 3dec064d663decbcd5768d2abf81e848df621808
Author: Tomaž Vajngerl 
AuthorDate: Tue Nov 10 09:43:20 2020 +0100
Commit: Andras Timar 
CommitDate: Fri Nov 13 11:08:19 2020 +0100

pdf: move parsing into it's own class, rewrite the parser

This moves the parser into it's own class as it is not only
limited to dictionaries.

The parser has been rewritten to handle the array elements
correctly and properly. Previous array elements were filled during
the tokenization step, which is wrong, and the arrays weren't
parsed recursively, making the parsing incomplete in some cases.
This rewrite handles arrays similar to dictionaries and thus
allows them to be parsed properly.

All the sub-classes of PDFElement have been moved into the
header file.

Another change is also to not have a separate input dictionary
for the root object and instead always look into the dictionary
element that should be available instead.

+ many other smaller changes

Change-Id: I7fcf94760967bbd1474a0b432ba3a4e3c9b7cabe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105780
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/include/vcl/filter/pdfdocument.hxx 
b/include/vcl/filter/pdfdocument.hxx
index b1cf34856a95..bd88d56e674d 100644
--- a/include/vcl/filter/pdfdocument.hxx
+++ b/include/vcl/filter/pdfdocument.hxx
@@ -91,7 +91,6 @@ class VCL_DLLPUBLIC PDFObjectElement final : public PDFElement
 PDFDocument& m_rDoc;
 double m_fObjectValue;
 double m_fGenerationValue;
-std::map m_aDictionary;
 /// If set, the object contains this number element (outside any 
dictionary/array).
 PDFNumberElement* m_pNumberElement;
 /// Position after the '<<' token.
@@ -117,6 +116,8 @@ class VCL_DLLPUBLIC PDFObjectElement final : public 
PDFElement
 /// nested dictionaries.
 std::vector m_aDictionaryReferences;
 
+bool m_bParsed;
+
 void parseIfNecessary();
 
 public:
@@ -145,7 +146,7 @@ public:
 sal_uInt64 GetArrayOffset() const;
 void SetArrayLength(sal_uInt64 nArrayLength);
 sal_uInt64 GetArrayLength() const;
-PDFArrayElement* GetArray() const;
+PDFArrayElement* GetArray();
 /// Parse objects stored in this object stream.
 void ParseStoredObjects();
 std::vector>& GetStoredElements();
@@ -168,6 +169,7 @@ public:
 bool Read(SvStream& rStream) override;
 void PushBack(PDFElement* pElement);
 const std::vector& GetElements() const;
+PDFElement* GetElement(size_t nIndex) const { return m_aElements[nIndex]; }
 
 void writeString(OStringBuffer& rBuffer) override
 {
@@ -246,9 +248,10 @@ class VCL_DLLPUBLIC PDFNameElement final : public 
PDFElement
 public:
 PDFNameElement();
 bool Read(SvStream& rStream) override;
+void SetValue(const OString& rValue) { m_aValue = rValue; }
 const OString& GetValue() const;
 sal_uInt64 GetLocation() const;
-static sal_uInt64 GetLength() { return 0; }
+sal_uInt64 GetLength() { return m_aValue.getLength(); }
 
 void writeString(OStringBuffer& rBuffer) override
 {
@@ -273,8 +276,6 @@ public:
 PDFDictionaryElement();
 bool Read(SvStream& rStream) override;
 
-static size_t Parse(const std::vector>& 
rElements,
-PDFElement* pThis, std::map& 
rDictionary);
 static PDFElement* Lookup(const std::map& 
rDictionary,
   const OString& rKey);
 void SetKeyOffset(const OString& rKey, sal_uInt64 nOffset);
@@ -286,6 +287,11 @@ public:
 PDFObjectElement* LookupObject(const OString& rDictionaryKey);
 /// Looks up an element which is contained in this dictionary.
 PDFElement* LookupElement(const OString& rDictionaryKey);
+sal_uInt64 GetLocation() const { return m_nLocation; }
+void insert(OString const& rKey, PDFElement* pPDFElement)
+{
+m_aItems.emplace(rKey, pPDFElement);
+}
 
 void writeString(OStringBuffer& rBuffer) override
 {
@@ -402,12 +408,100 @@ public:
 PDFNumberElement();
 bool Read(SvStream& rStream) override;
 double GetValue() const;
+void SetValue(double fValue) { m_fValue = fValue; }
+
 sal_uInt64 GetLocation() const;
 sal_uInt64 GetLength() const;
 
 void writeString(OStringBuffer& rBuffer) override { 
rBuffer.append(m_fValue); }
 };
 
+/// A one-liner comment.
+class VCL_DLLPUBLIC PDFCommentElement : public PDFElement
+{
+PDFDocument& m_rDoc;
+OString m_aComment;
+
+public:
+explicit PDFCommentElement(PDFDocument& rDoc);
+bool Read(SvStream& rStream) override;
+void writeString(OStringBuffer& /*rBuffer*/) override {}
+};
+
+/// End of a dictionary: '>>'.
+class VCL_DLLPUBLIC PDFEndDictionaryElement : 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/vcl vcl/source

2020-11-13 Thread Tomaž Vajngerl (via logerrit)
 include/vcl/filter/pdfdocument.hxx |   67 +
 vcl/source/filter/ipdf/pdfdocument.cxx |   28 -
 2 files changed, 92 insertions(+), 3 deletions(-)

New commits:
commit 3262db463ce81722c6c4f10ec4bdecaa5e36011c
Author: Tomaž Vajngerl 
AuthorDate: Sat Nov 7 16:18:00 2020 +0100
Commit: Andras Timar 
CommitDate: Fri Nov 13 11:07:41 2020 +0100

pdf: add writeString for pdf elements for writing element content

This adds a writeString virtual method to PDFElement and
subclasses and implemnts them for each element. This is used to
write the PDF object hierarchy back to a string buffer.

Change-Id: I484c9cebd8ab9149029b925a47e68b6a4fdf9be1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105492
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit fbf14b4e48c7677d5acf9a0ab91a3dc8d4ffc6fd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105778
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/include/vcl/filter/pdfdocument.hxx 
b/include/vcl/filter/pdfdocument.hxx
index 5ab6c2044ac8..b1cf34856a95 100644
--- a/include/vcl/filter/pdfdocument.hxx
+++ b/include/vcl/filter/pdfdocument.hxx
@@ -17,6 +17,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -79,6 +80,8 @@ public:
 bool alreadyVisiting() const { return m_bVisiting; }
 void setParsing(bool bParsing) { m_bParsing = bParsing; }
 bool alreadyParsing() const { return m_bParsing; }
+
+virtual void writeString(OStringBuffer& rBuffer) = 0;
 };
 
 /// Indirect object: something with a unique ID.
@@ -149,6 +152,8 @@ public:
 SvMemoryStream* GetStreamBuffer() const;
 void SetStreamBuffer(std::unique_ptr& pStreamBuffer);
 PDFDocument& GetDocument();
+
+void writeString(OStringBuffer& /*rBuffer*/) override { assert(false && 
"not implemented"); }
 };
 
 /// Array object: a list.
@@ -163,6 +168,17 @@ public:
 bool Read(SvStream& rStream) override;
 void PushBack(PDFElement* pElement);
 const std::vector& GetElements() const;
+
+void writeString(OStringBuffer& rBuffer) override
+{
+rBuffer.append("[ ");
+for (auto& rElement : m_aElements)
+{
+rElement->writeString(rBuffer);
+rBuffer.append(" ");
+}
+rBuffer.append("]");
+}
 };
 
 /// Reference object: something with a unique ID.
@@ -188,6 +204,14 @@ public:
 int GetGenerationValue() const;
 sal_uInt64 GetOffset() const;
 PDFNumberElement& GetObjectElement() const;
+
+void writeString(OStringBuffer& rBuffer) override
+{
+rBuffer.append(sal_Int32(GetObjectValue()));
+rBuffer.append(' ');
+rBuffer.append(sal_Int32(GetGenerationValue()));
+rBuffer.append(" R");
+}
 };
 
 /// Stream object: a byte array with a known length.
@@ -203,6 +227,13 @@ public:
 bool Read(SvStream& rStream) override;
 sal_uInt64 GetOffset() const;
 SvMemoryStream& GetMemory();
+
+void writeString(OStringBuffer& rBuffer) override
+{
+rBuffer.append("stream\n");
+rBuffer.append(static_cast(m_aMemory.GetData()), 
m_aMemory.GetSize());
+rBuffer.append("\nendstream\n");
+}
 };
 
 /// Name object: a key string.
@@ -218,6 +249,12 @@ public:
 const OString& GetValue() const;
 sal_uInt64 GetLocation() const;
 static sal_uInt64 GetLength() { return 0; }
+
+void writeString(OStringBuffer& rBuffer) override
+{
+rBuffer.append("/");
+rBuffer.append(m_aValue);
+}
 };
 
 /// Dictionary object: a set key-value pairs.
@@ -249,6 +286,20 @@ public:
 PDFObjectElement* LookupObject(const OString& rDictionaryKey);
 /// Looks up an element which is contained in this dictionary.
 PDFElement* LookupElement(const OString& rDictionaryKey);
+
+void writeString(OStringBuffer& rBuffer) override
+{
+rBuffer.append("<< ");
+for (auto& rPair : m_aItems)
+{
+rBuffer.append("/");
+rBuffer.append(rPair.first);
+rBuffer.append(" ");
+rPair.second->writeString(rBuffer);
+rBuffer.append(" ");
+}
+rBuffer.append(">>");
+}
 };
 
 enum class TokenizeMode
@@ -312,6 +363,13 @@ class VCL_DLLPUBLIC PDFHexStringElement final : public 
PDFElement
 public:
 bool Read(SvStream& rStream) override;
 const OString& GetValue() const;
+
+void writeString(OStringBuffer& rBuffer) override
+{
+rBuffer.append("<");
+rBuffer.append(m_aValue);
+rBuffer.append(">");
+}
 };
 
 /// Literal string: in (asdf) form.
@@ -322,6 +380,13 @@ class VCL_DLLPUBLIC PDFLiteralStringElement final : public 
PDFElement
 public:
 bool Read(SvStream& rStream) override;
 const OString& GetValue() const;
+
+void writeString(OStringBuffer& rBuffer) override
+{
+rBuffer.append("(");
+rBuffer.append(m_aValue);
+

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

2020-11-13 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |   60 +++
 1 file changed, 44 insertions(+), 16 deletions(-)

New commits:
commit 85622e6cf676e507dea8845b5637f3a1df327490
Author: Caolán McNamara 
AuthorDate: Thu Nov 12 12:35:07 2020 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 13 10:08:14 2020 +0100

tdf#138047 wait until map to disable the parent SalFrame tab-cycling

because the original parent is changed before the popup appears
and the wrong SalFrame is affected

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 23bd3f34d205..3105a4e3056b 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -16497,6 +16497,47 @@ private:
 GtkInstanceBuilder* pThis = 
static_cast(user_data);
 pThis->postprocess_widget(GTK_WIDGET(pObject));
 }
+
+void DisallowCycleFocusOut()
+{
+assert(!m_bAllowCycleFocusOut); // we only expect this to be called 
when this holds
+
+GtkWidget* pTopLevel = gtk_widget_get_toplevel(m_pParentWidget);
+assert(pTopLevel);
+GtkSalFrame* pFrame = GtkSalFrame::getFromWindow(pTopLevel);
+assert(pFrame);
+// unhook handler and let gtk cycle its own way through this widget's
+// children because it has no non-gtk siblings
+pFrame->DisallowCycleFocusOut();
+}
+
+static void signalMap(GtkWidget*, gpointer user_data)
+{
+GtkInstanceBuilder* pThis = 
static_cast(user_data);
+// tdf#138047 wait until map to do this because the final SalFrame may
+// not be the same as at ctor time
+pThis->DisallowCycleFocusOut();
+}
+
+void AllowCycleFocusOut()
+{
+assert(!m_bAllowCycleFocusOut); // we only expect this to be called 
when this holds
+
+GtkWidget* pTopLevel = gtk_widget_get_toplevel(m_pParentWidget);
+assert(pTopLevel);
+GtkSalFrame* pFrame = GtkSalFrame::getFromWindow(pTopLevel);
+assert(pFrame);
+// rehook handler and let vcl cycle its own way through this widget's
+// children
+pFrame->AllowCycleFocusOut();
+}
+
+static void signalUnmap(GtkWidget*, gpointer user_data)
+{
+GtkInstanceBuilder* pThis = 
static_cast(user_data);
+pThis->AllowCycleFocusOut();
+}
+
 public:
 GtkInstanceBuilder(GtkWidget* pParent, const OUString& rUIRoot, const 
OUString& rUIFile,
SystemChildWindow* pInterimGlue, bool 
bAllowCycleFocusOut)
@@ -16540,13 +16581,8 @@ public:
 
 if (!m_bAllowCycleFocusOut)
 {
-GtkWidget* pTopLevel = 
gtk_widget_get_toplevel(m_pParentWidget);
-assert(pTopLevel);
-GtkSalFrame* pFrame = GtkSalFrame::getFromWindow(pTopLevel);
-assert(pFrame);
-// unhook handler and let gtk cycle its own way through this 
widget's
-// children because it has no non-gtk siblings
-pFrame->DisallowCycleFocusOut();
+g_signal_connect(G_OBJECT(m_pParentWidget), "map", 
G_CALLBACK(signalMap), this);
+g_signal_connect(G_OBJECT(m_pParentWidget), "unmap", 
G_CALLBACK(signalUnmap), this);
 }
 }
 }
@@ -16610,15 +16646,7 @@ public:
 g_object_unref(m_pBuilder);
 
 if (m_xInterimGlue && !m_bAllowCycleFocusOut)
-{
-GtkWidget* pTopLevel = gtk_widget_get_toplevel(m_pParentWidget);
-assert(pTopLevel);
-GtkSalFrame* pFrame = GtkSalFrame::getFromWindow(pTopLevel);
-assert(pFrame);
-// rehook handler and let vcl cycle its own way through this 
widget's
-// children
-pFrame->AllowCycleFocusOut();
-}
+AllowCycleFocusOut();
 
 m_xInterimGlue.disposeAndClear();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/border.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 88a10c151a373d5ca2b48bf8c18b3a36b6885961
Author: Caolán McNamara 
AuthorDate: Thu Nov 12 11:56:31 2020 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 13 09:42:37 2020 +0100

tdf#138156 diagonal borders always set even if in don't care mode

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

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index c60e2a9aba1d..1c39571cccf8 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -885,7 +885,8 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* rCoreAttrs )
 
 SfxItemPool* pPool = rCoreAttrs->GetPool();
 
-if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::TLBR))
+if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::TLBR) &&
+m_aFrameSel.GetFrameBorderState(svx::FrameBorderType::TLBR) != 
svx::FrameBorderState::DontCare)
 {
 if (const SfxPoolItem* pOldItem = GetOldItem(*rCoreAttrs, 
SID_ATTR_BORDER_DIAG_TLBR))
 {
@@ -896,7 +897,8 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* rCoreAttrs )
 }
 }
 
-if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::BLTR))
+if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::BLTR) &&
+m_aFrameSel.GetFrameBorderState(svx::FrameBorderType::BLTR) != 
svx::FrameBorderState::DontCare)
 {
 if (const SfxPoolItem* pOldItem = GetOldItem(*rCoreAttrs, 
SID_ATTR_BORDER_DIAG_BLTR))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Szymon Kłos (via logerrit)
 cui/source/dialogs/splitcelldlg.cxx  |   35 ++---
 cui/source/factory/dlgfact.cxx   |2 
 cui/source/inc/splitcelldlg.hxx  |   20 -
 svx/source/table/tablecontroller.cxx |   71 +--
 sw/source/uibase/shells/tabsh.cxx|   33 +---
 5 files changed, 104 insertions(+), 57 deletions(-)

New commits:
commit 817a06d857bff5be35f8eb7bf830b75871556bc5
Author: Szymon Kłos 
AuthorDate: Wed Sep 30 10:49:12 2020 +0200
Commit: Szymon Kłos 
CommitDate: Fri Nov 13 09:38:36 2020 +0100

Make Split Table Cell dialog async

Change-Id: I4efbb24f721aa50cc4dbbe78ae1e7e6087f8c876
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103670
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105594
Tested-by: Jenkins

diff --git a/cui/source/dialogs/splitcelldlg.cxx 
b/cui/source/dialogs/splitcelldlg.cxx
index 58d6b7e4f8a0..f58b8cc0ece5 100644
--- a/cui/source/dialogs/splitcelldlg.cxx
+++ b/cui/source/dialogs/splitcelldlg.cxx
@@ -74,15 +74,40 @@ tools::Long SvxSplitTableDlg::GetCount() const
 return m_xCountEdit->get_value();
 }
 
-short SvxSplitTableDlg::Execute()
-{
-return run();
-}
-
 void SvxSplitTableDlg::SetSplitVerticalByDefault()
 {
 if( mnMaxVertical >= 2 )
 m_xVertBox->set_active(true); // tdf#60242
 }
 
+bool SvxAbstractSplitTableDialog_Impl::IsHorizontal() const
+{
+return m_xDlg->IsHorizontal();
+}
+
+bool SvxAbstractSplitTableDialog_Impl::IsProportional() const
+{
+return m_xDlg->IsProportional();
+}
+
+tools::Long SvxAbstractSplitTableDialog_Impl::GetCount() const
+{
+return m_xDlg->GetCount();
+}
+
+void SvxAbstractSplitTableDialog_Impl::SetSplitVerticalByDefault()
+{
+m_xDlg->SetSplitVerticalByDefault();
+}
+
+short SvxAbstractSplitTableDialog_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
+bool SvxAbstractSplitTableDialog_Impl::StartExecuteAsync(AsyncContext& 
rContext)
+{
+return weld::DialogController::runAsync(m_xDlg, rContext.maEndDialogFn);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index ea2675694f07..e43b027602c4 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1602,7 +1602,7 @@ VclPtr 
AbstractDialogFactory_Impl::CreateSvxFormatCellsDia
 
 VclPtr 
AbstractDialogFactory_Impl::CreateSvxSplitTableDialog(weld::Window* pParent, 
bool bIsTableVertical, tools::Long nMaxVertical)
 {
-return VclPtr::Create( pParent, bIsTableVertical, 
nMaxVertical, 99 );
+return VclPtr::Create( 
std::make_shared(pParent, bIsTableVertical, nMaxVertical, 99 
));
 }
 
 std::shared_ptr 
AbstractDialogFactory_Impl::CreateSvxNewTableDialog(weld::Window* pParent)
diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx
index 88b1de85c9a7..5085c1938917 100644
--- a/cui/source/inc/splitcelldlg.hxx
+++ b/cui/source/inc/splitcelldlg.hxx
@@ -21,7 +21,7 @@
 #include 
 #include 
 
-class SvxSplitTableDlg : public SvxAbstractSplitTableDialog, public 
weld::GenericDialogController
+class SvxSplitTableDlg : public weld::GenericDialogController
 {
 private:
 std::unique_ptr m_xCountEdit;
@@ -37,12 +37,28 @@ public:
 
 DECL_LINK(ClickHdl, weld::Button&, void);
 
+virtual bool IsHorizontal() const;
+virtual bool IsProportional() const;
+virtual tools::Long GetCount() const;
+
+virtual void SetSplitVerticalByDefault();
+};
+
+class SvxAbstractSplitTableDialog_Impl : public SvxAbstractSplitTableDialog
+{
+std::shared_ptr m_xDlg;
+
+public:
+SvxAbstractSplitTableDialog_Impl(std::shared_ptr pDlg) : 
m_xDlg(std::move(pDlg)) {}
+
 virtual bool IsHorizontal() const override;
 virtual bool IsProportional() const override;
 virtual tools::Long GetCount() const override;
 
-virtual short Execute() override;
 virtual void SetSplitVerticalByDefault() override;
+
+virtual short Execute() override;
+virtual bool StartExecuteAsync(AsyncContext& rContext) override;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index c30f71201277..ee40835ec5d8 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -1284,52 +1284,53 @@ void SvxTableController::SplitMarkedCells(const 
SfxRequest& rReq)
 return;
 
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-ScopedVclPtr 
xDlg(pFact->CreateSvxSplitTableDialog(rReq.GetFrameWeld(), false, 99));
+VclPtr 
xDlg(pFact->CreateSvxSplitTableDialog(rReq.GetFrameWeld(), false, 99));
 
-if( !xDlg->Execute() )
-return;
+xDlg->StartExecuteAsync([xDlg, this](int) {
+const sal_Int32 nCount = xDlg->GetCount() - 1;
 
-const sal_Int32 nCount = xDlg->GetCount() - 1;
+if( nCount < 1 )
+ret