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

2017-05-23 Thread Noel Grandin
 sw/inc/tblenum.hxx  |2 +-
 sw/source/core/frmedt/fetab.cxx |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit bfafda5829f75091c9db798f953d617cde688a1f
Author: Noel Grandin 
Date:   Tue May 23 16:58:18 2017 +0200

tdf#107866 - Changing table column width with Alt+arrow key strokes is 
broken

regression from commit 890d6790715c4c3f3565b476d538643f04dc6936
"convert TableChgWidthHeightType to o3tl::typed_flags"

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

diff --git a/sw/inc/tblenum.hxx b/sw/inc/tblenum.hxx
index 327d0ea52e37..bf9570f17fec 100644
--- a/sw/inc/tblenum.hxx
+++ b/sw/inc/tblenum.hxx
@@ -45,7 +45,7 @@ namespace o3tl {
 template<> struct typed_flags : 
is_typed_flags {};
 }
 constexpr TableChgWidthHeightType extractPosition(TableChgWidthHeightType e) {
-return static_cast(static_cast(e) & 0xf);
+return static_cast(static_cast(e) & 
0xf);
 }
 
 enum class TableChgMode
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 62e84aaeef01..3162adff5e6d 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -2190,7 +2190,8 @@ bool SwFEShell::SetColRowWidthHeight( 
TableChgWidthHeightType eType, sal_uInt16
 pTab->GetFormat()->SetFormatAttr( aSz );
 }
 
-if( eType & (TableChgWidthHeightType::BiggerMode | 
TableChgWidthHeightType::InsertDeleteMode) )
+if( extractPosition(eType) == TableChgWidthHeightType::ColLeft &&
+(eType & (TableChgWidthHeightType::BiggerMode | 
TableChgWidthHeightType::InsertDeleteMode)) )
 {
 nDiff = sal_uInt16(aRectFnSet.GetWidth(pFrame->Frame()));
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Tor Lillqvist
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 12fc1372f0e581348c70ad9d817b54c390f0e1cc
Author: Tor Lillqvist 
Date:   Wed May 24 09:34:09 2017 +0300

For some reason PdfExportTest::testTdf107868() fails in a 64-bit VS2017 
build

Just bypass it for now then.

Change-Id: I78b088dd35b37378f1d29833b08cfd7afd6b5133

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index b3661281d473..9d42dfa5489e 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -265,8 +265,9 @@ void PdfExportTest::testTdf105461()
 
 void PdfExportTest::testTdf107868()
 {
-// FIXME why does this fail on macOS?
-#ifndef MACOSX
+// FIXME: Why does this fail on macOS?
+// FIXME: Why does this fail when building 64bit with VS2017?
+#if !defined MACOSX && !(defined _WIN64 && _MSC_VER >= 1910)
 // Import the bugdoc and print to PDF.
 OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf107868.odt";
 mxComponent = loadFromDesktop(aURL);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: download.lst external/pdfium

2017-05-23 Thread Miklos Vajna
 download.lst  |4 ++--
 external/pdfium/Library_pdfium.mk |   15 +++
 external/pdfium/UnpackedTarball_pdfium.mk |2 --
 external/pdfium/system-zlib.patch.1   |   13 -
 4 files changed, 13 insertions(+), 21 deletions(-)

New commits:
commit b009c9a03622859ca95a9a5de97606ffaa8a6158
Author: Miklos Vajna 
Date:   Tue May 23 21:02:18 2017 +0200

external: update pdfium to 3094

This allows dropping the now upstreamed system-zlib.patch.1.

Change-Id: I92668ff243fa7f14a418cec419c003d4a9bc96ce
Reviewed-on: https://gerrit.libreoffice.org/37960
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/download.lst b/download.lst
index 8abec7d647d6..619a2c77038e 100644
--- a/download.lst
+++ b/download.lst
@@ -185,8 +185,8 @@ export OWNCLOUD_ANDROID_LIB_SHA256SUM := 
b18b3e3ef7fae6a79b62f2bb43cc47a5346b633
 export OWNCLOUD_ANDROID_LIB_TARBALL := 
owncloud-android-library-0.9.4-no-binary-deps.tar.gz
 export PAGEMAKER_SHA256SUM := 
3b5de037692f8e156777a75e162f6b110fa24c01749e4a66d7eb83f364e52a33
 export PAGEMAKER_TARBALL := libpagemaker-0.0.3.tar.bz2
-export PDFIUM_SHA256SUM := 
ded806dc9e2a4005d8c0a6b7fcb232ab36221d72d9ff5b815e8244987299d883
-export PDFIUM_TARBALL := pdfium-3064.tar.bz2
+export PDFIUM_SHA256SUM := 
f44de0dbe0e0ddd8176c69535879f130f2fde83f3f3b652d5ff227ab4b466490
+export PDFIUM_TARBALL := pdfium-3094.tar.bz2
 export PIXMAN_SHA256SUM := 
21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e
 export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
 export PNG_SHA256SUM := 
b6cec903e74e9fdd7b5bbcde0ab2415dd12f2f9e84d9e4d9ddd2ba26a41623b2
diff --git a/external/pdfium/Library_pdfium.mk 
b/external/pdfium/Library_pdfium.mk
index 9695552aaa8e..21c74038de45 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_Library_set_include,pdfium,\
 $(eval $(call gb_Library_add_defs,pdfium,\
 -DPDFIUM_DLLIMPLEMENTATION \
 -DUSE_SYSTEM_LIBJPEG \
+-DUSE_SYSTEM_ZLIB \
 -DUNICODE \
 ))
 
@@ -284,7 +285,8 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,pdfium,\
 UnpackedTarball/pdfium/core/fpdfdoc/cpvt_wordinfo \
 UnpackedTarball/pdfium/core/fpdfdoc/csection \
 UnpackedTarball/pdfium/core/fpdfdoc/ctypeset \
-UnpackedTarball/pdfium/core/fpdfdoc/doc_tagged \
+UnpackedTarball/pdfium/core/fpdfdoc/cpdf_structelement \
+UnpackedTarball/pdfium/core/fpdfdoc/cpdf_structtree \
 ))
 
 # fpdftext
@@ -328,22 +330,27 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,pdfium,\
 $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
 UnpackedTarball/pdfium/core/fxcrt/cfx_blockbuffer \
 UnpackedTarball/pdfium/core/fxcrt/cfx_bytestring \
+UnpackedTarball/pdfium/core/fxcrt/cfx_crtfileaccess \
+UnpackedTarball/pdfium/core/fxcrt/cfx_memorystream \
+UnpackedTarball/pdfium/core/fxcrt/cfx_seekablestreamproxy \
 UnpackedTarball/pdfium/core/fxcrt/cfx_widestring \
 UnpackedTarball/pdfium/core/fxcrt/fx_basic_buffer \
-UnpackedTarball/pdfium/core/fxcrt/fx_basic_coords \
 UnpackedTarball/pdfium/core/fxcrt/fx_basic_gcc \
-UnpackedTarball/pdfium/core/fxcrt/fx_basic_memmgr \
 UnpackedTarball/pdfium/core/fxcrt/fx_basic_utf \
 UnpackedTarball/pdfium/core/fxcrt/fx_basic_util \
 UnpackedTarball/pdfium/core/fxcrt/fx_bidi \
+UnpackedTarball/pdfium/core/fxcrt/fx_coordinates \
 UnpackedTarball/pdfium/core/fxcrt/fx_extension \
+UnpackedTarball/pdfium/core/fxcrt/fx_memory \
+UnpackedTarball/pdfium/core/fxcrt/fx_stream \
+UnpackedTarball/pdfium/core/fxcrt/fx_system \
 UnpackedTarball/pdfium/core/fxcrt/fx_ucddata \
 UnpackedTarball/pdfium/core/fxcrt/fx_unicode \
 UnpackedTarball/pdfium/core/fxcrt/fxcrt_posix \
-UnpackedTarball/pdfium/core/fxcrt/fxcrt_stream \
 UnpackedTarball/pdfium/core/fxcrt/fxcrt_windows \
 UnpackedTarball/pdfium/core/fxcrt/xml/cxml_attritem \
 UnpackedTarball/pdfium/core/fxcrt/xml/cxml_attrmap \
+UnpackedTarball/pdfium/core/fxcrt/xml/cxml_databufacc \
 UnpackedTarball/pdfium/core/fxcrt/xml/cxml_element \
 UnpackedTarball/pdfium/core/fxcrt/xml/cxml_parser \
 ))
diff --git a/external/pdfium/UnpackedTarball_pdfium.mk 
b/external/pdfium/UnpackedTarball_pdfium.mk
index ee9a417db1c5..daa252409edb 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -12,8 +12,6 @@ pdfium_patches += visibility.patch.1
 # To support macOS 10.9 baseline.
 pdfium_patches += macos.patch.1
 pdfium_patches += ubsan.patch
-# Upstreamed as .
-pdfium_patches += system-zlib.patch.1
 pdfium_patches += freetype.patch.1
 
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium))
diff --git a/external/pdfium/system-zlib.patch.1 
b/external/pdfium/system-zlib.patch.1
deleted file mode 100644
index cbac83

[Libreoffice-commits] core.git: Makefile.in

2017-05-23 Thread jan Iversen
 Makefile.in |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit a3f66d2d1d12bb7a308595b1b0ab96a7acab12d8
Author: jan Iversen 
Date:   Wed May 24 07:38:58 2017 +0200

fixing fe3fb5ecd3b66e32cc5aa64a2afffa572353740e for iOS

the new cross-toolset target does not work for iOS
(the old way worked as it should)
the "fetch" target causes problems.

Change-Id: I19d2949f04a968ebd9813f635dc21cae0559a4e7

diff --git a/Makefile.in b/Makefile.in
index 63c404fce3be..6aa98cfe97ab 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -276,7 +276,9 @@ help showmodules gbuildtojson:
 
 cross-toolset: bootstrap fetch
# fetch again in case there are externals only needed on build platform
+ifneq ($(OS),IOS)
$(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f 
$(SRCDIR)/Makefile fetch
+endif
$(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f 
$(SRCDIR)/Makefile.gbuild build-tools
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Kohei Yoshida
 sc/Library_sc.mk   |1 
 sc/inc/cellvalue.hxx   |   33 ++-
 sc/inc/column.hxx  |5 +++
 sc/inc/columniterator.hxx  |   29 
 sc/inc/document.hxx|   13 +
 sc/inc/formulacell.hxx |   10 +++
 sc/inc/mtvcellfunc.hxx |   12 
 sc/inc/table.hxx   |5 +++
 sc/source/core/data/cellvalue.cxx  |   46 
 sc/source/core/data/column4.cxx|   26 ++
 sc/source/core/data/columniterator.cxx |   37 +
 sc/source/core/data/document10.cxx |   23 
 sc/source/core/data/dpcache.cxx|   47 +
 sc/source/core/data/formulacell.cxx|   14 -
 sc/source/core/data/mtvcellfunc.cxx|   31 +
 sc/source/core/data/table7.cxx |   18 
 16 files changed, 324 insertions(+), 26 deletions(-)

New commits:
commit d4cd8677889ec3807c194ef5b462f8e031807e5b
Author: Kohei Yoshida 
Date:   Mon May 22 21:08:56 2017 -0400

tdf#107945: properly iterate over mtv during pivot cache loading.

This reduces the total time required for populating the pivot cache
by ~60%.

Change-Id: I6a8511959c20231a8a5dbd0b0a9a3d0930a1fa0c
Reviewed-on: https://gerrit.libreoffice.org/37971
Tested-by: Jenkins 
Reviewed-by: Kohei Yoshida 

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 3b2e88529977..e72c61546f05 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -157,6 +157,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/core/data/markarr \
 sc/source/core/data/markdata \
 sc/source/core/data/markmulti \
+sc/source/core/data/mtvcellfunc \
 sc/source/core/data/mtvelements \
 sc/source/core/data/olinetab \
 sc/source/core/data/pagepar \
diff --git a/sc/inc/cellvalue.hxx b/sc/inc/cellvalue.hxx
index 4ebd29889fee..430212245870 100644
--- a/sc/inc/cellvalue.hxx
+++ b/sc/inc/cellvalue.hxx
@@ -132,19 +132,38 @@ struct SC_DLLPUBLIC ScRefCellValue
 
 bool hasNumeric() const;
 
+bool hasError() const;
+
 double getValue();
 
-/** Retrieve string value.
+/**
+ * Retrieve a numeric value without modifying the states of any objects in
+ * the referenced document store.
+ */
+double getRawValue() const;
 
-@param  pDoc
-Needed to resolve EditCells' field contents, obtain a
-ScFieldEditEngine from that document. May be NULL if there is
-no ScDocument in the calling context but then the document
-specific fields can not be resolved. See
-ScEditUtil::GetString().
+/**
+ *  Retrieve string value.
+ *
+ *  Note that this method is NOT thread-safe.
+ *
+ *  @param  pDoc
+ *  Needed to resolve EditCells' field contents, obtain a
+ *  ScFieldEditEngine from that document. May be NULL if there is
+ *  no ScDocument in the calling context but then the document
+ *  specific fields can not be resolved. See
+ *  ScEditUtil::GetString().
  */
 OUString getString( const ScDocument* pDoc );
 
+/**
+ * Retrieve a string value without modifying the states of any objects in
+ * the referenced document store.
+ *
+ * This method is thread-safe.
+ */
+OUString getRawString( const ScDocument* pDoc ) const;
+
 bool isEmpty() const;
 
 bool hasEmptyValue();
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index d406a21ac784..69caa12e648a 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -67,6 +67,7 @@ class CompileFormulaContext;
 struct SetFormulaDirtyContext;
 class RefMovedHint;
 enum class MatrixEdge;
+class ColumnIterator;
 
 }
 
@@ -666,6 +667,10 @@ public:
 void SwapNonEmpty(
 sc::TableValues& rValues, sc::StartListeningContext& rStartCxt, 
sc::EndListeningContext& rEndCxt );
 
+std::unique_ptr GetColumnIterator( SCROW nRow1, SCROW 
nRow2 ) const;
+
+void EnsureFormulaCellResults( SCROW nRow1, SCROW nRow2 );
+
 #if DUMP_COLUMN_STORAGE
 void DumpColumnStorage() const;
 #endif
diff --git a/sc/inc/columniterator.hxx b/sc/inc/columniterator.hxx
index b36df3df6dbd..c6a87b4e6b39 100644
--- a/sc/inc/columniterator.hxx
+++ b/sc/inc/columniterator.hxx
@@ -49,6 +49,35 @@ private:
 void checkEndRow();
 };
 
+namespace sc {
+
+/**
+ * This iterator lets you iterate over cells over specified range in a
+ * single column.  It does not modify the state of the cells, and therefore
+ * is thread safe.
+ */
+class ColumnIterator
+{
+CellStoreType::const_position_type maPos;
+CellStoreType::const_position_type maPosEnd;
+
+public:
+ColumnIterator( const CellStoreType& rCells, SCROW nRow1, SCROW nRow2 );
+~ColumnIterator();
+
+void next(

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

2017-05-23 Thread Takeshi Abe
 basic/source/comp/token.cxx |   38 +-
 1 file changed, 9 insertions(+), 29 deletions(-)

New commits:
commit 7948e84091f37fbda75f524f20138d1171918e64
Author: Takeshi Abe 
Date:   Sun May 21 10:21:16 2017 +0900

basic: Stop detecting the number of tokens at runtime

which removes static variables and improves SbiTokenizer's
thread-safety.

Change-Id: Ic3eb52adfa85691af65f214c1b90c43c03f9a3dd
Reviewed-on: https://gerrit.libreoffice.org/37867
Tested-by: Jenkins 
Reviewed-by: Takeshi Abe 

diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index ca57eb04dcc2..65ae069fd3eb 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -20,15 +20,12 @@
 
 #include 
 
+#include "sal/macros.h"
 #include "basiccharclass.hxx"
 #include "token.hxx"
 
 struct TokenTable { SbiToken t; const char *s; };
 
-static short nToken;// number of tokens
-
-static const TokenTable* pTokTable;
-
 static const TokenTable aTokTable_Basic [] = {
 { CAT,  "&" },
 { MUL,  "*" },
@@ -173,7 +170,6 @@ static const TokenTable aTokTable_Basic [] = {
 { WITHEVENTS,   "WithEvents" },
 { WRITE,"Write" },  // also WRITE #
 { XOR,  "Xor" },
-{ NIL,  "" }
 };
 
 // #i109076
@@ -206,7 +202,6 @@ TokenLabelInfo::TokenLabelInfo()
 }
 }
 
-// the constructor detects the length of the token table
 
 SbiTokenizer::SbiTokenizer( const OUString& rSrc, StarBASIC* pb )
 : SbiScanner(rSrc, pb)
@@ -221,13 +216,6 @@ SbiTokenizer::SbiTokenizer( const OUString& rSrc, 
StarBASIC* pb )
 , bAs(false)
 , bErrorIsSymbol(true)
 {
-pTokTable = aTokTable_Basic;
-if( !nToken )
-{
-const TokenTable *tp;
-for( nToken = 0, tp = pTokTable; tp->t; nToken++, tp++ )
-{}
-}
 }
 
 SbiTokenizer::~SbiTokenizer()
@@ -295,12 +283,11 @@ const OUString& SbiTokenizer::Symbol( SbiToken t )
 default:
 break;
 }
-const TokenTable* tp = pTokTable;
-for( short i = 0; i < nToken; i++, tp++ )
+for( auto& rTok : aTokTable_Basic )
 {
-if( tp->t == t )
+if( rTok.t == t )
 {
-aSym = OStringToOUString(tp->s, RTL_TEXTENCODING_ASCII_US);
+aSym = OStringToOUString(rTok.s, RTL_TEXTENCODING_ASCII_US);
 return aSym;
 }
 }
@@ -380,12 +367,12 @@ SbiToken SbiTokenizer::Next()
 return eCurTok = SYMBOL;
 // valid token?
 short lb = 0;
-short ub = nToken-1;
+short ub = SAL_N_ELEMENTS(aTokTable_Basic)-1;
 short delta;
 do
 {
 delta = (ub - lb) >> 1;
-tp = &pTokTable[ lb + delta ];
+tp = &aTokTable_Basic[ lb + delta ];
 sal_Int32 res = aSym.compareToIgnoreAsciiCaseAscii( tp->s );
 
 if( res == 0 )
@@ -556,17 +543,10 @@ bool SbiTokenizer::MayBeLabel( bool bNeedsColon )
 
 OUString SbiTokenizer::GetKeywordCase( const OUString& sKeyword )
 {
-if( !nToken )
-{
-const TokenTable *tp;
-for( nToken = 0, tp = pTokTable; tp->t; nToken++, tp++ )
-{}
-}
-const TokenTable* tp = pTokTable;
-for( short i = 0; i < nToken; i++, tp++ )
+for( auto& rTok : aTokTable_Basic )
 {
-if( sKeyword.equalsIgnoreAsciiCaseAscii(tp->s) )
-return OStringToOUString(tp->s, RTL_TEXTENCODING_ASCII_US);
+if( sKeyword.equalsIgnoreAsciiCaseAscii(rTok.s) )
+return OStringToOUString(rTok.s, RTL_TEXTENCODING_ASCII_US);
 }
 return OUString();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Maxim Monastirsky
 include/svx/nbdtmg.hxx |5 +++--
 svx/source/sidebar/nbdtmg.cxx  |   19 ++-
 sw/source/uibase/shells/txtnum.cxx |   15 ---
 3 files changed, 25 insertions(+), 14 deletions(-)

New commits:
commit 687c3b49976ef0eb079853f7bffd63d25bff05c7
Author: Maxim Monastirsky 
Date:   Tue May 23 20:49:48 2017 +0300

tdf#107008 Pass char style names to NBOTypeMgrBase

Change-Id: I26db31b8f9db968aa33b92a4abe917ac20cd5844
Reviewed-on: https://gerrit.libreoffice.org/37963
Tested-by: Jenkins 
Reviewed-by: Maxim Monastirsky 

diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
index aeb4ae6651fb..004fecd7b777 100644
--- a/include/svx/nbdtmg.hxx
+++ b/include/svx/nbdtmg.hxx
@@ -122,6 +122,7 @@ class SVX_DLLPUBLIC NBOTypeMgrBase
 const SfxItemSet*   pSet;
 MapUnit eCoreUnit;
 // store the attributes passed from pSet
+OUStringaBulletCharFmtName;
 OUStringaNumCharFmtName;
 NBOTypeMgrBase(const NBOTypeMgrBase&) = delete;
 
@@ -129,7 +130,6 @@ class SVX_DLLPUBLIC NBOTypeMgrBase
 NBOTypeMgrBase()
 : pSet(nullptr)
 , eCoreUnit(MapUnit::MapTwip)
-, aNumCharFmtName(OUString())
 , bIsLoading(false)
 {}
 virtual ~NBOTypeMgrBase() {}
@@ -143,7 +143,8 @@ class SVX_DLLPUBLIC NBOTypeMgrBase
 // store the attributes passed from pSet
 void SetItems(const SfxItemSet* pArg);
 protected:
-const OUString& GetBulCharFmtName() { return aNumCharFmtName;}
+const OUString& GetBulletCharFmtName() { return aBulletCharFmtName;}
+const OUString& GetNumCharFmtName() { return aNumCharFmtName;}
 MapUnit GetMapUnit() { return eCoreUnit;}
 protected:
 boolbIsLoading;
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 686fcf2c6510..7dac15f83f22 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -147,12 +147,14 @@ void NBOTypeMgrBase::SetItems(const SfxItemSet* pArg) {
 if ( pSet )
 {
 SfxAllItemSet aSet(*pSet);
+
 const SfxStringItem* pBulletCharFmt = 
aSet.GetItem(SID_BULLET_CHAR_FMT, false);
+if (pBulletCharFmt)
+aBulletCharFmtName = pBulletCharFmt->GetValue();
 
-if ( pBulletCharFmt )
-{
-aNumCharFmtName =  pBulletCharFmt->GetValue();
-}
+const SfxStringItem* pNumCharFmt = 
aSet.GetItem(SID_NUM_CHAR_FMT, false);
+if (pNumCharFmt)
+aNumCharFmtName = pNumCharFmt->GetValue();
 
 const SfxPoolItem* pItem;
 SfxItemState eState = pSet->GetItemState(SID_ATTR_NUMBERING_RULE, 
false, &pItem);
@@ -380,7 +382,7 @@ void BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, 
sal_uInt16 nIndex, sal_uInt1
 const vcl::Font& rActBulletFont = pActualBullets[nIndex]->aFont;
 
 sal_uInt16 nMask = 1;
-OUString sBulletCharFormatName = GetBulCharFmtName();
+OUString sBulletCharFormatName = GetBulletCharFmtName();
 for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++)
 {
 if(mLevel & nMask)
@@ -557,7 +559,7 @@ void NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, 
sal_uInt16 nIndex, sal_uIn
 SvxNumType eNewType = _pSet->pNumSetting->nNumberType;
 
 sal_uInt16 nMask = 1;
-OUString sNumCharFmtName = GetBulCharFmtName();
+OUString sNumCharFmtName = GetNumCharFmtName();
 for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++)
 {
 if(mLevel & nMask)
@@ -824,7 +826,6 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, 
sal_uInt16 nIndex, sal_uInt1
 NumSettingsArr_Impl *pNumSettingsArr=pItemArr->pNumSettingsArr;
 
 NumSettings_Impl* pLevelSettings = nullptr;
-OUString sBulletCharFormatName = GetBulCharFmtName();
 for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++)
 {
 if(pNumSettingsArr->size() > i)
@@ -886,7 +887,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, 
sal_uInt16 nIndex, sal_uInt1
 }
 
 aFmt.SetBulletChar(cChar);
-aFmt.SetCharFormatName( sBulletCharFormatName );
+aFmt.SetCharFormatName( GetBulletCharFmtName() );
 if (isResetSize) aFmt.SetBulletRelSize(45);
 }else if ((aFmt.GetNumberingType()&(~LINK_TOKEN)) == SVX_NUM_BITMAP ) {
 if (pLevelSettings->pBrushItem) {
@@ -905,7 +906,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, 
sal_uInt16 nIndex, sal_uInt1
 } else
 {
 aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != 
nUpperLevelOrChar ? aNum.GetLevelCount() : 0));
-aFmt.SetCharFormatName(sBulletCharFormatName);
+aFmt.SetCharFormatName(GetNumCharFmtName());
 if (isResetSize) aFmt.SetBulletRelSize(100);
 }
 if(pNumSettingsArr->size() > i) {
diff --git a/sw/source/uibase/shells/txtnum.cxx 
b/sw/source/uibase/shells/txtnum.cxx
index 2ba5ff

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

2017-05-23 Thread Norbert Thiebaud
 solenv/bin/mkdocs_portal.sh |1 +
 1 file changed, 1 insertion(+)

New commits:
commit b8a1797e1511bdee779112f09b1e64098591b9fe
Author: Norbert Thiebaud 
Date:   Tue May 23 16:31:27 2017 -0500

mkdocs_portal: reset local variable in loop

Change-Id: I0c66717c0fac6d4d1bb6a33b8a196066f0f880d1

diff --git a/solenv/bin/mkdocs_portal.sh b/solenv/bin/mkdocs_portal.sh
index 468e94d68f73..352d2a7bb570 100755
--- a/solenv/bin/mkdocs_portal.sh
+++ b/solenv/bin/mkdocs_portal.sh
@@ -95,6 +95,7 @@ header "LibreOffice Modules" " " "$BASE_OUTPUT/index.html"
 
 for module_name in *; do
 if [ -d $module_name ]; then
+cur_file=
 if [ -f $module_name/readme.txt ] ; then
 cur_file="$module_name/readme.txt"
 elif [ -f $module_name/README ] ; then
___
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' - basctl/uiconfig

2017-05-23 Thread tagezi
 basctl/uiconfig/basicide/menubar/menubar.xml |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c7c0b8c2e818a4f59ef9003529673bdbfa8ad188
Author: tagezi 
Date:   Tue May 23 09:12:10 2017 +0300

The menu items are moved according to a general design concept

Close item was moved to up the first section of File menu
GoToLine item was moved from View menu to Edit menu under Find&Replace

Change-Id: I2d2561848917c2e6f22baf92030c7b5d147a56bb
Reviewed-on: https://gerrit.libreoffice.org/37937
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 
(cherry picked from commit 990277913a55bf7b0b920affe697460b24920c10)
Reviewed-on: https://gerrit.libreoffice.org/37964
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/basctl/uiconfig/basicide/menubar/menubar.xml 
b/basctl/uiconfig/basicide/menubar/menubar.xml
index 9c2528fe6c30..45e667b37c99 100644
--- a/basctl/uiconfig/basicide/menubar/menubar.xml
+++ b/basctl/uiconfig/basicide/menubar/menubar.xml
@@ -22,10 +22,10 @@
 
 
 
+
 
 
 
-
 
 
 
@@ -53,6 +53,7 @@
 
 
 
+
 
 
 
@@ -61,7 +62,6 @@
 
 
 
-
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Henry Castro
 loleaflet/dist/toolbar/toolbar.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 05deed08b47f3b4b49372fd0cebacf5a8eeb6894
Author: Henry Castro 
Date:   Tue May 23 16:35:37 2017 -0400

loleaflet: fix undo repair document popup

UNDO_CONFLICT was intented to notify views, but
the constant value changed with latest patch upstream

Change-Id: I09062725539df3d974a47d89374d822d1d852770

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index 55d50353..e295c9ea 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -1426,7 +1426,7 @@ map.on('commandresult', function (e) {
}
}
else if ((commandName === '.uno:Undo' || commandName === '.uno:Redo') &&
-   e.success === true && e.result.value && e.result.value === 
'130') { /*UNDO_CONFLICT*/
+   e.success === true && e.result.value && !isNaN(e.result.value)) 
{ /*UNDO_CONFLICT*/
$('#tb_toolbar-up_item_repair').w2overlay({ html: '' +
_('Conflict Undo/Redo with multiple users. Please use 
document repair to resolve') + ''});
}
___
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' - officecfg/registry

2017-05-23 Thread Noel Grandin
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |5 
+
 1 file changed, 5 insertions(+)

New commits:
commit 5d3f27c536e514523cfe85b26fa98da87ab984c4
Author: Noel Grandin 
Date:   Tue May 23 16:02:53 2017 +0200

tdf#107971 - 'Shapes' text is gone from Modify menu

Regression from commit f5738518a6ff5321d4d35d9bed4a640ae0a6ae9a
"remove unhandled SID commands from svx"

Change-Id: I78345c14fd899f19fa5134a6ada493e1f151d061
Reviewed-on: https://gerrit.libreoffice.org/37954
Tested-by: Jenkins 
Reviewed-by: Maxim Monastirsky 
(cherry picked from commit 161b42efa95ac353fe0f800b2dea5ac495e8a55a)
Reviewed-on: https://gerrit.libreoffice.org/37958

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 7f3830bdfd35..30f7bfafb929 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -6032,6 +6032,11 @@
   Alig~n
 
   
+  
+
+  ~Shapes
+
+  
   
 
   Scan
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'libreoffice-5-4' - source/text

2017-05-23 Thread Adolfo Jayme Barrientos
 source/text/shared/00/0401.xhp |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 155917c717d4a581b7792fceb5080eaa605bcc9d
Author: Adolfo Jayme Barrientos 
Date:   Tue May 23 14:15:45 2017 -0500

The word “bar” should not be bolded or capitalized

Change-Id: Ib295f68ea3bda9610359412b7748e417b77915bf
(cherry picked from commit 23e991de25bb224fc7c6561b9cb34632fecd7220)
Reviewed-on: https://gerrit.libreoffice.org/37961
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/source/text/shared/00/0401.xhp 
b/source/text/shared/00/0401.xhp
index da3437689..00d2a5a0d 100644
--- a/source/text/shared/00/0401.xhp
+++ b/source/text/shared/00/0401.xhp
@@ -376,8 +376,7 @@
 
 
 
-On the 
Print Preview
-Bar of a text document, click
+On the 
Print Preview bar of a text document, click
 
 
 
___
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' - helpcontent2

2017-05-23 Thread Adolfo Jayme Barrientos
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f3cef4ac305dc657de4d8f39ff6e076189008356
Author: Adolfo Jayme Barrientos 
Date:   Tue May 23 14:15:45 2017 -0500

Updated core
Project: help  155917c717d4a581b7792fceb5080eaa605bcc9d

The word “bar” should not be bolded or capitalized

Change-Id: Ib295f68ea3bda9610359412b7748e417b77915bf
(cherry picked from commit 23e991de25bb224fc7c6561b9cb34632fecd7220)
Reviewed-on: https://gerrit.libreoffice.org/37961
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index fbd52ae78b34..155917c717d4 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit fbd52ae78b3405a6338554877046134df334ff8d
+Subproject commit 155917c717d4a581b7792fceb5080eaa605bcc9d
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Adolfo Jayme Barrientos
 source/text/shared/00/0401.xhp |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 23e991de25bb224fc7c6561b9cb34632fecd7220
Author: Adolfo Jayme Barrientos 
Date:   Tue May 23 14:15:45 2017 -0500

The word “bar” should not be bolded or capitalized

Change-Id: Ib295f68ea3bda9610359412b7748e417b77915bf

diff --git a/source/text/shared/00/0401.xhp 
b/source/text/shared/00/0401.xhp
index da3437689..00d2a5a0d 100644
--- a/source/text/shared/00/0401.xhp
+++ b/source/text/shared/00/0401.xhp
@@ -376,8 +376,7 @@
 
 
 
-On the 
Print Preview
-Bar of a text document, click
+On the 
Print Preview bar of a text document, click
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-05-23 Thread Adolfo Jayme Barrientos
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c137857d5bbe6bc25fbc8bd29b0dafcbe67dea91
Author: Adolfo Jayme Barrientos 
Date:   Tue May 23 14:15:45 2017 -0500

Updated core
Project: help  23e991de25bb224fc7c6561b9cb34632fecd7220

The word “bar” should not be bolded or capitalized

Change-Id: Ib295f68ea3bda9610359412b7748e417b77915bf

diff --git a/helpcontent2 b/helpcontent2
index 78931b602722..23e991de25bb 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 78931b6027223617d44a209378c88161345eb21d
+Subproject commit 23e991de25bb224fc7c6561b9cb34632fecd7220
___
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-05-23 Thread Szymon Kłos
 sw/source/core/edit/edfcol.cxx |   19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

New commits:
commit c31d99bdd74144120545d408e0bf8acf506e16a1
Author: Szymon Kłos 
Date:   Tue May 23 13:40:24 2017 +0200

Watermark: read angle value

Change-Id: Ib6b98c58b1251c27476cbbbd03a2f7ed97e68c45
Reviewed-on: https://gerrit.libreoffice.org/37947
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
(cherry picked from commit b535d31f95809906c8eef5a8e8096e137f32a533)
Reviewed-on: https://gerrit.libreoffice.org/37959

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 97129c354583..c39ccadf3f81 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -294,6 +294,7 @@ SfxWatermarkItem SwEditShell::GetWatermark()
 sal_uInt32 nColor;
 sal_Int16 nTransparency;
 OUString aFont;
+drawing::HomogenMatrix3 aMatrix;
 
 aItem.SetText(xTextRange->getString());
 
@@ -301,7 +302,14 @@ SfxWatermarkItem SwEditShell::GetWatermark()
 aItem.SetFont(aFont);
 if (xPropertySet->getPropertyValue(UNO_NAME_FILLCOLOR) >>= nColor)
 aItem.SetColor(nColor);
-// TODO: aItem.SetAngle(nAngle);
+if (xPropertySet->getPropertyValue("Transformation") >>= aMatrix)
+{
+double y = aMatrix.Line2.Column1;
+double x = aMatrix.Line1.Column1;
+double nRad = atan2(y, x) * -1;
+double nDeg = nRad * 180.0 / F_PI;
+aItem.SetAngle(nDeg);
+}
 if (xPropertySet->getPropertyValue(UNO_NAME_FILL_TRANSPARENCE) >>= 
nTransparency)
 aItem.SetTransparency(nTransparency);
 
@@ -347,21 +355,28 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& 
rWatermark)
 bool bDeleteWatermark = rWatermark.GetText().isEmpty();
 if (xWatermark.is())
 {
+drawing::HomogenMatrix3 aMatrix;
 sal_uInt32 nColor = 0xc0c0c0;
 sal_Int16 nTransparency = 50;
+sal_Int16 nAngle = 45;
 OUString aFont = "";
 
 uno::Reference xPropertySet(xWatermark, 
uno::UNO_QUERY);
 xPropertySet->getPropertyValue(UNO_NAME_CHAR_FONT_NAME) >>= aFont;
 xPropertySet->getPropertyValue(UNO_NAME_FILLCOLOR) >>= nColor;
-// TODO: Angle
 xPropertySet->getPropertyValue(UNO_NAME_FILL_TRANSPARENCE) >>= 
nTransparency;
+xPropertySet->getPropertyValue("Transformation") >>= aMatrix;
+double y = aMatrix.Line2.Column1;
+double x = aMatrix.Line1.Column1;
+double nRad = atan2(y, x) * -1;
+nAngle = nRad * 180.0 / F_PI;
 
 // If the header already contains a watermark, see if it its text 
is up to date.
 uno::Reference xTextRange(xWatermark, 
uno::UNO_QUERY);
 if (xTextRange->getString() != rWatermark.GetText()
 || aFont != rWatermark.GetFont()
 || nColor != rWatermark.GetColor()
+|| nAngle != rWatermark.GetAngle()
 || nTransparency != rWatermark.GetTransparency()
 || bDeleteWatermark)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Miklos Vajna
 vcl/source/filter/graphicfilter.cxx |   69 +++-
 1 file changed, 68 insertions(+), 1 deletion(-)

New commits:
commit 9a5abf25c9bcabbd77cf37ae9c6a91cb4172df60
Author: Miklos Vajna 
Date:   Tue May 23 16:37:36 2017 +0200

vcl GraphicFilter: invoke JPEG import directly in ImportGraphics()

So that later the two ImportJPEG() calls can be invoked in separate for
loops.

Change-Id: I7b806d7c604d406411d5113731229eb9f761eee4
Reviewed-on: https://gerrit.libreoffice.org/37955
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index da1396aa31f3..01807dc71ac8 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1325,7 +1325,74 @@ void GraphicFilter::ImportGraphics(std::vector< 
std::shared_ptr >& rGra
 if (pStream)
 {
 auto pG = o3tl::make_unique();
-if (ImportGraphic(*pG, "", *pStream) == GRFILTER_OK)
+sal_uInt16 nStatus = GRFILTER_OK;
+
+// Detect the format.
+ResetLastError();
+sal_uLong nStreamBegin = pStream->Tell();
+sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW;
+nStatus = ImpTestOrFindFormat(OUString(), *pStream, nFormat);
+pStream->Seek(nStreamBegin);
+
+// Import the graphic.
+if (nStatus == GRFILTER_OK && !pStream->GetError())
+{
+OUString aFilterName = pConfig->GetImportFilterName(nFormat);
+GfxLinkType eLinkType = GfxLinkType::NONE;
+
+if (aFilterName.equalsIgnoreAsciiCase(IMP_JPEG))
+{
+GraphicFilterImportFlags nImportFlags = 
GraphicFilterImportFlags::SetLogsizeForJpeg;
+
+sal_uInt64 nPosition = pStream->Tell();
+if (!ImportJPEG( *pStream, *pG, nImportFlags | 
GraphicFilterImportFlags::OnlyCreateBitmap, nullptr))
+nStatus = GRFILTER_FILTERERROR;
+else
+{
+Bitmap& rBitmap = 
const_cast(pG->GetBitmapExRef().GetBitmapRef());
+Bitmap::ScopedWriteAccess pWriteAccess(rBitmap);
+pStream->Seek(nPosition);
+if (!ImportJPEG(*pStream, *pG, nImportFlags | 
GraphicFilterImportFlags::UseExistingBitmap, &pWriteAccess))
+nStatus = GRFILTER_FILTERERROR;
+else
+eLinkType = GfxLinkType::NativeJpg;
+}
+}
+else
+nStatus = GRFILTER_FILTERERROR;
+
+if (nStatus == GRFILTER_OK && (eLinkType != GfxLinkType::NONE) 
&& !pG->GetContext())
+{
+std::unique_ptr pGraphicContent;
+
+const sal_uLong nStreamEnd = pStream->Tell();
+sal_Int32 nGraphicContentSize = nStreamEnd - nStreamBegin;
+
+if (nGraphicContentSize > 0)
+{
+try
+{
+pGraphicContent =  
std::unique_ptr(new sal_uInt8[nGraphicContentSize]);
+}
+catch (const std::bad_alloc&)
+{
+nStatus = GRFILTER_TOOBIG;
+}
+
+if (nStatus == GRFILTER_OK)
+{
+pStream->Seek(nStreamBegin);
+pStream->ReadBytes(pGraphicContent.get(), 
nGraphicContentSize);
+}
+}
+
+if (nStatus == GRFILTER_OK)
+pG->SetLink(GfxLink(std::move(pGraphicContent), 
nGraphicContentSize, eLinkType));
+}
+}
+
+// If import went fine, store the graphic.
+if (nStatus == GRFILTER_OK)
 pGraphic = pG.release();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Eike Rathke
 sc/source/core/tool/interpr1.cxx |  140 +++
 1 file changed, 70 insertions(+), 70 deletions(-)

New commits:
commit 6df362b4b01a1f645009b45e1a7dd902f1de089b
Author: Eike Rathke 
Date:   Tue May 23 20:40:50 2017 +0200

Extend the loop over svRefList to cover also the query evaluation

... otherwise all but the last reflist entry are thrown away..

Change-Id: Ic8e66cfb6179a86140e566d25cbffc901527f269

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 4618bddec326..85d9ddb4259b 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5790,87 +5790,87 @@ void ScInterpreter::IterateParametersIfs( 
double(*ResultFunc)( const sc::ParamIf
 PushError ( FormulaError::IllegalArgument);
 return;
 }
-}
 
-// recalculate matrix values
-if (nGlobalError != FormulaError::NONE)
-{
-PushError( nGlobalError);
-return;
-}
+// recalculate matrix values
+if (nGlobalError != FormulaError::NONE)
+{
+PushError( nGlobalError);
+return;
+}
 
-// initialize temporary result matrix
-if (aResArray.empty())
-{
-nColSize = nCol2 - nCol1 + 1;
-nRowSize = nRow2 - nRow1 + 1;
-aResArray.resize(nColSize*nRowSize, 0);
-}
+// initialize temporary result matrix
+if (aResArray.empty())
+{
+nColSize = nCol2 - nCol1 + 1;
+nRowSize = nRow2 - nRow1 + 1;
+aResArray.resize(nColSize*nRowSize, 0);
+}
 
-ScQueryParam rParam;
-rParam.nRow1   = nRow1;
-rParam.nRow2   = nRow2;
+ScQueryParam rParam;
+rParam.nRow1   = nRow1;
+rParam.nRow2   = nRow2;
 
-ScQueryEntry& rEntry = rParam.GetEntry(0);
-ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
-rEntry.bDoQuery = true;
-if (!bIsString)
-{
-rItem.meType = ScQueryEntry::ByValue;
-rItem.mfVal = fVal;
-rEntry.eOp = SC_EQUAL;
-}
-else
-{
-rParam.FillInExcelSyntax(pDok->GetSharedStringPool(), 
aString.getString(), 0, pFormatter);
-if (rItem.meType == ScQueryEntry::ByString)
-rParam.eSearchType = 
DetectSearchType(rItem.maString.getString(), pDok);
-}
-ScAddress aAdr;
-aAdr.SetTab( nTab1 );
-rParam.nCol1  = nCol1;
-rParam.nCol2  = nCol2;
-rEntry.nField = nCol1;
-SCCOL nColDiff = -nCol1;
-SCROW nRowDiff = -nRow1;
-if (pQueryMatrix)
-{
-// Never case-sensitive.
-sc::CompareOptions aOptions( pDok, rEntry, rParam.eSearchType);
-ScMatrixRef pResultMatrix = QueryMat( pQueryMatrix, aOptions);
-if (nGlobalError != FormulaError::NONE || !pResultMatrix)
+ScQueryEntry& rEntry = rParam.GetEntry(0);
+ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
+rEntry.bDoQuery = true;
+if (!bIsString)
 {
-PushError( FormulaError::IllegalParameter);
-return;
+rItem.meType = ScQueryEntry::ByValue;
+rItem.mfVal = fVal;
+rEntry.eOp = SC_EQUAL;
 }
-
-// result matrix is filled with boolean values.
-std::vector aResValues;
-pResultMatrix->GetDoubleArray(aResValues);
-if (aResArray.size() != aResValues.size())
+else
 {
-PushError( FormulaError::IllegalParameter);
-return;
+rParam.FillInExcelSyntax(pDok->GetSharedStringPool(), 
aString.getString(), 0, pFormatter);
+if (rItem.meType == ScQueryEntry::ByString)
+rParam.eSearchType = 
DetectSearchType(rItem.maString.getString(), pDok);
 }
+ScAddress aAdr;
+aAdr.SetTab( nTab1 );
+rParam.nCol1  = nCol1;
+rParam.nCol2  = nCol2;
+rEntry.nField = nCol1;
+SCCOL nColDiff = -nCol1;
+SCROW nRowDiff = -nRow1;
+if (pQueryMatrix)
+{
+// Never case-sensitive.
+sc::CompareOptions aOptions( pDok, rEntry, rParam.eSearchType);
+ScMatrixRef pResultMatrix = QueryMat( pQueryMatrix, aOptions);
+if (nGlobalError != FormulaError::NONE || !pResultMatrix)
+{
+PushError( FormulaError::IllegalParameter);
+return;
+}
 
-std::vector::iterator itRes = aResArray.begin(), 
itResEnd = aResArray.end();
-std::vector::const_iterator itThisRes = aResValu

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

2017-05-23 Thread Szymon Kłos
 sw/source/core/edit/edfcol.cxx |   19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

New commits:
commit b535d31f95809906c8eef5a8e8096e137f32a533
Author: Szymon Kłos 
Date:   Tue May 23 13:40:24 2017 +0200

Watermark: read angle value

Change-Id: Ib6b98c58b1251c27476cbbbd03a2f7ed97e68c45
Reviewed-on: https://gerrit.libreoffice.org/37947
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 97129c354583..c39ccadf3f81 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -294,6 +294,7 @@ SfxWatermarkItem SwEditShell::GetWatermark()
 sal_uInt32 nColor;
 sal_Int16 nTransparency;
 OUString aFont;
+drawing::HomogenMatrix3 aMatrix;
 
 aItem.SetText(xTextRange->getString());
 
@@ -301,7 +302,14 @@ SfxWatermarkItem SwEditShell::GetWatermark()
 aItem.SetFont(aFont);
 if (xPropertySet->getPropertyValue(UNO_NAME_FILLCOLOR) >>= nColor)
 aItem.SetColor(nColor);
-// TODO: aItem.SetAngle(nAngle);
+if (xPropertySet->getPropertyValue("Transformation") >>= aMatrix)
+{
+double y = aMatrix.Line2.Column1;
+double x = aMatrix.Line1.Column1;
+double nRad = atan2(y, x) * -1;
+double nDeg = nRad * 180.0 / F_PI;
+aItem.SetAngle(nDeg);
+}
 if (xPropertySet->getPropertyValue(UNO_NAME_FILL_TRANSPARENCE) >>= 
nTransparency)
 aItem.SetTransparency(nTransparency);
 
@@ -347,21 +355,28 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& 
rWatermark)
 bool bDeleteWatermark = rWatermark.GetText().isEmpty();
 if (xWatermark.is())
 {
+drawing::HomogenMatrix3 aMatrix;
 sal_uInt32 nColor = 0xc0c0c0;
 sal_Int16 nTransparency = 50;
+sal_Int16 nAngle = 45;
 OUString aFont = "";
 
 uno::Reference xPropertySet(xWatermark, 
uno::UNO_QUERY);
 xPropertySet->getPropertyValue(UNO_NAME_CHAR_FONT_NAME) >>= aFont;
 xPropertySet->getPropertyValue(UNO_NAME_FILLCOLOR) >>= nColor;
-// TODO: Angle
 xPropertySet->getPropertyValue(UNO_NAME_FILL_TRANSPARENCE) >>= 
nTransparency;
+xPropertySet->getPropertyValue("Transformation") >>= aMatrix;
+double y = aMatrix.Line2.Column1;
+double x = aMatrix.Line1.Column1;
+double nRad = atan2(y, x) * -1;
+nAngle = nRad * 180.0 / F_PI;
 
 // If the header already contains a watermark, see if it its text 
is up to date.
 uno::Reference xTextRange(xWatermark, 
uno::UNO_QUERY);
 if (xTextRange->getString() != rWatermark.GetText()
 || aFont != rWatermark.GetFont()
 || nColor != rWatermark.GetColor()
+|| nAngle != rWatermark.GetAngle()
 || nTransparency != rWatermark.GetTransparency()
 || bDeleteWatermark)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Noel Grandin
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |5 
+
 1 file changed, 5 insertions(+)

New commits:
commit 161b42efa95ac353fe0f800b2dea5ac495e8a55a
Author: Noel Grandin 
Date:   Tue May 23 16:02:53 2017 +0200

tdf#107971 - 'Shapes' text is gone from Modify menu

Regression from commit f5738518a6ff5321d4d35d9bed4a640ae0a6ae9a
"remove unhandled SID commands from svx"

Change-Id: I78345c14fd899f19fa5134a6ada493e1f151d061
Reviewed-on: https://gerrit.libreoffice.org/37954
Tested-by: Jenkins 
Reviewed-by: Maxim Monastirsky 

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index fcdba9d45af2..eb377b8f2387 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -6032,6 +6032,11 @@
   Alig~n
 
   
+  
+
+  ~Shapes
+
+  
   
 
   Scan
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/Library_sofficeapp.mk

2017-05-23 Thread jan Iversen
 desktop/Library_sofficeapp.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 7a447a8c60113f53b237b633b940a761188a3885
Author: jan Iversen 
Date:   Tue May 23 19:03:15 2017 +0200

iOS, remove curl to make iOS compile

Commit 9c3b05f2d571b58ee2322a942162ecec654544dc
added curl, without affect on iOS
some of the conditions changed later
making curl be included when compiling iOS

Added filter_out macro for iOS

Change-Id: I22a9ffd47f56893ea366fffa3ef0a0610ea54370

diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 6998060d92dc..7b76aedc4d33 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -31,7 +31,9 @@ $(eval $(call gb_Library_use_externals,sofficeapp, \
 icu_headers \
 icui18n \
 icuuc \
+$(if $(filter-out IOS,$(OS)), \
 curl \
+)\
 $(if $(ENABLE_ONLINE_UPDATE_MAR),\
 orcus-parser \
 orcus )\
___
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/inc sc/qa sc/source

2017-05-23 Thread Noel Grandin
 sc/inc/address.hxx   |   16 +-
 sc/inc/attarray.hxx  |8 -
 sc/inc/attrib.hxx|   10 -
 sc/inc/chgtrack.hxx  |   30 ++--
 sc/inc/column.hxx|   10 -
 sc/inc/compiler.hxx  |2 
 sc/inc/dbdata.hxx|4 
 sc/inc/detdata.hxx   |2 
 sc/inc/document.hxx  |   12 -
 sc/inc/dpobject.hxx  |6 
 sc/inc/drwlayer.hxx  |4 
 sc/inc/externalrefmgr.hxx|4 
 sc/inc/hints.hxx |   14 +-
 sc/inc/markarr.hxx   |2 
 sc/inc/markdata.hxx  |2 
 sc/inc/markmulti.hxx |2 
 sc/inc/olinetab.hxx  |2 
 sc/inc/rangelst.hxx  |8 -
 sc/inc/table.hxx |   10 -
 sc/inc/tabprotection.hxx |2 
 sc/inc/types.hxx |6 
 sc/qa/unit/mark_test.cxx |4 
 sc/qa/unit/ucalc.cxx |2 
 sc/source/core/data/attarray.cxx |   18 +-
 sc/source/core/data/attrib.cxx   |2 
 sc/source/core/data/bcaslot.cxx  |4 
 sc/source/core/data/column.cxx   |   10 -
 sc/source/core/data/documen2.cxx |2 
 sc/source/core/data/documen3.cxx |2 
 sc/source/core/data/documen5.cxx |2 
 sc/source/core/data/documen7.cxx |2 
 sc/source/core/data/documen8.cxx |2 
 sc/source/core/data/document.cxx |   28 ++--
 sc/source/core/data/dpobject.cxx |   18 +-
 sc/source/core/data/drwlayer.cxx |   18 +-
 sc/source/core/data/fillinfo.cxx |   58 
 sc/source/core/data/formulacell.cxx  |   10 -
 sc/source/core/data/markarr.cxx  |4 
 sc/source/core/data/markdata.cxx |2 
 sc/source/core/data/markmulti.cxx|4 
 sc/source/core/data/olinetab.cxx |6 
 sc/source/core/data/sortparam.cxx|4 
 sc/source/core/data/table1.cxx   |   30 ++--
 sc/source/core/data/table2.cxx   |   12 -
 sc/source/core/data/table3.cxx   |6 
 sc/source/core/data/table6.cxx   |   42 +++---
 sc/source/core/data/tabprotection.cxx|6 
 sc/source/core/inc/bcaslot.hxx   |4 
 sc/source/core/inc/refupdat.hxx  |4 
 sc/source/core/tool/address.cxx  |   14 +-
 sc/source/core/tool/chgtrack.cxx |   30 ++--
 sc/source/core/tool/compiler.cxx |2 
 sc/source/core/tool/dbdata.cxx   |   12 -
 sc/source/core/tool/detdata.cxx  |2 
 sc/source/core/tool/hints.cxx|2 
 sc/source/core/tool/interpr1.cxx |8 -
 sc/source/core/tool/interpr4.cxx |8 -
 sc/source/core/tool/queryparam.cxx   |6 
 sc/source/core/tool/rangelst.cxx |8 -
 sc/source/core/tool/rangenam.cxx |6 
 sc/source/core/tool/refupdat.cxx |   58 
 sc/source/core/tool/token.cxx|   10 -
 sc/source/filter/excel/excform.cxx   |6 
 sc/source/filter/excel/excform8.cxx  |2 
 sc/source/filter/excel/xechart.cxx   |6 
 sc/source/filter/excel/xeformula.cxx |   16 +-
 sc/source/filter/excel/xetable.cxx   |8 -
 sc/source/filter/excel/xiname.cxx|2 
 sc/source/filter/excel/xipivot.cxx   |2 
 sc/source/filter/html/htmlimp.cxx|8 -
 sc/source/filter/html/htmlpars.cxx   |6 
 sc/source/filter/inc/excform.hxx |4 
 sc/source/filter/inc/formel.hxx  |2 
 sc/source/filter/starcalc/scflt.cxx  |2 
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |   12 -
 sc/source/ui/docshell/dbdocfun.cxx   |2 
 sc/source/ui/docshell/docfunc.cxx|8 -
 sc/source/ui/docshell/externalrefmgr.cxx |6 
 sc/source/ui/drawfunc/fupoor.cxx |4 
 sc/source/ui/drawfunc/fusel2.c

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

2017-05-23 Thread Eike Rathke
 sc/source/core/tool/interpr1.cxx |  330 +++
 1 file changed, 167 insertions(+), 163 deletions(-)

New commits:
commit 69f9c57551120afbb7e2d877f8478148a0c545dc
Author: Eike Rathke 
Date:   Tue May 23 18:32:30 2017 +0200

svRefList always needs to be in a loop to be eventually popped from stack

If it has more than one entries, rRefInList and rParam are incremented
(effectively annulating a nParam--) and only the last entry pops the token 
from
stack. This could had led to wrong references for other (previous) 
parameters.

Change-Id: I4204d1be4da2e538cece20d92cb7cd96b7c8fa84

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 4eb3e3bbe518..4618bddec326 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5634,8 +5634,6 @@ void ScInterpreter::IterateParametersIfs( 
double(*ResultFunc)( const sc::ParamIf
 size_t nRowSize = 0;
 size_t nColSize = 0;
 double fVal = 0.0;
-short nParam = 1;
-size_t nRefInList = 0;
 SCCOL nDimensionCols = 0;
 SCROW nDimensionRows = 0;
 
@@ -5723,8 +5721,8 @@ void ScInterpreter::IterateParametersIfs( 
double(*ResultFunc)( const sc::ParamIf
 }
 
 // take range
-nParam = 1;
-nRefInList = 0;
+short nParam = nParamCount;
+size_t nRefInList = 0;
 SCCOL nCol1 = 0;
 SCROW nRow1 = 0;
 SCTAB nTab1 = 0;
@@ -5732,63 +5730,66 @@ void ScInterpreter::IterateParametersIfs( 
double(*ResultFunc)( const sc::ParamIf
 SCROW nRow2 = 0;
 SCTAB nTab2 = 0;
 ScMatrixRef pQueryMatrix;
-switch ( GetStackType() )
+while (nParam-- == nParamCount)
 {
-case svRefList :
-{
-ScRange aRange;
-PopDoubleRef( aRange, nParam, nRefInList);
-aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
-}
+switch ( GetStackType() )
+{
+case svRefList :
+{
+ScRange aRange;
+PopDoubleRef( aRange, nParam, nRefInList);
+aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, 
nTab2);
+}
 break;
-case svDoubleRef :
-PopDoubleRef( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
+case svDoubleRef :
+PopDoubleRef( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
 break;
-case svSingleRef :
-PopSingleRef( nCol1, nRow1, nTab1 );
-nCol2 = nCol1;
-nRow2 = nRow1;
-nTab2 = nTab1;
+case svSingleRef :
+PopSingleRef( nCol1, nRow1, nTab1 );
+nCol2 = nCol1;
+nRow2 = nRow1;
+nTab2 = nTab1;
 break;
-case svMatrix:
-case svExternalSingleRef:
-case svExternalDoubleRef:
-{
-pQueryMatrix = PopMatrix();
-if (!pQueryMatrix)
+case svMatrix:
+case svExternalSingleRef:
+case svExternalDoubleRef:
 {
-PushError( FormulaError::IllegalParameter);
-return;
+pQueryMatrix = PopMatrix();
+if (!pQueryMatrix)
+{
+PushError( FormulaError::IllegalParameter);
+return;
+}
+nCol1 = 0;
+nRow1 = 0;
+nTab1 = 0;
+SCSIZE nC, nR;
+pQueryMatrix->GetDimensions( nC, nR);
+nCol2 = static_cast(nC - 1);
+nRow2 = static_cast(nR - 1);
+nTab2 = 0;
 }
-nCol1 = 0;
-nRow1 = 0;
-nTab1 = 0;
-SCSIZE nC, nR;
-pQueryMatrix->GetDimensions( nC, nR);
-nCol2 = static_cast(nC - 1);
-nRow2 = static_cast(nR - 1);
-nTab2 = 0;
-}
 break;
-default:
-PushError( FormulaError::IllegalParameter);
+default:
+PushError( FormulaError::IllegalParameter);
+return;
+}
+if ( nTab1 != nTab2 )
+{
+PushError( FormulaError::IllegalArgument);
 return;
-}
-if ( nTab1 != nTab2 )
-{
-PushError( FormulaError::IllegalArgument);
-return;
-}
+}
 
-// All r

[Libreoffice-commits] core.git: basctl/source include/toolkit svtools/inc svtools/source toolkit/source

2017-05-23 Thread Jochen Nitschke
 basctl/source/accessibility/accessibledialogcontrolshape.cxx |5 +
 basctl/source/accessibility/accessibledialogwindow.cxx   |5 +
 basctl/source/inc/accessibledialogcontrolshape.hxx   |2 --
 basctl/source/inc/accessibledialogwindow.hxx |2 --
 include/toolkit/awt/vclxaccessiblecomponent.hxx  |4 
 svtools/inc/vclxaccessibleheaderbaritem.hxx  |1 -
 svtools/source/control/vclxaccessibleheaderbaritem.cxx   |2 +-
 toolkit/source/awt/vclxaccessiblecomponent.cxx   |5 +
 8 files changed, 4 insertions(+), 22 deletions(-)

New commits:
commit 2e5db24f63edbfced178dc7ff274e9a9de68
Author: Jochen Nitschke 
Date:   Tue May 23 13:39:02 2017 +0200

remove VCLExternalSolarLock* members from ..

.. classes with OAccessibleContextHelper base.

Change-Id: I3187e88bf485e78fb78550870a87db29d958dbc0
Reviewed-on: https://gerrit.libreoffice.org/37948
Reviewed-by: Noel Grandin 
Tested-by: Jenkins 
Reviewed-by: Jochen Nitschke 

diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx 
b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
index 83b25d5cfa9c..c56bb1c70ab0 100644
--- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx
+++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
@@ -55,8 +55,6 @@ AccessibleDialogControlShape::AccessibleDialogControlShape 
(DialogWindow* pDialo
 ,m_pDialogWindow( pDialogWindow )
 ,m_pDlgEdObj( pDlgEdObj )
 {
-m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock() 
);
-
 if ( m_pDlgEdObj )
 m_xControlModel.set( m_pDlgEdObj->GetUnoControlModel(), UNO_QUERY );
 
@@ -74,8 +72,7 @@ AccessibleDialogControlShape::~AccessibleDialogControlShape()
 if ( m_xControlModel.is() )
 m_xControlModel->removePropertyChangeListener( OUString(), 
static_cast< beans::XPropertyChangeListener* >( this ) );
 
-delete m_pExternalLock;
-m_pExternalLock = nullptr;
+delete getExternalLock();
 }
 
 
diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx 
b/basctl/source/accessibility/accessibledialogwindow.cxx
index f04094088e73..b44509e0c1c2 100644
--- a/basctl/source/accessibility/accessibledialogwindow.cxx
+++ b/basctl/source/accessibility/accessibledialogwindow.cxx
@@ -105,8 +105,6 @@ AccessibleDialogWindow::AccessibleDialogWindow 
(basctl::DialogWindow* pDialogWin
 , m_pDlgEditor(nullptr)
 , m_pDlgEdModel(nullptr)
 {
-m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock() 
);
-
 if ( m_pDialogWindow )
 {
 SdrPage& rPage = m_pDialogWindow->GetPage();
@@ -143,8 +141,7 @@ AccessibleDialogWindow::~AccessibleDialogWindow()
 if ( m_pDlgEdModel )
 EndListening( *m_pDlgEdModel );
 
-delete m_pExternalLock;
-m_pExternalLock = nullptr;
+delete getExternalLock();
 }
 
 
diff --git a/basctl/source/inc/accessibledialogcontrolshape.hxx 
b/basctl/source/inc/accessibledialogcontrolshape.hxx
index b370e85b6c2d..4830032599d3 100644
--- a/basctl/source/inc/accessibledialogcontrolshape.hxx
+++ b/basctl/source/inc/accessibledialogcontrolshape.hxx
@@ -27,7 +27,6 @@
 #include 
 
 namespace vcl { class Window; }
-class VCLExternalSolarLock;
 
 namespace utl {
 class AccessibleStateSetHelper;
@@ -53,7 +52,6 @@ class AccessibleDialogControlShape :public 
comphelper::OAccessibleExtendedCo
 friend class AccessibleDialogWindow;
 
 private:
-VCLExternalSolarLock*   m_pExternalLock;
 VclPtrm_pDialogWindow;
 DlgEdObj*   m_pDlgEdObj;
 boolm_bFocused;
diff --git a/basctl/source/inc/accessibledialogwindow.hxx 
b/basctl/source/inc/accessibledialogwindow.hxx
index 57c16698699e..badcabda17d3 100644
--- a/basctl/source/inc/accessibledialogwindow.hxx
+++ b/basctl/source/inc/accessibledialogwindow.hxx
@@ -28,7 +28,6 @@
 #include 
 #include 
 
-class VCLExternalSolarLock;
 class VclSimpleEvent;
 class VclWindowEvent;
 
@@ -77,7 +76,6 @@ private:
 typedef std::vector< ChildDescriptor > AccessibleChildren;
 
 AccessibleChildren m_aAccessibleChildren;
-VCLExternalSolarLock*  m_pExternalLock;
 VclPtr   m_pDialogWindow;
 DlgEditor* m_pDlgEditor;
 DlgEdModel*m_pDlgEdModel;
diff --git a/include/toolkit/awt/vclxaccessiblecomponent.hxx 
b/include/toolkit/awt/vclxaccessiblecomponent.hxx
index 8af1d702725c..520dadab867b 100644
--- a/include/toolkit/awt/vclxaccessiblecomponent.hxx
+++ b/include/toolkit/awt/vclxaccessiblecomponent.hxx
@@ -50,8 +50,6 @@ class AccessibleStateSetHelper;
 typedef ::cppu::ImplHelper1<
 css::lang::XServiceInfo > VCLXAccessibleComponent_BASE;
 
-class VCLExternalSolarLock;
-
 class TOOLKIT_DLLPUBLIC VCLXAccessibleComponent
 :public comphelper::OAccessibleExtendedComponentHelper
 ,public ::comphelper::OAccessibleImplementationAc

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

2017-05-23 Thread Miklos Vajna
 include/vcl/graphicfilter.hxx   |5 
 svtools/source/graphic/provider.cxx |   42 ++--
 vcl/source/filter/graphicfilter.cxx |   17 ++
 3 files changed, 62 insertions(+), 2 deletions(-)

New commits:
commit 6a91ea82502c0b9e6632d625962bf9da006c4a2f
Author: Miklos Vajna 
Date:   Tue May 23 15:26:14 2017 +0200

vcl GraphicFilter: add ImportGraphics()

This is similar to ImportGraphic(), but can handle multiple streams with
one function call.

Change-Id: I8d5dc8de64321c3c1fb9e1037527b411fd68dca8
Reviewed-on: https://gerrit.libreoffice.org/37953
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 8b8a7cef3008..c4c6c4359ce9 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -283,6 +283,11 @@ public:
sal_uInt16 * pDeterminedFormat = nullptr, 
GraphicFilterImportFlags nImportFlags = GraphicFilterImportFlags::NONE,
WMF_EXTERNALHEADER *pExtHeader = nullptr );
 
+/// Imports multiple graphics.
+///
+/// The resulting graphic is added to rGraphics on success, nullptr is 
added on failure.
+void ImportGraphics(std::vector< std::shared_ptr >& rGraphics, 
const std::vector< std::shared_ptr >& rStreams);
+
 sal_uInt16  ImportGraphic( Graphic& rGraphic, const OUString& 
rPath,
SvStream& rStream,
sal_uInt16 nFormat,
diff --git a/svtools/source/graphic/provider.cxx 
b/svtools/source/graphic/provider.cxx
index faec3fcd4d9b..fa34c5c712d6 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -438,11 +438,49 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL 
GraphicProvider::queryGraphic( co
 
 uno::Sequence< uno::Reference > SAL_CALL 
GraphicProvider::queryGraphics(const uno::Sequence< 
uno::Sequence >& rMediaPropertiesSeq)
 {
-std::vector< uno::Reference > aRet;
+SolarMutexGuard aGuard;
 
+// Turn properties into streams.
+std::vector< std::shared_ptr > aStreams;
 for (const auto& rMediaProperties : rMediaPropertiesSeq)
 {
-aRet.push_back(queryGraphic(rMediaProperties));
+SvStream* pStream = nullptr;
+uno::Reference xStream;
+
+for (sal_Int32 i = 0; rMediaProperties.getLength(); ++i)
+{
+if (rMediaProperties[i].Name == "InputStream")
+{
+rMediaProperties[i].Value >>= xStream;
+if (xStream.is())
+pStream = utl::UcbStreamHelper::CreateStream(xStream);
+break;
+}
+}
+
+aStreams.push_back(std::shared_ptr(pStream));
+
+}
+
+// Import: streams to graphics.
+std::vector< std::shared_ptr > aGraphics;
+GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
+rFilter.ImportGraphics(aGraphics, aStreams);
+
+// Returning: graphics to UNO objects.
+std::vector< uno::Reference > aRet;
+for (const auto& pGraphic : aGraphics)
+{
+uno::Reference xGraphic;
+
+if (pGraphic)
+{
+auto pUnoGraphic = new unographic::Graphic();
+pUnoGraphic->init(*pGraphic);
+xGraphic = pUnoGraphic;
+}
+
+aRet.push_back(xGraphic);
 }
 
 return comphelper::containerToSequence(aRet);
diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index d17f77027d32..da1396aa31f3 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1316,6 +1316,23 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& 
rGraphic, const OUString& rPat
 return ImportGraphic( rGraphic, rPath, rIStream, nFormat, 
pDeterminedFormat, nImportFlags, nullptr, pExtHeader );
 }
 
+void GraphicFilter::ImportGraphics(std::vector< std::shared_ptr >& 
rGraphics, const std::vector< std::shared_ptr >& rStreams)
+{
+for (const auto& pStream : rStreams)
+{
+Graphic* pGraphic = nullptr;
+
+if (pStream)
+{
+auto pG = o3tl::make_unique();
+if (ImportGraphic(*pG, "", *pStream) == GRFILTER_OK)
+pGraphic = pG.release();
+}
+
+rGraphics.push_back(std::shared_ptr(pGraphic));
+}
+}
+
 sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& 
rPath, SvStream& rIStream,
  sal_uInt16 nFormat, sal_uInt16* 
pDeterminedFormat, GraphicFilterImportFlags nImportFlags,
  css::uno::Sequence< 
css::beans::PropertyValue >* pFilterData,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Michael Stahl
 sc/source/ui/Accessibility/AccessibleDocument.cxx |   20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

New commits:
commit f11cbcb60d546ce9c7a840a67458c5c88f8a8531
Author: Michael Stahl 
Date:   Tue May 23 15:30:13 2017 +0200

sc: work around MSVC 2017 ICE in AccessibleDocument.cxx

MSVC 2017 dies with INTERNAL COMPILER ERROR on the ConvertLayerId
function, which uses fancy C++14 constexpr SdrLayerId/strong_int stuff;
it happens to compile without complaint if it is expressed as an
if-elseif chain instead of the switch statement.

Change-Id: Ib1324bbabeb7a971ba090b9647dde55c1cd0d587

diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx 
b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index e2336902a3bd..b367101ea151 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -120,20 +120,22 @@ struct ScShapeDataLess
 }
 static void ConvertLayerId(sal_Int16& rLayerID) // changes the number of 
the LayerId so it the accessibility order
 {
-switch (rLayerID)
+// note: MSVC 2017 ICE's if this is written as "switch" so use "if"
+if (sal_uInt8(SC_LAYER_FRONT) == rLayerID)
 {
-case sal_uInt8(SC_LAYER_FRONT):
 rLayerID = 1;
-break;
-case sal_uInt8(SC_LAYER_BACK):
+}
+else if (sal_uInt8(SC_LAYER_BACK) == rLayerID)
+{
 rLayerID = 0;
-break;
-case sal_uInt8(SC_LAYER_INTERN):
+}
+else if (sal_uInt8(SC_LAYER_INTERN) == rLayerID)
+{
 rLayerID = 2;
-break;
-case sal_uInt8(SC_LAYER_CONTROLS):
+}
+else if (sal_uInt8(SC_LAYER_CONTROLS) == rLayerID)
+{
 rLayerID = 3;
-break;
 }
 }
 bool LessThanSheet(const ScAccessibleShapeData* pData) const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loleaflet/admin.strings.js loleaflet/dist loleaflet/src wsd/Admin.cpp wsd/Admin.hpp wsd/AdminModel.cpp wsd/AdminModel.hpp wsd/DocumentBroker.cpp wsd/Docum

2017-05-23 Thread Aditya Dewan
 loleaflet/admin.strings.js |1 +
 loleaflet/dist/admin/admin.html|1 +
 loleaflet/src/admin/AdminSocketOverview.js |   23 +--
 wsd/Admin.cpp  |5 +
 wsd/Admin.hpp  |1 +
 wsd/AdminModel.cpp |   19 +++
 wsd/AdminModel.hpp |6 ++
 wsd/DocumentBroker.cpp |   19 ---
 wsd/DocumentBroker.hpp |1 -
 9 files changed, 66 insertions(+), 10 deletions(-)

New commits:
commit 9db39ce741604b24a43c08d0db6e7e641a42d19d
Author: Aditya Dewan 
Date:   Fri May 12 19:29:01 2017 +0530

tdf#107752 admin console: indicating whether a document is modified.

Change-Id: I6055a601c1dd3b5e9700ef75d7c07d7e0b13d663

diff --git a/loleaflet/admin.strings.js b/loleaflet/admin.strings.js
index e5116276..a56b5d47 100644
--- a/loleaflet/admin.strings.js
+++ b/loleaflet/admin.strings.js
@@ -18,6 +18,7 @@ l10nstrings.strDocument = _('Document');
 l10nstrings.strNumberOfViews = _('Number of views');
 l10nstrings.strElapsedTime = _('Elapsed time');
 l10nstrings.strIdleTime = _('Idle time');
+l10nstrings.strModified = _('Modified');
 l10nstrings.strKill = _('Kill');
 l10nstrings.strGraphs = _('Graphs');
 l10nstrings.strSave = _('Save');
diff --git a/loleaflet/dist/admin/admin.html b/loleaflet/dist/admin/admin.html
index 1e65699e..f8268565 100644
--- a/loleaflet/dist/admin/admin.html
+++ b/loleaflet/dist/admin/admin.html
@@ -90,6 +90,7 @@
  
document.write(l10nstrings.strMemoryConsumed)
  
document.write(l10nstrings.strElapsedTime)
  
document.write(l10nstrings.strIdleTime)
+ 
document.write(l10nstrings.strModified)

  
  
diff --git a/loleaflet/src/admin/AdminSocketOverview.js 
b/loleaflet/src/admin/AdminSocketOverview.js
index 96c29a0b..b1070fcd 100644
--- a/loleaflet/src/admin/AdminSocketOverview.js
+++ b/loleaflet/src/admin/AdminSocketOverview.js
@@ -23,7 +23,7 @@ var AdminSocketOverview = AdminSocketBase.extend({
this.base.call(this);
 
this.socket.send('documents');
-   this.socket.send('subscribe adddoc rmdoc resetidle propchange');
+   this.socket.send('subscribe adddoc rmdoc resetidle propchange 
modifications');
 
this._getBasicStats();
var socketOverview = this;
@@ -101,7 +101,8 @@ var AdminSocketOverview = AdminSocketBase.extend({
sMem = docProps['memory'];
sDocTime = docProps['elapsedTime'];
sDocIdle = docProps['idleTime'];
-   userListJson = docProps['views']
+   modified = docProps['modified'];
+   userListJson = docProps['views'];
 
$doc = $('#doc' + sPid);
$rowContainer = 
$(document.createElement('tr')).attr('id', 'doc' + sPid);
@@ -137,6 +138,11 @@ var AdminSocketOverview = AdminSocketBase.extend({
  
.val(parseInt(sDocIdle))
  
.text(Util.humanizeSecs(sDocIdle));
$rowContainer.append($docIdle);
+
+   $mod = 
$(document.createElement('td')).attr('id', 'mod' + sPid)
+   
  .text(modified);
+   $rowContainer.append($mod);
+
$('#doclist').append($rowContainer);
}
}
@@ -187,6 +193,10 @@ var AdminSocketOverview = AdminSocketBase.extend({
  
.text(Util.humanizeSecs(0));
$rowContainer.append($docIdle);
 
+   $mod = 
$(document.createElement('td')).attr('id', 'mod' + sPid)
+   
  .text('');
+   $rowContainer.append($mod);
+
$('#doclist').append($rowContainer);
 
$a = 
$(document.getElementById('active_docs_count'));
@@ -255,6 +265,15 @@ var AdminSocketOverview = AdminSocketBase.extend({
}
}
}
+   else if (textMsg.startsWith('modifications')) {
+   textMsg = textMsg.substring('modifications'.length);
+   docProps = textMsg.trim().split(' ');
+   sPid = docProps[0];
+   value = docProps[1];
+
+ 

[Libreoffice-commits] online.git: Changes to 'refs/tags/2.1.2-beta1'

2017-05-23 Thread Andras Timar
Tag '2.1.2-beta1' created by Andras Timar  at 
2017-05-23 13:25 +

2.1.2-beta1

Changes since 2.1.1-10:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/oox offapi/com offapi/UnoApi_offapi.mk oox/source svtools/source

2017-05-23 Thread Miklos Vajna
 include/oox/helper/graphichelper.hxx  |3 -
 offapi/UnoApi_offapi.mk   |1 
 offapi/com/sun/star/graphic/XGraphicProvider2.idl |   47 ++
 oox/source/helper/graphichelper.cxx   |   29 ++---
 svtools/source/graphic/provider.cxx   |   20 -
 5 files changed, 81 insertions(+), 19 deletions(-)

New commits:
commit 252e524094893063e4bcc822571a14c4558e1d00
Author: Miklos Vajna 
Date:   Tue May 23 12:10:44 2017 +0200

svtools: add GraphicProvider::queryGraphics()

This allows moving the for() loop from oox to svtools when importing
multiple images.

That means in case later we parallelize that loop, then the performance
benefit won't be restricted to oox, but also will be available for all
clients of the graphic provider.

Change-Id: Icd7bd447e7ae623b0a8548e020d8f6ab38da47bb
Reviewed-on: https://gerrit.libreoffice.org/37945
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/include/oox/helper/graphichelper.hxx 
b/include/oox/helper/graphichelper.hxx
index 17f896683ab4..651e9407b4ec 100644
--- a/include/oox/helper/graphichelper.hxx
+++ b/include/oox/helper/graphichelper.hxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 struct WMF_EXTERNALHEADER;
 
@@ -161,7 +162,7 @@ private:
 typedef ::std::map< OUString, css::uno::Reference< css::graphic::XGraphic 
> > EmbeddedGraphicMap;
 
 css::uno::Reference< css::uno::XComponentContext > mxContext;
-css::uno::Reference< css::graphic::XGraphicProvider > mxGraphicProvider;
+css::uno::Reference< css::graphic::XGraphicProvider2 > mxGraphicProvider;
 css::uno::Reference< css::awt::XUnitConversion > mxUnitConversion;
 css::awt::DeviceInfo maDeviceInfo; ///< Current output device info.
 SystemPalette   maSystemPalette;///< Maps system colors 
(XML tokens) to RGB color values.
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 0e0a6cad8962..7a9c17af6601 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -2695,6 +2695,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/graphic,\
XGraphic \
XGraphicObject \
XGraphicProvider \
+   XGraphicProvider2 \
XGraphicRasterizer \
XGraphicRenderer \
XGraphicTransformer \
diff --git a/offapi/com/sun/star/graphic/XGraphicProvider2.idl 
b/offapi/com/sun/star/graphic/XGraphicProvider2.idl
new file mode 100644
index ..04b5f02589d5
--- /dev/null
+++ b/offapi/com/sun/star/graphic/XGraphicProvider2.idl
@@ -0,0 +1,47 @@
+/* -*- 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 com_sun_star_graphic_XGraphicProvider2_idl
+#define com_sun_star_graphic_XGraphicProvider2_idl
+
+#include 
+
+module com { module sun { module star { module graphic
+{
+
+/** This interface allows operations on multiple graphics with one method
+call.
+  */
+interface XGraphicProvider2 : XGraphicProvider
+{
+/** Calling this method returns XGraphic interfaces
+that hold loaded graphics.
+
+@param MediaPropertiesSeq
+A sequence of sequence of property values to describe the location
+of the graphics.
+
+@returns
+The XGraphic interfaces
+
+@see XGraphicProvider::queryGraphic
+
+@since LibreOffice 5.5
+*/
+sequence< XGraphic > queryGraphics([in] sequence< 
com::sun::star::beans::PropertyValues> MediaPropertiesSeq)
+raises( com::sun::star::io::IOException,
+com::sun::star::lang::IllegalArgumentException,
+com::sun::star::lang::WrappedTargetException );
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/graphichelper.cxx 
b/oox/source/helper/graphichelper.cxx
index 7927daedd39e..692937baeb48 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "oox/helper/containerhelper.hxx"
 #include "oox/helper/propertyset.hxx"
 #include "oox/token/properties.hxx"
@@ -68,7 +69,7 @@ GraphicHelper::GraphicHelper( const Reference< 
XComponentContext >& rxContext, c
 {
 OSL_ENSURE( mxContext.is(), "GraphicHelper::GraphicHelper - missing 
component context" );
 if( mxContext.is() )
-mxGraphicProvider.set( graphic::GraphicProvider::create( mxContext ) );
+mxGraphicProvider.set( graphic::GraphicProvider::create( mxContext ), 
uno::UNO_QUERY );
 
 //! TODO: get colors from system
 maSystemPalette[ XML_3dDkShadow ]   = 0x716F64;
@@ -266

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - configure.ac debian/changelog loolwsd.spec.in

2017-05-23 Thread Andras Timar
 configure.ac |2 +-
 debian/changelog |6 ++
 loolwsd.spec.in  |2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 0b737df46642d0162dd7d2cb197e48c5b3155ced
Author: Andras Timar 
Date:   Tue May 23 15:03:03 2017 +0200

Bump version to 2.1.2

Change-Id: I8a7d5c95b57d87ccd04c317fa279142bc34b7068

diff --git a/configure.ac b/configure.ac
index 949c6915..6a437dd0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.69])
 
-AC_INIT([loolwsd], [2.1.1], [libreoffice@lists.freedesktop.org])
+AC_INIT([loolwsd], [2.1.2], [libreoffice@lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
 AM_INIT_AUTOMAKE([1.11 silent-rules subdir-objects tar-pax -Wno-portability])
diff --git a/debian/changelog b/debian/changelog
index c83fa7d2..36f542e8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+loolwsd (2.1.2-1) unstable; urgency=medium
+
+  * see the git log: http://col.la/cool21
+
+ -- Andras Timar   Tue, 23 May 2017 14:00:00 +0100
+
 loolwsd (2.1.1-4) unstable; urgency=medium
 
   * see the git log: http://col.la/cool21
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index fd8e71bc..2acdb563 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -12,7 +12,7 @@ Name:   loolwsd%{name_suffix}
 Name:   loolwsd
 %endif
 Version:@PACKAGE_VERSION@
-Release:4%{?dist}
+Release:1%{?dist}
 Vendor: Collabora
 Summary:LibreOffice On-Line WebSocket Daemon
 License:MPL
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Eike Rathke
 sc/source/core/inc/interpre.hxx  |2 
 sc/source/core/tool/interpr1.cxx |  111 ---
 2 files changed, 70 insertions(+), 43 deletions(-)

New commits:
commit d24a9a7513805f1baee3ff7c9b8a25eb467a0f6b
Author: Eike Rathke 
Date:   Tue May 23 14:50:41 2017 +0200

Move pushing the result token into IterateParametersIfs, tdf#58874

Change-Id: I7c44afad1610fd04b0b2acc51c654a583ed991e6

diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 8e6d89206c3a..53190038bd9b 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -600,7 +600,7 @@ void IterateParametersIf( ScIterFuncIf );
 void ScCountIf();
 void ScSumIf();
 void ScAverageIf();
-void IterateParametersIfs( sc::ParamIfsResult& rRes );
+void IterateParametersIfs( double(*ResultFunc)( const sc::ParamIfsResult& rRes 
) );
 void ScSumIfs();
 void ScAverageIfs();
 void ScCountIfs();
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index ba1a5d916d4d..4eb3e3bbe518 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5624,11 +5624,12 @@ void ScInterpreter::ScCountIf()
 }
 }
 
-void ScInterpreter::IterateParametersIfs( sc::ParamIfsResult& rRes )
+void ScInterpreter::IterateParametersIfs( double(*ResultFunc)( const 
sc::ParamIfsResult& rRes ) )
 {
 sal_uInt8 nParamCount = GetByte();
 sal_uInt8 nQueryCount = nParamCount / 2;
 
+sc::ParamIfsResult aRes;
 std::vector aResArray;
 size_t nRowSize = 0;
 size_t nColSize = 0;
@@ -5651,7 +5652,10 @@ void ScInterpreter::IterateParametersIfs( 
sc::ParamIfsResult& rRes )
 {
 ScAddress aAdr;
 if ( !PopDoubleRefOrSingleRef( aAdr ) )
+{
+PushError( nGlobalError);
 return;
+}
 
 ScRefCellValue aCell(*pDok, aAdr);
 switch (aCell.meType)
@@ -5713,7 +5717,10 @@ void ScInterpreter::IterateParametersIfs( 
sc::ParamIfsResult& rRes )
 }
 
 if (nGlobalError != FormulaError::NONE)
+{
+PushError( nGlobalError);
 return;   // and bail out, no need to evaluate other arguments
+}
 
 // take range
 nParam = 1;
@@ -5750,7 +5757,7 @@ void ScInterpreter::IterateParametersIfs( 
sc::ParamIfsResult& rRes )
 pQueryMatrix = PopMatrix();
 if (!pQueryMatrix)
 {
-SetError( FormulaError::IllegalParameter);
+PushError( FormulaError::IllegalParameter);
 return;
 }
 nCol1 = 0;
@@ -5764,12 +5771,12 @@ void ScInterpreter::IterateParametersIfs( 
sc::ParamIfsResult& rRes )
 }
 break;
 default:
-SetError( FormulaError::IllegalParameter);
+PushError( FormulaError::IllegalParameter);
 return;
 }
 if ( nTab1 != nTab2 )
 {
-SetError( FormulaError::IllegalArgument);
+PushError( FormulaError::IllegalArgument);
 return;
 }
 
@@ -5780,13 +5787,16 @@ void ScInterpreter::IterateParametersIfs( 
sc::ParamIfsResult& rRes )
 nDimensionRows = nRow2 - nRow1 + 1;
 if ((nDimensionCols != (nCol2 - nCol1 + 1)) || (nDimensionRows != 
(nRow2 - nRow1 + 1)))
 {
-SetError ( FormulaError::IllegalArgument);
+PushError ( FormulaError::IllegalArgument);
 return;
 }
 
 // recalculate matrix values
 if (nGlobalError != FormulaError::NONE)
+{
+PushError( nGlobalError);
 return;
+}
 
 // initialize temporary result matrix
 if (aResArray.empty())
@@ -5829,7 +5839,7 @@ void ScInterpreter::IterateParametersIfs( 
sc::ParamIfsResult& rRes )
 ScMatrixRef pResultMatrix = QueryMat( pQueryMatrix, aOptions);
 if (nGlobalError != FormulaError::NONE || !pResultMatrix)
 {
-SetError( FormulaError::IllegalParameter);
+PushError( FormulaError::IllegalParameter);
 return;
 }
 
@@ -5838,7 +5848,7 @@ void ScInterpreter::IterateParametersIfs( 
sc::ParamIfsResult& rRes )
 pResultMatrix->GetDoubleArray(aResValues);
 if (aResArray.size() != aResValues.size())
 {
-SetError( FormulaError::IllegalParameter);
+PushError( FormulaError::IllegalParameter);
 return;
 }
 
@@ -5866,7 +5876,10 @@ void ScInterpreter::IterateParametersIfs( 
sc::ParamIfsResult& rRes )
 }
 
 if (nGlobalError != FormulaError::NONE)
+{
+PushError( nGlobalError);
 return;   // bail out
+}
 
 // main range - only

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/src

2017-05-23 Thread Henry Castro
 loleaflet/src/layer/marker/DivIcon.js |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 24ea20f7e3403bbb90bd79e1916d4dde56ef2c85
Author: Henry Castro 
Date:   Mon May 22 21:08:30 2017 -0400

loleaflet: prevent default context menu of the grab handles

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

diff --git a/loleaflet/src/layer/marker/DivIcon.js 
b/loleaflet/src/layer/marker/DivIcon.js
index c1e1cdd3..c2c7cb74 100644
--- a/loleaflet/src/layer/marker/DivIcon.js
+++ b/loleaflet/src/layer/marker/DivIcon.js
@@ -20,6 +20,7 @@ L.DivIcon = L.Icon.extend({
var div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : 
document.createElement('div'),
options = this.options;
 
+   L.DomEvent.on(div, 'contextmenu', L.DomEvent.preventDefault);
div.innerHTML = options.html !== false ? options.html : '';
 
if (options.bgPos) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/src

2017-05-23 Thread Henry Castro
 loleaflet/src/control/Control.ColumnHeader.js |1 +
 loleaflet/src/control/Control.RowHeader.js|1 +
 2 files changed, 2 insertions(+)

New commits:
commit 6cf08c48beaa2d5fdb42861003f44391e04938c1
Author: Henry Castro 
Date:   Mon May 22 20:36:31 2017 -0400

loleaflet: prevent default context menu of the row/column resize area

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

diff --git a/loleaflet/src/control/Control.ColumnHeader.js 
b/loleaflet/src/control/Control.ColumnHeader.js
index d700742c..b79678fc 100644
--- a/loleaflet/src/control/Control.ColumnHeader.js
+++ b/loleaflet/src/control/Control.ColumnHeader.js
@@ -171,6 +171,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({
column = L.DomUtil.create('div', 
'spreadsheet-header-column', this._columns);
text = L.DomUtil.create('div', 
'spreadsheet-header-column-text', column);
resize = L.DomUtil.create('div', 
'spreadsheet-header-column-resize', column);
+   L.DomEvent.on(resize, 'contextmenu', 
L.DomEvent.preventDefault);
column.size = columns[iterator].size;
var content = columns[iterator].text;
text.setAttribute('rel', 'spreadsheet-column-' + 
content); // for easy addressing
diff --git a/loleaflet/src/control/Control.RowHeader.js 
b/loleaflet/src/control/Control.RowHeader.js
index d5f702a1..c582117e 100644
--- a/loleaflet/src/control/Control.RowHeader.js
+++ b/loleaflet/src/control/Control.RowHeader.js
@@ -162,6 +162,7 @@ L.Control.RowHeader = L.Control.Header.extend({
row = L.DomUtil.create('div', 'spreadsheet-header-row', 
this._rows);
text = L.DomUtil.create('div', 
'spreadsheet-header-row-text', row);
resize = L.DomUtil.create('div', 
'spreadsheet-header-row-resize', row);
+   L.DomEvent.on(resize, 'contextmenu', 
L.DomEvent.preventDefault);
row.size = rows[iterator].size;
var content = rows[iterator].text;
text.setAttribute('rel', 'spreadsheet-row-' + content); 
// for easy addressing
___
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-05-23 Thread Eike Rathke
 sc/source/core/tool/interpr1.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 869b92d186840adfa17c5f56ccaf923e89f9618f
Author: Eike Rathke 
Date:   Tue May 23 14:01:41 2017 +0200

PushError() instead of SetError() so there's a result token

Change-Id: I8c2a7e01b04c26e008c8cbea9332f71d47293c75
(cherry picked from commit cd87661b4761ee9f512fc01f95d84f786c97bb66)
Reviewed-on: https://gerrit.libreoffice.org/37949
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 29f51d6326a1..6d03201f0494 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5705,7 +5705,7 @@ void ScInterpreter::ScSumIfs()
 
 if (nParamCount < 3 || (nParamCount % 2 != 1))
 {
-SetError( FormulaError::ParameterExpected);
+PushError( FormulaError::ParameterExpected);
 return;
 }
 
@@ -5720,7 +5720,7 @@ void ScInterpreter::ScAverageIfs()
 
 if (nParamCount < 3 || (nParamCount % 2 != 1))
 {
-SetError( FormulaError::ParameterExpected);
+PushError( FormulaError::ParameterExpected);
 return;
 }
 
@@ -5735,7 +5735,7 @@ void ScInterpreter::ScCountIfs()
 
 if (nParamCount < 2 || (nParamCount % 2 != 0))
 {
-SetError( FormulaError::ParameterExpected);
+PushError( FormulaError::ParameterExpected);
 return;
 }
 
@@ -5750,7 +5750,7 @@ void ScInterpreter::ScMinIfs_MS()
 
 if (nParamCount < 3 || (nParamCount % 2 != 1))
 {
-SetError( FormulaError::ParameterExpected);
+PushError( FormulaError::ParameterExpected);
 return;
 }
 
@@ -5766,7 +5766,7 @@ void ScInterpreter::ScMaxIfs_MS()
 
 if (nParamCount < 3 || (nParamCount % 2 != 1))
 {
-SetError( FormulaError::ParameterExpected);
+PushError( FormulaError::ParameterExpected);
 return;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Eike Rathke
 sc/source/core/tool/interpr1.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit cd87661b4761ee9f512fc01f95d84f786c97bb66
Author: Eike Rathke 
Date:   Tue May 23 14:01:41 2017 +0200

PushError() instead of SetError() so there's a result token

Change-Id: I8c2a7e01b04c26e008c8cbea9332f71d47293c75

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 28b12c351227..ba1a5d916d4d 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6025,7 +6025,7 @@ void ScInterpreter::ScSumIfs()
 
 if (nParamCount < 3 || (nParamCount % 2 != 1))
 {
-SetError( FormulaError::ParameterExpected);
+PushError( FormulaError::ParameterExpected);
 return;
 }
 
@@ -6040,7 +6040,7 @@ void ScInterpreter::ScAverageIfs()
 
 if (nParamCount < 3 || (nParamCount % 2 != 1))
 {
-SetError( FormulaError::ParameterExpected);
+PushError( FormulaError::ParameterExpected);
 return;
 }
 
@@ -6055,7 +6055,7 @@ void ScInterpreter::ScCountIfs()
 
 if (nParamCount < 2 || (nParamCount % 2 != 0))
 {
-SetError( FormulaError::ParameterExpected);
+PushError( FormulaError::ParameterExpected);
 return;
 }
 
@@ -6070,7 +6070,7 @@ void ScInterpreter::ScMinIfs_MS()
 
 if (nParamCount < 3 || (nParamCount % 2 != 1))
 {
-SetError( FormulaError::ParameterExpected);
+PushError( FormulaError::ParameterExpected);
 return;
 }
 
@@ -6086,7 +6086,7 @@ void ScInterpreter::ScMaxIfs_MS()
 
 if (nParamCount < 3 || (nParamCount % 2 != 1))
 {
-SetError( FormulaError::ParameterExpected);
+PushError( FormulaError::ParameterExpected);
 return;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Changes to 'refs/tags/libreoffice-5.4.0.0.beta1'

2017-05-23 Thread Andras Timar
Tag 'libreoffice-5.4.0.0.beta1' created by Andras Timar 
 at 2017-05-23 11:57 +

libreoffice-5.4.0.0.beta1

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


[Libreoffice-commits] online.git: Branch 'refs/tags/libreoffice-5.4.0.0.beta1' - 0 commits -

2017-05-23 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'libreoffice-5-4' - configure.ac

2017-05-23 Thread Andras Timar
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3cb12a2da9a8643848827919e869ed9d1f340ed0
Author: Andras Timar 
Date:   Tue May 23 13:56:32 2017 +0200

src package name: libreoffice-online

Change-Id: I2dbeaf9d4a5943a1e9d2744c19f5f336245798ac

diff --git a/configure.ac b/configure.ac
index 44c01ed2..876bb9bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.69])
 
-AC_INIT([loolwsd], [5.4.0.0.beta1], [libreoffice@lists.freedesktop.org])
+AC_INIT([libreoffice-online], [5.4.0.0.beta1], 
[libreoffice@lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
 AM_INIT_AUTOMAKE([1.11 silent-rules subdir-objects tar-pax -Wno-portability])
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Changes to 'refs/tags/libreoffice-5.4.0.0.beta1'

2017-05-23 Thread Andras Timar
Tag 'libreoffice-5.4.0.0.beta1' created by Andras Timar 
 at 2017-05-23 11:52 +

libreoffice-5.4.0.0.beta1

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


[Libreoffice-commits] online.git: Branch 'libreoffice-5-4' - 2 commits - configure.ac loleaflet/po

2017-05-23 Thread Andras Timar
 configure.ac   |2 
 loleaflet/po/help-dsb.po   |  401 +++---
 loleaflet/po/help-hsb.po   |   18 
 loleaflet/po/help-kk.po|   40 -
 loleaflet/po/help-pa_IN.po |   58 +-
 loleaflet/po/ui-bg.po  |7 
 loleaflet/po/ui-cs.po  |   22 
 loleaflet/po/ui-cy.po  |   52 -
 loleaflet/po/ui-da.po  |   27 
 loleaflet/po/ui-dsb.po | 1222 +++--
 loleaflet/po/ui-el.po  |8 
 loleaflet/po/ui-eo.po  |   12 
 loleaflet/po/ui-es.po  |   26 
 loleaflet/po/ui-eu.po  |   52 -
 loleaflet/po/ui-gl.po  |   13 
 loleaflet/po/ui-hsb.po | 1115 -
 loleaflet/po/ui-it.po  |6 
 loleaflet/po/ui-nn.po  |   52 -
 loleaflet/po/ui-sk.po  |   12 
 loleaflet/po/ui-tr.po  |   54 -
 loleaflet/po/ui-zh_CN.po   |  157 ++---
 21 files changed, 1698 insertions(+), 1658 deletions(-)

New commits:
commit a3bedc46aa2d3734eb8c7bb683b5eeb8d9f78c66
Author: Andras Timar 
Date:   Tue May 23 13:44:46 2017 +0200

Bump version to 5.4.0.0.beta1

Change-Id: I9c79b605bdecce43a0bf26c81e17a7ae4c931b39

diff --git a/configure.ac b/configure.ac
index 4da3f4e9..44c01ed2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.69])
 
-AC_INIT([loolwsd], [master], [libreoffice@lists.freedesktop.org])
+AC_INIT([loolwsd], [5.4.0.0.beta1], [libreoffice@lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
 AM_INIT_AUTOMAKE([1.11 silent-rules subdir-objects tar-pax -Wno-portability])
commit e904cdb04301472ddaf8e87589ad8980f2a94058
Author: Andras Timar 
Date:   Tue May 23 13:43:49 2017 +0200

Updated translations from Pootle

Change-Id: Ib5050c79a93968063384eca9a673202611ea8035

diff --git a/loleaflet/po/help-dsb.po b/loleaflet/po/help-dsb.po
index 02dfa7f8..86a46496 100644
--- a/loleaflet/po/help-dsb.po
+++ b/loleaflet/po/help-dsb.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-04-24 18:10+\n"
+"POT-Creation-Date: 2017-05-22 08:00+\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME \n"
 "Language-Team: LANGUAGE \n"
@@ -12,268 +12,268 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Generator: Translate Toolkit 2.0.0\n"
 "X-Pootle-Path: /dsb/libo_online/loleaflet-help-dsb.po\n"
-"X-Pootle-Revision: 2514048\n"
+"X-Pootle-Revision: 2524299\n"
 
 #: dist%2Floleaflet-help.html+div.h1%3A25
 msgid "Keyboard Shortcuts"
-msgstr ""
+msgstr "Tastowe skrotconki"
 
 #: dist%2Floleaflet-help.html+div.div.h2%3A27
 msgid "General Keyboard Shortcuts"
-msgstr ""
+msgstr "Powšykne tastowe skrotconki"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A29
 msgid "Undo"
-msgstr ""
+msgstr "Anulěrowaś"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A29
 msgid "Ctrl + Z"
-msgstr ""
+msgstr "Strg + Z"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A30
 msgid "Redo"
-msgstr ""
+msgstr "Wóspjetowaś"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A30
 msgid "Ctrl + Y"
-msgstr ""
+msgstr "Strg + Y"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A31
 msgid "Cut"
-msgstr ""
+msgstr "Wurězaś"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A31
 msgid "Ctrl + X"
-msgstr ""
+msgstr "Strg + X"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A32
 msgid "Paste as unformatted text"
-msgstr ""
+msgstr "Ako njeformatěrowany tekst zasajźiś"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A32
 msgid "Ctrl + Alt + Shift + V"
-msgstr ""
+msgstr "Strg + Alt + Umsch + V"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A33
 msgid "Print (Download as PDF)"
-msgstr ""
+msgstr "Śišćaś (ako PDF ześěgnuś)"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A33
 msgid "Ctrl + P"
-msgstr ""
+msgstr "Strg + P"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A34
 msgid "Display the Keyboard shortcuts help"
-msgstr ""
+msgstr "Pomoc za tastowe skrotconki pokazaś"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A34
 msgid "Ctrl + Shift + ?"
-msgstr ""
+msgstr "Strg + Umsch + ?"
 
 #: dist%2Floleaflet-help.html+div.div.h2%3A38
 #: dist%2Floleaflet-help.html+div.div.h2%3A160
 msgid "Text formatting"
-msgstr ""
+msgstr "Tekstowe formatěrowanje"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A40
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A137
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A162
 msgid "Bold"
-msgstr ""
+msgstr "Tucny"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A40
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A137
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A162
 msgid "Ctrl + B"
-msgstr ""
+msgstr "Strg + B"
 
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A41
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A138
 #: dist%2Floleaflet-help.html+div.div.table.tr.td%3A163
 msgid "Italic"
-msgstr ""
+msgstr "Kursiwny"
 
 #: dis

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

2017-05-23 Thread Szymon Kłos
 sw/source/uibase/dialog/watermarkdialog.cxx   |   23 --
 sw/source/uibase/inc/watermarkdialog.hxx  |4 ---
 sw/uiconfig/swriter/menubar/menubar.xml   |1 
 sw/uiconfig/swriter/toolbar/classificationbar.xml |1 
 sw/uiconfig/swriter/ui/watermarkdialog.ui |   21 ++--
 5 files changed, 5 insertions(+), 45 deletions(-)

New commits:
commit 6ee2c4fbbdfebf93f37ba3289f4e0631fee5eab3
Author: Szymon Kłos 
Date:   Tue May 23 11:35:30 2017 +0200

Watermark: move to the insert menu

Change-Id: I6058236434de00cddec1340613e83c10acc4df2a
Reviewed-on: https://gerrit.libreoffice.org/37943
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 

diff --git a/sw/uiconfig/swriter/menubar/menubar.xml 
b/sw/uiconfig/swriter/menubar/menubar.xml
index b91b0eebaefd..269956673465 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -268,6 +268,7 @@
 
   
   
+  
   
   
   
diff --git a/sw/uiconfig/swriter/toolbar/classificationbar.xml 
b/sw/uiconfig/swriter/toolbar/classificationbar.xml
index 01981333a46e..3ee34071e040 100644
--- a/sw/uiconfig/swriter/toolbar/classificationbar.xml
+++ b/sw/uiconfig/swriter/toolbar/classificationbar.xml
@@ -9,5 +9,4 @@
 -->
 http://openoffice.org/2001/toolbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; toolbar:id="toolbar">
   
-  
 
commit f6ea62d6c793abc9fc848b9ba2697299b90eb147
Author: Szymon Kłos 
Date:   Tue May 23 11:29:43 2017 +0200

Watermark: remove enable checkbox

Change-Id: Ic18b85070bf6c5c3e9678859a87cb9f44411533b
Reviewed-on: https://gerrit.libreoffice.org/37944
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 

diff --git a/sw/source/uibase/dialog/watermarkdialog.cxx 
b/sw/source/uibase/dialog/watermarkdialog.cxx
index 1246eabce4cc..6b993d22caf1 100644
--- a/sw/source/uibase/dialog/watermarkdialog.cxx
+++ b/sw/source/uibase/dialog/watermarkdialog.cxx
@@ -23,8 +23,6 @@ SwWatermarkDialog::SwWatermarkDialog( vcl::Window* pParent, 
SfxBindings& rBindin
 : ModelessDialog( pParent, "WatermarkDialog", 
"modules/swriter/ui/watermarkdialog.ui" )
 , m_rBindings( rBindings )
 {
-get( m_pTextGrid, "TextGrid" );
-get( m_pEnableWatermarkCB, "EnableWatermarkCB" );
 get( m_pTextInput, "TextInput" );
 get( m_pOKButton, "ok" );
 get( m_pFont, "FontBox" );
@@ -47,8 +45,6 @@ void SwWatermarkDialog::dispose()
 m_pAngle.clear();
 m_pTransparency.clear();
 m_pColor.clear();
-m_pTextGrid.clear();
-m_pEnableWatermarkCB.clear();
 m_pTextInput.clear();
 m_pOKButton.clear();
 
@@ -70,7 +66,6 @@ void SwWatermarkDialog::InitFields()
 
 m_pFont->Fill( pFontList );
 
-m_pEnableWatermarkCB->SetClickHdl( LINK( this, SwWatermarkDialog, 
CheckBoxHdl ) );
 m_pOKButton->SetClickHdl( LINK( this, SwWatermarkDialog, OKButtonHdl ) );
 
 // Get watermark properties
@@ -81,7 +76,6 @@ void SwWatermarkDialog::InitFields()
 {
 const SfxWatermarkItem* pWatermark = static_cast( pItem );
 OUString sText = pWatermark->GetText();
-m_pEnableWatermarkCB->Check( !sText.isEmpty() );
 m_pTextInput->SetText( sText );
 m_pFont->SelectEntryPos( m_pFont->GetEntryPos( pWatermark->GetFont() ) 
);
 m_pAngle->SetValue( pWatermark->GetAngle() );
@@ -90,24 +84,9 @@ void SwWatermarkDialog::InitFields()
 }
 }
 
-void SwWatermarkDialog::Update()
-{
-if( m_pEnableWatermarkCB->IsChecked() )
-m_pTextGrid->Enable();
-else
-m_pTextGrid->Disable();
-}
-
-IMPL_LINK_NOARG( SwWatermarkDialog, CheckBoxHdl, Button*, void )
-{
-Update();
-}
-
 IMPL_LINK_NOARG( SwWatermarkDialog, OKButtonHdl, Button*, void )
 {
-OUString sText = "";
-if( m_pEnableWatermarkCB->IsChecked() )
-sText = m_pTextInput->GetText();
+OUString sText = m_pTextInput->GetText();
 
 css::uno::Sequence aPropertyValues( 
comphelper::InitPropertySequence(
 {
diff --git a/sw/source/uibase/inc/watermarkdialog.hxx 
b/sw/source/uibase/inc/watermarkdialog.hxx
index 7f59fe0a2bb7..b443fbce797d 100644
--- a/sw/source/uibase/inc/watermarkdialog.hxx
+++ b/sw/source/uibase/inc/watermarkdialog.hxx
@@ -23,16 +23,12 @@ public:
 virtual void dispose() override;
 
 void InitFields();
-void Update();
 
 private:
-DECL_LINK( CheckBoxHdl, Button*, void );
 DECL_LINK( OKButtonHdl, Button*, void );
 
 SfxBindings& m_rBindings;
 
-VclPtr m_pTextGrid;
-VclPtr m_pEnableWatermarkCB;
 VclPtr m_pTextInput;
 VclPtr m_pOKButton;
 VclPtr m_pFont;
diff --git a/sw/uiconfig/swriter/ui/watermarkdialog.ui 
b/sw/uiconfig/swriter/ui/watermarkdialog.ui
index 316cd0c5d8bc..2edb38bf7f3a 100644
--- a/sw/uiconfig/swriter/ui/watermarkdialog.ui
+++ b/sw/uiconfig/swriter/ui/watermarkdialog.ui
@@ -62,7 +62,7 @@
 False
 True
 end
-0
+1
   
 
 
@@ -72,21 +

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

2017-05-23 Thread Eike Rathke
 sc/qa/unit/ucalc_formula.cxx |   12 
 1 file changed, 12 insertions(+)

New commits:
commit 28ff25934ca1442a4a7f22f0d915ed7b782ca379
Author: Eike Rathke 
Date:   Tue May 23 13:39:12 2017 +0200

Unit test for COUNTBLANK with array of references, tdf#58874

Change-Id: I44c4db675b822c0456197bf019783076cb7a4b78

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 620d94bc2e38..b5c5f9f85879 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -7994,6 +7994,18 @@ void Test::testFuncRefListArraySUBTOTAL()
 aPos.IncRow();
 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("SUBTOTAL STDEV for A1:A2,A4:A5,A5:A6 
failed", 11.55422, m_pDoc->GetValue(aPos), 1e-5);
 
+// Empty two cells such that they affect two ranges.
+m_pDoc->SetString(0,1,0, "");   // A2
+m_pDoc->SetString(0,2,0, "");   // A3
+// Matrix in J7:J9, individual COUNTBLANK of A2:A3, A3:A4 and A4:A5
+m_pDoc->InsertMatrixFormula(9, 6, 9, 8, aMark, 
"=COUNTBLANK(OFFSET(A1;ROW(1:3);0;2))");
+aPos.Set(9,6,0);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("COUNTBLANK for A1:A2,A2:A3,A5:A6 failed", 
2.0, m_pDoc->GetValue(aPos));
+aPos.IncRow();
+CPPUNIT_ASSERT_EQUAL_MESSAGE("COUNTBLANK for A1:A2,A3:A4,A5:A6 failed", 
1.0, m_pDoc->GetValue(aPos));
+aPos.IncRow();
+CPPUNIT_ASSERT_EQUAL_MESSAGE("COUNTBLANK for A1:A2,A4:A5,A5:A6 failed", 
0.0, m_pDoc->GetValue(aPos));
+
 m_pDoc->DeleteTab(0);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Eike Rathke
 sc/source/core/tool/interpr1.cxx |   17 +++--
 1 file changed, 15 insertions(+), 2 deletions(-)

New commits:
commit 5e974c89c8647040f796605aeae1322303532e58
Author: Eike Rathke 
Date:   Tue May 23 13:32:19 2017 +0200

Handle COUNTBLANK with array of references, tdf#58874

Change-Id: Icf8d2ac32a75ebb45c8c6b3b5ae46d01757eb07a

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index a782953b5425..28b12c351227 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -4924,6 +4924,9 @@ void ScInterpreter::ScCountEmptyCells()
 {
 if ( MustHaveParamCount( GetByte(), 1 ) )
 {
+const SCSIZE nMatRows = GetRefListArrayMaxSize(1);
+// There's either one RefList and nothing else, or none.
+ScMatrixRef xResMat = (nMatRows ? GetNewMat( 1, nMatRows) : nullptr);
 sal_uLong nMaxCount = 0, nCount = 0;
 switch (GetStackType())
 {
@@ -4937,14 +4940,16 @@ void ScInterpreter::ScCountEmptyCells()
 nCount = 1;
 }
 break;
-case svDoubleRef :
 case svRefList :
+case svDoubleRef :
 {
 ScRange aRange;
 short nParam = 1;
+SCSIZE nRefListArrayPos = 0;
 size_t nRefInList = 0;
 while (nParam-- > 0)
 {
+nRefListArrayPos = nRefInList;
 PopDoubleRef( aRange, nParam, nRefInList);
 nMaxCount +=
 static_cast(aRange.aEnd.Row() - 
aRange.aStart.Row() + 1) *
@@ -4958,12 +4963,20 @@ void ScInterpreter::ScCountEmptyCells()
 if (!isCellContentEmpty(rCell))
 ++nCount;
 }
+if (xResMat)
+{
+xResMat->PutDouble( nMaxCount - nCount, 0, 
nRefListArrayPos);
+nMaxCount = nCount = 0;
+}
 }
 }
 break;
 default : SetError(FormulaError::IllegalParameter); break;
 }
-PushDouble(nMaxCount - nCount);
+if (xResMat)
+PushMatrix( xResMat);
+else
+PushDouble(nMaxCount - nCount);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Eike Rathke
 sc/source/core/tool/interpr1.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 30660bd7e9d7f8639508dfceb24c335388370b0b
Author: Eike Rathke 
Date:   Tue May 23 13:15:21 2017 +0200

MustHaveParamCount() already pushes error, tdf#58874

Change-Id: I5d4ec4f36d7c047a377528495e04cbd9a7bdc38b

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 9cc318b26a26..a782953b5425 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -4971,10 +4971,7 @@ void ScInterpreter::IterateParametersIf( ScIterFuncIf 
eFunc )
 {
 sal_uInt8 nParamCount = GetByte();
 if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
-{
-PushError( nGlobalError);
 return;
-}
 
 SCCOL nCol3 = 0;
 SCROW nRow3 = 0;
___
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' - sd/source

2017-05-23 Thread Caolán McNamara
 sd/source/filter/html/htmlex.cxx |   26 +++---
 sd/source/ui/app/strings.src |5 +
 sd/source/ui/inc/strings.hrc |1 +
 3 files changed, 13 insertions(+), 19 deletions(-)

New commits:
commit 847174d769be66f4defa1b8a664c89af0aa89a88
Author: Caolán McNamara 
Date:   Tue May 23 10:38:21 2017 +0100

mysterious and missing 4077 resource used in sd

this would have been
String RID_WEBWIZARDDIALOG_START +77
from
wizards/source/formwizard/dbwizres.src

which is now gone (very reasonably) since...

commit 82d863b4a410fa78120d2efc41bd2b3b61f21cee
Date:   Sat Feb 18 14:02:30 2017 +0100

Related tdf#99967: Cleanup after Web Wizard drop

There are still webwizard*.xhp in help/source/text/shared/autopi/

Change-Id: If54d7bfc093c8c0765fd881eeb14f62bc3517194
Reviewed-on: https://gerrit.libreoffice.org/34402
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

the original complicated reuse of another modules translation
was in

commit 660c23c4c1c624b9db626be8f01166a154021e0d
Date:   Fri Jan 28 14:38:37 2005 +

INTEGRATION: CWS impress30 (1.18.40); FILE MERGED
2005/01/20 13:44:50 cl 1.18.40.1: #b4752338# give warning when 
overwriting files

Change-Id: I80ff0a545bbf08bcea142bb8bd41c547713ee11b
(cherry picked from commit 476c50943864e70a4758ccf01e2567067bc7c44f)

diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 06babc1c576b..161d8fa6afce 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -3097,25 +3097,13 @@ bool HtmlExport::checkForExistingFiles()
 
 if( bFound )
 {
-ResMgr *pResMgr = ResMgr::CreateResMgr( "dbw" );
-if( pResMgr )
-{
-ResId aResId( 4077, *pResMgr );
-OUString aMsg( aResId );
-
-OUString aSystemPath;
-osl::FileBase::getSystemPathFromFileURL( maExportPath, 
aSystemPath );
-aMsg = aMsg.replaceFirst( "%FILENAME", aSystemPath );
-ScopedVclPtrInstance< WarningBox > aWarning( nullptr, 
WB_YES_NO | WB_DEF_YES, aMsg );
-aWarning->SetImage( WarningBox::GetStandardImage() );
-bFound = ( RET_NO == aWarning->Execute() );
-
-delete pResMgr;
-}
-else
-{
-bFound = false;
-}
+OUString aSystemPath;
+osl::FileBase::getSystemPathFromFileURL( maExportPath, aSystemPath 
);
+OUString aMsg(SdResId(STR_OVERWRITE_WARNING));
+aMsg = aMsg.replaceFirst( "%FILENAME", aSystemPath );
+ScopedVclPtrInstance< WarningBox > aWarning( nullptr, WB_YES_NO | 
WB_DEF_YES, aMsg );
+aWarning->SetImage( WarningBox::GetStandardImage() );
+bFound = ( RET_NO == aWarning->Execute() );
 }
 }
 catch( Exception& )
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index 7dd87b46059e..89b9b00dd9bb 100644
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -1127,4 +1127,9 @@ String STR_OBJECTS_TREE
 Text [ en-US ] = "Page Tree";
 };
 
+String STR_OVERWRITE_WARNING
+{
+Text [ en-US  ] = "The local target directory '%FILENAME' is not empty. 
Some files might be overwritten. Do you want to continue?";
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index 7d0b1217af58..500ad5012010 100644
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -163,6 +163,7 @@
 #define STR_UNDO_INSERT_TEXTFRAME   (RID_APP_START+275)
 #define STR_ACTION_NOTPOSSIBLE  (RID_APP_START+278)
 #define STR_DLG_INSERT_PAGES_FROM_FILE  (RID_APP_START+279)
+#define STR_OVERWRITE_WARNING   (RID_APP_START+280)
 #define STR_SCALE_OBJECTS   (RID_APP_START+281)
 #define STR_CREATE_PAGES(RID_APP_START+282)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Miklos Vajna
 include/oox/helper/graphichelper.hxx |4 ++
 oox/source/helper/graphichelper.cxx  |   49 ++-
 2 files changed, 46 insertions(+), 7 deletions(-)

New commits:
commit b1319842a49cdf6512bbd9e81081e2a9edbd6089
Author: Miklos Vajna 
Date:   Tue May 23 10:20:03 2017 +0200

oox: add GraphicHelper::importGraphics()

Similar to GraphicHelper::importGraphic(), but can import multiple
streams with one function call.

Change-Id: I5fd398bb6649259e86967f8db5cc1e212f50bc8e
Reviewed-on: https://gerrit.libreoffice.org/37942
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/include/oox/helper/graphichelper.hxx 
b/include/oox/helper/graphichelper.hxx
index 3102585ed881..17f896683ab4 100644
--- a/include/oox/helper/graphichelper.hxx
+++ b/include/oox/helper/graphichelper.hxx
@@ -114,6 +114,10 @@ public:
 const css::uno::Reference< css::io::XInputStream 
>& rxInStrm,
 const WMF_EXTERNALHEADER* pExtHeader = nullptr ) 
const;
 
+/** Imports graphics from the passed input streams. */
+std::vector< css::uno::Reference >
+importGraphics(const std::vector< 
css::uno::Reference >& rStreams) const;
+
 /** Imports a graphic from the passed binary memory block. */
 css::uno::Reference< css::graphic::XGraphic >
 importGraphic( const StreamDataSequence& rGraphicData 
) const;
diff --git a/oox/source/helper/graphichelper.cxx 
b/oox/source/helper/graphichelper.cxx
index abe062cc82f4..7927daedd39e 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "oox/helper/containerhelper.hxx"
 #include "oox/helper/propertyset.hxx"
 #include "oox/token/properties.hxx"
@@ -263,6 +264,34 @@ Reference< XGraphic > GraphicHelper::importGraphic( const 
Reference< XInputStrea
 return xGraphic;
 }
 
+std::vector< uno::Reference > 
GraphicHelper::importGraphics(const std::vector< 
uno::Reference >& rStreams) const
+{
+std::vector< uno::Reference > aRet;
+
+for (const auto& rStream : rStreams)
+{
+uno::Reference xGraphic;
+if (rStream.is() && mxGraphicProvider.is())
+{
+try
+{
+uno::Sequence aArgs = 
comphelper::InitPropertySequence(
+{
+{"InputStream", uno::makeAny(rStream)}
+});
+xGraphic = mxGraphicProvider->queryGraphic(aArgs);
+}
+catch( const uno::Exception& rException)
+{
+SAL_WARN("oox", "GraphicHelper::importGraphic: queryGraphics() 
failed: " << rException.Message);
+}
+}
+aRet.push_back(xGraphic);
+}
+
+return aRet;
+}
+
 Reference< XGraphic > GraphicHelper::importGraphic( const StreamDataSequence& 
rGraphicData ) const
 {
 Reference< XGraphic > xGraphic;
@@ -278,8 +307,9 @@ void GraphicHelper::importEmbeddedGraphics(const 
std::vector& rStreamN
 {
 // Don't actually return anything, just fill maEmbeddedGraphics.
 
-// Input stream -> stream name map.
-std::map< uno::Reference, OUString > aStreamNames;
+// Stream names and streams to be imported.
+std::vector aMissingStreamNames;
+std::vector< uno::Reference > aMissingStreams;
 
 for (const auto& rStreamName : rStreamNames)
 {
@@ -291,14 +321,19 @@ void GraphicHelper::importEmbeddedGraphics(const 
std::vector& rStreamN
 
 EmbeddedGraphicMap::const_iterator aIt = 
maEmbeddedGraphics.find(rStreamName);
 if (aIt == maEmbeddedGraphics.end())
-aStreamNames[mxStorage->openInputStream(rStreamName)] = 
rStreamName;
+{
+aMissingStreamNames.push_back(rStreamName);
+aMissingStreams.push_back(mxStorage->openInputStream(rStreamName));
+}
 }
 
-for (const auto& rStream : aStreamNames)
+std::vector< uno::Reference > aGraphics = 
importGraphics(aMissingStreams);
+
+assert(aGraphics.size() == aMissingStreamNames.size());
+for (size_t i = 0; i < aGraphics.size(); ++i)
 {
-uno::Reference xGraphic = 
importGraphic(rStream.first);
-if (xGraphic.is())
-maEmbeddedGraphics[rStream.second] = xGraphic;
+if (aGraphics[i].is())
+maEmbeddedGraphics[aMissingStreamNames[i]] = aGraphics[i];
 }
 }
 
___
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' - vcl/qa vcl/source

2017-05-23 Thread Miklos Vajna
 vcl/qa/cppunit/pdfexport/data/tdf107868.odt |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx  |  104 ++--
 vcl/source/gdi/pdfwriter_impl.cxx   |5 +
 3 files changed, 89 insertions(+), 20 deletions(-)

New commits:
commit 98a5f3929af349beee2866e558922f9a3fb19923
Author: Miklos Vajna 
Date:   Mon May 22 21:41:31 2017 +0200

tdf#105461 PDF export of editeng fill color: restrict to logic map modes

The original use case was Writer/Impress shape text, but when the map
mode is pixels, the reference device gives bogus values for the
PixelToLogic() calls, affecting e.g. form controls.

Just go back to the old way of not painting the background for those.

(cherry picked from commit 919a4ef592b6026a7533a93682f39118fef29ce8)

Change-Id: I52f1901af15732274915fa3c77c06909b5164afb
Reviewed-on: https://gerrit.libreoffice.org/37939
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf107868.odt 
b/vcl/qa/cppunit/pdfexport/data/tdf107868.odt
new file mode 100644
index ..8309f4b878d6
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf107868.odt differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 2e2d0f5b4972..b3661281d473 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -11,9 +11,11 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -38,6 +40,10 @@ class PdfExportTest : public test::BootstrapFixture, public 
unotest::MacrosTest
 {
 uno::Reference mxComponentContext;
 uno::Reference mxComponent;
+#if HAVE_FEATURE_PDFIUM
+FPDF_PAGE mpPdfPage = nullptr;
+FPDF_DOCUMENT mpPdfDocument = nullptr;
+#endif
 
 public:
 virtual void setUp() override;
@@ -48,6 +54,7 @@ public:
 void testTdf106059();
 /// Tests that text highlight from Impress is not lost.
 void testTdf105461();
+void testTdf107868();
 /// Tests that embedded video from Impress is not exported as a linked one.
 void testTdf105093();
 /// Tests export of non-PDF images.
@@ -65,6 +72,7 @@ public:
 #if HAVE_FEATURE_PDFIUM
 CPPUNIT_TEST(testTdf106059);
 CPPUNIT_TEST(testTdf105461);
+CPPUNIT_TEST(testTdf107868);
 CPPUNIT_TEST(testTdf105093);
 CPPUNIT_TEST(testTdf106206);
 CPPUNIT_TEST(testTdf106693);
@@ -83,10 +91,25 @@ void PdfExportTest::setUp()
 
 
mxComponentContext.set(comphelper::getComponentContext(getMultiServiceFactory()));
 mxDesktop.set(frame::Desktop::create(mxComponentContext));
+
+#if HAVE_FEATURE_PDFIUM
+FPDF_LIBRARY_CONFIG config;
+config.version = 2;
+config.m_pUserFontPaths = nullptr;
+config.m_pIsolate = nullptr;
+config.m_v8EmbedderSlot = 0;
+FPDF_InitLibraryWithConfig(&config);
+#endif
 }
 
 void PdfExportTest::tearDown()
 {
+#if HAVE_FEATURE_PDFIUM
+FPDF_ClosePage(mpPdfPage);
+FPDF_CloseDocument(mpPdfDocument);
+FPDF_DestroyLibrary();
+#endif
+
 if (mxComponent.is())
 mxComponent->dispose();
 
@@ -197,14 +220,6 @@ void PdfExportTest::testTdf106693()
 
 void PdfExportTest::testTdf105461()
 {
-// Setup.
-FPDF_LIBRARY_CONFIG config;
-config.version = 2;
-config.m_pUserFontPaths = nullptr;
-config.m_pIsolate = nullptr;
-config.m_v8EmbedderSlot = 0;
-FPDF_InitLibraryWithConfig(&config);
-
 // Import the bugdoc and export as PDF.
 OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf105461.odp";
 mxComponent = loadFromDesktop(aURL);
@@ -221,20 +236,20 @@ void PdfExportTest::testTdf105461()
 SvFileStream aFile(aTempFile.GetURL(), StreamMode::READ);
 SvMemoryStream aMemory;
 aMemory.WriteStream(aFile);
-FPDF_DOCUMENT pPdfDocument = FPDF_LoadMemDocument(aMemory.GetData(), 
aMemory.GetSize(), /*password=*/nullptr);
-CPPUNIT_ASSERT(pPdfDocument);
+mpPdfDocument = FPDF_LoadMemDocument(aMemory.GetData(), aMemory.GetSize(), 
/*password=*/nullptr);
+CPPUNIT_ASSERT(mpPdfDocument);
 
 // The document has one page.
-CPPUNIT_ASSERT_EQUAL(1, FPDF_GetPageCount(pPdfDocument));
-FPDF_PAGE pPdfPage = FPDF_LoadPage(pPdfDocument, /*page_index=*/0);
-CPPUNIT_ASSERT(pPdfPage);
+CPPUNIT_ASSERT_EQUAL(1, FPDF_GetPageCount(mpPdfDocument));
+mpPdfPage = FPDF_LoadPage(mpPdfDocument, /*page_index=*/0);
+CPPUNIT_ASSERT(mpPdfPage);
 
 // Make sure there is a filled rectangle inside.
-int nPageObjectCount = FPDFPage_CountObject(pPdfPage);
+int nPageObjectCount = FPDFPage_CountObject(mpPdfPage);
 int nYellowPathCount = 0;
 for (int i = 0; i < nPageObjectCount; ++i)
 {
-FPDF_PAGEOBJECT pPdfPageObject = FPDFPage_GetObject(pPdfPage, i);
+FPDF_PAGEOBJECT pPdfPageObject = FPDFPage_GetObject(mpPdfPage, i);
 if (FPDFPageObj_GetType(pPdfPageObject) != FPDF_PAGEOBJ_PATH)
 continue;
 
@@ -2

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

2017-05-23 Thread Noel Grandin
 bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx |4 
 bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx  |8 -
 bridges/source/cpp_uno/shared/bridge.cxx |2 
 bridges/source/cpp_uno/shared/component.cxx  |   16 +-
 bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx  |2 
 bridges/source/cpp_uno/shared/unointerfaceproxy.cxx  |4 
 bridges/source/jni_uno/jni_bridge.cxx|   18 +-
 bridges/source/jni_uno/jni_data.cxx  |   96 +++---
 bridges/source/jni_uno/jni_info.cxx  |  128 +--
 bridges/source/jni_uno/jni_java2uno.cxx  |   42 +++---
 bridges/source/jni_uno/jni_uno2java.cxx  |   20 +-
 11 files changed, 170 insertions(+), 170 deletions(-)

New commits:
commit 8256c139519c2431fdfe612c534416a7c93a9a38
Author: Noel Grandin 
Date:   Tue May 23 09:57:04 2017 +0200

loplugin:comparisonwithconstant in bridges

Change-Id: I14983a829daf481e31eaa955b0756bda89b87ee1
Reviewed-on: https://gerrit.libreoffice.org/37940
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
index f5c4dc0facdf..0c41d0358773 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -481,7 +481,7 @@ unsigned char * 
bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
 TYPELIB_DANGER_GET( &pTD, type->ppMembers[ nPos ] );
 assert(pTD);
 
-if ( typelib_TypeClass_INTERFACE_ATTRIBUTE == pTD->eTypeClass )
+if ( pTD->eTypeClass == typelib_TypeClass_INTERFACE_ATTRIBUTE )
 {
 typelib_InterfaceAttributeTypeDescription *pAttrTD =
 reinterpret_cast( 
pTD );
@@ -498,7 +498,7 @@ unsigned char * 
bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
 code = codeSnippet( code, nFunctionOffset++, nVtableOffset, 
false );
 }
 }
-else if ( typelib_TypeClass_INTERFACE_METHOD == pTD->eTypeClass )
+else if ( pTD->eTypeClass == typelib_TypeClass_INTERFACE_METHOD )
 {
 typelib_InterfaceMethodTypeDescription *pMethodTD =
 reinterpret_cast( 
pTD );
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
index 04d13e80c748..12df659b41cd 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
@@ -50,10 +50,10 @@ static OUString toUNOname( char const * p )
 // example: N3com3sun4star4lang24IllegalArgumentExceptionE
 
 OUStringBuffer buf( 64 );
-assert( 'N' == *p );
+assert( *p == 'N' );
 ++p; // skip N
 
-while ('E' != *p)
+while (*p != 'E')
 {
 // read chars count
 long n = (*p++ - '0');
@@ -64,7 +64,7 @@ static OUString toUNOname( char const * p )
 }
 buf.appendAscii( p, n );
 p += n;
-if ('E' != *p)
+if (*p != 'E')
 buf.append( '.' );
 }
 
@@ -156,7 +156,7 @@ void fillUnoException( __cxxabiv1::__cxa_exception * 
header, uno_Any * pUnoExc,
 fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
 #endif
 typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
-if (nullptr == pExcTypeDescr)
+if (pExcTypeDescr == nullptr)
 {
 RuntimeException aRE( "exception type not found: " + unoName );
 Type const & rType = cppu::UnoType::get();
diff --git a/bridges/source/cpp_uno/shared/bridge.cxx 
b/bridges/source/cpp_uno/shared/bridge.cxx
index 004f8954986e..f752c626d253 100644
--- a/bridges/source/cpp_uno/shared/bridge.cxx
+++ b/bridges/source/cpp_uno/shared/bridge.cxx
@@ -151,7 +151,7 @@ uno_Mapping * Bridge::createMapping(
 
 void Bridge::acquire()
 {
-if (1 == osl_atomic_increment( &nRef ))
+if (osl_atomic_increment( &nRef ) == 1)
 {
 if (bExportCpp2Uno)
 {
diff --git a/bridges/source/cpp_uno/shared/component.cxx 
b/bridges/source/cpp_uno/shared/component.cxx
index e58092064513..960fc9991cf1 100644
--- a/bridges/source/cpp_uno/shared/component.cxx
+++ b/bridges/source/cpp_uno/shared/component.cxx
@@ -201,11 +201,11 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL uno_ext_getMapping(
 OUString from_envTypeName(cppu::EnvDcp::getTypeName(pFrom->pTypeName));
 OUString to_envTypeName(cppu::EnvDcp::getTypeName(pTo->pTypeName));
 
-if (0 == rtl_ustr_ascii_compare(
+if (rtl_ustr_ascii_compare(
 from_envTypeName.pData->buffer,
-CPPU_CURRENT_LANGUAGE_BINDING_NAME ) &&
-0 == rtl_ustr_ascii_compare(
-to_envTypeName.pData->buffer, UNO_LB_UNO ))
+CPPU_CURRENT_LANGUAGE_BINDING_NAME ) == 0 &&
+rtl_ustr_ascii_compare(
+to_envTypeName.pD

[Libreoffice-commits] online.git: Changes to 'refs/tags/2.1.1'

2017-05-23 Thread Andras Timar
Tag '2.1.1' created by Andras Timar  at 2017-05-23 
09:54 +

2.1.1

Changes since 2.1.1-rc1-8:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Caolán McNamara
 sd/source/filter/html/htmlex.cxx |   26 +++---
 sd/source/ui/app/strings.src |5 +
 sd/source/ui/inc/strings.hrc |1 +
 3 files changed, 13 insertions(+), 19 deletions(-)

New commits:
commit 476c50943864e70a4758ccf01e2567067bc7c44f
Author: Caolán McNamara 
Date:   Tue May 23 10:38:21 2017 +0100

mysterious and missing 4077 resource used in sd

this would have been
String RID_WEBWIZARDDIALOG_START +77
from
wizards/source/formwizard/dbwizres.src

which is now gone (very reasonably) since...

commit 82d863b4a410fa78120d2efc41bd2b3b61f21cee
Date:   Sat Feb 18 14:02:30 2017 +0100

Related tdf#99967: Cleanup after Web Wizard drop

There are still webwizard*.xhp in help/source/text/shared/autopi/

Change-Id: If54d7bfc093c8c0765fd881eeb14f62bc3517194
Reviewed-on: https://gerrit.libreoffice.org/34402
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

the original complicated reuse of another modules translation
was in

commit 660c23c4c1c624b9db626be8f01166a154021e0d
Date:   Fri Jan 28 14:38:37 2005 +

INTEGRATION: CWS impress30 (1.18.40); FILE MERGED
2005/01/20 13:44:50 cl 1.18.40.1: #b4752338# give warning when 
overwriting files

Change-Id: I80ff0a545bbf08bcea142bb8bd41c547713ee11b

diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 06babc1c576b..161d8fa6afce 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -3097,25 +3097,13 @@ bool HtmlExport::checkForExistingFiles()
 
 if( bFound )
 {
-ResMgr *pResMgr = ResMgr::CreateResMgr( "dbw" );
-if( pResMgr )
-{
-ResId aResId( 4077, *pResMgr );
-OUString aMsg( aResId );
-
-OUString aSystemPath;
-osl::FileBase::getSystemPathFromFileURL( maExportPath, 
aSystemPath );
-aMsg = aMsg.replaceFirst( "%FILENAME", aSystemPath );
-ScopedVclPtrInstance< WarningBox > aWarning( nullptr, 
WB_YES_NO | WB_DEF_YES, aMsg );
-aWarning->SetImage( WarningBox::GetStandardImage() );
-bFound = ( RET_NO == aWarning->Execute() );
-
-delete pResMgr;
-}
-else
-{
-bFound = false;
-}
+OUString aSystemPath;
+osl::FileBase::getSystemPathFromFileURL( maExportPath, aSystemPath 
);
+OUString aMsg(SdResId(STR_OVERWRITE_WARNING));
+aMsg = aMsg.replaceFirst( "%FILENAME", aSystemPath );
+ScopedVclPtrInstance< WarningBox > aWarning( nullptr, WB_YES_NO | 
WB_DEF_YES, aMsg );
+aWarning->SetImage( WarningBox::GetStandardImage() );
+bFound = ( RET_NO == aWarning->Execute() );
 }
 }
 catch( Exception& )
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index 7dd87b46059e..89b9b00dd9bb 100644
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -1127,4 +1127,9 @@ String STR_OBJECTS_TREE
 Text [ en-US ] = "Page Tree";
 };
 
+String STR_OVERWRITE_WARNING
+{
+Text [ en-US  ] = "The local target directory '%FILENAME' is not empty. 
Some files might be overwritten. Do you want to continue?";
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index 7d0b1217af58..500ad5012010 100644
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -163,6 +163,7 @@
 #define STR_UNDO_INSERT_TEXTFRAME   (RID_APP_START+275)
 #define STR_ACTION_NOTPOSSIBLE  (RID_APP_START+278)
 #define STR_DLG_INSERT_PAGES_FROM_FILE  (RID_APP_START+279)
+#define STR_OVERWRITE_WARNING   (RID_APP_START+280)
 #define STR_SCALE_OBJECTS   (RID_APP_START+281)
 #define STR_CREATE_PAGES(RID_APP_START+282)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Yousuf Philips
 include/tools/colordata.hxx|2 ++
 svx/source/tbxctrls/tbxcolorupdate.cxx |4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 318ba58031f656beda5a735d687a0ba991d9d779
Author: Yousuf Philips 
Date:   Tue May 23 03:22:28 2017 +0400

tdf#107731 New default red and yellow for font and highlight color

Change-Id: Ide81a7a3fce963a13b5c65861f566878ccb15676
Reviewed-on: https://gerrit.libreoffice.org/37884
Tested-by: Jenkins 
Reviewed-by: Maxim Monastirsky 

diff --git a/include/tools/colordata.hxx b/include/tools/colordata.hxx
index c303957411df..3df26b57092b 100644
--- a/include/tools/colordata.hxx
+++ b/include/tools/colordata.hxx
@@ -46,6 +46,7 @@ constexpr ColorData RGB_COLORDATA(sal_uInt8 r, sal_uInt8 g, 
sal_uInt8 b) {
 #define COL_GREEN   RGB_COLORDATA( 0x00, 0x80, 0x00 )
 #define COL_CYANRGB_COLORDATA( 0x00, 0x80, 0x80 )
 #define COL_RED RGB_COLORDATA( 0x80, 0x00, 0x00 )
+#define COL_RED_FONTCOLOR   RGB_COLORDATA( 0xCE, 0x18, 0x1E )
 #define COL_MAGENTA RGB_COLORDATA( 0x80, 0x00, 0x80 )
 #define COL_BROWN   RGB_COLORDATA( 0x80, 0x80, 0x00 )
 #define COL_GRAYRGB_COLORDATA( 0x80, 0x80, 0x80 )
@@ -59,6 +60,7 @@ constexpr ColorData RGB_COLORDATA(sal_uInt8 r, sal_uInt8 g, 
sal_uInt8 b) {
 #define COL_LIGHTMAGENTARGB_COLORDATA( 0xFF, 0x00, 0xFF )
 #define COL_LIGHTGRAYBLUE   RGB_COLORDATA( 0xE0, 0xE0, 0xFF )
 #define COL_YELLOW  RGB_COLORDATA( 0xFF, 0xFF, 0x00 )
+#define COL_YELLOW_HIGHLIGHTRGB_COLORDATA( 0xFF, 0xF2, 0x00 )
 #define COL_WHITE   RGB_COLORDATA( 0xFF, 0xFF, 0xFF )
 #define COL_TRANSPARENT TRGB_COLORDATA( 0xFF, 0xFF, 0xFF, 0xFF )
 #define COL_AUTO(ColorData)0x
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx 
b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 157b65db6318..56cff24bc5df 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -42,7 +42,7 @@ namespace svx
 {
 case SID_ATTR_CHAR_COLOR:
 case SID_ATTR_CHAR_COLOR2:
-Update(COL_RED);
+Update(COL_RED_FONTCOLOR);
 break;
 case SID_FRAME_LINECOLOR:
 Update(COL_BLUE);
@@ -50,7 +50,7 @@ namespace svx
 case SID_ATTR_CHAR_COLOR_BACKGROUND:
 case SID_ATTR_CHAR_BACK_COLOR:
 case SID_BACKGROUND_COLOR:
-Update(COL_YELLOW);
+Update(COL_YELLOW_HIGHLIGHT);
 break;
 case SID_ATTR_LINE_COLOR:
 Update(COL_DEFAULT_SHAPE_STROKE);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Szymon Kłos
 sw/source/uibase/dialog/watermarkdialog.cxx   |   23 --
 sw/source/uibase/inc/watermarkdialog.hxx  |4 ---
 sw/uiconfig/swriter/menubar/menubar.xml   |1 
 sw/uiconfig/swriter/toolbar/classificationbar.xml |1 
 sw/uiconfig/swriter/ui/watermarkdialog.ui |   21 ++--
 5 files changed, 5 insertions(+), 45 deletions(-)

New commits:
commit c9c0aefd24c3aab24403b41b601c392267c6aff7
Author: Szymon Kłos 
Date:   Tue May 23 11:35:30 2017 +0200

Watermark: move to the insert menu

Change-Id: I6058236434de00cddec1340613e83c10acc4df2a

diff --git a/sw/uiconfig/swriter/menubar/menubar.xml 
b/sw/uiconfig/swriter/menubar/menubar.xml
index c322fd894b2b..f7ca5750f37e 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -267,6 +267,7 @@
 
   
   
+  
   
   
   
diff --git a/sw/uiconfig/swriter/toolbar/classificationbar.xml 
b/sw/uiconfig/swriter/toolbar/classificationbar.xml
index 01981333a46e..3ee34071e040 100644
--- a/sw/uiconfig/swriter/toolbar/classificationbar.xml
+++ b/sw/uiconfig/swriter/toolbar/classificationbar.xml
@@ -9,5 +9,4 @@
 -->
 http://openoffice.org/2001/toolbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; toolbar:id="toolbar">
   
-  
 
commit 6a4f6bda2278c3e0c940fbb19bd3f19877e6dc9c
Author: Szymon Kłos 
Date:   Tue May 23 11:29:43 2017 +0200

Watermark: remove enable checkbox

Change-Id: Ic18b85070bf6c5c3e9678859a87cb9f44411533b

diff --git a/sw/source/uibase/dialog/watermarkdialog.cxx 
b/sw/source/uibase/dialog/watermarkdialog.cxx
index 1246eabce4cc..6b993d22caf1 100644
--- a/sw/source/uibase/dialog/watermarkdialog.cxx
+++ b/sw/source/uibase/dialog/watermarkdialog.cxx
@@ -23,8 +23,6 @@ SwWatermarkDialog::SwWatermarkDialog( vcl::Window* pParent, 
SfxBindings& rBindin
 : ModelessDialog( pParent, "WatermarkDialog", 
"modules/swriter/ui/watermarkdialog.ui" )
 , m_rBindings( rBindings )
 {
-get( m_pTextGrid, "TextGrid" );
-get( m_pEnableWatermarkCB, "EnableWatermarkCB" );
 get( m_pTextInput, "TextInput" );
 get( m_pOKButton, "ok" );
 get( m_pFont, "FontBox" );
@@ -47,8 +45,6 @@ void SwWatermarkDialog::dispose()
 m_pAngle.clear();
 m_pTransparency.clear();
 m_pColor.clear();
-m_pTextGrid.clear();
-m_pEnableWatermarkCB.clear();
 m_pTextInput.clear();
 m_pOKButton.clear();
 
@@ -70,7 +66,6 @@ void SwWatermarkDialog::InitFields()
 
 m_pFont->Fill( pFontList );
 
-m_pEnableWatermarkCB->SetClickHdl( LINK( this, SwWatermarkDialog, 
CheckBoxHdl ) );
 m_pOKButton->SetClickHdl( LINK( this, SwWatermarkDialog, OKButtonHdl ) );
 
 // Get watermark properties
@@ -81,7 +76,6 @@ void SwWatermarkDialog::InitFields()
 {
 const SfxWatermarkItem* pWatermark = static_cast( pItem );
 OUString sText = pWatermark->GetText();
-m_pEnableWatermarkCB->Check( !sText.isEmpty() );
 m_pTextInput->SetText( sText );
 m_pFont->SelectEntryPos( m_pFont->GetEntryPos( pWatermark->GetFont() ) 
);
 m_pAngle->SetValue( pWatermark->GetAngle() );
@@ -90,24 +84,9 @@ void SwWatermarkDialog::InitFields()
 }
 }
 
-void SwWatermarkDialog::Update()
-{
-if( m_pEnableWatermarkCB->IsChecked() )
-m_pTextGrid->Enable();
-else
-m_pTextGrid->Disable();
-}
-
-IMPL_LINK_NOARG( SwWatermarkDialog, CheckBoxHdl, Button*, void )
-{
-Update();
-}
-
 IMPL_LINK_NOARG( SwWatermarkDialog, OKButtonHdl, Button*, void )
 {
-OUString sText = "";
-if( m_pEnableWatermarkCB->IsChecked() )
-sText = m_pTextInput->GetText();
+OUString sText = m_pTextInput->GetText();
 
 css::uno::Sequence aPropertyValues( 
comphelper::InitPropertySequence(
 {
diff --git a/sw/source/uibase/inc/watermarkdialog.hxx 
b/sw/source/uibase/inc/watermarkdialog.hxx
index 7f59fe0a2bb7..b443fbce797d 100644
--- a/sw/source/uibase/inc/watermarkdialog.hxx
+++ b/sw/source/uibase/inc/watermarkdialog.hxx
@@ -23,16 +23,12 @@ public:
 virtual void dispose() override;
 
 void InitFields();
-void Update();
 
 private:
-DECL_LINK( CheckBoxHdl, Button*, void );
 DECL_LINK( OKButtonHdl, Button*, void );
 
 SfxBindings& m_rBindings;
 
-VclPtr m_pTextGrid;
-VclPtr m_pEnableWatermarkCB;
 VclPtr m_pTextInput;
 VclPtr m_pOKButton;
 VclPtr m_pFont;
diff --git a/sw/uiconfig/swriter/ui/watermarkdialog.ui 
b/sw/uiconfig/swriter/ui/watermarkdialog.ui
index 316cd0c5d8bc..2edb38bf7f3a 100644
--- a/sw/uiconfig/swriter/ui/watermarkdialog.ui
+++ b/sw/uiconfig/swriter/ui/watermarkdialog.ui
@@ -62,7 +62,7 @@
 False
 True
 end
-0
+1
   
 
 
@@ -72,21 +72,6 @@
 vertical
 6
 
-  
-Insert 
watermark
-True
-True
-False
-0
-True

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist loleaflet/main.js loleaflet/src wsd/DocumentBroker.cpp wsd/Exceptions.hpp wsd/LOOLWSD.cpp wsd/Storage.

2017-05-23 Thread Pranav Kant
 loleaflet/dist/errormessages.js   |5 ++--
 loleaflet/main.js |2 -
 loleaflet/src/core/Socket.js  |   21 --
 loleaflet/src/map/handler/Map.WOPI.js |6 +++--
 wsd/DocumentBroker.cpp|5 +++-
 wsd/Exceptions.hpp|   16 +++---
 wsd/LOOLWSD.cpp   |   10 ++--
 wsd/Storage.cpp   |   38 +++---
 8 files changed, 71 insertions(+), 32 deletions(-)

New commits:
commit 0c609596fbab743de7a8f023c0071d870404c193
Author: Pranav Kant 
Date:   Fri May 19 11:43:43 2017 +0530

wsd: Fail gracefully when storage misbehaves

When WOPI's CheckFileInfo or GetFile responds with status code other
than HTTP 200, show a message to the user indicating some problem in the
storage.

Currently, we open an empty document if storage doesn't return a
document which surely is not correct.

Mention the storage server address when asking user to contact the
server administrator to be more friendly.

Combination of following cherry-picks from master:
(cherry picked from commit 2e9e6a753d9721dc6776362d34350380f797dab0)
(cherry picked from commit bcf958c50056637d4899fc9cd38b87a15dfa57b0)
(cherry picked from commit aed840ea04ce2e7ae120698f50e78268b542db12)
(cherry picked from commit 1ea87b627e077590c6eefa455ce3c8f7d0564068)

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

diff --git a/loleaflet/dist/errormessages.js b/loleaflet/dist/errormessages.js
index d1eccac1..89f31fc7 100644
--- a/loleaflet/dist/errormessages.js
+++ b/loleaflet/dist/errormessages.js
@@ -10,6 +10,7 @@ exports.sessionexpired = _('Your session has been expired. 
Further changes to do
 exports.faileddocloading = _('Failed to load the document. Please ensure the 
file type is supported and not corrupted, and try again.');
 
 exports.storage = {
-   savediskfull: _('Save failed due to no disk space left on storage 
server. Document will now be read-only. Please contact the server administrator 
to continue editing.'),
-   savefailed: _('Document cannot be saved to storage. Check your 
permissions or contact the storage server administrator.')
+   loadfailed: _('Failed to read document from storage. Please contact 
your storage server (%storageserver) administrator.'),
+   savediskfull: _('Save failed due to no disk space left on storage 
server. Document will now be read-only. Please contact the server 
(%storageserver) administrator to continue editing.'),
+   savefailed: _('Document cannot be saved to storage. Check your 
permissions or contact the storage server (%storageserver) administrator.')
 };
diff --git a/loleaflet/main.js b/loleaflet/main.js
index fed59570..48200cd9 100644
--- a/loleaflet/main.js
+++ b/loleaflet/main.js
@@ -113,7 +113,7 @@ var map = L.map('map', {
wopi: isWopi,
alwaysActive: alwaysActive,
idleTimeoutSecs: idleTimeoutSecs,  // Dim when user is idle.
-   outOfFocusTimeoutSecs: outOfFocusTimeoutSecs, // Dim after switching 
tabs.
+   outOfFocusTimeoutSecs: outOfFocusTimeoutSecs // Dim after switching 
tabs.
 });
 // toolbar.js (loaded in 

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

2017-05-23 Thread tagezi
 basctl/uiconfig/basicide/menubar/menubar.xml |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 990277913a55bf7b0b920affe697460b24920c10
Author: tagezi 
Date:   Tue May 23 09:12:10 2017 +0300

The menu items are moved according to a general design concept

Close item was moved to up the first section of File menu
GoToLine item was moved from View menu to Edit menu under Find&Replace

Change-Id: I2d2561848917c2e6f22baf92030c7b5d147a56bb
Reviewed-on: https://gerrit.libreoffice.org/37937
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 

diff --git a/basctl/uiconfig/basicide/menubar/menubar.xml 
b/basctl/uiconfig/basicide/menubar/menubar.xml
index 9c2528fe6c30..45e667b37c99 100644
--- a/basctl/uiconfig/basicide/menubar/menubar.xml
+++ b/basctl/uiconfig/basicide/menubar/menubar.xml
@@ -22,10 +22,10 @@
 
 
 
+
 
 
 
-
 
 
 
@@ -53,6 +53,7 @@
 
 
 
+
 
 
 
@@ -61,7 +62,6 @@
 
 
 
-
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Noel Grandin
 canvas/source/cairo/cairo_canvashelper.cxx  |2 
 chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx |4 
 chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx   |2 
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx |6 
-
 chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx   |   10 
+-
 chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx |   16 
+--
 chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx|4 
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx  |8 
-
 chart2/source/controller/dialogs/ObjectNameProvider.cxx |   20 
++--
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx   |   22 
++--
 chart2/source/controller/dialogs/res_DataLabel.cxx  |2 
 chart2/source/controller/dialogs/tp_AxisPositions.cxx   |8 
-
 chart2/source/controller/dialogs/tp_ChartType.cxx   |   24 
++---
 chart2/source/controller/dialogs/tp_Scale.cxx   |   18 
+--
 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx   |   10 
+-
 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx  |   26 
++---
 chart2/source/controller/itemsetwrapper/ItemConverter.cxx   |2 
 chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx  |4 
 chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx  |   26 
++---
 chart2/source/controller/main/ChartController_Position.cxx  |   10 
+-
 chart2/source/controller/main/ChartController_Properties.cxx|   10 
+-
 chart2/source/controller/main/ChartController_Window.cxx|   46 
+-
 chart2/source/controller/main/ControllerCommandDispatch.cxx |   14 
+--
 chart2/source/controller/main/DrawCommandDispatch.cxx   |2 
 chart2/source/controller/main/ElementSelector.cxx   |4 
 chart2/source/controller/main/PositionAndSizeHelper.cxx |   10 
+-
 chart2/source/controller/main/SelectionHelper.cxx   |   10 
+-
 chart2/source/model/main/ChartModel.cxx |4 
 chart2/source/model/main/Diagram.cxx|   14 
+--
 chart2/source/model/template/ChartTypeTemplate.cxx  |2 
 chart2/source/tools/AxisHelper.cxx  |6 
-
 chart2/source/tools/ChartModelHelper.cxx|2 
 chart2/source/tools/ChartTypeHelper.cxx |   10 
+-
 chart2/source/tools/LinePropertiesHelper.cxx|4 
 chart2/source/tools/ObjectIdentifier.cxx|4 
 chart2/source/tools/RangeHighlighter.cxx|   22 
++--
 chart2/source/tools/ThreeDHelper.cxx|2 
 chart2/source/view/axes/DateScaling.cxx |4 
 chart2/source/view/axes/ScaleAutomatism.cxx |4 
 chart2/source/view/axes/Tickmarks.cxx   |6 
-
 chart2/source/view/axes/VAxisBase.cxx   |8 
-
 chart2/source/view/axes/VAxisProperties.cxx |   16 
+--
 chart2/source/view/axes/VCartesianAxis.cxx  |   44 
-
 chart2/source/view/axes/VCartesianCoordinateSystem.cxx  |8 
-
 chart2/source/view/axes/VCartesianGrid.cxx  |   26 
++---
 chart2/source/view/axes/VCoordinateSystem.cxx   |   22 
++--
 chart2/source/view/axes/VPolarAxis.cxx  |4 
 chart2/source/view/axes/VPolarCoordinateSystem.cxx  |6 
-
 chart2/source/view/axes/VPolarGrid.cxx  |2 
 chart2/source/view/charttypes/AreaChart.cxx |   18 
+--
 chart2/source/view/charttypes/BarChart.cxx  |   20 
++--
 chart2/source/view/charttypes/BubbleChart.cxx   |2 
 chart2/source/view/charttypes/NetChart.cxx  |2 
 chart2/source/view/charttypes/PieChart.cxx  |4 
 chart2/source/view/charttypes/VSeriesPlotter.cxx|   34 
+++
 chart2/source/view/diagram/VDiagram.cxx |   14 
+--
 chart2/source/view/main/ChartView.cxx   |   22 
++--
 chart2/source/view/main/DummyXShape.cxx |4 
 chart2/source/view/main/GL3DRenderer.cxx|4 
 chart2/source/view/main/LabelPositionHelper.cxx

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

2017-05-23 Thread Noel Grandin
 sc/inc/address.hxx   |   16 +-
 sc/inc/attarray.hxx  |8 -
 sc/inc/attrib.hxx|   10 -
 sc/inc/chgtrack.hxx  |   30 ++--
 sc/inc/column.hxx|   10 -
 sc/inc/compiler.hxx  |2 
 sc/inc/dbdata.hxx|4 
 sc/inc/detdata.hxx   |2 
 sc/inc/document.hxx  |   12 -
 sc/inc/dpobject.hxx  |6 
 sc/inc/drwlayer.hxx  |4 
 sc/inc/externalrefmgr.hxx|4 
 sc/inc/hints.hxx |   14 +-
 sc/inc/markarr.hxx   |2 
 sc/inc/markdata.hxx  |2 
 sc/inc/markmulti.hxx |2 
 sc/inc/olinetab.hxx  |2 
 sc/inc/rangelst.hxx  |8 -
 sc/inc/table.hxx |   10 -
 sc/inc/tabprotection.hxx |2 
 sc/inc/types.hxx |6 
 sc/qa/unit/mark_test.cxx |4 
 sc/qa/unit/ucalc.cxx |2 
 sc/source/core/data/attarray.cxx |   18 +-
 sc/source/core/data/attrib.cxx   |2 
 sc/source/core/data/bcaslot.cxx  |4 
 sc/source/core/data/column.cxx   |   10 -
 sc/source/core/data/documen2.cxx |2 
 sc/source/core/data/documen3.cxx |2 
 sc/source/core/data/documen5.cxx |2 
 sc/source/core/data/documen7.cxx |2 
 sc/source/core/data/documen8.cxx |2 
 sc/source/core/data/document.cxx |   28 ++--
 sc/source/core/data/dpobject.cxx |   18 +-
 sc/source/core/data/drwlayer.cxx |   18 +-
 sc/source/core/data/fillinfo.cxx |   58 
 sc/source/core/data/formulacell.cxx  |   10 -
 sc/source/core/data/markarr.cxx  |4 
 sc/source/core/data/markdata.cxx |2 
 sc/source/core/data/markmulti.cxx|4 
 sc/source/core/data/olinetab.cxx |6 
 sc/source/core/data/sortparam.cxx|4 
 sc/source/core/data/table1.cxx   |   30 ++--
 sc/source/core/data/table2.cxx   |   12 -
 sc/source/core/data/table3.cxx   |6 
 sc/source/core/data/table6.cxx   |   42 +++---
 sc/source/core/data/tabprotection.cxx|6 
 sc/source/core/inc/bcaslot.hxx   |4 
 sc/source/core/inc/refupdat.hxx  |4 
 sc/source/core/tool/address.cxx  |   14 +-
 sc/source/core/tool/chgtrack.cxx |   30 ++--
 sc/source/core/tool/compiler.cxx |2 
 sc/source/core/tool/dbdata.cxx   |   12 -
 sc/source/core/tool/detdata.cxx  |2 
 sc/source/core/tool/hints.cxx|2 
 sc/source/core/tool/interpr1.cxx |8 -
 sc/source/core/tool/interpr4.cxx |8 -
 sc/source/core/tool/queryparam.cxx   |6 
 sc/source/core/tool/rangelst.cxx |8 -
 sc/source/core/tool/rangenam.cxx |6 
 sc/source/core/tool/refupdat.cxx |   58 
 sc/source/core/tool/token.cxx|   10 -
 sc/source/filter/excel/excform.cxx   |6 
 sc/source/filter/excel/excform8.cxx  |2 
 sc/source/filter/excel/xechart.cxx   |6 
 sc/source/filter/excel/xeformula.cxx |   16 +-
 sc/source/filter/excel/xetable.cxx   |8 -
 sc/source/filter/excel/xiname.cxx|2 
 sc/source/filter/excel/xipivot.cxx   |2 
 sc/source/filter/html/htmlimp.cxx|8 -
 sc/source/filter/html/htmlpars.cxx   |6 
 sc/source/filter/inc/excform.hxx |4 
 sc/source/filter/inc/formel.hxx  |2 
 sc/source/filter/starcalc/scflt.cxx  |2 
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |   12 -
 sc/source/ui/docshell/dbdocfun.cxx   |2 
 sc/source/ui/docshell/docfunc.cxx|8 -
 sc/source/ui/docshell/externalrefmgr.cxx |6 
 sc/source/ui/drawfunc/fupoor.cxx |4 
 sc/source/ui/drawfunc/fusel2.c

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/src

2017-05-23 Thread Pranav Kant
 loleaflet/src/control/Control.Scroll.js |   13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 033c6268edd919dce2c014c3b05a60f0181be383
Author: Pranav Kant 
Date:   Mon May 22 16:51:52 2017 +0530

loleaflet: Change opacity manually

See inline comment

Change-Id: I62456dd300eabaa156f9673fe13c190421c22ca0
(cherry picked from commit 62680fffdb2843ae8a82fa2d3b54e2256ef86d41)
Reviewed-on: https://gerrit.libreoffice.org/37902
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.Scroll.js 
b/loleaflet/src/control/Control.Scroll.js
index 3bbb5c5c..03bdcb77 100644
--- a/loleaflet/src/control/Control.Scroll.js
+++ b/loleaflet/src/control/Control.Scroll.js
@@ -2,7 +2,7 @@
  * L.Control.Scroll handles scrollbars
  */
 
-/* global $ */
+/* global $ clearTimeout setTimeout */
 L.Control.Scroll = L.Control.extend({
 
onAdd: function (map) {
@@ -25,6 +25,7 @@ L.Control.Scroll = L.Control.extend({
map.on('updaterowcolumnheaders', 
this._onUpdateRowColumnHeaders, this);
 
var control = this;
+   var autoHideTimeout = null;
$('.scroll-container').mCustomScrollbar({
axis: 'yx',
theme: 'minimal-dark',
@@ -33,9 +34,19 @@ L.Control.Scroll = L.Control.extend({
callbacks:{
onScroll: function() {
control._onScrollEnd(this);
+   if (autoHideTimeout)
+   clearTimeout(autoHideTimeout);
+   autoHideTimeout = setTimeout(function() 
{
+   $('.mCS-autoHide > 
.mCustomScrollBox .mCSB_scrollTools, .mCS-autoHide > .mCustomScrollBox ~ 
.mCSB_scrollTools').css({opacity: 0, 'filter': 'alpha(opacity=0)', 
'-ms-filter': 'alpha(opacity=0)'});
+   }, 2000);
},
whileScrolling: function() {
control._onScroll(this);
+
+   // autoHide feature doesn't work 
because plugin relies on hovering on scroll container
+   // and we have a mock scroll container 
whereas the actual user hovering happens only on
+   // real document. Change the CSS rules 
manually to simulate autoHide feature.
+   $('.mCS-autoHide > .mCustomScrollBox 
.mCSB_scrollTools, .mCS-autoHide > .mCustomScrollBox ~ 
.mCSB_scrollTools').css({opacity: 1, 'filter': 'alpha(opacity=100)', 
'-ms-filter': 'alpha(opacity=100)'});
},
onUpdate: function() {
console.debug('mCustomScrollbar: 
onUpdate:');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/src

2017-05-23 Thread Ashod Nakashian
 loleaflet/src/core/Socket.js |6 ++
 loleaflet/src/map/Map.js |   13 +
 2 files changed, 19 insertions(+)

New commits:
commit 12d542a9e8eb2d4d97c860b041a723e44de990b6
Author: Ashod Nakashian 
Date:   Sun May 21 21:51:49 2017 -0400

loleaflet: correctly reload after server recycling

When the server recylces, the client should
transparently restore connection when the
server is back on. This was broken because
of the different times when moving in and out
of focus for dimming/inactivity purposes.

Here we track server recycling state
separately, and skip the dimming/inactivity
checks in that case.

Reviewed-on: https://gerrit.libreoffice.org/37892
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 7bc5989aca61b128ff721f52070b1b5b19adbf94)

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

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index a2ef4f27..0e8374d4 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -16,6 +16,7 @@ L.Socket = L.Class.extend({
},
 
initialize: function (map) {
+   console.debug('socket.initialize:');
this._map = map;
try {
if (map.options.permission) {
@@ -109,6 +110,8 @@ L.Socket = L.Class.extend({
},
 
_onSocketOpen: function () {
+   console.debug('_onSocketOpen:');
+   this._map._serverRecycling = false;
// Always send the protocol version number.
// TODO: Move the version number somewhere sensible.
this._doSend('loolclient ' + this.ProtocolVersionNumber);
@@ -236,6 +239,7 @@ L.Socket = L.Class.extend({
msg = _('Server is recycling and will be 
available shortly');
 
this._map._active = false;
+   this._map._serverRecycling = true;
 
// Prevent reconnecting the world at the same 
time.
var min = 5000;
@@ -552,11 +556,13 @@ L.Socket = L.Class.extend({
},
 
_onSocketError: function () {
+   console.debug('_onSocketError:');
this._map.hideBusy();
// Let onclose (_onSocketClose) report errors.
},
 
_onSocketClose: function (e) {
+   console.debug('_onSocketClose:');
var isActive = this._map._active;
this._map.hideBusy();
this._map._active = false;
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 0e8d6311..090bafab 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -71,6 +71,7 @@ L.Map = L.Evented.extend({
this._fatal = false;
this._enabled = true;
this._debugAlwaysActive = false; // disables the dimming / 
document inactivity when true
+   this._serverRecycling = false;
 
vex.dialogID = -1;
 
@@ -777,6 +778,10 @@ L.Map = L.Evented.extend({
},
 
_activate: function () {
+   if (this._serverRecycling) {
+   return;
+   }
+
console.debug('_activate:');
clearTimeout(vex.timer);
 
@@ -867,6 +872,10 @@ L.Map = L.Evented.extend({
},
 
_startInactiveTimer: function () {
+   if (this._serverRecycling) {
+   return;
+   }
+
console.debug('_startInactiveTimer:');
clearTimeout(vex.timer);
var map = this;
@@ -876,6 +885,10 @@ L.Map = L.Evented.extend({
},
 
_deactivate: function () {
+   if (this._serverRecycling) {
+   return;
+   }
+
console.debug('_deactivate:');
clearTimeout(vex.timer);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - common/Session.cpp loleaflet/src wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp

2017-05-23 Thread Ashod Nakashian
 common/Session.cpp   |3 -
 loleaflet/src/core/Socket.js |9 +---
 wsd/DocumentBroker.cpp   |   88 ++-
 wsd/DocumentBroker.hpp   |4 +
 4 files changed, 46 insertions(+), 58 deletions(-)

New commits:
commit df19bf5e8c9355c04a04d43271fd405fe9b13818
Author: Ashod Nakashian 
Date:   Sun May 21 19:13:55 2017 -0400

Correctly send termination reason to clients

Fixes the case when the client reconnects on idle
disconnection (because it never got the 'close: idle'
message).

Also, show informative message to users in this case
instead of grey screen.

Change-Id: Ia2e1f2ffefe6d35dd1552e7cc44e490aab86c600
Reviewed-on: https://gerrit.libreoffice.org/37891
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 407c538f046f9245661a77e2452779c465b75087)
Reviewed-on: https://gerrit.libreoffice.org/37894
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/common/Session.cpp b/common/Session.cpp
index 69696fb3..2b99ec79 100644
--- a/common/Session.cpp
+++ b/common/Session.cpp
@@ -164,8 +164,7 @@ void Session::shutdown(const WebSocketHandler::StatusCodes 
statusCode, const std
 static_cast(statusCode) << "] and reason [" << 
statusMessage << "].");
 
 // See protocol.txt for this application-level close frame.
-const std::string msg = "close: " + statusMessage;
-sendTextFrame(msg.data(), msg.size());
+sendMessage("close: " + statusMessage);
 
 WebSocketHandler::shutdown(statusCode, statusMessage);
 }
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 4165e0c5..a2ef4f27 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -226,6 +226,9 @@ L.Socket = L.Class.extend({
if (textMsg === 'ownertermination') {
msg = _('Session terminated by document owner');
}
+   else if (textMsg === 'idle') {
+   msg = _('Session terminated due to idleness');
+   }
else if (textMsg === 'shuttingdown') {
msg = _('Server is shutting down for 
maintenance (auto-saving)');
}
@@ -299,11 +302,7 @@ L.Socket = L.Class.extend({
this._map.fire('postMessage', {msgId: 
'Session_Closed'});
}
 
-   if (textMsg === 'idle') {
-   this._map._active = false;
-   }
-
-   if (textMsg === 'ownertermination') {
+   if (textMsg === 'idle' || textMsg === 
'ownertermination') {
this._map.remove();
}
 
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 4ddab06b..b13c75f7 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -223,6 +223,7 @@ void DocumentBroker::pollThread()
 static const bool AutoSaveEnabled = !std::getenv("LOOL_NO_AUTOSAVE");
 static const size_t IdleDocTimeoutSecs = LOOLWSD::getConfigValue(
   
"per_document.idle_timeout_secs", 3600);
+std::string closeReason = "stopped";
 
 // Main polling loop goodness.
 while (!_stop && _poll->continuePolling() && !TerminationFlag)
@@ -240,30 +241,8 @@ void DocumentBroker::pollThread()
 
 if (ShutdownRequestFlag)
 {
-// Shutting down the server: notify clients, save, and stop.
-static const std::string msg("close: recycling");
-
-// First copy into local container, since removeSession
-// will erase from _sessions, but will leave the last.
-std::map> sessions = 
_sessions;
-for (const auto& pair : sessions)
-{
-std::shared_ptr session = pair.second;
-try
-{
-// Notify the client and disconnect.
-session->sendMessage(msg);
-
session->shutdown(WebSocketHandler::StatusCodes::ENDPOINT_GOING_AWAY, 
"recycling");
-
-// Remove session, save, and mark to destroy.
-removeSession(session->getId(), true);
-}
-catch (const std::exception& exc)
-{
-LOG_WRN("Error while shutting down client [" <<
-session->getName() << "]: " << exc.what());
-}
-}
+closeReason = "recycling";
+shutdownClients(closeReason);
 }
 else if (AutoSaveEnabled && !_stop &&
  std::chrono::duration_cast(now - 
last30SecCheckTime).count() >= 30)
@@ -281,6 +260,7 @@ void DocumentBroker::pollThread()
 {
 LOG_INF("Term

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/main.js loleaflet/node_shrinkwrap loleaflet/npm-shrinkwrap.json loleaflet/package.json loleaflet/src

2017-05-23 Thread Pranav Kant
 loleaflet/main.js  |1 
 loleaflet/node_shrinkwrap/autolinker-1.4.3.tgz |binary
 loleaflet/npm-shrinkwrap.json  | 1163 +
 loleaflet/package.json |1 
 loleaflet/src/layer/marker/Annotation.js   |   12 
 5 files changed, 814 insertions(+), 363 deletions(-)

New commits:
commit 1ab416046af0a0121d8e11840446f77de27205b7
Author: Pranav Kant 
Date:   Mon Apr 24 19:59:16 2017 +0530

loleaflet: new dependency - autolinker - link what can be linked

... in annotations. Emails, phone numbers, email address and what not.
We are not sending the generated markup, eg: the html  tags back to
LO core, only the representation in the UI is linkified.

Autolinker license: MIT
https://www.npmjs.com/package/autolinker

(cherry picked from commit 3a10c480139d0c499853df01f6bf5ae347656e7c)
and
(cherry picked from commit 7486f44ee1beada574906ae31a551b8c45af370e)

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

diff --git a/loleaflet/main.js b/loleaflet/main.js
index fac14aaa..fed59570 100644
--- a/loleaflet/main.js
+++ b/loleaflet/main.js
@@ -18,6 +18,7 @@ require('smartmenus');
 require('jquery-ui');
 require('jquery-contextmenu');
 require('timeago');
+global.Autolinker = require('autolinker');
 // FIXME: would be good to remove w2ui script tags and require
 // like other modules. problem is that w2ui doesn't export
 // its global variables for a module, so following doesn't work
diff --git a/loleaflet/node_shrinkwrap/autolinker-1.4.3.tgz 
b/loleaflet/node_shrinkwrap/autolinker-1.4.3.tgz
new file mode 100644
index ..5f95aa19
Binary files /dev/null and b/loleaflet/node_shrinkwrap/autolinker-1.4.3.tgz 
differ
diff --git a/loleaflet/npm-shrinkwrap.json b/loleaflet/npm-shrinkwrap.json
index 4e7f71d8..8c8d46ae 100644
--- a/loleaflet/npm-shrinkwrap.json
+++ b/loleaflet/npm-shrinkwrap.json
@@ -2,91 +2,93 @@
   "name": "loleaflet",
   "version": "0.8.0-dev",
   "dependencies": {
+"autolinker": {
+  "version": "1.4.3",
+  "from": "autolinker@latest",
+  "resolved": "./node_shrinkwrap/autolinker-1.4.3.tgz",
+  "dev": true
+},
 "bootstrap": {
   "version": "3.3.6",
   "from": "node_shrinkwrap/bootstrap-3.3.6.tgz",
-  "resolved": "./node_shrinkwrap/bootstrap-3.3.6.tgz"
+  "resolved": "./node_shrinkwrap/bootstrap-3.3.6.tgz",
+  "dev": true
 },
 "browserify": {
   "version": "13.1.0",
   "from": "node_shrinkwrap/browserify-13.1.0.tgz",
   "resolved": "./node_shrinkwrap/browserify-13.1.0.tgz",
+  "dev": true,
   "dependencies": {
-"JSONStream": {
-  "version": "1.1.4",
-  "from": "node_shrinkwrap/JSONStream-1.1.4.tgz",
-  "resolved": "./node_shrinkwrap/JSONStream-1.1.4.tgz",
-  "dependencies": {
-"jsonparse": {
-  "version": "1.2.0",
-  "from": "node_shrinkwrap/jsonparse-1.2.0.tgz",
-  "resolved": "./node_shrinkwrap/jsonparse-1.2.0.tgz"
-},
-"through": {
-  "version": "2.3.8",
-  "from": "node_shrinkwrap/through-2.3.8.tgz",
-  "resolved": "./node_shrinkwrap/through-2.3.8.tgz"
-}
-  }
-},
 "assert": {
   "version": "1.3.0",
   "from": "node_shrinkwrap/assert-1.3.0.tgz",
-  "resolved": "./node_shrinkwrap/assert-1.3.0.tgz"
+  "resolved": "./node_shrinkwrap/assert-1.3.0.tgz",
+  "dev": true
 },
 "browser-pack": {
   "version": "6.0.1",
   "from": "node_shrinkwrap/browser-pack-6.0.1.tgz",
   "resolved": "./node_shrinkwrap/browser-pack-6.0.1.tgz",
+  "dev": true,
   "dependencies": {
 "combine-source-map": {
   "version": "0.7.2",
   "from": "node_shrinkwrap/combine-source-map-0.7.2.tgz",
   "resolved": "./node_shrinkwrap/combine-source-map-0.7.2.tgz",
+  "dev": true,
   "dependencies": {
 "convert-source-map": {
   "version": "1.1.3",
   "from": "node_shrinkwrap/convert-source-map-1.1.3.tgz",
-  "resolved": "./node_shrinkwrap/convert-source-map-1.1.3.tgz"
+  "resolved": "./node_shrinkwrap/convert-source-map-1.1.3.tgz",
+  "dev": true
 },
 "inline-source-map": {
   "version": "0.6.2",
   "from": "node_shrinkwrap/inline-source-map-0.6.2.tgz",
-  "resolved": "./node_shrinkwrap/inline-source-map-0.6.2.tgz"
+  "resolved": "./node_shrinkwrap/inline-source-map-0.6.2.tgz",
+  "dev": true
 },
 "lodash.memoize": {
   

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

2017-05-23 Thread Eike Rathke
 sc/source/core/inc/interpre.hxx  |2 
 sc/source/core/tool/interpr1.cxx |   87 +--
 2 files changed, 66 insertions(+), 23 deletions(-)

New commits:
commit 6a6aa56b45f19c250e9c4111b478203ddb75478b
Author: Eike Rathke 
Date:   Tue May 23 10:39:25 2017 +0200

Handle SUMIF and AVERAGEIF with array of references, tdf#58874

Change-Id: I37bad7b85ee61631399f1b49d0bc9be3b8d00423

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 51ddade6e1e8..e5ba5ede6b0c 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5115,6 +5115,10 @@ void ScInterpreter::IterateParametersIf( ScIterFuncIf 
eFunc )
 double fCount = 0.0;
 bool bNull = true;
 short nParam = 1;
+const SCSIZE nMatRows = GetRefListArrayMaxSize( nParam);
+// There's either one RefList and nothing else, or none.
+ScMatrixRef xResMat = (nMatRows ? GetNewMat( 1, nMatRows) : nullptr);
+SCSIZE nRefListArrayPos = 0;
 size_t nRefInList = 0;
 while (nParam-- > 0)
 {
@@ -5130,10 +5134,12 @@ void ScInterpreter::IterateParametersIf( ScIterFuncIf 
eFunc )
 case svRefList :
 if (bSumExtraRange)
 {
+/* TODO: this could resolve if all refs are of the same 
size */
 SetError( FormulaError::IllegalParameter);
 }
 else
 {
+nRefListArrayPos = nRefInList;
 ScRange aRange;
 PopDoubleRef( aRange, nParam, nRefInList);
 aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
@@ -5370,14 +5376,28 @@ void ScInterpreter::IterateParametersIf( ScIterFuncIf 
eFunc )
 PushError( FormulaError::IllegalParameter);
 return;
 }
-}
 
-switch( eFunc )
-{
-case ifSUMIF: fRes = ::rtl::math::approxAdd( fSum, fMem ); break;
-case ifAVERAGEIF: fRes = div( ::rtl::math::approxAdd( fSum, fMem ), 
fCount); break;
+switch( eFunc )
+{
+case ifSUMIF: fRes = ::rtl::math::approxAdd( fSum, fMem ); 
break;
+case ifAVERAGEIF: fRes = div( ::rtl::math::approxAdd( fSum, fMem 
), fCount); break;
+}
+if (xResMat)
+{
+if (nGlobalError == FormulaError::NONE)
+xResMat->PutDouble( fRes, 0, nRefListArrayPos);
+else
+{
+xResMat->PutError( nGlobalError, 0, nRefListArrayPos);
+nGlobalError = FormulaError::NONE;
+}
+fRes = fSum = fMem = fCount = 0.0;
+}
 }
-PushDouble( fRes);
+if (xResMat)
+PushMatrix( xResMat);
+else
+PushDouble( fRes);
 }
 
 void ScInterpreter::ScSumIf()
commit 44a1f0c17d3c5b212ff60b2f24f50693b3da9eab
Author: Eike Rathke 
Date:   Tue May 23 01:28:13 2017 +0200

Move pushing result token into IterateParametersIf(), tdf#58874

Change-Id: I98c52784992f5734480736ce4f8290490ca752f1

diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 9e5de664d0dc..8e6d89206c3a 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -596,7 +596,7 @@ void ScColumn();
 void ScRow();
 void ScSheet();
 void ScMatch();
-double IterateParametersIf( ScIterFuncIf );
+void IterateParametersIf( ScIterFuncIf );
 void ScCountIf();
 void ScSumIf();
 void ScAverageIf();
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 12aa11b97bbf..51ddade6e1e8 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -4967,11 +4967,14 @@ void ScInterpreter::ScCountEmptyCells()
 }
 }
 
-double ScInterpreter::IterateParametersIf( ScIterFuncIf eFunc )
+void ScInterpreter::IterateParametersIf( ScIterFuncIf eFunc )
 {
 sal_uInt8 nParamCount = GetByte();
 if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
-return 0;
+{
+PushError( nGlobalError);
+return;
+}
 
 SCCOL nCol3 = 0;
 SCROW nRow3 = 0;
@@ -4994,8 +4997,8 @@ double ScInterpreter::IterateParametersIf( ScIterFuncIf 
eFunc )
 PopDoubleRef( nCol3, nRow3, nTab3, nColJunk, nRowJunk, 
nTabJunk );
 if ( nTabJunk != nTab3 )
 {
-SetError( FormulaError::IllegalParameter);
-return 0;
+PushError( FormulaError::IllegalParameter);
+return;
 }
 }
 break;
@@ -5012,7 +5015,10 @@ double ScInterpreter::IterateParametersIf( ScIterFuncIf 
eFunc )
 ScExternalRefCache::TokenRef pToken;
 PopExternalSingleRef(pToken);
 if (nGlobalError != FormulaError::NONE)
-return 0;
+{
+   

[Libreoffice-commits] core.git: Makefile.fetch Makefile.in

2017-05-23 Thread Michael Stahl
 Makefile.fetch |2 +-
 Makefile.in|2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit fe3fb5ecd3b66e32cc5aa64a2afffa572353740e
Author: Michael Stahl 
Date:   Mon May 22 17:21:51 2017 +0200

Makefile: try to fix downloading externals for build platform

When cross-compiling, it's possible that an external is only used on
the build platform and not the host platform.  Attempt to fix this by
invoking "make fetch" twice; it looks like this should not be
combined with the exising "build-tools" invocation because that needs to
be delayed until everything is fetched.

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

diff --git a/Makefile.fetch b/Makefile.fetch
index 3b0cf56facd6..25c77f5a02cd 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -96,7 +96,7 @@ endef
 
 download: $(WORKDIR)/download
 
-$(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst 
$(SRCDIR)/Makefile.fetch
+$(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst 
$(SRCDIR)/Makefile.fetch
-@mkdir -p $(TARFILE_LOCATION)/tmp
@date >> $(fetch_LOGFILE)
$(foreach item, \
diff --git a/Makefile.in b/Makefile.in
index 0af8a53373a3..63c404fce3be 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -275,6 +275,8 @@ help showmodules gbuildtojson:
$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f 
$(SRCDIR)/Makefile.gbuild $@
 
 cross-toolset: bootstrap fetch
+   # fetch again in case there are externals only needed on build platform
+   $(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f 
$(SRCDIR)/Makefile fetch
$(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f 
$(SRCDIR)/Makefile.gbuild build-tools
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Miklos Vajna
 include/oox/helper/graphichelper.hxx |3 +++
 oox/source/helper/graphichelper.cxx  |   28 
 oox/source/ppt/pptimport.cxx |   16 
 3 files changed, 39 insertions(+), 8 deletions(-)

New commits:
commit 04e27df3c162f1df02f061b94434a38d1eaa3a46
Author: Miklos Vajna 
Date:   Tue May 23 09:25:37 2017 +0200

oox: add GraphicHelper::importEmbeddedGraphics()

Similar to GraphicHelper::importEmbeddedGraphic(), but it takes a list
of image paths to import.

Change-Id: I11b670a0b2c693540054c78be2cee3835477b7e6
Reviewed-on: https://gerrit.libreoffice.org/37938
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/include/oox/helper/graphichelper.hxx 
b/include/oox/helper/graphichelper.hxx
index 41a1ed76aac1..3102585ed881 100644
--- a/include/oox/helper/graphichelper.hxx
+++ b/include/oox/helper/graphichelper.hxx
@@ -124,6 +124,9 @@ public:
 const OUString& rStreamName,
 const WMF_EXTERNALHEADER* pExtHeader = nullptr ) 
const;
 
+/** Imports graphics from the storage with the passed stream names. */
+void importEmbeddedGraphics(const std::vector& rStreamNames) 
const;
+
 /** Creates a persistent graphic object from the passed graphic.
 @return  The URL of the created and internally cached graphic object. 
*/
 OUString createGraphicObject(
diff --git a/oox/source/helper/graphichelper.cxx 
b/oox/source/helper/graphichelper.cxx
index f4ac89353b57..abe062cc82f4 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -274,6 +274,34 @@ Reference< XGraphic > GraphicHelper::importGraphic( const 
StreamDataSequence& rG
 return xGraphic;
 }
 
+void GraphicHelper::importEmbeddedGraphics(const std::vector& 
rStreamNames) const
+{
+// Don't actually return anything, just fill maEmbeddedGraphics.
+
+// Input stream -> stream name map.
+std::map< uno::Reference, OUString > aStreamNames;
+
+for (const auto& rStreamName : rStreamNames)
+{
+if(rStreamName.isEmpty())
+{
+SAL_WARN("oox", "GraphicHelper::importEmbeddedGraphics - empty 
stream name");
+continue;
+}
+
+EmbeddedGraphicMap::const_iterator aIt = 
maEmbeddedGraphics.find(rStreamName);
+if (aIt == maEmbeddedGraphics.end())
+aStreamNames[mxStorage->openInputStream(rStreamName)] = 
rStreamName;
+}
+
+for (const auto& rStream : aStreamNames)
+{
+uno::Reference xGraphic = 
importGraphic(rStream.first);
+if (xGraphic.is())
+maEmbeddedGraphics[rStream.second] = xGraphic;
+}
+}
+
 Reference< XGraphic > GraphicHelper::importEmbeddedGraphic( const OUString& 
rStreamName, const WMF_EXTERNALHEADER* pExtHeader ) const
 {
 Reference< XGraphic > xGraphic;
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
index 74285e7dbe97..474abb6278e2 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -100,7 +100,13 @@ static void visitRelations(PowerPointImport& rImport, 
core::RelationsRef pRelati
 if (core::RelationsRef pImages = 
pFragmentRelations->getRelationsFromTypeFromOfficeDoc("image"))
 {
 for (const auto& rImage : *pImages)
-
rImageFragments.push_back(pImages->getFragmentPathFromRelation(rImage.second));
+{
+OUString aPath = 
pImages->getFragmentPathFromRelation(rImage.second);
+// Safe subset: e.g. WMF may have an external header 
from the
+// referencing fragment.
+if (aPath.endsWith(".jpg") || aPath.endsWith(".jpeg"))
+rImageFragments.push_back(aPath);
+}
 }
 
 // See if the fragment has a slide layout, and recurse.
@@ -130,13 +136,7 @@ bool PowerPointImport::importDocument()
 visitRelations(*this, pFragmentRelations, "slide", aImageFragments);
 visitRelations(*this, pFragmentRelations, "slideMaster", 
aImageFragments);
 
-for (const auto& rImage : aImageFragments)
-{
-// Safe subset: e.g. WMF may have an external header from the
-// referencing fragment.
-if (rImage.endsWith(".jpg") || rImage.endsWith(".jpeg"))
-getGraphicHelper().importEmbeddedGraphic(rImage);
-}
+getGraphicHelper().importEmbeddedGraphics(aImageFragments);
 }
 
 bool bRet = importFragment(xPresentationFragmentHandler);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp wsd/LOOLWSD.cpp

2017-05-23 Thread Ashod Nakashian
 wsd/DocumentBroker.cpp |   29 -
 wsd/DocumentBroker.hpp |3 +++
 wsd/LOOLWSD.cpp|6 +++---
 3 files changed, 30 insertions(+), 8 deletions(-)

New commits:
commit af0011b2b65c7237b69c1a47a31b77f6f872ffbf
Author: Ashod Nakashian 
Date:   Mon May 22 15:04:35 2017 -0400

wsd: don't stop doc on unauthorized loading

When a client connects with expired/invalid
access_token, the document should remain
active for other/existing clients, if any.

However, if no clients exists (i.e. the
first client has invalid access_token),
then the document should be unloaded and
cleaned up.

Reviewed-on: https://gerrit.libreoffice.org/37916
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit e877adc84bc6f90bcfa52f9f63666358e6614885)

Change-Id: Iaad95a4286325cc6ee130b37e3ad635993a71c72
Reviewed-on: https://gerrit.libreoffice.org/37918
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 5b6fb3c7..4ddab06b 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -801,6 +801,25 @@ std::string DocumentBroker::getJailRoot() const
 
 size_t DocumentBroker::addSession(const std::shared_ptr& 
session)
 {
+try
+{
+return addSessionInternal(session);
+}
+catch (const std::exception& exc)
+{
+LOG_ERR("Failed to add session to [" << _docKey << "] with URI [" << 
session->getPublicUri().toString() << "]: " << exc.what());
+if (_sessions.empty())
+{
+LOG_INF("Doc [" << _docKey << "] has no more sessions. Marking to 
destroy.");
+_markToDestroy = true;
+}
+
+throw;
+}
+}
+
+size_t DocumentBroker::addSessionInternal(const 
std::shared_ptr& session)
+{
 assertCorrectThread();
 
 try
@@ -831,12 +850,7 @@ size_t DocumentBroker::addSession(const 
std::shared_ptr& session)
 _markToDestroy = false;
 _stop = false;
 
-// Add and attach the session.
-_sessions.emplace(session->getId(), session);
-session->setAttached();
-
 const auto id = session->getId();
-const auto count = _sessions.size();
 
 // Request a new session from the child kit.
 const std::string aMessage = "session " + id + ' ' + _docKey + ' ' + 
_docId;
@@ -845,6 +859,11 @@ size_t DocumentBroker::addSession(const 
std::shared_ptr& session)
 // Tell the admin console about this new doc
 Admin::instance().addDoc(_docKey, getPid(), getFilename(), id);
 
+// Add and attach the session.
+_sessions.emplace(session->getId(), session);
+session->setAttached();
+
+const auto count = _sessions.size();
 LOG_TRC("Added " << (session->isReadOnly() ? "readonly" : "non-readonly") 
<<
 " session [" << id << "] to docKey [" <<
 _docKey << "] to have " << count << " sessions.");
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 46481cba..4fe17501 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -346,6 +346,9 @@ private:
 /// Saves the doc to the storage.
 bool saveToStorageInternal(const std::string& sesionId, bool success, 
const std::string& result = "");
 
+/// Loads a new session and adds to the sessions container.
+size_t addSessionInternal(const std::shared_ptr& session);
+
 /// Removes a session by ID. Returns the new number of sessions.
 size_t removeSessionInternal(const std::string& id);
 
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 03ed228f..5f9fd929 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1543,6 +1543,7 @@ private:
 {
 auto socket = _socket.lock();
 std::vector& in = socket->_inBuffer;
+LOG_TRC("#" << socket->getFD() << " handling incoming " << in.size() 
<< " bytes.");
 
 // Find the end of the header, if any.
 static const std::string marker("\r\n\r\n");
@@ -1619,6 +1620,7 @@ private:
 Admin::instance().insertNewSocket(moveSocket);
 });
 }
+
 }
 // Client post and websocket connections
 else if ((request.getMethod() == HTTPRequest::HTTP_GET ||
@@ -1869,7 +1871,7 @@ private:
 
 docBroker->addCallback([docBroker, moveSocket, 
clientSession, format]()
 {
-   auto streamSocket = 
std::static_pointer_cast(moveSocket);
+auto streamSocket = 
std::static_pointer_cast(moveSocket);
 clientSession->setSaveAsSocket(streamSocket);
 
 // Move the socket into DocBroker.
@@ -2113,14 +2115,12 @@ private:
 LOG_ERR("Unauthorized Request while loading 
session for " << docBroker->getDocKey() << ": " << exc.what());
 const std::string msg = "error

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

2017-05-23 Thread Gabor Kelemen
 source/text/shared/optionen/mailmerge.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 78931b6027223617d44a209378c88161345eb21d
Author: Gabor Kelemen 
Date:   Tue May 23 07:35:55 2017 +0200

tdf#102930 Fix missing ahelp

Change-Id: Idc360a4e6fd1c13a1e640121159d1227d7feb601
Reviewed-on: https://gerrit.libreoffice.org/37935
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/source/text/shared/optionen/mailmerge.xhp 
b/source/text/shared/optionen/mailmerge.xhp
index ae17ac2c8..5999a6bf4 100644
--- a/source/text/shared/optionen/mailmerge.xhp
+++ b/source/text/shared/optionen/mailmerge.xhp
@@ -33,7 +33,7 @@
 
 
 Mail Merge E-mail
-Specifies the 
user information and server settings for when you send form letters as e-mail 
messages.
+Specifies the user information and server settings for when you send 
form letters as e-mail messages.
 
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - helpcontent2

2017-05-23 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ea224bbcdc94bd9bf6a57e57150e78c408926e7e
Author: Gabor Kelemen 
Date:   Tue May 23 07:35:55 2017 +0200

Updated core
Project: help  78931b6027223617d44a209378c88161345eb21d

tdf#102930 Fix missing ahelp

Change-Id: Idc360a4e6fd1c13a1e640121159d1227d7feb601
Reviewed-on: https://gerrit.libreoffice.org/37935
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/helpcontent2 b/helpcontent2
index 9cafc343bfe9..78931b602722 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 9cafc343bfe9c3c4e3edd29cfc14da2ebbe895c3
+Subproject commit 78931b6027223617d44a209378c88161345eb21d
commit 523619bbc34ff2f8251504f8919ada879dcd88a4
Author: Gabor Kelemen 
Date:   Mon May 22 22:28:37 2017 +0200

Updated core
Project: help  9cafc343bfe9c3c4e3edd29cfc14da2ebbe895c3

Fix more bookmarks one ahelp on the track changes Filter page

Here we need the magic dot as ahelp id

Change-Id: I9991afeae940a0bf0415118353dde8de3d68eede
Reviewed-on: https://gerrit.libreoffice.org/37934
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/helpcontent2 b/helpcontent2
index bb6df706e558..9cafc343bfe9 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit bb6df706e558e0a8a617541352b11fc075d20f03
+Subproject commit 9cafc343bfe9c3c4e3edd29cfc14da2ebbe895c3
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-05-23 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit efc9e4e37f37f2766655c2d6cb0d4489e56257f7
Author: Gabor Kelemen 
Date:   Mon May 22 22:27:09 2017 +0200

Updated core
Project: help  bb6df706e558e0a8a617541352b11fc075d20f03

Change bogus paragraph role relatedtopics to paragraph

Change-Id: I561cceb2579abf01c3239304dd9aba88235545e6
Reviewed-on: https://gerrit.libreoffice.org/37933
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/helpcontent2 b/helpcontent2
index 3106a05e988e..bb6df706e558 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 3106a05e988e7ed831840b47e8ecbf2961d34d94
+Subproject commit bb6df706e558e0a8a617541352b11fc075d20f03
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Gabor Kelemen
 source/text/shared/01/02230200.xhp |2 +-
 source/text/shared/01/02230402.xhp |   12 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 9cafc343bfe9c3c4e3edd29cfc14da2ebbe895c3
Author: Gabor Kelemen 
Date:   Mon May 22 22:28:37 2017 +0200

Fix more bookmarks one ahelp on the track changes Filter page

Here we need the magic dot as ahelp id

Change-Id: I9991afeae940a0bf0415118353dde8de3d68eede
Reviewed-on: https://gerrit.libreoffice.org/37934
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/source/text/shared/01/02230402.xhp 
b/source/text/shared/01/02230402.xhp
index 1f5e6f32f..24344fbd2 100644
--- a/source/text/shared/01/02230402.xhp
+++ b/source/text/shared/01/02230402.xhp
@@ -44,7 +44,7 @@
 
 
 Date
-Filters the list of changes according to 
the date and the time that you specify.
+Filters the list of changes according to the date and the time that you 
specify.
 
 Set Date/Time
 
@@ -55,17 +55,17 @@

 
 
-Enters the current date and time into 
the corresponding boxes.
+Enters the current date and time into the corresponding 
boxes.
 
 
 
 
 Author
-Filters the list of changes according 
to the name of the author that you select from the list.
+Filters the list of changes according to the name of the author that 
you select from the list.
 
 Range 
 
-Filters the list of changes according 
to the range of cells that you specify. To select a range of cells in your 
sheet, click the Set Reference button (...).
+Filters the list of 
changes according to the range of cells that you specify. To select a range of 
cells in your sheet, click the Set Reference button 
(...).
 
 Select 
the range of cells that you want to use as a filter.
 Set Reference 
@@ -105,11 +105,11 @@
 
 Action 
 
-Filters the list of changes according 
to the type of change that you select in the Action box.
+Filters the list of 
changes according to the type of change that you select in the 
Action box.
 
 
 Comment
-Filters the comments of the changes 
according to the keyword(s) that you enter. 
+Filters the comments of the changes according to the keyword(s) that 
you enter. 
 You can also use 
regular 
expressions (wildcards) when you filter the comments.
 
 
commit bb6df706e558e0a8a617541352b11fc075d20f03
Author: Gabor Kelemen 
Date:   Mon May 22 22:27:09 2017 +0200

Change bogus paragraph role relatedtopics to paragraph

Change-Id: I561cceb2579abf01c3239304dd9aba88235545e6
Reviewed-on: https://gerrit.libreoffice.org/37933
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/source/text/shared/01/02230200.xhp 
b/source/text/shared/01/02230200.xhp
index cc86b27c4..d87c7df66 100644
--- a/source/text/shared/01/02230200.xhp
+++ b/source/text/shared/01/02230200.xhp
@@ -59,7 +59,7 @@
 
 Show rejected 
changes 
 
-Shows or hides the 
changes that were rejected.
+Shows or hides the 
changes that were rejected.
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Gabor Kelemen
 AllLangHelp_swriter.mk   |1 
 source/text/shared/guide/macro_recording.xhp |2 -
 source/text/shared/main0212.xhp  |6 ++--
 source/text/swriter/01/0599.xhp  |   37 ---
 4 files changed, 4 insertions(+), 42 deletions(-)

New commits:
commit 3106a05e988e7ed831840b47e8ecbf2961d34d94
Author: Gabor Kelemen 
Date:   Mon May 22 21:39:47 2017 +0200

Convert bogus head2 roles to "heading level 2" roles

Change-Id: I911bcf79b2ce0f0d8812f8756260861b95624b3b
Reviewed-on: https://gerrit.libreoffice.org/37932
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/source/text/shared/guide/macro_recording.xhp 
b/source/text/shared/guide/macro_recording.xhp
index fad4de902..dc7746718 100644
--- a/source/text/shared/guide/macro_recording.xhp
+++ b/source/text/shared/guide/macro_recording.xhp
@@ -66,7 +66,7 @@
 Click 
Save.
 
 
-Limitations of the 
macro recorder
+Limitations of the macro recorder
 The following 
actions are not recorded:
 
 
diff --git a/source/text/shared/main0212.xhp b/source/text/shared/main0212.xhp
index 653e10c39..313989a5a 100644
--- a/source/text/shared/main0212.xhp
+++ b/source/text/shared/main0212.xhp
@@ -79,13 +79,13 @@
   
   
 
-Data to Text
+Data to Text
   Inserts all fields of the marked record into the current document at 
the cursor position.
   
   
   
 Help ID is here because 
we need it in shared since the F4 browser has another context "sdatabase" so I 
had to move the Help ID from the swriter folder
-Mail Merge
+Mail Merge
   Starts the Mail Merge Wizard to create form letters.
   
   
@@ -93,4 +93,4 @@
   
   

-
\ No newline at end of file
+
commit 2c1173b8ad3225b52e51545b6339a0fe7b9dc577
Author: Gabor Kelemen 
Date:   Fri May 19 00:37:31 2017 +0200

Remove an empty page Styles

A comment said "to be deleted" :)

Change-Id: I025701664b7b8c6d1691941393a09bd72b43a1b7
Reviewed-on: https://gerrit.libreoffice.org/37931
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/AllLangHelp_swriter.mk b/AllLangHelp_swriter.mk
index cc37c7366..adf416fa5 100644
--- a/AllLangHelp_swriter.mk
+++ b/AllLangHelp_swriter.mk
@@ -154,7 +154,6 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,swriter,\
 helpcontent2/source/text/swriter/01/0517 \
 helpcontent2/source/text/swriter/01/0519 \
 helpcontent2/source/text/swriter/01/0520 \
-helpcontent2/source/text/swriter/01/0599 \
 helpcontent2/source/text/swriter/01/0603 \
 helpcontent2/source/text/swriter/01/0604 \
 helpcontent2/source/text/swriter/01/0606 \
diff --git a/source/text/swriter/01/0599.xhp 
b/source/text/swriter/01/0599.xhp
deleted file mode 100644
index 7973c1acf..0
--- a/source/text/swriter/01/0599.xhp
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-   
-
-
-
-Styles
-/text/swriter/01/0599.xhp
-
-
-Sun Microsystems, Inc.
-
-
-
-
-Stylesto be 
deleted
-
-
-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-05-23 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 35869de80d2e40fc095572d71025fa401bb832a5
Author: Gabor Kelemen 
Date:   Mon May 22 21:39:47 2017 +0200

Updated core
Project: help  3106a05e988e7ed831840b47e8ecbf2961d34d94

Convert bogus head2 roles to "heading level 2" roles

Change-Id: I911bcf79b2ce0f0d8812f8756260861b95624b3b
Reviewed-on: https://gerrit.libreoffice.org/37932
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/helpcontent2 b/helpcontent2
index 2c1173b8ad32..3106a05e988e 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 2c1173b8ad3225b52e51545b6339a0fe7b9dc577
+Subproject commit 3106a05e988e7ed831840b47e8ecbf2961d34d94
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-05-23 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c94c9ab7bcbf3a73d6b14396fd51783b95237246
Author: Gabor Kelemen 
Date:   Fri May 19 00:37:31 2017 +0200

Updated core
Project: help  2c1173b8ad3225b52e51545b6339a0fe7b9dc577

Remove an empty page Styles

A comment said "to be deleted" :)

Change-Id: I025701664b7b8c6d1691941393a09bd72b43a1b7
Reviewed-on: https://gerrit.libreoffice.org/37931
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/helpcontent2 b/helpcontent2
index ead4207b4a6f..2c1173b8ad32 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ead4207b4a6f7ae49ecf9b80a598ecd0fafe7304
+Subproject commit 2c1173b8ad3225b52e51545b6339a0fe7b9dc577
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-05-23 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit efa6203229bf549e9efae79dce943c2268b27c00
Author: Gabor Kelemen 
Date:   Fri May 19 00:09:35 2017 +0200

Updated core
Project: help  98f16894574b039fc5e7ead6934aa4a0488472b0

tdf#107229 Fix reference to the Save as Template menu item

Drop bookmark and ahelp related to old OOo template manager window
Also fix a reference to the Styles and Formatting sidebar

Change-Id: Icfe056ee32e38b45f11f33b65f85c24b05a32107
Reviewed-on: https://gerrit.libreoffice.org/37929
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/helpcontent2 b/helpcontent2
index 0351604e8d6b..98f16894574b 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 0351604e8d6b4e3d797bdf742ff81377eee46b96
+Subproject commit 98f16894574b039fc5e7ead6934aa4a0488472b0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-05-23 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1f33f8ac5f286f8564b36ff922d15bdeb8445497
Author: Gabor Kelemen 
Date:   Fri May 19 00:14:31 2017 +0200

Updated core
Project: help  ead4207b4a6f7ae49ecf9b80a598ecd0fafe7304

Drop an obsolete and a redundant bookmark

Change-Id: I80b0d269def0dc700e6f6da6c76502d78f30fac4
Reviewed-on: https://gerrit.libreoffice.org/37930
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/helpcontent2 b/helpcontent2
index 98f16894574b..ead4207b4a6f 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 98f16894574b039fc5e7ead6934aa4a0488472b0
+Subproject commit ead4207b4a6f7ae49ecf9b80a598ecd0fafe7304
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-23 Thread Gabor Kelemen
 source/text/shared/01/digitalsignatures.xhp |2 --
 source/text/swriter/01/0513.xhp |8 
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit ead4207b4a6f7ae49ecf9b80a598ecd0fafe7304
Author: Gabor Kelemen 
Date:   Fri May 19 00:14:31 2017 +0200

Drop an obsolete and a redundant bookmark

Change-Id: I80b0d269def0dc700e6f6da6c76502d78f30fac4
Reviewed-on: https://gerrit.libreoffice.org/37930
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/source/text/shared/01/digitalsignatures.xhp 
b/source/text/shared/01/digitalsignatures.xhp
index 6ed7881ac..de1538ca1 100644
--- a/source/text/shared/01/digitalsignatures.xhp
+++ b/source/text/shared/01/digitalsignatures.xhp
@@ -30,8 +30,6 @@
   
   
 
-
-
 Digital 
Signatures
  Adds and removes digital signatures to and from your document. You can 
also use the dialog to view certificates.
   
commit 98f16894574b039fc5e7ead6934aa4a0488472b0
Author: Gabor Kelemen 
Date:   Fri May 19 00:09:35 2017 +0200

tdf#107229 Fix reference to the Save as Template menu item

Drop bookmark and ahelp related to old OOo template manager window
Also fix a reference to the Styles and Formatting sidebar

Change-Id: Icfe056ee32e38b45f11f33b65f85c24b05a32107
Reviewed-on: https://gerrit.libreoffice.org/37929
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/source/text/swriter/01/0513.xhp 
b/source/text/swriter/01/0513.xhp
index 91896e4c2..0061fcc44 100644
--- a/source/text/swriter/01/0513.xhp
+++ b/source/text/swriter/01/0513.xhp
@@ -40,12 +40,12 @@
 Styles 
in Writer
 
 UFI: this is no more "Style Catalog" dialog, but we 
need the links and tablesUFI: another comment: the Style 
Catalog can be customized to be visible again!!! Dont know it this is temporary 
bug, workaround, or feature
-The following 
information concerns Writer styles that you can apply using the Styles and Formatting 
window.
+The following 
information concerns Writer styles that you can apply using the Styles and Formatting deck of the 
Sidebar.
 
-If you want, 
you can edit the styles of the current document, and then save the document as 
a template. To save the document as template, choose File - Templates - 
Save.
-
+If you want, 
you can edit the styles of the current document, and then save the document as 
a template. To save the document as template, choose File - Templates - Save as Template.
+
 Style 
Category
-These are the different categories 
of formatting styles.
+These are the 
different categories of formatting styles.
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: chart2/source compilerplugins/clang forms/source hwpfilter/source include/sfx2 include/svl include/unotools include/vcl sc/inc sc/source sd/source sfx2/source solenv/Co

2017-05-23 Thread Noel Grandin
 chart2/source/view/axes/VPolarAngleAxis.cxx   |6 +--
 chart2/source/view/axes/VPolarAxis.cxx|4 --
 chart2/source/view/axes/VPolarAxis.hxx|3 +
 chart2/source/view/axes/VPolarGrid.cxx|6 +--
 chart2/source/view/axes/VPolarGrid.hxx|3 +
 chart2/source/view/axes/VPolarRadiusAxis.cxx  |2 -
 compilerplugins/clang/test/useuniqueptr.cxx   |   20 ++
 compilerplugins/clang/useuniqueptr.cxx|   26 +++---
 forms/source/component/propertybaghelper.cxx  |   11 ++---
 forms/source/inc/propertybaghelper.hxx|4 +-
 hwpfilter/source/hinfo.cxx|6 +--
 hwpfilter/source/hinfo.h  |3 +
 include/sfx2/sfxbasemodel.hxx |4 +-
 include/svl/poolitem.hxx  |3 +
 include/unotools/options.hxx  |1 
 include/vcl/field.hxx |2 -
 sc/inc/compiler.hxx   |3 +
 sc/source/core/tool/compiler.cxx  |4 --
 sd/source/ui/app/optsitem.cxx |   19 --
 sd/source/ui/inc/optsitem.hxx |7 +++
 sfx2/source/doc/sfxbasemodel.cxx  |   20 +++---
 solenv/CompilerTest_compilerplugins_clang.mk  |1 
 svl/source/items/sitem.cxx|1 
 svtools/inc/vclxaccessibleheaderbaritem.hxx   |1 
 svtools/source/contnr/imivctl.hxx |2 -
 svtools/source/contnr/imivctl2.cxx|   14 ++-
 svtools/source/control/vclxaccessibleheaderbaritem.cxx|4 --
 svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx|3 +
 svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx |4 --
 sw/source/core/doc/DocumentLayoutManager.cxx  |8 +---
 sw/source/core/doc/DocumentListItemsManager.cxx   |3 -
 sw/source/core/inc/DocumentLayoutManager.hxx  |3 +
 sw/source/core/inc/DocumentListItemsManager.hxx   |3 +
 sw/source/filter/ww8/wrtww8.cxx   |2 -
 sw/source/filter/ww8/wrtww8.hxx   |2 -
 unotools/source/config/options.cxx|7 +++
 vcl/source/control/field2.cxx |7 +--
 37 files changed, 121 insertions(+), 101 deletions(-)

New commits:
commit d1e47b1428abf1732ab4d5e219b210760d4152e0
Author: Noel Grandin 
Date:   Mon May 22 13:25:58 2017 +0200

enhance useuniqueptr loplugin

teach it to look for the following sequence in a destructor:
delete m_pfoo;
m_pfoo = nullptr;

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

diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx 
b/chart2/source/view/axes/VPolarAngleAxis.cxx
index c5d6b62ded37..9186a4643c6b 100644
--- a/chart2/source/view/axes/VPolarAngleAxis.cxx
+++ b/chart2/source/view/axes/VPolarAngleAxis.cxx
@@ -44,8 +44,6 @@ VPolarAngleAxis::VPolarAngleAxis( const AxisProperties& 
rAxisProperties
 
 VPolarAngleAxis::~VPolarAngleAxis()
 {
-delete m_pPosHelper;
-m_pPosHelper = nullptr;
 }
 
 bool VPolarAngleAxis::createTextShapes_ForAngleAxis(
@@ -118,7 +116,7 @@ bool VPolarAngleAxis::createTextShapes_ForAngleAxis(
 double fLogicAngle = pTickInfo->getUnscaledTickValue();
 
 LabelAlignment eLabelAlignment(LABEL_ALIGN_CENTER);
-PolarLabelPositionHelper 
aPolarLabelPositionHelper(m_pPosHelper,nDimensionCount,xTarget, pShapeFactory);
+PolarLabelPositionHelper 
aPolarLabelPositionHelper(m_pPosHelper.get(), nDimensionCount, xTarget, 
pShapeFactory);
 sal_Int32 nScreenValueOffsetInRadiusDirection = 
m_aAxisLabelProperties.m_aMaximumSpaceForLabels.Height/15;
 awt::Point aAnchorScreenPosition2D( 
aPolarLabelPositionHelper.getLabelScreenPositionAndAlignmentForLogicValues(
 eLabelAlignment, fLogicAngle, fLogicRadius, fLogicZ, 
nScreenValueOffsetInRadiusDirection ));
@@ -201,7 +199,7 @@ void VPolarAngleAxis::createShapes()
 
 //create axis main lines
 drawing::PointSequenceSequence aPoints(1);
-VPolarGrid::createLinePointSequence_ForAngleAxis( aPoints, 
m_aAllTickInfos, m_aIncrement, m_aScale, m_pPosHelper, fLogicRadius, fLogicZ );
+VPolarGrid::createLinePointSequence_ForAngleAxis( aPoints, 
m_aAllTickInfos, m_aIncrement, m_aScale, m_pPosHelper.get(), fLogicRadius, 
fLogicZ );
 uno::Reference< drawing::XShape > xShape = m_pShapeFactory->createLine2D(
 m_xGroupShape_Shapes, aPoints, 
&m_aAxisProperties.m_aLineProperties );
 

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

2017-05-23 Thread Miklos Vajna
 vcl/qa/cppunit/pdfexport/data/tdf107868.odt |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx  |  104 ++--
 vcl/source/gdi/pdfwriter_impl.cxx   |5 +
 3 files changed, 89 insertions(+), 20 deletions(-)

New commits:
commit 919a4ef592b6026a7533a93682f39118fef29ce8
Author: Miklos Vajna 
Date:   Mon May 22 21:41:31 2017 +0200

tdf#105461 PDF export of editeng fill color: restrict to logic map modes

The original use case was Writer/Impress shape text, but when the map
mode is pixels, the reference device gives bogus values for the
PixelToLogic() calls, affecting e.g. form controls.

Just go back to the old way of not painting the background for those.

Change-Id: I52f1901af15732274915fa3c77c06909b5164afb
Reviewed-on: https://gerrit.libreoffice.org/37919
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf107868.odt 
b/vcl/qa/cppunit/pdfexport/data/tdf107868.odt
new file mode 100644
index ..8309f4b878d6
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf107868.odt differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 2e2d0f5b4972..b3661281d473 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -11,9 +11,11 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -38,6 +40,10 @@ class PdfExportTest : public test::BootstrapFixture, public 
unotest::MacrosTest
 {
 uno::Reference mxComponentContext;
 uno::Reference mxComponent;
+#if HAVE_FEATURE_PDFIUM
+FPDF_PAGE mpPdfPage = nullptr;
+FPDF_DOCUMENT mpPdfDocument = nullptr;
+#endif
 
 public:
 virtual void setUp() override;
@@ -48,6 +54,7 @@ public:
 void testTdf106059();
 /// Tests that text highlight from Impress is not lost.
 void testTdf105461();
+void testTdf107868();
 /// Tests that embedded video from Impress is not exported as a linked one.
 void testTdf105093();
 /// Tests export of non-PDF images.
@@ -65,6 +72,7 @@ public:
 #if HAVE_FEATURE_PDFIUM
 CPPUNIT_TEST(testTdf106059);
 CPPUNIT_TEST(testTdf105461);
+CPPUNIT_TEST(testTdf107868);
 CPPUNIT_TEST(testTdf105093);
 CPPUNIT_TEST(testTdf106206);
 CPPUNIT_TEST(testTdf106693);
@@ -83,10 +91,25 @@ void PdfExportTest::setUp()
 
 
mxComponentContext.set(comphelper::getComponentContext(getMultiServiceFactory()));
 mxDesktop.set(frame::Desktop::create(mxComponentContext));
+
+#if HAVE_FEATURE_PDFIUM
+FPDF_LIBRARY_CONFIG config;
+config.version = 2;
+config.m_pUserFontPaths = nullptr;
+config.m_pIsolate = nullptr;
+config.m_v8EmbedderSlot = 0;
+FPDF_InitLibraryWithConfig(&config);
+#endif
 }
 
 void PdfExportTest::tearDown()
 {
+#if HAVE_FEATURE_PDFIUM
+FPDF_ClosePage(mpPdfPage);
+FPDF_CloseDocument(mpPdfDocument);
+FPDF_DestroyLibrary();
+#endif
+
 if (mxComponent.is())
 mxComponent->dispose();
 
@@ -197,14 +220,6 @@ void PdfExportTest::testTdf106693()
 
 void PdfExportTest::testTdf105461()
 {
-// Setup.
-FPDF_LIBRARY_CONFIG config;
-config.version = 2;
-config.m_pUserFontPaths = nullptr;
-config.m_pIsolate = nullptr;
-config.m_v8EmbedderSlot = 0;
-FPDF_InitLibraryWithConfig(&config);
-
 // Import the bugdoc and export as PDF.
 OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf105461.odp";
 mxComponent = loadFromDesktop(aURL);
@@ -221,20 +236,20 @@ void PdfExportTest::testTdf105461()
 SvFileStream aFile(aTempFile.GetURL(), StreamMode::READ);
 SvMemoryStream aMemory;
 aMemory.WriteStream(aFile);
-FPDF_DOCUMENT pPdfDocument = FPDF_LoadMemDocument(aMemory.GetData(), 
aMemory.GetSize(), /*password=*/nullptr);
-CPPUNIT_ASSERT(pPdfDocument);
+mpPdfDocument = FPDF_LoadMemDocument(aMemory.GetData(), aMemory.GetSize(), 
/*password=*/nullptr);
+CPPUNIT_ASSERT(mpPdfDocument);
 
 // The document has one page.
-CPPUNIT_ASSERT_EQUAL(1, FPDF_GetPageCount(pPdfDocument));
-FPDF_PAGE pPdfPage = FPDF_LoadPage(pPdfDocument, /*page_index=*/0);
-CPPUNIT_ASSERT(pPdfPage);
+CPPUNIT_ASSERT_EQUAL(1, FPDF_GetPageCount(mpPdfDocument));
+mpPdfPage = FPDF_LoadPage(mpPdfDocument, /*page_index=*/0);
+CPPUNIT_ASSERT(mpPdfPage);
 
 // Make sure there is a filled rectangle inside.
-int nPageObjectCount = FPDFPage_CountObject(pPdfPage);
+int nPageObjectCount = FPDFPage_CountObject(mpPdfPage);
 int nYellowPathCount = 0;
 for (int i = 0; i < nPageObjectCount; ++i)
 {
-FPDF_PAGEOBJECT pPdfPageObject = FPDFPage_GetObject(pPdfPage, i);
+FPDF_PAGEOBJECT pPdfPageObject = FPDFPage_GetObject(mpPdfPage, i);
 if (FPDFPageObj_GetType(pPdfPageObject) != FPDF_PAGEOBJ_PATH)
 continue;
 
@@ -246,11 +261,62 @@ void PdfExportTest::testTdf105461()
 
 // This was 0, the