[Libreoffice-commits] core.git: Makefile.in Repository.mk sw/source vcl/Executable_docxfuzzer.mk vcl/Module_vcl.mk vcl/workben

2017-11-28 Thread Caolán McNamara
 Makefile.in |2 -
 Repository.mk   |1 
 sw/source/filter/xml/xmlimp.cxx |3 ++
 vcl/Executable_docxfuzzer.mk|   49 
 vcl/Module_vcl.mk   |1 
 vcl/workben/docxfuzzer.cxx  |   33 ++
 6 files changed, 88 insertions(+), 1 deletion(-)

New commits:
commit 6c9562f04fd45504f1a8684d86bdccb20d2c6c5b
Author: Caolán McNamara 
Date:   Fri Nov 24 09:10:46 2017 +

add docx fuzzer

Change-Id: Ib9a3d8a97fbb6281e8ac3ac2cf6c52cf6819304d
Reviewed-on: https://gerrit.libreoffice.org/45216
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/Makefile.in b/Makefile.in
index afaa9085cbad..556a35921360 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -475,7 +475,7 @@ $(foreach ide,\
 eclipsecdt,\
 $(eval $(call gb_Top_GbuildToIdeIntegration,$(ide
 
-fuzzers: Library_sal Library_salhelper Library_reg Library_store 
Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper 
Library_comphelper StaticLibrary_ulingu StaticLibrary_findsofficepath 
Library_tl Library_basegfx Library_canvastools Library_cppcanvas 
Library_dbtools Library_deploymentmisc Library_deploymentmisc Library_editeng 
Library_fwe Library_fwi Library_i18nutil Library_localebe1 Library_sax 
Library_sofficeapp Library_ucbhelper Library_opencl Rdb_services udkapi offapi 
Library_clew Library_gie Library_icg Library_reflection Library_invocadapt 
Library_bootstrap Library_introspection Library_stocservices Library_xmlreader 
Library_gcc3_uno instsetoo_native more_fonts StaticLibrary_boost_locale 
StaticLibrary_fuzzerstubs StaticLibrary_fuzzer_core StaticLibrary_fuzzer_calc 
StaticLibrary_fuzzer_draw StaticLibrary_fuzzer_writer Library_forui 
Library_binaryurp Library_io Library_invocation Library_namingservice 
Library_proxyfac Library_uuresolver Module_ure Exe
 cutable_wmffuzzer Executable_jpgfuzzer Executable_giffuzzer 
Executable_xbmfuzzer Executable_xpmfuzzer Executable_pngfuzzer 
Executable_bmpfuzzer Executable_svmfuzzer Executable_pcdfuzzer 
Executable_dxffuzzer Executable_metfuzzer Executable_ppmfuzzer 
Executable_psdfuzzer Executable_epsfuzzer Executable_pctfuzzer 
Executable_pcxfuzzer Executable_rasfuzzer Executable_tgafuzzer 
Executable_tiffuzzer Executable_hwpfuzzer Executable_602fuzzer 
Executable_lwpfuzzer Executable_olefuzzer Executable_pptfuzzer 
Executable_rtffuzzer Executable_cgmfuzzer Executable_ww2fuzzer 
Executable_ww6fuzzer Executable_ww8fuzzer Executable_qpwfuzzer 
Executable_slkfuzzer Executable_fodtfuzzer Executable_fodsfuzzer 
Executable_fodpfuzzer Executable_xlsfuzzer Executable_scrtffuzzer 
Executable_wksfuzzer Executable_diffuzzer
+fuzzers: Library_sal Library_salhelper Library_reg Library_store 
Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper 
Library_comphelper StaticLibrary_ulingu StaticLibrary_findsofficepath 
Library_tl Library_basegfx Library_canvastools Library_cppcanvas 
Library_dbtools Library_deploymentmisc Library_deploymentmisc Library_editeng 
Library_fwe Library_fwi Library_i18nutil Library_localebe1 Library_sax 
Library_sofficeapp Library_ucbhelper Library_opencl Rdb_services udkapi offapi 
Library_clew Library_gie Library_icg Library_reflection Library_invocadapt 
Library_bootstrap Library_introspection Library_stocservices Library_xmlreader 
Library_gcc3_uno instsetoo_native more_fonts StaticLibrary_boost_locale 
StaticLibrary_fuzzerstubs StaticLibrary_fuzzer_core StaticLibrary_fuzzer_calc 
StaticLibrary_fuzzer_draw StaticLibrary_fuzzer_writer Library_forui 
Library_binaryurp Library_io Library_invocation Library_namingservice 
Library_proxyfac Library_uuresolver Module_ure Exe
 cutable_wmffuzzer Executable_jpgfuzzer Executable_giffuzzer 
Executable_xbmfuzzer Executable_xpmfuzzer Executable_pngfuzzer 
Executable_bmpfuzzer Executable_svmfuzzer Executable_pcdfuzzer 
Executable_dxffuzzer Executable_metfuzzer Executable_ppmfuzzer 
Executable_psdfuzzer Executable_epsfuzzer Executable_pctfuzzer 
Executable_pcxfuzzer Executable_rasfuzzer Executable_tgafuzzer 
Executable_tiffuzzer Executable_hwpfuzzer Executable_602fuzzer 
Executable_lwpfuzzer Executable_olefuzzer Executable_pptfuzzer 
Executable_rtffuzzer Executable_cgmfuzzer Executable_ww2fuzzer 
Executable_ww6fuzzer Executable_ww8fuzzer Executable_qpwfuzzer 
Executable_slkfuzzer Executable_fodtfuzzer Executable_fodsfuzzer 
Executable_fodpfuzzer Executable_xlsfuzzer Executable_scrtffuzzer 
Executable_wksfuzzer Executable_diffuzzer Executable_docxfuzzer
 
 endif # MAKE_RESTARTS
 
diff --git a/Repository.mk b/Repository.mk
index 70d842f95d17..5f93c3e644bc 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -137,6 +137,7 @@ $(eval $(call 
gb_Helper_register_executables_for_install,OOO,brand, \
$(call gb_Helper_optional,FUZZERS,scrtffuzzer) \
$(call 

[Libreoffice-commits] core.git: external/icu

2017-11-28 Thread Christian Lohmaier
 external/icu/ExternalProject_icu.mk |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 5030bde7975746df79f11bd569e75ad449dfd4d0
Author: Christian Lohmaier 
Date:   Wed Nov 22 20:22:00 2017 +0100

icu: don't skip building the data just because tools were disabled

building for e.g. android disables the tests and requests data in a
static library, but icu completely skips building the data directory in
case --disable-tools was specified:
icu/source/Makefile.in
@TOOLS_TRUE@DATASUBDIR = data
will become
#DATASUBDIR = data
and then
SUBDIRS =  stubdata common i18n $(LAYOUTEX) $(ICUIO) $(TOOLS) 
$(DATASUBDIR) $(EXTRA) $(SAMPLE) $(TEST)
will not have the data dir and make will ignore it.  Add it back by
specifying it when invoking make and all is fine.

Change-Id: I0af693f22938ebabdc189a97f1cfc3f8b1c042ee
Reviewed-on: https://gerrit.libreoffice.org/45107
Reviewed-by: Christian Lohmaier 
Tested-by: Jenkins 

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index 1a9c5ff90602..5bceb14e373b 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -58,6 +58,9 @@ icu_LDFLAGS:=" \
-Wl$(COMMA)-Bsymbolic-functions -Wl$(COMMA)--dynamic-list-cpp-new 
-Wl$(COMMA)--dynamic-list-cpp-typeinfo) \
 $(if $(filter ANDROID,$(OS)),-lgnustl_shared -lm)"
 
+# DATASUBDIR=data in cross-compiling case, because --disable-tools completely 
skips the
+# data directory/doesn't build the requested library in that case 
(icu/source/Makefile.in)
+# so we need to add it back to the list of subdirectories to build
 $(call gb_ExternalProject_get_state_target,icu,build) :
$(call gb_ExternalProject_run,build,\
CPPFLAGS=$(icu_CPPFLAGS) CFLAGS=$(icu_CFLAGS) \
@@ -73,7 +76,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
--disable-static --enable-shared $(if $(filter 
ANDROID,$(OS)),--with-library-suffix=lo)) \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)\

--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source) \
-   && $(MAKE) \
+   && $(MAKE) $(if $(CROSS_COMPILING),DATASUBDIR=data) \
$(if $(filter MACOSX,$(OS)), \
&& $(PERL) 
$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl \
URELIB \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Miklos Vajna
 sw/qa/extras/rtfexport/data/tdf104035.rtf   |   14 ++
 sw/qa/extras/rtfexport/rtfexport3.cxx   |8 
 sw/source/filter/ww8/docxsdrexport.cxx  |2 +-
 sw/source/filter/ww8/rtfattributeoutput.cxx |9 +++--
 4 files changed, 30 insertions(+), 3 deletions(-)

New commits:
commit b5e871deb8ce390b9fa694e21b0272c7462da703
Author: Miklos Vajna 
Date:   Tue Nov 28 09:08:12 2017 +0100

tdf#104035 RTF export: fix handling of absolute tab positions

RtfAttributeOutput::ParaTabStop() assumed that they are always absolute,
but WW8AttributeOutput::ParaTabStop() points out what compat setting
decides if they are absolute or relative.

Change-Id: Iafe8f6bb8733cae38a89f6c407763b0327e894e8

diff --git a/sw/qa/extras/rtfexport/data/tdf104035.rtf 
b/sw/qa/extras/rtfexport/data/tdf104035.rtf
new file mode 100644
index ..730238eb0c63
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf104035.rtf
@@ -0,0 +1,14 @@
+{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033
+{\fonttbl
+{\f5\fswiss\fcharset0\fprq2 Helvetica;}
+}
+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;
+\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;
+\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
+\margl1440\margr1440
+\facingp\widowctrl\ftnbj\aenddoc\lytprtmet\hyphcaps0\formshade\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot
 \fet0\sectd 
\psz1\sbkodd\pgnrestart\linex0\headery1440\footery1080\endnhere\titlepg\sectdefaultcl
+\pard\plain 
\fi-2880\li2880\widctlpar\tx450\tx2880\tx3427\tx3787\tx4147\adjustright
+{\b\f5 1.0\tab FACILITY}
+{\f0\fs26 \tab Navy Golf operation physical/service environment is clean, safe 
and friendly for employees and customers, and creates a
+\par }
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx 
b/sw/qa/extras/rtfexport/rtfexport3.cxx
index 9c174450c95f..0c63f23972e0 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -60,6 +60,14 @@ DECLARE_RTFEXPORT_TEST(testTdf108949_footnote, 
"tdf108949_footnote.rtf")
  
getProperty(xFootnote->getAnchor(), "CharColor"));
 }
 
+DECLARE_RTFEXPORT_TEST(testTdf104035, "tdf104035.rtf")
+{
+auto aTabStops = 
getProperty(getParagraph(1), "ParaTabStops");
+CPPUNIT_ASSERT(aTabStops.hasElements());
+// This was 3330 twips instead, as tabs were assumed to be relative.
+CPPUNIT_ASSERT_EQUAL(static_cast(convertTwipToMm100(450)), 
aTabStops[0].Position);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index 260cf7f78f8c..d50f7fefa067 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -921,7 +921,7 @@ bool DocxSdrExport::Impl::isSupportedDMLShape(const 
uno::Reference xServiceInfo(xShape, 
uno::UNO_QUERY_THROW);
 if (xServiceInfo->supportsService("com.sun.star.drawing.PolyPolygonShape")
-|| xServiceInfo->supportsService("com.sun.star.drawing.PolyLineShape"))
+|| 
xServiceInfo->supportsService("com.sun.star.drawing.PolyLineShape"))
 return false;
 
 // For signature line shapes, we don't want DML, just the VML shape.
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 8b5ba978104d..6c8bb3390979 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -78,6 +78,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2838,8 +2839,12 @@ void RtfAttributeOutput::ParaWidows(const SvxWidowsItem& 
rWidows)
 
 void RtfAttributeOutput::ParaTabStop(const SvxTabStopItem& rTabStop)
 {
-long nOffset
-= static_cast(m_rExport.GetItem(RES_LR_SPACE)).GetTextLeft();
+long nOffset = 0;
+// Tabs are absolute by default.
+if (m_rExport.m_pDoc->getIDocumentSettingAccess().get(
+DocumentSettingId::TABS_RELATIVE_TO_INDENT))
+nOffset = static_cast(m_rExport.GetItem(RES_LR_SPACE)).GetTextLeft();
+
 for (sal_uInt16 n = 0; n < rTabStop.Count(); n++)
 {
 const SvxTabStop& rTS = rTabStop[n];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Stephan Bergmann
 external/libassuan/w32-build-fixes.patch.1 |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit dd71a8e35c21496687a4c73b0f6641210252cbee
Author: Stephan Bergmann 
Date:   Mon Nov 27 15:20:29 2017 +0100

Missing --tag=RC

...causing failure

> make[5]: Entering directory 'workdir/UnpackedTarball/libassuan/src'
> C:/cygwin64/bin/sh.exe ../libtool --mode=compile windres 
--preprocessor=[...]' `echo -DHAVE_CONFIG_H -I. -I..  | sed -e 
's/-I/--include-dir /g;s/-D/--define /g'` -i versioninfo.rc -o versioninfo.lo
> libtool: compile: unable to infer tagged configuration
> libtool: compile: specify a tag with `--tag'
> make[5]: *** [Makefile:1172: versioninfo.lo] Error 1

for me.  (And note how e.g. 
workdir/UnpackedTarball/libgpg-error/src/Makefile.am
contains such a --tag=RC, too.)

Change-Id: I3919a59d5443c558d9bc37fd0a851ea161f44406
Reviewed-on: https://gerrit.libreoffice.org/45344
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit b00ba26c56c9f910a1a65f39a886ca23def34341)
Reviewed-on: https://gerrit.libreoffice.org/45371
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/external/libassuan/w32-build-fixes.patch.1 
b/external/libassuan/w32-build-fixes.patch.1
index f8125496f6ad..9b5c78f1c10f 100755
--- a/external/libassuan/w32-build-fixes.patch.1
+++ b/external/libassuan/w32-build-fixes.patch.1
@@ -1,3 +1,14 @@
+--- libassuan/src/Makefile.am
 libassuan/src/Makefile.am
+@@ -81,7 +81,7 @@
+ 
+ if HAVE_W32_SYSTEM
+ 
+-LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
++LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
+  `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
+  sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
+ 
 --- libassuan.orig/src/mkheader.c  2013-03-15 20:26:09.0 +0100
 +++ libassuan/src/mkheader.c   2017-09-24 14:17:33.584583300 +0200
 @@ -99,7 +99,7 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Windows builders will need a cygwin gcc now

2017-11-28 Thread Thorsten Behrens
Stephan Bergmann wrote:
> With
> 
> "Use Executable_cpp instead of default gcc as preprocessor for
> windres" that requirement should be moot again.
>
Ah great stuff, thanks! I'll backport to 6.0, and also remove gcc from
lode (where it was essentially from day one).

Cheers,

-- Thorsten


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


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - external/gpgmepp

2017-11-28 Thread Stephan Bergmann
 external/gpgmepp/ExternalProject_gpgmepp.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 92a870beb088613722c0b1605927209e08b4bf0b
Author: Stephan Bergmann 
Date:   Mon Nov 27 15:25:03 2017 +0100

Pass $(MAKE) into external/gpgmepp

...similar to e8e5bd65d31a60712afcab17d2e5f77c3322f86f "Pass $(MAKE) into
external/libassuan"

Change-Id: Icb90eb0831e74270a2600ab8ea9a6b0ac88a7e5f
Reviewed-on: https://gerrit.libreoffice.org/45345
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit e75c983acfe0c496106ab1ef2a566408b8955cb8)
Reviewed-on: https://gerrit.libreoffice.org/45374
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk 
b/external/gpgmepp/ExternalProject_gpgmepp.mk
index 4b69774771fd..afd6ab6344f9 100644
--- a/external/gpgmepp/ExternalProject_gpgmepp.mk
+++ b/external/gpgmepp/ExternalProject_gpgmepp.mk
@@ -38,6 +38,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build):
$(if $(ENABLE_DEBUG),$(gb_DEBUG_CFLAGS)) \
$(if $(filter 
$(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))' \
   --host=$(if $(filter 
INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32) \
+  MAKE=$(MAKE) \
  && $(MAKE) \
)
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: New Defects reported by Coverity Scan for LibreOffice

2017-11-28 Thread Stephan Bergmann

On 11/28/2017 11:49 AM, Caolán McNamara wrote:

On Tue, 2017-11-28 at 08:58 +0100, Stephan Bergmann wrote:

That's apparently a bug in Coverity Scan; std::functions's

template function(F f);

constructor template is eligible here


I imagine the trigger is that we default to c++17 where available


Ah, right (I'd just assumed that was brand new code in sc); lets see if 
 "Avoid C++17 mode for 
Coverity Scan" will help.

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


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

2017-11-28 Thread Eike Rathke
 sc/inc/scfuncs.hrc |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e0b60b182394dbe075185e9c07843d2beacaa6b1
Author: Eike Rathke 
Date:   Tue Nov 28 10:47:55 2017 +0100

Fix typos

Change-Id: I01f0ca82f1350b74ea2d3205948c032918049c02

diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc
index 0d3999899ee8..c0cd8abb3a3e 100644
--- a/sc/inc/scfuncs.hrc
+++ b/sc/inc/scfuncs.hrc
@@ -3415,13 +3415,13 @@ const char* SC_OPCODE_LOOKUP_ARY[] =
 // -=*# Resource for function MATCH #*=-
 const char* SC_OPCODE_MATCH_ARY[] =
 {
-NC_("SC_OPCODE_MATCH", "Defines a position in a array after comparing 
values."),
+NC_("SC_OPCODE_MATCH", "Defines a position in an array after comparing 
values."),
 NC_("SC_OPCODE_MATCH", "Search criterion"),
 NC_("SC_OPCODE_MATCH", "The value to be used for comparison."),
 NC_("SC_OPCODE_MATCH", "Lookup array"),
 NC_("SC_OPCODE_MATCH", "The array (range) in which the search is made."),
 NC_("SC_OPCODE_MATCH", "Type"),
-NC_("SC_OPCODE_MATCH", "Type can take the value 1, 0 or -1 and determines 
the criteria are to be used for comparison purposes.")
+NC_("SC_OPCODE_MATCH", "Type can take the value 1, 0 or -1 and determines 
the criteria to be used for comparison purposes.")
 };
 
 // -=*# Resource for function OFFSET #*=-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Stephan Bergmann
 solenv/clang-format/blacklist |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 913f77dc5af13d5ceabf5c9fac2a870ebb7ccdea
Author: Stephan Bergmann 
Date:   Tue Nov 28 11:50:51 2017 +0100

Add wrongly formatted new file to blacklist

Change-Id: Ib4fd5372adac12b2effd30342a5f7af395b9aceb

diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index c8709b81d8c3..762ac3506c34 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -18624,6 +18624,7 @@ vcl/workben/602fuzzer.cxx
 vcl/workben/bmpfuzzer.cxx
 vcl/workben/cgmfuzzer.cxx
 vcl/workben/commonfuzzer.hxx
+vcl/workben/docxfuzzer.cxx
 vcl/workben/dxffuzzer.cxx
 vcl/workben/epsfuzzer.cxx
 vcl/workben/fftester.cxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/lok_dialog' - libreofficekit/qa

2017-11-28 Thread Pranav Kant
 libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx|   19 ---
 libreofficekit/qa/gtktiledviewer/gtv-helpers.hxx|   23 +++
 libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx |6 -
 libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx   |   60 
+-
 libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.hxx   |6 +
 libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx|   35 
+
 libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.hxx|2 
 libreofficekit/qa/gtktiledviewer/gtv.ui |   49 
+++-
 8 files changed, 172 insertions(+), 28 deletions(-)

New commits:
commit e87eef9b061697710d548e2a6b776ea4c3c3d026
Author: Pranav Kant 
Date:   Tue Nov 28 16:43:54 2017 +0530

gtv: Remember recently executed UNO commands

Saves the recently executed UNO commands in a temp file and make it
accessible to user in a combo box. Useful when debugging.

Change-Id: Ic66961a388cc59dee3f65cb8d4de3c29a8a75eaa

diff --git a/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx
index 9dee02a0ac45..5dca746d5f25 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx
@@ -148,23 +148,4 @@ const std::string GtvHelpers::getDirPath(const 
std::string& filePath)
 return dirPath;
 }
 
-const std::vector GtvHelpers::splitIntoIntegers(const std::string& 
aPayload, const std::string& aDelim, const int nItems)
-{
-std::vector aRet;
-
-if (!aPayload.empty())
-{
-gchar** ppCoordinates = g_strsplit(aPayload.c_str(), aDelim.c_str(), 
nItems);
-gchar** ppCoordinate  = ppCoordinates;
-while (*ppCoordinate)
-{
-aRet.push_back(atoi(*ppCoordinate));
-++ppCoordinate;
-}
-g_strfreev(ppCoordinates);
-}
-
-return aRet;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-helpers.hxx 
b/libreofficekit/qa/gtktiledviewer/gtv-helpers.hxx
index 9e984846f0ab..9474f4c0271a 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-helpers.hxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-helpers.hxx
@@ -39,7 +39,28 @@ namespace GtvHelpers
 
 const std::string getDirPath(const std::string& filePath);
 
-const std::vector splitIntoIntegers(const std::string& aPayload, 
const std::string& aDelim, const int nItems);
+template
+const std::vector split(const std::string& aPayload, const std::string& 
aDelim, const int nItems)
+{
+std::vector aRet;
+
+if (!aPayload.empty())
+{
+gchar** ppCoordinates = g_strsplit(aPayload.c_str(), 
aDelim.c_str(), nItems);
+gchar** ppCoordinate  = ppCoordinates;
+while (*ppCoordinate)
+{
+std::stringstream strstream(*ppCoordinate);
+T item;
+strstream >> item;
+aRet.push_back(item);
+++ppCoordinate;
+}
+g_strfreev(ppCoordinates);
+}
+
+return aRet;
+}
 }
 
 #endif
diff --git 
a/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
index 79839aeccad2..2c97bd4d7393 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
@@ -314,7 +314,7 @@ void LOKDocViewSigHandlers::dialog(LOKDocView* pDocView, 
gchar* pPayload, gpoint
 if (aAction == "created")
 {
 const std::string aSize = aRoot.get("size");
-std::vector aPoints = GtvHelpers::splitIntoIntegers(aSize, ", ", 
2);
+std::vector aPoints = GtvHelpers::split(aSize, ", ", 2);
 GtkWidget* pDialog = gtv_lok_dialog_new(pDocView, nDialogId, 
aPoints[0], aPoints[1]);
 g_info("created  dialog, for dialogid: %d with size: %s", nDialogId, 
aSize.c_str());
 
@@ -345,7 +345,7 @@ void LOKDocViewSigHandlers::dialog(LOKDocView* pDocView, 
gchar* pPayload, gpoint
 else if (aAction == "size_changed")
 {
 const std::string aSize = aRoot.get("size");
-std::vector aSizePoints = 
GtvHelpers::splitIntoIntegers(aSize, ", ", 2);
+std::vector aSizePoints = GtvHelpers::split(aSize, 
", ", 2);
 if (aSizePoints.size() != 2)
 {
 g_error("Malformed size_changed callback");
@@ -366,7 +366,7 @@ void LOKDocViewSigHandlers::dialog(LOKDocView* pDocView, 
gchar* pPayload, gpoint
 try
 {
 const std::string aRectangle = 
aRoot.get("rectangle");
-std::vector aRectPoints = 
GtvHelpers::splitIntoIntegers(aRectangle, ", ", 4);
+std::vector 

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

2017-11-28 Thread Henry Castro
 framework/inc/helper/mischelper.hxx |3 
 framework/source/uielement/langselectionstatusbarcontroller.cxx |  103 
+++---
 2 files changed, 78 insertions(+), 28 deletions(-)

New commits:
commit 6db709ba79fec6f75dd7385ce57c65a62fc2254e
Author: Henry Castro 
Date:   Mon Nov 27 16:39:32 2017 -0400

sc, sd: rework UI Text Language "More" button, tdf#113911

Calc and Impress handle different uno command to set language

Change-Id: Ic0ffef6a8fee5078b29873934001819a384c8f3a
Reviewed-on: https://gerrit.libreoffice.org/45366
Tested-by: Jenkins 
Reviewed-by: Henry Castro 

diff --git a/framework/inc/helper/mischelper.hxx 
b/framework/inc/helper/mischelper.hxx
index 47043b5a06bb..bbbc39869ebe 100644
--- a/framework/inc/helper/mischelper.hxx
+++ b/framework/inc/helper/mischelper.hxx
@@ -58,6 +58,9 @@ enum LangMenuIDs
 MID_LANG_SEL_NONE,
 MID_LANG_SEL_RESET,
 MID_LANG_SEL_MORE,
+MID_LANG_DEF_NONE,
+MID_LANG_DEF_RESET,
+MID_LANG_DEF_MORE,
 
 MID_LANG_PARA_SEPARATOR,
 MID_LANG_PARA_STRING,
diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx 
b/framework/source/uielement/langselectionstatusbarcontroller.cxx
index 12321574436b..1cc23a8c1006 100644
--- a/framework/source/uielement/langselectionstatusbarcontroller.cxx
+++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx
@@ -128,6 +128,7 @@ void LangSelectionStatusbarController::LangMenu(
 if (!m_bShowMenu)
 return;
 
+const Reference xModuleManager  = ModuleManager::create( 
m_xContext );
 //add context menu
 Reference< awt::XPopupMenu > xPopupMenu( awt::PopupMenu::create( 
m_xContext ) );
 //sub menu that contains all items except the last two items: Separator + 
Set Language for Paragraph
@@ -164,36 +165,65 @@ void LangSelectionStatusbarController::LangMenu(
 }
 }
 
-xPopupMenu->insertItem( MID_LANG_SEL_NONE,  FwkResId(STR_LANGSTATUS_NONE), 
0, MID_LANG_SEL_NONE );
-if ( sNone == m_aCurLang )
-xPopupMenu->checkItem( MID_LANG_SEL_NONE, true );
-xPopupMenu->insertItem( MID_LANG_SEL_RESET, 
FwkResId(STR_RESET_TO_DEFAULT_LANGUAGE), 0, MID_LANG_SEL_RESET );
-xPopupMenu->insertItem( MID_LANG_SEL_MORE,  FwkResId(STR_LANGSTATUS_MORE), 
0, MID_LANG_SEL_MORE );
 
-// add entries to submenu ('set language for paragraph')
-nItemId = static_cast< sal_Int16 >(MID_LANG_PARA_1);
-for (it = aLangItems.begin(); it != aLangItems.end(); ++it)
+if (xModuleManager->identify(m_xFrame) == "com.sun.star.text.TextDocument")
 {
-const OUString & rStr( *it );
-if( rStr != sNone &&
-rStr != sAsterisk &&
-!rStr.isEmpty()) // 'no language found' from language guessing
+xPopupMenu->insertItem( MID_LANG_SEL_NONE,  
FwkResId(STR_LANGSTATUS_NONE), 0, MID_LANG_SEL_NONE );
+if ( sNone == m_aCurLang )
+xPopupMenu->checkItem( MID_LANG_SEL_NONE, true );
+xPopupMenu->insertItem( MID_LANG_SEL_RESET, 
FwkResId(STR_RESET_TO_DEFAULT_LANGUAGE), 0, MID_LANG_SEL_RESET );
+xPopupMenu->insertItem( MID_LANG_SEL_MORE,  
FwkResId(STR_LANGSTATUS_MORE), 0, MID_LANG_SEL_MORE );
+
+// add entries to submenu ('set language for paragraph')
+nItemId = static_cast< sal_Int16 >(MID_LANG_PARA_1);
+for (it = aLangItems.begin(); it != aLangItems.end(); ++it)
 {
-SAL_WARN_IF( MID_LANG_PARA_1 > nItemId || nItemId > 
MID_LANG_PARA_9,
-"fwk.uielement", "nItemId outside of expected range!" );
-subPopupMenu->insertItem( nItemId, rStr, 0, nItemId );
-aLangMap[nItemId] = rStr;
-++nItemId;
+const OUString & rStr( *it );
+if( rStr != sNone &&
+rStr != sAsterisk &&
+!rStr.isEmpty()) // 'no language found' from language guessing
+{
+SAL_WARN_IF( MID_LANG_PARA_1 > nItemId || nItemId > 
MID_LANG_PARA_9,
+"fwk.uielement", "nItemId outside of expected range!" );
+subPopupMenu->insertItem( nItemId, rStr, 0, nItemId );
+aLangMap[nItemId] = rStr;
+++nItemId;
+}
 }
-}
-subPopupMenu->insertItem( MID_LANG_PARA_NONE,  
FwkResId(STR_LANGSTATUS_NONE), 0, MID_LANG_PARA_NONE );
-subPopupMenu->insertItem( MID_LANG_PARA_RESET, 
FwkResId(STR_RESET_TO_DEFAULT_LANGUAGE), 0, MID_LANG_PARA_RESET );
-subPopupMenu->insertItem( MID_LANG_PARA_MORE,  
FwkResId(STR_LANGSTATUS_MORE), 0, MID_LANG_PARA_MORE );
 
-// add last two entries to main menu
-xPopupMenu->insertSeparator( MID_LANG_PARA_SEPARATOR );
-xPopupMenu->insertItem( MID_LANG_PARA_STRING, 
FwkResId(STR_SET_LANGUAGE_FOR_PARAGRAPH), 0, MID_LANG_PARA_STRING );
-xPopupMenu->setPopupMenu( MID_LANG_PARA_STRING, subPopupMenu );
+// add entries to 

Re: New Defects reported by Coverity Scan for LibreOffice

2017-11-28 Thread Caolán McNamara
On Tue, 2017-11-28 at 08:58 +0100, Stephan Bergmann wrote:
> That's apparently a bug in Coverity Scan; std::functions's
> 
>template function(F f);
> 
> constructor template is eligible here

I imagine the trigger is that we default to c++17 where available
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-11-28 Thread Stephan Bergmann
 external/libassuan/ExternalProject_libassuan.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f6c4eb3cafe475dc96bb582cce42ec901b785d4b
Author: Stephan Bergmann 
Date:   Mon Nov 27 15:19:47 2017 +0100

Pass $(verbose) into ExternalProject_libassuan

Change-Id: I66771b49933a9092ad0c07c5ebaabfb3d80dcdcd
Reviewed-on: https://gerrit.libreoffice.org/45343
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit d5f8b759b836268d414fc05f682e4412c6c93f5a)
Reviewed-on: https://gerrit.libreoffice.org/45370
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/external/libassuan/ExternalProject_libassuan.mk 
b/external/libassuan/ExternalProject_libassuan.mk
index 9f0bccdbf64a..21d034455dca 100644
--- a/external/libassuan/ExternalProject_libassuan.mk
+++ b/external/libassuan/ExternalProject_libassuan.mk
@@ -26,6 +26,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build):
&& ./configure \
--enable-static \
--disable-shared \
+   $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
CXXFLAGS="$(CXXFLAGS)" \
GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \
GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - external/gpgmepp external/libassuan external/libgpg-error

2017-11-28 Thread Stephan Bergmann
 external/gpgmepp/ExternalProject_gpgmepp.mk   |3 ++-
 external/libassuan/ExternalProject_libassuan.mk   |3 ++-
 external/libgpg-error/ExternalProject_libgpg-error.mk |3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit c38c8d36d0c8b49d713f0ec8eeab99a5a1446c50
Author: Stephan Bergmann 
Date:   Mon Nov 27 14:13:15 2017 +0100

Use Executable_cpp instead of default gcc as preprocessor for windres

...to avoid having GCC as yet another prerequisite on Windows.

Cygwin 'man windres' states:  "The default preprocessor argument is 'gcc -E
-xc-header -DRC_INVOKED'."  Of those arguments, -E and -xc-header are not
relevant for Executable_cpp, so only -DRC_INVOKED is kept.

Additional arguments that turned out to be necessary are:

-I$(ATL_INCLUDE)
So that
  #include 
in workdir/UnpackedTarball/libgpg-error/src/versioninfo.rc is found.  (Not 
sure
how the original code using gcc found this.)

-+
So that using a C++ style comment in
  #include "winres.h"   // extract from windows header
in afxres.h does not cause a "Syntax error in #include" from Executable_cpp.

$(SOLARINC)
So that
   #include "winres.h"   // extract from windows header
in afxres.h is found.  (Not sure how the original code using gcc found 
this.)

-DWINAPI_FAMILY=0
Because dlgs.h (included indirectly from afxres.h) contains
  #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  [...]
  typedef struct tagCRGB
  {
  BYTEbRed;
  BYTEbGreen;
  BYTEbBlue;
  BYTEbExtra;
  } CRGB;   /* RGB Color */
and the WINAPI_FAMILY_PARTITION conditional (defined in winapifamily.h) 
would be
true, causing the output to contain those "typedef struct tagCRGB ..." 
tokens
that windres apparently doesn't expect (failing with "windres: can't open 
file
`tagCRGB': No such file or directory").  (Not sure how the original code 
using
gcc avoided this.)

Change-Id: Ic2d031c72025f2e9dbde26c774215d2d2d0a43a9
Reviewed-on: https://gerrit.libreoffice.org/45334
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 
(cherry picked from commit e0d94237878d4949573fc9b6d97eea3146cada6d)
Reviewed-on: https://gerrit.libreoffice.org/45392
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk 
b/external/gpgmepp/ExternalProject_gpgmepp.mk
index afd6ab6344f9..7aaa42a12b40 100644
--- a/external/gpgmepp/ExternalProject_gpgmepp.mk
+++ b/external/gpgmepp/ExternalProject_gpgmepp.mk
@@ -21,7 +21,7 @@ $(eval $(call gb_ExternalProject_use_externals,gpgmepp,\
 ))
 
 ifeq ($(COM),MSC)
-$(call gb_ExternalProject_get_state_target,gpgmepp,build):
+$(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call 
gb_Executable_get_target,cpp)
$(call gb_ExternalProject_run,build,\
autoreconf \
&& ./configure \
@@ -39,6 +39,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build):
$(if $(filter 
$(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))' \
   --host=$(if $(filter 
INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32) \
   MAKE=$(MAKE) \
+  RC='windres --preprocessor='\''$(call 
gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC) 
-I$(ATL_INCLUDE)'\' \
  && $(MAKE) \
)
 else
diff --git a/external/libassuan/ExternalProject_libassuan.mk 
b/external/libassuan/ExternalProject_libassuan.mk
index 21d034455dca..fdadb2851042 100644
--- a/external/libassuan/ExternalProject_libassuan.mk
+++ b/external/libassuan/ExternalProject_libassuan.mk
@@ -20,7 +20,7 @@ $(eval $(call gb_ExternalProject_use_externals,libassuan,\
 ))
 
 ifeq ($(COM),MSC)
-$(call gb_ExternalProject_get_state_target,libassuan,build):
+$(call gb_ExternalProject_get_state_target,libassuan,build): $(call 
gb_Executable_get_target,cpp)
$(call gb_ExternalProject_run,build,\
autoreconf \
&& ./configure \
@@ -32,6 +32,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build):
GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
--host=$(if $(filter 
INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32) \
MAKE=$(MAKE) \
+   RC='windres --preprocessor='\''$(call 
gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC) 
-I$(ATL_INCLUDE)'\' \
  && $(MAKE) \
)
 
diff --git a/external/libgpg-error/ExternalProject_libgpg-error.mk 
b/external/libgpg-error/ExternalProject_libgpg-error.mk
index ef22e3926b69..ecb96f00b496 100644
--- a/external/libgpg-error/ExternalProject_libgpg-error.mk
+++ 

[Libreoffice-commits] core.git: external/libwps

2017-11-28 Thread David Tardon
 
external/libwps/0001-Lotus-.123-do-no-assume-that-a-file-containing-a-fdc.patch.1
 |   27 ++
 external/libwps/UnpackedTarball_libwps.mk  
   |1 
 2 files changed, 28 insertions(+)

New commits:
commit 54ec0aec13088c9ab36fc76fe993bb23e5fb
Author: David Tardon 
Date:   Tue Nov 28 11:51:38 2017 +0100

tdf#114000 always use user-selected charset

Change-Id: I45b9632724f46deb97bc79e364bf775aaaf0b85f

diff --git 
a/external/libwps/0001-Lotus-.123-do-no-assume-that-a-file-containing-a-fdc.patch.1
 
b/external/libwps/0001-Lotus-.123-do-no-assume-that-a-file-containing-a-fdc.patch.1
new file mode 100644
index ..40c929ab8ea0
--- /dev/null
+++ 
b/external/libwps/0001-Lotus-.123-do-no-assume-that-a-file-containing-a-fdc.patch.1
@@ -0,0 +1,27 @@
+From 2a3465442d1305c7fec55e986c9793a86e571baa Mon Sep 17 00:00:00 2001
+From: osnola 
+Date: Fri, 24 Nov 2017 12:32:30 +0100
+Subject: [PATCH] Lotus .123: do no assume that a file containing a fdc's
+ structure is   a Mac file :-~
+
+---
+ src/lib/Lotus.cpp | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/lib/Lotus.cpp b/src/lib/Lotus.cpp
+index d145014..514faad 100644
+--- a/src/lib/Lotus.cpp
 b/src/lib/Lotus.cpp
+@@ -3046,8 +3046,7 @@ bool 
LotusParser::readMacFontName(std::shared_ptr stream, long endPos
+   }
+   else if (nameOk && !name.empty())
+   {
+-  auto encoding=name!="Symbol" ? 
libwps_tools_win::Font::MAC_ROMAN : libwps_tools_win::Font::MAC_SYMBOL;
+-  LotusParserInternal::Font font(encoding);
++  LotusParserInternal::Font font(getDefaultFontType());
+   font.m_name=name;
+   m_state->m_fontsMap.insert(std::map::value_type(id,font));
+   }
+-- 
+2.14.3
+
diff --git a/external/libwps/UnpackedTarball_libwps.mk 
b/external/libwps/UnpackedTarball_libwps.mk
index 58c3710d9e03..742392b2b346 100644
--- a/external/libwps/UnpackedTarball_libwps.mk
+++ b/external/libwps/UnpackedTarball_libwps.mk
@@ -37,6 +37,7 @@ endif
 
 $(eval $(call gb_UnpackedTarball_add_patches,libwps,\
external/libwps/0001-drop-unneeded-include.patch.1 \
+   
external/libwps/0001-Lotus-.123-do-no-assume-that-a-file-containing-a-fdc.patch.1
 \
 ))
 
 # vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/lok_dialog' - 4 commits - desktop/source include/LibreOfficeKit include/sfx2 libreofficekit/qa sfx2/source vcl/source

2017-11-28 Thread Pranav Kant
Rebased ref, commits from common ancestor:
commit 20c9e36d52fb8d54f75dc0481ca5ca3a04b83dff
Author: Pranav Kant 
Date:   Tue Nov 28 02:53:48 2017 +0530

WIP: Remove getDialogInfo + gtv

Change-Id: I6f810c97f2fadd3b1ea602a97e24c8b42f4a84b9

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index f4c080fb8260..a7fd0b9685a9 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -614,9 +614,6 @@ static void doc_paintDialog(LibreOfficeKitDocument* pThis, 
unsigned nLOKWindowId
 const int nX, const int nY,
 const int nWidth, const int nHeight);
 
-static void doc_getDialogInfo(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId,
-  char** pDialogTitle, int* nWidth, int* nHeight);
-
 static void doc_paintActiveFloatingWindow(LibreOfficeKitDocument* pThis, 
unsigned nLOKWindowId, unsigned char* pBuffer, int* nWidth, int* nHeight);
 
 LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
 )
@@ -669,7 +666,6 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
getPartHash = doc_getPartHash;
 
 m_pDocumentClass->paintDialog = doc_paintDialog;
-m_pDocumentClass->getDialogInfo = doc_getDialogInfo;
 m_pDocumentClass->paintActiveFloatingWindow = 
doc_paintActiveFloatingWindow;
 
 gDocumentClass = m_pDocumentClass;
@@ -3266,35 +3262,6 @@ unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*pTh
 return nullptr;
 }
 
-static void doc_getDialogInfo(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId,
-  char** pDialogTitle, int* nWidth, int* nHeight)
-{
-// FIXME - I guess we should kill this one, and use only the callback
-// "created"?
-
-SolarMutexGuard aGuard;
-
-VclPtr pWindow = vcl::Window::FindLOKWindow(nLOKWindowId);
-if (!pWindow)
-{
-gImpl->maLastExceptionMsg = "Document doesn't support dialog 
rendering, or window not found.";
-return;
-}
-
-OUString aDialogTitle(pWindow->GetText());
-const Size aSize = pWindow->GetSizePixel();
-*nWidth = aSize.getWidth();
-*nHeight = aSize.getHeight();
-
-// copy dialog title
-if (!aDialogTitle.isEmpty())
-{
-OString aTitleString = OUStringToOString(aDialogTitle, 
RTL_TEXTENCODING_UTF8);
-*pDialogTitle = static_cast(malloc(aTitleString.getLength() + 
1));
-strcpy(*pDialogTitle, aTitleString.getStr());
-}
-}
-
 static void doc_paintDialog(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId,
 unsigned char* pBuffer,
 const int nX, const int nY,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 071da712703e..e623ecb2508e 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -273,11 +273,6 @@ struct _LibreOfficeKitDocumentClass
  const int x, const int y,
  const int width, const int height);
 
-/// Get info about dialog with given dialog id
-/// @see lok::Document::getDialogInfo().
-void (*getDialogInfo) (LibreOfficeKitDocument* pThis, unsigned nDialogId,
-   char** pDialogTitle, int* pWidth, int* pHeight);
-
 /// @see lok::Document::paintActiveFloatingWindow().
 void (*paintActiveFloatingWindow) (LibreOfficeKitDocument* pThis, unsigned 
nDialogId, unsigned char* pBuffer, int* nWidth, int* nHeight);
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index c99b425daff6..86ceab46c484 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -178,23 +178,6 @@ public:
   x, y, width, height);
 }
 
-/* Get info about dialog with given dialog id
- *
- * @param nDialogId Unique dialog id for which to get info about
- * @param pDialogTitle Pointer to pointer pointing to string containing the
- * dialog title. Caller should the pointer to allocated string themselves.
- * @param pWidth The width of the dialog
- * @param pHeight The height of the dialog
- */
-void getDialogInfo(unsigned nDialogId,
-   char** pDialogTitle,
-   int& pWidth,
-   int& pHeight)
-{
-return mpDoc->pClass->getDialogInfo(mpDoc, nDialogId, pDialogTitle, 
, );
-
-}
-
 /**
  * Renders the active floating window of a dialog
  *
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx
index b5325cf853c0..74cb58e09d48 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx
@@ -94,9 +94,9 @@ 

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

2017-11-28 Thread Stephan Bergmann
 compilerplugins/clang/unusedmethods.cxx |   13 +
 1 file changed, 13 insertions(+)

New commits:
commit 9f4491477b4bc221527633467c17c2529f1f0714
Author: Stephan Bergmann 
Date:   Tue Nov 28 09:47:22 2017 +0100

Add back UnusedMethods::TraverseCXXDeductionGuideDecl, properly ifdef'ed

...as is already done in 65d6c642590bd5f51c04228d941608322a85f1ac
"loplugin:casttovoid".  (This reverts 
5eec6db4addd7cc665222e1a4d05c35b13719847
"fix loplugin unusedmethods".)

Change-Id: Ibe6a7d9ce58aa70707538854ac64ad07022ea7b6
Reviewed-on: https://gerrit.libreoffice.org/45388
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/unusedmethods.cxx 
b/compilerplugins/clang/unusedmethods.cxx
index 1a707de5893a..549bb2bb6766 100644
--- a/compilerplugins/clang/unusedmethods.cxx
+++ b/compilerplugins/clang/unusedmethods.cxx
@@ -118,6 +118,9 @@ public:
 bool TraverseFunctionDecl( FunctionDecl* );
 bool TraverseCXXMethodDecl( CXXMethodDecl* );
 bool TraverseCXXConversionDecl( CXXConversionDecl* );
+#if CLANG_VERSION >= 5
+bool TraverseCXXDeductionGuideDecl( CXXDeductionGuideDecl* );
+#endif
 private:
 void logCallToRootMethods(const FunctionDecl* functionDecl, 
std::set& funcSet);
 MyFuncInfo niceName(const FunctionDecl* functionDecl);
@@ -387,6 +390,16 @@ bool 
UnusedMethods::TraverseCXXConversionDecl(CXXConversionDecl* f)
 currentFunctionDecl = copy;
 return ret;
 }
+#if CLANG_VERSION >= 5
+bool UnusedMethods::TraverseCXXDeductionGuideDecl(CXXDeductionGuideDecl* f)
+{
+auto copy = currentFunctionDecl;
+currentFunctionDecl = f;
+bool ret = RecursiveASTVisitor::TraverseCXXDeductionGuideDecl(f);
+currentFunctionDecl = copy;
+return ret;
+}
+#endif
 
 loplugin::Plugin::Registration< UnusedMethods > X("unusedmethods", false);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'feature/lok_dialog2'

2017-11-28 Thread Pranav Kant
New branch 'feature/lok_dialog2' available with the following commits:
commit f34d760f31f0d4e0e75bc1ce70b7f0fa98894197
Author: Pranav Kant 
Date:   Tue Nov 28 02:53:48 2017 +0530

WIP: Remove getDialogInfo + gtv

Change-Id: I6f810c97f2fadd3b1ea602a97e24c8b42f4a84b9

commit 2717196226b6a75a1e2334e32493f5776d888660
Author: Pranav Kant 
Date:   Tue Nov 28 02:25:36 2017 +0530

lokdialog: Notify the current view only

Change-Id: I55e0dbf1677a24905d337c58184a4419c1020a87

commit 3d2c9d2d0569647e1fdde4bba548c174338fc15c
Author: Pranav Kant 
Date:   Tue Nov 28 01:44:46 2017 +0530

lokdialog: new callback size_changed with new size of the dialog

Change-Id: Ibb864cb588ae7db92381c5578701d3ce09185f34

commit 53a1daacfb53b07e2b7d4a97076667e055edb808
Author: Pranav Kant 
Date:   Tue Nov 28 01:21:38 2017 +0530

lokdialog: Emit "created" callback after initial dialog layouting

StateChangeType::InitShow is a good indicator that layouting has
finished; we can rely that the size as returned by vcl::Window will be
correct.

The problem previously was that borders were not calculated by the time
"created" callback was emitted resulting in incorrect returned window
size.

Change-Id: I878c210dc2e7b3fe99123fe126830f58dc97feba

commit 1fe54835fc30d7f5e54276a7fef254fc3e03520b
Author: Pranav Kant 
Date:   Mon Nov 27 23:25:35 2017 +0530

etags: pass the "-e" flag directly to ctag binary

'man ctags' says that emacs mode will be enabled if the ctags binary is
renamed as etags or '-e' flag is provided to ctags binary.

Before this patch, the script assumes that host system has an 'etags'
binary renamed from 'ctags' program. This is not always the case in all
hosts. Eg: In Fedora, 'etags' binary is provided by emacs-common package
which doesn't understand the flags given later in the script.

It is safe to just explicitly enable the emacs mode via '-e' flag to the
ctags binary.

Change-Id: Ic7ded56cff32683fc5e9d3fcc7405e79da4c23b7

commit e5a1e6405b6aa89117eb7e32d27e5d47fb3b5596
Author: Pranav Kant 
Date:   Mon Nov 27 21:05:56 2017 +0530

lokdialog: Emit callback when title is changed

The plan is to remove the getDialogInfo from LOK API but one more step
before doing that is to find out why the dialog size in 'created'
dialog callback is less than what the actual dialog after painting is.

Change-Id: I5176e175cbf7ed81c1465fa053c9a024fbd9

commit c6bcf9c315bd7cdb0c60fbce8bd090f1292f9438
Author: Pranav Kant 
Date:   Fri Nov 24 18:40:01 2017 +0530

lokdialog: Launch dialogs which have a notifier registered

Change-Id: I062fa291668b7dbfb8bc8e8d455a7933378ce7d9

commit 5b959084890dcb27be663667258b01adf3f789ae
Author: Jan Holesovsky 
Date:   Mon Nov 27 19:23:22 2017 +0100

lokdialog: Move the LOKWindowId <-> VclPtr mapping to Window.

This allows registering & de-registering of non-sfx windows too, and makes 
the
Calc autofilter popup to appear.

Change-Id: I7cbbe94d208115aabcb6fa5f964646c7b7ce4c93

commit 23a0dea5294e5e5b1d320adc26aadd6c6b735d99
Author: Jan Holesovsky 
Date:   Mon Nov 27 15:03:19 2017 +0100

lokdialog: Move the LogicInvalidate from Dialog down to Window.

Another step towards the autofilter popup working...

Change-Id: I4907a23fcd0fc64da0c7f51e2f36b1657a17638c

commit 8a002215c36204fc31425a9a434fd604e439c71c
Author: Jan Holesovsky 
Date:   Fri Nov 24 18:50:05 2017 +0100

lokdialog: Move the painting down to Window, and enable Calc and Impress.

Tested with .uno:FormatCellDialog in Calc, Impress not tested.

Change-Id: I6d911c29616988db0625be9e2a63cf2172c69ee8

commit a95b18a17b0b6305c2016b35276ff5ce03ad6cf1
Author: Jan Holesovsky 
Date:   Fri Nov 24 12:06:42 2017 +0100

lokdialogs: Assign the LOK window id only when necessary.

Change-Id: Id48957a8c2bde068f30bb26e66df81972fe38e0f

commit f45c385f039668cecbcc6c1c257c96a2f982be90
Author: Jan Holesovsky 
Date:   Fri Nov 24 11:21:13 2017 +0100

lokdialog: Make the Autofilter popup notify about its creation.

Change-Id: Ib4062fa887b44eb1368205a414f4ac162f648c5c

commit 9f1ce4a70535e51b6561a8f064b8889cedc183f7
Author: Jan Holesovsky 
Date:   Fri Nov 24 10:20:47 2017 +0100

lokdialog: Move the Notifier down to vcl::Window.

We need to tunnel more than just dialogs, so this is the 1st step to get the
Autofilter popup rendered.

Change-Id: I6523a39ddc7a6eb2a204e48ab364130a5822f548

commit 6466cd06917968b0f8a574e0151d60f0cadfc814
Author: Pranav Kant 
Date:   Fri Nov 24 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svl/source

2017-11-28 Thread Dennis Francis
 svl/source/numbers/zforlist.cxx |   67 
 1 file changed, 67 insertions(+)

New commits:
commit 1d1449fee3bff39c4a5f54e3938b414efcabd6b6
Author: Dennis Francis 
Date:   Wed Nov 22 16:46:46 2017 +0530

Make SvNumberFormatter public methods threadsafe

This is a requirement due to the recent threading work done
on calc formulagroup interpreter.

Change-Id: I5d567b4b957a4d86303f6a86b14d1cbfc730beda
Reviewed-on: https://gerrit.libreoffice.org/45085
Tested-by: Jenkins 
Reviewed-by: Dennis Francis 
(cherry picked from commit b1f829dae5cacc595f78c9647ce8487ca5af)
Reviewed-on: https://gerrit.libreoffice.org/45328
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index b38c3c317545..a6e7af89562f 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -326,6 +326,7 @@ void SvNumberFormatter::ImpConstruct( LanguageType eLang )
 
 void SvNumberFormatter::ChangeIntl(LanguageType eLnge)
 {
+::osl::MutexGuard aGuard( GetMutex() );
 if (ActLnge != eLnge)
 {
 ActLnge = eLnge;
@@ -374,11 +375,13 @@ SvNumberFormatterRegistry_Impl& 
SvNumberFormatter::GetFormatterRegistry()
 
 void SvNumberFormatter::SetColorLink( const Link& 
rColorTableCallBack )
 {
+::osl::MutexGuard aGuard( GetMutex() );
 aColorLink = rColorTableCallBack;
 }
 
 Color* SvNumberFormatter::GetUserDefColor(sal_uInt16 nIndex)
 {
+::osl::MutexGuard aGuard( GetMutex() );
 if( aColorLink.IsSet() )
 {
 return aColorLink.Call(nIndex);
@@ -393,32 +396,38 @@ void SvNumberFormatter::ChangeNullDate(sal_uInt16 nDay,
sal_uInt16 nMonth,
sal_Int16 nYear)
 {
+::osl::MutexGuard aGuard( GetMutex() );
 pFormatScanner->ChangeNullDate(nDay, nMonth, nYear);
 pStringScanner->ChangeNullDate(nDay, nMonth, nYear);
 }
 
 const Date& SvNumberFormatter::GetNullDate() const
 {
+::osl::MutexGuard aGuard( GetMutex() );
 return pFormatScanner->GetNullDate();
 }
 
 void SvNumberFormatter::ChangeStandardPrec(short nPrec)
 {
+::osl::MutexGuard aGuard( GetMutex() );
 pFormatScanner->ChangeStandardPrec(nPrec);
 }
 
 void SvNumberFormatter::SetNoZero(bool bNZ)
 {
+::osl::MutexGuard aGuard( GetMutex() );
 bNoZero = bNZ;
 }
 
 sal_uInt16 SvNumberFormatter::GetStandardPrec() const
 {
+::osl::MutexGuard aGuard( GetMutex() );
 return pFormatScanner->GetStandardPrec();
 }
 
 bool SvNumberFormatter::GetNoZero() const
 {
+::osl::MutexGuard aGuard( GetMutex() );
 return bNoZero;
 }
 
@@ -547,6 +556,7 @@ bool SvNumberFormatter::IsDecimalSep( const OUString& rStr 
) const
 
 bool SvNumberFormatter::IsTextFormat(sal_uInt32 F_Index) const
 {
+::osl::MutexGuard aGuard( GetMutex() );
 const SvNumberformat* pFormat = GetFormatEntry(F_Index);
 
 return pFormat && pFormat->IsTextFormat();
@@ -558,6 +568,7 @@ bool SvNumberFormatter::PutEntry(OUString& rString,
  sal_uInt32& nKey,  // format key
  LanguageType eLnge)
 {
+::osl::MutexGuard aGuard( GetMutex() );
 nKey = 0;
 if (rString.isEmpty()) // empty string
 {
@@ -626,6 +637,7 @@ bool SvNumberFormatter::PutandConvertEntry(OUString& 
rString,
LanguageType eNewLnge,
bool bForExcelExport )
 {
+::osl::MutexGuard aGuard( GetMutex() );
 bool bRes;
 if (eNewLnge == LANGUAGE_DONTKNOW)
 {
@@ -644,6 +656,7 @@ bool SvNumberFormatter::PutandConvertEntrySystem(OUString& 
rString,
  LanguageType eLnge,
  LanguageType eNewLnge)
 {
+::osl::MutexGuard aGuard( GetMutex() );
 bool bRes;
 if (eNewLnge == LANGUAGE_DONTKNOW)
 {
@@ -659,6 +672,7 @@ sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( 
OUString & rString,
 LanguageType 
eSysLnge, short & rType,
 bool & 
rNewInserted, sal_Int32 & rCheckPos )
 {
+::osl::MutexGuard aGuard( GetMutex() );
 sal_uInt32 nKey = NUMBERFORMAT_ENTRY_NOT_FOUND;
 rNewInserted = false;
 rCheckPos = 0;
@@ -732,12 +746,14 @@ sal_uInt32 
SvNumberFormatter::GetIndexPuttingAndConverting( OUString & rString,
 
 void SvNumberFormatter::DeleteEntry(sal_uInt32 nKey)
 {
+::osl::MutexGuard aGuard( GetMutex() );
 delete aFTable[nKey];
 aFTable.erase(nKey);
 }
 
 void SvNumberFormatter::GetUsedLanguages( std::vector& rList )
 {
+

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

2017-11-28 Thread Samuel Mehrbrodt
 oox/source/vml/vmlshape.cxx |   69 
++
 sw/qa/extras/ooxmlexport/data/signature-line-all-props-set.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx  |   38 +
 3 files changed, 80 insertions(+), 27 deletions(-)

New commits:
commit d3440e0ebfa68ac8d2cbec9b44d0fc491162ee0e
Author: Samuel Mehrbrodt 
Date:   Thu Nov 23 15:05:03 2017 +0100

tdf#83877 Unit test for OOXML SignatureLine Roundtrip

Change-Id: I40c116f28c0e8efe81e33e48fa05098d1dd76731
Reviewed-on: https://gerrit.libreoffice.org/45152
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 1cec9461e2df..8079f5ef179d 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -1311,40 +1311,55 @@ Reference< XShape > ComplexShape::implConvertAndInsert( 
const Reference< XShapes
 
 if( getShapeModel().mbIsSignatureLine )
 {
-// Get the document signatures
-Reference< security::XDocumentDigitalSignatures > xSignatures(
-security::DocumentDigitalSignatures::createWithVersion(
-comphelper::getProcessComponentContext(), "1.2" ) );
-
-uno::Reference xStorage = 
comphelper::OStorageHelper::GetStorageOfFormatFromURL(
-ZIP_STORAGE_FORMAT_STRING, mrDrawing.getFilter().getFileUrl(), 
embed::ElementModes::READ);
-SAL_WARN_IF(!xStorage.is(), "oox.vml", "No xStorage!");
-
-uno::Sequence< security::DocumentSignatureInformation > xSignatureInfo 
=
-xSignatures->verifyScriptingContentSignatures(xStorage, 
uno::Reference< io::XInputStream >());
-
 OUString aGraphicUrl;
-for (int i=0; iverifyScriptingContentSignatures(xStorage,
+
uno::Reference());
+
+for (int i = 0; i < xSignatureInfo.getLength(); i++)
 {
-if (xSignatureInfo[i].SignatureIsValid)
-{
-// Signature is valid, use the 'valid' image
-
SAL_WARN_IF(!xSignatureInfo[i].ValidSignatureLineImage.is(), "oox.vml", "No 
ValidSignatureLineImage!");
-aGraphicUrl = 
rFilter.getGraphicHelper().createGraphicObject(xSignatureInfo[i].ValidSignatureLineImage);
-}
-else
+// Try to find matching signature line image - if none exists 
that is fine,
+// then the signature line is not digitally signed.
+if (xSignatureInfo[i].SignatureLineId == 
getShapeModel().maSignatureId)
 {
-// Signature is invalid, use the 'invalid' image
-
SAL_WARN_IF(!xSignatureInfo[i].InvalidSignatureLineImage.is(), "oox.vml", "No 
InvalidSignatureLineImage!");
-aGraphicUrl = 
rFilter.getGraphicHelper().createGraphicObject(xSignatureInfo[i].InvalidSignatureLineImage);
+if (xSignatureInfo[i].SignatureIsValid)
+{
+// Signature is valid, use the 'valid' image
+
SAL_WARN_IF(!xSignatureInfo[i].ValidSignatureLineImage.is(), "oox.vml",
+"No ValidSignatureLineImage!");
+aGraphicUrl = 
rFilter.getGraphicHelper().createGraphicObject(
+xSignatureInfo[i].ValidSignatureLineImage);
+}
+else
+{
+// Signature is invalid, use the 'invalid' image
+
SAL_WARN_IF(!xSignatureInfo[i].InvalidSignatureLineImage.is(), "oox.vml",
+"No InvalidSignatureLineImage!");
+aGraphicUrl = 
rFilter.getGraphicHelper().createGraphicObject(
+xSignatureInfo[i].InvalidSignatureLineImage);
+}
+ 

[Libreoffice-commits] core.git: Branch 'feature/lok_dialog2' - 8 commits - desktop/source include/LibreOfficeKit include/sfx2 libreofficekit/qa sfx2/source solenv/bin vcl/source

2017-11-28 Thread Jan Holesovsky
Rebased ref, commits from common ancestor:
commit 316a2cf644f08c10045406fee073dee49c88a030
Author: Jan Holesovsky 
Date:   Tue Nov 28 11:52:16 2017 +0100

Fix 'unused parameter' warnings.

Change-Id: I8478e907a66ca918eddc7a543cbcf23e17d9ee5a

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 0261040e4d35..95d4cda6ecd9 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2247,7 +2247,7 @@ static void doc_postKeyEvent(LibreOfficeKitDocument* 
pThis, int nType, int nChar
 pDoc->postKeyEvent(nType, nCharCode, nKeyCode);
 }
 
-static void doc_postDialogKeyEvent(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nType, int nCharCode, int nKeyCode)
+static void doc_postDialogKeyEvent(LibreOfficeKitDocument* /*pThis*/, unsigned 
nLOKWindowId, int nType, int nCharCode, int nKeyCode)
 {
 SolarMutexGuard aGuard;
 
@@ -2425,7 +2425,7 @@ static void doc_postMouseEvent(LibreOfficeKitDocument* 
pThis, int nType, int nX,
 }
 }
 
-static void doc_postDialogMouseEvent(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int 
nModifier)
+static void doc_postDialogMouseEvent(LibreOfficeKitDocument* /*pThis*/, 
unsigned nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int 
nModifier)
 {
 SolarMutexGuard aGuard;
 
@@ -2456,7 +2456,7 @@ static void 
doc_postDialogMouseEvent(LibreOfficeKitDocument* pThis, unsigned nLO
 }
 }
 
-static void doc_postDialogChildMouseEvent(LibreOfficeKitDocument* pThis, 
unsigned nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int 
nModifier)
+static void doc_postDialogChildMouseEvent(LibreOfficeKitDocument* /*pThis*/, 
unsigned nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int 
nModifier)
 {
 SolarMutexGuard aGuard;
 
@@ -3263,7 +3263,7 @@ unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*pTh
 return nullptr;
 }
 
-static void doc_paintDialog(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId,
+static void doc_paintDialog(LibreOfficeKitDocument* /*pThis*/, unsigned 
nLOKWindowId,
 unsigned char* pBuffer,
 const int nX, const int nY,
 const int nWidth, const int nHeight)
@@ -3291,7 +3291,7 @@ static void doc_paintDialog(LibreOfficeKitDocument* 
pThis, unsigned nLOKWindowId
 comphelper::LibreOfficeKit::setDialogPainting(false);
 }
 
-static void doc_paintActiveFloatingWindow(LibreOfficeKitDocument* pThis, 
unsigned nLOKWindowId, unsigned char* pBuffer, int* nWidth, int* nHeight)
+static void doc_paintActiveFloatingWindow(LibreOfficeKitDocument* /*pThis*/, 
unsigned nLOKWindowId, unsigned char* pBuffer, int* nWidth, int* nHeight)
 {
 SolarMutexGuard aGuard;
 
commit 56eca864aa1241ac74d9f2e16cc62e8e66afa177
Author: Pranav Kant 
Date:   Tue Nov 28 02:53:48 2017 +0530

lokdialog: Remove getDialogInfo + update gtktiledviewer accordingly.

Change-Id: I6f810c97f2fadd3b1ea602a97e24c8b42f4a84b9

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ece7600f178d..0261040e4d35 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -615,9 +615,6 @@ static void doc_paintDialog(LibreOfficeKitDocument* pThis, 
unsigned nLOKWindowId
 const int nX, const int nY,
 const int nWidth, const int nHeight);
 
-static void doc_getDialogInfo(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId,
-  char** pDialogTitle, int* nWidth, int* nHeight);
-
 static void doc_paintActiveFloatingWindow(LibreOfficeKitDocument* pThis, 
unsigned nLOKWindowId, unsigned char* pBuffer, int* nWidth, int* nHeight);
 
 LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
 )
@@ -670,7 +667,6 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
getPartHash = doc_getPartHash;
 
 m_pDocumentClass->paintDialog = doc_paintDialog;
-m_pDocumentClass->getDialogInfo = doc_getDialogInfo;
 m_pDocumentClass->paintActiveFloatingWindow = 
doc_paintActiveFloatingWindow;
 
 gDocumentClass = m_pDocumentClass;
@@ -3267,35 +3263,6 @@ unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*pTh
 return nullptr;
 }
 
-static void doc_getDialogInfo(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId,
-  char** pDialogTitle, int* nWidth, int* nHeight)
-{
-// FIXME - I guess we should kill this one, and use only the callback
-// "created"?
-
-SolarMutexGuard aGuard;
-
-VclPtr pWindow = vcl::Window::FindLOKWindow(nLOKWindowId);
-if (!pWindow)
-{
-gImpl->maLastExceptionMsg = "Document doesn't support dialog 
rendering, or window not found.";
-return;
-}
-
-OUString aDialogTitle(pWindow->GetText());
-

[Libreoffice-commits] core.git: comphelper/Library_comphelper.mk comphelper/source include/comphelper include/svx include/xmloff svx/source sw/source xmloff/source

2017-11-28 Thread Katarina Behrens
 comphelper/Library_comphelper.mk   |1 
 comphelper/source/misc/graphicmimetype.cxx |   51 +
 include/comphelper/graphicmimetype.hxx |   27 +
 include/svx/xmlgrhlp.hxx   |   12 +++-
 include/xmloff/xmlexp.hxx  |3 +
 svx/source/xml/xmlgrhlp.cxx|   83 +
 sw/source/filter/xml/xmlexp.cxx|2 
 xmloff/source/core/xmlexp.cxx  |4 +
 xmloff/source/text/txtparae.cxx|   13 +++-
 9 files changed, 145 insertions(+), 51 deletions(-)

New commits:
commit 082cdbc991a2e31556bab53a5b8214cb89138354
Author: Katarina Behrens 
Date:   Mon Sep 4 14:14:39 2017 +0200

tdf#109202: Convert images to desired format in (f)odt filter

Pass down mimetype to SvXMLGraphicHelper

Change-Id: I9c81c06d2a1d6168704440094081e99d0bcbbff9
Reviewed-on: https://gerrit.libreoffice.org/41893
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk
index 6f8b9d07a83a..e997bd5e6f32 100644
--- a/comphelper/Library_comphelper.mk
+++ b/comphelper/Library_comphelper.mk
@@ -106,6 +106,7 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
 comphelper/source/misc/evtmethodhelper \
 comphelper/source/misc/fileurl \
 comphelper/source/misc/getexpandeduri \
+comphelper/source/misc/graphicmimetype \
 comphelper/source/misc/hash \
 comphelper/source/misc/instancelocker \
 comphelper/source/misc/interaction \
diff --git a/comphelper/source/misc/graphicmimetype.cxx 
b/comphelper/source/misc/graphicmimetype.cxx
new file mode 100644
index ..f8eeb3e92de5
--- /dev/null
+++ b/comphelper/source/misc/graphicmimetype.cxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+
+namespace comphelper
+{
+OUString GraphicMimeTypeHelper::GetMimeTypeForExtension(const OString& rExt)
+{
+struct XMLGraphicMimeTypeMapper
+{
+const char* pExt;
+const char* pMimeType;
+};
+
+static const XMLGraphicMimeTypeMapper aMapper[]
+= { { "gif", "image/gif" },   { "png", "image/png" }, { "jpg", 
"image/jpeg" },
+{ "tif", "image/tiff" },  { "svg", "image/svg+xml" }, { "pdf", 
"application/pdf" },
+{ "wmf", "image/x-wmf" }, { "eps", "image/x-eps" },   { "bmp", 
"image/bmp" },
+{ "pct", "image/x-pict" } };
+
+OUString aMimeType;
+
+long const nCount = SAL_N_ELEMENTS(aMapper);
+for (long i = 0; (i < nCount) && aMimeType.isEmpty(); ++i)
+{
+if (rExt == aMapper[i].pExt)
+aMimeType = OUString(aMapper[i].pMimeType, 
strlen(aMapper[i].pMimeType),
+ RTL_TEXTENCODING_ASCII_US);
+}
+
+return aMimeType;
+}
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/comphelper/graphicmimetype.hxx 
b/include/comphelper/graphicmimetype.hxx
new file mode 100644
index ..3f2b5308b2d6
--- /dev/null
+++ b/include/comphelper/graphicmimetype.hxx
@@ -0,0 +1,27 @@
+/* -*- 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/.
+ */
+
+#ifndef INCLUDED_COMPHELPER_GMH_HXX
+#define INCLUDED_COMPHELPER_GMH_HXX
+
+#include 
+#include 
+
+namespace comphelper
+{
+class COMPHELPER_DLLPUBLIC GraphicMimeTypeHelper
+{
+public:
+static OUString GetMimeTypeForExtension(const OString& rExt);
+};
+}
+
+#endif // INCLUDED_COMPHELPER_GMH_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xmlgrhlp.hxx b/include/svx/xmlgrhlp.hxx
index 0c6eaa1d2124..9aff143b3b04 100644
--- a/include/svx/xmlgrhlp.hxx
+++ b/include/svx/xmlgrhlp.hxx
@@ -59,6 +59,7 @@ class 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sw/source

2017-11-28 Thread Caolán McNamara
 sw/source/filter/ww8/ww8par6.cxx |   13 +++--
 sw/source/filter/ww8/ww8scan.cxx |9 -
 2 files changed, 15 insertions(+), 7 deletions(-)

New commits:
commit f3c4dd743c026d9e987656d0abd4979df6f11b30
Author: Caolán McNamara 
Date:   Tue Nov 28 10:55:39 2017 +

ofz: check sprm bounds

and don't reuse results of previous search

Change-Id: I15d55aba260377f2f43627d775adf1a01370ae3e
Reviewed-on: https://gerrit.libreoffice.org/45407
Reviewed-by: Michael Stahl 
Tested-by: Jenkins 

diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index f6bf8446ecbc..3678807b542f 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1266,24 +1266,25 @@ static sal_uInt8 lcl_ReadBorders(bool bVer67, 
WW8_BRCVer9* brc, WW8PLCFx_Cp_FKP*
 {
 if( !bVer67 )
 {
-SprmResult aSprm[4];
-
+SprmResult a8Sprm[4];
 if (pSep->Find4Sprms(
 NS_sprm::sprmSBrcTop80, NS_sprm::sprmSBrcLeft80,
 NS_sprm::sprmSBrcBottom80, NS_sprm::sprmSBrcRight80,
-aSprm[0], aSprm[1], aSprm[2], aSprm[3]))
+a8Sprm[0], a8Sprm[1], a8Sprm[2], a8Sprm[3]))
 {
 for( int i = 0; i < 4; ++i )
-nBorder |= int(SetWW8_BRC(8, brc[i], aSprm[i].pSprm, 
aSprm[i].nRemainingData))<Find4Sprms(
 NS_sprm::sprmSBrcTop, NS_sprm::sprmSBrcLeft,
 NS_sprm::sprmSBrcBottom, NS_sprm::sprmSBrcRight,
-aSprm[0], aSprm[1], aSprm[2], aSprm[3]))
+a9Sprm[0], a9Sprm[1], a9Sprm[2], a9Sprm[3]))
 {
 for( int i = 0; i < 4; ++i )
-nBorder |= int(SetWW8_BRC(9, brc[i], aSprm[i].pSprm, 
aSprm[i].nRemainingData))<

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - solenv/flatpak-manifest.in

2017-11-28 Thread Stephan Bergmann
 solenv/flatpak-manifest.in |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7bbf8cd79bc5968b03a4611e01bf645348143d38
Author: Stephan Bergmann 
Date:   Tue Nov 28 14:52:11 2017 +0100

DBus permissions missing from LO flatpak

...after 243d743dae127fe11ecd7f807121da8815af8f01 
"solenv/flatpak-manifest.in:
incorporate upstream sandboxing improvements", causing
 "Doesn't 
open
files in network shares".

Change-Id: I15d7a170b3ffaf6092ff4d2fe4e93b1dcfd32b0b
(cherry picked from commit 95fbb490e68b044226518a88a109de7ae1c89731)
Reviewed-on: https://gerrit.libreoffice.org/45413
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 2c5a3ff1df47..6e4bc2b2ce81 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -393,6 +393,7 @@
 "--socket=pulseaudio",
 "--filesystem=host",
 "--env=LIBO_FLATPAK=1",
-"--own-name=org.libreoffice.LibreOfficeIpc0"
+"--own-name=org.libreoffice.LibreOfficeIpc0",
+"--talk-name=org.gtk.vfs.*"
 ]
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Caolán McNamara
 sc/source/filter/xml/xmlimprt.cxx |   46 ++
 vcl/workben/fftester.cxx  |   14 +++
 2 files changed, 60 insertions(+)

New commits:
commit f6a2c667d19bb199a97a5822ab718758df421e7f
Author: Caolán McNamara 
Date:   Tue Nov 28 10:18:34 2017 +

add xlsx support to fftester

Change-Id: I07198f24a3e096fab67333cf6a98185d5b40fffc
Reviewed-on: https://gerrit.libreoffice.org/45399
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/filter/xml/xmlimprt.cxx 
b/sc/source/filter/xml/xmlimprt.cxx
index 1bf8d576fe38..e0795f56808d 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -82,6 +82,8 @@
 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -2102,4 +2104,48 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL 
TestImportFODS(SvStream )
 return ret;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportXLSX(SvStream )
+{
+ScDLL::Init();
+
+SfxObjectShellLock xDocSh(new ScDocShell);
+xDocSh->DoInitNew();
+uno::Reference xModel(xDocSh->GetModel());
+
+uno::Reference 
xMultiServiceFactory(comphelper::getProcessServiceFactory());
+uno::Reference xStream(new 
utl::OSeekableInputStreamWrapper(rStream));
+
+uno::Reference 
xFilter(xMultiServiceFactory->createInstance("com.sun.star.comp.oox.xls.ExcelFilter"),
 uno::UNO_QUERY_THROW);
+
+uno::Reference xImporter(xFilter, 
uno::UNO_QUERY_THROW);
+uno::Sequence aArgs(comphelper::InitPropertySequence(
+{
+{ "InputStream", uno::makeAny(xStream) },
+{ "InputMode", uno::makeAny(true) },
+}));
+xImporter->setTargetDocument(xModel);
+
+//SetLoading hack because the document properties will be re-initted
+//by the xml filter and during the init, while its considered 
uninitialized,
+//setting a property will inform the document its modified, which attempts
+//to update the properties, which throws cause the properties are 
uninitialized
+xDocSh->SetLoading(SfxLoadedFlags::NONE);
+bool ret = false;
+try
+{
+ret = xFilter->filter(aArgs);
+}
+catch (const css::io::IOException&)
+{
+}
+catch (const css::lang::WrappedTargetRuntimeException&)
+{
+}
+xDocSh->SetLoading(SfxLoadedFlags::ALL);
+
+xDocSh->DoClose();
+
+return ret;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index 591a28589022..7e78903a625f 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -417,6 +417,20 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 SvFileStream aFileStream(out, StreamMode::READ);
 ret = (int) (*pfnImport)(aFileStream);
 }
+else if (strcmp(argv[2], "xlsx") == 0)
+{
+static FFilterCall pfnImport(nullptr);
+if (!pfnImport)
+{
+osl::Module aLibrary;
+aLibrary.loadRelative(, "libsclo.so", 
SAL_LOADMODULE_LAZY);
+pfnImport = reinterpret_cast(
+aLibrary.getFunctionSymbol("TestImportXLSX"));
+aLibrary.release();
+}
+SvFileStream aFileStream(out, StreamMode::READ);
+ret = (int) (*pfnImport)(aFileStream);
+}
 else if (strcmp(argv[2], "fodp") == 0)
 {
 static FFilterCall pfnImport(nullptr);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: tools/map.cpp

2017-11-28 Thread Michael Meeks
 tools/map.cpp |   44 +++-
 1 file changed, 43 insertions(+), 1 deletion(-)

New commits:
commit 2fb4521a9cd296163c87c7f24e3b3d9bd9966dd8
Author: Michael Meeks 
Date:   Tue Nov 28 18:08:26 2017 +

Dump unshared heap memory ascii-art map by page..

Change-Id: I21ef386958e651b53b4d8eef434958a20adcbe68

diff --git a/tools/map.cpp b/tools/map.cpp
index 7bab3f17..cd7fd788 100644
--- a/tools/map.cpp
+++ b/tools/map.cpp
@@ -23,6 +23,7 @@
 #include 
 #include 
 
+typedef unsigned long long addr_t;
 
 #define MAP_SIZE 20
 #define PATH_SIZE 1000 // No harm in having it much larger than strictly 
necessary. Avoids compiler warning.
@@ -79,12 +80,52 @@ static int read_buffer(char *buffer, unsigned size,
 return total_bytes;
 }
 
+
+static void dump_unshared(unsigned proc_id, const std::vector 
)
+{
+char path_proc[PATH_SIZE];
+snprintf(path_proc, sizeof(path_proc), "/proc/%d/pagemap", proc_id);
+int fd = open(path_proc, 0);
+if (fd < 0)
+error(EXIT_FAILURE, errno, "Failed to open %s", path_proc);
+
+printf("Sharing map:\n");
+addr_t numShared = 0, numOwn = 0;
+for (auto p : heapVAddresses)
+{
+if (lseek(fd, (p / 0x1000 * 8), SEEK_SET) < 0)
+error(EXIT_FAILURE, errno, "Failed to seek in pagemap");
+addr_t vaddrData;
+if (read(fd, , 8) < 0)
+error(EXIT_FAILURE, errno, "Failed to read vaddrdata");
+{
+// https://patchwork.kernel.org/patch/6787921/
+//fprintf(stderr, "addr: 0x%8llx bits: 0x%8llx : %s\n", p, 
vaddrData,
+//(vaddrData & ((addr_t)1 << 56)) ? "unshared" : "shared");
+if (vaddrData & ((addr_t)1 << 56))
+{
+numOwn++;
+printf("*");
+}
+else
+{
+numShared++;
+printf(".");
+}
+}
+if (!((numShared + numOwn) % 128))
+printf("\n");
+}
+printf ("\nTotals:\n");
+printf ("\tshared   %5lld (%lldkB)\n", numShared, numShared * 4);
+printf ("\tunshared %5lld (%lldkB)\n", numOwn, numOwn * 4);
+}
+
 static void total_smaps(unsigned proc_id, const char *file, const char 
*cmdline)
 {
 FILE *file_pointer;
 char buffer[BUFFER_SIZE];
 
-typedef unsigned long long addr_t;
 addr_t total_private_dirty = 0ull;
 addr_t total_private_clean = 0ull;
 addr_t total_shared_dirty = 0ull;
@@ -154,6 +195,7 @@ static void total_smaps(unsigned proc_id, const char *file, 
const char *cmdline)
 printf("--\n");
 printf("Heap page cnt :%20lld\n", (addr_t)heapVAddresses.size());
 printf("\n");
+dump_unshared(proc_id, heapVAddresses);
 }
 
 int main(int argc, char **argv)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 9 commits - kit/ChildSession.cpp kit/ChildSession.hpp kit/Kit.cpp loleaflet/dist loleaflet/src test/WhiteBoxTests.cpp wsd/ClientSession.cpp wsd/DocumentBroker.cpp

2017-11-28 Thread Pranav Kant
 kit/ChildSession.cpp   |  142 +++---
 kit/ChildSession.hpp   |   15 ++
 kit/Kit.cpp|  122 +-
 loleaflet/dist/loleaflet.css   |1 
 loleaflet/src/control/Control.LokDialog.js |  158 ++---
 loleaflet/src/control/Control.Menubar.js   |2 
 loleaflet/src/control/Toolbar.js   |   14 --
 test/WhiteBoxTests.cpp |2 
 wsd/ClientSession.cpp  |4 
 wsd/DocumentBroker.cpp |   40 ---
 10 files changed, 253 insertions(+), 247 deletions(-)

New commits:
commit c996c04d8e2444a64784cf1ad8d7efa8519f4267
Author: Pranav Kant 
Date:   Tue Nov 28 02:13:05 2017 +0530

lokdialog: Remove dialog artifacts after socket disconnection

Change-Id: I199178761cfa715043185964142c9156e1a0b50f

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index 302005b7..853972a8 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -13,10 +13,18 @@ L.Control.LokDialog = L.Control.extend({
map.on('dialogchild', this._onDialogChildMsg, this);
map.on('dialog', this._onDialogMsg, this);
map.on('opendialog', this._openDialog, this);
+   map.on('docloaded', this._docLoaded, this);
},
 
_dialogs: {},
 
+   _docLoaded: function(e) {
+   if (!e.status) {
+   $('.lokdialog_container').remove();
+   $('.lokdialogchild-canvas').remove();
+   }
+   },
+
_isOpen: function(dialogId) {
return this._dialogs[dialogId] &&
this._dialogs[dialogId].open &&
commit b6117c2182082ef2a76afe105f5de30f69da534e
Author: Pranav Kant 
Date:   Tue Nov 28 01:51:28 2017 +0530

lokdialog: Handle size_changed; factor out common code

Change-Id: Ie4374ae1e2f5ba29b239cb37eb9fe4c5991094b0

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index d7bbb7f1..302005b7 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -27,6 +27,21 @@ L.Control.LokDialog = L.Control.extend({
return dialogId.replace(this.dialogIdPrefix, '');
},
 
+   // Create a rectangle string of form "x,y,width,height"
+   // if params are missing, assumes 0,0,dialog width, dialog height
+   _createRectStr: function(x, y, width, height) {
+   if (!width)
+   width = this._width;
+   if (!height)
+   height = this._height;
+   if (!x)
+   x = 0;
+   if (!y)
+   y = 0;
+
+   return [x, y, width, height].join(',');
+   },
+
_sendDialogCommand: function(dialogId, rectangle, child) {
dialogId = dialogId.replace(this.dialogIdPrefix, '');
 
@@ -45,16 +60,21 @@ L.Control.LokDialog = L.Control.extend({
if (e.action === 'created') {
this._width = parseInt(e.size.split(',')[0]);
this._height = parseInt(e.size.split(',')[1]);
+
this._launchDialog(e.dialogId);
-   var boundsString = '0,0,' + this._width + ',' + 
this._height; // no spaces in string
-   this._sendDialogCommand(e.dialogId, boundsString);
+   this._sendDialogCommand(e.dialogId, 
this._createRectStr());
} else if (e.action === 'invalidate') {
// ignore any invalidate callbacks when we have closed 
the dialog
if (this._isOpen(e.dialogId)) {
if (!e.rectangle)
-   e.rectangle = '0,0' + this._width + ',' 
+ this._height;
+   e.rectangle = '0,0,' + this._width + 
',' + this._height;
this._sendDialogCommand(e.dialogId, 
e.rectangle);
}
+   } else if (e.action === 'size_changed') {
+   this._width = parseInt(e.size.split(',')[0]);
+   this._height = parseInt(e.size.split(',')[1]);
+
+   this._sendDialogCommand(e.dialogId, 
this._createRectStr());
} else if (e.action === 'cursor_invalidate') {
if (this._isOpen(e.dialogId) && !!e.rectangle) {
var rectangle = e.rectangle.split(',');
@@ -88,14 +108,14 @@ L.Control.LokDialog = L.Control.extend({
L.DomUtil.addClass(cursor, 'blinking-cursor');
},
 
-   _launchDialog: function(dialogId, width, height) {

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - package/source

2017-11-28 Thread Caolán McNamara
 package/source/zipapi/MemoryByteGrabber.hxx |2 ++
 package/source/zipapi/ZipFile.cxx   |3 +++
 2 files changed, 5 insertions(+)

New commits:
commit 2867c32c99b85e42b018266988dc8f7796c1fc77
Author: Caolán McNamara 
Date:   Mon Nov 27 16:29:37 2017 +

keep track of available data

Change-Id: Idc54cdef0f3a4355a7e26f25cdc5b50d65d9d583
Reviewed-on: https://gerrit.libreoffice.org/45353
Reviewed-by: Michael Stahl 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/package/source/zipapi/MemoryByteGrabber.hxx 
b/package/source/zipapi/MemoryByteGrabber.hxx
index 1366eea478b0..5417406db379 100644
--- a/package/source/zipapi/MemoryByteGrabber.hxx
+++ b/package/source/zipapi/MemoryByteGrabber.hxx
@@ -36,6 +36,8 @@ public:
 }
 const sal_Int8 * getCurrentPos () { return mpBuffer + mnCurrent; }
 
+sal_Int32 remainingSize() const { return mnEnd - mnCurrent; }
+
 // XInputStream chained
 
 /// @throws css::io::NotConnectedException
diff --git a/package/source/zipapi/ZipFile.cxx 
b/package/source/zipapi/ZipFile.cxx
index b7cdf7289d4c..61f7ea1dacc1 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -934,6 +934,9 @@ sal_Int32 ZipFile::readCEN()
 if ( aEntry.nExtraLen < 0 )
 throw ZipException("unexpected extra header info length" );
 
+if (aEntry.nPathLen > aMemGrabber.remainingSize())
+throw ZipException("name too long");
+
 // read always in UTF8, some tools seem not to set UTF8 bit
 aEntry.sPath = OUString::intern ( reinterpret_cast(aMemGrabber.getCurrentPos()),
aEntry.nPathLen,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Caolán McNamara
 sw/source/filter/ww8/ww8par6.cxx |   13 +++--
 sw/source/filter/ww8/ww8scan.cxx |9 -
 2 files changed, 15 insertions(+), 7 deletions(-)

New commits:
commit 0541dd30d3c8a650531d2ff7dd3a6d52aa66a633
Author: Caolán McNamara 
Date:   Tue Nov 28 10:55:39 2017 +

ofz: check sprm bounds

and don't reuse results of previous search

Change-Id: I15d55aba260377f2f43627d775adf1a01370ae3e
Reviewed-on: https://gerrit.libreoffice.org/45408
Reviewed-by: Michael Stahl 
Tested-by: Jenkins 

diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 81efda11a8e2..e65aa9af86a7 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1269,24 +1269,25 @@ static sal_uInt8 lcl_ReadBorders(bool bVer67, 
WW8_BRCVer9* brc, WW8PLCFx_Cp_FKP*
 {
 if( !bVer67 )
 {
-SprmResult aSprm[4];
-
+SprmResult a8Sprm[4];
 if (pSep->Find4Sprms(
 NS_sprm::sprmSBrcTop80, NS_sprm::sprmSBrcLeft80,
 NS_sprm::sprmSBrcBottom80, NS_sprm::sprmSBrcRight80,
-aSprm[0], aSprm[1], aSprm[2], aSprm[3]))
+a8Sprm[0], a8Sprm[1], a8Sprm[2], a8Sprm[3]))
 {
 for( int i = 0; i < 4; ++i )
-nBorder |= int(SetWW8_BRC(8, brc[i], aSprm[i].pSprm, 
aSprm[i].nRemainingData))<Find4Sprms(
 NS_sprm::sprmSBrcTop, NS_sprm::sprmSBrcLeft,
 NS_sprm::sprmSBrcBottom, NS_sprm::sprmSBrcRight,
-aSprm[0], aSprm[1], aSprm[2], aSprm[3]))
+a9Sprm[0], a9Sprm[1], a9Sprm[2], a9Sprm[3]))
 {
 for( int i = 0; i < 4; ++i )
-nBorder |= int(SetWW8_BRC(9, brc[i], aSprm[i].pSprm, 
aSprm[i].nRemainingData))<

[Libreoffice-commits] online.git: tools/map.cpp

2017-11-28 Thread Michael Meeks
 tools/map.cpp |   61 +++---
 1 file changed, 42 insertions(+), 19 deletions(-)

New commits:
commit 5540fc0b7f6fda918430724a6523c685d1876b9d
Author: Michael Meeks 
Date:   Tue Nov 28 17:27:08 2017 +

Cleanup, memory map dumper, add  mode, and collect heap pages.

Change-Id: I14e428b96c591e84ec9f50f0a75782c97660944b

diff --git a/tools/map.cpp b/tools/map.cpp
index e5e16777..7bab3f17 100644
--- a/tools/map.cpp
+++ b/tools/map.cpp
@@ -9,6 +9,9 @@
 
 #include "config.h"
 
+#include 
+
+#include 
 #include 
 #include 
 #include 
@@ -20,6 +23,7 @@
 #include 
 #include 
 
+
 #define MAP_SIZE 20
 #define PATH_SIZE 1000 // No harm in having it much larger than strictly 
necessary. Avoids compiler warning.
 #define BUFFER_SIZE 9600
@@ -80,18 +84,35 @@ static void total_smaps(unsigned proc_id, const char *file, 
const char *cmdline)
 FILE *file_pointer;
 char buffer[BUFFER_SIZE];
 
-unsigned long long total_private_dirty = 0ull;
-unsigned long long total_private_clean = 0ull;
-unsigned long long total_shared_dirty = 0ull;
-unsigned long long total_shared_clean = 0ull;
-unsigned long long smap_value;
+typedef unsigned long long addr_t;
+addr_t total_private_dirty = 0ull;
+addr_t total_private_clean = 0ull;
+addr_t total_shared_dirty = 0ull;
+addr_t total_shared_clean = 0ull;
+addr_t smap_value;
 char smap_key[MAP_SIZE];
 
+std::vector heapVAddresses;
+
 if ((file_pointer = fopen(file, "r")) == nullptr)
 error(EXIT_FAILURE, errno, "%s", file);
 
 while (fgets(buffer, sizeof(buffer), file_pointer))
 {
+// collect heap page details
+if (strstr(buffer, "[heap]"))
+{
+addr_t start, end;
+// 012d-0372f000 rw-p  00:00 0  [heap]
+if (sscanf(buffer, "%llx-%llx rw-p", , ) == 2)
+{
+for (addr_t p = start; p < end; p += 0x1000)
+heapVAddresses.push_back(p);
+}
+else
+fprintf (stderr, "malformed heap line '%s'\n", buffer);
+}
+
 if (buffer[0] >= 'A' && buffer[0] <= 'Z')
 {
 if (sscanf(buffer, "%20[^:]: %llu", smap_key, _value) == 2)
@@ -120,9 +141,6 @@ static void total_smaps(unsigned proc_id, const char *file, 
const char *cmdline)
 }
 }
 
-if (errno)
-error(EXIT_FAILURE, errno, "%s\n", cmdline);
-
 printf("%s\n", cmdline);
 printf("Process ID:%20d\n", proc_id);
 printf("--\n");
@@ -132,7 +150,10 @@ static void total_smaps(unsigned proc_id, const char 
*file, const char *cmdline)
 printf("Private Dirty :%20lld kB\n", total_private_dirty);
 printf("--\n");
 printf("Shared:%20lld kB\n", total_shared_clean + 
total_shared_dirty);
-printf("Private   :%20lld kB\n\n", total_private_clean + 
total_private_dirty);
+printf("Private   :%20lld kB\n", total_private_clean + 
total_private_dirty);
+printf("--\n");
+printf("Heap page cnt :%20lld\n", (addr_t)heapVAddresses.size());
+printf("\n");
 }
 
 int main(int argc, char **argv)
@@ -140,15 +161,21 @@ int main(int argc, char **argv)
 DIR *root_proc;
 struct dirent *dir_proc;
 
-unsigned pid_proc;
 char path_proc[PATH_SIZE];
 char cmdline[BUFFER_SIZE];
+unsigned forPid = 0;
 
 setlocale (LC_ALL, "");
 getopt(argc, argv, "");
 
-if (argc != 2)
-error(EXIT_FAILURE, EINVAL, "incorrect arguments");
+if (argc < 1 || strstr(argv[1], "--help"))
+{
+fprintf(stderr, "Usage: loolmap \n");
+fprintf(stderr, "Dump memory map information for a given process\n");
+return 0;
+}
+
+forPid = atoi(argv[1]);
 
 root_proc = opendir("/proc");
 if (!root_proc)
@@ -161,11 +188,10 @@ int main(int argc, char **argv)
 
 if (*dir_proc->d_name > '0' && *dir_proc->d_name <= '9')
 {
-pid_proc = strtoul(dir_proc->d_name, nullptr, 10);
+unsigned pid_proc = strtoul(dir_proc->d_name, nullptr, 10);
 snprintf(path_proc, sizeof(path_proc), "/proc/%s/%s", 
dir_proc->d_name, "cmdline");
 if (read_buffer(cmdline, sizeof(cmdline), path_proc, ' ') &&
-strstr(cmdline, argv[1]) &&
-!strstr(cmdline, argv[0]))
+(forPid == pid_proc || (forPid == 0 && strstr(cmdline, 
argv[1]) && !strstr(cmdline, argv[0]
 {
 snprintf(path_proc, sizeof(path_proc), "/proc/%s/%s", 
dir_proc->d_name, "smaps");
 total_smaps(pid_proc, path_proc, cmdline);
@@ -173,10 +199,7 @@ int main(int argc, char **argv)
 }
 }
 
-if (errno)
-error(EXIT_FAILURE, errno, "fail");
-
-  return EXIT_SUCCESS;
+return EXIT_SUCCESS;
 }
 
 /* vim:set 

[Libreoffice-commits] core.git: external/libcmis

2017-11-28 Thread Stephan Bergmann
 external/libcmis/StaticLibrary_libcmis.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c8e37ef268cae23a92c298721f1493daeda323c2
Author: Stephan Bergmann 
Date:   Tue Nov 28 13:45:00 2017 +0100

external/libcmis: Falling back to C++03 is too drastic

e.g. when compiling against system libxml2, which in turn includes system
ICU include files, which may use C++11 chart16_t.  So assume that 
-std=gnu++14
is acceptable for any GCC version for which at least on of -std=gnu++17,
-std=gnu++1z, -std=c++17, -std=c++1z is acceptable, and just fall back to 
C++14.

Change-Id: Id9f07ab4f419e5683f4fb9c9b2d3bdda251cdd1b
Reviewed-on: https://gerrit.libreoffice.org/45409
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/external/libcmis/StaticLibrary_libcmis.mk 
b/external/libcmis/StaticLibrary_libcmis.mk
index b3940b7a749a..39b9545d5345 100644
--- a/external/libcmis/StaticLibrary_libcmis.mk
+++ b/external/libcmis/StaticLibrary_libcmis.mk
@@ -23,14 +23,14 @@ $(eval $(call gb_StaticLibrary_add_cxxflags,libcmis,\
 ))
 endif
 
-# Build as C++03 if necessary to avoid GCC C++17 "error: ISO C++1z does not
+# Build as C++14 if necessary to avoid GCC C++17 "error: ISO C++1z does not
 # allow dynamic exception specifications", until upstream libcmis is ported to
 # C++17:
 ifeq ($(COM)-$(COM_IS_CLANG),GCC-)
 $(eval $(call gb_StaticLibrary_add_cxxflags,libcmis, \
 $(if $(filter -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z, \
 $(CXXFLAGS_CXX11)), \
-$(gb_CXX03FLAGS)) \
+-std=gnu++14) \
 ))
 endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Caolán McNamara
 sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx |2 +-
 sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0888f29b1b3be991a01c58fb380a121fe96b00cb
Author: Caolán McNamara 
Date:   Tue Nov 28 09:51:54 2017 +

coverity#1421075 Uncaught exception

Change-Id: I23463d4610f886d5c817f3682e08c0f683c8de98
Reviewed-on: https://gerrit.libreoffice.org/45395
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx 
b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx
index 4a0a6e7a3a7e..e025459adb8e 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx
@@ -53,7 +53,7 @@ class InsertionIndicatorOverlay
 {
 public:
 InsertionIndicatorOverlay (SlideSorter& rSlideSorter);
-virtual ~InsertionIndicatorOverlay() override;
+virtual ~InsertionIndicatorOverlay() COVERITY_NOEXCEPT_FALSE override;
 
 virtual void SetLayerInvalidator (const SharedILayerInvalidator& 
rpInvalidator) override;
 
diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx 
b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
index 5dbf25ace0a5..96e7278faead 100644
--- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
+++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
@@ -75,7 +75,7 @@ InsertionIndicatorOverlay::InsertionIndicatorOverlay 
(SlideSorter& rSlideSorter)
 {
 }
 
-InsertionIndicatorOverlay::~InsertionIndicatorOverlay()
+InsertionIndicatorOverlay::~InsertionIndicatorOverlay() COVERITY_NOEXCEPT_FALSE
 {
 Hide();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/lok_dialog2' - 4 commits - desktop/source include/LibreOfficeKit libreofficekit/qa sfx2/source vcl/source

2017-11-28 Thread Jan Holesovsky
Rebased ref, commits from common ancestor:
commit 88e2e09332fc1c8578ee4acd8d2f67036600bf8a
Author: Jan Holesovsky 
Date:   Tue Nov 28 11:52:16 2017 +0100

Fix 'unused parameter' warnings.

Change-Id: I8478e907a66ca918eddc7a543cbcf23e17d9ee5a

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 0261040e4d35..95d4cda6ecd9 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2247,7 +2247,7 @@ static void doc_postKeyEvent(LibreOfficeKitDocument* 
pThis, int nType, int nChar
 pDoc->postKeyEvent(nType, nCharCode, nKeyCode);
 }
 
-static void doc_postDialogKeyEvent(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nType, int nCharCode, int nKeyCode)
+static void doc_postDialogKeyEvent(LibreOfficeKitDocument* /*pThis*/, unsigned 
nLOKWindowId, int nType, int nCharCode, int nKeyCode)
 {
 SolarMutexGuard aGuard;
 
@@ -2425,7 +2425,7 @@ static void doc_postMouseEvent(LibreOfficeKitDocument* 
pThis, int nType, int nX,
 }
 }
 
-static void doc_postDialogMouseEvent(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int 
nModifier)
+static void doc_postDialogMouseEvent(LibreOfficeKitDocument* /*pThis*/, 
unsigned nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int 
nModifier)
 {
 SolarMutexGuard aGuard;
 
@@ -2456,7 +2456,7 @@ static void 
doc_postDialogMouseEvent(LibreOfficeKitDocument* pThis, unsigned nLO
 }
 }
 
-static void doc_postDialogChildMouseEvent(LibreOfficeKitDocument* pThis, 
unsigned nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int 
nModifier)
+static void doc_postDialogChildMouseEvent(LibreOfficeKitDocument* /*pThis*/, 
unsigned nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int 
nModifier)
 {
 SolarMutexGuard aGuard;
 
@@ -3263,7 +3263,7 @@ unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*pTh
 return nullptr;
 }
 
-static void doc_paintDialog(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId,
+static void doc_paintDialog(LibreOfficeKitDocument* /*pThis*/, unsigned 
nLOKWindowId,
 unsigned char* pBuffer,
 const int nX, const int nY,
 const int nWidth, const int nHeight)
@@ -3291,7 +3291,7 @@ static void doc_paintDialog(LibreOfficeKitDocument* 
pThis, unsigned nLOKWindowId
 comphelper::LibreOfficeKit::setDialogPainting(false);
 }
 
-static void doc_paintActiveFloatingWindow(LibreOfficeKitDocument* pThis, 
unsigned nLOKWindowId, unsigned char* pBuffer, int* nWidth, int* nHeight)
+static void doc_paintActiveFloatingWindow(LibreOfficeKitDocument* /*pThis*/, 
unsigned nLOKWindowId, unsigned char* pBuffer, int* nWidth, int* nHeight)
 {
 SolarMutexGuard aGuard;
 
commit 5e93c36d8eabbb6ae9b0a3505d68f21ad62addb7
Author: Pranav Kant 
Date:   Tue Nov 28 02:53:48 2017 +0530

lokdialog: Remove getDialogInfo + update gtktiledviewer accordingly.

Change-Id: I6f810c97f2fadd3b1ea602a97e24c8b42f4a84b9

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ece7600f178d..0261040e4d35 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -615,9 +615,6 @@ static void doc_paintDialog(LibreOfficeKitDocument* pThis, 
unsigned nLOKWindowId
 const int nX, const int nY,
 const int nWidth, const int nHeight);
 
-static void doc_getDialogInfo(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId,
-  char** pDialogTitle, int* nWidth, int* nHeight);
-
 static void doc_paintActiveFloatingWindow(LibreOfficeKitDocument* pThis, 
unsigned nLOKWindowId, unsigned char* pBuffer, int* nWidth, int* nHeight);
 
 LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
 )
@@ -670,7 +667,6 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
getPartHash = doc_getPartHash;
 
 m_pDocumentClass->paintDialog = doc_paintDialog;
-m_pDocumentClass->getDialogInfo = doc_getDialogInfo;
 m_pDocumentClass->paintActiveFloatingWindow = 
doc_paintActiveFloatingWindow;
 
 gDocumentClass = m_pDocumentClass;
@@ -3267,35 +3263,6 @@ unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*pTh
 return nullptr;
 }
 
-static void doc_getDialogInfo(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId,
-  char** pDialogTitle, int* nWidth, int* nHeight)
-{
-// FIXME - I guess we should kill this one, and use only the callback
-// "created"?
-
-SolarMutexGuard aGuard;
-
-VclPtr pWindow = vcl::Window::FindLOKWindow(nLOKWindowId);
-if (!pWindow)
-{
-gImpl->maLastExceptionMsg = "Document doesn't support dialog 
rendering, or window not found.";
-return;
-}
-
-OUString aDialogTitle(pWindow->GetText());
-

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

2017-11-28 Thread Caolán McNamara
 sw/source/filter/ww8/ww8par6.cxx |   13 +++--
 sw/source/filter/ww8/ww8scan.cxx |9 -
 2 files changed, 15 insertions(+), 7 deletions(-)

New commits:
commit 97dabf63f6d0a432afcd176f669b272ca939a29f
Author: Caolán McNamara 
Date:   Tue Nov 28 10:55:39 2017 +

ofz#4471 check sprm bounds

and don't reuse results of previous search

Change-Id: I15d55aba260377f2f43627d775adf1a01370ae3e
Reviewed-on: https://gerrit.libreoffice.org/45406
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index f6bf8446ecbc..3678807b542f 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1266,24 +1266,25 @@ static sal_uInt8 lcl_ReadBorders(bool bVer67, 
WW8_BRCVer9* brc, WW8PLCFx_Cp_FKP*
 {
 if( !bVer67 )
 {
-SprmResult aSprm[4];
-
+SprmResult a8Sprm[4];
 if (pSep->Find4Sprms(
 NS_sprm::sprmSBrcTop80, NS_sprm::sprmSBrcLeft80,
 NS_sprm::sprmSBrcBottom80, NS_sprm::sprmSBrcRight80,
-aSprm[0], aSprm[1], aSprm[2], aSprm[3]))
+a8Sprm[0], a8Sprm[1], a8Sprm[2], a8Sprm[3]))
 {
 for( int i = 0; i < 4; ++i )
-nBorder |= int(SetWW8_BRC(8, brc[i], aSprm[i].pSprm, 
aSprm[i].nRemainingData))<Find4Sprms(
 NS_sprm::sprmSBrcTop, NS_sprm::sprmSBrcLeft,
 NS_sprm::sprmSBrcBottom, NS_sprm::sprmSBrcRight,
-aSprm[0], aSprm[1], aSprm[2], aSprm[3]))
+a9Sprm[0], a9Sprm[1], a9Sprm[2], a9Sprm[3]))
 {
 for( int i = 0; i < 4; ++i )
-nBorder |= int(SetWW8_BRC(9, brc[i], aSprm[i].pSprm, 
aSprm[i].nRemainingData))<

[Libreoffice-commits] buildbot.git: tb/tb_internals.sh

2017-11-28 Thread Thorsten Behrens
 tb/tb_internals.sh |   15 +++
 1 file changed, 15 insertions(+)

New commits:
commit dde53d324138e1e4f8964f779153a3df8e03f40e
Author: Thorsten Behrens 
Date:   Tue Nov 28 17:46:39 2017 +0100

Add missing branch default names

Change-Id: Idd7351851b84307d6f0fe4ef00d192aeef167927
Reviewed-on: https://gerrit.libreoffice.org/45432
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/tb/tb_internals.sh b/tb/tb_internals.sh
index 0f514fb..f949396 100644
--- a/tb/tb_internals.sh
+++ b/tb/tb_internals.sh
@@ -195,6 +195,21 @@ determine_default_tinderbox_branch()
 libreoffice-5-0)
 echo "${b?}"
 ;;
+libreoffice-5-1)
+echo "${b?}"
+;;
+libreoffice-5-2)
+echo "${b?}"
+;;
+libreoffice-5-3)
+echo "${b?}"
+;;
+libreoffice-5-4)
+echo "${b?}"
+;;
+libreoffice-6-0)
+echo "${b?}"
+;;
 esac
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Andrea Gelmini
 hwpfilter/source/hwpeq.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 46f091f714f3f29a88c801b1903e229b4a0a79b2
Author: Andrea Gelmini 
Date:   Tue Nov 28 17:21:16 2017 +0100

Fix typo

Change-Id: I4de461692ac261600c1b0b760ffb94156893fa0d
Reviewed-on: https://gerrit.libreoffice.org/45429
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx
index 5be9ad7c2603..979a1b1d4673 100644
--- a/hwpfilter/source/hwpeq.cxx
+++ b/hwpfilter/source/hwpeq.cxx
@@ -481,7 +481,7 @@ void push_token(MzString const , MzString const 
, istream *strm)
  * It returns the length of the read tokens.
  *
  * control char, control sequence, binary sequence,
- * alphabet string, sigle character */
+ * alphabet string, single character */
 static int next_token(MzString , MzString , istream *strm)
 {
   std::istream::int_type ch = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Stephan Bergmann
 compilerplugins/clang/unnecessaryparen.cxx |6 +++---
 sal/osl/unx/file_volume.cxx|2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c421ac3f9432f2e9468d28447dc4c2e45b6f4da3
Author: Stephan Bergmann 
Date:   Tue Nov 28 16:52:16 2017 +0100

Revert loplugin:unnecessaryparen warning around integer literals

...as those may be used to silence Clang -Werror,-Wunreachable-code (as 
happens
in sal/osl/unx/file_volume.cxx for Android, where OSL_detail_STATFS(...) 
always
expands to (1)).

Change-Id: I85d280c1315b4447362255d17f13f437d3c4af92

diff --git a/compilerplugins/clang/unnecessaryparen.cxx 
b/compilerplugins/clang/unnecessaryparen.cxx
index 046176a64150..903ce4e611ba 100644
--- a/compilerplugins/clang/unnecessaryparen.cxx
+++ b/compilerplugins/clang/unnecessaryparen.cxx
@@ -149,9 +149,9 @@ bool UnnecessaryParen::VisitParenExpr(const ParenExpr* 
parenExpr)
 << parenExpr->getSourceRange();
 handled_.insert(parenExpr);
 }
-} else if (isa(subExpr) || isa(subExpr)
-   || isa(subExpr) || 
isa(subExpr)
-   || isa(subExpr))
+} else if (isa(subExpr) || isa(subExpr)
+   || isa(subExpr) || 
isa(subExpr))
+//TODO: isa(subExpr)
 //TODO: isa(subExpr) || 
isa(subExpr)
 {
 auto const loc = subExpr->getLocStart();
diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx
index 116874569b62..5dc41cc0f7ea 100644
--- a/sal/osl/unx/file_volume.cxx
+++ b/sal/osl/unx/file_volume.cxx
@@ -216,7 +216,7 @@ static oslFileError osl_psz_getVolumeInformation (
 {
 OSL_detail_STATFS_STRUCT sfs;
 OSL_detail_STATFS_INIT(sfs);
-if ((OSL_detail_STATFS(pszDirectory, )) < 0)
+if ((OSL_detail_STATFS(pszDirectory, )) < (0))
 {
 oslFileError result = oslTranslateFileError(errno);
 return result;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-11-28 Thread Olivier Hallot
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit facd4c99e7ae7857890a510cf122e3fb8b52d61f
Author: Olivier Hallot 
Date:   Tue Nov 28 11:29:39 2017 -0200

Updated core
Project: help  840ceaafbe4f723661c10539ed2915298cf77c5f

Fix hid2file.js

Change-Id: I976801b1e84defd3f8588a3423acc4254098c237
Reviewed-on: https://gerrit.libreoffice.org/45411
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 8aff7a4747fb..840ceaafbe4f 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 8aff7a4747fbabc5d8db9c9c52c1e67684965fd4
+Subproject commit 840ceaafbe4f723661c10539ed2915298cf77c5f
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: help3xsl/xhp2html.sh

2017-11-28 Thread Olivier Hallot
 help3xsl/xhp2html.sh |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 840ceaafbe4f723661c10539ed2915298cf77c5f
Author: Olivier Hallot 
Date:   Tue Nov 28 11:29:39 2017 -0200

Fix hid2file.js

Change-Id: I976801b1e84defd3f8588a3423acc4254098c237
Reviewed-on: https://gerrit.libreoffice.org/45411
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/help3xsl/xhp2html.sh b/help3xsl/xhp2html.sh
index 98622376b..de146e387 100755
--- a/help3xsl/xhp2html.sh
+++ b/help3xsl/xhp2html.sh
@@ -208,12 +208,12 @@ echo "execing: ${exedir}/helpex"
 
 ###
 #
-# Create the bookmark2file map
+# Create the hid2file map
 #
 ###
 stub1='var map={'
 stub2='};'
-ffile='html/'$productversion'/bookmark2file.js'
+ffile='html/'$productversion'/hid2file.js'
 ffile2=/tmp/tmpbkm.txt
 rm -f $ffile2 $ffile
 find $helpfiles -type f -name "*.xhp" -exec xsltproc get_url.xsl {} + > $ffile2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - oox/source

2017-11-28 Thread Caolán McNamara
 oox/source/vml/vmlformatting.cxx |   22 ++
 1 file changed, 14 insertions(+), 8 deletions(-)

New commits:
commit e3dc0612e1e75e53c0483755c6dc2d47db938c91
Author: Caolán McNamara 
Date:   Tue Nov 28 09:06:02 2017 +

ofz: ensure aCoordList has required elements

Change-Id: I6687f7e499907f2f44ade2b05b35e40570dabc6b
Reviewed-on: https://gerrit.libreoffice.org/45391
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 2cbb4ca24fca..a5d75346284d 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -311,7 +311,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< 
::std::vector< Point > >& r
 {
 switch ( state )
 {
-case MOVE_REL: // 2* params -> param count reset
+case MOVE_REL:
+aCoordList.resize(2, 0); // 2* params -> param count reset
 if ( rPointLists.size() > 0 && rPointLists.back().size() > 
0 )
 {
 rPointLists.push_back( ::std::vector< Point >() );
@@ -323,18 +324,20 @@ void ConversionHelper::decodeVmlPath( ::std::vector< 
::std::vector< Point > >& r
 nParamCount = 2;
 break;
 
-case MOVE_ABS: // 2 params -> no param count reset
+case MOVE_ABS:
+aCoordList.resize(2, 0); // 2 params -> no param count 
reset
 if ( rPointLists.size() > 0 && rPointLists.back().size() > 
0 )
 {
 rPointLists.push_back( ::std::vector< Point >() );
 rFlagLists.push_back( ::std::vector< PolygonFlags >() 
);
 }
-rPointLists.back().push_back( Point( (aCoordList[ 0 ]), 
(aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) ) );
+rPointLists.back().push_back( Point( (aCoordList[ 0 ]), 
aCoordList[ 1 ] ) );
 rFlagLists.back().push_back( PolygonFlags_NORMAL );
 aCurrentPoint = rPointLists.back().back();
 break;
 
-case BEZIER_REL: // 6* params -> param count reset
+case BEZIER_REL:
+aCoordList.resize(6, 0); // 6* params -> param count reset
 rPointLists.back().push_back( Point( aCurrentPoint.X + 
aCoordList[ 0 ],
 aCurrentPoint.Y + aCoordList[ 1 ] 
) );
 rPointLists.back().push_back( Point( aCurrentPoint.X + 
aCoordList[ 2 ],
@@ -348,7 +351,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< 
::std::vector< Point > >& r
 nParamCount = 6;
 break;
 
-case BEZIER_ABS: // 6* params -> param count reset
+case BEZIER_ABS:
+aCoordList.resize(6, 0); // 6* params -> param count reset
 rPointLists.back().push_back( Point( aCoordList[ 0 ], 
aCoordList[ 1 ] ) );
 rPointLists.back().push_back( Point( aCoordList[ 2 ], 
aCoordList[ 3 ] ) );
 rPointLists.back().push_back( Point( aCoordList[ 4 ], 
aCoordList[ 5 ] ) );
@@ -359,7 +363,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< 
::std::vector< Point > >& r
 nParamCount = 6;
 break;
 
-case LINE_REL: // 2* params -> param count reset
+case LINE_REL:
+aCoordList.resize(2, 0); // 2* params -> param count reset
 rPointLists.back().push_back( Point( aCurrentPoint.X + 
aCoordList[ 0 ],
 aCurrentPoint.Y + aCoordList[ 1 ] 
) );
 rFlagLists.back().push_back( PolygonFlags_NORMAL );
@@ -367,8 +372,9 @@ void ConversionHelper::decodeVmlPath( ::std::vector< 
::std::vector< Point > >& r
 nParamCount = 2;
 break;
 
-case LINE_ABS: // 2* params -> param count reset
-rPointLists.back().push_back( Point( aCoordList[ 0 ], 
(aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) ) );
+case LINE_ABS:
+aCoordList.resize(2, 0); // 2* params -> param count reset
+rPointLists.back().push_back( Point( aCoordList[ 0 ], 
aCoordList[ 1 ] ) );
 rFlagLists.back().push_back( PolygonFlags_NORMAL );
 aCurrentPoint = rPointLists.back().back();
 nParamCount = 2;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 0c/9f2c424899159f628527f0e88c07f35b30b5ca

2017-11-28 Thread Caolán McNamara
 0c/9f2c424899159f628527f0e88c07f35b30b5ca |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 931c8c492afb3f92da7bc370d875ff0699e83dc5
Author: Caolán McNamara 
Date:   Tue Nov 28 15:26:25 2017 +

Notes added by 'git notes add'

diff --git a/0c/9f2c424899159f628527f0e88c07f35b30b5ca 
b/0c/9f2c424899159f628527f0e88c07f35b30b5ca
new file mode 100644
index ..8dc6bbf1d166
--- /dev/null
+++ b/0c/9f2c424899159f628527f0e88c07f35b30b5ca
@@ -0,0 +1 @@
+prefer: 039cdb19e69b59b95609025c2d23cdb84f5c73c0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Looking for TextPortion, TextField clarifications

2017-11-28 Thread Michael Stahl
On 18.11.2017 00:49, Jens Tröger wrote:
> Some clarification:
> 
>>   * It seems that reference strings have somewhat different spaces:
>> “_Ref498096146 “ and “ _Ref498096146” are the same reference
>> (space after, space before) I assume?
> 
> The spacing seems to be inserted by calling getPresentation(). Using the
> SourceName and CurrentPresentation properties works ok.

probably this function; it's apparently possible to get 2 strings with a
hard-coded space in the middle, in your case sSetRefName is empty:

OUString SwGetRefField::GetFieldName() const
{
const OUString aName = GetTyp()->GetName();
if ( !aName.isEmpty() || !sSetRefName.isEmpty() )
{
return aName + " " + sSetRefName;
}
return Expand();
}

>>   * In MS Word, a field’s “code” can be something like { PAGEREF
>> _Ref498098146\h} (or NOTEREF, or REF). How are these reference
>> kinds represented in the OO object model?
> 
> I think a TextField’s GetReference service
> ,
> if available, contains the appropriate reference field sources
> .

yes.

> Although I don’t quite understand the difference between “bookmark” and
> “reference mark”.

they are quite different internally; bookmarks are inserted via
Insert->Bookmark, they have a name and can span multiple paragraph
breaks; reference marks are inserted via Insert->Cross-reference->Set
Reference, and it's restricted to inside one paragraph.

>>   * What about the TextPortion types “TextFieldStart”, “TextFieldEnd",
>> "TextFieldStartEnd"? I’ve seen them in documents, but can’t find
>> documentation on them.

this is the "field-marks" horror, which is an attempt to preserve
Word-like fields in Writer.

>>   * Calling getString() on a “TextFieldStart” returns a ^G and for
>> “TextFieldEnd” a ^H. Their IsCollapsed property is False. What’s
>> with that?

this is a bug in the horrible field-marks code - this implementation
detail should never be visible in the API.

>>   * Given the list of text field services
>> 
>> ,
>> how can I find of which “type” a TextField
>> 
>> 
>>  object
>> is? Should I really iterate over all services and check if an object
>> implements one (or more) of the services?

use XServiceInfo::getSupportedServiceNames() - this should return
text.TextContent, plus 2 spellings of the specific field service name
(there was some problem with those names and the "old" name is still
returned here for compatibility).
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-11-28 Thread Caolán McNamara
 sw/source/core/table/swnewtable.cxx |   32 
 1 file changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 9a110b6a284657f4db33627d8f76c270dac23810
Author: Caolán McNamara 
Date:   Mon Nov 27 17:07:25 2017 +

ofz: fix mem leak

Change-Id: I97b6ad9b0e873ac75a8791c731a1a8a862ef01af
Reviewed-on: https://gerrit.libreoffice.org/45367
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/table/swnewtable.cxx 
b/sw/source/core/table/swnewtable.cxx
index f484a65c200c..b0130d82b903 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -60,11 +60,11 @@
 class SwBoxSelection
 {
 public:
-std::vector aBoxes;
+std::vector maBoxes;
 long mnMergeWidth;
 SwBoxSelection() : mnMergeWidth(0) {}
-bool isEmpty() const { return aBoxes.empty(); }
-void insertBoxes( const SwSelBoxes* pNew ){ aBoxes.insert( aBoxes.end(), 
pNew ); }
+bool isEmpty() const { return maBoxes.empty(); }
+void push_back(const SwSelBoxes& rNew) { maBoxes.push_back(rNew); }
 };
 
 /** NewMerge(..) removes the superfluous cells after cell merge
@@ -381,7 +381,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& 
rPam ) const
 {
 SwTableLine* pLine = m_aLines[nRow];
 OSL_ENSURE( pLine, "Missing table line" );
-SwSelBoxes *pBoxes = new SwSelBoxes;
+SwSelBoxes aBoxes;
 long nRight = 0;
 const size_t nCount = pLine->GetTabBoxes().size();
 for( size_t nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
@@ -408,7 +408,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& 
rPam ) const
 {
 if( nCurrBox )
 {
-pBoxes->insert( pBox );
+aBoxes.insert(pBox);
 pInnerBox = pBox;
 pLeftBox = pLine->GetTabBoxes()[nCurrBox-1];
 nDiff = nMin - nLeft;
@@ -439,7 +439,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& 
rPam ) const
 }
 else if( nRight <= nMax )
 {
-pBoxes->insert( pBox );
+aBoxes.insert(pBox);
 if( nRow == nTop && nRowSpan < 0 )
 {
 bOkay = false;
@@ -458,7 +458,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& 
rPam ) const
 {
 if( nCurrBox+1 < nCount )
 {
-pBoxes->insert( pBox );
+aBoxes.insert(pBox);
 pInnerBox = pBox;
 pRightBox = pLine->GetTabBoxes()[nCurrBox+1];
 nDiff = nRight - nMax;
@@ -558,7 +558,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& 
rPam ) const
 --nLeftSpanCnt;
 if( nRightSpanCnt )
 --nRightSpanCnt;
-pRet->insertBoxes( pBoxes );
+pRet->push_back(aBoxes);
 }
 pRet->mnMergeWidth = nMax - nMin;
 if( nCheckBottom > nBottom )
@@ -825,7 +825,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& 
rBoxes,
 // i.e. contiguous cells in contiguous rows
 bool bMerge = false; // will be set if any content is transferred from
 // a "not already overlapped" cell into the new master cell.
-SwTableBox *pMergeBox = (*pSel->aBoxes[0])[0]; // the master cell box
+SwTableBox *pMergeBox = pSel->maBoxes[0][0]; // the master cell box
 if( !pMergeBox )
 return false;
 (*ppMergeBox) = pMergeBox;
@@ -840,7 +840,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& 
rBoxes,
 SwPosition aInsPos( *pMergeBox->GetSttNd()->EndOfSectionNode() );
 SwPaM aChkPam( aInsPos );
 // The number of lines in the selection rectangle: nLineCount
-const size_t nLineCount = pSel->aBoxes.size();
+const size_t nLineCount = pSel->maBoxes.size();
 // BTW: nLineCount is the rowspan of the new master cell
 long nRowSpan = static_cast(nLineCount);
 // We will need the first and last line of the selection
@@ -851,12 +851,12 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, 
SwSelBoxes& rBoxes,
 for( size_t nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
 {
 // The selected boxes in the current line
-const SwSelBoxes* pBoxes = pSel->aBoxes[ nCurrLine ];
-size_t nColCount = pBoxes->size();
+const SwSelBoxes& rLineBoxes = pSel->maBoxes[nCurrLine];
+size_t nColCount = rLineBoxes.size();
 // Iteration over the selected cell in the current row
 for (size_t nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol)
 {
-SwTableBox* pBox = (*pBoxes)[nCurrCol];
+SwTableBox* pBox = rLineBoxes[nCurrCol];
 rMerged.insert( pBox );
 // Only the 

[Libreoffice-commits] core.git: distro-configs/LibreOfficeCoverity.conf

2017-11-28 Thread Caolán McNamara
 distro-configs/LibreOfficeCoverity.conf |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d6609c8b133c409bacfb3cff1e1d68c423e58f0a
Author: Caolán McNamara 
Date:   Tue Nov 28 15:16:58 2017 +

update Coverity config

Change-Id: I0c7fd5d88e11bfa3dd55e7ef1a8514475a0d844a
Reviewed-on: https://gerrit.libreoffice.org/45424
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/distro-configs/LibreOfficeCoverity.conf 
b/distro-configs/LibreOfficeCoverity.conf
index a20b3cc1c2fc..e387254a6405 100644
--- a/distro-configs/LibreOfficeCoverity.conf
+++ b/distro-configs/LibreOfficeCoverity.conf
@@ -9,11 +9,11 @@
 --enable-option-checking=fatal
 --with-system-libs
 --with-system-headers
---without-system-libcmis
+--with-system-ucpp
 --without-system-cppunit
---without-system-libmwaw
 --enable-dbus
 --enable-extension-integration
+--enable-gtk3
 --enable-kde4
 --enable-evolution2
 --enable-scripting-beanshell
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Caolán McNamara
 oox/source/vml/vmlformatting.cxx |   20 +---
 1 file changed, 13 insertions(+), 7 deletions(-)

New commits:
commit 184f6dd697a2d218975c9055442e35bec4ed3144
Author: Caolán McNamara 
Date:   Tue Nov 28 09:06:02 2017 +

ofz: ensure aCoordList has required elements

Change-Id: I6687f7e499907f2f44ade2b05b35e40570dabc6b
Reviewed-on: https://gerrit.libreoffice.org/45389
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 195ecd59bd48..2f9cf34fdd2a 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -337,7 +337,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< 
::std::vector< Point > >& r
 {
 switch ( state )
 {
-case MOVE_REL: // 2* params -> param count reset
+case MOVE_REL:
+aCoordList.resize(2, 0); // 2* params -> param count reset
 if ( rPointLists.size() > 0 && rPointLists.back().size() > 
0 )
 {
 rPointLists.emplace_back( );
@@ -349,18 +350,20 @@ void ConversionHelper::decodeVmlPath( ::std::vector< 
::std::vector< Point > >& r
 nParamCount = 2;
 break;
 
-case MOVE_ABS: // 2 params -> no param count reset
+case MOVE_ABS:
+aCoordList.resize(2, 0); // 2 params -> no param count 
reset
 if ( rPointLists.size() > 0 && rPointLists.back().size() > 
0 )
 {
 rPointLists.emplace_back( );
 rFlagLists.emplace_back( );
 }
-rPointLists.back().emplace_back( (aCoordList[ 0 ]), 
(aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) );
+rPointLists.back().emplace_back( (aCoordList[ 0 ]), 
aCoordList[ 1 ] );
 rFlagLists.back().push_back( PolygonFlags_NORMAL );
 aCurrentPoint = rPointLists.back().back();
 break;
 
-case BEZIER_REL: // 6* params -> param count reset
+case BEZIER_REL:
+aCoordList.resize(6, 0); // 6* params -> param count reset
 rPointLists.back().emplace_back( aCurrentPoint.X + 
aCoordList[ 0 ],
 aCurrentPoint.Y + aCoordList[ 1 ] 
);
 rPointLists.back().emplace_back( aCurrentPoint.X + 
aCoordList[ 2 ],
@@ -374,7 +377,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< 
::std::vector< Point > >& r
 nParamCount = 6;
 break;
 
-case BEZIER_ABS: // 6* params -> param count reset
+case BEZIER_ABS:
+aCoordList.resize(6, 0); // 6* params -> param count reset
 rPointLists.back().emplace_back( aCoordList[ 0 ], 
aCoordList[ 1 ] );
 rPointLists.back().emplace_back( aCoordList[ 2 ], 
aCoordList[ 3 ] );
 rPointLists.back().emplace_back( aCoordList[ 4 ], 
aCoordList[ 5 ] );
@@ -385,7 +389,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< 
::std::vector< Point > >& r
 nParamCount = 6;
 break;
 
-case LINE_REL: // 2* params -> param count reset
+case LINE_REL:
+aCoordList.resize(2, 0); // 2* params -> param count reset
 rPointLists.back().emplace_back( aCurrentPoint.X + 
aCoordList[ 0 ],
 aCurrentPoint.Y + aCoordList[ 1 ] 
);
 rFlagLists.back().push_back( PolygonFlags_NORMAL );
@@ -393,7 +398,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< 
::std::vector< Point > >& r
 nParamCount = 2;
 break;
 
-case LINE_ABS: // 2* params -> param count reset
+case LINE_ABS:
+aCoordList.resize(2, 0); // 2* params -> param count reset
 rPointLists.back().emplace_back( aCoordList[ 0 ], 
(aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) );
 rFlagLists.back().push_back( PolygonFlags_NORMAL );
 aCurrentPoint = rPointLists.back().back();
___
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-5.3' - sw/qa sw/source

2017-11-28 Thread Dimitri Bouron
 sw/qa/extras/uiwriter/data/tdf104492.docx |binary
 sw/qa/extras/uiwriter/uiwriter.cxx|9 +
 sw/source/core/layout/tabfrm.cxx  |2 ++
 3 files changed, 11 insertions(+)

New commits:
commit ba37662d05b484d8bd311464b896f3b10c5e2925
Author: Dimitri Bouron 
Date:   Thu Dec 22 11:19:05 2016 +0100

tdf#104492: Fix bad docx opening and bad layout

The problem seems to be the table's repeated rows value which is
setted to max table rows in some docx file.

Decreasing repeated rows value by one avoids loops but renders a bad
layout.
Table continuity is lost and lots of rows are hidden.

So I set repeated rows value directly to one in order to avoid bad
layout.

Reviewed-on: https://gerrit.libreoffice.org/32349
Tested-by: Jenkins 
Reviewed-by: Björn Michaelsen 
(cherry picked from commit 91a176b864ac0492f5c0d2386292118dd3095df4)

Change-Id: If4adc33febe088a866b704e87e49339710e5aaf5

diff --git a/sw/qa/extras/uiwriter/data/tdf104492.docx 
b/sw/qa/extras/uiwriter/data/tdf104492.docx
new file mode 100644
index ..a5a7af367854
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf104492.docx differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index cb603f313d95..55d14a9efd54 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -234,6 +234,7 @@ public:
 void testTdf104032();
 void testTdf104425();
 void testTdf104814();
+void testTdf104492();
 void testTdf105417();
 void testTdf105625();
 void testTdf107976();
@@ -361,6 +362,7 @@ public:
 CPPUNIT_TEST(testTdf104032);
 CPPUNIT_TEST(testTdf104425);
 CPPUNIT_TEST(testTdf104814);
+CPPUNIT_TEST(testTdf104492);
 CPPUNIT_TEST(testTdf105417);
 CPPUNIT_TEST(testTdf105625);
 CPPUNIT_TEST(testTdf107976);
@@ -4628,6 +4630,13 @@ void SwUiWriterTest::testTdf113790()
 reload("Office Open XML Text", "tdf113790.docx");
 CPPUNIT_ASSERT(dynamic_cast(mxComponent.get()));
 }
+void SwUiWriterTest::testTdf104492()
+{
+createDoc("tdf104492.docx");
+xmlDocPtr pXmlDoc = parseLayoutDump();
+// The document should split table over 3 pages.
+assertXPath(pXmlDoc, "//page", 3);
+}
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index d08468aaa1e1..1c988ebee6e7 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2541,6 +2541,8 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 lcl_RecalcTable( *this, nullptr, aNotify );
 m_bLowersFormatted = true;
 m_bCalcLowers = false;
+if (!mbValidPrtArea)
+m_pTable->SetRowsToRepeat(1);
 }
 #if OSL_DEBUG_LEVEL > 0
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/flatpak-manifest.in

2017-11-28 Thread Stephan Bergmann
 solenv/flatpak-manifest.in |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 95fbb490e68b044226518a88a109de7ae1c89731
Author: Stephan Bergmann 
Date:   Tue Nov 28 14:52:11 2017 +0100

DBus permissions missing from LO flatpak

...after 243d743dae127fe11ecd7f807121da8815af8f01 
"solenv/flatpak-manifest.in:
incorporate upstream sandboxing improvements", causing
 "Doesn't 
open
files in network shares".

Change-Id: I15d7a170b3ffaf6092ff4d2fe4e93b1dcfd32b0b

diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 8119f892c189..f316d143843f 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -393,6 +393,7 @@
 "--socket=pulseaudio",
 "--filesystem=host",
 "--env=LIBO_FLATPAK=1",
-"--own-name=org.libreoffice.LibreOfficeIpc0"
+"--own-name=org.libreoffice.LibreOfficeIpc0",
+"--talk-name=org.gtk.vfs.*"
 ]
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sc/inc

2017-11-28 Thread Eike Rathke
 sc/inc/scfuncs.hrc |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 18c0623c6c5526f8d7cba164b34dec7af870412d
Author: Eike Rathke 
Date:   Tue Nov 28 10:47:55 2017 +0100

Fix typos

Change-Id: I01f0ca82f1350b74ea2d3205948c032918049c02
(cherry picked from commit e0b60b182394dbe075185e9c07843d2beacaa6b1)
Reviewed-on: https://gerrit.libreoffice.org/45397
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc
index 0d3999899ee8..c0cd8abb3a3e 100644
--- a/sc/inc/scfuncs.hrc
+++ b/sc/inc/scfuncs.hrc
@@ -3415,13 +3415,13 @@ const char* SC_OPCODE_LOOKUP_ARY[] =
 // -=*# Resource for function MATCH #*=-
 const char* SC_OPCODE_MATCH_ARY[] =
 {
-NC_("SC_OPCODE_MATCH", "Defines a position in a array after comparing 
values."),
+NC_("SC_OPCODE_MATCH", "Defines a position in an array after comparing 
values."),
 NC_("SC_OPCODE_MATCH", "Search criterion"),
 NC_("SC_OPCODE_MATCH", "The value to be used for comparison."),
 NC_("SC_OPCODE_MATCH", "Lookup array"),
 NC_("SC_OPCODE_MATCH", "The array (range) in which the search is made."),
 NC_("SC_OPCODE_MATCH", "Type"),
-NC_("SC_OPCODE_MATCH", "Type can take the value 1, 0 or -1 and determines 
the criteria are to be used for comparison purposes.")
+NC_("SC_OPCODE_MATCH", "Type can take the value 1, 0 or -1 and determines 
the criteria to be used for comparison purposes.")
 };
 
 // -=*# Resource for function OFFSET #*=-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Caolán McNamara
 svx/source/table/tablelayouter.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 52869df3f080aae37a1a6fa24e3bd6404ed67646
Author: Caolán McNamara 
Date:   Tue Nov 28 10:02:28 2017 +

ofz#4461 Integer-overflow

Change-Id: Iae41823164c09352ef8ffa97dc3361476c03add8
Reviewed-on: https://gerrit.libreoffice.org/45396
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/svx/source/table/tablelayouter.cxx 
b/svx/source/table/tablelayouter.cxx
index e0ba76552c61..d1de33c1b464 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -805,7 +805,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& 
rArea, bool bFit )
 for( nRow = 0; nRow < nRowCount; ++nRow )
 {
 maRows[nRow].mnPos = nNewHeight;
-nNewHeight += maRows[nRow].mnSize;
+nNewHeight = o3tl::saturating_add(nNewHeight, maRows[nRow].mnSize);
 
 if( bFit )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/lok_dialog' - 3 commits - cui/source libreofficekit/qa sfx2/source

2017-11-28 Thread Pranav Kant
 cui/source/dialogs/iconcdlg.cxx |2 +-
 libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx |2 --
 sfx2/source/dialog/basedlgs.cxx |5 +
 3 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit e262cf2eba1a9098297ee1e7a3a59d51def4b71e
Author: Pranav Kant 
Date:   Tue Nov 28 20:16:05 2017 +0530

gtv: Width, height properties should not be construct only

Change-Id: I2d1b29f52c1fe0449cf9afe47c509ef6250804a8

diff --git a/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx
index 74cb58e09d48..9cad1e8fb117 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx
@@ -459,7 +459,6 @@ gtv_lok_dialog_class_init(GtvLokDialogClass* klass)
   "Dialog width",
   0, 1024, 0,
   
static_cast(G_PARAM_READWRITE |
-   
G_PARAM_CONSTRUCT_ONLY |

G_PARAM_STATIC_STRINGS));
 
 properties[PROP_DIALOG_HEIGHT] = g_param_spec_uint("height",
@@ -467,7 +466,6 @@ gtv_lok_dialog_class_init(GtvLokDialogClass* klass)
"Dialog height",
0, 1024, 0,

static_cast(G_PARAM_READWRITE |
-   
 G_PARAM_CONSTRUCT_ONLY |

 G_PARAM_STATIC_STRINGS));
 
 g_object_class_install_properties (G_OBJECT_CLASS(klass), PROP_LAST, 
properties);
commit 9ad0c1815e137c55f2d356c46630e67570262196
Author: Pranav Kant 
Date:   Tue Nov 28 20:08:44 2017 +0530

lokdialog: Fix hyperlink dialog; properly chain upto SfxModal's dispose

Fallback from 3dfd42ec03da97f555869bd36393912b82836108

Change-Id: Ifd8c721b001b09ddab8d4fe06ae6818980d6ee76

diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 41475c00233b..ce3d292b97b0 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -245,7 +245,7 @@ void IconChoiceDialog::dispose()
 m_pHelpBtn.clear();
 m_pResetBtn.clear();
 m_pTabContainer.clear();
-ModalDialog::dispose();
+SfxModalDialog::dispose();
 }
 
 /**
commit 29f23a47f02b05ddd9a3a626a6cf8bfa7083d1bc
Author: Pranav Kant 
Date:   Tue Nov 28 16:59:26 2017 +0530

lokdialog: Make hyperlink dialog work

Change-Id: Ia77998ef18060b999bae4e981a5dca3dd25f4953

diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index c20a046ec200..1c2d46d404ac 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -187,6 +187,11 @@ void SfxModalDialog::StateChanged(StateChangedType nType)
 
 if (comphelper::LibreOfficeKit::isActive() && nType == 
StateChangedType::InitShow)
 {
+// There are some dialogs, like Hyperlink dialog, which inherit from
+// ModalDialog even though they are modeless, i.e., their Execute 
method
+// isn't called. We need to set the notifier for them.
+if (!GetLOKNotifier())
+SetLOKNotifier(SfxViewShell::Current());
 const Size aSize = GetOptimalSize();
 std::vector aItems;
 aItems.emplace_back(std::make_pair("size", aSize.toString()));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: tools/map.cpp

2017-11-28 Thread Michael Meeks
 tools/map.cpp |   24 ++--
 1 file changed, 18 insertions(+), 6 deletions(-)

New commits:
commit 65f3d658cb77978276d5b8f1c99dea51eec71c37
Author: Michael Meeks 
Date:   Tue Nov 28 18:44:04 2017 +

Collect anonymous and file backed mappings too.

Change-Id: I7bf23917436bdffb483b288414409ccc53ed540c

diff --git a/tools/map.cpp b/tools/map.cpp
index cd7fd788..f3fb76b5 100644
--- a/tools/map.cpp
+++ b/tools/map.cpp
@@ -81,7 +81,7 @@ static int read_buffer(char *buffer, unsigned size,
 }
 
 
-static void dump_unshared(unsigned proc_id, const std::vector 
)
+static void dump_unshared(unsigned proc_id, const std::vector )
 {
 char path_proc[PATH_SIZE];
 snprintf(path_proc, sizeof(path_proc), "/proc/%d/pagemap", proc_id);
@@ -91,7 +91,7 @@ static void dump_unshared(unsigned proc_id, const 
std::vector 
 
 printf("Sharing map:\n");
 addr_t numShared = 0, numOwn = 0;
-for (auto p : heapVAddresses)
+for (auto p : vaddrs)
 {
 if (lseek(fd, (p / 0x1000 * 8), SEEK_SET) < 0)
 error(EXIT_FAILURE, errno, "Failed to seek in pagemap");
@@ -133,7 +133,8 @@ static void total_smaps(unsigned proc_id, const char *file, 
const char *cmdline)
 addr_t smap_value;
 char smap_key[MAP_SIZE];
 
-std::vector heapVAddresses;
+std::vector heapVAddrs, anonVAddrs, fileVAddrs;
+std::vector *pushTo = nullptr;
 
 if ((file_pointer = fopen(file, "r")) == nullptr)
 error(EXIT_FAILURE, errno, "%s", file);
@@ -142,13 +143,20 @@ static void total_smaps(unsigned proc_id, const char 
*file, const char *cmdline)
 {
 // collect heap page details
 if (strstr(buffer, "[heap]"))
+pushTo = 
+else if (strstr(buffer, "/"))
+pushTo = 
+else
+pushTo = 
+
+if (strstr(buffer, " rw-p "))
 {
 addr_t start, end;
 // 012d-0372f000 rw-p  00:00 0  [heap]
 if (sscanf(buffer, "%llx-%llx rw-p", , ) == 2)
 {
 for (addr_t p = start; p < end; p += 0x1000)
-heapVAddresses.push_back(p);
+pushTo->push_back(p);
 }
 else
 fprintf (stderr, "malformed heap line '%s'\n", buffer);
@@ -193,9 +201,13 @@ static void total_smaps(unsigned proc_id, const char 
*file, const char *cmdline)
 printf("Shared:%20lld kB\n", total_shared_clean + 
total_shared_dirty);
 printf("Private   :%20lld kB\n", total_private_clean + 
total_private_dirty);
 printf("--\n");
-printf("Heap page cnt :%20lld\n", (addr_t)heapVAddresses.size());
+printf("Heap page cnt :%20lld\n", (addr_t)heapVAddrs.size());
+printf("Anon page cnt :%20lld\n", (addr_t)anonVAddrs.size());
+printf("File page cnt :%20lld\n", (addr_t)fileVAddrs.size());
 printf("\n");
-dump_unshared(proc_id, heapVAddresses);
+dump_unshared(proc_id, heapVAddrs);
+dump_unshared(proc_id, anonVAddrs);
+dump_unshared(proc_id, fileVAddrs);
 }
 
 int main(int argc, char **argv)
___
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-5.3' - 22 commits - cui/source desktop/source include/LibreOfficeKit include/sfx2 include/tools include/vcl libreofficekit/qa sc/source sfx2

2017-11-28 Thread Jan Holesovsky
 cui/source/dialogs/iconcdlg.cxx |2 
 cui/source/inc/iconcdlg.hxx |3 
 desktop/source/lib/init.cxx |  167 

 include/LibreOfficeKit/LibreOfficeKit.h |   15 
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   47 --
 include/sfx2/basedlgs.hxx   |2 
 include/sfx2/lokhelper.hxx  |6 
 include/sfx2/viewsh.hxx |8 
 include/tools/gen.hxx   |1 
 include/vcl/IDialogRenderable.hxx   |   40 --
 include/vcl/dialog.hxx  |   20 -
 include/vcl/window.hxx  |   30 +
 libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx |   87 ++--
 libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.hxx |2 
 libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx |   81 +++-
 libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx   |   24 -
 libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx|   34 -
 libreofficekit/qa/gtktiledviewer/gtv.ui |   17 
 sc/source/ui/view/gridwin.cxx   |1 
 sfx2/source/dialog/basedlgs.cxx |   43 ++
 sfx2/source/dialog/tabdlg.cxx   |   27 +
 sfx2/source/view/lokhelper.cxx  |   26 -
 sfx2/source/view/viewsh.cxx |   10 
 sw/inc/unotxdoc.hxx |   20 -
 sw/source/uibase/uno/unotxdoc.cxx   |  194 
--
 tools/source/generic/gen.cxx|   10 
 vcl/Library_vcl.mk  |1 
 vcl/inc/window.h|3 
 vcl/source/app/IDialogRenderable.cxx|   22 -
 vcl/source/window/dialog.cxx|  170 
+---
 vcl/source/window/floatwin.cxx  |8 
 vcl/source/window/paint.cxx |   16 
 vcl/source/window/window.cxx|  172 

 vcl/source/window/winproc.cxx   |4 
 34 files changed, 618 insertions(+), 695 deletions(-)

New commits:
commit b97fa81cac972c729cd843a689fb76342b4ac19d
Author: Jan Holesovsky 
Date:   Tue Nov 28 11:52:16 2017 +0100

Fix 'unused parameter' warnings.

Change-Id: I8478e907a66ca918eddc7a543cbcf23e17d9ee5a

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 4810f9b59039..307418fcd55c 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2267,7 +2267,7 @@ static void doc_postKeyEvent(LibreOfficeKitDocument* 
pThis, int nType, int nChar
 pDoc->postKeyEvent(nType, nCharCode, nKeyCode);
 }
 
-static void doc_postDialogKeyEvent(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nType, int nCharCode, int nKeyCode)
+static void doc_postDialogKeyEvent(LibreOfficeKitDocument* /*pThis*/, unsigned 
nLOKWindowId, int nType, int nCharCode, int nKeyCode)
 {
 SolarMutexGuard aGuard;
 
@@ -2445,7 +2445,7 @@ static void doc_postMouseEvent(LibreOfficeKitDocument* 
pThis, int nType, int nX,
 }
 }
 
-static void doc_postDialogMouseEvent(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int 
nModifier)
+static void doc_postDialogMouseEvent(LibreOfficeKitDocument* /*pThis*/, 
unsigned nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int 
nModifier)
 {
 SolarMutexGuard aGuard;
 
@@ -2476,7 +2476,7 @@ static void 
doc_postDialogMouseEvent(LibreOfficeKitDocument* pThis, unsigned nLO
 }
 }
 
-static void doc_postDialogChildMouseEvent(LibreOfficeKitDocument* pThis, 
unsigned nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int 
nModifier)
+static void doc_postDialogChildMouseEvent(LibreOfficeKitDocument* /*pThis*/, 
unsigned nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int 
nModifier)
 {
 SolarMutexGuard aGuard;
 
@@ -3283,7 +3283,7 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* 
/*pThis*/,
 return nullptr;
 }
 
-static void doc_paintDialog(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId,
+static void doc_paintDialog(LibreOfficeKitDocument* /*pThis*/, unsigned 
nLOKWindowId,
 unsigned char* pBuffer,
 const int nX, const int nY,

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

2017-11-28 Thread Caolán McNamara
 cppuhelper/source/servicemanager.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 34a7e1b8712bab8dc731a1b7ffe283009752959d
Author: Caolán McNamara 
Date:   Tue Nov 28 17:06:08 2017 +

not used with disable-dynloading

Change-Id: Idad8a7b9b984147b7a64caf7527d8ad21bdd55a2
Reviewed-on: https://gerrit.libreoffice.org/45433
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cppuhelper/source/servicemanager.cxx 
b/cppuhelper/source/servicemanager.cxx
index 09e555a4ff43..42a0e7e3145a 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -1809,7 +1809,7 @@ cppuhelper::ServiceManager::findServiceImplementation(
 }
 
 /// Make a simpler unique name for preload / progress reporting.
-#ifndef IOS
+#ifndef DISABLE_DYNLOADING
 static rtl::OUString simplifyModule(const rtl::OUString )
 {
 sal_Int32 nIdx;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Caolán McNamara
 sc/source/filter/inc/formel.hxx |2 ++
 sc/source/filter/lotus/lotimpop.cxx |2 ++
 sc/source/filter/lotus/op.cxx   |4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit c97d4caf43d8f8c5d26ccddc92896c4a42633d0e
Author: Caolán McNamara 
Date:   Tue Nov 28 15:52:09 2017 +

ofz#4412 bail on failure in Formulacell too

Change-Id: Ie7f9e4309ae8468947dce12355201d038e7e63fa
Reviewed-on: https://gerrit.libreoffice.org/45428
Reviewed-by: Eike Rathke 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/filter/inc/formel.hxx b/sc/source/filter/inc/formel.hxx
index aa7944161439..da1ba8ae1a3d 100644
--- a/sc/source/filter/inc/formel.hxx
+++ b/sc/source/filter/inc/formel.hxx
@@ -130,6 +130,8 @@ public:
 
 virtual voidConvert( const ScTokenArray*& rpErg, sal_Int32& nRest 
) = 0;
 
+bool good() const { return aIn.good(); }
+
 protected:
 using   ConverterBase::Reset;
 };
diff --git a/sc/source/filter/lotus/lotimpop.cxx 
b/sc/source/filter/lotus/lotimpop.cxx
index 62fe76b8774e..00ccefab0ee3 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -275,6 +275,8 @@ void ImportLotus::Formulacell( sal_uInt16 n )
 aConv.Reset( aAddr );
 aConv.SetWK3();
 aConv.Convert( pErg, nRest );
+if (!aConv.good())
+return;
 
 ScFormulaCell* pCell = pErg ? new ScFormulaCell(pD, aAddr, *pErg) : new 
ScFormulaCell(pD, aAddr);
 pCell->AddRecalcMode( ScRecalcMode::ONLOAD_ONCE );
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index 6491b0c08ae1..295cd2804da0 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -151,7 +151,7 @@ void OP_Formula(LotusContext , SvStream& r, 
sal_uInt16 /*n*/)
 LotusToSc aConv(rContext, r, rSPool, rContext.pLotusRoot->eCharsetQ, 
false);
 aConv.Reset( aAddress );
 aConv.Convert( pErg, nBytesLeft );
-if (!r.good())
+if (!aConv.good())
 return;
 
 if (ValidColRow(nCol, nRow))
@@ -401,7 +401,7 @@ void OP_Formula123(LotusContext& rContext, SvStream& r, 
sal_uInt16 n)
 LotusToSc aConv(rContext, r, rSPool, rContext.pLotusRoot->eCharsetQ, true);
 aConv.Reset( aAddress );
 aConv.Convert( pErg, nBytesLeft );
-if (!r.good())
+if (!aConv.good())
 return;
 
 if (ValidColRow(nCol, nRow) && nTab <= rContext.pDoc->GetMaxTableNumber())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Bartosz Kosiorek
 sc/source/filter/oox/stylesbuffer.cxx |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 51a1fb0beb813624b5bc3255a889f9d630ccb0d4
Author: Bartosz Kosiorek 
Date:   Sat Nov 25 09:51:58 2017 +0100

tdf#113271 Fix order of color's attributes import.

The order of import color is very important in case of more than one color 
attributes was provided.
This order (theme -> rgb -> indexed -> auto) is not documented
and was gathered experimentally based on MS Excel 2013.

Information about :

https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.fonts(v=office.14).aspx

Information about font:
https://msdn.microsoft.com/en-us/library/ff531892(v=office.12).aspx

https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.font(v=office.14).aspx

More information about color class:

https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.color(v=office.14).aspx
https://msdn.microsoft.com/en-us/library/ff532831(v=office.12).aspx

Example:
With indexed auto, colour, rgb and them,


The priority is as follows:
1. theme
2. rgb
3. indexed
4. auto

Change-Id: I7bb5ab7d7b7a52091f0130fd6f21bac44eca7408
Reviewed-on: https://gerrit.libreoffice.org/45266
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/sc/source/filter/oox/stylesbuffer.cxx 
b/sc/source/filter/oox/stylesbuffer.cxx
index 7a33511ee449..15f1093b03a6 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -266,14 +266,16 @@ void Color::setIndexed( sal_Int32 nPaletteIdx, double 
fTint )
 
 void Color::importColor( const AttributeList& rAttribs )
 {
-if( rAttribs.getBool( XML_auto, false ) )
-setAuto();
+// tdf#113271 The order of import color is very important in case of more 
than one color attributes was provided.
+// This order (theme -> rgb -> indexed -> auto) is not documented and was 
gathered experimentally based on MS Excel 2013.
+if( rAttribs.hasAttribute( XML_theme ) )
+setTheme( rAttribs.getInteger( XML_theme, -1 ), rAttribs.getDouble( 
XML_tint, 0.0 ) );
 else if( rAttribs.hasAttribute( XML_rgb ) )
 setRgb( rAttribs.getIntegerHex( XML_rgb, API_RGB_TRANSPARENT ), 
rAttribs.getDouble( XML_tint, 0.0 ) );
-else if( rAttribs.hasAttribute( XML_theme ) )
-setTheme( rAttribs.getInteger( XML_theme, -1 ), rAttribs.getDouble( 
XML_tint, 0.0 ) );
 else if( rAttribs.hasAttribute( XML_indexed ) )
 setIndexed( rAttribs.getInteger( XML_indexed, -1 ), 
rAttribs.getDouble( XML_tint, 0.0 ) );
+else if( rAttribs.getBool( XML_auto, false ) )
+setAuto();
 else
 {
 OSL_FAIL( "Color::importColor - unknown color type" );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Bartosz Kosiorek
 sc/source/filter/oox/stylesbuffer.cxx |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 3278c8f9bb040cddd15d9e7eb4991d0447cbc964
Author: Bartosz Kosiorek 
Date:   Sat Nov 25 09:51:58 2017 +0100

tdf#113271 Fix order of color's attributes import.

The order of import color is very important in case of more than one color 
attributes was provided.
This order (theme -> rgb -> indexed -> auto) is not documented
and was gathered experimentally based on MS Excel 2013.

Information about :

https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.fonts(v=office.14).aspx

Information about font:
https://msdn.microsoft.com/en-us/library/ff531892(v=office.12).aspx

https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.font(v=office.14).aspx

More information about color class:

https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.color(v=office.14).aspx
https://msdn.microsoft.com/en-us/library/ff532831(v=office.12).aspx

Example:
With indexed auto, colour, rgb and them,


The priority is as follows:
1. theme
2. rgb
3. indexed
4. auto

Change-Id: I7bb5ab7d7b7a52091f0130fd6f21bac44eca7408
Reviewed-on: https://gerrit.libreoffice.org/45278
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/sc/source/filter/oox/stylesbuffer.cxx 
b/sc/source/filter/oox/stylesbuffer.cxx
index 25fca16c643e..2711df0ad34f 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -266,14 +266,16 @@ void Color::setIndexed( sal_Int32 nPaletteIdx, double 
fTint )
 
 void Color::importColor( const AttributeList& rAttribs )
 {
-if( rAttribs.getBool( XML_auto, false ) )
-setAuto();
+// tdf#113271 The order of import color is very important in case of more 
than one color attributes was provided.
+// This order (theme -> rgb -> indexed -> auto) is not documented and was 
gathered experimentally based on MS Excel 2013.
+if( rAttribs.hasAttribute( XML_theme ) )
+setTheme( rAttribs.getInteger( XML_theme, -1 ), rAttribs.getDouble( 
XML_tint, 0.0 ) );
 else if( rAttribs.hasAttribute( XML_rgb ) )
 setRgb( rAttribs.getIntegerHex( XML_rgb, API_RGB_TRANSPARENT ), 
rAttribs.getDouble( XML_tint, 0.0 ) );
-else if( rAttribs.hasAttribute( XML_theme ) )
-setTheme( rAttribs.getInteger( XML_theme, -1 ), rAttribs.getDouble( 
XML_tint, 0.0 ) );
 else if( rAttribs.hasAttribute( XML_indexed ) )
 setIndexed( rAttribs.getInteger( XML_indexed, -1 ), 
rAttribs.getDouble( XML_tint, 0.0 ) );
+else if( rAttribs.getBool( XML_auto, false ) )
+setAuto();
 else
 {
 OSL_FAIL( "Color::importColor - unknown color type" );
___
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-5.3' - sc/source

2017-11-28 Thread Marco Cecchetti
 sc/source/ui/view/tabview.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit f4c6426d28aea11743881906d8179c220fa73b9f
Author: Marco Cecchetti 
Date:   Thu Nov 9 18:56:27 2017 +0100

lok: sc: subdivide headers data in range

Change-Id: I984b5da5774f97172de7659ecab84675060f8301
Reviewed-on: https://gerrit.libreoffice.org/45415
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 96f10d6729de..4aef7be67b16 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2674,11 +2674,15 @@ OUString ScTabView::getRowColumnHeaders(const 
Rectangle& rRectangle)
 aBuffer.append("\"size\": \"").append(OUString::number(nTotalPixels * 
TWIPS_PER_PIXEL)).append("\" }");
 }
 
+long nPrevSizePx = -1;
 for (SCROW nRow = nStartRow + 1; nRow < nEndRow; ++nRow)
 {
 // nSize will be 0 for hidden rows.
 const long nSizePx = lcl_GetRowHeightPx(pDoc, nRow, nTab);
 nTotalPixels += nSizePx;
+if (nRow < nEndRow - 1 && nSizePx == nPrevSizePx)
+continue;
+nPrevSizePx = nSizePx;
 
 OUString aText = pRowBar[SC_SPLIT_BOTTOM]->GetEntryText(nRow);
 aBuffer.append(", ");
@@ -2781,13 +2785,18 @@ OUString ScTabView::getRowColumnHeaders(const 
Rectangle& rRectangle)
 aBuffer.append("\"size\": \"").append(OUString::number(nTotalPixels * 
TWIPS_PER_PIXEL)).append("\" }");
 }
 
+nPrevSizePx = -1;
 for (SCCOL nCol = nStartCol + 1; nCol < nEndCol; ++nCol)
 {
 // nSize will be 0 for hidden columns.
 const long nSizePx = lcl_GetColWidthPx(pDoc, nCol, nTab);
 nTotalPixels += nSizePx;
+if (nCol < nEndCol - 1 && nSizePx == nPrevSizePx)
+continue;
+nPrevSizePx = nSizePx;
+
 
-OUString aText = pColBar[SC_SPLIT_LEFT]->GetEntryText(nCol);
+OUString aText = OUString::number(nCol + 1);
 aBuffer.append(", ");
 aBuffer.append("{ \"text\": \"").append(aText).append("\", ");
 aBuffer.append("\"size\": \"").append(OUString::number(nTotalPixels * 
TWIPS_PER_PIXEL)).append("\" }");
___
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-5.3' - libreofficekit/Executable_tilebench.mk libreofficekit/Module_libreofficekit.mk libreofficekit/qa Repository.mk

2017-11-28 Thread Ashod Nakashian
 Repository.mk |2 
 libreofficekit/Executable_tilebench.mk|1 
 libreofficekit/Module_libreofficekit.mk   |5 +
 libreofficekit/qa/tilebench/tilebench.cxx |  102 --
 4 files changed, 74 insertions(+), 36 deletions(-)

New commits:
commit 7db98521548de9eab955ee25a5aacaaef42df323
Author: Ashod Nakashian 
Date:   Sun Nov 19 20:38:43 2017 -0500

LOK: tilebench improvements

* Arguments for max number of parts and tiles to render (optional).
  + Automatic estimation of maximum tiles to render based on max parts
for Writer docs, since there is only 1 part, this caps the number
of pages to render, similar to other doc types.
* Fixed rendering of Writer documents over and over (as many times as 
pages).
  + Writer has a single part, unlike other doc types.
  + No point in rendering the whole document in writer to a single tile,
since that's completely unrealistic and impractical (it takes
forever for large docs and artificially spikes the memory).
* Rendering starts at the current part and not the first.
  + This gives the spreadsheet of interest priority (if saved as visible).
* The tile size is now more realistic as we use the same dimensions
  as the Online client does.
* When rendering tiles at scale, we use the same dimensions as the
  Online client rather than splitting the width by 4, for realism.
* Rendering of tiles is done rows-first, rather than columns-first,
  which is similar to what the Online client does, which is more
  cache friendly, therefore more realistic.
* Enabled compiling of tilebench when GTK3 is disabled, which
  was erroneous, since tilebench doesn't have any dependency on GTK.
  + Now it's possible to compile with local Cairo/Pixman libs.

Change-Id: Ib78d030ead387748914119f95fe49ddc1ce64498
Reviewed-on: https://gerrit.libreoffice.org/44936
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/Repository.mk b/Repository.mk
index 3635ccfadada..1c72fc1abb61 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -70,7 +70,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
 svptest \
 svpclient \
 pixelctl ) \
-   $(if $(and $(ENABLE_GTK3), $(filter LINUX %BSD SOLARIS,$(OS))), 
tilebench) \
+   $(if $(filter LINUX %BSD SOLARIS,$(OS)), tilebench) \
$(if $(filter LINUX MACOSX SOLARIS WNT %BSD,$(OS)),icontest \
outdevgrind) \
vcldemo \
diff --git a/libreofficekit/Executable_tilebench.mk 
b/libreofficekit/Executable_tilebench.mk
index 4da51d3ca686..9d8b2a134f99 100644
--- a/libreofficekit/Executable_tilebench.mk
+++ b/libreofficekit/Executable_tilebench.mk
@@ -15,7 +15,6 @@ $(eval $(call gb_Executable_set_include,tilebench,\
 ))
 
 $(eval $(call gb_Executable_use_libraries,tilebench,\
-libreofficekitgtk \
sal \
 ))
 
diff --git a/libreofficekit/Module_libreofficekit.mk 
b/libreofficekit/Module_libreofficekit.mk
index cc842b2f3f2c..079e4e15e5b4 100644
--- a/libreofficekit/Module_libreofficekit.mk
+++ b/libreofficekit/Module_libreofficekit.mk
@@ -23,10 +23,13 @@ ifneq ($(ENABLE_GTK3),)
 $(eval $(call gb_Module_add_targets,libreofficekit,\
 Library_libreofficekitgtk \
 Executable_gtktiledviewer \
+))
+endif # ($(ENABLE_GTK3),)
+
+$(eval $(call gb_Module_add_targets,libreofficekit,\
 Executable_tilebench \
 Package_selectionhandles \
 ))
-endif # ($(ENABLE_GTK3),)
 
 endif
 
diff --git a/libreofficekit/qa/tilebench/tilebench.cxx 
b/libreofficekit/qa/tilebench/tilebench.cxx
index b4912b1611ef..08cf8abff6ab 100644
--- a/libreofficekit/qa/tilebench/tilebench.cxx
+++ b/libreofficekit/qa/tilebench/tilebench.cxx
@@ -10,10 +10,12 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -21,7 +23,7 @@ using namespace lok;
 
 static int help()
 {
-fprintf( stderr, "Usage: tilebench  
[path to document]\n" );
+fprintf( stderr, "Usage: tilebench  
[path to document] [max parts|-1] [max tiles|-1]\n" );
 fprintf( stderr, "renders a selection of small tiles from the document, 
checksums them and times the process\n" );
 return 1;
 }
@@ -36,13 +38,17 @@ static double getTimeNow()
 
 int main( int argc, char* argv[] )
 {
+static const double origin = getTimeNow();
 struct TimeRecord {
 const char *mpName;
 double mfTime;
 
 TimeRecord() : mpName(nullptr), mfTime(getTimeNow()) { }
 explicit TimeRecord(const char *pName) :
-   mpName(pName ), mfTime(getTimeNow()) { }
+   mpName(pName), mfTime(getTimeNow())
+{
+fprintf(stderr, "%3.3fs - %s\n", (mfTime - origin), mpName);
+}
 };
 std::vector< TimeRecord > aTimes;
 if( argc < 2 ||
@@ -55,11 +61,20 @@ int 

Moztrap question

2017-11-28 Thread Campaña Soler Pau
Hello.
We are students of Aalto University, and we have to make an study of 
Thunderbird.  We have seen that for the tests cases they use moztrap, but all 
the links of that webite are not working. We have also found in:
https://wiki.documentfoundation.org/MozTrap/User_Guide
that they also use manual test libreoffice, but we do not know how to register 
(https://manual-test.libreoffice.org/login.php?viewer=). Can you provide us a 
link to register or a username and passwoord just to see how it inside (we will 
not make any modification).
If it is not posible, can you tell us if it is used by Thunderbird?
Thanks, Pau.


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


About Textbody class

2017-11-28 Thread serdar tunc
I am working on that bug
https://bugs.documentfoundation.org/show_bug.cgi?id=104290

I cant get emails from mail list i subscribed 2 times,i send licence mail
and still i cant get mails.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: configure.ac distro-configs/LibreOfficeCoverity.conf

2017-11-28 Thread Stephan Bergmann
 configure.ac|   12 +++-
 distro-configs/LibreOfficeCoverity.conf |1 +
 2 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 0f3b0ec973f06a98c75ef8acfa720a9973e4d2b5
Author: Stephan Bergmann 
Date:   Tue Nov 28 12:25:32 2017 +0100

Avoid C++17 mode for Coverity Scan

...see mail sub-thread starting at


"Re: New Defects reported by Coverity Scan for LibreOffice" about 
cid#1424266 et
al; lets see if this makes Coverity happy again...

Change-Id: If488b9f61f084f2286b35326917741051ec8d5ce
Reviewed-on: https://gerrit.libreoffice.org/45403
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/configure.ac b/configure.ac
index 3543d5874771..23b1ff84ed5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5983,6 +5983,12 @@ dnl 
===
 dnl C++11
 dnl ===
 
+my_cxx17switches=
+libo_FUZZ_ARG_ENABLE(c++17,
+AS_HELP_STRING([--disable-c++17],
+[Do not attempt to run GCC/Clang in C++17 mode (needed for Coverity).])
+)
+
 CXXFLAGS_CXX11=
 if test "$COM" = MSC; then
 AC_MSG_CHECKING([whether $CXX supports C++11])
@@ -5994,7 +6000,11 @@ elif test "$GCC" = "yes"; then
 dnl But only use C++17 if the gperf that is being used knows not to emit
 dnl "register" in C++ output:
 printf 'foo\n' | $GPERF -L C++ > conftest.inc
-for flag in -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z -std=gnu++14 
-std=gnu++1y -std=c++14 -std=c++1y -std=gnu++11 -std=gnu++0x -std=c++11 
-std=c++0x ; do
+my_flags='-std=gnu++14 -std=gnu++1y -std=c++14 -std=c++1y -std=gnu++11 
-std=gnu++0x -std=c++11 -std=c++0x'
+if test "$enable_c__17" != no; then
+my_flags="-std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z $my_flags"
+fi
+for flag in $my_flags; do
 save_CXXFLAGS=$CXXFLAGS
 CXXFLAGS="$CXXFLAGS $flag -Werror"
 AC_LANG_PUSH([C++])
diff --git a/distro-configs/LibreOfficeCoverity.conf 
b/distro-configs/LibreOfficeCoverity.conf
index e387254a6405..9d55f6811732 100644
--- a/distro-configs/LibreOfficeCoverity.conf
+++ b/distro-configs/LibreOfficeCoverity.conf
@@ -1,3 +1,4 @@
+--disable-c++17
 --enable-assert-always-abort
 --without-help
 --enable-gio
___
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-5.3' - desktop/source include/vcl sc/inc sc/source

2017-11-28 Thread Marco Cecchetti
 desktop/source/lib/init.cxx|   18 +++
 include/vcl/ITiledRenderable.hxx   |   13 ++
 sc/inc/docuno.hxx  |3 
 sc/source/ui/docshell/olinefun.cxx |   30 -
 sc/source/ui/inc/dbfunc.hxx|3 
 sc/source/ui/inc/tabvwsh.hxx   |   10 +
 sc/source/ui/undo/undoblk.cxx  |9 -
 sc/source/ui/undo/undoblk2.cxx |6 -
 sc/source/ui/undo/undodat.cxx  |   10 +
 sc/source/ui/unoobj/docuno.cxx |   13 ++
 sc/source/ui/view/cellsh1.cxx  |5 
 sc/source/ui/view/dbfunc3.cxx  |   53 +
 sc/source/ui/view/gridwin.cxx  |   12 +-
 sc/source/ui/view/tabview.cxx  |  208 -
 sc/source/ui/view/tabvwshc.cxx |   38 +-
 sc/source/ui/view/viewfunc.cxx |   14 --
 16 files changed, 408 insertions(+), 37 deletions(-)

New commits:
commit 6964953c5a86ef02fa9320e1db4d6bd81cee5001
Author: Marco Cecchetti 
Date:   Mon Nov 27 17:50:26 2017 +0100

lok - calc: outline and group handling

Change-Id: Ibb287468653bc381acf034dcb8531c5faf61aef3
Reviewed-on: https://gerrit.libreoffice.org/45416
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 307418fcd55c..fe046459751f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3009,6 +3009,10 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 int nY = 0;
 int nWidth = 0;
 int nHeight = 0;
+bool bColumn = false;
+int nLevel = -1;
+int nGroupIndex = -2;
+bool bHidden = false;
 OString aArguments = 
aCommand.copy(aViewRowColumnHeaders.getLength() + 1);
 sal_Int32 nParamIndex = 0;
 do
@@ -3034,9 +3038,23 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 nWidth = aValue.toInt32();
 else if (aKey == "height")
 nHeight = aValue.toInt32();
+else if (aKey == "columnOutline")
+bColumn = aValue.toBoolean();
+else if (aKey == "groupLevel")
+nLevel = aValue.toInt32();
+else if (aKey == "groupIndex")
+nGroupIndex = aValue.toInt32();
+else if (aKey == "groupHidden")
+bHidden = aValue.toBoolean();
 }
 while (nParamIndex >= 0);
+
 aRectangle = Rectangle(nX, nY, nX + nWidth, nY + nHeight);
+
+if (nGroupIndex != -2)
+{
+pDoc->setOutlineState(bColumn, nLevel, nGroupIndex, bHidden);
+}
 }
 
 OUString aHeaders = pDoc->getRowColumnHeaders(aRectangle);
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index ae3ba9e76c3c..95676d751244 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -151,6 +151,19 @@ public:
 }
 
 /**
+ * Show/Hide a single row/column header outline for Calc dosuments.
+ *
+ * @param bColumn - if we are dealing with a column or row group
+ * @param nLevel - the level to which the group belongs
+ * @param nIndex - the group entry index
+ * @param bHidden - the new group state (collapsed/expanded)
+ */
+virtual void setOutlineState(bool /*bColumn*/, int /*nLevel*/, int 
/*nIndex*/, bool /*bHidden*/)
+{
+return;
+}
+
+/**
  * Get position and content of row/column headers of Calc documents.
  *
  * @param rRectangle - if not empty, then limit the output only to the 
area of this rectangle
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 917b211a82a1..e37f11a9ba49 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -409,6 +409,9 @@ public:
 /// @see vcl::ITiledRenderable::setClientZoom().
 virtual void setClientZoom(int nTilePixelWidth, int nTilePixelHeight, int 
nTileTwipWidth, int nTileTwipHeight) override;
 
+/// @see vcl::ITiledRenderable::setOutlineState().
+virtual void setOutlineState(bool bColumn, int nLevel, int nIndex, bool 
bHidden) override;
+
 /// @see vcl::ITiledRenderable::getRowColumnHeaders().
 virtual OUString getRowColumnHeaders(const Rectangle& rRectangle) override;
 
diff --git a/sc/source/ui/docshell/olinefun.cxx 
b/sc/source/ui/docshell/olinefun.cxx
index a96eadf2d964..c2e56231cc74 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -27,6 +27,10 @@
 #include "globstr.hrc"
 #include "sc.hrc"
 
+#include 
+#include 
+#include 
+
 static void lcl_InvalidateOutliner( SfxBindings* pBindings )
 {
 if ( pBindings )
@@ -402,6 +406,10 @@ bool ScOutlineDocFunc::SelectLevel( SCTAB nTab, bool 
bColumns, sal_uInt16 nLevel
 rDocShell.SetDocumentModified();
 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source include/svl officecfg/registry sfx2/source sw/inc sw/qa sw/sdi sw/source sw/uiconfig

2017-11-28 Thread Henry Castro
 desktop/source/lib/init.cxx |4 
 include/svl/hint.hxx|1 
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |   28 +++
 sfx2/source/control/unoctitm.cxx|5 
 sw/inc/IDocumentRedlineAccess.hxx   |2 
 sw/inc/cmdid.h  |2 
 sw/qa/extras/tiledrendering/tiledrendering.cxx  |   74 
++
 sw/sdi/docsh.sdi|   10 +
 sw/sdi/swriter.sdi  |   36 
 sw/source/core/doc/DocumentRedlineManager.cxx   |   32 
 sw/source/core/inc/DocumentRedlineManager.hxx   |2 
 sw/source/uibase/app/docsh.cxx  |7 
 sw/source/uibase/app/docsh2.cxx |   27 +++
 sw/source/uibase/uiview/view.cxx|   16 ++
 sw/uiconfig/swriter/menubar/menubar.xml |2 
 15 files changed, 246 insertions(+), 2 deletions(-)

New commits:
commit af44e1547121f0292cd43fb8db6545e44594020d
Author: Henry Castro 
Date:   Sat Nov 4 12:18:53 2017 -0400

sw lok: add Accept/Reject All tracked changes, tdf#101977

Change-Id: I04d747343e24cb498a621c965d034d0791411d83
Reviewed-on: https://gerrit.libreoffice.org/44311
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/44486
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fe046459751f..515e148c1f04 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1761,7 +1761,9 @@ static void doc_iniUnoCommands ()
 OUString(".uno:TrackChanges"),
 OUString(".uno:ShowTrackedChanges"),
 OUString(".uno:NextTrackedChange"),
-OUString(".uno:PreviousTrackedChange")
+OUString(".uno:PreviousTrackedChange"),
+OUString(".uno:AcceptAllTrackedChanges"),
+OUString(".uno:RejectAllTrackedChanges")
 };
 
 util::URL aCommandURL;
diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index 70f5fc74e8d6..31404cf31748 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -31,6 +31,7 @@
 #define SFX_HINT_DEINITIALIZING 0x0040
 #define SFX_HINT_MODECHANGED0x0080
 #define SFX_HINT_LANGUAGECHANGED0x0100
+#define SFX_HINT_REDLINECHANGED 0x0200
 // unused, formerly SFX_HINT_CANCELLABLE
 // unused, formerly SFX_HINT_DATAAVAILABLE
 // unused, formerly SFX_HINT_SAVECOMPLETED
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index a93ed1e2318a..3e127c10d1ee 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -236,6 +236,20 @@
   1
 
   
+  
+
+  Reject All
+
+
+  Reject All Tracked Changes
+
+
+  Reject All Changes
+
+
+  1
+
+  
   
 
   Accept
@@ -250,6 +264,20 @@
   1
 
   
+  
+
+  Accept All
+
+
+  Accept All Tracked Changes
+
+
+  Accept All Changes
+
+
+  1
+
+  
   
 
   Next
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 394653cd582f..c55005d8433d 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1070,7 +1070,10 @@ static void InterceptLOKStateChangeEvent(const 
SfxViewFrame* pViewFrame, const c
  aEvent.FeatureURL.Path == "EntireColumn" ||
  aEvent.FeatureURL.Path == "EntireCell" ||
  aEvent.FeatureURL.Path == "SortAscending" ||
- aEvent.FeatureURL.Path == "SortDescending")
+ aEvent.FeatureURL.Path == "SortDescending" ||
+ aEvent.FeatureURL.Path == "AcceptAllTrackedChanges" ||
+ aEvent.FeatureURL.Path == "RejectAllTrackedChanges")
+
 {
 aBuffer.append(aEvent.IsEnabled ? OUString("enabled") : 
OUString("disabled"));
 }
diff --git a/sw/inc/IDocumentRedlineAccess.hxx 
b/sw/inc/IDocumentRedlineAccess.hxx
index 5488f7fcd66d..647f0980e631 100644
--- a/sw/inc/IDocumentRedlineAccess.hxx
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -204,6 +204,8 @@ public:
 
 virtual const SwRangeRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const = 
0;
 
+

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/inc

2017-11-28 Thread László Németh
 cui/inc/strings.hrc |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit f0a2fee5006f27b8ebf2b2e583964818986caec5
Author: László Németh 
Date:   Tue Nov 28 14:05:45 2017 +0100

Add comment to translators of "Grammar By" text entry box

Change-Id: Ifea74df8f113967c9df9703cf6582360ffdfa78d
Reviewed-on: https://gerrit.libreoffice.org/45410
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 217b1e8e94859e06af66023f042c53cf329f5232)
Reviewed-on: https://gerrit.libreoffice.org/45442
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index f60f504bd451..dca50c2cd57a 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -268,6 +268,20 @@
 #define RID_SVXSTR_CHG_SMARTART 
NC_("RID_SVXSTR_CHG_SMARTART", "SmartArt to %PRODUCTNAME shapes or reverse")
 
 #define RID_SVXSTR_OPT_DOUBLE_DICTS 
NC_("RID_SVXSTR_OPT_DOUBLE_DICTS", "The specified name already exists.\nPlease 
enter a new name.")
+/* To translators:
+   Please, try to find a similar *short* translation to avoid
+   to get narrow "New" field in the "Edit custom dictionary" window,
+   for example, "Model word for optional affixation and compounding"
+   is too long, but "Grammar By" is a good name here (help page of
+   the window contains the details).
+
+   "Grammar By" text entry box of the "Edit custom dictionary" window
+   contains an optional model word associated to the new user word,
+   allowing its affixation or compounding during spell checking.
+   For example, adding "Grammar By" word "fund" to the new user
+   word "crowdfund", the spell checker will recogize "crowdfund"
+   with suffixes of "fund": "crowdfunding", "crowdfund's" etc.
+*/
 #define RID_SVXSTR_OPT_GRAMMAR_BY   
NC_("RID_SVXSTR_OPT_GRAMMAR_BY", "~Grammar By")
 #define STR_MODIFY  NC_("STR_MODIFY", 
"~Replace")
 #define RID_SVXSTR_CONFIRM_SET_LANGUAGE 
NC_("RID_SVXSTR_CONFIRM_SET_LANGUAGE", "Do you want to change the '%1' 
dictionary language?")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - solenv/gbuild

2017-11-28 Thread Stephan Bergmann
 solenv/gbuild/SdiTarget.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9e06d98c87ee7313c72164d0689d7fad1bc8399f
Author: Stephan Bergmann 
Date:   Mon Nov 27 11:44:49 2017 +0100

Turns out SdiTarget needs the extended SOLARINC after all

After fbfe55e58c4b14f86cbb2c7b822f727e5b2e4a66 "There appears to be no need 
for
-I. in SOLARINC", on Windows, e.g. 
workdir/Dep/SdiTarget/basctl/sdi/basslots.d
now contains basslots.sdi without a path, because the call to
osl::File::searchFileURL in SvIdlParser::ReadInclude 
(idl/source/prj/parser.cxx)
is done with rBase.GetPath() no longer containing the basctl/sdi/ source 
dir, so
searchFileURL silently returns "basslots.sdi" unmodified.  (The non-Windows
implementation in sal/osl/unx/file_url.cxx appears to also check CWD, so 
doesn't
suffer from this regression.)

Change-Id: I51802192cfe112f810b193a77d14787d965c2761
Reviewed-on: https://gerrit.libreoffice.org/45323
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 445288f073f3c462669f02f3307ef9009ea0f594)
Reviewed-on: https://gerrit.libreoffice.org/45347
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/solenv/gbuild/SdiTarget.mk b/solenv/gbuild/SdiTarget.mk
index d7febb92aced..c76ef691d696 100644
--- a/solenv/gbuild/SdiTarget.mk
+++ b/solenv/gbuild/SdiTarget.mk
@@ -63,7 +63,7 @@ $(call gb_SdiTarget_get_clean_target,%) :
$(call gb_SdiTarget_get_target,$*))
 
 define gb_SdiTarget_SdiTarget
-$(call gb_SdiTarget_get_target,$(1)) : INCLUDE := $(SOLARINC)
+$(call gb_SdiTarget_get_target,$(1)) : INCLUDE := $(SOLARINC) -I$$(dir 
$(SRCDIR)/$(1))
 $(call gb_SdiTarget_get_target,$(1)) : EXPORTS := $(SRCDIR)/$(2).sdi
 ifeq ($(gb_FULLDEPS),$(true))
 -include $(call gb_SdiTarget_get_dep_target,$(1))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Caolán McNamara
 sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx |
2 +-
 sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx |
2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0e0a5a06185109f1ed76f6e97bb08bb7c6b953f6
Author: Caolán McNamara 
Date:   Tue Nov 28 09:28:15 2017 +

coverity#1421124 Uncaught exception

Change-Id: I23a9174bda0bddc258c9591bddc5108f62d64c2e
Reviewed-on: https://gerrit.libreoffice.org/45394
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git 
a/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx 
b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx
index 323dbe948fe9..acd93d26aec1 100644
--- a/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx
@@ -237,7 +237,7 @@ 
InsertionIndicatorHandler::ForceShowContext::ForceShowContext (
 mpHandler->ForceShow();
 }
 
-InsertionIndicatorHandler::ForceShowContext::~ForceShowContext()
+InsertionIndicatorHandler::ForceShowContext::~ForceShowContext() 
COVERITY_NOEXCEPT_FALSE
 {
 mpHandler->ForceEnd();
 }
diff --git 
a/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx 
b/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx
index ef1076e99a1d..62900ae3189f 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx
@@ -63,7 +63,7 @@ public:
 {
 public:
 ForceShowContext (const std::shared_ptr& 
rpHandler);
-~ForceShowContext();
+~ForceShowContext() COVERITY_NOEXCEPT_FALSE;
 private:
 const std::shared_ptr mpHandler;
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread László Németh
 cui/inc/strings.hrc |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit 217b1e8e94859e06af66023f042c53cf329f5232
Author: László Németh 
Date:   Tue Nov 28 14:05:45 2017 +0100

Add comment to translators of "Grammar By" text entry box

Change-Id: Ifea74df8f113967c9df9703cf6582360ffdfa78d
Reviewed-on: https://gerrit.libreoffice.org/45410
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index f60f504bd451..dca50c2cd57a 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -268,6 +268,20 @@
 #define RID_SVXSTR_CHG_SMARTART 
NC_("RID_SVXSTR_CHG_SMARTART", "SmartArt to %PRODUCTNAME shapes or reverse")
 
 #define RID_SVXSTR_OPT_DOUBLE_DICTS 
NC_("RID_SVXSTR_OPT_DOUBLE_DICTS", "The specified name already exists.\nPlease 
enter a new name.")
+/* To translators:
+   Please, try to find a similar *short* translation to avoid
+   to get narrow "New" field in the "Edit custom dictionary" window,
+   for example, "Model word for optional affixation and compounding"
+   is too long, but "Grammar By" is a good name here (help page of
+   the window contains the details).
+
+   "Grammar By" text entry box of the "Edit custom dictionary" window
+   contains an optional model word associated to the new user word,
+   allowing its affixation or compounding during spell checking.
+   For example, adding "Grammar By" word "fund" to the new user
+   word "crowdfund", the spell checker will recogize "crowdfund"
+   with suffixes of "fund": "crowdfunding", "crowdfund's" etc.
+*/
 #define RID_SVXSTR_OPT_GRAMMAR_BY   
NC_("RID_SVXSTR_OPT_GRAMMAR_BY", "~Grammar By")
 #define STR_MODIFY  NC_("STR_MODIFY", 
"~Replace")
 #define RID_SVXSTR_CONFIRM_SET_LANGUAGE 
NC_("RID_SVXSTR_CONFIRM_SET_LANGUAGE", "Do you want to change the '%1' 
dictionary language?")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Need code pointer for import of attributes

2017-11-28 Thread Michael Stahl
On 26.11.2017 23:01, Regina Henschel wrote:
> Hi Michael,
> 
> Michael Stahl schrieb am 23.11.2017 um 21:37:
>> On 22.11.2017 17:32, Regina Henschel wrote:
>>> Hi all,
>>>
>>> I've started on
>>> https://bugs.documentfoundation.org/show_bug.cgi?id=101242. My current
>>> work is in the attachment.
>>>
>>> Problem: Although I remove the config-items IsVisible, IsPrintable,
>>> IsLocked from the settings.xml of a file, the values from draw:display
>>> and draw:locked of the  element are not used. It seems to
>>> me, that somewhere the read values are overwritten with a default.
>>>
>>> Where and when are the values from settings.xml transformed to
>>> properties of the layers of a newly opened draw document?
>>
>> probably in sd/source/ui/view/frmview.cxx,
>> FrameView::ReadUserDataSequence(), around line 858
> 
> There the values from settings.xml are indeed read, but it sets no 
> defaults. If the node does not exists, nothing is changed.
> 
>>
>>> Any other hint, where to look?
>>
>> there are SetVisibleLayers functions on 3 different classes, maybe
>> setting breakpoints on those would be helpful.
> 
> "setting breakpoints" was a good tip.
> 
> I use VS2017 and there is no "vs2017-ide-integration" yet. But I have 
> tried the "vs2015-ide-integration" and it seems to work :)
> 
> I looked a little bit around for SetVisibleLayers and SdrLayerIDSet 
> without success.
> 
> Then I started from the other end and looked what happens with my not 
> working
> xLayer->setPropertyValue("IsLocked",(msbProtected == "true") ? Any(true) 
> : Any(false) );
> compared to the working
> xLayer->setPropertyValue("Title", Any( sTitleBuffer.makeStringAndClear() 
> ) );
> 
> I found this:
> setPropertyValue is a method of class SdLayer [in 
> sd\source\ui\unoidl\unolayer.hxx]
> 
> The SdLayer itself has no members to store the information. In case of 
> "Title" the SdrLayer is used, for which the SdLayer has a pointer. This 
> SdrLayer has the member maTitle to take the information. It has no 
> members to take IsLocked, IsVisible or IsPrintable.
> 
> In case of "IsLocked" the SdLayer uses its member mxLayerManager to get 
> a View of a page or a FrameView of the DocShell. But both doesn't exists 
> at this stage, when loading a document. So the call of set(...) returns 
> false; the source has the comment "//TODO: uno::Exception?"
> 
> The result is, that the information is not overwritten as I first 
> thought, but is simple lost.

the properties can only be initialised once the View is created, after
the document has been imported.

well that is unfortunate.

> A  can have its own . But the 
>  to be used for the page can also be inherited from a 
> master page via  or . Therefore 
> a solution is needed, which can be extended to support all three places.

looking at xmloff, there is exactly one draw:layer-set per document, in
office:master-styles, and it's written by a call to
SdXMLayerExporter::exportLayer().

the other 2 parents of draw:layer-set in ODF, we currently don't support.

> As you know, currently the IsLocked/IsVisible/IsPrintable is not stored 
> in the document itself, but in the settings.xml, despite the fact, that 
> ODF can express the information. [Remember ODF TC discussion on 
> OFFICE-3693 to not use settings.xml in those cases.]

looking at the structure of an ODG settings.xml, it's clear that there
can be multiple "View"s, each with a different "VisibleLayers" etc.

such a document can be created in Draw with Window->New and
right-clicking on the layer tabs, you can set the visibilities so that
one window shows a shape and the other not.

however it appears this is currently quite broken: the settings.xml
contains 2 config-item-map-entry elements; the first one looks correct
and the second one has the wrong ViewId "view1" identical to the first
one, and also all of the config-items of the first one are duplicated
inside it (it has twice as many items).

if i manually fix these problems and load the document, still only a
single window is created.

OOo 3.3 already has all of these problems.

> New members mbIsLocked, mbIsVisible and mbIsPrintable for the SdrLayer 
> would likely work [not worked out yet] as long as the layer settings are 
> unique throughout the document, but they need not be unique in ODF.

this would store the properties in the document model, while
(apparently) they currently exist only in the view?

... i think there's an argument to be made that we need to retain these
as view properties: while that cannot be persisted to files currently
due to all the bugs, it's still useful to have purely at run-time.

on the other hand, as view properties they obviously can't support the
currently missing feature of layers inside draw:page or style:master-page.

guess one way to handle it is to set the styles.xml attributes on the
one and only view that is created after loading - but because the view
is created so late, the attributes need to be stored temporarily in some
place and then 

BUILD FAIL WITH LIBREOFFICE ANDROID

2017-11-28 Thread Mert Tümer
Hello,

I am getting this error while building libreoffice with the android viewer:


[build MAK] CustomTarget/android/source/done
make[2]: Warning: File '/home/mert/libreoffice/config_build.mk' has 
modification time 5720 s in the future
creating liboSettings.gradle
Linking obj/local/armeabi-v7a/liblo-native-code.so
/home/mert/libreoffice/workdir/UnpackedTarball/icu/source/lib/libicuuc.a(udata.ao):udata.cpp:function
 openCommonData(char const*, int, UErrorCode*): error: undefined reference to 
'icudt60_dat'
/home/mert/libreoffice/workdir/UnpackedTarball/icu/source/lib/libicuuc.a(udata.ao):udata.cpp:function
 openCommonData(char const*, int, UErrorCode*): error: undefined reference to 
'icudt60_dat'
clang++: error: linker command failed with exit code 1 (use -v to see 
invocation)
../Bootstrap/Makefile.shared:61: recipe for target 
'obj/local/armeabi-v7a/liblo-native-code.so' failed
make[2]: *** [obj/local/armeabi-v7a/liblo-native-code.so] Error 1
/home/mert/libreoffice/android/CustomTarget_lo_android.mk:17: recipe for target 
'/home/mert/libreoffice/workdir/CustomTarget/android/source/done' failed
make[1]: *** [/home/mert/libreoffice/workdir/CustomTarget/android/source/done] 
Error 2
Makefile:268: recipe for target 'build' failed
make: *** [build] Error 2

Why am i getting this and is there anything i can do to fix this?


Regards,

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


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 2 commits - configure.ac sc/source

2017-11-28 Thread Andras Timar
 configure.ac   |2 +-
 sc/source/filter/excel/xltools.cxx |6 +-
 sc/source/filter/inc/xltools.hxx   |4 ++--
 3 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit b1da09649d96dbef2a989a9b1a02054bd7c65ba5
Author: Andras Timar 
Date:   Tue Nov 28 23:48:30 2017 +0100

Bump version to 5.3-32

Change-Id: Ia81627cb441158edd1e24d4cfb4b9c3f95853ec6

diff --git a/configure.ac b/configure.ac
index 069cee6af162..8b8bc3bf26b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[5.3.10.31],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[5.3.10.32],[],[],[https://collaboraoffice.com/])
 
 AC_PREREQ([2.59])
 
commit bba57a7eb9dd118df5772068b3a70aedb3602003
Author: Aron Budea 
Date:   Tue Nov 28 07:23:12 2017 +0100

tdf#109240, tdf#112571: don't export dupe built-in named ranges

XclTools::GetBuiltInDefNameIndex(...) only checked for prefix used in
binary Excel format, and didn't recognize OOXML built-in names, which
resulted in saving them twice in OOXML files.

Adapt to check both binary and OOXML prefixes, similarly to
XclTools::IsBuiltInStyleName(...).

Saving "bad" files after the fix will purge bad "_0", "_0_0" etc.
suffixed built-in names due to how GetBuiltInDefNameIndex(...) works.

Change-Id: I1bbe11f9c654a142a4626003df4cb0fd2a0f9c71

diff --git a/sc/source/filter/excel/xltools.cxx 
b/sc/source/filter/excel/xltools.cxx
index f2e33cff9539..f8a670d3f477 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -482,8 +482,12 @@ OUString XclTools::GetBuiltInDefNameXml( sal_Unicode 
cBuiltIn )
 
 sal_Unicode XclTools::GetBuiltInDefNameIndex( const OUString& rDefName )
 {
-sal_Int32 nPrefixLen = strlen(maDefNamePrefix);
+sal_Int32 nPrefixLen = 0;
 if( rDefName.startsWithIgnoreAsciiCase( maDefNamePrefix ) )
+nPrefixLen = strlen(maDefNamePrefix);
+else if( rDefName.startsWithIgnoreAsciiCase( maDefNamePrefixXml ) )
+nPrefixLen = strlen(maDefNamePrefixXml);
+if( nPrefixLen > 0 )
 {
 for( sal_Unicode cBuiltIn = 0; cBuiltIn < EXC_BUILTIN_UNKNOWN; 
++cBuiltIn )
 {
diff --git a/sc/source/filter/inc/xltools.hxx b/sc/source/filter/inc/xltools.hxx
index 2a202c3800b4..0939cddd6947 100644
--- a/sc/source/filter/inc/xltools.hxx
+++ b/sc/source/filter/inc/xltools.hxx
@@ -189,8 +189,8 @@ public:
 static OUString GetBuiltInDefNameXml( sal_Unicode cBuiltIn );
 /** Returns the Excel built-in name index of the passed defined name from 
Calc.
 @descr  Ignores any characters following a valid representation of a 
built-in name.
-@param pcBuiltIn  (out-param) If not 0, the index of the built-in name 
will be returned here.
-@return  true = passed string is a built-in name; false = user-defined 
name. */
+@param rDefName  raw English UI representation of a built-in defined 
name used in NAME records.
+@return  the index of the built-in name, or EXC_BUILTIN_UNKNOWN if it 
is not a built-in name. */
 static sal_Unicode  GetBuiltInDefNameIndex( const OUString& rDefName );
 
 // built-in style names ---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Andras Timar
Tag 'cp-5.3-32' created by Andras Timar  at 
2017-11-28 22:49 +

cp-5.3-32

Changes since cp-5.3-31-55:
---
 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-5.3-32'

2017-11-28 Thread Christian Lohmaier
Tag 'cp-5.3-32' created by Andras Timar  at 
2017-11-28 22:49 +

cp-5.3-32

Changes since cp-5.3-10:
Christian Lohmaier (1):
  update translations for 5.3.3 rc2

---
 source/am/cui/source/options.po|8 
 source/am/cui/source/tabpages.po   |8 
 source/am/cui/uiconfig/ui.po   |8 
 source/am/fpicker/source/office.po |   10 
 source/am/officecfg/registry/data/org/openoffice/Office.po |6 
 source/am/sc/source/ui/src.po  |8 
 source/am/sfx2/source/dialog.po|   12 
 source/am/svtools/source/dialogs.po|8 
 source/am/svtools/source/misc.po   |8 
 source/am/svx/source/stbctrls.po   |8 
 source/am/svx/uiconfig/ui.po   |   10 
 source/bg/sc/uiconfig/scalc/ui.po  |   20 
 source/bg/sfx2/source/dialog.po|   12 
 source/bg/svx/source/dialog.po |   30 
 source/bg/svx/source/form.po   |   10 
 source/bg/svx/source/stbctrls.po   |8 
 source/bg/svx/source/tbxctrls.po   |6 
 source/bg/svx/uiconfig/ui.po   |  289 
 source/bg/sw/source/ui/utlui.po|   21 
 source/bg/sw/source/uibase/utlui.po|6 
 source/bg/sw/uiconfig/swriter/ui.po|5 
 source/br/cui/uiconfig/ui.po   |   70 -
 source/br/extensions/source/bibliography.po|   12 
 source/br/extensions/source/propctrlr.po   |  152 ++--
 source/br/sc/source/ui/src.po  |   12 
 source/ca/helpcontent2/source/text/scalc/00.po |   20 
 source/ca/helpcontent2/source/text/scalc/01.po |8 
 source/ca/helpcontent2/source/text/scalc/guide.po  |   10 
 source/ca/helpcontent2/source/text/shared/01.po|6 
 source/ca/helpcontent2/source/text/shared/guide.po |5 
 source/ca/helpcontent2/source/text/shared/optionen.po  |8 
 source/ca/helpcontent2/source/text/simpress/guide.po   |   10 
 source/ca/helpcontent2/source/text/swriter/01.po   |   13 
 source/ca/helpcontent2/source/text/swriter/guide.po|   25 
 source/ca/officecfg/registry/data/org/openoffice/Office/UI.po  |8 
 source/ca/sc/uiconfig/scalc/ui.po  |6 
 source/ca/svx/uiconfig/ui.po   |   12 
 source/cy/cui/uiconfig/ui.po   |8 
 source/cy/sfx2/source/dialog.po|   12 
 source/cy/sfx2/uiconfig/ui.po  |   15 
 source/cy/svtools/source/dialogs.po|8 
 source/cy/svtools/source/misc.po   |8 
 source/cy/svx/source/stbctrls.po   |   10 
 source/cy/svx/uiconfig/ui.po   |   10 
 source/da/cui/uiconfig/ui.po   |8 
 source/da/helpcontent2/source/text/scalc/01.po |   12 
 source/da/sfx2/source/dialog.po|   14 
 source/da/sfx2/uiconfig/ui.po  |   17 
 source/da/svtools/source/dialogs.po|   10 
 source/da/svtools/source/java.po   |   12 
 source/da/svtools/source/misc.po   |   10 
 source/da/svx/source/stbctrls.po   |8 
 source/da/svx/uiconfig/ui.po   |   12 
 source/de/editeng/source/items.po  |   10 
 source/de/formula/source/core/resource.po  |8 
 source/de/helpcontent2/source/auxiliary.po |6 
 source/de/helpcontent2/source/text/sbasic/shared/01.po |   10 
 source/de/helpcontent2/source/text/scalc.po|6 
 source/de/helpcontent2/source/text/scalc/00.po |6 
 source/de/helpcontent2/source/text/scalc/01.po |  100 +-
 source/de/helpcontent2/source/text/scalc/guide.po  |   34 
 source/de/helpcontent2/source/text/schart/01.po|6 
 source/de/helpcontent2/source/text/shared/00.po|   10 
 source/de/helpcontent2/source/text/shared/01.po|   12 
 source/de/helpcontent2/source/text/shared/explorer/database.po |8 
 source/de/helpcontent2/source/text/shared/guide.po |   16 
 

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

2017-11-28 Thread Olivier R
Tag 'cp-5.3-32' created by Andras Timar  at 
2017-11-28 22:49 +

cp-5.3-32

Changes since cp-5.3-10:
Olivier R (1):
  tdf#107558 French spelling dictionary (6.0.3) and thesaurus

---
 fr_FR/README_fr.txt   |4 
 fr_FR/description.xml |2 
 fr_FR/fr.aff  |17751 ++--
 fr_FR/fr.dic  |155369 
+-
 fr_FR/package-description.txt |2 
 fr_FR/thes_fr.dat |  206 
 6 files changed, 88495 insertions(+), 84839 deletions(-)
---
___
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-5.3-32'

2017-11-28 Thread Andras Timar
Tag 'cp-5.3-32' created by Andras Timar  at 
2017-11-28 22:49 +

cp-5.3-32

Changes since libreoffice-5-3-branch-point-28:
---
 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/inc sc/source

2017-11-28 Thread Tor Lillqvist
 sc/inc/tokenarray.hxx|3 +++
 sc/source/core/data/conditio.cxx |   17 +
 sc/source/core/tool/token.cxx|   17 +
 3 files changed, 21 insertions(+), 16 deletions(-)

New commits:
commit aa28b54ab568fb7160095bb4a2fec338b1398b43
Author: Tor Lillqvist 
Date:   Tue Nov 28 12:38:03 2017 +0200

Do as the FIXME suggested

Not exactly, though. The FIXME said "Make this a comparison operator
at the TokenArray?" but I think that would be misleading as the code
in question specifically does not check the TokenArrays for being
completely identical; it intentionally ignores the RPN part. So make
it a member function 'EqualTokens' instead.

Change-Id: I15d840c422844fa144415a76c1f8fcbd6cae3c83
Reviewed-on: https://gerrit.libreoffice.org/45404
Reviewed-by: Bartosz Kosiorek 
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx
index 8b352b447f09..927b77bc5ffd 100644
--- a/sc/inc/tokenarray.hxx
+++ b/sc/inc/tokenarray.hxx
@@ -59,6 +59,9 @@ public:
 (not copied!) */
 ScTokenArray( const ScTokenArray& );
 virtual ~ScTokenArray() override;
+
+bool EqualTokens( const ScTokenArray* pArr2 ) const;
+
 virtual void Clear() override;
 ScTokenArray* Clone() const;/// True copy!
 
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 940181582b22..ca6b49f20a75 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -619,26 +619,11 @@ void ScConditionEntry::UpdateMoveTab( 
sc::RefUpdateMoveTabContext& rCxt )
 StartListening();
 }
 
-//FIXME: Make this a comparison operator at the TokenArray?
 static bool lcl_IsEqual( const ScTokenArray* pArr1, const ScTokenArray* pArr2 )
 {
 // We only compare the non-RPN array
 if ( pArr1 && pArr2 )
-{
-sal_uInt16 nLen = pArr1->GetLen();
-if ( pArr2->GetLen() != nLen )
-return false;
-
-FormulaToken** ppToken1 = pArr1->GetArray();
-FormulaToken** ppToken2 = pArr2->GetArray();
-for (sal_uInt16 i=0; iEqualTokens( pArr2 );
 else
 return !pArr1 && !pArr2; // Both 0? -> the same
 }
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index a849e034e176..55cbb9f1a7fc 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1852,6 +1852,23 @@ ScTokenArray& ScTokenArray::operator=( const 
ScTokenArray& rArr )
 return *this;
 }
 
+bool ScTokenArray::EqualTokens( const ScTokenArray* pArr2) const
+{
+// We only compare the non-RPN array
+if ( pArr2->nLen != nLen )
+return false;
+
+FormulaToken** ppToken1 = GetArray();
+FormulaToken** ppToken2 = pArr2->GetArray();
+for (sal_uInt16 i=0; i

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - extensions/source

2017-11-28 Thread Matthias Seidel
 extensions/source/config/ldap/ldapaccess.hxx|2 +-
 extensions/source/config/ldap/ldapuserprofilebe.hxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7ff777edb7e373243f6e66720df1886dea6f7141
Author: Matthias Seidel 
Date:   Tue Nov 28 22:44:54 2017 +

Fixed typos

diff --git a/extensions/source/config/ldap/ldapuserprofilebe.hxx 
b/extensions/source/config/ldap/ldapuserprofilebe.hxx
index 38a68f17b0c0..84cac1b6e0c4 100644
--- a/extensions/source/config/ldap/ldapuserprofilebe.hxx
+++ b/extensions/source/config/ldap/ldapuserprofilebe.hxx
@@ -50,8 +50,8 @@ typedef 
cppu::WeakComponentImplHelper2
Date:   Tue Nov 28 22:07:39 2017 +

Fixed typo

diff --git a/extensions/source/config/ldap/ldapaccess.hxx 
b/extensions/source/config/ldap/ldapaccess.hxx
index 9d0856d95166..851d71eb5320 100644
--- a/extensions/source/config/ldap/ldapaccess.hxx
+++ b/extensions/source/config/ldap/ldapaccess.hxx
@@ -82,7 +82,7 @@ struct LdapDefinition
 
 typedef std::map< rtl::OUString, rtl::OUString > LdapData; // key/value pairs
 
-/** Class encapulating all LDAP functionality */
+/** Class encapsulating all LDAP functionality */
 class LdapConnection
 {
 friend struct LdapMessageHolder;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Michael Meeks
 sw/source/core/layout/paintfrm.cxx |   41 ++---
 1 file changed, 29 insertions(+), 12 deletions(-)

New commits:
commit 91e283e42a5a9bad87e849bce8230eaf65d5ce6e
Author: Michael Meeks 
Date:   Mon Nov 27 20:53:48 2017 +

Tile the writer surround rendering to avoid large image scaling.

This also fixes a potentially large memory leak depending on zoom,
and particularly with non-paginated rendering.

Change-Id: Ia24e0b7baea725020f000a369708b0be3fc20c95
Reviewed-on: https://gerrit.libreoffice.org/45414
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 8d41f27b870b..134f79501b0f 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5876,6 +5876,7 @@ bool SwPageFrame::IsLeftShadowNeeded() const
 }
 
 enum PaintArea {LEFT, RIGHT, TOP, BOTTOM};
+#define BORDER_TILE_SIZE 512
 
 /// Wrapper around pOut->DrawBitmapEx.
 static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& 
aPoint, const Size& aSize, const BitmapEx& rBitmapEx, PaintArea eArea)
@@ -5893,13 +5894,29 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 case BOTTOM: aRect.Bottom() = aRect.Top() + 1; break;
 }
 
-pOut->SetFillColor( SwViewOption::GetAppBackgroundColor());
+pOut->SetFillColor(SwViewOption::GetAppBackgroundColor());
 pOut->SetLineColor();
 pOut->DrawRect(pOut->PixelToLogic(aRect));
 
-pOut->DrawBitmapEx(pOut->PixelToLogic(aPoint), pOut->PixelToLogic(aSize),
-Point(0, 0), aSize,
-rBitmapEx);
+// Tiled render if necessary
+tools::Rectangle aComplete(aPoint, aSize);
+Size aTileSize(BORDER_TILE_SIZE, BORDER_TILE_SIZE);
+
+long iterX = eArea != RIGHT && eArea != LEFT ? BORDER_TILE_SIZE : 0;
+long iterY = eArea == RIGHT || eArea == LEFT ? BORDER_TILE_SIZE : 0;
+
+for (tools::Rectangle aTile = tools::Rectangle(aPoint, aTileSize); true; 
aTile.Move(iterX, iterY))
+{
+tools::Rectangle aRender = aComplete.GetIntersection(aTile);
+SAL_DEBUG("Intersect " << aComplete << " with " << aTile << " to " << 
aRender << "bitmap is " << rBitmapEx.GetSizePixel());
+if (aRender.IsEmpty())
+break;
+pOut->DrawBitmapEx(pOut->PixelToLogic(aRender.TopLeft()),
+   pOut->PixelToLogic(aRender.GetSize()),
+   Point(0, 0), aRender.GetSize(),
+   rBitmapEx);
+}
+
 }
 
 /**
@@ -6011,8 +6028,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 {
 const long nWidth = aPageRightShadow.GetSizePixel().Width();
 const long nHeight = aPagePxRect.Height() - 2 * (mnShadowPxWidth - 
1);
-if (aPageRightShadow.GetSizePixel().Height() < nHeight)
-aPageRightShadow.Scale(Size(nWidth, nHeight), 
BmpScaleFlag::Fast);
+if (aPageRightShadow.GetSizePixel().Height() < BORDER_TILE_SIZE)
+aPageRightShadow.Scale(Size(nWidth, BORDER_TILE_SIZE), 
BmpScaleFlag::Fast);
 
 lcl_paintBitmapExToRect(pOut,
 Point(aPaintRect.Right() + mnShadowPxWidth, 
aPagePxRect.Top() + mnShadowPxWidth - 1),
@@ -6032,8 +6049,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 {
 const long nWidth = aPageLeftShadow.GetSizePixel().Width();
 const long nHeight = aPagePxRect.Height() - 2 * (mnShadowPxWidth - 
1);
-if (aPageLeftShadow.GetSizePixel().Height() < nHeight)
-aPageLeftShadow.Scale(Size(nWidth, nHeight), 
BmpScaleFlag::Fast);
+if (aPageLeftShadow.GetSizePixel().Height() < BORDER_TILE_SIZE)
+aPageLeftShadow.Scale(Size(nWidth, BORDER_TILE_SIZE), 
BmpScaleFlag::Fast);
 
 lcl_paintBitmapExToRect(pOut,
 Point(lLeft, aPagePxRect.Top() + mnShadowPxWidth - 1),
@@ -6044,8 +6061,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 
 // Bottom shadow
 const long nBottomHeight = aPageBottomShadow.GetSizePixel().Height();
-if (aPageBottomShadow.GetSizePixel().Width() < aPaintRect.Width())
-aPageBottomShadow.Scale(Size(aPaintRect.Width(), nBottomHeight), 
BmpScaleFlag::Fast);
+if (aPageBottomShadow.GetSizePixel().Width() < BORDER_TILE_SIZE)
+aPageBottomShadow.Scale(Size(BORDER_TILE_SIZE, nBottomHeight), 
BmpScaleFlag::Fast);
 
 lcl_paintBitmapExToRect(pOut,
 Point(aPaintRect.Left(), aPagePxRect.Bottom() + 2),
@@ -6054,8 +6071,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 
 // Top shadow
 const long nTopHeight = aPageTopShadow.GetSizePixel().Height();
-if 

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

2017-11-28 Thread Michael Meeks
 sw/source/core/layout/paintfrm.cxx |   39 +
 1 file changed, 27 insertions(+), 12 deletions(-)

New commits:
commit 3f4f6771e939fbe2fd12be6897ca0e27aaa4d55e
Author: Michael Meeks 
Date:   Mon Nov 27 20:53:48 2017 +

Tile the writer surround rendering to avoid large image scaling.

This also fixes a potentially large memory leak depending on zoom,
and particularly with non-paginated rendering.

Change-Id: Ia24e0b7baea725020f000a369708b0be3fc20c95
Reviewed-on: https://gerrit.libreoffice.org/45426
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit badd7363df0cdd95ddd9ab7f2008edd54dc0cbc9)
Reviewed-on: https://gerrit.libreoffice.org/45427

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 0572d4cf5b7a..7a764e73b6dc 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6057,6 +6057,7 @@ bool SwPageFrame::IsLeftShadowNeeded() const
 }
 
 enum PaintArea {LEFT, RIGHT, TOP, BOTTOM};
+#define BORDER_TILE_SIZE 512
 
 /// Wrapper around pOut->DrawBitmapEx.
 static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& 
aPoint, const Size& aSize, const BitmapEx& rBitmapEx, PaintArea eArea)
@@ -6074,13 +6075,27 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 case BOTTOM: aRect.Bottom() = aRect.Top() + 1; break;
 }
 
-pOut->SetFillColor( SwViewOption::GetAppBackgroundColor());
+pOut->SetFillColor(SwViewOption::GetAppBackgroundColor());
 pOut->SetLineColor();
 pOut->DrawRect(pOut->PixelToLogic(aRect));
 
-pOut->DrawBitmapEx(pOut->PixelToLogic(aPoint), pOut->PixelToLogic(aSize),
-Point(0, 0), aSize,
-rBitmapEx);
+// Tiled render if necessary
+Rectangle aComplete(aPoint, aSize);
+Size aTileSize(BORDER_TILE_SIZE, BORDER_TILE_SIZE);
+
+long iterX = eArea != RIGHT && eArea != LEFT ? BORDER_TILE_SIZE : 0;
+long iterY = eArea == RIGHT || eArea == LEFT ? BORDER_TILE_SIZE : 0;
+
+for (Rectangle aTile = Rectangle(aPoint, aTileSize); true; 
aTile.Move(iterX, iterY))
+{
+Rectangle aRender = aComplete.GetIntersection(aTile);
+if (aRender.IsEmpty())
+break;
+pOut->DrawBitmapEx(pOut->PixelToLogic(aRender.TopLeft()),
+   pOut->PixelToLogic(aRender.GetSize()),
+   Point(0, 0), aRender.GetSize(),
+   rBitmapEx);
+}
 }
 
 /**
@@ -6192,8 +6207,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 {
 const long nWidth = aPageRightShadow.GetSizePixel().Width();
 const long nHeight = aPagePxRect.Height() - 2 * (mnShadowPxWidth - 
1);
-if (aPageRightShadow.GetSizePixel().Height() < nHeight)
-aPageRightShadow.Scale(Size(nWidth, nHeight), 
BmpScaleFlag::Fast);
+if (aPageRightShadow.GetSizePixel().Height() < BORDER_TILE_SIZE)
+aPageRightShadow.Scale(Size(nWidth, BORDER_TILE_SIZE), 
BmpScaleFlag::Fast);
 
 lcl_paintBitmapExToRect(pOut,
 Point(aPaintRect.Right() + mnShadowPxWidth, 
aPagePxRect.Top() + mnShadowPxWidth - 1),
@@ -6213,8 +6228,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 {
 const long nWidth = aPageLeftShadow.GetSizePixel().Width();
 const long nHeight = aPagePxRect.Height() - 2 * (mnShadowPxWidth - 
1);
-if (aPageLeftShadow.GetSizePixel().Height() < nHeight)
-aPageLeftShadow.Scale(Size(nWidth, nHeight), 
BmpScaleFlag::Fast);
+if (aPageLeftShadow.GetSizePixel().Height() < BORDER_TILE_SIZE)
+aPageLeftShadow.Scale(Size(nWidth, BORDER_TILE_SIZE), 
BmpScaleFlag::Fast);
 
 lcl_paintBitmapExToRect(pOut,
 Point(lLeft, aPagePxRect.Top() + mnShadowPxWidth - 1),
@@ -6225,8 +6240,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 
 // Bottom shadow
 const long nBottomHeight = aPageBottomShadow.GetSizePixel().Height();
-if (aPageBottomShadow.GetSizePixel().Width() < aPaintRect.Width())
-aPageBottomShadow.Scale(Size(aPaintRect.Width(), nBottomHeight), 
BmpScaleFlag::Fast);
+if (aPageBottomShadow.GetSizePixel().Width() < BORDER_TILE_SIZE)
+aPageBottomShadow.Scale(Size(BORDER_TILE_SIZE, nBottomHeight), 
BmpScaleFlag::Fast);
 
 lcl_paintBitmapExToRect(pOut,
 Point(aPaintRect.Left(), aPagePxRect.Bottom() + 2),
@@ -6235,8 +6250,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 
 // Top shadow
 const long nTopHeight = aPageTopShadow.GetSizePixel().Height();
-if (aPageTopShadow.GetSizePixel().Width() < 

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

2017-11-28 Thread Ashod Nakashian
 sw/source/core/layout/paintfrm.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 85a47e76ea80c6a0676ac3b44032361733d44af3
Author: Ashod Nakashian 
Date:   Tue Nov 28 23:00:43 2017 -0500

Axe debug logging

Change-Id: I21a636d6ae1b824d44dc8d30499fcd6948834153
Reviewed-on: https://gerrit.libreoffice.org/45459
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index bee3cd75d2ed..ed716a4c20bd 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6089,7 +6089,6 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 for (Rectangle aTile = Rectangle(aPoint, aTileSize); true; 
aTile.Move(iterX, iterY))
 {
 Rectangle aRender = aComplete.GetIntersection(aTile);
-SAL_DEBUG("Intersect " << aComplete << " with " << aTile << " to " << 
aRender << "bitmap is " << rBitmapEx.GetSizePixel());
 if (aRender.IsEmpty())
 break;
 pOut->DrawBitmapEx(pOut->PixelToLogic(aRender.TopLeft()),
@@ -6097,7 +6096,6 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
Point(0, 0), aRender.GetSize(),
rBitmapEx);
 }
-
 }
 
 /**
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Julien Nabet
 filter/source/svg/svgfilter.hxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 411260d836e7bf6c693b9b7d16af1b36184133af
Author: Julien Nabet 
Date:   Tue Nov 28 21:33:49 2017 +0100

Remove unused typedef B2DPolyPolygonList (filter/svg)

Change-Id: I9bd4fecabdd1cfa90648b285d659d6b491e544c8
Reviewed-on: https://gerrit.libreoffice.org/45439
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx
index e9e8fad10a85..11ae4dea86cc 100644
--- a/filter/source/svg/svgfilter.hxx
+++ b/filter/source/svg/svgfilter.hxx
@@ -70,8 +70,6 @@ static const OUString sPlaceholderTag( "<[:isPlaceholder:]>" 
);
 
 class SVGExport : public SvXMLExport
 {
-typedef ::std::list< ::basegfx::B2DPolyPolygon > B2DPolyPolygonList;
-
 boolmbIsUseTinyProfile;
 boolmbIsEmbedFonts;
 boolmbIsUseOpacity;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basic/source compilerplugins/clang connectivity/source cui/source desktop/source editeng/source i18npool/source include/editeng include/sfx2 include/svx include/tools i

2017-11-28 Thread Noel Grandin
 basic/source/comp/exprnode.cxx  |   12 
 basic/source/inc/expr.hxx   |1 
 compilerplugins/clang/unusedmethods.results |  634 ++--
 compilerplugins/clang/unusedmethods.unused-returns.results  |  174 ---
 connectivity/source/drivers/evoab2/NResultSet.hxx   |5 
 cui/source/customize/cfg.cxx|   39 
 cui/source/inc/cfg.hxx  |2 
 desktop/source/migration/services/oo3extensionmigration.cxx |   12 
 desktop/source/migration/services/oo3extensionmigration.hxx |1 
 editeng/source/rtf/svxrtf.cxx   |   28 
 i18npool/source/localedata/LocaleNode.cxx   |8 
 i18npool/source/localedata/LocaleNode.hxx   |1 
 include/editeng/svxrtf.hxx  |3 
 include/sfx2/objface.hxx|1 
 include/svx/obj3d.hxx   |3 
 include/svx/svdpage.hxx |3 
 include/tools/globname.hxx  |1 
 include/vcl/gdimtf.hxx  |1 
 include/vcl/menu.hxx|1 
 include/vcl/window.hxx  |3 
 lotuswordpro/source/filter/lwpdoc.cxx   |   17 
 lotuswordpro/source/filter/lwpdoc.hxx   |1 
 lotuswordpro/source/filter/lwplayout.cxx|   32 
 lotuswordpro/source/filter/lwplayout.hxx|3 
 lotuswordpro/source/filter/lwppara.hxx  |1 
 lotuswordpro/source/filter/lwppara1.cxx |   11 
 reportdesign/inc/UndoEnv.hxx|2 
 reportdesign/source/core/sdr/UndoEnv.cxx|   26 
 reportdesign/source/ui/inc/ReportControllerObserver.hxx |5 
 reportdesign/source/ui/report/ReportControllerObserver.cxx  |   38 
 sc/inc/attrib.hxx   |   37 
 sc/inc/chartarr.hxx |   17 
 sc/inc/document.hxx |2 
 sc/inc/olinetab.hxx |1 
 sc/source/core/data/attrib.cxx  |   48 
 sc/source/core/data/documen2.cxx|2 
 sc/source/core/data/olinetab.cxx|   54 -
 sc/source/core/tool/chartarr.cxx|   38 
 sc/source/ui/cctrl/checklistmenu.cxx|   13 
 sc/source/ui/inc/checklistmenu.hxx  |1 
 sfx2/source/appl/workwin.cxx|   22 
 sfx2/source/control/objface.cxx |   18 
 sfx2/source/inc/splitwin.hxx|1 
 sfx2/source/inc/workwin.hxx |1 
 sot/source/sdstor/stgdir.cxx|   21 
 sot/source/sdstor/stgdir.hxx|1 
 svx/source/engine3d/obj3d.cxx   |   17 
 svx/source/form/navigatortreemodel.cxx  |   42 
 svx/source/inc/fmexpl.hxx   |2 
 svx/source/svdraw/svdpage.cxx   |   13 
 sw/inc/SwNumberTree.hxx |7 
 sw/inc/pagedesc.hxx |2 
 sw/inc/view.hxx |1 
 sw/source/core/SwNumberTree/SwNumberTree.cxx|   26 
 sw/source/core/access/acctable.cxx  |   91 -
 sw/source/uibase/uiview/viewdraw.cxx|   22 
 tools/source/ref/globname.cxx   |   13 
 vbahelper/source/msforms/vbacontrols.cxx|   13 
 vcl/source/gdi/gdimtf.cxx   |   15 
 vcl/source/window/menu.cxx  |   18 
 vcl/source/window/paint.cxx |   18 
 vcl/source/window/window.cxx|   16 
 62 files changed, 598 insertions(+), 1064 deletions(-)

New commits:
commit a566fd1c1a50f9bcb4c69a19bdf4fb1955285d93
Author: Noel Grandin 
Date:   Tue Nov 28 10:10:40 2017 +0200

loplugin:unusedmethods

Change-Id: I2efb5c0e5735c179314c6c5de87821cee3b033e1
Reviewed-on: https://gerrit.libreoffice.org/45386
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx
index a1ae40a4eacc..ffe7509fe31b 100644
--- a/basic/source/comp/exprnode.cxx
+++ b/basic/source/comp/exprnode.cxx
@@ -177,18 +177,6 @@ bool SbiExprNode::IsLvalue()
  

[Libreoffice-commits] online.git: 2 commits - common/Util.hpp net/Socket.cpp tools/map.cpp

2017-11-28 Thread Michael Meeks
 common/Util.hpp |   51 +
 net/Socket.cpp  |   44 +
 tools/map.cpp   |  114 +---
 3 files changed, 154 insertions(+), 55 deletions(-)

New commits:
commit 0778b726978fffd83f6cc1e75e4f3291ef2b69a4
Author: Michael Meeks 
Date:   Wed Nov 29 03:23:45 2017 +

Dump hex contents of un-shared memory.

Change-Id: I47dfa8a0b48d0ba34b7462301b83e2721617814d

diff --git a/common/Util.hpp b/common/Util.hpp
index e97d1808..c2495a11 100644
--- a/common/Util.hpp
+++ b/common/Util.hpp
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -131,6 +132,56 @@ namespace Util
 // Extract all json entries into a map.
 std::map JsonToMap(const std::string& 
jsonString);
 
+/// Dump data as hex and chars to stream
+inline void dumpHex (std::ostream , const char *legend, const char 
*prefix,
+ const std::vector , const unsigned int 
width = 32)
+{
+unsigned int i, j;
+char scratch[64];
+
+os << legend;
+for (j = 0; j < buffer.size() + width - 1; j += width)
+{
+int skip = 0;
+while (j >= width && j < buffer.size() - width &&
+   !memcmp([j], [j-width], width))
+{
+skip++;
+j += width;
+}
+if (skip > 1)
+{
+j -= width;
+os << "... dup " << skip - 1 << "...\n";
+}
+
+sprintf (scratch, "%s0x%.4x  ", prefix, j);
+os << scratch;
+for (i = 0; i < width; i++)
+{
+if (i && (i % 8) == 0)
+os << " ";
+if ((j + i) < buffer.size())
+sprintf (scratch, "%.2x ", (unsigned char)buffer[j+i]);
+else
+sprintf (scratch, "   ");
+os << scratch;
+}
+os << " | ";
+
+for (i = 0; i < width; i++)
+{
+if ((j + i) < buffer.size() && ::isprint(buffer[j+i]))
+sprintf (scratch, "%c", buffer[j+i]);
+else
+sprintf (scratch, ".");
+os << scratch;
+}
+os << "\n";
+}
+os.flush();
+}
+
 /// Trim spaces from the left. Just spaces.
 inline std::string& ltrim(std::string& s)
 {
diff --git a/net/Socket.cpp b/net/Socket.cpp
index 13424cd3..475649ac 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -137,50 +137,12 @@ void SocketDisposition::execute()
 _socketMove = nullptr;
 }
 
-namespace {
-
-void dump_hex (std::ostream , const char *legend, const char *prefix, 
std::vector buffer)
-{
-unsigned int i, j;
-char scratch[64];
-
-os << legend;
-for (j = 0; j < buffer.size() + 15; j += 16)
-{
-sprintf (scratch, "%s0x%.4x  ", prefix, j);
-os << scratch;
-for (i = 0; i < 16; i++)
-{
-if ((j + i) < buffer.size())
-sprintf (scratch, "%.2x ", (unsigned char)buffer[j+i]);
-else
-sprintf (scratch, "   ");
-os << scratch;
-if (i == 8)
-os << " ";
-}
-os << " | ";
-
-for (i = 0; i < 16; i++)
-{
-if ((j + i) < buffer.size() && ::isprint(buffer[j+i]))
-sprintf (scratch, "%c", buffer[j+i]);
-else
-sprintf (scratch, ".");
-os << scratch;
-}
-os << "\n";
-}
-}
-
-} // namespace
-
 void WebSocketHandler::dumpState(std::ostream& os)
 {
 os << (_shuttingDown ? "shutd " : "alive ")
<< std::setw(5) << 1.0*_pingTimeUs/1000 << "ms ";
 if (_wsPayload.size() > 0)
-dump_hex(os, "\t\tws queued payload:\n", "\t\t", _wsPayload);
+Util::dumpHex(os, "\t\tws queued payload:\n", "\t\t", _wsPayload);
 os << "\n";
 }
 
@@ -193,9 +155,9 @@ void StreamSocket::dumpState(std::ostream& os)
<< " r: " << _bytesRecvd << "\t w: " << _bytesSent << "\t";
 _socketHandler->dumpState(os);
 if (_inBuffer.size() > 0)
-dump_hex(os, "\t\tinBuffer:\n", "\t\t", _inBuffer);
+Util::dumpHex(os, "\t\tinBuffer:\n", "\t\t", _inBuffer);
 if (_outBuffer.size() > 0)
-dump_hex(os, "\t\toutBuffer:\n", "\t\t", _inBuffer);
+Util::dumpHex(os, "\t\toutBuffer:\n", "\t\t", _inBuffer);
 }
 
 void StreamSocket::send(Poco::Net::HTTPResponse& response)
diff --git a/tools/map.cpp b/tools/map.cpp
index 09cec706..6a1aaefa 100644
--- a/tools/map.cpp
+++ b/tools/map.cpp
@@ -10,6 +10,7 @@
 #include "config.h"
 
 #include 
+#include 
 
 #include 
 #include 
@@ -23,8 +24,12 @@
 #include 
 #include 
 
+#include 
+
 typedef unsigned long long addr_t;
 
+bool DumpHex = false;
+
 #define MAP_SIZE 20
 #define 

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

2017-11-28 Thread Michael Meeks
 sw/source/core/layout/paintfrm.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit b819131347ddb5cdde6cbbc89e93bff95701f3d8
Author: Michael Meeks 
Date:   Wed Nov 29 04:00:05 2017 +

Remove stray SAL_DEBUG.

Change-Id: I5961f5fec6fa757e21184ee15e8ef78eeb2ed459

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 134f79501b0f..776a5b492883 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5908,7 +5908,6 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 for (tools::Rectangle aTile = tools::Rectangle(aPoint, aTileSize); true; 
aTile.Move(iterX, iterY))
 {
 tools::Rectangle aRender = aComplete.GetIntersection(aTile);
-SAL_DEBUG("Intersect " << aComplete << " with " << aTile << " to " << 
aRender << "bitmap is " << rBitmapEx.GetSizePixel());
 if (aRender.IsEmpty())
 break;
 pOut->DrawBitmapEx(pOut->PixelToLogic(aRender.TopLeft()),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - Module_ooo.mk rdbmaker/Executable_rdbmaker.mk rdbmaker/Makefile rdbmaker/Module_rdbmaker.mk rdbmaker/prj RepositoryFixes.mk Repository.mk sane/Make

2017-11-28 Thread Damjan Jovanovic
 Module_ooo.mk   |3 ++
 Repository.mk   |2 +
 RepositoryFixes.mk  |2 +
 rdbmaker/Executable_rdbmaker.mk |   58 
 rdbmaker/Makefile   |   32 ++
 rdbmaker/Module_rdbmaker.mk |   30 
 rdbmaker/prj/build.lst  |6 
 rdbmaker/prj/d.lst  |4 --
 rdbmaker/prj/makefile.mk|   44 ++
 sane/Makefile   |   32 ++
 sane/Module_sane.mk |   30 
 sane/Package_inc.mk |   26 +
 sane/prj/build.lst  |3 --
 sane/prj/d.lst  |3 --
 sane/prj/makefile.mk|   44 ++
 15 files changed, 305 insertions(+), 14 deletions(-)

New commits:
commit aace36ef4f70f9275be9a8143f0c7a0cbebfe5c7
Author: Damjan Jovanovic 
Date:   Wed Nov 29 04:38:04 2017 +

Port main/sane and main/rdbmaker to gbuild.

Add reg to our known libraries (Windows implementation guessed).
Update Module_ooo.mk with unixODBC too.

Patch by: me

diff --git a/Module_ooo.mk b/Module_ooo.mk
index dce43be0f3a1..a0b3b1b65de0 100644
--- a/Module_ooo.mk
+++ b/Module_ooo.mk
@@ -59,8 +59,10 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
 oox \
 padmin \
 package \
+rdbmaker \
 reportdesign \
 remotebridges \
+sane \
 sax \
 sc \
 sccomp \
@@ -84,6 +86,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
 vbahelper \
 vcl \
 udm \
+unixODBC \
 wizards \
 writerfilter \
 x11_extensions \
diff --git a/Repository.mk b/Repository.mk
index c3242729a65e..a485eb47ffca 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
 bmpsum \
 g2g \
 mkunroll \
+rdbmaker \
 rscdep \
 so_checksum \
 srvdepy \
@@ -100,6 +101,7 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
 oox \
 package2 \
 qstart_gtk \
+reg \
 rpt \
 rptui \
 rptxml \
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index 70195f30f003..3b2295e133cc 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -83,6 +83,7 @@ gb_Library_FILENAMES := $(patsubst 
ssl:issl%,ssl:ssl%,$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst 
xml2:ixml2%,xml2:libxml2$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst 
xslt:ixslt%,xslt:libxslt.dll$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst 
rdf:irdf%,rdf:librdf.dll$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst reg:reg%,reg:reg3%,$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_FILENAMES))
 
 gb_Library_FILENAMES := $(patsubst 
stl:istl%,stl:msvcprt%,$(gb_Library_FILENAMES))
@@ -141,6 +142,7 @@ gb_Library_FILENAMES := $(patsubst 
ssl:issl%,ssl:ssleay32%,$(gb_Library_FILENAME
 gb_Library_FILENAMES := $(patsubst 
xml2:ixml2%,xml2:libxml2%,$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst 
xslt:ixslt%,xslt:libxslt%,$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst 
rdf:irdf%,rdf:librdf%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst reg:reg%,reg:reg3%,$(gb_Library_FILENAMES))
 gb_StaticLibrary_FILENAMES := $(patsubst 
graphite:graphite%,graphite:graphite_dll%,$(gb_StaticLibrary_FILENAMES))
 
 gb_Library_FILENAMES := $(patsubst 
stl:istl%,stl:msvcprt%,$(gb_Library_FILENAMES))
diff --git a/rdbmaker/Executable_rdbmaker.mk b/rdbmaker/Executable_rdbmaker.mk
new file mode 100644
index ..c461ef0f4b14
--- /dev/null
+++ b/rdbmaker/Executable_rdbmaker.mk
@@ -0,0 +1,58 @@
+###
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+###
+
+
+
+$(eval $(call gb_Executable_Executable,rdbmaker))
+
+$(eval $(call gb_Executable_add_api,rdbmaker,\
+   udkapi \
+))
+
+$(eval $(call gb_Executable_set_include,rdbmaker,\
+  

Re: Moztrap question

2017-11-28 Thread Muhammet Kara

Hi Pau,

As far as I know, Mozilla no longer uses Moztrap for testing their 
products. They use Testrail instead: 
https://wiki.mozilla.org/TestEngineering/Testrail


Best,
Muhammet

On 11/28/2017 12:40 PM, Campaña Soler Pau wrote:


Hello.
We are students of Aalto University, and we have to make an study of 
Thunderbird.  We have seen that for the tests cases they use moztrap, 
but all the links of that webite are not working. We have also found in:


https://wiki.documentfoundation.org/MozTrap/User_Guide

that they also use manual test libreoffice, but we do not know how to 
register (https://manual-test.libreoffice.org/login.php?viewer=). Can 
you provide us a link to register or a username and passwoord just to 
see how it inside (we will not make any modification).


If it is not posible, can you tell us if it is used by Thunderbird?

Thanks, Pau.



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


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


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

2017-11-28 Thread Michael Meeks
 sw/source/core/layout/paintfrm.cxx |   41 ++---
 1 file changed, 29 insertions(+), 12 deletions(-)

New commits:
commit badd7363df0cdd95ddd9ab7f2008edd54dc0cbc9
Author: Michael Meeks 
Date:   Mon Nov 27 20:53:48 2017 +

Tile the writer surround rendering to avoid large image scaling.

This also fixes a potentially large memory leak depending on zoom,
and particularly with non-paginated rendering.

Change-Id: Ia24e0b7baea725020f000a369708b0be3fc20c95
Reviewed-on: https://gerrit.libreoffice.org/45426
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 7626f1cbee60..bee3cd75d2ed 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6057,6 +6057,7 @@ bool SwPageFrame::IsLeftShadowNeeded() const
 }
 
 enum PaintArea {LEFT, RIGHT, TOP, BOTTOM};
+#define BORDER_TILE_SIZE 512
 
 /// Wrapper around pOut->DrawBitmapEx.
 static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& 
aPoint, const Size& aSize, const BitmapEx& rBitmapEx, PaintArea eArea)
@@ -6074,13 +6075,29 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 case BOTTOM: aRect.Bottom() = aRect.Top() + 1; break;
 }
 
-pOut->SetFillColor( SwViewOption::GetAppBackgroundColor());
+pOut->SetFillColor(SwViewOption::GetAppBackgroundColor());
 pOut->SetLineColor();
 pOut->DrawRect(pOut->PixelToLogic(aRect));
 
-pOut->DrawBitmapEx(pOut->PixelToLogic(aPoint), pOut->PixelToLogic(aSize),
-Point(0, 0), aSize,
-rBitmapEx);
+// Tiled render if necessary
+Rectangle aComplete(aPoint, aSize);
+Size aTileSize(BORDER_TILE_SIZE, BORDER_TILE_SIZE);
+
+long iterX = eArea != RIGHT && eArea != LEFT ? BORDER_TILE_SIZE : 0;
+long iterY = eArea == RIGHT || eArea == LEFT ? BORDER_TILE_SIZE : 0;
+
+for (Rectangle aTile = Rectangle(aPoint, aTileSize); true; 
aTile.Move(iterX, iterY))
+{
+Rectangle aRender = aComplete.GetIntersection(aTile);
+SAL_DEBUG("Intersect " << aComplete << " with " << aTile << " to " << 
aRender << "bitmap is " << rBitmapEx.GetSizePixel());
+if (aRender.IsEmpty())
+break;
+pOut->DrawBitmapEx(pOut->PixelToLogic(aRender.TopLeft()),
+   pOut->PixelToLogic(aRender.GetSize()),
+   Point(0, 0), aRender.GetSize(),
+   rBitmapEx);
+}
+
 }
 
 /**
@@ -6192,8 +6209,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 {
 const long nWidth = aPageRightShadow.GetSizePixel().Width();
 const long nHeight = aPagePxRect.Height() - 2 * (mnShadowPxWidth - 
1);
-if (aPageRightShadow.GetSizePixel().Height() < nHeight)
-aPageRightShadow.Scale(Size(nWidth, nHeight), 
BmpScaleFlag::Fast);
+if (aPageRightShadow.GetSizePixel().Height() < BORDER_TILE_SIZE)
+aPageRightShadow.Scale(Size(nWidth, BORDER_TILE_SIZE), 
BmpScaleFlag::Fast);
 
 lcl_paintBitmapExToRect(pOut,
 Point(aPaintRect.Right() + mnShadowPxWidth, 
aPagePxRect.Top() + mnShadowPxWidth - 1),
@@ -6213,8 +6230,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 {
 const long nWidth = aPageLeftShadow.GetSizePixel().Width();
 const long nHeight = aPagePxRect.Height() - 2 * (mnShadowPxWidth - 
1);
-if (aPageLeftShadow.GetSizePixel().Height() < nHeight)
-aPageLeftShadow.Scale(Size(nWidth, nHeight), 
BmpScaleFlag::Fast);
+if (aPageLeftShadow.GetSizePixel().Height() < BORDER_TILE_SIZE)
+aPageLeftShadow.Scale(Size(nWidth, BORDER_TILE_SIZE), 
BmpScaleFlag::Fast);
 
 lcl_paintBitmapExToRect(pOut,
 Point(lLeft, aPagePxRect.Top() + mnShadowPxWidth - 1),
@@ -6225,8 +6242,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 
 // Bottom shadow
 const long nBottomHeight = aPageBottomShadow.GetSizePixel().Height();
-if (aPageBottomShadow.GetSizePixel().Width() < aPaintRect.Width())
-aPageBottomShadow.Scale(Size(aPaintRect.Width(), nBottomHeight), 
BmpScaleFlag::Fast);
+if (aPageBottomShadow.GetSizePixel().Width() < BORDER_TILE_SIZE)
+aPageBottomShadow.Scale(Size(BORDER_TILE_SIZE, nBottomHeight), 
BmpScaleFlag::Fast);
 
 lcl_paintBitmapExToRect(pOut,
 Point(aPaintRect.Left(), aPagePxRect.Bottom() + 2),
@@ -6235,8 +6252,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 
 // Top shadow
 const long nTopHeight = aPageTopShadow.GetSizePixel().Height();
-if 

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd' - 9 commits - loleaflet/dist loleaflet/main.js loleaflet/src wsd/LOOLWSD.cpp

2017-11-28 Thread Henry Castro
 loleaflet/dist/menubar.css   |2 -
 loleaflet/dist/toolbar/toolbar.js|   50 +++
 loleaflet/main.js|1 
 loleaflet/src/control/Control.Menubar.js |   14 
 loleaflet/src/core/Socket.js |   10 +-
 loleaflet/src/map/Map.js |6 +++
 wsd/LOOLWSD.cpp  |4 ++
 7 files changed, 58 insertions(+), 29 deletions(-)

New commits:
commit 8f8662b57673ea67e1527c8feff90c2ed81a07cb
Author: Henry Castro 
Date:   Tue Sep 19 21:46:09 2017 -0400

loleaflet: fix background color of the top level menu items

Change-Id: I548c700a16664e8acfc6010c1be549e6176f2383
(cherry picked from commit 0d870d444cbbcd1141319f60834bacb80e8d233f)

diff --git a/loleaflet/dist/menubar.css b/loleaflet/dist/menubar.css
index 67279234..de3bb94e 100644
--- a/loleaflet/dist/menubar.css
+++ b/loleaflet/dist/menubar.css
@@ -40,7 +40,6 @@
 }
 
 .lo-menu a.disabled {
-background: #efefef;
 cursor: default;
 }
 .lo-menu > li > a.has-submenu {
@@ -70,7 +69,7 @@
 background: #538ecd;
 color: #fff;
 }
-.lo-menu > li {
+.lo-menu > li, .lo-menu > li > a.disabled {
 background: #efefef; /* top-level menus remain greyish */
 }
 .lo-menu > li > a:hover, .lo-menu > li > a:focus, .lo-menu > li > a:active, 
.lo-menu > li > a.highlighted {
commit a409184f15a0e53e3eae48b012fdaf830f8ad720
Author: Henry Castro 
Date:   Sun Sep 17 11:09:02 2017 -0400

loleaflet: show error when the document is disconnected

Change-Id: I43f8d48002ccb2fc3b6ac9807b72ba6b618d72d2
(cherry picked from commit 1a493880a496b805c6c577262715cc09b1e3cab2)

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 4c09c7f9..f8f0eba1 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -250,6 +250,10 @@ L.Socket = L.Class.extend({
msg = _('Server is shutting down for 
maintenance (auto-saving)');
postMsgData['Reason'] = 'ShuttingDown';
}
+   else if (textMsg === 'docdisconnected') {
+   msg = _('Oops, there is a problem connecting 
the document');
+   postMsgData['Reason'] = 'DocumentDisconnected';
+   }
else if (textMsg === 'recycling') {
msg = _('Server is recycling and will be 
available shortly');
this._map._active = false;
commit 45c6cd6df53812c7f15f082a0be8f2c10e4840ff
Author: Henry Castro 
Date:   Sun Sep 17 10:33:06 2017 -0400

wsd: notify when the document is disconnected

Change-Id: I36e6df3c576ff0f02d3b059c2f1db4226d527b49
(cherry picked from commit bccdd8d4d7c84e4992c16f75bc3be70c7143b7a0)

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 381c881a..f9c5edc8 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1395,6 +1395,7 @@ private:
 {
 auto lock = docBroker->getLock();
 docBroker->assertCorrectThread();
+docBroker->setCloseReason("docdisconnected");
 docBroker->stop();
 }
 }
commit 71ebd94219ae7903c53782f04528f28ec9e2bd6c
Author: Henry Castro 
Date:   Thu Sep 14 17:36:45 2017 -0400

loleaflet: ignore events before the document is loaded

Change-Id: Icd28854f4430786e1383a7fe6a694f3c7ce9a188
(cherry picked from commit 105eeddae1f058572cf3b6d13edb5ec7ee61473f)

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 1d198c58..787d0f8a 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -1028,7 +1028,7 @@ L.Map = L.Evented.extend({
},
 
_handleDOMEvent: function (e) {
-   if (!this._loaded || !this._enabled || L.DomEvent._skipped(e)) 
{ return; }
+   if (!this._docLayer || !this._loaded || !this._enabled || 
L.DomEvent._skipped(e)) { return; }
 
this.lastActiveTime = Date.now();
 
commit 61bbfaefddcd03dc4d578e62f30f05488d58e605
Author: Henry Castro 
Date:   Wed Sep 13 17:02:26 2017 -0400

wsd: debug: log when the wsd is ready to accept connections

Change-Id: I56ea17af47bc85f30e74f5e93b94e0f3f3d95be4
(cherry picked from commit 2556c2b4418de502a69fac4a2b3267eae91a4c41)

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 9aa3f986..381c881a 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2536,6 +2536,9 @@ int LOOLWSD::innerMain()
 
 /// The main-poll does next to nothing:
 SocketPoll mainWait("main");
+#if ENABLE_DEBUG
+std::cerr << "Ready to accept connections.\n" << std::endl;
+#endif
 
 const auto startStamp = std::chrono::steady_clock::now();
 
commit 80cb49582d19f53a45e47d5b72731ca2973e532d
Author: Henry Castro 

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

2017-11-28 Thread Miklos Vajna
 sw/qa/extras/rtfexport/data/tdf104035.rtf   |   14 ++
 sw/qa/extras/rtfexport/rtfexport3.cxx   |8 
 sw/source/filter/ww8/rtfattributeoutput.cxx |9 +++--
 3 files changed, 29 insertions(+), 2 deletions(-)

New commits:
commit 822e9af8ec8018fed098c16a50136fb9f0fa5b0e
Author: Miklos Vajna 
Date:   Tue Nov 28 09:08:12 2017 +0100

tdf#104035 RTF export: fix handling of absolute tab positions

RtfAttributeOutput::ParaTabStop() assumed that they are always absolute,
but WW8AttributeOutput::ParaTabStop() points out what compat setting
decides if they are absolute or relative.

(cherry picked from commit b5e871deb8ce390b9fa694e21b0272c7462da703)

Change-Id: Iafe8f6bb8733cae38a89f6c407763b0327e894e8
Reviewed-on: https://gerrit.libreoffice.org/45412
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/qa/extras/rtfexport/data/tdf104035.rtf 
b/sw/qa/extras/rtfexport/data/tdf104035.rtf
new file mode 100644
index ..730238eb0c63
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf104035.rtf
@@ -0,0 +1,14 @@
+{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033
+{\fonttbl
+{\f5\fswiss\fcharset0\fprq2 Helvetica;}
+}
+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;
+\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;
+\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
+\margl1440\margr1440
+\facingp\widowctrl\ftnbj\aenddoc\lytprtmet\hyphcaps0\formshade\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot
 \fet0\sectd 
\psz1\sbkodd\pgnrestart\linex0\headery1440\footery1080\endnhere\titlepg\sectdefaultcl
+\pard\plain 
\fi-2880\li2880\widctlpar\tx450\tx2880\tx3427\tx3787\tx4147\adjustright
+{\b\f5 1.0\tab FACILITY}
+{\f0\fs26 \tab Navy Golf operation physical/service environment is clean, safe 
and friendly for employees and customers, and creates a
+\par }
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx 
b/sw/qa/extras/rtfexport/rtfexport3.cxx
index 9c174450c95f..0c63f23972e0 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -60,6 +60,14 @@ DECLARE_RTFEXPORT_TEST(testTdf108949_footnote, 
"tdf108949_footnote.rtf")
  
getProperty(xFootnote->getAnchor(), "CharColor"));
 }
 
+DECLARE_RTFEXPORT_TEST(testTdf104035, "tdf104035.rtf")
+{
+auto aTabStops = 
getProperty(getParagraph(1), "ParaTabStops");
+CPPUNIT_ASSERT(aTabStops.hasElements());
+// This was 3330 twips instead, as tabs were assumed to be relative.
+CPPUNIT_ASSERT_EQUAL(static_cast(convertTwipToMm100(450)), 
aTabStops[0].Position);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 8b5ba978104d..6c8bb3390979 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -78,6 +78,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2838,8 +2839,12 @@ void RtfAttributeOutput::ParaWidows(const SvxWidowsItem& 
rWidows)
 
 void RtfAttributeOutput::ParaTabStop(const SvxTabStopItem& rTabStop)
 {
-long nOffset
-= static_cast(m_rExport.GetItem(RES_LR_SPACE)).GetTextLeft();
+long nOffset = 0;
+// Tabs are absolute by default.
+if (m_rExport.m_pDoc->getIDocumentSettingAccess().get(
+DocumentSettingId::TABS_RELATIVE_TO_INDENT))
+nOffset = static_cast(m_rExport.GetItem(RES_LR_SPACE)).GetTextLeft();
+
 for (sal_uInt16 n = 0; n < rTabStop.Count(); n++)
 {
 const SvxTabStop& rTS = rTabStop[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-5.3' - sd/qa sd/source

2017-11-28 Thread Henry Castro
 sd/qa/unit/tiledrendering/data/notes-view.odp |binary
 sd/qa/unit/tiledrendering/tiledrendering.cxx  |   29 ++
 sd/source/ui/unoidl/unomodel.cxx  |4 ---
 sd/source/ui/view/ImpressViewShellBase.cxx|   18 
 4 files changed, 39 insertions(+), 12 deletions(-)

New commits:
commit 394506840a6bfc8684e89292cefff7088557a915
Author: Henry Castro 
Date:   Tue Nov 14 16:15:52 2017 -0400

sd lok: ensure default view

In Tiled rendering case, the only default view is supported

Change-Id: Ia6df85dba28f8ebb41bdc20ae48916b0437ea185
Reviewed-on: https://gerrit.libreoffice.org/44737
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/44744
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/sd/qa/unit/tiledrendering/data/notes-view.odp 
b/sd/qa/unit/tiledrendering/data/notes-view.odp
new file mode 100644
index ..d41bdf9599a4
Binary files /dev/null and b/sd/qa/unit/tiledrendering/data/notes-view.odp 
differ
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 55d5712fe632..6b27320bc0d0 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -8,6 +8,7 @@
  */
 
 #include "../sdmodeltestbase.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -98,6 +99,7 @@ public:
 void testMultiViewInsertDeletePage();
 void testDisableUndoRepair();
 void testLanguageStatus();
+void testDefaultView();
 
 CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
 CPPUNIT_TEST(testRegisterCallback);
@@ -136,6 +138,7 @@ public:
 CPPUNIT_TEST(testMultiViewInsertDeletePage);
 CPPUNIT_TEST(testDisableUndoRepair);
 CPPUNIT_TEST(testLanguageStatus);
+CPPUNIT_TEST(testDefaultView);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -1818,6 +1821,8 @@ void SdTiledRenderingTest::testDisableUndoRepair()
 CPPUNIT_ASSERT(dynamic_cast< const SfxUInt32Item* >(pItem1.get()));
 CPPUNIT_ASSERT_EQUAL(static_cast(SID_REPAIRPACKAGE), 
dynamic_cast< const SfxUInt32Item * >(pItem1.get())->GetValue());
 }
+
+comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testLanguageStatus()
@@ -1836,6 +1841,30 @@ void SdTiledRenderingTest::testLanguageStatus()
 CPPUNIT_ASSERT(dynamic_cast< const SfxStringListItem* >(pItem1.get()));
 CPPUNIT_ASSERT(dynamic_cast< const SfxStringListItem* >(pItem2.get()));
 }
+
+comphelper::LibreOfficeKit::setActive(false);
+}
+
+void SdTiledRenderingTest::testDefaultView()
+{
+// Load the document with notes view.
+comphelper::LibreOfficeKit::setActive();
+
+SdXImpressDocument* pXImpressDocument = createDoc("notes-view.odp");
+sd::ViewShell* pView = pXImpressDocument->GetDocShell()->GetViewShell();
+{
+std::unique_ptr pItem1;
+std::unique_ptr pItem2;
+
pView->GetViewFrame()->GetBindings().QueryState(SID_NORMAL_MULTI_PANE_GUI, 
pItem1);
+pView->GetViewFrame()->GetBindings().QueryState(SID_NOTES_MODE, 
pItem2);
+const SfxBoolItem* pImpressView = dynamic_cast< const SfxBoolItem* 
>(pItem1.get());
+const SfxBoolItem* pNotesView = dynamic_cast< const SfxBoolItem* 
>(pItem2.get());
+CPPUNIT_ASSERT(pImpressView);
+CPPUNIT_ASSERT(pNotesView);
+CPPUNIT_ASSERT_EQUAL(true, pImpressView->GetValue());
+CPPUNIT_ASSERT_EQUAL(false, pNotesView->GetValue());
+}
+comphelper::LibreOfficeKit::setActive(false);
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest);
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 6b852e2cb5bb..c844c559a642 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2445,10 +2445,6 @@ void 
SdXImpressDocument::initializeForTiledRendering(const css::uno::SequenceGetViewShell()->GetViewFrame()->GetDispatcher()->Execute(SID_VIEWSHELL0,
 SfxCallMode::SYNCHRON | SfxCallMode::RECORD);
-
 if (DrawViewShell* pViewShell = GetViewShell())
 {
 DrawView* pDrawView = pViewShell->GetDrawView();
diff --git a/sd/source/ui/view/ImpressViewShellBase.cxx 
b/sd/source/ui/view/ImpressViewShellBase.cxx
index e74440f08010..12dcfd949e32 100644
--- a/sd/source/ui/view/ImpressViewShellBase.cxx
+++ b/sd/source/ui/view/ImpressViewShellBase.cxx
@@ -19,16 +19,18 @@
 
 #include "ImpressViewShellBase.hxx"
 
-#include "DrawDocShell.hxx"
-#include "sdresid.hxx"
-#include "strings.hrc"
-#include "app.hrc"
-#include "framework/FrameworkHelper.hxx"
-#include "framework/ImpressModule.hxx"
-#include "MasterPageObserver.hxx"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 namespace sd {
 
@@ -41,7 +43,7 @@ 

Re: Windows builders will need a cygwin gcc now

2017-11-28 Thread Stephan Bergmann

On 11/21/2017 10:21 PM, Thorsten Behrens wrote:

with the imminent merge of
https://gerrit.libreoffice.org/#/q/topic:gpg4libre-win32 into master
(and hopefully in time for 6.0), Windows builders will need a minimal
version of gcc, to satisfy gpgme's windres requirement.


With 
 
"Use Executable_cpp instead of default gcc as preprocessor for windres" 
that requirement should be moot again.

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


[Libreoffice-commits] libmspub.git: src/lib

2017-11-28 Thread Miklos Vajna
 src/lib/MSPUBParser.cpp |   14 +++---
 1 file changed, 3 insertions(+), 11 deletions(-)

New commits:
commit 6990552c358226fdcb7c714a0c4e00b8b8124df7
Author: Miklos Vajna 
Date:   Tue Nov 28 09:15:33 2017 +0100

MSPUBParser: reduce scope of shape width/height

They were write-only in the table case.

Change-Id: I10d480e9c621fd9dd6c4f1b2893f8dc9d9e955df

diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 25a8e73..179f8ae 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -652,8 +652,6 @@ bool MSPUBParser::parseShape(librevenge::RVNGInputStream 
*input,
   MSPUB_DEBUG_MSG(("parseShape: seqNum 0x%x\n", chunk.seqNum));
   unsigned long pos = input->tell();
   unsigned length = readU32(input);
-  unsigned width = 0;
-  unsigned height = 0;
   bool isTable = chunk.type == TABLE;
   bool isGroup = chunk.type == GROUP || chunk.type == LOGO;
   if (isTable)
@@ -666,15 +664,7 @@ bool MSPUBParser::parseShape(librevenge::RVNGInputStream 
*input,
 while (stillReading(input, pos + length))
 {
   MSPUBBlockInfo info = parseBlock(input, true);
-  if (info.id == TABLE_WIDTH)
-  {
-width = info.data;
-  }
-  else if (info.id == TABLE_HEIGHT)
-  {
-height = info.data;
-  }
-  else if (info.id == TABLE_CELLS_SEQNUM)
+  if (info.id == TABLE_CELLS_SEQNUM)
   {
 cellsSeqNum = info.data;
   }
@@ -824,6 +814,8 @@ bool MSPUBParser::parseShape(librevenge::RVNGInputStream 
*input,
 bool isText = false;
 bool shouldStretchBorderArt = true;
 unsigned textId = 0;
+unsigned width = 0;
+unsigned height = 0;
 while (stillReading(input, pos + length))
 {
   MSPUBBlockInfo info = parseBlock(input, true);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Noel Grandin
 compilerplugins/clang/unusedmethods.cxx |9 -
 1 file changed, 9 deletions(-)

New commits:
commit 5eec6db4addd7cc665222e1a4d05c35b13719847
Author: Noel Grandin 
Date:   Tue Nov 28 10:29:46 2017 +0200

fix loplugin unusedmethods

VisitCXXDeductionGuide is not part of our baseline clang

Change-Id: I354a992456949975384d8ae1a81a07de9e886061

diff --git a/compilerplugins/clang/unusedmethods.cxx 
b/compilerplugins/clang/unusedmethods.cxx
index e33bb0c01c0a..1a707de5893a 100644
--- a/compilerplugins/clang/unusedmethods.cxx
+++ b/compilerplugins/clang/unusedmethods.cxx
@@ -118,7 +118,6 @@ public:
 bool TraverseFunctionDecl( FunctionDecl* );
 bool TraverseCXXMethodDecl( CXXMethodDecl* );
 bool TraverseCXXConversionDecl( CXXConversionDecl* );
-bool TraverseCXXDeductionGuideDecl( CXXDeductionGuideDecl* );
 private:
 void logCallToRootMethods(const FunctionDecl* functionDecl, 
std::set& funcSet);
 MyFuncInfo niceName(const FunctionDecl* functionDecl);
@@ -388,14 +387,6 @@ bool 
UnusedMethods::TraverseCXXConversionDecl(CXXConversionDecl* f)
 currentFunctionDecl = copy;
 return ret;
 }
-bool UnusedMethods::TraverseCXXDeductionGuideDecl(CXXDeductionGuideDecl* f)
-{
-auto copy = currentFunctionDecl;
-currentFunctionDecl = f;
-bool ret = RecursiveASTVisitor::TraverseCXXDeductionGuideDecl(f);
-currentFunctionDecl = copy;
-return ret;
-}
 
 loplugin::Plugin::Registration< UnusedMethods > X("unusedmethods", false);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-28 Thread Tamas Bunth
 sw/qa/extras/ooxmlexport/data/tdf44832_section_new_header.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx|   10 ++
 sw/source/filter/ww8/docxexport.cxx   |   34 +++---
 sw/source/filter/ww8/docxexport.hxx   |2 
 4 files changed, 36 insertions(+), 10 deletions(-)

New commits:
commit 6aa1df5a627697e6adaee70adcef2c5b50cfcbf7
Author: Tamas Bunth 
Date:   Thu Nov 16 15:43:36 2017 +0100

tdf#41650 DOCX export: insert empty header/footer

Insert an empty header (or footer) to section which follows a section
with a header in it.

It is needed, because in case a section does not contain a header
definition, Word will use the preceding section's rule.

It causes problem if a document contains two page styles: one has
header (or footer), the other does not. In that case after saving to
docx it will end up in two sections. (only if it's not a plausable title
page)

Change-Id: I5add284d0cf1544923885e7205d9a2ac4e3cc9af
Reviewed-on: https://gerrit.libreoffice.org/44832
Reviewed-by: Tamás Bunth 
Tested-by: Tamás Bunth 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf44832_section_new_header.odt 
b/sw/qa/extras/ooxmlexport/data/tdf44832_section_new_header.odt
new file mode 100644
index ..9db311db1f2a
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf44832_section_new_header.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 116b3f05bb2b..40081112629d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -99,6 +99,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf67207_MERGEFIELD, 
"mailmerge.docx")
 
CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.text.fieldmaster.DataBase.Name"), 
sValue);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf44832_testSectionWithDifferentHeader, 
"tdf44832_section_new_header.odt")
+{
+xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+
+if(!pXmlDoc)
+return;
+
+assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:headerReference", 1);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxexport.cxx 
b/sw/source/filter/ww8/docxexport.cxx
index 78b116ab920f..03a225fd9792 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -255,7 +255,7 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const 
SwFormat& rFormat )
 }
 
 void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
-const SwFrameFormat& rFormat, const SwFrameFormat& rLeftFormat, const 
SwFrameFormat& rFirstPageFormat, sal_uInt8 /*nBreakCode*/ )
+const SwFrameFormat& rFormat, const SwFrameFormat& rLeftFormat, const 
SwFrameFormat& rFirstPageFormat, sal_uInt8 nBreakCode )
 {
 m_nHeadersFootersInSection = 1;
 // Turn ON flag for 'Writing Headers \ Footers'
@@ -263,23 +263,36 @@ void DocxExport::WriteHeadersFooters( sal_uInt8 
nHeadFootFlags,
 
 // headers
 if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_EVEN )
-WriteHeaderFooter( rLeftFormat, true, "even" );
+WriteHeaderFooter( , true, "even" );
 
 if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_ODD )
-WriteHeaderFooter( rFormat, true, "default" );
+WriteHeaderFooter( , true, "default" );
 
 if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_FIRST )
-WriteHeaderFooter( rFirstPageFormat, true, "first" );
+WriteHeaderFooter( , true, "first" );
+
+if( (nHeadFootFlags & (nsHdFtFlags::WW8_HEADER_EVEN
+ | nsHdFtFlags::WW8_HEADER_ODD
+ | nsHdFtFlags::WW8_HEADER_FIRST)) == 0
+&& m_bHasHdr && nBreakCode == 2 ) // 2: nexPage
+WriteHeaderFooter( nullptr, true, "default" );
+
 
 // footers
 if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_EVEN )
-WriteHeaderFooter( rLeftFormat, false, "even" );
+WriteHeaderFooter( , false, "even" );
 
 if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_ODD )
-WriteHeaderFooter( rFormat, false, "default" );
+WriteHeaderFooter( , false, "default" );
 
 if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_FIRST )
-WriteHeaderFooter( rFirstPageFormat, false, "first" );
+WriteHeaderFooter( , false, "first" );
+
+if( (nHeadFootFlags & (nsHdFtFlags::WW8_FOOTER_EVEN
+ | nsHdFtFlags::WW8_FOOTER_ODD
+ | nsHdFtFlags::WW8_FOOTER_FIRST)) == 0
+&& m_bHasFtr && nBreakCode == 2 ) // 2: nexPage
+WriteHeaderFooter( nullptr, false, "default");
 
 if ( nHeadFootFlags & ( nsHdFtFlags::WW8_FOOTER_EVEN | 
nsHdFtFlags::WW8_HEADER_EVEN ))
 m_aSettings.evenAndOddHeaders = true;
@@ -760,7 +773,7 @@ void 

Re: How to call function getTextProperties() declared under class TextBody

2017-11-28 Thread Miklos Vajna
Hi,

On Tue, Nov 28, 2017 at 01:47:52AM +0200, serdar tunc  
wrote:
> I need to call getTextProperties() function. It returns
> 
> maTextProperties which its type of
> 
> TextBodyProperties struct . In that struct i need to change moRotation value.
> 
> I want to make changes on sc/source/filter/oox/drawingfragment.cxx and
> i tried this line
> 
> mxShape->getTextBody()->getTextProperties().moRotation = 0;
> 
> 
> I can call getTextBody() function but i couldnt reach
> getTextProperties() funcion it says :"invalid use of incomplete type
> ‘class oox::drawingml::TextBody’".

It's in oox/inc/drawingml/textbody.hxx, you can't really include that in
sc/.

We miss the wider context what you're trying to do. Do you have a TDF
bug reported that made you look at the oox/ code?

Regards,

Miklos



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


Re: How to call function getTextProperties() declared under class TextBody

2017-11-28 Thread David Tardon
Hi,

On Tue, Nov 28, 2017 at 01:47:52AM +0200, serdar tunc wrote:
> I need to call getTextProperties() function. It returns
> 
> maTextProperties which its type of
> 
> TextBodyProperties struct . In that struct i need to change moRotation value.
> 
> I want to make changes on sc/source/filter/oox/drawingfragment.cxx and
> i tried this line
> 
> mxShape->getTextBody()->getTextProperties().moRotation = 0;
> 
> 
> I can call getTextBody() function but i couldnt reach
> getTextProperties() funcion it says :"invalid use of incomplete type
> ‘class oox::drawingml::TextBody’".
> 
>  Can somebody tell me how can i call function in drawingfragment.cxx file.

Add

#include 

to make the declaration of TextBody visible to the compiler (not just its
forward declaration).

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


[Libreoffice-commits] core.git: include/sfx2 include/svl include/svtools sfx2/source svtools/source svx/source

2017-11-28 Thread Noel Grandin
 include/sfx2/controlwrapper.hxx|8 
 include/sfx2/dispatch.hxx  |2 +-
 include/sfx2/filedlghelper.hxx |2 +-
 include/sfx2/infobar.hxx   |2 +-
 include/sfx2/itemconnect.hxx   |   12 ++--
 include/sfx2/objsh.hxx |2 +-
 include/sfx2/sfxbasemodel.hxx  |2 +-
 include/svl/itemset.hxx|4 ++--
 include/svl/urihelper.hxx  |2 +-
 include/svl/visitem.hxx|2 +-
 include/svtools/editbrowsebox.hxx  |2 +-
 sfx2/source/dialog/itemconnect.cxx |1 +
 svtools/source/filter/exportdialog.hxx |2 +-
 svx/source/unodraw/unomod.cxx  |2 +-
 14 files changed, 23 insertions(+), 22 deletions(-)

New commits:
commit c3a2d6f9fbdc0ea5c23e0e662f238b23e9c00035
Author: Noel Grandin 
Date:   Tue Nov 28 08:43:03 2017 +0200

loplugin:countusersofdefaultparams in sfx2..svtools

Change-Id: I65ae5305f9cec14069fd7aef6613e981dbbed846
Reviewed-on: https://gerrit.libreoffice.org/45382
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/include/sfx2/controlwrapper.hxx b/include/sfx2/controlwrapper.hxx
index 34740a48c02e..debb76ac1d68 100644
--- a/include/sfx2/controlwrapper.hxx
+++ b/include/sfx2/controlwrapper.hxx
@@ -79,7 +79,7 @@ public:
 is used (simply casting between list position and values). If the map
 exists, it *MUST* be terminated by an entry containing the special
 "not found" list position. */
-explicit PosValueMapper( PosT nNFPos, const MapEntryType* pMap = 
nullptr ) :
+explicit PosValueMapper( PosT nNFPos, const MapEntryType* pMap ) :
 mpMap( pMap ), mnNFPos( nNFPos ) {}
 
 /** Returns the value at the specified list position.
@@ -251,7 +251,7 @@ template< typename ValueT >
 class MetricFieldWrapper : public SingleControlWrapper< MetricField, ValueT >
 {
 public:
-explicit MetricFieldWrapper( MetricField& rField, FieldUnit eUnit = 
FUNIT_NONE ) :
+explicit MetricFieldWrapper( MetricField& rField, FieldUnit eUnit ) :
 SingleControlWrapper< MetricField, ValueT >( 
rField ), meUnit( eUnit ) {}
 
 virtual boolIsControlDontKnow() const SAL_OVERRIDE;
@@ -285,7 +285,7 @@ public:
 
 /** @param pMap  Optional list position <-> value map.
 See PosValueMapper documentation for details. */
-explicit ListBoxWrapper( ListBox& rListBox, const MapEntryType* pMap = 
nullptr ) :
+explicit ListBoxWrapper( ListBox& rListBox, const MapEntryType* pMap ) 
:
 SingleControlWrapper< ListBox, ValueT >( rListBox 
), MapperType( WRAPPER_LISTBOX_ENTRY_NOTFOUND, pMap ) {}
 
 virtual boolIsControlDontKnow() const SAL_OVERRIDE
@@ -318,7 +318,7 @@ public:
 
 /** @param pMap  Optional position <-> value map.
 See PosValueMapper documentation for details. */
-explicit ValueSetWrapper( ValueSet& rValueSet, const MapEntryType* 
pMap = nullptr ) :
+explicit ValueSetWrapper( ValueSet& rValueSet, const MapEntryType* 
pMap ) :
 SingleControlWrapper< ValueSet, ValueT >( 
rValueSet ), MapperType( WRAPPER_VALUESET_ITEM_NOTFOUND, pMap ) {}
 
 virtual boolIsControlDontKnow() const SAL_OVERRIDE
diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index e8ad3783c9f8..3daa2b0087d8 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -129,7 +129,7 @@ public:
 SfxItemSet const * pArgs,
 SfxItemSet const * pInternalArgs,
 sal_uInt16 nModi,
-vcl::Window* pDialogParent = nullptr);
+vcl::Window* pDialogParent);
 
 const SfxPoolItem*  ExecuteList( sal_uInt16 nSlot,
  SfxCallMode nCall,
diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx
index 6c6a4f090c3f..9fd312f87123 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -252,7 +252,7 @@ ErrCode FileOpenDialog_Impl( const vcl::Window* pParent,
  SfxItemSet *& rpSet,
  const OUString* pPath,
  sal_Int16 nDialog,
- const OUString& rStandardDir = OUString(),
+ const OUString& rStandardDir,
  const css::uno::Sequence< OUString >& rBlackList 
= css::uno::Sequence< OUString >());
 
 
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx
index 4e49213c19f6..23953a1a7bf7 100644
--- a/include/sfx2/infobar.hxx
+++ b/include/sfx2/infobar.hxx
@@ -93,7 +93,7 @@ class SfxInfoBarContainerWindow : public vcl::Window
 VclPtr 

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

2017-11-28 Thread Caolán McNamara
 sw/source/core/table/swnewtable.cxx |   32 
 1 file changed, 16 insertions(+), 16 deletions(-)

New commits:
commit e5527e606e224cc87fa2482545c770c38128c26e
Author: Caolán McNamara 
Date:   Mon Nov 27 17:07:25 2017 +

ofz: fix mem leak

Change-Id: I97b6ad9b0e873ac75a8791c731a1a8a862ef01af
Reviewed-on: https://gerrit.libreoffice.org/45364
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/table/swnewtable.cxx 
b/sw/source/core/table/swnewtable.cxx
index 9a2a7372ddd8..cc0a5fd403d0 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -60,11 +60,11 @@
 class SwBoxSelection
 {
 public:
-std::vector aBoxes;
+std::vector maBoxes;
 long mnMergeWidth;
 SwBoxSelection() : mnMergeWidth(0) {}
-bool isEmpty() const { return aBoxes.empty(); }
-void insertBoxes( const SwSelBoxes* pNew ){ aBoxes.insert( aBoxes.end(), 
pNew ); }
+bool isEmpty() const { return maBoxes.empty(); }
+void push_back(const SwSelBoxes& rNew) { maBoxes.push_back(rNew); }
 };
 
 /** NewMerge(..) removes the superfluous cells after cell merge
@@ -381,7 +381,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& 
rPam ) const
 {
 SwTableLine* pLine = m_aLines[nRow];
 OSL_ENSURE( pLine, "Missing table line" );
-SwSelBoxes *pBoxes = new SwSelBoxes;
+SwSelBoxes aBoxes;
 long nRight = 0;
 const size_t nCount = pLine->GetTabBoxes().size();
 for( size_t nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
@@ -408,7 +408,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& 
rPam ) const
 {
 if( nCurrBox )
 {
-pBoxes->insert( pBox );
+aBoxes.insert(pBox);
 pInnerBox = pBox;
 pLeftBox = pLine->GetTabBoxes()[nCurrBox-1];
 nDiff = nMin - nLeft;
@@ -439,7 +439,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& 
rPam ) const
 }
 else if( nRight <= nMax )
 {
-pBoxes->insert( pBox );
+aBoxes.insert(pBox);
 if( nRow == nTop && nRowSpan < 0 )
 {
 bOkay = false;
@@ -458,7 +458,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& 
rPam ) const
 {
 if( nCurrBox+1 < nCount )
 {
-pBoxes->insert( pBox );
+aBoxes.insert(pBox);
 pInnerBox = pBox;
 pRightBox = pLine->GetTabBoxes()[nCurrBox+1];
 nDiff = nRight - nMax;
@@ -558,7 +558,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& 
rPam ) const
 --nLeftSpanCnt;
 if( nRightSpanCnt )
 --nRightSpanCnt;
-pRet->insertBoxes( pBoxes );
+pRet->push_back(aBoxes);
 }
 pRet->mnMergeWidth = nMax - nMin;
 if( nCheckBottom > nBottom )
@@ -822,7 +822,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& 
rBoxes,
 // i.e. contiguous cells in contiguous rows
 bool bMerge = false; // will be set if any content is transferred from
 // a "not already overlapped" cell into the new master cell.
-SwTableBox *pMergeBox = (*pSel->aBoxes[0])[0]; // the master cell box
+SwTableBox *pMergeBox = pSel->maBoxes[0][0]; // the master cell box
 if( !pMergeBox )
 return false;
 (*ppMergeBox) = pMergeBox;
@@ -837,7 +837,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& 
rBoxes,
 SwPosition aInsPos( *pMergeBox->GetSttNd()->EndOfSectionNode() );
 SwPaM aChkPam( aInsPos );
 // The number of lines in the selection rectangle: nLineCount
-const size_t nLineCount = pSel->aBoxes.size();
+const size_t nLineCount = pSel->maBoxes.size();
 // BTW: nLineCount is the rowspan of the new master cell
 long nRowSpan = static_cast(nLineCount);
 // We will need the first and last line of the selection
@@ -848,12 +848,12 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, 
SwSelBoxes& rBoxes,
 for( size_t nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
 {
 // The selected boxes in the current line
-const SwSelBoxes* pBoxes = pSel->aBoxes[ nCurrLine ];
-size_t nColCount = pBoxes->size();
+const SwSelBoxes& rLineBoxes = pSel->maBoxes[nCurrLine];
+size_t nColCount = rLineBoxes.size();
 // Iteration over the selected cell in the current row
 for (size_t nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol)
 {
-SwTableBox* pBox = (*pBoxes)[nCurrCol];
+SwTableBox* pBox = rLineBoxes[nCurrCol];
  

Arch Coal Inc

2017-11-28 Thread Administrator <>
Hello How are you doing, It have been a long time since we last have contact,I 
was away for a business trip However, kindly send your latest cataloger so that 
we can choose from there and place our new order as soon as possible. This 
order is required in our Thailand branch. Regards, Khun Simon Arch Coal Inc. 
Contact us via our email address: sale...@baryet.net One City Place Driv Suit 
300 St. Louis MO63141___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-11-28 Thread Mike Kaganski
 sc/source/ui/pagedlg/tptable.cxx |   15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 22e747284c92b69175d3add4d1033a0e7aaacc5e
Author: Mike Kaganski 
Date:   Tue Nov 28 10:48:08 2017 +0300

tdf#113455 follow-up: clear spin buttons when disabled in Reset

otherwise they show "1" in disabled state, unlike after being enabled
and then disabled again manually (see ToggleHdl)

Change-Id: I4ff4d0ef006b7530bb20d9b830dc5e2f5732530d
Reviewed-on: https://gerrit.libreoffice.org/45383
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index a6c1954aaabe..0c9c80f8d141 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -221,11 +221,20 @@ void ScTablePage::Reset( const SfxItemSet* rCoreSet )
 else
 nWidth = nHeight = 1;
 
-m_pEdScalePageWidth->SetValue(nWidth);
+if (nWidth)
+m_pEdScalePageWidth->SetValue(nWidth);
+else
+m_pEdScalePageWidth->SetText(OUString());
+
 m_pEdScalePageWidth->Enable(nWidth);
-m_pEdScalePageHeight->SetValue(nHeight);
-m_pEdScalePageHeight->Enable(nHeight);
 m_pCbScalePageWidth->Check(nWidth);
+
+if(nHeight)
+m_pEdScalePageHeight->SetValue(nHeight);
+else
+m_pEdScalePageHeight->SetText(OUString());
+
+m_pEdScalePageHeight->Enable(nHeight);
 m_pCbScalePageHeight->Check(nHeight);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: How to call function getTextProperties() declared under class TextBody

2017-11-28 Thread David Tardon
Hi,

On Tue, Nov 28, 2017 at 09:50:26AM +0100, David Tardon wrote:
> Hi,
> 
> On Tue, Nov 28, 2017 at 01:47:52AM +0200, serdar tunc wrote:
> > I need to call getTextProperties() function. It returns
> > 
> > maTextProperties which its type of
> > 
> > TextBodyProperties struct . In that struct i need to change moRotation 
> > value.
> > 
> > I want to make changes on sc/source/filter/oox/drawingfragment.cxx and
> > i tried this line
> > 
> > mxShape->getTextBody()->getTextProperties().moRotation = 0;
> > 
> > 
> > I can call getTextBody() function but i couldnt reach
> > getTextProperties() funcion it says :"invalid use of incomplete type
> > ‘class oox::drawingml::TextBody’".
> > 
> >  Can somebody tell me how can i call function in drawingfragment.cxx file.
> 
> Add
> 
> #include 
> 
> to make the declaration of TextBody visible to the compiler (not just its
> forward declaration).

... But, as Miklos noticed, you cannot do that because the header is
local to a different module (my fault, I didn't check).

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


  1   2   3   4   >