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

2017-04-11 Thread Mike Kaganski
 shell/inc/spsupp/COMOpenDocuments.hpp  |1 
 shell/inc/spsupp/COMRefCounted.hpp |7 
 shell/inc/spsupp/registrar.hpp |   21 +
 shell/source/win32/spsupp/COMOpenDocuments.cxx |   55 +---
 shell/source/win32/spsupp/registrar.cxx|  281 +++--
 shell/source/win32/spsupp/spsupp.def   |1 
 shell/source/win32/spsupp/spsuppServ.cxx   |   35 ++-
 7 files changed, 243 insertions(+), 158 deletions(-)

New commits:
commit 88829fd914105a0837ee41d3f00f9178228c19cf
Author: Mike Kaganski 
Date:   Mon Apr 10 22:21:57 2017 +0300

tdf#103058: allow optional registration for MS ProgIDs

To allow in-place replacement of OWSSUPP.dll, we need to be able
to handle the same ProgIDs that it handles, namely:
SharePoint.OpenDocuments and its versions. This allows to use
the SharePoint integration capabilities of LO without the need to
reconfigure SharePoint server's DOCICON.xml (the system would
start the component with same name as MS Office uses).

But this cannot be the default mode, since if MS Office is installed
on the same system, we would hijack the registration, that could be
undesirable.

So, this commit adds an option to use
regsvr32 [/u] /i:Substitute_OWSSUPP path\to\spsupp.dll
to also [un]register SharePoint.OpenDocuments in addition to normal
LOSPSupport.OpenDocuments.

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

diff --git a/shell/inc/spsupp/COMOpenDocuments.hpp 
b/shell/inc/spsupp/COMOpenDocuments.hpp
index a0f733e16f6d..e6c1f22c59e4 100644
--- a/shell/inc/spsupp/COMOpenDocuments.hpp
+++ b/shell/inc/spsupp/COMOpenDocuments.hpp
@@ -213,7 +213,6 @@ private:
 
 static long m_nObjCount;
 static ITypeInfo* m_pTypeInfo;
-static wchar_t m_szLOPath[MAX_PATH];
 COMObjectSafety m_aObjectSafety;
 };
 
diff --git a/shell/inc/spsupp/COMRefCounted.hpp 
b/shell/inc/spsupp/COMRefCounted.hpp
index 230f6c8da517..9647db2fb0aa 100644
--- a/shell/inc/spsupp/COMRefCounted.hpp
+++ b/shell/inc/spsupp/COMRefCounted.hpp
@@ -11,6 +11,7 @@
 #define INCLUDED_SHELL_INC_SPSUPP_COMREFCOUNTED_HPP
 
 #include "objbase.h"
+#include "assert.h"
 
 template 
 class COMRefCounted : public Interface
@@ -28,9 +29,13 @@ public:
 
 ULONG STDMETHODCALLTYPE Release() override
 {
+assert(m_nRef > 0);
 if (::InterlockedDecrement(&m_nRef) == 0)
+{
 delete this;
-return (m_nRef > 0) ? static_cast(m_nRef) : 0;
+return 0;
+}
+return static_cast(m_nRef);
 }
 
 private:
diff --git a/shell/inc/spsupp/registrar.hpp b/shell/inc/spsupp/registrar.hpp
index ed41c4d04003..21f0c22d9688 100644
--- a/shell/inc/spsupp/registrar.hpp
+++ b/shell/inc/spsupp/registrar.hpp
@@ -12,14 +12,23 @@
 
 #include "windows.h"
 
-namespace Registrar {
-HRESULT RegisterObject(REFIID riidCLSID,
-   REFIID riidTypeLib,
+class Registrar {
+public:
+explicit Registrar(REFIID riidCLSID);
+HRESULT RegisterObject(REFIID riidTypeLib,
const wchar_t* sProgram,
const wchar_t* sComponent,
-   const wchar_t* Path);
-HRESULT UnRegisterObject(REFIID riidCLSID, const wchar_t* LibId, const 
wchar_t* ClassId);
-}
+   int nVersion,
+   const wchar_t* Path,
+   bool bSetDefault);
+HRESULT UnRegisterObject(const wchar_t* sProgram, const wchar_t* 
sComponent, int nVersion);
+HRESULT RegisterProgID(const wchar_t* sProgram, const wchar_t* sComponent, 
int nVersion, bool bSetDefault);
+HRESULT UnRegisterProgID(const wchar_t* sProgram, const wchar_t* 
sComponent, int nVersion);
+private:
+static const size_t nGUIDlen = 40;
+wchar_t m_sCLSID[nGUIDlen];
+HRESULT m_ConstructionResult;
+};
 
 #endif
 
diff --git a/shell/source/win32/spsupp/COMOpenDocuments.cxx 
b/shell/source/win32/spsupp/COMOpenDocuments.cxx
index f9e5a4bd0340..ece3ba82f2ad 100644
--- a/shell/source/win32/spsupp/COMOpenDocuments.cxx
+++ b/shell/source/win32/spsupp/COMOpenDocuments.cxx
@@ -29,14 +29,24 @@ bool SecurityWarning(const wchar_t* sProgram, const 
wchar_t* sDocument)
 }
 
 // Returns S_OK if successful
-HRESULT LOStart(wchar_t* sCommandLine)
+HRESULT LOStart(const wchar_t* sModeArg, const wchar_t* sFilePath, bool 
bDoSecurityWarning)
 {
+const wchar_t* sProgram = GetLOPath();
+if (bDoSecurityWarning && !SecurityWarning(sProgram, sFilePath))
+{
+// Return success to avoid downloading in browser
+return S_OK;
+}
+
 STARTUPINFOW si;
 std::memset(&si, 0, sizeof si);
 si.cb = sizeof si;
 si.dwFlags = STARTF_USESHOWWINDOW;
 si.wShowWindow = SW_SHOW;
 PROCESS_INFORMATION pi = {};
+const size_t cchCommandLine = 3

[Libreoffice-commits] core.git: compilerplugins/clang filter/source include/svx sd/inc sd/source svx/inc svx/Library_svxcore.mk svx/source

2017-04-11 Thread Noel Grandin
 compilerplugins/clang/mergeclasses.results|1 
 filter/source/msfilter/msdffimp.cxx   |1 
 filter/source/msfilter/svdfppt.cxx|1 
 include/svx/dlgctl3d.hxx  |4 -
 include/svx/globl3d.hxx   |3 -
 include/svx/obj3d.hxx |1 
 include/svx/polysc3d.hxx  |   44 
 sd/inc/pch/precompiled_sd.hxx |1 
 sd/source/ui/func/fucon3d.cxx |3 -
 sd/source/ui/func/fudraw.cxx  |6 +-
 sd/source/ui/func/fusel.cxx   |4 -
 sd/source/ui/func/futransf.cxx|1 
 sd/source/ui/view/drviews4.cxx|2 
 sd/source/ui/view/drviewsj.cxx|8 +--
 svx/Library_svxcore.mk|1 
 svx/inc/pch/precompiled_svx.hxx   |1 
 svx/inc/pch/precompiled_svxcore.hxx   |1 
 svx/source/customshapes/EnhancedCustomShape3d.cxx |4 -
 svx/source/dialog/dlgctl3d.cxx|4 -
 svx/source/engine3d/dragmt3d.cxx  |1 
 svx/source/engine3d/float3d.cxx   |1 
 svx/source/engine3d/obj3d.cxx |1 
 svx/source/engine3d/objfac3d.cxx  |6 +-
 svx/source/engine3d/polysc3d.cxx  |   58 --
 svx/source/engine3d/view3d.cxx|5 -
 svx/source/engine3d/view3d1.cxx   |   20 ---
 svx/source/sdr/contact/viewcontactofe3dscene.cxx  |1 
 svx/source/svdraw/svdobj.cxx  |1 
 svx/source/svdraw/svdpage.cxx |1 
 svx/source/unodraw/unopage.cxx|   10 ---
 svx/source/unodraw/unoprov.cxx|2 
 svx/source/unodraw/unoshap3.cxx   |4 -
 svx/source/unodraw/unoshape.cxx   |6 --
 33 files changed, 40 insertions(+), 168 deletions(-)

New commits:
commit 9fa75f677a7b48a2177fe11cca0d00f5a2deb7da
Author: Noel Grandin 
Date:   Mon Apr 10 13:13:44 2017 +0200

loplugin:mergeclasses merge E3dScene with E3dPolyScene

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

diff --git a/compilerplugins/clang/mergeclasses.results 
b/compilerplugins/clang/mergeclasses.results
index b8c64805da81..126c7d3cd7d8 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -26,7 +26,6 @@ merge DbGridControl with FmGridControl
 merge DdeItem with DdeGetPutItem
 merge DdeLink with DdeHotLink
 merge DomVisitor with DomExport
-merge E3dScene with E3dPolyScene
 merge E3dUndoAction with E3dRotateUndoAction
 merge EscherPersistTable with EscherEx
 merge ExcBoolRecord with Exc1904
diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index df8167f6e047..b27da930012e 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -103,7 +103,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include "svx/svditer.hxx"
 #include 
diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index ad5621bfdee8..875e74385787 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -57,7 +57,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/include/svx/dlgctl3d.hxx b/include/svx/dlgctl3d.hxx
index 57edb8a46fe9..589bd33b9ac2 100644
--- a/include/svx/dlgctl3d.hxx
+++ b/include/svx/dlgctl3d.hxx
@@ -30,8 +30,8 @@
 class FmFormModel;
 class FmFormPage;
 class E3dView;
-class E3dPolyScene;
 class E3dObject;
+class E3dScene;
 
 enum class SvxPreviewObjectType { SPHERE, CUBE };
 
@@ -41,7 +41,7 @@ protected:
 FmFormModel*mpModel;
 FmFormPage* mpFmPage;
 E3dView*mp3DView;
-E3dPolyScene*   mpScene;
+E3dScene*   mpScene;
 E3dObject*  mp3DObj;
 SvxPreviewObjectTypemnObjectType;
 
diff --git a/include/svx/globl3d.hxx b/include/svx/globl3d.hxx
index a258b6b189c7..2eed87268988 100644
--- a/include/svx/globl3d.hxx
+++ b/include/svx/globl3d.hxx
@@ -22,8 +22,7 @@
 
 #include 
 
-const sal_uInt16 E3D_SCENE_ID   = 1;
-const sal_uInt16 E3D_POLYSCENE_ID   = 2;
+const sal_uInt16 E3D_SCENE_ID   = 2;
 const sal_uInt16 E3D_OBJECT_ID  = 3; // should not be used, it's only a 
helper class for E3DScene and E3DCompoundObject
 const sal_uInt16 E3D_CUBEOBJ_ID = 4;
 const sal_uInt16 E3D_SPHEREOBJ_ID   = 5;
diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
index 72d1849e300e..58d1813d35ed 100644
--- a/include/svx/obj3d.hxx
+++ b/include/svx/obj3d.hxx
@@ -43,7 +43,6 @@
 class SfxPoolItem;
 class Viewport3D;
 clas

[Libreoffice-commits] core.git: compilerplugins/clang sw/inc sw/Library_sw.mk sw/qa sw/source

2017-04-11 Thread Noel Grandin
 compilerplugins/clang/mergeclasses.results|1 
 sw/Library_sw.mk  |2 
 sw/inc/AnnotationWin.hxx  |  221 +++-
 sw/inc/PostItMgr.hxx  |   27 --
 sw/inc/SidebarWin.hxx |  256 ---
 sw/inc/pch/precompiled_sw.hxx |1 
 sw/inc/postithelper.hxx   |   10 
 sw/qa/extras/uiwriter/uiwriter.cxx|2 
 sw/source/core/fields/postithelper.cxx|2 
 sw/source/uibase/docvw/AnnotationMenuButton.cxx   |8 
 sw/source/uibase/docvw/AnnotationMenuButton.hxx   |8 
 sw/source/uibase/docvw/AnnotationWin.cxx  |  126 +
 sw/source/uibase/docvw/AnnotationWin2.cxx |  292 +-
 sw/source/uibase/docvw/PostItMgr.cxx  |   70 ++---
 sw/source/uibase/docvw/SidebarScrollBar.cxx   |4 
 sw/source/uibase/docvw/SidebarScrollBar.hxx   |   10 
 sw/source/uibase/docvw/SidebarTxtControl.cxx  |8 
 sw/source/uibase/docvw/SidebarTxtControl.hxx  |9 
 sw/source/uibase/docvw/SidebarWinAcc.cxx  |8 
 sw/source/uibase/docvw/SidebarWinAcc.hxx  |9 
 sw/source/uibase/docvw/edtwin.cxx |4 
 sw/source/uibase/docvw/frmsidebarwincontainer.cxx |   12 
 sw/source/uibase/docvw/frmsidebarwincontainer.hxx |   10 
 sw/source/uibase/shells/annotsh.cxx   |2 
 sw/source/uibase/shells/textfld.cxx   |1 
 sw/source/uibase/uiview/viewmdi.cxx   |2 
 sw/source/uibase/uno/unotxdoc.cxx |5 
 sw/source/uibase/utlui/content.cxx|2 
 28 files changed, 513 insertions(+), 599 deletions(-)

New commits:
commit bf6449230ad2b4dfb427a062663e5ff2b9ddf3b6
Author: Noel Grandin 
Date:   Mon Apr 10 14:12:30 2017 +0200

loplugin:mergeclasses merge SwAnnotationWin and SwSidebarWin

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

diff --git a/compilerplugins/clang/mergeclasses.results 
b/compilerplugins/clang/mergeclasses.results
index 126c7d3cd7d8..7031a522f436 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -353,7 +353,6 @@ merge sw::WriterListener with SwClient
 merge sw::mark::ContentIdxStore with (anonymous namespace)::ContentIdxStoreImpl
 merge sw::mark::IBookmark with sw::mark::Bookmark
 merge sw::mark::ICheckboxFieldmark with sw::mark::CheckboxFieldmark
-merge sw::sidebarwindows::SwSidebarWin with sw::annotation::SwAnnotationWin
 merge sw::util::WrtRedlineAuthor with WW8_WrtRedlineAuthor
 merge unographic::GraphicTransformer with unographic::Graphic
 merge vcl::DeletionNotifier with SalFrame
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 847d061af188..8e6aea178073 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -598,6 +598,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
 sw/source/uibase/docvw/AnchorOverlayObject \
 sw/source/uibase/docvw/AnnotationMenuButton \
 sw/source/uibase/docvw/AnnotationWin \
+sw/source/uibase/docvw/AnnotationWin2 \
 sw/source/uibase/docvw/DashedLine \
 sw/source/uibase/docvw/FrameControlsManager \
 sw/source/uibase/docvw/PageBreakWin \
@@ -607,7 +608,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
 sw/source/uibase/docvw/SidebarScrollBar \
 sw/source/uibase/docvw/SidebarTxtControl \
 sw/source/uibase/docvw/SidebarTxtControlAcc \
-sw/source/uibase/docvw/SidebarWin \
 sw/source/uibase/docvw/SidebarWinAcc \
 sw/source/uibase/docvw/HeaderFooterWin \
 sw/source/uibase/docvw/edtdd \
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index 04122ce9f70b..256441bc9dfb 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -20,15 +20,44 @@
 #ifndef INCLUDED_SW_INC_ANNOTATIONWIN_HXX
 #define INCLUDED_SW_INC_ANNOTATIONWIN_HXX
 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
 #include 
-#include 
+#include 
+#include 
+#include 
 
 class PopupMenu;
 class OutlinerParaObject;
+class SwPostItMgr;
+class SwPostItField;
+class OutlinerView;
+class Outliner;
+class ScrollBar;
+class SwEditWin;
+class SwView;
+class Edit;
+class MenuButton;
+class SwFrame;
+
+namespace sw { namespace overlay {
+class OverlayRanges;
+}}
+
+namespace sw { namespace sidebarwindows {
+class SidebarTextControl;
+class AnchorOverlayObject;
+class ShadowOverlayObject;
+}}
 
 namespace sw { namespace annotation {
 
-class SwAnnotationWin : public sw::sidebarwindows::SwSidebarWin
+class SwAnnotationWin : public vcl::Window
 {
 public:
 SwAnnotationWin( SwEditWin& rEditWin,
@@ -39,36 +68,194 @@ class SwAnnotationWin : public 
sw::sidebarwindows::SwSidebarWin
 virtual ~SwAnnotationWin() override;
 virtua

[Libreoffice-commits] core.git: configure.ac

2017-04-11 Thread Stephan Bergmann
 configure.ac |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 3df73dc906555c5727fc5a0ee84d487f27b73817
Author: Stephan Bergmann 
Date:   Tue Apr 11 10:29:04 2017 +0200

Fix comment: find_winsdk apparently does not take any argument

Change-Id: Idd192405810d1e56ded4a42a1bcf972d2e3de904

diff --git a/configure.ac b/configure.ac
index 49480e87020f..335dc0385eb7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5205,7 +5205,6 @@ find_winsdk_version()
 
 find_winsdk()
 {
-# Args: $1 (optional) : list of acceptable SDK versions
 # Return value: From find_winsdk_version
 
 unset winsdktest
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Noel Grandin
 include/xmloff/txtparae.hxx|5 +++--
 sc/source/core/inc/jumpmatrix.hxx  |4 ++--
 sc/source/core/tool/jumpmatrix.cxx |9 -
 xmloff/source/text/txtparae.cxx|   11 +--
 xmloff/source/text/txtstyle.cxx|2 +-
 5 files changed, 15 insertions(+), 16 deletions(-)

New commits:
commit 4e162517869c811c06242bb8eb08001dfcf3b714
Author: Noel Grandin 
Date:   Tue Apr 11 09:43:53 2017 +0200

loplugin:inlinefields in ScJumpMatrix

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

diff --git a/sc/source/core/inc/jumpmatrix.hxx 
b/sc/source/core/inc/jumpmatrix.hxx
index 4ef4f87b282a..94b8dc1737aa 100644
--- a/sc/source/core/inc/jumpmatrix.hxx
+++ b/sc/source/core/inc/jumpmatrix.hxx
@@ -45,7 +45,7 @@ struct ScJumpMatrixEntry
 nNext = nNextP;
 nStop = nStopP;
 }
-voidGetJump( double& rBool, short& rStart, short& rNext, short& rStop )
+voidGetJump( double& rBool, short& rStart, short& rNext, short& rStop 
) const
 {
 rBool = fBool;
 rStart = nStart;
@@ -56,7 +56,7 @@ struct ScJumpMatrixEntry
 
 class ScJumpMatrix
 {
-ScJumpMatrixEntry*  pJump;  // the jumps
+std::vector mvJump;  // the jumps
 ScMatrixRef pMat;   // the results
 ScTokenVec* pParams;// parameter stack
 SCSIZE  nCols;
diff --git a/sc/source/core/tool/jumpmatrix.cxx 
b/sc/source/core/tool/jumpmatrix.cxx
index 0961e78ff49d..760f89735db6 100644
--- a/sc/source/core/tool/jumpmatrix.cxx
+++ b/sc/source/core/tool/jumpmatrix.cxx
@@ -28,7 +28,7 @@ const SCSIZE kBufferThreshold = 128;
 }
 
 ScJumpMatrix::ScJumpMatrix(SCSIZE nColsP, SCSIZE nRowsP)
-: pJump(new ScJumpMatrixEntry[nColsP * nRowsP])
+: mvJump(nColsP * nRowsP)
 , pMat(new ScFullMatrix(nColsP, nRowsP))
 , pParams(nullptr)
 , nCols(nColsP)
@@ -62,7 +62,6 @@ ScJumpMatrix::~ScJumpMatrix()
 }
 delete pParams;
 }
-delete[] pJump;
 }
 
 void ScJumpMatrix::GetDimensions(SCSIZE& rCols, SCSIZE& rRows) const
@@ -74,7 +73,7 @@ void ScJumpMatrix::GetDimensions(SCSIZE& rCols, SCSIZE& 
rRows) const
 void ScJumpMatrix::SetJump(SCSIZE nCol, SCSIZE nRow, double fBool,
short nStart, short nNext)
 {
-pJump[(sal_uLong)nCol * nRows + nRow].SetJump(fBool, nStart, nNext, 
SHRT_MAX);
+mvJump[(sal_uLong)nCol * nRows + nRow].SetJump(fBool, nStart, nNext, 
SHRT_MAX);
 }
 
 void ScJumpMatrix::GetJump(
@@ -93,7 +92,7 @@ void ScJumpMatrix::GetJump(
 nCol = 0;
 nRow = 0;
 }
-pJump[(sal_uLong)nCol * nRows + nRow].
+mvJump[(sal_uLong)nCol * nRows + nRow].
 GetJump(rBool, rStart, rNext, rStop);
 }
 
@@ -102,7 +101,7 @@ void ScJumpMatrix::SetAllJumps(double fBool, short nStart, 
short nNext, short nS
 sal_uLong n = (sal_uLong)nCols * nRows;
 for (sal_uLong j = 0; j < n; ++j)
 {
-pJump[j].SetJump(fBool, nStart,
+mvJump[j].SetJump(fBool, nStart,
  nNext, nStop);
 }
 }
commit 25e92d7f7c915e26febd8c868a6531d99aac30cd
Author: Noel Grandin 
Date:   Mon Apr 10 10:15:59 2017 +0200

loplugin:inlinefields in XMLTextParagraphExport

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

diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index 070c392cc7bc..9f737e665b1b 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -86,7 +87,7 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public 
XMLStyleExport
 const ::std::unique_ptr< ::xmloff::BoundFrameSets > pBoundFrameSets;
 XMLTextFieldExport  *pFieldExport;
 std::vector  *pListElements;
-XMLTextListAutoStylePool*pListAutoPool;
+XMLTextListAutoStylePoolmaListAutoPool;
 XMLSectionExport*pSectionExport;
 XMLIndexMarkExport  *pIndexMarkExport;
 
@@ -587,7 +588,7 @@ private:
 inline const XMLTextListAutoStylePool&
 XMLTextParagraphExport::GetListAutoStylePool() const
 {
-return *pListAutoPool;
+return maListAutoPool;
 }
 
 inline void XMLTextParagraphExport::exportTextFrame(
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 62491265a464..c64d8662794a 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -531,7 +531,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
 }
 }
 if( bAdd )
-pListAutoPool->Add( xNumRule );
+maListAutoPool.Add( xNumRule );
 }
 }

Re: Various MacOS extension issues.

2017-04-11 Thread Adomas Venčkauskas
Hi,

I just wanted to check if there are any plans for movement on this end. The
scope of LibreOffice codebase is way over my head to troubleshoot this in
any reasonable amount of time, but we might look for a workaround in Zotero
for the MessageBox issue. I've filed an issue
 for it, but
the conversation there was of limited productivity.

The performance issue
 is also very
severe, but perhaps less important as it doesn't appear to affect everyone.

Adomas

On 1 March 2017 at 16:34, Adomas Venčkauskas  wrote:

> On 24 February 2017 at 18:04, Stephan Bergmann 
> wrote:
>
>> should work now on master with > libreoffice/core/commit/?id=f21994e7a240563283b7a17dcb435ce7c5156b60>
>> "Make JVM -Xrunjdwp option work on macOS"
>>
>>
> ​Thanks for ​looking into this. Meanwhile I've built with debug logging
> enabled and got
>
>> CE> warn:legacy.tools:52336:7:toolkit/source/helper/unowrapper.cxx:176:
>> UnoWrapper::SetWindowInterface: there already *is* a WindowInterface for
>> this window!
>>
>> CE> warn:legacy.tools:52336:7:toolkit/source/awt/vclxtoolkit.cxx:1301:
>> VCLXToolkit::createWindow: did #133706# resurge?
>>
> ​when trying to show a MessageBox with Java on MacOS. The example to
> reproduce this is actually included with the SDK itself:
> http://api.libreoffice.org/examples/DevelopersGuide/GUI/MessageBox.java .
> This code properly shows a prompt on Linux, but doesn't on MacOS.
>
> Would appreciate if you could take a look.
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-04-11 Thread Bartosz Kosiorek
 cppcanvas/source/mtfrenderer/emfplus.cxx |   63 +++
 1 file changed, 32 insertions(+), 31 deletions(-)

New commits:
commit a45feba83e5fb35eee1884887e8dbe795ebacde5
Author: Bartosz Kosiorek 
Date:   Fri Apr 7 14:43:44 2017 +0200

tdf#107016 EMF+ Add support of import EmfPlusRecordTypeDrawRects record

EmfPlusDrawRectss record defines the pen strokes for drawing a series of 
rectangles.

Change-Id: Iaa061f8502fb51de44d2e65a1c92daf297b79d2b
Reviewed-on: https://gerrit.libreoffice.org/36261
Tested-by: Jenkins 
Reviewed-by: Bartosz Kosiorek 

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index f242e31eed62..7c33b28c213d 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -68,6 +68,7 @@ namespace
 #define EmfPlusRecordTypeObject 0x4008
 //TODO EmfPlusRecordTypeClear 0x4009
 #define EmfPlusRecordTypeFillRects 0x400A
+#define EmfPlusRecordTypeDrawRects 0x400B
 #define EmfPlusRecordTypeFillPolygon 0x400C
 #define EmfPlusRecordTypeDrawLines 0x400D
 #define EmfPlusRecordTypeFillEllipse 0x400E
@@ -100,6 +101,7 @@ namespace
 #define EmfPlusRecordTypeSetWorldTransform 0x402A
 #define EmfPlusRecordTypeResetWorldTransform 0x402B
 #define EmfPlusRecordTypeMultiplyWorldTransform 0x402C
+//TODO EmfPlusRecordTypeTranslateWorldTransform 0x402D
 //TODO EmfPlusRecordTypeScaleWorldTransform 0x402E
 //TODO EmfPlusRecordTypeRotateWorldTransform 0x402F
 #define EmfPlusRecordTypeSetPageTransform 0x4030
@@ -145,6 +147,7 @@ const char* emfTypeToName(sal_uInt16 type)
 case EmfPlusRecordTypeGetDC: return "EmfPlusRecordTypeGetDC";
 case EmfPlusRecordTypeObject: return "EmfPlusRecordTypeObject";
 case EmfPlusRecordTypeFillRects: return "EmfPlusRecordTypeFillRects";
+case EmfPlusRecordTypeDrawRects: return "EmfPlusRecordTypeDrawRects";
 case EmfPlusRecordTypeFillPolygon: return 
"EmfPlusRecordTypeFillPolygon";
 case EmfPlusRecordTypeDrawLines: return "EmfPlusRecordTypeDrawLines";
 case EmfPlusRecordTypeFillEllipse: return 
"EmfPlusRecordTypeFillEllipse";
@@ -970,48 +973,46 @@ namespace cppcanvas
 }
 break;
 case EmfPlusRecordTypeFillRects:
+case EmfPlusRecordTypeDrawRects:
 {
-SAL_INFO("cppcanvas.emf", "EMF+ FillRects");
-
-sal_uInt32 brushIndexOrColor;
+// Silent MSVC warning C4701: potentially 
uninitialized local variable 'brushIndexOrColor' used
+sal_uInt32 brushIndexOrColor = 999;
 sal_Int32 rectangles;
 bool isColor = (flags & 0x8000);
 ::basegfx::B2DPolygon polygon;
 
-rMF.ReadUInt32( brushIndexOrColor ).ReadInt32( 
rectangles );
+if ( type == EmfPlusRecordTypeFillRects )
+{
+SAL_INFO("cppcanvas.emf", "EMF+ FillRects");
+rMF.ReadUInt32( brushIndexOrColor );
+SAL_INFO("cppcanvas.emf", "EMF+\t" << (isColor 
? "color" : "brush index") << ": 0x" << std::hex << brushIndexOrColor << 
std::dec);
+}
+else
+{
+SAL_INFO("cppcanvas.emf", "EMF+ DrawRects");
+}
 
-SAL_INFO("cppcanvas.emf", "EMF+\t" << ((flags & 
0x8000) ? "color" : "brush index") << ": 0x" << std::hex << brushIndexOrColor 
<< std::dec);
+rMF.ReadInt32( rectangles );
 
 for (int i=0; i < rectangles; i++) {
-if (flags & 0x4000) {
-/* 16bit integers */
-sal_Int16 x, y, width, height;
+float x, y, width, height;
+ReadRectangle (rMF, x, y, width, height, 
bool(flags & 0x4000));
 
-rMF.ReadInt16( x ).ReadInt16( y 
).ReadInt16( width ).ReadInt16( height );
+polygon.append (Map (x, y));
+polygon.append (Map (x + width, y));
+polygon.append (Map (x + width, y + height));
+polygon.append (Map (x, y + height));
+polygon.append (Map (x, y));
 
-polygon.append (Map (x, y));
-polygon.append (Map (x + width, y));
-polygon.append (Map (x + width, y + 
height));
-polygon.append 

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

2017-04-11 Thread Noel Grandin
 sc/source/filter/html/htmlpars.cxx |   26 --
 sc/source/filter/inc/htmlpars.hxx  |2 +-
 2 files changed, 13 insertions(+), 15 deletions(-)

New commits:
commit 8966f6e3b4207d15c74208846c2dec827cab254e
Author: Noel Grandin 
Date:   Tue Apr 11 09:52:56 2017 +0200

loplugin:inlinefields in ScHTMLLayoutParser

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

diff --git a/sc/source/filter/html/htmlpars.cxx 
b/sc/source/filter/html/htmlpars.cxx
index 777137cb6471..4c77e7f7e493 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -203,7 +203,6 @@ ScHTMLLayoutParser::ScHTMLLayoutParser(
 aBaseURL( rBaseURL ),
 xLockedList( new ScRangeList ),
 pTables( nullptr ),
-pColOffset( new ScHTMLColOffset ),
 pLocalColOffset( new ScHTMLColOffset ),
 nFirstTableCell(0),
 nTableLevel(0),
@@ -221,7 +220,7 @@ ScHTMLLayoutParser::ScHTMLLayoutParser(
 bInTitle( false )
 {
 MakeColNoRef( pLocalColOffset, 0, 0, 0, 0 );
-MakeColNoRef( pColOffset, 0, 0, 0, 0 );
+MakeColNoRef( &maColOffset, 0, 0, 0, 0 );
 }
 
 ScHTMLLayoutParser::~ScHTMLLayoutParser()
@@ -247,7 +246,6 @@ ScHTMLLayoutParser::~ScHTMLLayoutParser()
 delete pS;
 }
 delete pLocalColOffset;
-delete pColOffset;
 if ( pTables )
 {
 for( OuterMap::const_iterator it = pTables->begin(); it != 
pTables->end(); ++it)
@@ -290,15 +288,15 @@ sal_uLong ScHTMLLayoutParser::Read( SvStream& rStream, 
const OUString& rBaseURL
 // Create column width
 Adjust();
 OutputDevice* pDefaultDev = Application::GetDefaultDevice();
-sal_uInt16 nCount = pColOffset->size();
-sal_uLong nOff = (*pColOffset)[0];
+sal_uInt16 nCount = maColOffset.size();
+sal_uLong nOff = maColOffset[0];
 Size aSize;
 for ( sal_uInt16 j = 1; j < nCount; j++ )
 {
-aSize.Width() = (*pColOffset)[j] - nOff;
+aSize.Width() = maColOffset[j] - nOff;
 aSize = pDefaultDev->PixelToLogic( aSize, MapMode( MapUnit::MapTwip ) 
);
 maColWidths[ j-1 ] = aSize.Width();
-nOff = (*pColOffset)[j];
+nOff = maColOffset[j];
 }
 return nErr;
 }
@@ -590,24 +588,24 @@ void ScHTMLLayoutParser::Adjust()
 }
 }
 // Real column
-(void)SeekOffset( pColOffset, pE->nOffset, &pE->nCol, nOffsetTolerance 
);
+(void)SeekOffset( &maColOffset, pE->nOffset, &pE->nCol, 
nOffsetTolerance );
 SCCOL nColBeforeSkip = pE->nCol;
 SkipLocked( pE, false );
 if ( pE->nCol != nColBeforeSkip )
 {
-SCCOL nCount = (SCCOL)pColOffset->size();
+SCCOL nCount = (SCCOL)maColOffset.size();
 if ( nCount <= pE->nCol )
 {
-pE->nOffset = (sal_uInt16) (*pColOffset)[nCount-1];
-MakeCol( pColOffset, pE->nOffset, pE->nWidth, 
nOffsetTolerance, nOffsetTolerance );
+pE->nOffset = (sal_uInt16) maColOffset[nCount-1];
+MakeCol( &maColOffset, pE->nOffset, pE->nWidth, 
nOffsetTolerance, nOffsetTolerance );
 }
 else
 {
-pE->nOffset = (sal_uInt16) (*pColOffset)[pE->nCol];
+pE->nOffset = (sal_uInt16) maColOffset[pE->nCol];
 }
 }
 SCCOL nPos;
-if ( pE->nWidth && SeekOffset( pColOffset, pE->nOffset + pE->nWidth, 
&nPos, nOffsetTolerance ) )
+if ( pE->nWidth && SeekOffset( &maColOffset, pE->nOffset + pE->nWidth, 
&nPos, nOffsetTolerance ) )
 pE->nColOverlap = (nPos > pE->nCol ? nPos - pE->nCol : 1);
 else
 {
@@ -790,7 +788,7 @@ void ScHTMLLayoutParser::SetWidths()
 pE->nWidth = GetWidth( pE );
 OSL_ENSURE( pE->nWidth, "SetWidths: pE->nWidth == 0" );
 }
-MakeCol( pColOffset, pE->nOffset, pE->nWidth, nOffsetTolerance, 
nOffsetTolerance );
+MakeCol( &maColOffset, pE->nOffset, pE->nWidth, nOffsetTolerance, 
nOffsetTolerance );
 }
 }
 }
diff --git a/sc/source/filter/inc/htmlpars.hxx 
b/sc/source/filter/inc/htmlpars.hxx
index 4c7ee1fca80c..f807c06ee604 100644
--- a/sc/source/filter/inc/htmlpars.hxx
+++ b/sc/source/filter/inc/htmlpars.hxx
@@ -158,7 +158,7 @@ private:
 OUStringaString;
 ScRangeListRef  xLockedList;// je Table
 OuterMap*   pTables;
-ScHTMLColOffset*pColOffset;
+ScHTMLColOffset maColOffset;
 ScHTMLColOffset*pLocalColOffset;// je Table
 sal_uLong   nFirstTableCell;// je Table
 short   nTableLevel;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Miklos Vajna
 sw/qa/extras/ooxmlexport/data/tdf106970.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx |9 +
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   18 +++---
 3 files changed, 24 insertions(+), 3 deletions(-)

New commits:
commit e1c83d0514e6123faa50ad0a7aa6a9031b271c9a
Author: Miklos Vajna 
Date:   Tue Apr 11 08:54:36 2017 +0200

tdf#106970 DOCX import: don't collapse para auto space for different nums

Commit 1bf7f6a1a50ee9f24a3687240fe6ae390b905a6b (tdf#106690 DOCX import:
fix automatic spacing before/after numbered para block, 2017-04-04) made
sure that autospacing is only collapsed in case the adjacent text nodes
both have a numbering rule.

It turns out there is an additional condition: even if both text nodes
have a numbering rule, do the collapsing only in case they have the same
numbering rule.

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf106970.docx 
b/sw/qa/extras/ooxmlexport/data/tdf106970.docx
new file mode 100644
index ..8a534558b641
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf106970.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 178c71b6fcc0..a7d53cf39661 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -70,6 +70,15 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106690, "tdf106690.docx")
 CPPUNIT_ASSERT_EQUAL(static_cast(494), 
getProperty(getParagraph(2), "ParaTopMargin"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf106970, "tdf106970.docx")
+{
+// The second paragraph (first numbered one) had 0 bottom margin:
+// autospacing was even collapsed between different numbering styles.
+CPPUNIT_ASSERT_EQUAL(static_cast(494), 
getProperty(getParagraph(2), "ParaBottomMargin"));
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
getProperty(getParagraph(3), "ParaBottomMargin"));
+CPPUNIT_ASSERT_EQUAL(static_cast(494), 
getProperty(getParagraph(4), "ParaBottomMargin"));
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf89377, 
"tdf89377_tableWithBreakBeforeParaStyle.docx")
 {
 // the paragraph style should set table's text-flow break-before-page
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index f8eeb4c6a15b..c9369de68e31 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1180,10 +1180,22 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap )
 });
 if (itNumberingRules != aProperties.end())
 {
-// This textnode has numbering.
-if (m_xPreviousParagraph.is() && 
m_xPreviousParagraph->getPropertyValue("NumberingRules").hasValue())
+// This textnode has numbering. Look up the numbering 
style name of the current and previous paragraph.
+OUString aCurrentNumberingRuleName;
+uno::Reference 
xCurrentNumberingRules(itNumberingRules->Value, uno::UNO_QUERY);
+if (xCurrentNumberingRules.is())
+aCurrentNumberingRuleName = 
xCurrentNumberingRules->getName();
+OUString aPreviousNumberingRuleName;
+if (m_xPreviousParagraph.is())
 {
-// There was a previous textnode and it had 
numbering.
+uno::Reference 
xPreviousNumberingRules(m_xPreviousParagraph->getPropertyValue("NumberingRules"),
 uno::UNO_QUERY);
+if (xPreviousNumberingRules.is())
+aPreviousNumberingRuleName = 
xPreviousNumberingRules->getName();
+}
+
+if (!aPreviousNumberingRuleName.isEmpty() && 
aCurrentNumberingRuleName == aPreviousNumberingRuleName)
+{
+// There was a previous textnode and it had the 
same numbering.
 if (m_bParaAutoBefore)
 {
 // This before spacing is set to auto, set 
before space to 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-3' - hwpfilter/qa hwpfilter/source

2017-04-11 Thread Caolán McNamara
 hwpfilter/qa/cppunit/data/fail/cslist-1.hwp |binary
 hwpfilter/source/hpara.cxx  |   88 +--
 hwpfilter/source/hpara.h|5 
 hwpfilter/source/hwpfile.cxx|   92 +--
 hwpfilter/source/hwpfile.h  |   15 
 hwpfilter/source/hwpreader.cxx  |  678 +---
 hwpfilter/source/hwpreader.hxx  |4 
 hwpfilter/source/solver.cxx |   53 --
 8 files changed, 435 insertions(+), 500 deletions(-)

New commits:
commit e48ec134dbe72f17b08ebdeaaa215b29243ee5c4
Author: Caolán McNamara 
Date:   Fri Mar 3 11:25:32 2017 +

backport various fixes to aid future backporting

ofz#725 fix hwp leak

Change-Id: I09088981ca63b297781307590092725bc1cbed1b
(cherry picked from commit 681b6361f23a8f20511ad97989c642b07f25c495)

valgrind: uninitialized reads

Change-Id: Ia1e821d1e323d85c65484c980be09f015af6517b
(cherry picked from commit afabc7d2f2fcf8fcd39ff5002f09c32e8f03d4bb)

partial loplugin:useuniqueptr extend to catch more localvar cases

hwpfilter part of...

commit aa09b0c27a6d925da428d6267daadc7338829869
Author: Noel Grandin 
Date:   Thu Apr 6 09:46:06 2017 +0200

loplugin:useuniqueptr extend to catch more localvar cases

i.e. where the code looks like
{
foo * p = new foo;
...
delete p;
return ...;
}

Change-Id: Iad770d1904b2373b1bf8ce609f4c95882388eff8

ofz: epic slow use of std::list

Change-Id: I790a3098272101fd33f83f21bdcef1bb061efd76
Reviewed-on: https://gerrit.libreoffice.org/34635
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 283e843be91ef4d727c0815d1b8a0420fd16a7fd)

use rtl::Reference in HwpReader

instead of storing both a raw pointer and an uno::Reference

(cherry picked from commit 0bab51d8ad35a31685002118cdac20657b57137a)

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

diff --git a/hwpfilter/qa/cppunit/data/fail/cslist-1.hwp 
b/hwpfilter/qa/cppunit/data/fail/cslist-1.hwp
new file mode 100644
index ..d491f7b4c04d
Binary files /dev/null and b/hwpfilter/qa/cppunit/data/fail/cslist-1.hwp differ
diff --git a/hwpfilter/source/hpara.cxx b/hwpfilter/source/hpara.cxx
index 96b2729c8698..84294c59ed3c 100644
--- a/hwpfilter/source/hpara.cxx
+++ b/hwpfilter/source/hpara.cxx
@@ -77,7 +77,6 @@ HWPPara::HWPPara()
 , pstyno(0)
 , linfo(nullptr)
 , cshapep(nullptr)
-, hhstr(nullptr)
 {
 memset(&cshape, 0, sizeof(cshape));
 memset(&pshape, 0, sizeof(pshape));
@@ -87,19 +86,8 @@ HWPPara::~HWPPara()
 {
 delete[] linfo;
 delete[] cshapep;
-if (hhstr)
-{
-// virtual destructor
-/* C++은 null에 대해서도 동작한다. */
-for (int ii = 0; ii < nch; ++ii)
-delete hhstr[ii];
-
-delete[]hhstr;
-}
-
 }
 
-
 bool HWPPara::Read(HWPFile & hwpf, unsigned char flag)
 {
 unsigned char same_cshape;
@@ -162,6 +150,7 @@ bool HWPPara::Read(HWPFile & hwpf, unsigned char flag)
 perror("Memory Allocation: cshape\n");
 return false;
 }
+memset(cshapep, 0, nch * sizeof(CharShape));
 
 for (ii = 0; ii < nch; ii++)
 {
@@ -180,14 +169,12 @@ bool HWPPara::Read(HWPFile & hwpf, unsigned char flag)
 }
 }
 // read string
-hhstr = ::comphelper::newArray_null(nch);
-if (!hhstr) { return false; }
-for (ii = 0; ii < nch; ii++)
-hhstr[ii] = nullptr;
+hhstr.resize(nch);
 ii = 0;
 while (ii < nch)
 {
-if (nullptr == (hhstr[ii] = readHBox(hwpf)))
+hhstr[ii] = readHBox(hwpf);
+if (!hhstr[ii])
 return false;
 if (hhstr[ii]->hh == CH_END_PARA)
 break;
@@ -207,93 +194,93 @@ CharShape *HWPPara::GetCharShape(int pos)
 }
 
 
-HBox *HWPPara::readHBox(HWPFile & hwpf)
+std::unique_ptr HWPPara::readHBox(HWPFile & hwpf)
 {
+std::unique_ptr hbox;
+
 hchar hh;
 if (!hwpf.Read2b(hh))
-return nullptr;
-
-HBox *hbox = nullptr;
+return hbox;
 
 if (hwpf.State() != HWP_NoError)
-return nullptr;
+return hbox;
 
 if (hh > 31 || hh == CH_END_PARA)
-hbox = new HBox(hh);
+hbox.reset(new HBox(hh));
 else if (IS_SP_SKIP_BLOCK(hh))
-hbox = new SkipData(hh);
+hbox.reset(new SkipData(hh));
 else
 {
 switch (hh)
 {
 case CH_FIELD:// 5
-hbox = new FieldCode;
+hbox.reset(new FieldCode);
 break;
 case CH_BOOKMARK: // 6
-hbox = new Bookmark;
+hbox.reset(new Bookm

Tietz, Werner Licence statement

2017-04-11 Thread Werner Tietz

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

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


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

2017-04-11 Thread Caolán McNamara
 lotuswordpro/source/filter/lwplayout.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit da78742e189966bd6e7f49390164132684928756
Author: Caolán McNamara 
Date:   Tue Apr 11 10:50:33 2017 +0100

ofz: loop in lwp layout

Change-Id: Ic0a6a3c77b82e001829d8d9d7163e1b2141d8a0c

diff --git a/lotuswordpro/source/filter/lwplayout.cxx 
b/lotuswordpro/source/filter/lwplayout.cxx
index 7ea7e2d2f2a7..3c32355e776d 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -1370,7 +1370,13 @@ rtl::Reference 
LwpMiddleLayout::GetWaterMarkLayout()
 {
 return xLay;
 }
-xLay.set(dynamic_cast(xLay->GetNext().obj().get()));
+rtl::Reference 
xNext(dynamic_cast(xLay->GetNext().obj().get()));
+if (xNext == xLay)
+{
+SAL_WARN("lwp", "loop in layout");
+break;
+}
+xLay = xNext;
 }
 return rtl::Reference();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread David Tardon
 src/lib/VSDFieldList.cpp |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit d8ee1ffbf7b2918e927a96502fd182cfcf50e1f6
Author: David Tardon 
Date:   Fri Apr 7 16:10:38 2017 +0200

ofz#989 do not leak existing field with the same ID

Change-Id: Iac76df2ae09965732ae5fd42036fdb59886f071f

diff --git a/src/lib/VSDFieldList.cpp b/src/lib/VSDFieldList.cpp
index 3f436b4..2f470a5 100644
--- a/src/lib/VSDFieldList.cpp
+++ b/src/lib/VSDFieldList.cpp
@@ -216,12 +216,14 @@ void libvisio::VSDFieldList::addFieldList(unsigned id, 
unsigned level)
 
 void libvisio::VSDFieldList::addTextField(unsigned id, unsigned level, int 
nameId, int formatStringId)
 {
-  m_elements[id] = new VSDTextField(id, level, nameId, formatStringId);
+  if (m_elements.find(id) == m_elements.end())
+m_elements[id] = new VSDTextField(id, level, nameId, formatStringId);
 }
 
 void libvisio::VSDFieldList::addNumericField(unsigned id, unsigned level, 
unsigned short format, double number, int formatStringId)
 {
-  m_elements[id] = new VSDNumericField(id, level, format, number, 
formatStringId);
+  if (m_elements.find(id) == m_elements.end())
+m_elements[id] = new VSDNumericField(id, level, format, number, 
formatStringId);
 }
 
 void libvisio::VSDFieldList::handle(VSDCollector *collector) const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Noel Grandin
 sw/inc/AnnotationWin.hxx  |4 -
 sw/source/uibase/docvw/AnnotationWin.cxx  |   64 +++---
 sw/source/uibase/docvw/AnnotationWin2.cxx |   28 ++---
 3 files changed, 46 insertions(+), 50 deletions(-)

New commits:
commit 8b472a6067cfef1588b4b6122e52fcee269d6bdf
Author: Noel Grandin 
Date:   Mon Apr 10 15:43:33 2017 +0200

inline some trivial private methods

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

diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index 256441bc9dfb..6f660a27ccca 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -204,10 +204,6 @@ class SwAnnotationWin : public vcl::Window
 DECL_LINK(ScrollHdl, ScrollBar*, void);
 DECL_LINK(DeleteHdl, void*, void);
 
-SwView& DocView() { return mrView;}
-SwPostItMgr& Mgr() { return mrMgr; }
-Outliner* Engine() { return mpOutliner;}
-
 sal_uInt32 CountFollowing();
 SwAnnotationWin*   GetTopReplyNote();
 SvxLanguageItem GetLanguage();
diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx 
b/sw/source/uibase/docvw/AnnotationWin.cxx
index 9f70393f637e..241de71f81cc 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -201,25 +201,25 @@ void SwAnnotationWin::SetPostItText()
 //point .e.g. fdo#33599
 mpField = static_cast(mpFormatField->GetField());
 OUString sNewText = mpField->GetPar2();
-bool bTextUnchanged = sNewText.equals(Engine()->GetEditEngine().GetText());
+bool bTextUnchanged = 
sNewText.equals(mpOutliner->GetEditEngine().GetText());
 ESelection aOrigSelection(GetOutlinerView()->GetEditView().GetSelection());
 
 // get text from SwPostItField and insert into our textview
-Engine()->SetModifyHdl( Link() );
-Engine()->EnableUndo( false );
+mpOutliner->SetModifyHdl( Link() );
+mpOutliner->EnableUndo( false );
 if( mpField->GetTextObject() )
-Engine()->SetText( *mpField->GetTextObject() );
+mpOutliner->SetText( *mpField->GetTextObject() );
 else
 {
-Engine()->Clear();
+mpOutliner->Clear();
 GetOutlinerView()->SetAttribs(DefaultItem());
 GetOutlinerView()->InsertText(sNewText);
 }
 
-Engine()->ClearModifyFlag();
-Engine()->GetUndoManager().Clear();
-Engine()->EnableUndo( true );
-Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) );
+mpOutliner->ClearModifyFlag();
+mpOutliner->GetUndoManager().Clear();
+mpOutliner->EnableUndo( true );
+mpOutliner->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) );
 if (bTextUnchanged)
 GetOutlinerView()->GetEditView().SetSelection(aOrigSelection);
 if (bCursorVisible)
@@ -229,17 +229,17 @@ void SwAnnotationWin::SetPostItText()
 
 void SwAnnotationWin::UpdateData()
 {
-if ( Engine()->IsModified() )
+if ( mpOutliner->IsModified() )
 {
 IDocumentUndoRedo & rUndoRedo(
-DocView().GetDocShell()->GetDoc()->GetIDocumentUndoRedo());
+mrView.GetDocShell()->GetDoc()->GetIDocumentUndoRedo());
 std::unique_ptr pOldField;
 if (rUndoRedo.DoesUndo())
 {
 pOldField.reset(mpField->Copy());
 }
-mpField->SetPar2(Engine()->GetEditEngine().GetText());
-mpField->SetTextObject(Engine()->CreateParaObject());
+mpField->SetPar2(mpOutliner->GetEditEngine().GetText());
+mpField->SetTextObject(mpOutliner->CreateParaObject());
 if (rUndoRedo.DoesUndo())
 {
 SwTextField *const pTextField = mpFormatField->GetTextField();
@@ -249,18 +249,18 @@ void SwAnnotationWin::UpdateData()
 new SwUndoFieldFromDoc(aPosition, *pOldField, *mpField, 
nullptr, true));
 }
 // so we get a new layout of notes (anchor position is still the same 
and we would otherwise not get one)
-Mgr().SetLayout();
+mrMgr.SetLayout();
 // #i98686# if we have several views, all notes should update their 
text
 mpFormatField->Broadcast(SwFormatFieldHint( nullptr, 
SwFormatFieldHintWhich::CHANGED));
-DocView().GetDocShell()->SetModified();
+mrView.GetDocShell()->SetModified();
 }
-Engine()->ClearModifyFlag();
-Engine()->GetUndoManager().Clear();
+mpOutliner->ClearModifyFlag();
+mpOutliner->GetUndoManager().Clear();
 }
 
 void SwAnnotationWin::Delete()
 {
-if (DocView().GetWrtShellPtr()->GotoField(*mpFormatField))
+if (mrView.GetWrtShellPtr()->GotoField(*mpFormatField))
 {
 if ( mrMgr.GetActiveSidebarWin() == this)
 {
@@ -274,21 +274,21 @@ void SwAnnotationWin::Delete()
 }
 // we delete the field directly, the Mgr cleans up the PostIt by 
listening
 GrabFocusToDocument();
-DocView().GetWrtShel

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

2017-04-11 Thread Noel Grandin
 sc/source/filter/inc/root.hxx   |   16 
 sc/source/filter/lotus/lotattr.cxx  |2 +-
 sc/source/filter/lotus/lotform.cxx  |2 +-
 sc/source/filter/lotus/lotimpop.cxx |   17 ++---
 sc/source/filter/lotus/lotread.cxx  |4 ++--
 sc/source/filter/lotus/op.cxx   |4 ++--
 6 files changed, 20 insertions(+), 25 deletions(-)

New commits:
commit b9dbd58cdd3767ee5d574023c6331932440275b9
Author: Noel Grandin 
Date:   Tue Apr 11 10:04:59 2017 +0200

loplugin:inlinefields in LOTUS_ROOT

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

diff --git a/sc/source/filter/inc/root.hxx b/sc/source/filter/inc/root.hxx
index d74a7ed62538..377a62266f64 100644
--- a/sc/source/filter/inc/root.hxx
+++ b/sc/source/filter/inc/root.hxx
@@ -25,6 +25,10 @@
 #include "flttypes.hxx"
 #include "filter.hxx"
 #include "excdefs.hxx"
+#include "lotattr.hxx"
+#include "lotfntbf.hxx"
+#include "lotrange.hxx"
+#include 
 
 class ScRangeName;
 
@@ -81,22 +85,18 @@ protected:
 
 // Lotus Imp~/Exp~ -
 
-class LotusRangeList;
-class LotusFontBuffer;
-class LotAttrTable;
-
 struct LOTUS_ROOT
 {
 ScDocument* pDoc;
-LotusRangeList* pRangeNames;
+LotusRangeList  maRangeNames;
 ScRangeName*pScRangeName;
 rtl_TextEncodingeCharsetQ;
 Lotus123Typ eFirstType;
 Lotus123Typ eActType;
 ScRange aActRange;
-RangeNameBufferWK3* pRngNmBffWK3;
-LotusFontBuffer*pFontBuff;
-LotAttrTable*   pAttrTable;
+std::unique_ptr pRngNmBffWK3;
+LotusFontBuffer maFontBuff;
+LotAttrTablemaAttrTable;
 
 LOTUS_ROOT( ScDocument* pDocP, rtl_TextEncoding eQ );
 ~LOTUS_ROOT();
diff --git a/sc/source/filter/lotus/lotattr.cxx 
b/sc/source/filter/lotus/lotattr.cxx
index d9d9ac4cdad0..863afbeebe27 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -101,7 +101,7 @@ const ScPatternAttr& LotAttrCache::GetPattAttr( const 
LotAttrWK3& rAttr )
 
 pAkt->nHash0 = nRefHash;
 
-mpLotusRoot->pFontBuff->Fill( rAttr.nFont, rItemSet );
+mpLotusRoot->maFontBuff.Fill( rAttr.nFont, rItemSet );
 
 sal_uInt8 nLine = rAttr.nLineStyle;
 if( nLine )
diff --git a/sc/source/filter/lotus/lotform.cxx 
b/sc/source/filter/lotus/lotform.cxx
index cec80e44f2b2..c066684443e7 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -389,7 +389,7 @@ void LotusToSc::Convert( const ScTokenArray*& rpErg, 
sal_Int32& rRest )
 LR_ID   nId;
 TokenId nNewId;
 
-LotusRangeList& rRangeList = *m_rContext.pLotusRoot->pRangeNames;
+LotusRangeList& rRangeList = m_rContext.pLotusRoot->maRangeNames;
 
 FuncType1*  pIndexToType;
 FuncType2*  pIndexToToken;
diff --git a/sc/source/filter/lotus/lotimpop.cxx 
b/sc/source/filter/lotus/lotimpop.cxx
index 9babc9354871..087f93faacb2 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -42,23 +42,18 @@
 LOTUS_ROOT::LOTUS_ROOT( ScDocument* pDocP, rtl_TextEncoding eQ )
 :
 pDoc( pDocP),
-pRangeNames( new LotusRangeList(this)),
+maRangeNames( this ),
 pScRangeName( pDocP->GetRangeName()),
 eCharsetQ( eQ),
 eFirstType( Lotus123Typ::X),
 eActType( Lotus123Typ::X),
 pRngNmBffWK3( new RangeNameBufferWK3(this)),
-pFontBuff( new LotusFontBuffer),
-pAttrTable( new LotAttrTable(this))
+maAttrTable( this )
 {
 }
 
 LOTUS_ROOT::~LOTUS_ROOT()
 {
-delete pRangeNames;
-delete pRngNmBffWK3;
-delete pFontBuff;
-delete pAttrTable;
 }
 
 static osl::Mutex aLotImpSemaphore;
@@ -354,7 +349,7 @@ void ImportLotus::Font_Face()
 Read( aName );
 
 LotusContext &rContext = aConv.getContext();
-rContext.pLotusRoot->pFontBuff->SetName( nNum, aName );
+rContext.pLotusRoot->maFontBuff.SetName( nNum, aName );
 }
 
 void ImportLotus::Font_Type()
@@ -364,7 +359,7 @@ void ImportLotus::Font_Type()
 {
 sal_uInt16 nType;
 Read( nType );
-rContext.pLotusRoot->pFontBuff->SetType( nCnt, nType );
+rContext.pLotusRoot->maFontBuff.SetType( nCnt, nType );
 }
 }
 
@@ -375,7 +370,7 @@ void ImportLotus::Font_Ysize()
 {
 sal_uInt16 nSize;
 Read( nSize );
-rContext.pLotusRoot->pFontBuff->SetHeight( nCnt, nSize );
+rContext.pLotusRoot->maFontBuff.SetHeight( nCnt, nSize );
 }
 }
 
@@ -412,7 +407,7 @@ void ImportLotus::Row_( const sal_uInt16 nRecLen )
 Read( nRepeats );
 
 if( aAttr.HasStyles() )
-rContext.pLotusRoot->pAttrTable->SetAttr(
+rContext.pLotusRoot->maAttrTable.SetAttr(
 nColCnt, static_cast ( nColCnt + nRepeats ), nRow, 
aAttr );
 
  

AW: LO 5.3.2.2: msi silent install: UI_LANGS property seems not to work as expected

2017-04-11 Thread Juergen Funk Mailinglist
Hi Oliver,

the Parameter ADDLOCAL=ALL overwrite the other parameter and install ALL, in 
your case you should given all parameter that you need, without ADDLOCAL=ALL. 
That is the define of the MSI, but I not sure it is right the parameter 
"UI_LANGS=en_US,de".
I think you should given 
ADDLOCAL=gm_Prg,gm_Optional,gm_Langpack_r_de,gm_Langpack_r_en_US,gm_Helppack_r_de,gm_Helppack_en_US
This information is in the MSI you can see this with the program "Orca" (it is 
free). 

But I am nor really sure, and not tested.

Hope it helps
Juergen
  

> -Ursprüngliche Nachricht-
> Von: LibreOffice [mailto:libreoffice-boun...@lists.freedesktop.org] Im Auftrag
> von Oliver Brinzing
> Gesendet: Montag, 10. April 2017 18:56
> An: libreoffice@lists.freedesktop.org
> Betreff: LO 5.3.2.2: msi silent install: UI_LANGS property seems not to work 
> as
> expected
> 
> Hi,
> 
> i tried to do a silent msi install, selecting only a few ui languages:
> 
>  > https://wiki.documentfoundation.org/Deployment_and_Migration
>  > With LibreOffice 3.5.5 and higher, language selection works as follows.
>  > msiexec /i Lib_.msi UI_LANGS=en_US,de
> 
> msiexec /qb /passive /i LibreOffice_5.3.2_Win_x86.msi /L*V lo_install.log
> INSTALLLOCATION="C:\Program Files (x86)\LibreOffice" ALLUSERS=1
> ADDLOCAL=ALL CREATEDESKTOPLINK=0
> REGISTER_NO_MSO_TYPES=1 UI_LANGS=en_US,de
> ISCHECKFORPRODUCTUPDATES=0 REBOOTYESNO=No QUICKSTART=1
> VC_REDIST=1
> REMOVE=gm_o_Onlineupdate,gm_r_ex_Dictionary_Af,gm_r_ex_Dictionary_An,
> gm_r_ex_Dictionary_Ar,...
> 
> but it seems, UI_LANGS property is ignored - all ui languages ire installed.
> 
> any hints?
> 
> Regards
> Oliver
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-04-11 Thread Miklos Vajna
 sw/source/uibase/docvw/SidebarScrollBar.hxx |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit a94ef79826fdb52bcde2d0ee8b76da6df46962f2
Author: Miklos Vajna 
Date:   Tue Apr 11 12:42:09 2017 +0200

sw: fix indentation in SidebarScrollBar

Change-Id: Ida2e22690a2fc9e6319701e401ea66aa47d4c081

diff --git a/sw/source/uibase/docvw/SidebarScrollBar.hxx 
b/sw/source/uibase/docvw/SidebarScrollBar.hxx
index e85eaedf0798..67c639f49770 100644
--- a/sw/source/uibase/docvw/SidebarScrollBar.hxx
+++ b/sw/source/uibase/docvw/SidebarScrollBar.hxx
@@ -14,9 +14,13 @@
 
 class SwView;
 
-namespace sw { namespace annotation {
-class SwAnnotationWin;
-} }
+namespace sw
+{
+namespace annotation
+{
+class SwAnnotationWin;
+}
+}
 
 namespace sw
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Re[2]: ios LibreOfficeKit

2017-04-11 Thread Tor Lillqvist
Did you first build the LibreOffice code for iOS as described in
README.cross etc (which no doubt is a bit outdated, but understanding and
adapting as necessary is a skill expected from people who intend to hack on
this)?

Just opening the LibreOfficeLight project directly in Xcode and trying to
build it will almost certainly not work. (Possibly janIV intends to make it
work?)

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


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

2017-04-11 Thread Eike Rathke
 sc/source/ui/view/tabvwshf.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9826eb9b6bad6f21801dd8a0016bb770085a9072
Author: Eike Rathke 
Date:   Fri Apr 7 16:20:37 2017 +0200

out-of-bounds tab access when deleting second last sheet

Which in a debug build lead to STL assert
Error: attempt to subscript container with out-of-bounds index

Change-Id: I09fddbc9e4b214b0313c193f85830ed458d20c0e
(cherry picked from commit 0c55972d747511dbc711f3c9cbb4db5d8c5dc2ff)
Reviewed-on: https://gerrit.libreoffice.org/36274
Reviewed-by: Markus Mohrhard 
Tested-by: Jenkins 

diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index a62c76e2d6e3..35d89eb15acb 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -624,13 +624,13 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
 {
 TheTabs.push_back(i);
 bTabFlag = true;
-if (nNewTab == i)
+if (nNewTab == i && i+1 < nTabCount)
 nNewTab++;
 }
 if (!bTabFlag)
 nFirstTab = i;
 }
-if (nNewTab >= nTabCount)
+if (nNewTab >= nTabCount - 
static_cast(TheTabs.size()))
 nNewTab = nFirstTab;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Eike Rathke
 sc/source/ui/view/tabvwshf.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ff2f47bd2e08a00bff71803db390b09080f9c728
Author: Eike Rathke 
Date:   Fri Apr 7 16:20:37 2017 +0200

out-of-bounds tab access when deleting second last sheet

Which in a debug build lead to STL assert
Error: attempt to subscript container with out-of-bounds index

Change-Id: I09fddbc9e4b214b0313c193f85830ed458d20c0e
(cherry picked from commit 0c55972d747511dbc711f3c9cbb4db5d8c5dc2ff)
Reviewed-on: https://gerrit.libreoffice.org/36273
Reviewed-by: Markus Mohrhard 
Tested-by: Jenkins 

diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 63ba25e160a8..49bed795dd0d 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -624,13 +624,13 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
 {
 TheTabs.push_back(i);
 bTabFlag = true;
-if (nNewTab == i)
+if (nNewTab == i && i+1 < nTabCount)
 nNewTab++;
 }
 if (!bTabFlag)
 nFirstTab = i;
 }
-if (nNewTab >= nTabCount)
+if (nNewTab >= nTabCount - 
static_cast(TheTabs.size()))
 nNewTab = nFirstTab;
 }
 
___
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-04-11 Thread Henry Castro
 loleaflet/src/layer/marker/Annotation.js |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit a64704ab00becf3886c2c2ee4c2ccd389a81
Author: Henry Castro 
Date:   Mon Apr 10 20:52:41 2017 -0400

loleaflet: save comment if exists changes

Change-Id: Ided5cc2f60ae14863e6462e400735e291f1b54a5
(cherry picked from commit 4db4ecd6803ba66ea5172d952db83eb2f6a50ebc)

diff --git a/loleaflet/src/layer/marker/Annotation.js 
b/loleaflet/src/layer/marker/Annotation.js
index a1630a4a..a1f22f60 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -116,6 +116,7 @@ L.Annotation = L.Layer.extend({
var button = L.DomUtil.create('input', 'loleaflet-controls', 
container);
button.type = 'button';
button.value = value;
+   L.DomEvent.on(button, 'mousedown', L.DomEvent.preventDefault);
L.DomEvent.on(button, 'click', handler, this);
},
 
@@ -172,7 +173,7 @@ L.Annotation = L.Layer.extend({
this._nodeReplyText = L.DomUtil.create(tagTextArea, 
classTextArea, this._nodeReply);
 
buttons = L.DomUtil.create(tagDiv, empty, this._nodeModify);
-   L.DomEvent.on(this._nodeModifyText, 'blur', 
this._onSaveComment, this);
+   L.DomEvent.on(this._nodeModifyText, 'blur', this._onLostFocus, 
this);
this._createButton(buttons, _(' Save '), this._onSaveComment);
this._createButton(buttons, cancel, this._onCancelClick);
buttons = L.DomUtil.create(tagDiv, empty, this._nodeReply);
@@ -206,6 +207,12 @@ L.Annotation = L.Layer.extend({
this._map.fire('AnnotationSave', {annotation: this});
},
 
+   _onLostFocus: function (e) {
+   if (this._contentText.innerHTML !== this._nodeModifyText.value) 
{
+   this._onSaveComment(e);
+   }
+   },
+
_onMouseClick: function (e) {
var target = e.target || e.srcElement;
L.DomEvent.stopPropagation(e);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - cui/uiconfig odk/docs odk/examples odk/index.html odk/index_online.html setup_native/source sfx2/uiconfig

2017-04-11 Thread Adolfo Jayme Barrientos
 cui/uiconfig/ui/aboutdialog.ui|2 
 odk/docs/install.html |2 
 odk/docs/tools.html   |2 
 odk/examples/DevelopersGuide/examples.html|2 
 odk/examples/examples.html|2 
 odk/index.html|2 
 odk/index_online.html |2 
 setup_native/source/packinfo/packinfo_brand.txt   |   16 +-
 setup_native/source/packinfo/packinfo_extensions.txt  |   10 -
 setup_native/source/packinfo/packinfo_office.txt  |  118 +-
 setup_native/source/packinfo/packinfo_office_help.txt |2 
 setup_native/source/packinfo/packinfo_office_lang.txt |   20 +--
 setup_native/source/packinfo/packinfo_sdkoo.txt   |2 
 setup_native/source/packinfo/packinfo_ure.txt |4 
 sfx2/uiconfig/ui/licensedialog.ui |2 
 15 files changed, 94 insertions(+), 94 deletions(-)

New commits:
commit 669210a3d8f7436192163f286f31dfa6c43c0697
Author: Adolfo Jayme Barrientos 
Date:   Sun Jan 1 17:39:23 2017 -0600

Bump copyright year to 2017

Change-Id: I26ddcdd7bb9616c0599eec9101603d4be1ea4147
(cherry picked from commit e5da108ef01872f460c176b6a9173e346e1d59a4)

diff --git a/cui/uiconfig/ui/aboutdialog.ui b/cui/uiconfig/ui/aboutdialog.ui
index d313cac4ef73..d55acee02e4d 100644
--- a/cui/uiconfig/ui/aboutdialog.ui
+++ b/cui/uiconfig/ui/aboutdialog.ui
@@ -197,7 +197,7 @@
 12
 12
 True
-Copyright © 
2000–2016 LibreOffice contributors.
+Copyright © 
2000–2017 LibreOffice contributors.
 center
 True
   
diff --git a/odk/docs/install.html b/odk/docs/install.html
index 8ad0e6b57d86..fad79c08d01f 100644
--- a/odk/docs/install.html
+++ b/odk/docs/install.html
@@ -507,7 +507,7 @@
 
 
   
-Copyright © 2000, 2016 LibreOffice contributors. All rights
+Copyright © 2000–2017 LibreOffice contributors. All rights
   reserved.
   LibreOffice was created by The Document Foundation, based on
   Apache OpenOffice, which is Copyright 2011 The Apache Software
diff --git a/odk/docs/tools.html b/odk/docs/tools.html
index b39e124d1405..b0b3379e8203 100644
--- a/odk/docs/tools.html
+++ b/odk/docs/tools.html
@@ -911,7 +911,7 @@ types the specified types depend on.
 
 
 
-Copyright © 2000, 2016 LibreOffice contributors. 
All rights reserved.
+Copyright © 2000–2017 LibreOffice contributors. 
All rights reserved.
 
 LibreOffice was created by The Document Foundation,
 based on Apache OpenOffice, which is Copyright 
2011,
diff --git a/odk/examples/DevelopersGuide/examples.html 
b/odk/examples/DevelopersGuide/examples.html
index dd8a9e22db2b..b9aeb7165cbc 100644
--- a/odk/examples/DevelopersGuide/examples.html
+++ b/odk/examples/DevelopersGuide/examples.html
@@ -2856,7 +2856,7 @@ for the Office application.
 
 
 
-Copyright © 2000, 2016 LibreOffice contributors. 
All rights reserved.
+Copyright © 2000–2017 LibreOffice contributors. 
All rights reserved.
 
 LibreOffice was created by The Document Foundation,
 based on Apache OpenOffice, which is Copyright 2011
diff --git a/odk/examples/examples.html b/odk/examples/examples.html
index 885c3864284d..ddcbb4dec5c6 100644
--- a/odk/examples/examples.html
+++ b/odk/examples/examples.html
@@ -810,7 +810,7 @@
 
 
 
-Copyright © 2000, 2016 LibreOffice contributors. 
All rights reserved.
+Copyright © 2000–2017 LibreOffice contributors. 
All rights reserved.
 
 LibreOffice was created by The Document Foundation,
 based on Apache OpenOffice, which is Copyright 2011
diff --git a/odk/index.html b/odk/index.html
index 9ca03f0ae072..24b4fbd99f6b 100644
--- a/odk/index.html
+++ b/odk/index.html
@@ -189,7 +189,7 @@
 
 
 
-Copyright © 2000, 2016 LibreOffice 
contributors. All rights reserved.
+Copyright © 2000–2017 LibreOffice 
contributors. All rights reserved.
 
 LibreOffice was created by The Document Foundation,

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

2017-04-11 Thread Noel Grandin
 compilerplugins/clang/constantparam.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit f762a7772b1faa5855b07ca78b221edbaba53b59
Author: Noel Grandin 
Date:   Tue Apr 11 10:17:02 2017 +0200

loplugin constantparam, ignore variadic methods

Change-Id: Ieabb020406d5a381dd9cbace3b1e4cc434857d54

diff --git a/compilerplugins/clang/constantparam.cxx 
b/compilerplugins/clang/constantparam.cxx
index f5a3d5317dd1..d748919b0c7d 100644
--- a/compilerplugins/clang/constantparam.cxx
+++ b/compilerplugins/clang/constantparam.cxx
@@ -97,6 +97,8 @@ void ConstantParam::addToCallSet(const FunctionDecl* 
functionDecl, int paramInde
 
 if (!functionDecl->getNameInfo().getLoc().isValid())
 return;
+if (functionDecl->isVariadic())
+return;
 if (ignoreLocation(functionDecl))
 return;
 // ignore stuff that forms part of the stable URE interface
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Dian Fishekqi license statement

2017-04-11 Thread Dian Fishekqi
All of my past & future contributions to LibreOffice may be licensed under the 
GPLv3+ license.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-5-2' - 74 commits - bin/lo-pack-sources bin/symstore.sh cli_ure/source configmgr/source configure.ac cui/source cui/uiconfig editeng/sour

2017-04-11 Thread Samuel Mehrbrodt
Rebased ref, commits from common ancestor:
commit ebe2acbebd8c7f375802f90a12b5d92691932194
Author: Samuel Mehrbrodt 
Date:   Fri Jan 27 16:57:49 2017 +0100

Symstore: Also add .exe and .dlls to symstore

These are needed when analyzing the minidump.

Change-Id: Ife296c298e3b2f1ca8a47dcbaaf1947e6aefdc81
Reviewed-on: https://gerrit.libreoffice.org/33631
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 
(cherry picked from commit 8a0416be440180d0a6cedd449307f6a9bde22eaa)

diff --git a/bin/symstore.sh b/bin/symstore.sh
index 56260c0b3906..b368eb3e6715 100755
--- a/bin/symstore.sh
+++ b/bin/symstore.sh
@@ -6,13 +6,17 @@ add_pdb()
 type=$2
 list=$3
 for file in $(find "${INSTDIR}/" -name "*.${extension}"); do
+# store dll/exe itself (needed for minidumps)
+if [ -f "$file" ]; then
+cygpath -w "$file" >> "$list"
+fi
+# store pdb file
 filename=$(basename "$file" ".${extension}")
 pdb="${WORKDIR}/LinkTarget/${type}/${filename}.pdb"
 if [ -f "$pdb" ]; then
 cygpath -w "$pdb" >> "$list"
 fi
 done
-
 }
 
 # check preconditions
commit d6873b8d79b415a323e9cf35e2731b9a022fc577
Author: Thorsten Behrens 
Date:   Sun Jan 15 11:50:27 2017 +0100

gbuild: populate local symstore on Windows

Script based on Lubos' tb master script from
http://nabble.documentfoundation.org/Daily-Win32-debug-builds-td4067279.html

Change-Id: I7f3247367a63078881f3cf51cf3e2cad59ad67b5
Reviewed-on: https://gerrit.libreoffice.org/33088
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 
(cherry picked from commit 17e9a5bf94eb08f88f8c78c9982dd0ce48a5e2d9)

diff --git a/Makefile.in b/Makefile.in
index f1bd93b4b72f..a51b17a3bdda 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -387,6 +387,7 @@ symbols:
mkdir -p $(WORKDIR)/symbols/
 ifeq ($(OS),WNT)
$(SRCDIR)/bin/symbolstore.py 
$(WORKDIR)/UnpackedTarball/breakpad/src/tools/windows/binaries/dump_syms.exe 
$(WORKDIR)/symbols/ $(INSTDIR)/program/*
+   $(SRCDIR)/bin/symstore.sh
 else
$(SRCDIR)/bin/symbolstore.py 
$(WORKDIR)/UnpackedTarball/breakpad/src/tools/linux/dump_syms/dump_syms 
$(WORKDIR)/symbols/ $(INSTDIR)/program/*
 endif
diff --git a/bin/symstore.sh b/bin/symstore.sh
new file mode 100755
index ..56260c0b3906
--- /dev/null
+++ b/bin/symstore.sh
@@ -0,0 +1,81 @@
+#!/usr/bin/env bash
+
+add_pdb()
+{
+extension=$1
+type=$2
+list=$3
+for file in $(find "${INSTDIR}/" -name "*.${extension}"); do
+filename=$(basename "$file" ".${extension}")
+pdb="${WORKDIR}/LinkTarget/${type}/${filename}.pdb"
+if [ -f "$pdb" ]; then
+cygpath -w "$pdb" >> "$list"
+fi
+done
+
+}
+
+# check preconditions
+if [ -z "${INSTDIR}" ] || [ -z "${WORKDIR}" ]; then
+echo "INSTDIR or WORKDIR not set - script expects calling inside buildenv"
+exit 1
+fi
+if [ ! -d "${INSTDIR}" ] || [ ! -d "${WORKDIR}" ]; then
+echo "INSTDIR or WORKDIR not present - script expects calling after full 
build"
+exit 1
+fi
+which symstore.exe > /dev/null 2>&1 || {
+echo "symstore.exe is expected in the PATH"
+exit 1
+}
+
+# defaults
+MAX_KEEP=5
+SYM_PATH=${WORKDIR}/symstore
+
+USAGE="Usage: $0 [-h|-k |-p ]
+   -h: this cruft
+   -k :   keep this number of old symbol versions around
+   (default: ${MAX_KEEP}. Set to 0 for unlimited)
+   -p :  specify full path to symbol store tree
+If no path is specified, defaults to ${SYM_PATH}.
+"
+
+# process args
+while :
+do
+   case "$1" in
+-k|--keep) MAX_KEEP="$2"; shift 2;;
+-p|--path) SYM_PATH="$2"; shift 2;;
+-h|--help) echo "${USAGE}"; exit 0; shift;;
+-*) echo "${USAGE}" >&2; exit 1;;
+*) break;;
+   esac
+done
+
+if [ $# -gt 0 ]; then
+echo "${USAGE}" >&2
+exit 1
+fi
+
+# populate symbol store from here
+TMPFILE=$(mktemp) || exit 1
+trap '{ rm -f ${TMPFILE}; }' EXIT
+
+# add dlls and executables
+add_pdb dll Library "${TMPFILE}"
+add_pdb exe Executable "${TMPFILE}"
+
+# stick all of it into symbol store
+symstore.exe add /compress /f "@$(cygpath -w "${TMPFILE}")" /s "$(cygpath -w 
"${SYM_PATH}")" /t "${PRODUCTNAME}" /v 
"${LIBO_VERSION_MAJOR}.${LIBO_VERSION_MINOR}.${LIBO_VERSION_MICRO}.${LIBO_VERSION_PATCH}${LIBO_VERSION_SUFFIX}${LIBO_VERSION_SUFFIX_SUFFIX}"
+rm -f "${TMPFILE}"
+
+# Cleanup symstore, older revisions will be removed.  Unless the
+# .dll/.exe changes, the .pdb should be shared, so with incremental
+# tinderbox several revisions should not be that space-demanding.
+if [ "${MAX_KEEP}" -gt 0 ] && [ -d "${SYM_PATH}/000Admin" ]; then
+to_remove=$(ls -1 "${SYM_PATH}/000Admin" | grep -v '\.txt' | grep -v 
'\.deleted' | sort | head -n "-${MAX_KEEP}")
+for revision in $to_remove; do
+symstore.exe del /i "${revision}" /s "$(cygpath -w "${SYM_PATH}")"
+done
+fi
commit 65c1d78503d2fb875786a37d51d7248b8f4d7

[Libreoffice-commits] core.git: Changes to 'distro/cib/libreoffice-5-3'

2017-04-11 Thread Thorsten Behrens
New branch 'distro/cib/libreoffice-5-3' available with the following commits:
commit 37040f873180f554c35743434ad06538cbf3e24e
Author: Thorsten Behrens 
Date:   Sun Jan 15 11:50:27 2017 +0100

gbuild: populate local symstore on Windows

Script based on Lubos' tb master script from
http://nabble.documentfoundation.org/Daily-Win32-debug-builds-td4067279.html

Change-Id: I7f3247367a63078881f3cf51cf3e2cad59ad67b5
Reviewed-on: https://gerrit.libreoffice.org/33088
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 
(cherry picked from commit 17e9a5bf94eb08f88f8c78c9982dd0ce48a5e2d9)

commit c6aec048002e3b8669227a4d0b3d65cdd47d23b7
Author: Thorsten Behrens 
Date:   Fri Dec 9 02:00:49 2016 +0100

cmis: add error handling on checkin

Change-Id: I3951a237789ee4b7697f70bc527ffbb6a626206a

commit f65d78a7ce3b2cafd7efad13bbc4aac815db528b
Author: Thorsten Behrens 
Date:   Fri Dec 9 02:40:53 2016 +0100

libcmis: error handling for datetime string parser

Change-Id: Ie5be0307fa8ac0292f7692f9674e07776cb1948d

commit 390774485f21dad3e4c6aaea01754c5782333b6b
Author: Katarina Behrens 
Date:   Wed Feb 10 14:42:18 2016 +0100

Branded images for msi installer

The sizes are 122 x 234, 374 x 44 installed units respectively, according to

http://msdn.microsoft.com/de-de/library/windows/desktop/aa369490%28v=vs.85%29.aspx

it is 163x312, 499x58 pixels at 96 dpi. I bumped dpi to 120 and it still 
looks pixelated,
but it's as good as it gets.

For better results, we need different graphics, with less fine details 
given the very limited
space

Change-Id: I4a7eafed16fd79f377d27afa8151cfab614b464b

commit 663cfba7eee1660da3ce1f6d70f7320707812772
Author: Katarina Behrens 
Date:   Tue Feb 9 11:09:30 2016 +0100

Branded application icons

sadly, this doesn't replace Windows taskbar icon, that must be living 
somewhere
else. It works on Linux though.

 Conflicts:
icon-themes/galaxy/res/main128.png
icon-themes/galaxy/res/mainapp_16.png
icon-themes/galaxy/res/mainapp_16_8.png
icon-themes/galaxy/res/mainapp_32.png
icon-themes/galaxy/res/mainapp_32_8.png
icon-themes/galaxy/res/mainapp_48_8.png

Change-Id: I028fc68d96f02113622c5e1ec3ed830ac797be0b

commit 3d7ae66ebc148409c0747d3d3b428203c1994361
Author: Katarina Behrens 
Date:   Tue Feb 9 10:38:29 2016 +0100

Point to CIB helpdesk

it's pretty mean, b/c German translation (which I can't change) says the 
site
is in English, while CIB site is in German only and can't be switched to 
other
lang

 Conflicts:
sfx2/source/appl/appserv.cxx

Change-Id: Ifbbb9e9d2bbee40998c07d1c68b61cd20d77dbc3

commit bf09722781727a79976faa3e536975f0489c7331
Author: Katarina Behrens 
Date:   Tue Feb 9 10:00:30 2016 +0100

Point to CIB website

this idiotic postprocess script hard-codes libreoffice.org for some reason, 
grr

Change-Id: Ide1f19d4da9a437e01118e8baf74c0d1a8ca2e10

commit df2011782185dff3f707e6917ab9a894420663f0
Author: Katarina Behrens 
Date:   Mon Sep 21 13:47:57 2015 +0200

CIB branding for start center

Conflicts:
icon-themes/galaxy/sfx2/res/startcenter-logo.png

Change-Id: I9887fded72131c7888d6e1b1165a778c8da2952d

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: filter/Configuration_filter.mk filter/Library_placeware.mk filter/Module_filter.mk filter/source l10ntools/source postprocess/Rdb_services.mk Repository.mk

2017-04-11 Thread Tor Lillqvist
 Repository.mk   |1 
 filter/Configuration_filter.mk  |2 
 filter/Library_placeware.mk |   45 -
 filter/Module_filter.mk |1 
 filter/source/config/cache/typedetection.cxx|1 
 filter/source/config/fragments/filters/placeware_Export.xcu |   30 
 filter/source/config/fragments/types/pwp_PlaceWare.xcu  |   29 
 filter/source/placeware/exporter.cxx|  497 
 filter/source/placeware/exporter.hxx|   53 -
 filter/source/placeware/filter.cxx  |  170 
 filter/source/placeware/filter.hxx  |   55 -
 filter/source/placeware/placeware.component |   25 
 filter/source/placeware/tempfile.cxx|   48 -
 filter/source/placeware/tempfile.hxx|   42 -
 filter/source/placeware/uno.cxx |   61 -
 filter/source/placeware/zip.cxx |  318 ---
 filter/source/placeware/zip.hxx |   61 -
 filter/source/placeware/zipfile.hxx |   38 
 l10ntools/source/gRun.sh|4 
 postprocess/Rdb_services.mk |1 
 20 files changed, 2 insertions(+), 1480 deletions(-)

New commits:
commit 036fcf2a4c0b630548a93bb20bd861940ba295f0
Author: Tor Lillqvist 
Date:   Wed Apr 5 23:39:35 2017 +0300

tdf#105809: Drop the PlaceWare export filter

Hard to think of any reason why anybody would need it.

Change-Id: If989cdeb1728847973da601f9d3fa60aba1f3bad
Reviewed-on: https://gerrit.libreoffice.org/36169
Tested-by: Jenkins 
Reviewed-by: Tor Lillqvist 

diff --git a/Repository.mk b/Repository.mk
index 7dbaed79adce..7c2a7467e247 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -268,7 +268,6 @@ $(eval $(call 
gb_Helper_register_executables_for_install,OOO,tde, \
 
 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,impress, \
animcore \
-   placeware \
PresenterScreen \
PresentationMinimizer \
wpftimpress \
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index 4f0ef2ce6bb6..7f3843cd47fe 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -589,7 +589,6 @@ $(eval $(call 
filter_Configuration_add_types,fcfg_langpack,fcfg_impress_types.xc
impress_StarOffice_XML_Impress \
impress_StarOffice_XML_Impress_Template \
pdf_Portable_Document_Format \
-   pwp_PlaceWare \
impress8 \
impress8_template \
draw8 \
@@ -615,7 +614,6 @@ $(eval $(call 
filter_Configuration_add_filters,fcfg_langpack,fcfg_impress_filter
StarOffice_XML__Impress_ \
impress_StarOffice_XML_Impress_Template \
impress_pdf_Export \
-   placeware_Export \
impress8 \
impress8_template \
impress8_draw \
diff --git a/filter/Library_placeware.mk b/filter/Library_placeware.mk
deleted file mode 100644
index 439293fb43c3..
--- a/filter/Library_placeware.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This file incorporates work covered by the following license notice:
-#
-#   Licensed to the Apache Software Foundation (ASF) under one or more
-#   contributor license agreements. See the NOTICE file distributed
-#   with this work for additional information regarding copyright
-#   ownership. The ASF licenses this file to you under the Apache
-#   License, Version 2.0 (the "License"); you may not use this file
-#   except in compliance with the License. You may obtain a copy of
-#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
-#
-
-$(eval $(call gb_Library_Library,placeware))
-
-$(eval $(call 
gb_Library_set_componentfile,placeware,filter/source/placeware/placeware))
-
-$(eval $(call gb_Library_use_external,placeware,boost_headers))
-
-$(eval $(call gb_Library_use_sdk_api,placeware))
-
-$(eval $(call gb_Library_use_libraries,placeware,\
-   comphelper \
-   cppuhelper \
-   cppu \
-   sal \
-   sax \
-   $(gb_UWINAPI) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,placeware,\
-   filter/source/placeware/exporter \
-   filter/source/placeware/filter \
-   filter/source/placeware/tempfile \
-   filter/source/placeware/uno \
-   filter/source/placeware/zip \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk
index 884ec28c0f38..45cd545

Re: Re[2]: ios LibreOfficeKit

2017-04-11 Thread jan i.
On Tue, 11 Apr 2017 at 12:44, Tor Lillqvist  wrote:

> Did you first build the LibreOffice code for iOS as described in
> README.cross etc (which no doubt is a bit outdated, but understanding and
> adapting as necessary is a skill expected from people who intend to hack on
> this)?
>
> Just opening the LibreOfficeLight project directly in Xcode and trying to
> build it will almost certainly not work. (Possibly janIV intends to make it
> work?)
>

Correct, you need to run "make" first, that generates some of the files
needed for the project. If you are on a mac all you need is to do is define
the xcode level and ios in autogen.input.

I do not as such intend to be able to build LibreOfficeLight without having
run make first. But there is an IDE project also ongoing, that allows you
to build the whole of libreoffice in Xcode.

Rgds
Jan I.


> --tml
>
> --
Sent from My iPad, sorry for any misspellings.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-04-11 Thread Eike Rathke
 sc/source/core/data/postit.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 24d935164f553bb4daa9be591c9cb392a86f06cd
Author: Eike Rathke 
Date:   Tue Apr 11 13:41:44 2017 +0200

there are still cases where the caption pointer is dangling

Change-Id: I8c186fa32d7fc3f26d7952268cb1e614025ecf37

diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 02502ed93c84..d2ef02f37b22 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -692,6 +692,10 @@ void ScCaptionPtr::decRefAndDestroy()
 assert(!mpNext);// this must be one and only one
 assert(mpCaption);
 
+#if 1
+// FIXME: there are still cases where the caption pointer is dangling
+mpCaption = nullptr;
+#else
 // Destroying Draw Undo deletes its SdrObject, don't attempt that 
twice.
 if (!mbInUndo)
 {
@@ -705,6 +709,7 @@ void ScCaptionPtr::decRefAndDestroy()
 SdrObject::Free( pObj );
 }
 }
+#endif
 delete mpHead;
 mpHead = nullptr;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Miklos Vajna
 vcl/qa/cppunit/pdfexport/data/tdf107089.odt |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx  |   38 
 vcl/source/gdi/pdfwriter_impl.cxx   |   38 +++-
 3 files changed, 65 insertions(+), 11 deletions(-)

New commits:
commit 9e8598c42a1a6f2fbd88711aa9bea5961eaf7b4a
Author: Miklos Vajna 
Date:   Tue Apr 11 12:42:23 2017 +0200

tdf#107089 PDF export of PDF images: handle mixed filters of page streams

It's allowed to compress different page streams differently, and we must
have a single object stream for our form XObject, so just incompress all
of them to be consistent.

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

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf107089.odt 
b/vcl/qa/cppunit/pdfexport/data/tdf107089.odt
new file mode 100644
index ..5b944a98
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf107089.odt differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index aacf36b2796b..1b9eaf153d2c 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -54,6 +54,7 @@ public:
 void testTdf106972Pdf17();
 void testTdf107013();
 void testTdf107018();
+void testTdf107089();
 #endif
 
 CPPUNIT_TEST_SUITE(PdfExportTest);
@@ -67,6 +68,7 @@ public:
 CPPUNIT_TEST(testTdf106972Pdf17);
 CPPUNIT_TEST(testTdf107013);
 CPPUNIT_TEST(testTdf107018);
+CPPUNIT_TEST(testTdf107089);
 #endif
 CPPUNIT_TEST_SUITE_END();
 };
@@ -452,6 +454,42 @@ void PdfExportTest::testTdf107018()
 // copying the page stream of a PDF image.
 CPPUNIT_ASSERT_EQUAL(OString("Pages"), pName->GetValue());
 }
+
+void PdfExportTest::testTdf107089()
+{
+vcl::filter::PDFDocument aDocument;
+load("tdf107089.odt", aDocument);
+
+// Get access to the only image on the only page.
+std::vector aPages = aDocument.GetPages();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size());
+vcl::filter::PDFObjectElement* pResources = 
aPages[0]->LookupObject("Resources");
+CPPUNIT_ASSERT(pResources);
+auto pXObjects = 
dynamic_cast(pResources->Lookup("XObject"));
+CPPUNIT_ASSERT(pXObjects);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pXObjects->GetItems().size());
+vcl::filter::PDFObjectElement* pXObject = 
pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+CPPUNIT_ASSERT(pXObject);
+
+// Get access to the form object inside the image.
+auto pXObjectResources = 
dynamic_cast(pXObject->Lookup("Resources"));
+CPPUNIT_ASSERT(pXObjectResources);
+auto pXObjectForms = 
dynamic_cast(pXObjectResources->LookupElement("XObject"));
+CPPUNIT_ASSERT(pXObjectForms);
+vcl::filter::PDFObjectElement* pForm = 
pXObjectForms->LookupObject(pXObjectForms->GetItems().begin()->first);
+CPPUNIT_ASSERT(pForm);
+
+// Make sure 'Hello' is part of the form object's stream.
+vcl::filter::PDFStreamElement* pStream = pForm->GetStream();
+CPPUNIT_ASSERT(pStream);
+SvMemoryStream& rObjectStream = pStream->GetMemory();
+OString aHello("Hello");
+auto pStart = static_cast(rObjectStream.GetData());
+const char* pEnd = pStart + rObjectStream.GetSize();
+auto it = std::search(pStart, pEnd, aHello.getStr(), aHello.getStr() + 
aHello.getLength());
+// This failed, 'Hello' was part only a mixed compressed/uncompressed 
stream, i.e. garbage.
+CPPUNIT_ASSERT(it != pEnd);
+}
 #endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION(PdfExportTest);
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 218ee883bdc5..f05c94e78e32 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -11178,7 +11178,8 @@ void 
PDFWriterImpl::writeReferenceXObject(ReferenceXObjectEmit& rEmit)
 "ColorSpace",
 "ExtGState",
 "Font",
-"XObject"
+"XObject",
+"Shading"
 };
 for (const auto& rKey : aKeys)
 aLine.append(copyExternalResources(*pPage, rKey, 
aCopiedResources));
@@ -11189,14 +11190,6 @@ void 
PDFWriterImpl::writeReferenceXObject(ReferenceXObjectEmit& rEmit)
 aLine.append(aSize.Height());
 aLine.append(" ]");
 
-// For now assume that all the content streams have the same filter.
-auto pFilter = 
dynamic_cast(aContentStreams[0]->Lookup("Filter"));
-if (pFilter)
-{
-aLine.append(" /Filter /");
-aLine.append(pFilter->GetValue());
-}
-
 aLine.append(" /Length ");
 
 sal_Int32 nLength = 0;
@@ -11212,8 +11205,31 @@ void 
PDFWriterImpl::writeReferenceXObject(ReferenceXObjectEmit& rEmit)
 
 SvMemoryStream& rPageStream = pPageStream->GetMemory();
 
-nLength += rPageStream.GetSize

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

2017-04-11 Thread Gulsah Kose
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |   10 ++
 sc/inc/document.hxx   |1 
 sc/inc/globstr.hrc|2 
 sc/inc/sc.hrc |2 
 sc/sdi/cellsh.sdi |2 
 sc/sdi/scalc.sdi  |   35 
++
 sc/source/core/data/document.cxx  |9 ++
 sc/source/ui/src/globstr.src  |8 ++
 sc/source/ui/view/cellsh.cxx  |   27 
+++
 sc/source/ui/view/cellsh1.cxx |   33 
+
 sc/source/ui/view/tabview3.cxx|2 
 sc/uiconfig/scalc/menubar/menubar.xml |2 
 12 files changed, 133 insertions(+)

New commits:
commit ec25d34fa3ac900950ff24fcb224f7e827352803
Author: Gulsah Kose 
Date:   Thu Mar 9 21:41:17 2017 +0300

tdf#84837 Add Show/Hide all comments commands to Calc.

Change-Id: I1e38335ff1269d0d464f03d23bfc5eba6e3b1532
Signed-off-by: Gulsah Kose 
Reviewed-on: https://gerrit.libreoffice.org/35020
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 6c168337d199..80cedf097f18 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -951,6 +951,16 @@
   Hide Comment
 
   
+  
+
+  Show All Comments
+
+  
+  
+
+  Hide All Comments
+
+  
   
 
   Comm~ent
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index bb28fb5a0fd0..2751c6ab79ce 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1104,6 +1104,7 @@ public:
 SCROW GetNotePosition( SCTAB nTab, SCCOL nCol, size_t nIndex ) const;
 
 SC_DLLPUBLIC void GetAllNoteEntries( std::vector& rNotes ) 
const;
+SC_DLLPUBLIC void GetAllNoteEntries( SCTAB nTab, 
std::vector& rNotes ) const;
 void  GetNotesInRange( const ScRangeList& rRange, 
std::vector& rNotes ) const;
 bool  ContainsNotesInRange( const ScRangeList& rRange ) const;
 
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 6696945b7b23..eadfc9f5737c 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -232,6 +232,8 @@
 #define STR_UNDO_SHOWNOTE   176
 #define STR_UNDO_HIDENOTE   177
 #define STR_UNDO_DRAGDROP   178
+#define STR_UNDO_SHOWALLNOTES   179
+#define STR_UNDO_HIDEALLNOTES   180
 
 #define STR_IMPORT_LOTUS182
 #define STR_IMPORT_DBF  183
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 1fed6947dc9e..b6f24ae319c0 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -643,6 +643,8 @@
 
 #define FID_SHOW_NOTE   (SID_NEW_SLOTS+100)
 #define FID_HIDE_NOTE   (SID_NEW_SLOTS+101)
+#define FID_SHOW_ALL_NOTES  (SID_NEW_SLOTS+102)
+#define FID_HIDE_ALL_NOTES  (SID_NEW_SLOTS+103)
 
 // idl parameter
 
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 1daea78cf6c4..0ec5226d746b 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -210,6 +210,8 @@ interface CellSelection
 FID_NOTE_VISIBLE[ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
 FID_HIDE_NOTE   [ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
 FID_SHOW_NOTE   [ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
+FID_HIDE_ALL_NOTES  [ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
+FID_SHOW_ALL_NOTES  [ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
 SID_DELETE_NOTE [ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
 SID_DEC_INDENT  [ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
 SID_INC_INDENT  [ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index e95b7474b3c7..e57338fdd315 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -3616,6 +3616,41 @@ SfxBoolItem HideNote FID_HIDE_NOTE
 GroupId = GID_VIEW;
 ]
 
+SfxVoidItem ShowAllNotes FID_SHOW_ALL_NOTES
+
+[
+AutoUpdate = FALSE,
+FastCall = FALSE,
+ReadOnlyDoc = TRUE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+
+AccelConfig = TRUE,
+MenuConfig = TRUE,
+ToolBoxConfig = TRUE,
+GroupId = GID_VIEW;
+]
+
+SfxVoidItem HideAllNotes FID_HIDE_ALL_NOTES
+
+[
+AutoUpdate = FALSE,
+FastCall = FALSE,
+ReadOnlyDoc = TRUE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+
+   

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

2017-04-11 Thread Mark Hung
 sw/source/core/layout/ssfrm.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit b0459b45f431490b8fcf94ecc6b01365efe0a11e
Author: Mark Hung 
Date:   Mon Apr 10 21:28:35 2017 +0800

tdf#107057 revert the logic of SwFrame::PaintArea

It seems that getting the minimum of all the bottom
the window doesn't work when there are merged cells.

This reverts commit b13a0a27444ffbf9ef45cb16ad69fdff0dc64306.

Change-Id: I39a22a477874794912e44d4f56c2de27bc5e7179
Reviewed-on: https://gerrit.libreoffice.org/36382
Tested-by: Jenkins 
Reviewed-by: Mark Hung 

diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index fa2e5673ea49..2a4fd7421347 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -562,7 +562,6 @@ const SwRect SwFrame::PaintArea() const
 SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : 
fnRectHori;
 long nRight = (aRect.*fnRect->fnGetRight)();
 long nLeft  = (aRect.*fnRect->fnGetLeft)();
-long nBottom = (aRect.*fnRect->fnGetBottom)();
 const SwFrame* pTmp = this;
 bool bLeft = true;
 bool bRight = true;
@@ -574,7 +573,6 @@ const SwRect SwFrame::PaintArea() const
 nRowSpan = static_cast(pTmp)->GetTabBox()->getRowSpan();
 long nTmpRight = (pTmp->Frame().*fnRect->fnGetRight)();
 long nTmpLeft = (pTmp->Frame().*fnRect->fnGetLeft)();
-long nTmpBottom = (pTmp->Frame().*fnRect->fnGetBottom)();
 if( pTmp->IsRowFrame() && nRowSpan > 1 )
 {
 const SwFrame* pNxt = pTmp;
@@ -590,8 +588,6 @@ const SwRect SwFrame::PaintArea() const
 pTmp->IsCellFrame() || pTmp->IsRowFrame() || //nobody leaves a 
table!
 pTmp->IsRootFrame() )
 {
-if( nTmpBottom < nBottom )
-nBottom = nTmpBottom;
 if( bLeft || nLeft < nTmpLeft )
 nLeft = nTmpLeft;
 if( bRight || nTmpRight < nRight )
@@ -644,7 +640,6 @@ const SwRect SwFrame::PaintArea() const
 }
 (aRect.*fnRect->fnSetLeft)( nLeft );
 (aRect.*fnRect->fnSetRight)( nRight );
-(aRect.*fnRect->fnSetBottom)( nBottom );
 return aRect;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Various MacOS extension issues.

2017-04-11 Thread Stephan Bergmann

On 04/11/2017 10:35 AM, Adomas Venčkauskas wrote:

I just wanted to check if there are any plans for movement on this end.
The scope of LibreOffice codebase is way over my head to troubleshoot
this in any reasonable amount of time, but we might look for a
workaround in Zotero for the MessageBox issue. I've filed an issue
 for it, but
the conversation there was of limited productivity.


I myself at least unfortunately find time only sporadically to look into 
issues like that.



On 1 March 2017 at 16:34, Adomas Venčkauskas mailto:adomas@gmail.com>> wrote:

On 24 February 2017 at 18:04, Stephan Bergmann mailto:sberg...@redhat.com>>wrote:

should work now on master with

>
"Make JVM -Xrunjdwp option work on macOS"


​Thanks for ​looking into this. Meanwhile I've built with debug
logging enabled and got

CE>
warn:legacy.tools:52336:7:toolkit/source/helper/unowrapper.cxx:176:
UnoWrapper::SetWindowInterface: there already *is* a
WindowInterface for this window!

CE>
warn:legacy.tools:52336:7:toolkit/source/awt/vclxtoolkit.cxx:1301:
VCLXToolkit::createWindow: did #133706# resurge?


Btw, when run under Linux it also prints those two warnings, so they're 
probably more of a red herring.



​when trying to show a MessageBox with Java on MacOS. The example to
reproduce this is actually included with the SDK itself:
http://api.libreoffice.org/examples/DevelopersGuide/GUI/MessageBox.java

. This code properly shows a prompt on Linux, but doesn't on MacOS.


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


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

2017-04-11 Thread Noel Grandin
 lotuswordpro/source/filter/lwpfribtext.cxx   |9 +--
 lotuswordpro/source/filter/lwpfribtext.hxx   |2 -
 lotuswordpro/source/filter/lwplayout.cxx |   34 ++-
 lotuswordpro/source/filter/lwplayout.hxx |   12 -
 lotuswordpro/source/filter/lwppagelayout.cxx |   14 +--
 lotuswordpro/source/filter/lwppagelayout.hxx |6 ++--
 lotuswordpro/source/filter/lwppara1.cxx  |4 +--
 lotuswordpro/source/filter/lwpparastyle.cxx  |   18 +++---
 lotuswordpro/source/filter/lwpparastyle.hxx  |6 ++--
 9 files changed, 31 insertions(+), 74 deletions(-)

New commits:
commit c8e2ae1b915477c76d38352298570af309a36d85
Author: Noel Grandin 
Date:   Tue Apr 11 08:45:48 2017 +0200

loplugin:inlinefields in lotuswordpro

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

diff --git a/lotuswordpro/source/filter/lwpfribtext.cxx 
b/lotuswordpro/source/filter/lwpfribtext.cxx
index 1d2c61ed4b84..b7b6a2ffbe46 100644
--- a/lotuswordpro/source/filter/lwpfribtext.cxx
+++ b/lotuswordpro/source/filter/lwpfribtext.cxx
@@ -129,7 +129,7 @@ void LwpFribParaNumber::Read(LwpObjectStream* pObjStrm, 
sal_uInt16 /*len*/)
  * @short:   default constructor of LwpFribDocVar
  */
 LwpFribDocVar::LwpFribDocVar(LwpPara* pPara)
-: LwpFrib(pPara), m_nType(0), m_pName(new LwpAtomHolder)
+: LwpFrib(pPara), m_nType(0)
 {
 }
 /**
@@ -137,11 +137,6 @@ LwpFribDocVar::LwpFribDocVar(LwpPara* pPara)
  */
 LwpFribDocVar::~LwpFribDocVar()
 {
-if (m_pName)
-{
-delete m_pName;
-m_pName = nullptr;
-}
 }
 /**
  * @short:   Reading mothed of document variable frib.
@@ -151,7 +146,7 @@ LwpFribDocVar::~LwpFribDocVar()
 void LwpFribDocVar::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
 {
 m_nType = pObjStrm->QuickReaduInt16();
-m_pName->Read(pObjStrm);
+m_aName.Read(pObjStrm);
 }
 
 /**
diff --git a/lotuswordpro/source/filter/lwpfribtext.hxx 
b/lotuswordpro/source/filter/lwpfribtext.hxx
index 4917f96d5c43..79566424029c 100644
--- a/lotuswordpro/source/filter/lwpfribtext.hxx
+++ b/lotuswordpro/source/filter/lwpfribtext.hxx
@@ -166,7 +166,7 @@ public:
 
 private:
 sal_uInt16 m_nType;
-LwpAtomHolder* m_pName;
+LwpAtomHolder m_aName;
 OUString m_TimeStyle;
 void RegisterDefaultTimeStyle();
 void RegisterTotalTimeStyle();
diff --git a/lotuswordpro/source/filter/lwplayout.cxx 
b/lotuswordpro/source/filter/lwplayout.cxx
index 3c32355e776d..b5f5056ebf50 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -540,46 +540,32 @@ void LwpLayoutStyle::Read(LwpObjectStream* pStrm)
 }
 
 LwpLayoutMisc::LwpLayoutMisc() :
-m_nGridDistance(0), m_nGridType(0),
-m_pContentStyle(new LwpAtomHolder)
+m_nGridDistance(0), m_nGridType(0)
 {
 }
 
 LwpLayoutMisc::~LwpLayoutMisc()
 {
-if (m_pContentStyle)
-{
-delete m_pContentStyle;
-}
 }
 
 void LwpLayoutMisc::Read(LwpObjectStream* pStrm)
 {
 m_nGridType = pStrm->QuickReaduInt16();
 m_nGridDistance = pStrm->QuickReadInt32();
-m_pContentStyle->Read(pStrm);
+m_aContentStyle.Read(pStrm);
 pStrm->SkipExtra();
 }
 
 LwpMiddleLayout::LwpMiddleLayout( LwpObjectHeader &objHdr, LwpSvStream* pStrm )
 : LwpVirtualLayout(objHdr, pStrm)
-, m_pStyleStuff(new LwpLayoutStyle)
-, m_pMiscStuff(new LwpLayoutMisc)
 , m_bGettingGeometry(false)
 {
 }
 
 LwpMiddleLayout::~LwpMiddleLayout()
 {
-if (m_pStyleStuff)
-{
-delete m_pStyleStuff;
-}
-if (m_pMiscStuff)
-{
-delete m_pMiscStuff;
-}
 }
+
 void LwpMiddleLayout::Read()
 {
 LwpObjectStream* pStrm = m_pObjStrm.get();
@@ -605,11 +591,11 @@ void LwpMiddleLayout::Read()
 
 if (nWhatsItGot & DISK_GOT_STYLE_STUFF)
 {
-m_pStyleStuff->Read(pStrm);
+m_aStyleStuff.Read(pStrm);
 }
 if (nWhatsItGot & DISK_GOT_MISC_STUFF)
 {
-m_pMiscStuff->Read(pStrm);
+m_aMiscStuff.Read(pStrm);
 }
 
 m_LayGeometry.ReadIndexed(pStrm);
@@ -1473,15 +1459,11 @@ bool LwpMiddleLayout::HasContent()
 }
 
 LwpLayout::LwpLayout( LwpObjectHeader &objHdr, LwpSvStream* pStrm ) :
-LwpMiddleLayout(objHdr, pStrm), m_pUseWhen(new LwpUseWhen)
+LwpMiddleLayout(objHdr, pStrm)
 {}
 
 LwpLayout::~LwpLayout()
 {
-if (m_pUseWhen)
-{
-delete m_pUseWhen;
-}
 }
 
 void LwpLayout::Read()
@@ -1499,7 +1481,7 @@ void LwpLayout::Read()
 
 if (!nSimple)
 {
-m_pUseWhen->Read(pStrm);
+m_aUseWhen.Read(pStrm);
 
 sal_uInt8 nFlag = pStrm->QuickReaduInt8();
 if (nFlag)
@@ -1749,7 +1731,7 @@ LwpUseWhen* LwpLayout::VirtualGetUseWhen()
 {
 if(m_nOverrideFlag & OVER_PLACEMENT)
 {
-return m_pUseWhen;
+return &m_aUseWhen;
 }
 else
 {
diff --git a/lotuswordpro/source/filter/lwplayout.hxx 
b/lotusw

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

2017-04-11 Thread Eike Rathke
 sc/source/ui/view/cellsh.cxx |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit e7b1c70ea9cd13e229014191cb82775723e7f48d
Author: Eike Rathke 
Date:   Tue Apr 11 14:27:53 2017 +0200

nitpicks, tdf#84837 follow-up

* follow naming conventions (nSelTab vs. aTab for integer variable (nTab
  already used throughout function))
* if and for keywords followed by one blank
* checking bHasNotes / breaking twice is unnecessary, move the check into 
the
  loop condition instead

Change-Id: Ib48afbce7c75d146ecf4b674ef92e3b5f6cf063e

diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index ed5389bcf9b6..6a915c575f25 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -1050,19 +1050,13 @@ void ScCellShell::GetState(SfxItemSet &rSet)
 SCTAB nFirstSelected = rMark.GetFirstSelected();
 SCTAB nLastSelected = rMark.GetLastSelected();
 
-for( SCTAB aTab = nFirstSelected; aTab<=nLastSelected; 
aTab++ )
+for ( SCTAB nSelTab = nFirstSelected; nSelTab <= 
nLastSelected && !bHasNotes; nSelTab++ )
 {
-if (rMark.GetTableSelect(aTab) )
+if (rMark.GetTableSelect( nSelTab ))
 {
-if (pDoc->HasTabNotes( aTab ))
-{
+if (pDoc->HasTabNotes( nSelTab ))
 bHasNotes = true;
-break;
-}
 }
-
-if( bHasNotes ) //for break nested loop
-break;
 }
 
 if ( !bHasNotes )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Caolán McNamara
 sw/source/filter/ww8/ww8par.cxx  |   34 ++--
 sw/source/filter/ww8/ww8par.hxx  |2 
 sw/source/filter/ww8/ww8par2.cxx |   69 +
 sw/source/filter/ww8/ww8par2.hxx |2 
 sw/source/filter/ww8/ww8par3.cxx |   49 +++---
 sw/source/filter/ww8/ww8par4.cxx |   10 -
 sw/source/filter/ww8/ww8par5.cxx |4 
 sw/source/filter/ww8/ww8par6.cxx |  277 ++-
 sw/source/filter/ww8/ww8scan.cxx |  123 ++---
 sw/source/filter/ww8/ww8scan.hxx |   43 --
 10 files changed, 357 insertions(+), 256 deletions(-)

New commits:
commit b897cc4dfc7111eb8dfd5d8aa8c970f21ab035d6
Author: Caolán McNamara 
Date:   Mon Apr 10 21:10:57 2017 +0100

consistently track amount of buffers remaining

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

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 831082c032a3..93bcea47f060 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2534,7 +2534,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, 
WW8_CP nStartCp)
 OSL_ENSURE(m_nInTable >= 0,"nInTable < 0!");
 
 // TabRowEnd
-bool bTableRowEnd = (m_pPlcxMan->HasParaSprm(m_bVer67 ? 25 : 0x2417) != 
nullptr );
+bool bTableRowEnd = (m_pPlcxMan->HasParaSprm(m_bVer67 ? 25 : 0x2417).pSprm 
!= nullptr);
 
 // Unfortunately, for every paragraph we need to check first whether
 // they contain a sprm 29 (0x261B), which starts an APO.
@@ -2565,12 +2565,12 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, 
WW8_CP nStartCp)
 sal_uInt8 nCellLevel = 0;
 
 if (m_bVer67)
-nCellLevel = int(nullptr != m_pPlcxMan->HasParaSprm(24));
+nCellLevel = int(nullptr != m_pPlcxMan->HasParaSprm(24).pSprm);
 else
 {
-nCellLevel = int(nullptr != m_pPlcxMan->HasParaSprm(0x2416));
+nCellLevel = int(nullptr != m_pPlcxMan->HasParaSprm(0x2416).pSprm);
 if (!nCellLevel)
-nCellLevel = int(nullptr != m_pPlcxMan->HasParaSprm(0x244B));
+nCellLevel = int(nullptr != m_pPlcxMan->HasParaSprm(0x244B).pSprm);
 }
 do
 {
@@ -2584,8 +2584,9 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, 
WW8_CP nStartCp)
 WW8PLCFx_Cp_FKP* pPap = m_pPlcxMan->GetPapPLCF();
 WW8_CP nMyStartCp=nStartCp;
 
-if (const sal_uInt8 *pLevel = m_pPlcxMan->HasParaSprm(0x6649))
-nCellLevel = *pLevel;
+SprmResult aLevel = m_pPlcxMan->HasParaSprm(0x6649);
+if (aLevel.pSprm && aLevel.nRemainingData >= 1)
+nCellLevel = *aLevel.pSprm;
 
 bool bHasRowEnd = SearchRowEnd(pPap, nMyStartCp, 
(m_nInTableHasParaSprm( 13 );
-if( pSprm13 )
+SprmResult aSprm13 = m_pPlcxMan->HasParaSprm(13);
+const sal_uInt8* pSprm13 = aSprm13.pSprm;
+if (pSprm13 && aSprm13.nRemainingData >= 1)
 {   // Still Anl left?
 sal_uInt8 nT = static_cast< sal_uInt8 >(GetNumType( *pSprm13 
));
 if( ( nT != WW8_Pause && nT != m_nWwNumType ) // Anl change
@@ -4018,20 +4020,20 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP 
nTextLen, ManTypes nType)
 // If we have found a dropcap store the textnode
 pPreviousNode = m_pPaM->GetNode().GetTextNode();
 
-const sal_uInt8 *pDCS;
-
+SprmResult aDCS;
 if (m_bVer67)
-pDCS = m_pPlcxMan->GetPapPLCF()->HasSprm(46);
+aDCS = m_pPlcxMan->GetPapPLCF()->HasSprm(46);
 else
-pDCS = m_pPlcxMan->GetPapPLCF()->HasSprm(0x442C);
+aDCS = m_pPlcxMan->GetPapPLCF()->HasSprm(0x442C);
 
-if (pDCS)
-nDropLines = (*pDCS) >> 3;
+if (aDCS.pSprm && aDCS.nRemainingData >= 1)
+nDropLines = (*aDCS.pSprm) >> 3;
 else// There is no Drop Cap Specifier hence no dropcap
 pPreviousNode = nullptr;
 
-if (const sal_uInt8 *pDistance = 
m_pPlcxMan->GetPapPLCF()->HasSprm(0x842F))
-nDistance = SVBT16ToShort( pDistance );
+SprmResult aDistance = m_pPlcxMan->GetPapPLCF()->HasSprm(0x842F);
+if (aDistance.pSprm && aDistance.nRemainingData >= 2)
+nDistance = SVBT16ToShort(aDistance.pSprm);
 else
 nDistance = 0;
 
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 95481dc9622b..9c3d471f645b 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -164,7 +164,7 @@ private:
 std::vector maLSTInfos;
 std::vector> m_LFOInfos;// D. from PLF LFO, 
sorted exactly like in the WW8 Stream
 sal_uInt16   nUniqueList; // current number for creating unique list 
names
-sal_uInt8* Grp

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - net/Socket.hpp net/SslSocket.hpp

2017-04-11 Thread Ashod Nakashian
 net/Socket.hpp|2 +-
 net/SslSocket.hpp |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 5263e9d01042c2457f423b3240f1ac87105b58ce
Author: Ashod Nakashian 
Date:   Sun Apr 9 16:33:28 2017 -0400

wsd: don't call virtuals in dtors

Change-Id: I2490e2f63dc20cf6b3fa0be45341b041e3ccb1bf
Reviewed-on: https://gerrit.libreoffice.org/36321
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 2ad3cd4de169625f89911953f7311f157b6ee26d)
Reviewed-on: https://gerrit.libreoffice.org/36332
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 74caa5aa..38a2af85 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -643,7 +643,7 @@ public:
 if (!_shutdownSignalled)
 {
 _shutdownSignalled = true;
-closeConnection();
+StreamSocket::closeConnection();
 }
 }
 
diff --git a/net/SslSocket.hpp b/net/SslSocket.hpp
index 2e495883..4b5d1323 100644
--- a/net/SslSocket.hpp
+++ b/net/SslSocket.hpp
@@ -16,7 +16,7 @@
 #include "Socket.hpp"
 
 /// An SSL/TSL, non-blocking, data streaming socket.
-class SslStreamSocket : public StreamSocket
+class SslStreamSocket final : public StreamSocket
 {
 public:
 SslStreamSocket(const int fd, std::shared_ptr 
responseClient) :
@@ -55,7 +55,7 @@ public:
 if (!_shutdownSignalled)
 {
 _shutdownSignalled = true;
-closeConnection();
+SslStreamSocket::closeConnection();
 }
 
 SSL_free(_ssl);
___
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' - net/WebSocketHandler.hpp

2017-04-11 Thread Ashod Nakashian
 net/WebSocketHandler.hpp |   37 ++---
 1 file changed, 26 insertions(+), 11 deletions(-)

New commits:
commit 9ebf698a5ef85cfc21e64e28e0db2ea017087988
Author: Ashod Nakashian 
Date:   Sun Apr 9 18:20:52 2017 -0400

wsd: fix pinging and add logs

Apparently pinging was enabled only when
_not_ WebSocket upgraded, which is wrong.

Removed sending ping immediately after
upgrading to WS as it's superfluous.

Change-Id: Ic8103bab063d87f58d371f0eab49f7b7530e2374
Reviewed-on: https://gerrit.libreoffice.org/36322
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit e00817acf67111e6ffac2527c5faa4ed03190b56)
Reviewed-on: https://gerrit.libreoffice.org/36333
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp
index 66adbc0a..7c004c7c 100644
--- a/net/WebSocketHandler.hpp
+++ b/net/WebSocketHandler.hpp
@@ -273,16 +273,20 @@ public:
 }
 
 /// Send a ping message
-void sendPing(std::chrono::steady_clock::time_point now)
+void sendPing(std::chrono::steady_clock::time_point now,
+  const std::shared_ptr& socket)
 {
+assert(socket && "Expected a valid socket instance.");
+
 // Must not send this before we're upgraded.
-if (_wsState == WSState::WS)
+if (_wsState != WSState::WS)
 {
 LOG_WRN("Attempted ping on non-upgraded websocket!");
 _pingSent = now; // Pretend we sent it to avoid timing out 
immediately.
 return;
 }
-LOG_TRC("Send ping message");
+
+LOG_TRC("#" << socket->getFD() << ": Sending ping.");
 // FIXME: allow an empty payload.
 sendMessage("", 1, WSOpCode::Ping, false);
 _pingSent = now;
@@ -291,10 +295,14 @@ public:
 /// Do we need to handle a timeout ?
 void checkTimeout(std::chrono::steady_clock::time_point now) override
 {
-int timeSincePingMs =
+const int timeSincePingMs =
 std::chrono::duration_cast(now - 
_pingSent).count();
 if (timeSincePingMs >= PingFrequencyMs)
-sendPing(now);
+{
+const std::shared_ptr socket = _socket.lock();
+if (socket)
+sendPing(now, socket);
+}
 }
 
 /// By default rely on the socket buffer.
@@ -402,7 +410,12 @@ protected:
 const std::string wsKey = req.get("Sec-WebSocket-Key", "");
 const std::string wsProtocol = req.get("Sec-WebSocket-Protocol", 
"chat");
 // FIXME: other sanity checks ...
-LOG_INF("#" << socket->getFD() << ": WebSocket version " << wsVersion 
<< " key '" << wsKey << "'.");
+LOG_INF("#" << socket->getFD() << ": WebSocket version: " << wsVersion 
<<
+", key: [" << wsKey << "], protocol: [" << wsProtocol << "].");
+
+// Want very low latency sockets.
+socket->setNoDelay();
+socket->setSocketBufferSize(0);
 
 std::ostringstream oss;
 oss << "HTTP/1.1 101 Switching Protocols\r\n"
@@ -411,13 +424,15 @@ protected:
 << "Sec-WebSocket-Accept: " << 
PublicComputeAccept::doComputeAccept(wsKey) << "\r\n"
 << "\r\n";
 
-// Want very low latency sockets.
-socket->setNoDelay();
-socket->setSocketBufferSize(0);
+const std::string res = oss.str();
+LOG_TRC("#" << socket->getFD() << ": Sending WS Upgrade response: " << 
res);
+socket->send(res);
 
-socket->send(oss.str());
 _wsState = WSState::WS;
-sendPing(std::chrono::steady_clock::now());
+
+// No need to ping right upon connection/upgrade,
+// but do reset the time to avoid pinging immediately after.
+_pingSent = std::chrono::steady_clock::now();
 }
 };
 
___
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' - net/WebSocketHandler.hpp

2017-04-11 Thread Ashod Nakashian
 net/WebSocketHandler.hpp |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 07a4b4bd352a30f72483c57c2fc8c9401efc3098
Author: Ashod Nakashian 
Date:   Sun Apr 9 18:24:51 2017 -0400

wsd: return the actual number of bytes written to WS

Change-Id: Ib28c432927733ffd437d27dec749d402d25b9024
Reviewed-on: https://gerrit.libreoffice.org/36323
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 0dab4b597da5dd6531eaa8634dbafe69a8b41a40)
Reviewed-on: https://gerrit.libreoffice.org/36334
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp
index 7c004c7c..85cad811 100644
--- a/net/WebSocketHandler.hpp
+++ b/net/WebSocketHandler.hpp
@@ -195,11 +195,14 @@ public:
 } else
 _wsPayload.insert(_wsPayload.end(), data, data + payloadLen);
 
+assert(_wsPayload.size() >= payloadLen);
+
 socket->_inBuffer.erase(socket->_inBuffer.begin(), 
socket->_inBuffer.begin() + headerLen + payloadLen);
 
 // FIXME: fin, aggregating payloads into _wsPayload etc.
 LOG_TRC("#" << socket->getFD() << ": Incoming WebSocket message code " 
<< code <<
-" fin? " << fin << ", mask? " << hasMask << " payload length: 
" << _wsPayload.size());
+", fin? " << fin << ", mask? " << hasMask << ", payload 
length: " << _wsPayload.size() <<
+", residual socket data: " << socket->_inBuffer.size() << " 
bytes.");
 
 switch (code)
 {
@@ -340,6 +343,7 @@ protected:
 
 socket->assertCorrectThread();
 std::vector& out = socket->_outBuffer;
+const size_t oldSize = out.size();
 
 out.push_back(flags);
 
@@ -368,12 +372,12 @@ protected:
 
 // Copy the data.
 out.insert(out.end(), data, data + len);
+const size_t size = out.size() - oldSize;
 
 if (flush)
 socket->writeOutgoingData();
 
-// Data + header.
-return len + 2;
+return size;
 }
 
 /// To be overriden to handle the websocket messages the way you need.
___
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' - test/countloolkits.hpp

2017-04-11 Thread Ashod Nakashian
 test/countloolkits.hpp |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 3405593bef2b704752bcb8384f5e5b6bccad2200
Author: Ashod Nakashian 
Date:   Sun Apr 9 18:25:31 2017 -0400

wsd: reset the test start timer before the first assertions

So failing that first assert doesn't give bogus
test duration.

Change-Id: Iaad2e5654e1264bd126193205b5218fd0f6637ef
Reviewed-on: https://gerrit.libreoffice.org/36324
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 51aa4a33441b516a67cdb97b6e6e319480ee56c2)
Reviewed-on: https://gerrit.libreoffice.org/36335
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/test/countloolkits.hpp b/test/countloolkits.hpp
index d38ac829..a080ddf5 100644
--- a/test/countloolkits.hpp
+++ b/test/countloolkits.hpp
@@ -129,6 +129,8 @@ static std::chrono::steady_clock::time_point TestStartTime;
 
 static void testCountHowManyLoolkits()
 {
+TestStartTime = std::chrono::steady_clock::now();
+
 InitialLoolKitCount = countLoolKitProcesses(InitialLoolKitCount);
 CPPUNIT_ASSERT(InitialLoolKitCount > 0);
 
___
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/ClientSession.cpp wsd/DocumentBroker.cpp

2017-04-11 Thread Ashod Nakashian
 wsd/ClientSession.cpp  |4 ++--
 wsd/DocumentBroker.cpp |9 +
 2 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 23acf343fbb62847ba4e2a609a2a2fb5478e16e4
Author: Ashod Nakashian 
Date:   Sun Apr 9 19:41:29 2017 -0400

wsd: send recycling message to clients before going down

Change-Id: I388ca55524983d554fabf247bb3baee23010657d
Reviewed-on: https://gerrit.libreoffice.org/36329
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 679a39eb0b2272c56173ef2febd5281b152b1e45)
Reviewed-on: https://gerrit.libreoffice.org/36336
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 7ad8df31..883b30b1 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -769,8 +769,8 @@ void ClientSession::onDisconnect()
 }
 else
 {
-static const std::string msg("close: recycling");
-sendMessage(msg);
+LOG_TRC("Server recycling.");
+closeFrame();
 shutdown(WebSocketHandler::StatusCodes::ENDPOINT_GOING_AWAY);
 }
 }
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index f7bbd9f1..6f827175 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -254,6 +254,15 @@ void DocumentBroker::pollThread()
 _poll->continuePolling() << ", TerminationFlag: " << 
TerminationFlag <<
 ", ShutdownRequestFlag: " << ShutdownRequestFlag << ".");
 
+if (ShutdownRequestFlag)
+{
+static const std::string msg("close: recycling");
+for (const auto& pair : _sessions)
+{
+pair.second->sendMessage(msg);
+}
+}
+
 // Terminate properly while we can.
 //TODO: pass some sensible reason.
 terminateChild("", false);
___
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' - net/Socket.hpp

2017-04-11 Thread Ashod Nakashian
 net/Socket.hpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 78e2d97ae3750fa4b2487b4062a975083f82c83b
Author: Ashod Nakashian 
Date:   Sun Apr 9 20:56:39 2017 -0400

wsd: assert valid socket where it counts

Change-Id: I19faa175066cab4e0435f6a8bf29e6b051c86420
Reviewed-on: https://gerrit.libreoffice.org/36330
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit cdb80e56325ba0b4d9abbd438d085f6c91c75855)
Reviewed-on: https://gerrit.libreoffice.org/36337
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 38a2af85..f2c65d0c 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -273,12 +273,12 @@ public:
 void removeSockets()
 {
 LOG_DBG("Removing all sockets from " << _name << ".");
-assert(socket);
 assertCorrectThread();
 
 while (!_pollSockets.empty())
 {
 const std::shared_ptr& socket = _pollSockets.back();
+assert(socket);
 
 LOG_DBG("Removing socket #" << socket->getFD() << " from " << 
_name);
 socket->assertCorrectThread();
___
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' - test/httpwstest.cpp

2017-04-11 Thread Ashod Nakashian
 test/httpwstest.cpp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c8633a38e67bcd8aad257fea0e0eafb64e4d9666
Author: Ashod Nakashian 
Date:   Sun Apr 9 22:16:37 2017 -0400

wsd: fix testSlideShow to accept larger SVG exports

Change-Id: I29f0fb5b4573a7338e7244f8a1d2f9043223bc57
Reviewed-on: https://gerrit.libreoffice.org/36331
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 1312cdc9189156da7678e0e2c93a33893b77ee8b)
Reviewed-on: https://gerrit.libreoffice.org/36338
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/test/httpwstest.cpp b/test/httpwstest.cpp
index 033c5bd1..78d717fb 100644
--- a/test/httpwstest.cpp
+++ b/test/httpwstest.cpp
@@ -1181,9 +1181,9 @@ void HTTPWSTest::testSlideShow()
 (void)rs;
 // Some setups render differently; recognize these two valid output 
sizes for now.
 // Seems LO generates different svg content, even though visually 
identical.
-// Current known sizes: 434748, 451329, 467345, 468653.
+// Current known sizes: 434748, 451329, 467345, 468653, 483882.
 CPPUNIT_ASSERT(responseSVG.getContentLength() >= 
std::streamsize(43) &&
-   responseSVG.getContentLength() <= 
std::streamsize(47));
+   responseSVG.getContentLength() <= 
std::streamsize(49));
 }
 catch (const Poco::Exception& exc)
 {
___
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/LOOLWSD.cpp

2017-04-11 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |   18 +-
 1 file changed, 5 insertions(+), 13 deletions(-)

New commits:
commit f411100a522040e8826f599e66f1f9a2c38d2dda
Author: Ashod Nakashian 
Date:   Sun Apr 9 18:27:25 2017 -0400

wsd: remove outdated comment and simplify

Change-Id: I47e8b22708ab64ad95aa681407344686e6d4eb9d
Reviewed-on: https://gerrit.libreoffice.org/36325
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit bc41ad9bf96722b9ec2654f4e54a052f5b56d52e)
Reviewed-on: https://gerrit.libreoffice.org/36339
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 0f91598e..aa00d0ba 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1475,28 +1475,20 @@ private:
 if (UnitWSD::get().filterChildMessage(data))
 return;
 
+const std::string abbr = getAbbreviatedMessage(data);
 auto socket = _socket.lock();
 if (socket)
-LOG_TRC("#" << socket->getFD() << " Prisoner message [" << 
getAbbreviatedMessage(&data[0], data.size()) << "].");
+LOG_TRC("#" << socket->getFD() << " Prisoner message [" << abbr << 
"].");
 else
 LOG_WRN("Message handler called but without valid socket.");
 
 auto child = _childProcess.lock();
 auto docBroker = child ? child->getDocumentBroker() : nullptr;
 if (docBroker)
-{
-// We should never destroy the broker, since
-// it owns us and will wait on this thread.
-// This is true with non-blocking since this is
-// called from DocumentBroker::pollThread.
-assert(docBroker.use_count() > 1);
 docBroker->handleInput(data);
-return;
-}
-
-LOG_WRN("Child " << child->getPid() <<
-" has no DocumentBroker to handle message: [" <<
-LOOLProtocol::getAbbreviatedMessage(data) << "].");
+else
+LOG_WRN("Child " << child->getPid() <<
+" has no DocumentBroker to handle message: [" << abbr << 
"].");
 }
 
 int getPollEvents(std::chrono::steady_clock::time_point /* now */,
___
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/LOOLWSD.cpp

2017-04-11 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 1890d2ee134ace63a28b05361724d5b8a56b67bb
Author: Ashod Nakashian 
Date:   Sun Apr 9 18:28:00 2017 -0400

wsd: clear the incoming buffer before upgrading to WS

There was an interesting race when we cleared the
inBuffer after the WS upgrade. Since during the
upgrade we also transfer the socket to the DocBroker,
which has its own poll thread, the DocBroker poll
could trigger a POLLIN event if data comes
while the handler (that is handling the WS upgrad
and transfer to DocBroker) hasn't got to the point
where it clears the inBuffer of the data we just
read (i.e. the HTTP GET request). Even if not
the case, after transfering a socket to another
poll thread the socket buffers should not be
touched.

Here we move the inBuffer clearing to be as soon
as we have successfully parsed the request and
are ready to process it.

Also, we don't clear the full buffer, in case
we had read into the buffer both the requst
and the first message, if the thread was switched
out right after getting the POLLIN but before
reading from the socket, giving enough time to
receive more data and reading it together with
first read (which is the request).

Change-Id: I9888d4c2b70d2e433824818bbe7f69f13742486c
Reviewed-on: https://gerrit.libreoffice.org/36326
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 9a761ffe68b24e180dd74c0737e20cabe9dc9e1b)
Reviewed-on: https://gerrit.libreoffice.org/36340
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index aa00d0ba..7b54bfd2 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1525,6 +1525,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");
@@ -1532,7 +1533,7 @@ private:
   marker.begin(), marker.end());
 if (itBody == in.end())
 {
-LOG_TRC("#" << socket->getFD() << " doesn't have enough data 
yet.");
+LOG_DBG("#" << socket->getFD() << " doesn't have enough data 
yet.");
 return SocketHandlerInterface::SocketOwnership::UNCHANGED;
 }
 
@@ -1570,6 +1571,10 @@ private:
 LOG_DBG("Not enough content yet: ContentLength: " << 
contentLength << ", available: " << available);
 return SocketHandlerInterface::SocketOwnership::UNCHANGED;
 }
+
+// if we succeeded - remove the request from our input buffer
+// we expect one request per socket
+in.erase(in.begin(), itBody);
 }
 catch (const std::exception& exc)
 {
@@ -1626,7 +1631,8 @@ private:
 // All post requests have url prefix 'lool'.
 socketOwnership = handlePostRequest(request, message);
 }
-else if (reqPathTokens.count() > 2 && reqPathTokens[0] == 
"lool" && reqPathTokens[2] == "ws")
+else if (reqPathTokens.count() > 2 && reqPathTokens[0] == 
"lool" && reqPathTokens[2] == "ws" &&
+ request.find("Upgrade") != request.end() && 
Poco::icompare(request["Upgrade"], "websocket") == 0)
 {
 socketOwnership = handleClientWsUpgrade(request, 
reqPathTokens[1]);
 }
@@ -1645,15 +1651,12 @@ private:
 socket->shutdown();
 }
 }
-
-// if we succeeded - remove the request from our input buffer
-// we expect one request per socket
-in.clear();
 }
 catch (const std::exception& exc)
 {
 // TODO: Send back failure.
 // NOTE: Check _wsState to choose between HTTP response or 
WebSocket (app-level) error.
+LOG_ERR("#" << socket->getFD() << " Exception while processing 
incoming request: [" << LOOLProtocol::getAbbreviatedMessage(in) << "]");
 }
 
 return socketOwnership;
___
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/ClientSession.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp

2017-04-11 Thread Ashod Nakashian
 wsd/ClientSession.cpp  |3 +--
 wsd/DocumentBroker.cpp |   10 ++
 wsd/DocumentBroker.hpp |2 +-
 3 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 6dad3636fc92f0f22845f6ec0307e0fbe36d9bca
Author: Ashod Nakashian 
Date:   Sun Apr 9 18:37:27 2017 -0400

wsd: logging cleanups

Change-Id: Ia06bc5b1e0090c8198ac4ba2b88d5e57f8e2b168
Reviewed-on: https://gerrit.libreoffice.org/36327
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit fa2e2869cfbd5bea7a080be2bff244cdfdbfe084)
Reviewed-on: https://gerrit.libreoffice.org/36341
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 883b30b1..2af75d21 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -446,8 +446,7 @@ void ClientSession::setReadOnly()
 int ClientSession::getPollEvents(std::chrono::steady_clock::time_point /* now 
*/,
  int & /* timeoutMaxMs */)
 {
-LOG_TRC(getName() << " ClientSession: has queued writes? "
-<< _senderQueue.size());
+LOG_TRC(getName() << " ClientSession has " << _senderQueue.size() << " 
write message(s) queued.");
 int events = POLLIN;
 if (_senderQueue.size())
 events |= POLLOUT;
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 6f827175..33f88ef7 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -471,10 +471,12 @@ bool DocumentBroker::load(const 
std::shared_ptr& session, const s
 else
 {
 // Check if document has been modified by some external action
-LOG_DBG("Timestamp now: " << 
Poco::DateTimeFormatter::format(Poco::DateTime(fileInfo._modifiedTime),
- 
Poco::DateTimeFormat::ISO8601_FORMAT));
-if (_documentLastModifiedTime != Poco::Timestamp::fromEpochTime(0) &&
-fileInfo._modifiedTime != Poco::Timestamp::fromEpochTime(0) &&
+LOG_TRC("Document modified time: " <<
+
Poco::DateTimeFormatter::format(Poco::DateTime(fileInfo._modifiedTime),
+
Poco::DateTimeFormat::ISO8601_FORMAT));
+static const Poco::Timestamp Zero(Poco::Timestamp::fromEpochTime(0));
+if (_documentLastModifiedTime != Zero &&
+fileInfo._modifiedTime != Zero &&
 _documentLastModifiedTime != fileInfo._modifiedTime)
 {
 LOG_ERR("Document has been modified behind our back, URI [" << 
uriPublic.toString() << "].");
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 88fa2b6e..20bdc496 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -152,7 +152,7 @@ public:
 {
 if (_ws)
 {
-LOG_TRC("DocBroker to Child: " << data);
+LOG_TRC("Send DocBroker to Child message: [" << data << "].");
 _ws->sendMessage(data);
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Eike Rathke
 sc/source/ui/docshell/docsh5.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 44a8c49c16a8abec3dd201043c93fff2e3f5e683
Author: Eike Rathke 
Date:   Mon Mar 6 22:26:32 2017 +0100

Resolves: tdf#102777 broadcast SC_TAB_INSERTED when inserting scenario

So ScViewData::maTabData gets an entry added which deleting the scenario
can remove again.

(cherry picked from commit 4c8059a3e140171399ac85ceb882d23bb458599d)

Change-Id: I166baeff5408ef67faef41364515a13b8d4610bb
Reviewed-on: https://gerrit.libreoffice.org/34943
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 84760f55f6e5..32857f2b3dee 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -823,6 +823,9 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const OUString& 
rName, const OUStrin
 PostPaintExtras();  // 
Tabellenreiter
 aModificator.SetDocumentModified();
 
+// A scenario tab is like a hidden sheet, broadcasting also
+// notifies ScTabViewShell to add an ScViewData::maTabData entry.
+Broadcast( ScTablesHint( SC_TAB_INSERTED, nNewTab ));
 SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
 
 return nNewTab;
___
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-04-11 Thread Ashod Nakashian
 loleaflet/src/core/Socket.js |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit b0c247bd3d7a83169bc89eee7198b2e5417c8cea
Author: Ashod Nakashian 
Date:   Sun Apr 9 19:21:16 2017 -0400

loleaflet: reconnect transparently the first time

Don't show the "This is embarrassing" popup before
first trying to reconnect at least once.

In most cases reconnection is successful transparently.

However, if necessary, we could add some delay to
reconnecting to give the server time to recover,
but without good reason for this complication it's
unwarranted. Server-recycling reconnections have
such a delay.

Change-Id: Ic8e32c451429a24f8362431672057145a492a23f
Reviewed-on: https://gerrit.libreoffice.org/36328
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 55180606f856189a39cd448c0476c11417f06193)
Reviewed-on: https://gerrit.libreoffice.org/36342
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 787a487e..c2ef985b 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -537,7 +537,8 @@ L.Socket = L.Class.extend({
this._map._docLayer.removeAllViews();
}
 
-   if (isActive) {
+   if (isActive && this._reconnecting) {
+   // Don't show this before first transparently trying to 
reconnect.
this._map.fire('error', {msg: _('Well, this is 
embarrassing, we cannot connect to your document. Please try again.'), cmd: 
'socket', kind: 'closed', id: 4});
}
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx include/vcl svx/source svx/uiconfig svx/UIConfig_svx.mk vcl/source

2017-04-11 Thread Caolán McNamara
 include/svx/dialogs.hrc|3 -
 include/vcl/field.hxx  |1 
 svx/UIConfig_svx.mk|1 
 svx/source/dialog/ruler.hrc|   32 -
 svx/source/dialog/ruler.src|   73 --
 svx/source/dialog/svxruler.cxx |   25 +-
 svx/uiconfig/ui/rulermenu.ui   |   97 +
 vcl/source/control/field.cxx   |6 +-
 8 files changed, 116 insertions(+), 122 deletions(-)

New commits:
commit 3927105e19d335da6461d853ba5cedda788067da
Author: Caolán McNamara 
Date:   Tue Apr 11 13:11:08 2017 +0100

convert ruler menu to .ui

Change-Id: I5f9b0033288ccd4b58e055998834185970f987b0

diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 5f98695ecace..9e29d67ad793 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -171,9 +171,6 @@
 #define RID_SVXBMP_EDIT (RID_SVX_START +  90)
 #define RID_SVXBMP_REMOVE   (RID_SVX_START +  91)
 
-// Menu for the ruler
-#define RID_SVXMN_RULER (RID_SVX_START +  92)
-
 #define RID_SVXSTR_FRMSEL_TEXTS (RID_SVX_START +  93)
 #define RID_SVXSTR_FRMSEL_DESCRIPTIONS  (RID_SVX_START +  94)
 #define RID_SVXBMP_FRMSEL_ARROW1(RID_SVX_START +  95)
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index 973f12421347..f78a565d9374 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -232,6 +232,7 @@ public:
 
 voidSetCustomConvertHdl( const 
Link& rLink ) { maCustomConvertLink = rLink; }
 
+static FieldUnitStringToMetric(const OUString &rMetricString);
 protected:
 sal_Int64   mnBaseValue;
 FieldUnit   meUnit;
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index e073234f3540..ab20c8360c73 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -65,6 +65,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/redlinecontrol \
svx/uiconfig/ui/redlinefilterpage \
svx/uiconfig/ui/redlineviewpage \
+   svx/uiconfig/ui/rulermenu \
svx/uiconfig/ui/safemodedialog \
svx/uiconfig/ui/savemodifieddialog \
svx/uiconfig/ui/sidebararea \
diff --git a/svx/source/dialog/ruler.hrc b/svx/source/dialog/ruler.hrc
deleted file mode 100644
index a4ce17b89c29..
--- a/svx/source/dialog/ruler.hrc
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-//!! Dependence on sv.hxx
-#define ID_MM 1
-#define ID_CM 2
-#define ID_M 3
-#define ID_KM 4
-#define ID_INCH 8
-#define ID_FOOT 9
-#define ID_MILE 10
-#define ID_POINT 6
-#define ID_PICA 7
-#define ID_CHAR 11
-#define ID_LINE 12
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/ruler.src b/svx/source/dialog/ruler.src
index b1942de57a8d..0e8cc51b89ff 100644
--- a/svx/source/dialog/ruler.src
+++ b/svx/source/dialog/ruler.src
@@ -17,80 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 #include 
-#include "ruler.hrc"
 
-Menu RID_SVXMN_RULER
-{
-ItemList =
-{
-MenuItem
-{
-Identifier = ID_MM ;
-RadioCheck = TRUE ;
-Text [ en-US ] = "Millimeter" ;
-};
-MenuItem
-{
-Identifier = ID_CM ;
-RadioCheck = TRUE ;
-Text [ en-US ] = "Centimeter" ;
-};
-MenuItem
-{
-Identifier = ID_M ;
-RadioCheck = TRUE ;
-Text [ en-US ] = "Meter" ;
-};
-MenuItem
-{
-Identifier = ID_KM ;
-RadioCheck = TRUE ;
-Text [ en-US ] = "Kilometer" ;
-};
-MenuItem
-{
-Identifier = ID_INCH ;
-RadioCheck = TRUE ;
-Text [ en-US ] = "Inch" ;
-};
-MenuItem
-{
-Identifier = ID_FOOT ;
-RadioCheck = TRUE ;
-Text [ en-US ] = "Foot" ;
-};
-MenuItem
-{
-Identifier = ID_MILE ;
-RadioCheck = 

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

2017-04-11 Thread Stephan Bergmann
 desktop/source/migration/services/jvmfwk.cxx |   27 +++
 1 file changed, 3 insertions(+), 24 deletions(-)

New commits:
commit e4627e83de6ccae825944004604316b5b419f2ac
Author: Stephan Bergmann 
Date:   Tue Apr 11 15:04:30 2017 +0200

Use jfw::JavaInfoGuard

Change-Id: I2eb0a82d3e935f183729f76375feed927a34d74f

diff --git a/desktop/source/migration/services/jvmfwk.cxx 
b/desktop/source/migration/services/jvmfwk.cxx
index f766011d4821..042609a69433 100644
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -57,27 +57,6 @@ using namespace com::sun::star::configuration::backend;
 namespace migration
 {
 
-class CJavaInfo
-{
-public:
-JavaInfo* pData;
-CJavaInfo();
-~CJavaInfo();
-CJavaInfo(const CJavaInfo&) = delete;
-const CJavaInfo& operator=(const CJavaInfo&) = delete;
-operator JavaInfo* () const { return pData;}
-};
-
-CJavaInfo::CJavaInfo(): pData(nullptr)
-{
-}
-
-CJavaInfo::~CJavaInfo()
-{
-delete pData;
-}
-
-
 class JavaMigration : public ::cppu::WeakImplHelper<
 css::lang::XServiceInfo,
 css::lang::XInitialization,
@@ -258,12 +237,12 @@ void JavaMigration::migrateJavarc()
 if (bSuccess && !sValue.isEmpty())
 {
 //get the directory
-CJavaInfo aInfo;
-javaFrameworkError err = jfw_getJavaInfoByPath(sValue.pData, 
&aInfo.pData);
+jfw::JavaInfoGuard aInfo;
+javaFrameworkError err = jfw_getJavaInfoByPath(sValue.pData, 
&aInfo.info);
 
 if (err == JFW_E_NONE)
 {
-if (jfw_setSelectedJRE(aInfo) != JFW_E_NONE)
+if (jfw_setSelectedJRE(aInfo.info) != JFW_E_NONE)
 {
 OSL_FAIL("[Service implementation " IMPL_NAME
"] XJob::execute: jfw_setSelectedJRE failed.");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Stephan Bergmann
 jvmfwk/source/framework.cxx |   10 +-
 jvmfwk/source/framework.hxx |5 ++---
 2 files changed, 3 insertions(+), 12 deletions(-)

New commits:
commit a730dc1b566565472ea7e4b94f0dea9705d0a809
Author: Stephan Bergmann 
Date:   Tue Apr 11 15:07:42 2017 +0200

Remove unnecessary jfw::CJavaInfo::cloneJavaInfo

Change-Id: Ia9e807c0d1e5b0664d711c551a5e70afccbcc564

diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index a56c29488f1f..22d066516326 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -603,7 +603,7 @@ javaFrameworkError jfw_findAndSelectJRE(JavaInfo **pInfo)
 if (pInfo !=nullptr)
 {
 //copy to out param
-*pInfo = aCurrentInfo.cloneJavaInfo();
+*pInfo = jfw::CJavaInfo::copyJavaInfo(aCurrentInfo.pInfo);
 }
 }
 else
@@ -1063,14 +1063,6 @@ JavaInfo * CJavaInfo::copyJavaInfo(const JavaInfo * 
pInfo)
 return pInfo == nullptr ? nullptr : new JavaInfo(*pInfo);
 }
 
-
-JavaInfo* CJavaInfo::cloneJavaInfo() const
-{
-if (pInfo == nullptr)
-return nullptr;
-return copyJavaInfo(pInfo);
-}
-
 CJavaInfo & CJavaInfo::operator = (const CJavaInfo& info)
 {
 if (&info == this)
diff --git a/jvmfwk/source/framework.hxx b/jvmfwk/source/framework.hxx
index 8e433054fd3a..9521a723c54a 100644
--- a/jvmfwk/source/framework.hxx
+++ b/jvmfwk/source/framework.hxx
@@ -67,8 +67,6 @@ namespace jfw
 
 class CJavaInfo
 {
-static JavaInfo * copyJavaInfo(const JavaInfo * pInfo);
-
 enum _transfer_ownership {TRANSFER};
 /*Attaching the pointer to this class. The argument pInfo must not
 be freed afterwards.
@@ -96,10 +94,11 @@ public:
 ::JavaInfo * detach();
 const ::JavaInfo* operator ->() const { return pInfo;}
 operator ::JavaInfo* () { return pInfo;}
-::JavaInfo* cloneJavaInfo() const;
 
 OUString getLocation() const;
 sal_uInt64 getFeatures() const;
+
+static JavaInfo * copyJavaInfo(const JavaInfo * pInfo);
 };
 
 class FrameworkException : public std::exception
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Mike Kaganski
 shell/inc/spsupp/COMOpenDocuments.hpp  |1 
 shell/inc/spsupp/COMRefCounted.hpp |7 
 shell/inc/spsupp/registrar.hpp |   21 +
 shell/source/win32/spsupp/COMOpenDocuments.cxx |   65 +
 shell/source/win32/spsupp/registrar.cxx|  281 +++--
 shell/source/win32/spsupp/spsupp.def   |1 
 shell/source/win32/spsupp/spsuppServ.cxx   |   35 ++-
 7 files changed, 249 insertions(+), 162 deletions(-)

New commits:
commit 8d60397310935d5d6d848314bd1faacb586d886b
Author: Mike Kaganski 
Date:   Mon Apr 10 22:21:57 2017 +0300

tdf#103058: allow optional registration for MS ProgIDs

To allow in-place replacement of OWSSUPP.dll, we need to be able
to handle the same ProgIDs that it handles, namely:
SharePoint.OpenDocuments and its versions. This allows to use
the SharePoint integration capabilities of LO without the need to
reconfigure SharePoint server's DOCICON.xml (the system would
start the component with same name as MS Office uses).

But this cannot be the default mode, since if MS Office is installed
on the same system, we would hijack the registration, that could be
undesirable.

So, this commit adds an option to use
regsvr32 [/u] /i:Substitute_OWSSUPP patho\spsupp.dll
to also [un]register SharePoint.OpenDocuments in addition to normal
LOSPSupport.OpenDocuments.

Reviewed-on: https://gerrit.libreoffice.org/36389
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

(Cherry-picked from commit 88829fd914105a0837ee41d3f00f9178228c19cf)

Change-Id: Icc284f9aa8f97ecf04594dd55b99bc1e3d20740d
Reviewed-on: https://gerrit.libreoffice.org/36411
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/shell/inc/spsupp/COMOpenDocuments.hpp 
b/shell/inc/spsupp/COMOpenDocuments.hpp
index 1b2a52999ead..35df90073628 100644
--- a/shell/inc/spsupp/COMOpenDocuments.hpp
+++ b/shell/inc/spsupp/COMOpenDocuments.hpp
@@ -206,7 +206,6 @@ private:
 
 static long m_nObjCount;
 static ITypeInfo* m_pTypeInfo;
-static wchar_t m_szLOPath[MAX_PATH];
 COMObjectSafety m_aObjectSafety;
 };
 
diff --git a/shell/inc/spsupp/COMRefCounted.hpp 
b/shell/inc/spsupp/COMRefCounted.hpp
index 1a60ed372300..d9b9ab87455d 100644
--- a/shell/inc/spsupp/COMRefCounted.hpp
+++ b/shell/inc/spsupp/COMRefCounted.hpp
@@ -11,6 +11,7 @@
 #define _COMREFCOUNTED_HPP_
 
 #include "objbase.h"
+#include "assert.h"
 
 template 
 class COMRefCounted : public Interface
@@ -28,9 +29,13 @@ public:
 
 ULONG STDMETHODCALLTYPE Release() override
 {
+assert(m_nRef > 0);
 if (::InterlockedDecrement(&m_nRef) == 0)
+{
 delete this;
-return (m_nRef > 0) ? static_cast(m_nRef) : 0;
+return 0;
+}
+return static_cast(m_nRef);
 }
 
 private:
diff --git a/shell/inc/spsupp/registrar.hpp b/shell/inc/spsupp/registrar.hpp
index 00b230e5c624..003fe59f24fa 100644
--- a/shell/inc/spsupp/registrar.hpp
+++ b/shell/inc/spsupp/registrar.hpp
@@ -12,14 +12,23 @@
 
 #include "windows.h"
 
-namespace Registrar {
-HRESULT RegisterObject(REFIID riidCLSID,
-   REFIID riidTypeLib,
+class Registrar {
+public:
+explicit Registrar(REFIID riidCLSID);
+HRESULT RegisterObject(REFIID riidTypeLib,
const wchar_t* sProgram,
const wchar_t* sComponent,
-   const wchar_t* Path);
-HRESULT UnRegisterObject(REFIID riidCLSID, const wchar_t* LibId, const 
wchar_t* ClassId);
-}
+   int nVersion,
+   const wchar_t* Path,
+   bool bSetDefault);
+HRESULT UnRegisterObject(const wchar_t* sProgram, const wchar_t* 
sComponent, int nVersion);
+HRESULT RegisterProgID(const wchar_t* sProgram, const wchar_t* sComponent, 
int nVersion, bool bSetDefault);
+HRESULT UnRegisterProgID(const wchar_t* sProgram, const wchar_t* 
sComponent, int nVersion);
+private:
+static const size_t nGUIDlen = 40;
+wchar_t m_sCLSID[nGUIDlen];
+HRESULT m_ConstructionResult;
+};
 
 #endif
 
diff --git a/shell/source/win32/spsupp/COMOpenDocuments.cxx 
b/shell/source/win32/spsupp/COMOpenDocuments.cxx
index b9d24405aa4f..5f3af74a8be0 100644
--- a/shell/source/win32/spsupp/COMOpenDocuments.cxx
+++ b/shell/source/win32/spsupp/COMOpenDocuments.cxx
@@ -25,12 +25,24 @@ bool SecurityWarning(const wchar_t* sProgram, const 
wchar_t* sDocument)
 }
 
 // Returns S_OK if successful
-HRESULT LOStart(wchar_t* sCommandLine)
+HRESULT LOStart(const wchar_t* sModeArg, const wchar_t* sFilePath, bool 
bDoSecurityWarning)
 {
-STARTUPINFOW si = { sizeof(si) };
+const wchar_t* sProgram = GetLOPath();
+if (bDoSecurityWarning && !SecurityWarning(sProgram, sFilePath))
+{
+// Return success to avoid downloading in browser
+return S_OK;
+}
+
+  

Tietz, Werner alias karolus; Licence statement

2017-04-11 Thread karlooforum
All of my past & future contributions to LibreOffice may be
   licensed under the MPLv2/LGPLv3+ dual license.

Werner Tietz alias karolus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - 6 commits - kit/ForKit.cpp kit/Kit.cpp loleaflet/src net/Socket.hpp wsd/Admin.cpp wsd/DocumentBroker.cpp wsd/Document

2017-04-11 Thread Miklos Vajna
 kit/ForKit.cpp   |4 
 kit/Kit.cpp  |1 +
 loleaflet/src/layer/AnnotationManager.js |   16 +++-
 net/Socket.hpp   |2 ++
 wsd/Admin.cpp|2 +-
 wsd/DocumentBroker.cpp   |8 
 wsd/DocumentBroker.hpp   |8 
 wsd/LOOLWSD.cpp  |7 ---
 8 files changed, 35 insertions(+), 13 deletions(-)

New commits:
commit c87c8db954454d5f64336d031ca3d08cb2084c1e
Author: Miklos Vajna 
Date:   Tue Apr 11 08:54:09 2017 +0200

DocumentBroker: avoid unnecessary copying

Change-Id: Iaa555ed8e347d0e1712c617839f007d0b4f3204b
(cherry picked from commit 8a1f321c8492d6c2824317c7e4be1a3bdfa81665)

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 33f88ef7..e041db70 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -522,7 +522,7 @@ bool DocumentBroker::load(const 
std::shared_ptr& session, const s
 return true;
 }
 
-bool DocumentBroker::saveToStorage(const std::string sessionId,
+bool DocumentBroker::saveToStorage(const std::string& sessionId,
bool success, const std::string& result)
 {
 assertCorrectThread();
@@ -823,7 +823,7 @@ size_t DocumentBroker::addSession(const 
std::shared_ptr& session)
 return count;
 }
 
-size_t DocumentBroker::removeSession(const std::string id, bool destroyIfLast)
+size_t DocumentBroker::removeSession(const std::string& id, bool destroyIfLast)
 {
 assertCorrectThread();
 
@@ -846,7 +846,7 @@ size_t DocumentBroker::removeSession(const std::string id, 
bool destroyIfLast)
 return _sessions.size();
 }
 
-size_t DocumentBroker::removeSessionInternal(const std::string id)
+size_t DocumentBroker::removeSessionInternal(const std::string& id)
 {
 assertCorrectThread();
 try
@@ -894,7 +894,7 @@ size_t DocumentBroker::removeSessionInternal(const 
std::string id)
 return _sessions.size();
 }
 
-void DocumentBroker::addCallback(SocketPoll::CallbackFn fn)
+void DocumentBroker::addCallback(const SocketPoll::CallbackFn& fn)
 {
 _poll->addCallback(fn);
 }
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 20bdc496..62cb6a95 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -233,7 +233,7 @@ public:
 void setLoaded();
 
 /// Save the document to Storage if it needs persisting.
-bool saveToStorage(const std::string sesionId, bool success, const 
std::string& result = "");
+bool saveToStorage(const std::string& sesionId, bool success, const 
std::string& result = "");
 bool isModified() const { return _isModified; }
 void setModified(const bool value);
 
@@ -265,10 +265,10 @@ public:
 size_t addSession(const std::shared_ptr& session);
 
 /// Removes a session by ID. Returns the new number of sessions.
-size_t removeSession(const std::string id, bool destroyIfLast = false);
+size_t removeSession(const std::string& id, bool destroyIfLast = false);
 
 /// Add a callback to be invoked in our polling thread.
-void addCallback(SocketPoll::CallbackFn fn);
+void addCallback(const SocketPoll::CallbackFn& fn);
 
 /// Transfer this socket into our polling thread / loop.
 void addSocketToPoll(const std::shared_ptr& socket);
@@ -342,7 +342,7 @@ private:
 bool saveToStorageInternal(const std::string& sesionId, bool success, 
const std::string& result = "");
 
 /// Removes a session by ID. Returns the new number of sessions.
-size_t removeSessionInternal(const std::string id);
+size_t removeSessionInternal(const std::string& id);
 
 /// Forward a message from child session to its respective client session.
 bool forwardToClient(const std::shared_ptr& payload);
commit f6c91d8edd074bbb23d343e9c19ebe4be6f6c017
Author: Miklos Vajna 
Date:   Mon Apr 10 10:44:11 2017 +0200

wsd: make requestURI a const reference

It's copy-constructed from a const reference but is only used as const
reference.

Change-Id: I9a58561616bcfeff0c45803f3244f8e78d54731a

diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp
index 78da7ac1..a9039f2b 100644
--- a/wsd/Admin.cpp
+++ b/wsd/Admin.cpp
@@ -253,7 +253,7 @@ bool AdminSocketHandler::handleInitialRequest(
 // Different session id pool for admin sessions (?)
 const auto sessionId = Util::decodeId(LOOLWSD::GenSessionId());
 
-std::string requestURI = request.getURI();
+const std::string& requestURI = request.getURI();
 StringTokenizer pathTokens(requestURI, "/", 
StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
 
 if (request.find("Upgrade") != request.end() && 
Poco::icompare(request["Upgrade"], "websocket") == 0)
commit 229c02be3155c063b6413ce98b2ad1175bd94b86
Author: Henry Castro 
Date:   Mon Apr 10 21:43:42 2017 -0400

loleaflet: add line between the currently selected comment ...

and the associated se

Weekly QA Report (W14-2017)

2017-04-11 Thread Xisco Fauli

Hello,

What have happened in QA in the last 8 days?

  * 151 have been created, of which, 68 are still unconfirmed ( Total 
Unconfirmed bugs: 491 )

Link: http://tinyurl.com/kje4ssu

  * 791 comments have been written.

== STATUS CHANGED ==
  * 13 bugs have been changed to 'ASSIGNED'.
Link: http://tinyurl.com/mujkxe6
Done by: Bartosz ( 4 ), Jean-Sebastien Bevilacqua ( 3 ), Miklos 
Vajna ( 1 ), Ximeng Zu ( 1 ), Mike Kaganski ( 1 ), Markus Mohrhard ( 1 
), Caolán McNamara ( 1 ), arul71.m ( 1 )


  * 5 bugs have been changed to 'CLOSED'.
Link: http://tinyurl.com/jwncodk
Done by: Regina Henschel ( 2 ), Eike Rathke ( 2 ), Harald Koester ( 1 )

  * 23 bugs have been changed to 'NEEDINFO'.
Link: http://tinyurl.com/mcje98r
Done by: carlos.deambroggio ( 8 ), Alex Thurgood ( 4 ), Xisco Faulí 
( 2 ), Julien Nabet ( 2 ), Aron Budea ( 2 ), V Stuart Foote ( 1 ), 
Buovjaga ( 1 ), m.a.riosv ( 1 ), Markus Mohrhard ( 1 ), tommy27 ( 1 )


  * 64 bugs have been changed to 'NEW'.
Link: http://tinyurl.com/ml5c9ph
Done by: Buovjaga ( 12 ), Yousuf Philips (jay) ( 8 ), Olivier 
Hallot ( 6 ), Regina Henschel ( 5 ), Alex Thurgood ( 5 ), Xisco Faulí ( 
4 ), Samuel Mehrbrodt (CIB) ( 4 ), carlos.deambroggio ( 4 ), m.a.riosv ( 
3 ), Jacques Guilleron ( 2 ), Eike Rathke ( 2 ), Aron Budea ( 2 ), V 
Stuart Foote ( 1 ), Sergey ( 1 ), Julien Nabet ( 1 ), Michael Meeks ( 1 
), jorojmaqui ( 1 ), Timur ( 1 ), tommy27 ( 1 )


  * 4 bugs have been changed to 'REOPENED'.
Link: http://tinyurl.com/myspxcn
Done by: pierre.sauter ( 1 ), Gabor Kelemen ( 1 ), Hanno 
Meyer-Thurow ( 1 ), Serg Bormant ( 1 )


  * 14 bugs have been changed to 'RESOLVED DUPLICATE'.
Link: http://tinyurl.com/l4x5ovq
Done by: Xisco Faulí ( 2 ), Buovjaga ( 2 ), Alex Thurgood ( 2 ), V 
Stuart Foote ( 1 ), Mike Kaganski ( 1 ), Michael Meeks ( 1 ), Timur ( 1 
), Adolfo Jayme ( 1 ), Cor Nouws ( 1 ), Aron Budea ( 1 ), Katarina 
Behrens (CIB) ( 1 )


  * 39 bugs have been changed to 'RESOLVED FIXED'.
Link: http://tinyurl.com/lgx9j2c
Done by: Markus Mohrhard ( 9 ), Caolán McNamara ( 5 ), Miklos Vajna 
( 4 ), Sophia Schroeder ( 2 ), Samuel Mehrbrodt (CIB) ( 2 ), Yousuf 
Philips (jay) ( 2 ), Adolfo Jayme ( 2 ), Szymon Kłos ( 2 ), Eike Rathke 
( 2 ), Julien Nabet ( 1 ), Noel Grandin ( 1 ), Michael Stahl ( 1 ), 
Michael Meeks ( 1 ), Khaled Hosny ( 1 ), Gabor Kelemen ( 1 ), Justin L ( 
1 ), Alex Thurgood ( 1 ), Björn Michaelsen ( 1 )


  * 2 bugs have been changed to 'RESOLVED INVALID'.
Link: http://tinyurl.com/mgeouv6
Done by: V Stuart Foote ( 1 ), Telesto ( 1 )

  * 1 bug has been changed to 'RESOLVED MOVED'.
Link: http://tinyurl.com/nxjkvvj
Done by: Buovjaga ( 1 )

  * 7 bugs have been changed to 'RESOLVED NOTABUG'.
Link: http://tinyurl.com/l34tyqr
Done by: V Stuart Foote ( 2 ), Cor Nouws ( 2 ), Buovjaga ( 1 ), 
Yousuf Philips (jay) ( 1 ), LibreTraining ( 1 )


  * 1 bug has been changed to 'RESOLVED NOTOURBUG'.
Link: http://tinyurl.com/myxfa7o
Done by: Fakabbir amin ( 1 )

  * 6 bugs have been changed to 'RESOLVED WONTFIX'.
Link: http://tinyurl.com/kwtxag4
Done by: Markus Mohrhard ( 2 ), Buovjaga ( 1 ), Alex Thurgood ( 1 
), Adolfo Jayme ( 1 ), Caolán McNamara ( 1 )


  * 10 bugs have been changed to 'RESOLVED WORKSFORME'.
Link: http://tinyurl.com/mwybkur
Done by: Zolnai Tamás ( 1 ), V Stuart Foote ( 1 ), Buovjaga ( 1 ), 
Telesto ( 1 ), raal ( 1 ), Eumed ( 1 ), mattg889 ( 1 ), Markus Mohrhard 
( 1 ), Alex Thurgood ( 1 ), Harald Koester ( 1 )


  * 7 bugs have been changed to 'UNCONFIRMED'.
Link: http://tinyurl.com/muap7kt
Done by: Adolfo Jayme ( 2 ), ybk ( 1 ), rundr.walther ( 1 ), 
MichaelB ( 1 ), mkhaw ( 1 ), m.a.riosv ( 1 )


  * 5 bugs have been changed to 'VERIFIED FIXED'.
Link: http://tinyurl.com/n7k9leh
Done by: Xisco Faulí ( 1 ), V Stuart Foote ( 1 ), Buovjaga ( 1 ), 
m.a.riosv ( 1 ), Aron Budea ( 1 )


== KEYWORDS ADDED ==
  * 'bibisectRequest' has been added to 5 bugs.
Link: http://tinyurl.com/n3ar4mm
Done by: Alex Thurgood ( 3 ), V Stuart Foote ( 2 )

  * 'bibisected' has been added to 15 bugs.
Link: http://tinyurl.com/moanaj3
Done by: Xisco Faulí ( 7 ), raal ( 3 ), Aron Budea ( 2 ), Miklos 
Vajna ( 1 ), Terrence Enger ( 1 ), Justin L ( 1 )


  * 'bisected' has been added to 14 bugs.
Link: http://tinyurl.com/kjjev53
Done by: Xisco Faulí ( 7 ), raal ( 3 ), Aron Budea ( 2 ), Miklos 
Vajna ( 1 ), Terrence Enger ( 1 )


  * 'dataLoss' has been added to 1 bugs.
Link: http://tinyurl.com/n6as372
Done by: carlos.deambroggio ( 1 )

  * 'easyHack' has been added to 2 bugs.
Link: http://tinyurl.com/ma5s833
Done by: Michael Meeks ( 1 ), Markus Mohrhard ( 1 )

  * 'filter:docx' has been added to 8 bugs.
Link: http://tinyurl.com/lj5kjsv
Done by: Telesto ( 3 ), Xisco Faulí ( 2 ), Aron Budea ( 2 ), Justin 
L ( 1 )


  * 'filter:ppt' has been added to 1 bugs.
Link: http://tinyurl.com/let5343
Done by: Buovjaga ( 1 

[Libreoffice-commits] core.git: 4 commits - include/xmloff reportdesign/source sc/source sw/qa xmloff/inc xmloff/source

2017-04-11 Thread Michael Stahl
 include/xmloff/txtparae.hxx|   13 
 reportdesign/source/filter/xml/xmlExport.cxx   |6 
 sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx |6 
 sc/source/filter/xml/XMLStylesExportHelper.cxx |5 
 sc/source/filter/xml/xmlexprt.cxx  |2 
 sw/qa/extras/inc/swmodeltestbase.hxx   |8 
 sw/qa/extras/odfexport/data/whitespace.odt |binary
 sw/qa/extras/odfexport/odfexport.cxx   |  323 +
 xmloff/inc/txtflde.hxx |8 
 xmloff/source/text/txtflde.cxx |   18 
 xmloff/source/text/txtparae.cxx|   60 +--
 11 files changed, 389 insertions(+), 60 deletions(-)

New commits:
commit 5722b815fa34422595407e83029fb41583f13894
Author: Michael Stahl 
Date:   Tue Apr 11 15:39:56 2017 +0200

sw: let getProperty fail more helpfully

Change-Id: Ibca942235060c5b3a6215325e262bacbc464f2a4

diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx 
b/sw/qa/extras/inc/swmodeltestbase.hxx
index c4cbeebad1d3..e2ce0f5a9cd8 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -425,7 +425,9 @@ protected:
 T data;
 if (!css::uno::fromAny(properties->getPropertyValue(name), &data))
 {
-CPPUNIT_FAIL("the property is of unexpected type or void");
+OString const msg("the property is of unexpected type or void: "
++ OUStringToOString(name, RTL_TEXTENCODING_UTF8));
+CPPUNIT_FAIL(msg.getStr());
 }
 return data;
 }
@@ -437,7 +439,9 @@ protected:
 T data = T();
 if (!(properties->getPropertyValue(name) >>= data))
 {
-CPPUNIT_FAIL("the property is of unexpected type or void");
+OString const msg("the property is of unexpected type or void: "
++ OUStringToOString(name, RTL_TEXTENCODING_UTF8));
+CPPUNIT_FAIL(msg.getStr());
 }
 return data;
 }
commit 8bf9432b8aa9bf22fc20ba5faaf09386e77ee178
Author: Michael Stahl 
Date:   Mon Apr 10 21:46:51 2017 +0200

reportdesign: what the whitespace?

Change-Id: Icbe65def98553bd61236ed1c814768260dbc4d50

diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index 4438e99028a2..686f8383b105 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -1434,7 +1434,7 @@ void ORptExport::exportParagraph(const Reference< 
XReportControlModel >& _xRepor
 if ( xFT.is() )
 {
 OUString sExpr = xFT->getLabel();
-bool bPrevCharIsSpace = false;
+bool bPrevCharIsSpace = false; // FIXME this looks quite broken - does 
the corresponding import filter do whitespace collapsing at all?
 GetTextParagraphExport()->exportCharacterData(sExpr, bPrevCharIsSpace);
 }
 }
commit 0451019f7522e005853dae27131ca203d8a1a93c
Author: Michael Stahl 
Date:   Mon Apr 10 17:59:10 2017 +0200

OFFICE-2102: ODF export: write  after non-mark elements too

... and fix the wrong export for , which erroneously
did not use the same bIsPrevCharSpace flag as everything else (which was
obviously a bug, as there should be one flag per paragraph).

Interop testing demonstrates that at least Word and Calligra Words
differ in their interpretation of spaces following  and
other shape elements, and : if there is a U+0020 space
before the element, LO will not collapse a U+0020 space behind the
element but Word and Calligra Words do collapse it.

The distinction between "mark elements" and "non-mark elements" in the
whitespace collapsing implementation in OOo since the beginning was
never explicitly spelled out in ODF, although listing the
 etc. elements in ODF 1.1, 5.1.1 was a strong hint.

Fortunately all 3 applications agree that a  following a
 is consumed as a space, and it is valid to write a 
in this situation, so just do that to improve interoperability.

Change-Id: I42260c0528db9fe7e87e8dbae5105aeadb83780d

diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index a93615ad83d5..172131a45650 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -246,8 +246,7 @@ public:
 
 void exportTextRangeEnumeration(
 const css::uno::Reference< css::container::XEnumeration > & rRangeEnum,
-bool bAutoStyles, bool bProgress,
-bool bPrvChrIsSpc = true );
+bool bAutoStyles, bool bProgress, bool & rPrevCharIsSpace);
 
 protected:
 
@@ -276,7 +275,7 @@ protected:
 const css::uno::Reference< css::text::XTextSection > & rBaseSection,
 bool bAutoStyles, bool bProgress, bool bExportParagraph, TextPNS 
eExtensionNS = TextPNS::ODF );
 
-bool exportTextContentEnumeration(
+void export

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

2017-04-11 Thread Miklos Vajna
 svx/source/xml/xmlgrhlp.cxx|   15 
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |7 --
 vcl/source/filter/ipdf/pdfread.cxx |  107 +++--
 vcl/source/gdi/pdfwriter_impl.cxx  |   32 -
 4 files changed, 123 insertions(+), 38 deletions(-)

New commits:
commit 37bdf1659ddb11d8706289511623cc7c8b0d264b
Author: Miklos Vajna 
Date:   Tue Apr 11 16:50:53 2017 +0200

Related: tdf#106972 vcl PDF import: downgrade PDF >= 1.5

There are two problems with these newer PDF versions:

- the current PDF export code doesn't know how to roundtrip such PDF
  images (needs work on both the import and export side)
- upgrading the default PDF export version would upset readers who can't
  parse PDF >= 1.5

So instead of raising the default PDF export version, for now just be
conservative and depend on pdfium to downgrade the PDF image version to
1.4 if it would be higher.

Given that this modifies the input of the graphic filter this also needs
changes in the ODF export, so that the filter result will contain that
downgraded data, not the original one.

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

diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 04b92711aa69..3946bb94c3c0 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -555,7 +555,20 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& 
rPictureStorageName,
 
 std::unique_ptr 
pStream(utl::UcbStreamHelper::CreateStream( aStream.xStream ));
 if( bUseGfxLink && aGfxLink.GetDataSize() && aGfxLink.GetData() )
-pStream->WriteBytes(aGfxLink.GetData(), 
aGfxLink.GetDataSize());
+{
+const uno::Sequence& rPdfData = 
aGraphic.getPdfData();
+if (rPdfData.hasElements())
+{
+// The graphic has PDF data attached to it, use that.
+// vcl::ImportPDF() possibly downgraded the PDF data from a
+// higher PDF version, while aGfxLink still contains the
+// original data provided by the user.
+pStream->WriteBytes(rPdfData.getConstArray(), 
rPdfData.getLength());
+bRet = (pStream->GetError() == 0);
+}
+else
+pStream->WriteBytes(aGfxLink.GetData(), 
aGfxLink.GetDataSize());
+}
 else
 {
 if( aGraphic.GetType() == GraphicType::Bitmap )
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 1b9eaf153d2c..76cad0f2a9af 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -383,10 +383,9 @@ void PdfExportTest::testTdf106972Pdf17()
 vcl::filter::PDFObjectElement* pXObject = 
pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
 CPPUNIT_ASSERT(pXObject);
 
-// This failed, the "image" had resources; that typically means we tried to
-// preserve the original PDF markup here; which is not OK till our default
-// output is PDF 1.4, and this bugdoc has PDF 1.7 data.
-CPPUNIT_ASSERT(!pXObject->Lookup("Resources"));
+// Assert that we now attempt to preserve the original PDF data, even if
+// the original input was PDF >= 1.4.
+CPPUNIT_ASSERT(pXObject->Lookup("Resources"));
 }
 
 void PdfExportTest::testTdf107013()
diff --git a/vcl/source/filter/ipdf/pdfread.cxx 
b/vcl/source/filter/ipdf/pdfread.cxx
index b2f68d02b07e..f1a7e2b52a17 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -14,6 +14,7 @@
 #if HAVE_FEATURE_PDFIUM
 #include 
 #include 
+#include 
 #endif
 
 #include 
@@ -25,6 +26,29 @@ namespace
 
 #if HAVE_FEATURE_PDFIUM
 
+/// Callback class to be used with FPDF_SaveWithVersion().
+struct CompatibleWriter : public FPDF_FILEWRITE
+{
+public:
+CompatibleWriter();
+static int WriteBlockCallback(FPDF_FILEWRITE* pFileWrite, const void* 
pData, unsigned long nSize);
+
+SvMemoryStream m_aStream;
+};
+
+CompatibleWriter::CompatibleWriter()
+{
+FPDF_FILEWRITE::version = 1;
+FPDF_FILEWRITE::WriteBlock = CompatibleWriter::WriteBlockCallback;
+}
+
+int CompatibleWriter::WriteBlockCallback(FPDF_FILEWRITE* pFileWrite, const 
void* pData, unsigned long nSize)
+{
+auto pImpl = static_cast(pFileWrite);
+pImpl->m_aStream.WriteBytes(pData, nSize);
+return 1;
+}
+
 /// Convert to inch, then assume 96 DPI.
 double pointToPixel(double fPoint)
 {
@@ -88,6 +112,70 @@ bool generatePreview(SvStream& rStream, Graphic& rGraphic)
 
 return true;
 }
+
+/// Decide if PDF data is old enough to be compatible.
+bool isCompatible(SvStream& rInStream)
+{
+// %PDF-x.y
+sal_uInt8 aFirstBytes[8];
+r

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

2017-04-11 Thread Stephan Bergmann
 cui/source/options/optjava.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6bb4c48812224237c29acf31264cc05e2938f242
Author: Stephan Bergmann 
Date:   Tue Apr 11 17:52:50 2017 +0200

Determine accurate position for already added JREs

Change-Id: Ieef6aaeccd3368fa1cf79b3eab510b6b6c24427e

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 20fd7a9e0f5c..bef9f2543ec3 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -586,9 +586,9 @@ void SvxJavaOptionsPage::AddFolder( const OUString& 
_rFolder )
 if ( jfw_areEqualJavaInfo( pCmpInfo, pInfo ) )
 {
 bFound = true;
-nPos = i;
 break;
 }
+++nPos;
 }
 
 if ( !bFound )
@@ -602,6 +602,7 @@ void SvxJavaOptionsPage::AddFolder( const OUString& 
_rFolder )
 bFound = true;
 break;
 }
+++nPos;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source desktop/source include/jvmfwk jvmfwk/plugins jvmfwk/source stoc/source

2017-04-11 Thread Stephan Bergmann
 cui/source/options/optjava.cxx   |   85 +++
 cui/source/options/optjava.hxx   |8 +-
 desktop/source/migration/services/jvmfwk.cxx |7 +
 include/jvmfwk/framework.hxx |   56 ---
 jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx |   21 +++--
 jvmfwk/source/framework.cxx  |   63 +++--
 stoc/source/javavm/javavm.cxx|   20 ++---
 7 files changed, 99 insertions(+), 161 deletions(-)

New commits:
commit f0454e72c1d1b11c3bcbacb23048a62fdecd037c
Author: Stephan Bergmann 
Date:   Tue Apr 11 18:04:54 2017 +0200

Use std::unique_ptr for lifecycle management in 
jvmfwk/framework.hxx

Change-Id: Ie604c75e92c407ff3118aaa58155648d956c91fb

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index bef9f2543ec3..51f8b37b98e5 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -139,10 +139,8 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( vcl::Window* 
pParent, const SfxItemSet&
 , m_pParamDlg(nullptr)
 , m_pPathDlg(nullptr)
 #if HAVE_FEATURE_JAVA
-, m_parJavaInfo(nullptr)
 , m_parParameters(nullptr)
 , m_pClassPath(nullptr)
-, m_nInfoSize(0)
 , m_nParamSize(0)
 #endif
 , m_aResetIdle("cui options SvxJavaOptionsPage Reset")
@@ -221,12 +219,6 @@ void SvxJavaOptionsPage::dispose()
 m_pPathDlg.disposeAndClear();
 ClearJavaInfo();
 #if HAVE_FEATURE_JAVA
-std::vector< JavaInfo* >::iterator pIter;
-for ( pIter = m_aAddedInfos.begin(); pIter != m_aAddedInfos.end(); ++pIter 
)
-{
-JavaInfo* pInfo = *pIter;
-delete pInfo;
-}
 m_aAddedInfos.clear();
 
 jfw_unlock();
@@ -447,19 +439,7 @@ IMPL_LINK_NOARG( SvxJavaOptionsPage, ExpertConfigHdl_Impl, 
Button*, void )
 void SvxJavaOptionsPage::ClearJavaInfo()
 {
 #if HAVE_FEATURE_JAVA
-if ( m_parJavaInfo )
-{
-JavaInfo** parInfo = m_parJavaInfo;
-for ( sal_Int32 i = 0; i < m_nInfoSize; ++i )
-{
-JavaInfo* pInfo = *parInfo++;
-delete pInfo;
-}
-
-rtl_freeMemory( m_parJavaInfo );
-m_parJavaInfo = nullptr;
-m_nInfoSize = 0;
-}
+m_parJavaInfo.clear();
 #else
 (void) this;
 #endif
@@ -483,50 +463,44 @@ void SvxJavaOptionsPage::LoadJREs()
 {
 #if HAVE_FEATURE_JAVA
 WaitObject aWaitObj(m_pJavaList);
-javaFrameworkError eErr = jfw_findAllJREs( &m_parJavaInfo, &m_nInfoSize );
-if ( JFW_E_NONE == eErr && m_parJavaInfo )
+javaFrameworkError eErr = jfw_findAllJREs( &m_parJavaInfo );
+if ( JFW_E_NONE == eErr )
 {
-JavaInfo** parInfo = m_parJavaInfo;
-for ( sal_Int32 i = 0; i < m_nInfoSize; ++i )
+for (auto const & pInfo: m_parJavaInfo)
 {
-JavaInfo* pInfo = *parInfo++;
-AddJRE( pInfo );
+AddJRE( pInfo.get() );
 }
 }
 
-std::vector< JavaInfo* >::iterator pIter;
-for ( pIter = m_aAddedInfos.begin(); pIter != m_aAddedInfos.end(); ++pIter 
)
+for (auto const & pInfo: m_aAddedInfos)
 {
-JavaInfo* pInfo = *pIter;
-AddJRE( pInfo );
+AddJRE( pInfo.get() );
 }
 
-JavaInfo* pSelectedJava = nullptr;
+std::unique_ptr pSelectedJava;
 eErr = jfw_getSelectedJRE( &pSelectedJava );
 if ( JFW_E_NONE == eErr && pSelectedJava )
 {
-JavaInfo** parInfo = m_parJavaInfo;
-for ( sal_Int32 i = 0; i < m_nInfoSize; ++i )
+sal_Int32 i = 0;
+for (auto const & pCmpInfo: m_parJavaInfo)
 {
-JavaInfo* pCmpInfo = *parInfo++;
-if ( jfw_areEqualJavaInfo( pCmpInfo, pSelectedJava ) )
+if ( jfw_areEqualJavaInfo( pCmpInfo.get(), pSelectedJava.get() ) )
 {
 SvTreeListEntry* pEntry = m_pJavaList->GetEntry(i);
 if ( pEntry )
 m_pJavaList->HandleEntryChecked( pEntry );
 break;
 }
+++i;
 }
 }
-
-delete pSelectedJava;
 #else
 (void) this;
 #endif
 }
 
 
-void SvxJavaOptionsPage::AddJRE( JavaInfo* _pInfo )
+void SvxJavaOptionsPage::AddJRE( JavaInfo const * _pInfo )
 {
 #if HAVE_FEATURE_JAVA
 OUStringBuffer sEntry;
@@ -573,17 +547,15 @@ void SvxJavaOptionsPage::AddFolder( const OUString& 
_rFolder )
 {
 #if HAVE_FEATURE_JAVA
 bool bStartAgain = true;
-JavaInfo* pInfo = nullptr;
+std::unique_ptr pInfo;
 javaFrameworkError eErr = jfw_getJavaInfoByPath( _rFolder.pData, &pInfo );
 if ( JFW_E_NONE == eErr && pInfo )
 {
 sal_Int32 nPos = 0;
 bool bFound = false;
-JavaInfo** parInfo = m_parJavaInfo;
-for ( sal_Int32 i = 0; i < m_nInfoSize; ++i )
+for (auto const & pCmpInfo: m_parJavaInfo)
 {
-JavaInfo* pCmpInfo = *parInfo++;
-if ( jfw_areEqualJavaInfo( pCmpInfo, pInfo ) )
+if ( jfw_areEqualJavaInfo( pCmp

[Libreoffice-commits] core.git: include/jvmfwk jvmfwk/inc jvmfwk/plugins jvmfwk/source stoc/source

2017-04-11 Thread Stephan Bergmann
 include/jvmfwk/framework.hxx|4 ++--
 jvmfwk/inc/vendorplugin.hxx |2 +-
 jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx|2 +-
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |2 +-
 jvmfwk/source/framework.cxx |2 +-
 stoc/source/javavm/javavm.cxx   |2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 583508ced26a422145111242c027b3fbd5687dc5
Author: Stephan Bergmann 
Date:   Tue Apr 11 18:18:42 2017 +0200

sal_Bool -> bool

Change-Id: I8df49f349308cc17d684d5c0e8215aa628dfaeda

diff --git a/include/jvmfwk/framework.hxx b/include/jvmfwk/framework.hxx
index 99d25da9c03e..2373a3e713bc 100644
--- a/include/jvmfwk/framework.hxx
+++ b/include/jvmfwk/framework.hxx
@@ -716,7 +716,7 @@ JVMFWK_DLLPUBLIC javaFrameworkError 
jfw_addJRELocation(rtl_uString * sLocation);
 @param pInfo
 [in]  the JavaInfo object with information about the JRE.
 @param pp_exist
-[out] the parameter is set to either sal_True or sal_False. The value 
is
+[out] the parameter is set to either true or false. The value is
 only valid if the function returns JFW_E_NONE.
 
@return
@@ -724,7 +724,7 @@ JVMFWK_DLLPUBLIC javaFrameworkError 
jfw_addJRELocation(rtl_uString * sLocation);
 JFW_E_ERROR an error occurred during execution.
 JFW_E_INVALID_ARG pInfo contains invalid data
  */
-JVMFWK_DLLPUBLIC javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, 
sal_Bool *exist);
+JVMFWK_DLLPUBLIC javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, bool 
*exist);
 
 
 /** locks this API so that it cannot be used by other threads.
diff --git a/jvmfwk/inc/vendorplugin.hxx b/jvmfwk/inc/vendorplugin.hxx
index 8d019f1c4474..6bae6370c710 100644
--- a/jvmfwk/inc/vendorplugin.hxx
+++ b/jvmfwk/inc/vendorplugin.hxx
@@ -314,7 +314,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
 javaPluginError::Error an error occurred during execution.
 javaPluginError::InvalidArg pInfo contains invalid data
  */
-javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist);
+javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, bool *exist);
 
 #endif
 
diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx 
b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
index 3c1b1901eb75..4f422fd15f54 100644
--- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
+++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
@@ -84,7 +84,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 else
 {
 //check if the JRE was not uninstalled
-sal_Bool bExist = false;
+bool bExist = false;
 errcode = jfw_existJRE(aInfo.get(), &bExist);
 if (errcode == JFW_E_NONE)
 {
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index d69b439f2f0a..860cbc4f2522 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -882,7 +882,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
return errorcode;
 }
 
-javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist)
+javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, bool *exist)
 {
 javaPluginError ret = javaPluginError::NONE;
 if (!pInfo || !exist)
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 218e2ecad297..c094ea6a8da1 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -973,7 +973,7 @@ javaFrameworkError jfw_addJRELocation(rtl_uString * 
sLocation)
 
 }
 
-javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, sal_Bool *exist)
+javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, bool *exist)
 {
 //get the function jfw_plugin_existJRE
 jfw::VendorSettings aVendorSettings;
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 41d786f91a82..3d023ce2373c 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -815,7 +815,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 
> const & rProcessId)
 std::unique_ptr aJavaInfo;
 if (JFW_E_NONE == jfw_getSelectedJRE(&aJavaInfo))
 {
-sal_Bool bExist = false;
+bool bExist = false;
 if (JFW_E_NONE == jfw_existJRE(aJavaInfo.get(), &bExist))
 {
 if (!bExist
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Stephan Bergmann
 include/jvmfwk/framework.hxx|1 -
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |6 --
 jvmfwk/source/framework.cxx |3 ---
 3 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 15c98f1740708ad7c05753ea28d5ad8ed4430e02
Author: Stephan Bergmann 
Date:   Tue Apr 11 18:25:04 2017 +0200

jfw_existJRE requires non-null args, never returns JFW_E_INVALID_ARG

Change-Id: I2067b77393427a5a6a4273c2f609ff8d335f436a

diff --git a/include/jvmfwk/framework.hxx b/include/jvmfwk/framework.hxx
index 2373a3e713bc..139cda024766 100644
--- a/include/jvmfwk/framework.hxx
+++ b/include/jvmfwk/framework.hxx
@@ -722,7 +722,6 @@ JVMFWK_DLLPUBLIC javaFrameworkError 
jfw_addJRELocation(rtl_uString * sLocation);
@return
 JFW_E_NONE the function ran successfully.
 JFW_E_ERROR an error occurred during execution.
-JFW_E_INVALID_ARG pInfo contains invalid data
  */
 JVMFWK_DLLPUBLIC javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, bool 
*exist);
 
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 860cbc4f2522..a5f11e6a3c21 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -30,6 +30,7 @@
 
 #include 
 
+#include 
 #include 
 #include "config_options.h"
 #include "osl/diagnose.h"
@@ -884,9 +885,10 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
 
 javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, bool *exist)
 {
+assert(pInfo != nullptr);
+assert(exist != nullptr);
+
 javaPluginError ret = javaPluginError::NONE;
-if (!pInfo || !exist)
-return javaPluginError::InvalidArg;
 OUString sLocation(pInfo->sLocation);
 
 if (sLocation.isEmpty())
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index c094ea6a8da1..a0208180dc30 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -987,9 +987,6 @@ javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, bool 
*exist)
 case javaPluginError::NONE:
 ret = JFW_E_NONE;
 break;
-case javaPluginError::InvalidArg:
-ret = JFW_E_INVALID_ARG;
-break;
 case javaPluginError::Error:
 ret = JFW_E_ERROR;
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Stephan Bergmann
 cui/source/options/optjava.cxx |6 +++---
 include/jvmfwk/framework.hxx   |6 +++---
 jvmfwk/source/framework.cxx|2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 16f29aa720c3f1a27f1ee6898630b10b897899c8
Author: Stephan Bergmann 
Date:   Tue Apr 11 18:28:43 2017 +0200

sal_Bool -> bool

Change-Id: Iec70d6726e36af607a0a5b5a0f6dc86d05322435

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 51f8b37b98e5..4dda48d41627 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -323,7 +323,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl, 
Button*, void)
 if ( !areListsEqual( aParameterList, m_pParamDlg->GetParameters() ) )
 {
 aParameterList = m_pParamDlg->GetParameters();
-sal_Bool bRunning = false;
+bool bRunning = false;
 javaFrameworkError eErr = jfw_isVMRunning( &bRunning );
 DBG_ASSERT( JFW_E_NONE == eErr,
 "SvxJavaOptionsPage::ParameterHdl_Impl(): error in 
jfw_isVMRunning" );
@@ -368,7 +368,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl, 
Button*, void)
 if ( m_pPathDlg->GetClassPath() != sClassPath )
 {
 sClassPath = m_pPathDlg->GetClassPath();
-sal_Bool bRunning = false;
+bool bRunning = false;
 javaFrameworkError eErr = jfw_isVMRunning( &bRunning );
 DBG_ASSERT( JFW_E_NONE == eErr,
 "SvxJavaOptionsPage::ParameterHdl_Impl(): error in 
jfw_isVMRunning" );
@@ -683,7 +683,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* 
/*rCoreSet*/ )
 {
 if (!pSelectedJava || !jfw_areEqualJavaInfo( pInfo, 
pSelectedJava.get() ) )
 {
-sal_Bool bRunning = false;
+bool bRunning = false;
 eErr = jfw_isVMRunning( &bRunning );
 DBG_ASSERT( JFW_E_NONE == eErr,
 "SvxJavaOptionsPage::FillItemSet(): error in 
jfw_isVMRunning" );
diff --git a/include/jvmfwk/framework.hxx b/include/jvmfwk/framework.hxx
index 139cda024766..e941b9a9f2fc 100644
--- a/include/jvmfwk/framework.hxx
+++ b/include/jvmfwk/framework.hxx
@@ -296,14 +296,14 @@ JVMFWK_DLLPUBLIC bool jfw_areEqualJavaInfo(
 that the changed setting may not be effective immediately.
 
 @param bRunning
-[out] sal_True - a VM is running. 
-sal_False - no VM is running.
+[out] true - a VM is running. 
+false - no VM is running.
 
 @return
 JFW_E_NONE function ran successfully.
 JFW_E_INVALID_ARG the parameter bRunning was NULL.
 */
-JVMFWK_DLLPUBLIC javaFrameworkError jfw_isVMRunning(sal_Bool *bRunning);
+JVMFWK_DLLPUBLIC javaFrameworkError jfw_isVMRunning(bool *bRunning);
 
 /** detects a suitable JRE and configures the framework to use it.
 
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index a0208180dc30..8447d320aae6 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -684,7 +684,7 @@ javaFrameworkError 
jfw_getSelectedJRE(std::unique_ptr *ppInfo)
 return errcode;
 }
 
-javaFrameworkError jfw_isVMRunning(sal_Bool *bRunning)
+javaFrameworkError jfw_isVMRunning(bool *bRunning)
 {
 osl::MutexGuard guard(jfw::FwkMutex::get());
 if (bRunning == nullptr)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Stephan Bergmann
 cui/source/options/optjava.cxx |   20 +++-
 include/jvmfwk/framework.hxx   |9 ++---
 jvmfwk/source/framework.cxx|   10 ++
 3 files changed, 7 insertions(+), 32 deletions(-)

New commits:
commit 33cf2b6613da36863f6f64a7ac1e413ac1e641ff
Author: Stephan Bergmann 
Date:   Tue Apr 11 18:33:31 2017 +0200

Let jfw_isVMRunning return the result; there are no error conditions

Change-Id: I004b3d6f6b7b32d1bb41072d7fdd4a66f944d992

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 4dda48d41627..843fc2e5eb52 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -323,12 +323,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl, 
Button*, void)
 if ( !areListsEqual( aParameterList, m_pParamDlg->GetParameters() ) )
 {
 aParameterList = m_pParamDlg->GetParameters();
-bool bRunning = false;
-javaFrameworkError eErr = jfw_isVMRunning( &bRunning );
-DBG_ASSERT( JFW_E_NONE == eErr,
-"SvxJavaOptionsPage::ParameterHdl_Impl(): error in 
jfw_isVMRunning" );
-(void)eErr;
-if ( bRunning )
+if ( jfw_isVMRunning() )
 {
 SolarMutexGuard aGuard;
 
svtools::executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, svtools::RESTART_REASON_ASSIGNING_JAVAPARAMETERS);
@@ -368,12 +363,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl, 
Button*, void)
 if ( m_pPathDlg->GetClassPath() != sClassPath )
 {
 sClassPath = m_pPathDlg->GetClassPath();
-bool bRunning = false;
-javaFrameworkError eErr = jfw_isVMRunning( &bRunning );
-DBG_ASSERT( JFW_E_NONE == eErr,
-"SvxJavaOptionsPage::ParameterHdl_Impl(): error in 
jfw_isVMRunning" );
-(void)eErr;
-if ( bRunning )
+if ( jfw_isVMRunning() )
 {
 SolarMutexGuard aGuard;
 
svtools::executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, svtools::RESTART_REASON_ASSIGNING_FOLDERS);
@@ -683,11 +673,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* 
/*rCoreSet*/ )
 {
 if (!pSelectedJava || !jfw_areEqualJavaInfo( pInfo, 
pSelectedJava.get() ) )
 {
-bool bRunning = false;
-eErr = jfw_isVMRunning( &bRunning );
-DBG_ASSERT( JFW_E_NONE == eErr,
-"SvxJavaOptionsPage::FillItemSet(): error in 
jfw_isVMRunning" );
-if ( bRunning ||
+if ( jfw_isVMRunning() ||
 ( ( pInfo->nRequirements & JFW_REQUIRE_NEEDRESTART ) 
== JFW_REQUIRE_NEEDRESTART ) )
 {
 svtools::executeRestartDialog(
diff --git a/include/jvmfwk/framework.hxx b/include/jvmfwk/framework.hxx
index e941b9a9f2fc..d212ed224455 100644
--- a/include/jvmfwk/framework.hxx
+++ b/include/jvmfwk/framework.hxx
@@ -295,15 +295,10 @@ JVMFWK_DLLPUBLIC bool jfw_areEqualJavaInfo(
 By determining if a VM is running, the user can be presented a message,
 that the changed setting may not be effective immediately.
 
-@param bRunning
-[out] true - a VM is running. 
-false - no VM is running.
-
 @return
-JFW_E_NONE function ran successfully.
-JFW_E_INVALID_ARG the parameter bRunning was NULL.
+true iff a VM is running.
 */
-JVMFWK_DLLPUBLIC javaFrameworkError jfw_isVMRunning(bool *bRunning);
+JVMFWK_DLLPUBLIC bool jfw_isVMRunning();
 
 /** detects a suitable JRE and configures the framework to use it.
 
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 8447d320aae6..751068cabf0e 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -684,16 +684,10 @@ javaFrameworkError 
jfw_getSelectedJRE(std::unique_ptr *ppInfo)
 return errcode;
 }
 
-javaFrameworkError jfw_isVMRunning(bool *bRunning)
+bool jfw_isVMRunning()
 {
 osl::MutexGuard guard(jfw::FwkMutex::get());
-if (bRunning == nullptr)
-return JFW_E_INVALID_ARG;
-if (g_pJavaVM == nullptr)
-*bRunning = false;
-else
-*bRunning = true;
-return JFW_E_NONE;
+return g_pJavaVM != nullptr;
 }
 
 javaFrameworkError jfw_getJavaInfoByPath(rtl_uString *pPath, 
std::unique_ptr *ppInfo)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: connectivity/source cui/source include/jvmfwk jvmfwk/plugins jvmfwk/source stoc/source

2017-04-11 Thread Stephan Bergmann
 connectivity/source/drivers/hsqldb/HDriver.cxx   |2 +-
 connectivity/source/drivers/jdbc/JDriver.cxx |2 +-
 cui/source/options/optjava.cxx   |4 ++--
 include/jvmfwk/framework.hxx |2 +-
 jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx |2 +-
 jvmfwk/source/framework.cxx  |2 +-
 stoc/source/javavm/javavm.cxx|2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 7635e0c1c7f821a1081f8e3868f641ae74a172d6
Author: Stephan Bergmann 
Date:   Tue Apr 11 18:38:51 2017 +0200

sal_Bool -> bool

Change-Id: If632eb547aa5082ad13eac8c2ad39a1742309fc7

diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx 
b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 36abefe200d3..4d35689f2f31 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -384,7 +384,7 @@ namespace connectivity
 
 sal_Bool SAL_CALL ODriverDelegator::acceptsURL( const OUString& url )
 {
-sal_Bool bEnabled = false;
+bool bEnabled = false;
 javaFrameworkError e = jfw_getEnabled(&bEnabled);
 switch (e) {
 case JFW_E_NONE:
diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx 
b/connectivity/source/drivers/jdbc/JDriver.cxx
index 2a9c894aa4f9..2ae3deb0f27d 100644
--- a/connectivity/source/drivers/jdbc/JDriver.cxx
+++ b/connectivity/source/drivers/jdbc/JDriver.cxx
@@ -108,7 +108,7 @@ sal_Bool SAL_CALL java_sql_Driver::acceptsURL( const 
OUString& url )
 {
 // don't ask the real driver for the url
 // I feel responsible for all jdbc url's
-sal_Bool bEnabled = false;
+bool bEnabled = false;
 javaFrameworkError e = jfw_getEnabled(&bEnabled);
 switch (e) {
 case JFW_E_NONE:
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 843fc2e5eb52..41430d586db2 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -690,7 +690,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* 
/*rCoreSet*/ )
 }
 }
 
-sal_Bool bEnabled = false;
+bool bEnabled = false;
 eErr = jfw_getEnabled( &bEnabled );
 DBG_ASSERT( JFW_E_NONE == eErr,
 "SvxJavaOptionsPage::FillItemSet(): error in jfw_getEnabled" );
@@ -715,7 +715,7 @@ void SvxJavaOptionsPage::Reset( const SfxItemSet* /*rSet*/ )
 SvtMiscOptions aMiscOpt;
 
 #if HAVE_FEATURE_JAVA
-sal_Bool bEnabled = false;
+bool bEnabled = false;
 javaFrameworkError eErr = jfw_getEnabled( &bEnabled );
 if ( eErr != JFW_E_NONE )
 bEnabled = false;
diff --git a/include/jvmfwk/framework.hxx b/include/jvmfwk/framework.hxx
index d212ed224455..a3612a99e25a 100644
--- a/include/jvmfwk/framework.hxx
+++ b/include/jvmfwk/framework.hxx
@@ -582,7 +582,7 @@ JVMFWK_DLLPUBLIC javaFrameworkError jfw_setEnabled(bool 
bEnabled);
 were not met.
 JFW_E_DIRECT_MODE the function cannot be used in this mode.
  */
-JVMFWK_DLLPUBLIC javaFrameworkError jfw_getEnabled(sal_Bool *pbEnabled);
+JVMFWK_DLLPUBLIC javaFrameworkError jfw_getEnabled(bool *pbEnabled);
 
 /** determines parameters which are passed to VM during its creation.
 
diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx 
b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
index 4f422fd15f54..8649bd121b89 100644
--- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
+++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
@@ -54,7 +54,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 fprintf(stdout, HELP_TEXT);// default
 return 0;
 }
-sal_Bool bEnabled = false;
+bool bEnabled = false;
 javaFrameworkError errcode = jfw_getEnabled( & bEnabled);
 if (errcode == JFW_E_NONE && !bEnabled)
 {
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 751068cabf0e..96a75249 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -823,7 +823,7 @@ javaFrameworkError jfw_setEnabled(bool bEnabled)
 return errcode;
 }
 
-javaFrameworkError jfw_getEnabled(sal_Bool *pbEnabled)
+javaFrameworkError jfw_getEnabled(bool *pbEnabled)
 {
 javaFrameworkError errcode = JFW_E_NONE;
 try
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 3d023ce2373c..18ab9084c78e 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -938,7 +938,7 @@ sal_Bool SAL_CALL JavaVirtualMachine::isVMEnabled()
 //initVMConfiguration(&aJvm, m_xContext->getServiceManager(), m_xContext);
 //return aJvm.isEnabled();
 //ToDo
-sal_Bool bEnabled = false;
+bool bEnabled = false;
 if (jfw_getEnabled( & bEnabled) != JFW_E_NONE)
 throw css::uno::RuntimeException();
 return bEnabled;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/ma

Re: LO 5.3.2.2: msi silent install: UI_LANGS property seems not to work as expected

2017-04-11 Thread Oliver Brinzing

Hi,

> the Parameter ADDLOCAL=ALL overwrite the other parameter

yes, this seems to be true, so I decided to add all features and remove the
unnecessary dictionaries and language packs:

msiexec /qb /passive /i %product%.msi /L*V lo_install.log INSTALLLOCATION="C:\Program Files 
(x86)\LibreOffice"
ALLUSERS=1 ADDLOCAL=ALL CREATEDESKTOPLINK=0 REGISTER_NO_MSO_TYPES=1 ISCHECKFORPRODUCTUPDATES=0 
REBOOTYESNO=No QUICKSTART=1 VC_REDIST=1

REMOVE=gm_o_Onlineupdate,gm_o_Extensions_MEDIAWIKI,gm_r_ex_Dictionary_Af,[...],
gm_Langpack_r_ar,gm_Langpack_r_as,gm_Langpack_r_ast,gm_Langpack_r_be,[...]

works fine :-)

Best Regards

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


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

2017-04-11 Thread Stephan Bergmann
 jvmfwk/source/framework.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 40677a29093b8e47dfdc17a251845624c57430f6
Author: Stephan Bergmann 
Date:   Tue Apr 11 18:59:13 2017 +0200

Fix missing deref

...lacking since recent f0454e72c1d1b11c3bcbacb23048a62fdecd037c "Use
std::unique_ptr for lifecycle management in jvmfwk/framework.hxx"

Change-Id: Ied39be52ccc8cbef48cdfb4933e4ac1914fd0fd3

diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 96a75249..5bfa77695e83 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -660,7 +660,7 @@ javaFrameworkError 
jfw_getSelectedJRE(std::unique_ptr *ppInfo)
 
 const jfw::MergedSettings settings;
 ppInfo->reset(settings.createJavaInfo());
-if (! ppInfo)
+if (!*ppInfo)
 {
 return JFW_E_NONE;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Stephan Bergmann
 cui/source/options/optjava.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 87d4fd3b13f4dad7b043a776124e947bd0517014
Author: Stephan Bergmann 
Date:   Tue Apr 11 19:00:55 2017 +0200

Remove unnecessary casts to void

Change-Id: Ib817e07d4becd7c4cf92501b747d7628ef231c55

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 41430d586db2..a0d4d8dabcc1 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -640,7 +640,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* 
/*rCoreSet*/ )
 for ( i = 0; i < nSize; ++i )
 pParamArr[i] = pList[i].pData;
 eErr = jfw_setVMParameters( pParamArr, nSize );
-SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", 
"SvxJavaOptionsPage::FillItemSet(): error in jfw_setVMParameters"); (void)eErr;
+SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", 
"SvxJavaOptionsPage::FillItemSet(): error in jfw_setVMParameters");
 rtl_freeMemory( pParamArr );
 bModified = true;
 }
@@ -651,7 +651,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* 
/*rCoreSet*/ )
 if ( m_pPathDlg->GetOldPath() != sPath )
 {
 eErr = jfw_setUserClassPath( sPath.pData );
-SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", 
"SvxJavaOptionsPage::FillItemSet(): error in jfw_setUserClassPath"); (void)eErr;
+SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", 
"SvxJavaOptionsPage::FillItemSet(): error in jfw_setUserClassPath");
 bModified = true;
 }
 }
@@ -682,7 +682,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* 
/*rCoreSet*/ )
 }
 
 eErr = jfw_setSelectedJRE( pInfo );
-SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", 
"SvxJavaOptionsPage::FillItemSet(): error in jfw_setSelectedJRE"); (void)eErr;
+SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", 
"SvxJavaOptionsPage::FillItemSet(): error in jfw_setSelectedJRE");
 bModified = true;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Eike Rathke
 sc/inc/postit.hxx  |4 ++--
 sc/source/core/data/postit.cxx |   30 ++
 sc/source/ui/undo/undocell.cxx |8 
 sc/source/ui/view/notemark.cxx |3 +++
 4 files changed, 31 insertions(+), 14 deletions(-)

New commits:
commit 8aa8be724dafc266d7daeae325806ca2caae2efe
Author: Eike Rathke 
Date:   Tue Apr 11 19:05:46 2017 +0200

deleting pModel also deletes the SdrCaptionObj

Change-Id: Icf3aed35ede1c211d6238dc66d86cb2866b247cd

diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index a55cc917ab80..52dc58ef26d0 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -65,6 +65,9 @@ ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* 
pRight, vcl::Window*
 
 ScNoteMarker::~ScNoteMarker()
 {
+if (pModel)
+mxObject.release(); // deleting pModel also deletes the 
SdrCaptionObj
+
 InvalidateWin();
 
 delete pModel;
commit 59aebc3e51490ba9c76a261b2e5090b12f30e0da
Author: Eike Rathke 
Date:   Tue Apr 11 18:53:36 2017 +0200

set mbNotOwner at various places

Change-Id: I1ff14c573d556cad15513dfe3f0fecbf9107fa41

diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index ef15c8556762..e8afbb2479dc 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -481,6 +481,7 @@ ScCaptionPtr::ScCaptionPtr( ScCaptionPtr&& r ) :
 {
 r.replaceInList( this );
 r.mpCaption = nullptr;
+r.mbNotOwner = false;
 }
 
 ScCaptionPtr& ScCaptionPtr::operator=( ScCaptionPtr&& r )
@@ -490,9 +491,11 @@ ScCaptionPtr& ScCaptionPtr::operator=( ScCaptionPtr&& r )
 mpHead = r.mpHead;
 mpNext = r.mpNext;
 mpCaption = r.mpCaption;
+mbNotOwner = r.mbNotOwner;
 
 r.replaceInList( this );
 r.mpCaption = nullptr;
+r.mbNotOwner = false;
 
 return *this;
 }
@@ -525,6 +528,7 @@ ScCaptionPtr& ScCaptionPtr::operator=( const ScCaptionPtr& 
r )
 removeFromList();
 
 mpCaption = r.mpCaption;
+mbNotOwner = r.mbNotOwner;
 // That head is this' master.
 mpHead = r.mpHead;
 // Insert into list.
@@ -656,6 +660,7 @@ void ScCaptionPtr::reset( SdrCaptionObj* p )
 decRefAndDestroy();
 removeFromList();
 mpCaption = p;
+mbNotOwner = false;
 if (p)
 {
 newHead();
@@ -776,6 +781,7 @@ bool ScCaptionPtr::forget()
 bool bRet = decRef();
 removeFromList();
 mpCaption = nullptr;
+mbNotOwner = false;
 return bRet;
 }
 
@@ -800,6 +806,7 @@ void ScCaptionPtr::clear()
 mpHead = nullptr;
 mpNext = nullptr;
 mpCaption = nullptr;
+mbNotOwner = false;
 }
 
 
commit 024ddbc7d2ffe6b4b84c48b213296a0716086b6d
Author: Eike Rathke 
Date:   Tue Apr 11 18:05:09 2017 +0200

reset variables when not owner

Change-Id: Ieab4bf36b89abac2d2ff377fc2b6f31ce0e1d3aa

diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 78cd43a6a5c2..ef15c8556762 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -695,9 +695,16 @@ void ScCaptionPtr::decRefAndDestroy()
 #if 1
 // FIXME: there are still cases where the caption pointer is dangling
 mpCaption = nullptr;
+mbNotOwner = false;
 #else
-// Destroying Draw Undo deletes its SdrObject, don't attempt that 
twice.
-if (!mbNotOwner)
+// Destroying Draw Undo and some other delete the SdrObject, don't
+// attempt that twice.
+if (mbNotOwner)
+{
+mpCaption = nullptr;
+mbNotOwner = false;
+}
+else
 {
 removeFromDrawPageAndFree( true );  // ignoring Undo
 if (mpCaption)
commit e777618a59b6a66207d416b7b4dd3e77c2662260
Author: Eike Rathke 
Date:   Tue Apr 11 17:16:32 2017 +0200

rename ScCaptionPtr (mb|set)InUndo to (mb|set)NotOwner

... which better suits the general purpose we'll need

Change-Id: I32805c91d17180d5f18225a02c8a436826242e19

diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx
index a630aef271db..d9584e1e7005 100644
--- a/sc/inc/postit.hxx
+++ b/sc/inc/postit.hxx
@@ -86,7 +86,7 @@ public:
 bool forget();
 
 /** Flag that this instance is in Undo, so drawing layer owns it. */
-void setInUndo();
+void setNotOwner();
 
 oslInterlockedCount getRefs() const;
 
@@ -104,7 +104,7 @@ private:
 Head* mpHead;   ///< points to the "master" entry
 mutable ScCaptionPtr* mpNext;   ///< next in list
 SdrCaptionObj*mpCaption;///< the caption object, managed by 
head master
-bool  mbInUndo; ///< whether this caption object is 
held in Undo
+bool  mbNotOwner;   ///< whether this caption object is 
owned by something else, e.g. held in Undo
 /* TODO: can that be moved to Head?
  * It's unclear when to reset, so
 

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

2017-04-11 Thread Stephan Bergmann
 include/jvmfwk/framework.hxx|   12 --
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |5 +-
 jvmfwk/source/elements.cxx  |   10 -
 jvmfwk/source/framework.cxx |   35 ++--
 4 files changed, 22 insertions(+), 40 deletions(-)

New commits:
commit 59fddf430f4d80c7e9ae0b7064697f5471bffedf
Author: Stephan Bergmann 
Date:   Tue Apr 11 19:10:23 2017 +0200

Calls to jvmfwk/framework.hxx must not pass in null, drop JFW_E_INVALID_ARG

Change-Id: Iff4b8ccc79e194f645791ac73818e3b677ae32a6

diff --git a/include/jvmfwk/framework.hxx b/include/jvmfwk/framework.hxx
index a3612a99e25a..fe806af5bc83 100644
--- a/include/jvmfwk/framework.hxx
+++ b/include/jvmfwk/framework.hxx
@@ -194,7 +194,6 @@ enum javaFrameworkError
 {
 JFW_E_NONE,
 JFW_E_ERROR,
-JFW_E_INVALID_ARG,
 JFW_E_NO_SELECT,
 JFW_E_INVALID_SETTINGS,
 JFW_E_NEED_RESTART,
@@ -384,7 +383,6 @@ JVMFWK_DLLPUBLIC javaFrameworkError 
jfw_findAndSelectJRE(std::unique_ptr
-JFW_E_INVALID_ARG parInfo was NULL
 JFW_E_ERROR an error occurred. 
 JFW_E_CONFIGURATION mode was not properly set or their prerequisites
 were not met.
@@ -413,7 +411,6 @@ JVMFWK_DLLPUBLIC javaFrameworkError jfw_findAllJREs(
 
@return
JFW_E_NONE function ran successfully.
-   JFW_E_INVALID_ARG at least on of the parameters was NULL
JFW_E_ERROR an error occurred. 
JFW_E_CONFIGURATION mode was not properly set or their prerequisites
were not met.
@@ -468,8 +465,6 @@ JVMFWK_DLLPUBLIC javaFrameworkError jfw_getJavaInfoByPath(
 
 @return
 JFW_E_NONE function ran successfully.
-JFW_E_INVALID_ARG ppVM, ppEnv are NULL or
-arOptions was NULL but nSize was greater 0.
 JFW_E_ERROR an error occurred. 
 JFW_E_CONFIGURATION mode was not properly set or their prerequisites
 were not met.
@@ -542,7 +537,6 @@ JVMFWK_DLLPUBLIC javaFrameworkError 
jfw_setSelectedJRE(JavaInfo const *pInfo);
 
 @return
 JFW_E_NONE function ran successfully.
-JFW_E_INVALIDARG ppInfo is a NULL.
 JFW_E_CONFIGURATION mode was not properly set or their prerequisites
 were not met.
 JFW_E_INVALID_SETTINGS the javavendors.xml has been changed and no
@@ -576,7 +570,6 @@ JVMFWK_DLLPUBLIC javaFrameworkError jfw_setEnabled(bool 
bEnabled);
 
@return
JFW_E_NONE function ran successfully.
-   JFW_E_INVALIDARG pbEnabled is NULL
JFW_E_ERROR An error occurred.
JFW_E_CONFIGURATION mode was not properly set or their prerequisites
 were not met.
@@ -600,7 +593,6 @@ JVMFWK_DLLPUBLIC javaFrameworkError jfw_getEnabled(bool 
*pbEnabled);
 
 @return
 JFW_E_NONE function ran successfully.
-JFW_E_INVALIDARG arArgs is NULL and nSize is not 0
 JFW_E_ERROR An error occurred.
 JFW_E_CONFIGURATION mode was not properly set or their prerequisites
 were not met.
@@ -625,7 +617,6 @@ JVMFWK_DLLPUBLIC javaFrameworkError jfw_setVMParameters(
 
 @return
 JFW_E_NONE function ran successfully.
-JFW_E_INVALIDARG parParameters or pSize are  NULL
 JFW_E_ERROR An error occurred.
 JFW_E_CONFIGURATION mode was not properly set or their prerequisites
 were not met.
@@ -647,7 +638,6 @@ JVMFWK_DLLPUBLIC javaFrameworkError jfw_getVMParameters(
 
@return
JFW_E_NONE function ran successfully.
-   JFW_E_INVALIDARG pCP is NULL.
JFW_E_ERROR An error occurred.
JFW_E_CONFIGURATION mode was not properly set or their prerequisites
 were not met.
@@ -666,7 +656,6 @@ JVMFWK_DLLPUBLIC javaFrameworkError 
jfw_setUserClassPath(rtl_uString * pCP);
 
@return
JFW_E_NONE function ran successfully.
-   JFW_E_INVALIDARG ppCP is NULL.
JFW_E_ERROR An error occurred.
JFW_E_CONFIGURATION mode was not properly set or their prerequisites
 were not met.
@@ -694,7 +683,6 @@ JVMFWK_DLLPUBLIC javaFrameworkError 
jfw_getUserClassPath(rtl_uString ** ppCP);
 
 @return
 JFW_E_NONE function ran successfully.
-JFW_E_INVALIDARG sLocation is NULL.
 JFW_E_ERROR An error occurred.
 JFW_E_CONFIGURATION mode was not properly set or their prerequisites
 were not met.
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index a5f11e6a3c21..84e60a9cf254 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -645,14 +645,15 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
 JavaVM ** ppVm,
 JNIEnv ** ppEnv)
 {
+assert(pInfo != nullptr);
+assert(ppVm != nullptr);
+assert(ppEnv != nullptr);
 // unless guard is volatile the following warning occurs on gcc:
 // warning: variable 't' might be clobbered by `longjmp' or `vfork'
 volatile osl::MutexGuard guard(PluginMutex::get());
 // unless errorcode is volatile the following warning occurs on gcc:
 // warning: variable 'errorcode' might be clobbered by `long

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

2017-04-11 Thread Mike Kaganski
 shell/source/win32/spsupp/registrar.cxx |   22 +-
 1 file changed, 21 insertions(+), 1 deletion(-)

New commits:
commit aa4e06c67dbe414ae26b757d6968eb27b5ebeb99
Author: Mike Kaganski 
Date:   Tue Apr 11 19:20:24 2017 +0300

tdf#103058: use RegQueryValueEx instead of RegGetValue

because the latter is unsupported on WinXP

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

diff --git a/shell/source/win32/spsupp/registrar.cxx 
b/shell/source/win32/spsupp/registrar.cxx
index 5ece3fcdd2d8..5d49efe7c88c 100644
--- a/shell/source/win32/spsupp/registrar.cxx
+++ b/shell/source/win32/spsupp/registrar.cxx
@@ -14,8 +14,28 @@ namespace {
 
 HRESULT RegRead(HKEY hRootKey, const wchar_t* subKey, const wchar_t* 
valName, wchar_t* valData, size_t cchData)
 {
+HKEY hKey;
+long iRetVal = RegCreateKeyExW(
+hRootKey,
+subKey,
+0,
+nullptr,
+REG_OPTION_NON_VOLATILE,
+KEY_READ,
+nullptr,
+&hKey,
+nullptr);
+if (iRetVal != ERROR_SUCCESS)
+return HRESULT_FROM_WIN32(iRetVal);
+
 DWORD cbData = cchData * sizeof(valData[0]);
-long iRetVal = RegGetValue(hRootKey, subKey, valName, RRF_RT_REG_SZ, 
nullptr, valData, &cbData);
+DWORD dwType;
+iRetVal = RegQueryValueExW(hKey, valName, nullptr, &dwType, 
reinterpret_cast(valData), &cbData);
+RegCloseKey(hKey);
+if ((iRetVal == ERROR_SUCCESS) && (dwType != REG_SZ))
+{
+return E_FAIL;
+}
 return HRESULT_FROM_WIN32(iRetVal);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Mike Kaganski
 shell/source/win32/spsupp/registrar.cxx |   22 +-
 1 file changed, 21 insertions(+), 1 deletion(-)

New commits:
commit acd8692001803b67fb4e131bbf30efb07724cde9
Author: Mike Kaganski 
Date:   Tue Apr 11 19:20:24 2017 +0300

tdf#103058: use RegQueryValueEx instead of RegGetValue

because the latter is unsupported on WinXP

Change-Id: Ie922271ab837637d77f3d76c5144d10a7f5a5f0d
Reviewed-on: https://gerrit.libreoffice.org/36416
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
(cherry picked from commit aa4e06c67dbe414ae26b757d6968eb27b5ebeb99)
Reviewed-on: https://gerrit.libreoffice.org/36419
Tested-by: Mike Kaganski 

diff --git a/shell/source/win32/spsupp/registrar.cxx 
b/shell/source/win32/spsupp/registrar.cxx
index 5ece3fcdd2d8..5d49efe7c88c 100644
--- a/shell/source/win32/spsupp/registrar.cxx
+++ b/shell/source/win32/spsupp/registrar.cxx
@@ -14,8 +14,28 @@ namespace {
 
 HRESULT RegRead(HKEY hRootKey, const wchar_t* subKey, const wchar_t* 
valName, wchar_t* valData, size_t cchData)
 {
+HKEY hKey;
+long iRetVal = RegCreateKeyExW(
+hRootKey,
+subKey,
+0,
+nullptr,
+REG_OPTION_NON_VOLATILE,
+KEY_READ,
+nullptr,
+&hKey,
+nullptr);
+if (iRetVal != ERROR_SUCCESS)
+return HRESULT_FROM_WIN32(iRetVal);
+
 DWORD cbData = cchData * sizeof(valData[0]);
-long iRetVal = RegGetValue(hRootKey, subKey, valName, RRF_RT_REG_SZ, 
nullptr, valData, &cbData);
+DWORD dwType;
+iRetVal = RegQueryValueExW(hKey, valName, nullptr, &dwType, 
reinterpret_cast(valData), &cbData);
+RegCloseKey(hKey);
+if ((iRetVal == ERROR_SUCCESS) && (dwType != REG_SZ))
+{
+return E_FAIL;
+}
 return HRESULT_FROM_WIN32(iRetVal);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Miklos Vajna
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   12 +---
 vcl/source/gdi/pdfwriter_impl.cxx  |   17 -
 2 files changed, 17 insertions(+), 12 deletions(-)

New commits:
commit 54a4121f2040bd11f3d6056767f2d7ad6c7745ac
Author: Miklos Vajna 
Date:   Tue Apr 11 17:39:10 2017 +0200

PDF export of PDF images: compress page stream if requested

compressStream() automatically takes care of
VCL_DEBUG_DISABLE_PDFCOMPRESSION, so this also simplifies code.

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

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 76cad0f2a9af..36b5134bdaf3 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -481,10 +481,16 @@ void PdfExportTest::testTdf107089()
 // Make sure 'Hello' is part of the form object's stream.
 vcl::filter::PDFStreamElement* pStream = pForm->GetStream();
 CPPUNIT_ASSERT(pStream);
-SvMemoryStream& rObjectStream = pStream->GetMemory();
+SvMemoryStream aObjectStream;
+ZCodec aZCodec;
+aZCodec.BeginCompression();
+pStream->GetMemory().Seek(0);
+aZCodec.Decompress(pStream->GetMemory(), aObjectStream);
+CPPUNIT_ASSERT(aZCodec.EndCompression());
+aObjectStream.Seek(0);
 OString aHello("Hello");
-auto pStart = static_cast(rObjectStream.GetData());
-const char* pEnd = pStart + rObjectStream.GetSize();
+auto pStart = static_cast(aObjectStream.GetData());
+const char* pEnd = pStart + aObjectStream.GetSize();
 auto it = std::search(pStart, pEnd, aHello.getStr(), aHello.getStr() + 
aHello.getLength());
 // This failed, 'Hello' was part only a mixed compressed/uncompressed 
stream, i.e. garbage.
 CPPUNIT_ASSERT(it != pEnd);
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 4c7542de2bfa..23706483e3f3 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -11164,10 +11164,11 @@ void 
PDFWriterImpl::writeReferenceXObject(ReferenceXObjectEmit& rEmit)
 aLine.append(aSize.Height());
 aLine.append(" ]");
 
+if (!g_bDebugDisableCompression)
+aLine.append(" /Filter/FlateDecode");
 aLine.append(" /Length ");
 
-sal_Int32 nLength = 0;
-OStringBuffer aStream;
+SvMemoryStream aStream;
 for (auto pContent : aContentStreams)
 {
 filter::PDFStreamElement* pPageStream = pContent->GetStream();
@@ -11196,21 +11197,19 @@ void 
PDFWriterImpl::writeReferenceXObject(ReferenceXObjectEmit& rEmit)
 continue;
 }
 
-nLength += aMemoryStream.GetSize();
-aStream.append(static_cast(aMemoryStream.GetData()), aMemoryStream.GetSize());
+aStream.WriteBytes(aMemoryStream.GetData(), 
aMemoryStream.GetSize());
 }
 else
-{
-nLength += rPageStream.GetSize();
-aStream.append(static_cast(rPageStream.GetData()), rPageStream.GetSize());
-}
+aStream.WriteBytes(rPageStream.GetData(), 
rPageStream.GetSize());
 }
 
+compressStream(&aStream);
+sal_Int32 nLength = aStream.Tell();
 aLine.append(nLength);
 
 aLine.append(">>\nstream\n");
 // Copy the original page streams to the form XObject stream.
-aLine.append(aStream.makeStringAndClear());
+aLine.append(static_cast(aStream.GetData()), 
aStream.GetSize());
 aLine.append("\nendstream\nendobj\n\n");
 if (!updateObject(nWrappedFormObject))
 return;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Ticket #5854990] Your Apple ID has been locked !

2017-04-11 Thread Apple ID - Unmonitored Automated Email
To recover your Apple ID. Unfortunately, our automated system has determined 
that the information you provided was not sufficient for us to validate your 
account ownership.  Apple Inc takes the security and privacy of our customers 
very seriously, and our commitment to protecting your personal information 
requires that we take the utmost care in ensuring that you are the account 
owner.
 Please submit a new account verification form
 At this point, your best option is to submit a new form with as much accurate 
information as you can gather. The more information you can include in the 
form, the better the chance you�ll have of regaining access to your account. 
We�ve included a few tips below to help you fill out the form as completely and 
accurately as possible. 
 > Submit a new form
 Helpful tips for filling out another form:
 * Use the information you provided when you created the account, or last 
updated it.
   * Submit the form from a phone you frequently use. 
 Ready?
 > Submit a new form
 Thank you,
Apple Inc Support Team
 Apple Corporation
Redmond, WA 98052
USA
 Account recovery request 261603266 is now closed. Please do not reply to this 
message. Replies to this message are routed to an unmonitored mailbox.  Apple 
Inc respects your privacy.  To learn more, please read our privacy.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: jvmfwk/inc jvmfwk/plugins

2017-04-11 Thread Stephan Bergmann
 jvmfwk/inc/vendorplugin.hxx |   13 ++---
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |   20 ++--
 2 files changed, 8 insertions(+), 25 deletions(-)

New commits:
commit 1c1d29027bee64177ec3b14cb8e10df03e2ce8d2
Author: Stephan Bergmann 
Date:   Tue Apr 11 21:13:31 2017 +0200

Assert obvious preconditions instead of returning javaPluginError:InvalidArg

Change-Id: I93bb3aaa0106bce98995f843ee036c9570f6aaf0

diff --git a/jvmfwk/inc/vendorplugin.hxx b/jvmfwk/inc/vendorplugin.hxx
index 6bae6370c710..d4febd726d18 100644
--- a/jvmfwk/inc/vendorplugin.hxx
+++ b/jvmfwk/inc/vendorplugin.hxx
@@ -101,9 +101,7 @@ enum class javaPluginError
 @return
 javaPluginError::NONE the function ran successfully.
 javaPluginError::Error an error occurred during execution.
-javaPluginError::InvalidArg an argument was not valid. For example
-nSizeExcludeList is greater null but 
arExcludeList
-is NULL or NULL pointer were passed for at least on of the strings.
+javaPluginError::InvalidArg an argument was not valid.
 javaPluginError::WrongVersionFormat the version strings in
 sMinVersion,sMaxVersion,arExcludeList are not recognized as 
valid
 version strings.
@@ -148,9 +146,7 @@ javaPluginError jfw_plugin_getAllJavaInfos(
@return
javaPluginError::NONE the function ran successfully.
javaPluginError::Error an error occurred during execution.
-   javaPluginError::InvalidArg an argument was not valid. For example
-nSizeExcludeList is greater null but 
arExcludeList
-is NULL, NULL pointer were passed for at least on of the strings, sLocation
+   javaPluginError::InvalidArg an argument was not valid. For example, 
sLocation
 is an empty string.
javaPluginError::WrongVersionFormat the version strings in
 sMinVersion,sMaxVersion,arExcludeList are not recognized as 
valid
@@ -191,8 +187,6 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
 
@return
javaPluginError::NONE the function ran successfully.
-   javaPluginError::InvalidArg an argument was not valid, for example
-ppInfo is an invalid pointer.
javaPluginError::NoJre no suitable JRE could be detected at the given 
location. However, that
does not mean necessarily that there is no JRE. There could be a JRE but it 
has
a vendor which is not supported by this API implementation or it does not
@@ -283,9 +277,6 @@ javaPluginError jfw_plugin_getJavaInfosFromPath(
 javaPluginError::Error an error occurred during execution.
 javaPluginError::WrongVendor the JavaInfo object was not 
created
 in by this library and the VM cannot be started.
-javaPluginError::InvalidArg an argument was not valid. For example
-pInfo or , ppVM or ppEnv are NULL.
-
 JFW_PLUGIN_E_VM_CREATION_FAILED a VM could not be created. The error was 
caused
 by the JRE.
  */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 84e60a9cf254..d237de95451a 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -306,16 +306,12 @@ javaPluginError jfw_plugin_getAllJavaInfos(
 sal_Int32 *nLenInfoList,
 std::vector> & infos)
 {
-OSL_ASSERT(parJavaInfo);
-OSL_ASSERT(nLenInfoList);
-if (!parJavaInfo || !nLenInfoList)
-return javaPluginError::InvalidArg;
+assert(parJavaInfo);
+assert(nLenInfoList);
 
 //nLenlist contains the number of elements in arExcludeList.
 //If no exclude list is provided then nLenList must be 0
-OSL_ASSERT( ! (arExcludeList == nullptr && nLenList > 0));
-if (arExcludeList == nullptr && nLenList > 0)
-return javaPluginError::InvalidArg;
+assert( ! (arExcludeList == nullptr && nLenList > 0));
 
 OSL_ASSERT(!sVendor.isEmpty());
 if (sVendor.isEmpty())
@@ -371,17 +367,14 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
 sal_Int32  nLenList,
 JavaInfo ** ppInfo)
 {
-if (!ppInfo)
-return javaPluginError::InvalidArg;
+assert(ppInfo != nullptr);
 OSL_ASSERT(!sPath.isEmpty());
 if (sPath.isEmpty())
 return javaPluginError::InvalidArg;
 
 //nLenlist contains the number of elements in arExcludeList.
 //If no exclude list is provided then nLenList must be 0
-OSL_ASSERT( ! (arExcludeList == nullptr && nLenList > 0));
-if (arExcludeList == nullptr && nLenList > 0)
-return javaPluginError::InvalidArg;
+assert( ! (arExcludeList == nullptr && nLenList > 0));
 
 OSL_ASSERT(!sVendor.isEmpty());
 if (sVendor.isEmpty())
@@ -407,8 +400,7 @@ javaPluginError jfw_plugin_getJavaInfoFromJavaHome(
 std::vector> const& vecVendorInfos,
 JavaInfo ** ppInfo, std::vector> & infos)
 {
-if (!ppInfo)
-return javaPluginError::InvalidArg;
+assert(ppInfo);
 
 std::vector> infoJavaHome;
 addJavaInfoFromJavaHome(infos, infoJavaHome);
_

[Libreoffice-commits] core.git: translations

2017-04-11 Thread Andras Timar
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cfd5f4158bd7bfc5714e9bf23b7a71b2d769a644
Author: Andras Timar 
Date:   Tue Apr 11 22:08:40 2017 +0200

Updated core
Project: translations  2a1270529083474b2526d3b8b59e33f6df5412ef

Updated Slovenian translation

Change-Id: I746c06d065b19e021d5c76dfd90d779e4ea79c2a

diff --git a/translations b/translations
index 7816e0f862d1..2a1270529083 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 7816e0f862d1637570d319f1783ac29ad678b6cc
+Subproject commit 2a1270529083474b2526d3b8b59e33f6df5412ef
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: source/sl

2017-04-11 Thread Andras Timar
 source/sl/accessibility/source/helper.po  |   36 
 source/sl/avmedia/source/framework.po |8 
 source/sl/basctl/source/basicide.po   |  234 
 source/sl/basctl/uiconfig/basicide/ui.po  |   33 
 source/sl/chart2/source/controller/dialogs.po |   52 
 source/sl/chart2/uiconfig/ui.po   |   30 
 source/sl/connectivity/source/resource.po |  198 
 source/sl/cui/source/customize.po |  121 
 source/sl/cui/source/dialogs.po   |   74 
 source/sl/cui/source/options.po   |   20 
 source/sl/cui/source/tabpages.po  |   82 
 source/sl/cui/uiconfig/ui.po  |  489 -
 source/sl/dbaccess/source/core/resource.po|   36 
 source/sl/dbaccess/source/ext/macromigration.po   |   12 
 source/sl/dbaccess/source/ui/app.po   |   71 
 source/sl/dbaccess/source/ui/browser.po   |   86 
 source/sl/dbaccess/source/ui/control.po   |   20 
 source/sl/dbaccess/source/ui/querydesign.po   |   78 
 source/sl/dbaccess/source/ui/tabledesign.po   |   84 
 source/sl/dbaccess/source/ui/uno.po   |   20 
 source/sl/dbaccess/uiconfig/ui.po |   26 
 source/sl/desktop/source/app.po   |   76 
 source/sl/desktop/source/deployment/registry/script.po|   12 
 source/sl/desktop/uiconfig/ui.po  |   19 
 source/sl/dictionaries/pt_BR/dialog.po|1 
 source/sl/editeng/source/editeng.po   |   70 
 source/sl/editeng/source/items.po |   98 
 source/sl/editeng/source/misc.po  |   16 
 source/sl/editeng/source/outliner.po  |   12 
 source/sl/editeng/uiconfig/ui.po  |   72 
 source/sl/extensions/source/bibliography.po   |   22 
 source/sl/extensions/source/update/check/org/openoffice/Office.po |   13 
 source/sl/extras/source/autocorr/emoji.po |6 
 source/sl/filter/source/config/fragments/filters.po   |   40 
 source/sl/filter/source/config/fragments/types.po |   18 
 source/sl/filter/source/xsltdialog.po |   12 
 source/sl/filter/uiconfig/ui.po   |   27 
 source/sl/forms/source/resource.po|   30 
 source/sl/formula/source/ui/dlg.po|   20 
 source/sl/fpicker/source/office.po|   12 
 source/sl/framework/source/classes.po |   28 
 source/sl/helpcontent2/source/text/sbasic/shared.po   |   20 
 source/sl/helpcontent2/source/text/scalc.po   |   53 
 source/sl/helpcontent2/source/text/scalc/00.po|  141 
 source/sl/helpcontent2/source/text/scalc/01.po|  634 +
 source/sl/helpcontent2/source/text/scalc/02.po|   10 
 source/sl/helpcontent2/source/text/scalc/guide.po |   73 
 source/sl/helpcontent2/source/text/schart/00.po   |   38 
 source/sl/helpcontent2/source/text/schart/01.po   |   92 
 source/sl/helpcontent2/source/text/sdraw/04.po|   12 
 source/sl/helpcontent2/source/text/shared.po  |   70 
 source/sl/helpcontent2/source/text/shared/00.po   |  198 
 source/sl/helpcontent2/source/text/shared/01.po   | 3194 
+++---
 source/sl/helpcontent2/source/text/shared/02.po   |  257 
 source/sl/helpcontent2/source/text/shared/04.po   |6 
 source/sl/helpcontent2/source/text/shared/05.po   |   30 
 source/sl/helpcontent2/source/text/shared/autopi.po   | 1188 ---
 source/sl/helpcontent2/source/text/shared/explorer/database.po| 1544 
 source/sl/helpcontent2/source/text/shared/guide.po|  836 +-
 source/sl/helpcontent2/source/text/shared/optionen.po |  537 -
 source/sl/helpcontent2/source/text/simpress/01.po |  174 
 source/sl/helpcontent2/source/text/simpress/02.po |   21 
 source/sl/helpcontent2/source/text/simpress/04.po |   10 
 source/sl/helpcontent2/source/text/simpress/guide.po  |  210 
 source/sl/helpcontent2/source/text/smath.po   |   16 
 source/sl/helpcontent2/source/text/smath/00.po|  205 
 source/sl/helpcontent2/so

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

2017-04-11 Thread Miklos Vajna
 libreofficekit/qa/unit/tiledrendering.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 84ed9adab673ff6d97ce634daf64f4e8bd0d00c1
Author: Miklos Vajna 
Date:   Tue Apr 11 20:36:30 2017 +0200

CppunitTest_libreofficekit_tiledrendering: add more processEventsToIdle 
calls

With this the test passes for me 10 times in a row, while previously it
failed from time to time, hopefully this fixes the false negatives.

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

diff --git a/libreofficekit/qa/unit/tiledrendering.cxx 
b/libreofficekit/qa/unit/tiledrendering.cxx
index a805121992e5..77d149d6b346 100644
--- a/libreofficekit/qa/unit/tiledrendering.cxx
+++ b/libreofficekit/qa/unit/tiledrendering.cxx
@@ -273,6 +273,7 @@ void TiledRenderingTest::testDocumentLoadLanguage(Office* 
pOffice)
 
 pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, css::awt::Key::RETURN);
 pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, css::awt::Key::RETURN);
+processEventsToIdle();
 pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, css::awt::Key::UP);
 pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, css::awt::Key::UP);
 processEventsToIdle();
@@ -300,6 +301,7 @@ void TiledRenderingTest::testDocumentLoadLanguage(Office* 
pOffice)
 
 pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, css::awt::Key::RETURN);
 pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, css::awt::Key::RETURN);
+processEventsToIdle();
 pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, css::awt::Key::UP);
 pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, css::awt::Key::UP);
 processEventsToIdle();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Miklos Vajna
 wsd/ClientSession.cpp |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 08989a12acbe0ca3e40130f4d4af11fdbdd4118d
Author: Miklos Vajna 
Date:   Tue Apr 11 22:09:32 2017 +0200

wsd: avoid use-after-free in ClientSession

Commit 1e1f23716c9ee3ce880d1d927945386cf5400293 fixed this already by
introducing by-value parameters, but
8a1f321c8492d6c2824317c7e4be1a3bdfa81665 broke it. Fix this again, this
time more explicitly.

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

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 2af75d21..d1140668 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -523,7 +523,8 @@ bool ClientSession::handleKitToClientMessage(const char* 
buffer, const int lengt
 }
 
 // Save to Storage and log result.
-docBroker->saveToStorage(getId(), success, result);
+std::string id = getId();
+docBroker->saveToStorage(id, success, result);
 return true;
 }
 }
@@ -604,7 +605,8 @@ bool ClientSession::handleKitToClientMessage(const char* 
buffer, const int lengt
 LOG_TRC("Removing save-as ClientSession after conversion.");
 
 // Remove us.
-docBroker->removeSession(getId());
+std::string id = getId();
+docBroker->removeSession(id);
 
 // Now terminate.
 docBroker->stop();
@@ -736,7 +738,8 @@ void ClientSession::onDisconnect()
 
 // We issue a force-save when last editable (non-readonly) session is 
going away
 // and defer destroying the last session and the docBroker.
-docBroker->removeSession(getId(), true);
+std::string id = getId();
+docBroker->removeSession(id, true);
 }
 catch (const UnauthorizedRequestException& exc)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Henry Castro
 loleaflet/src/layer/AnnotationManager.js|   11 +++
 loleaflet/src/layer/tile/WriterTileLayer.js |3 ++-
 2 files changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 75e06f76877290504445039442ed068b513235bc
Author: Henry Castro 
Date:   Tue Apr 11 20:37:53 2017 -0400

loleaflet: fix position when adding new annotation

Change-Id: I267df778715cb9f60c1b62c52ed405fd78ade8f9

diff --git a/loleaflet/src/layer/AnnotationManager.js 
b/loleaflet/src/layer/AnnotationManager.js
index 8f178357..5178c921 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -233,6 +233,7 @@ L.AnnotationManager = L.Class.extend({
return Math.abs(a._data.anchorPos.min.y) - 
Math.abs(b._data.anchorPos.min.y) ||
   Math.abs(a._data.anchorPos.min.x) - 
Math.abs(b._data.anchorPos.min.x);
});
+   return annotation;
},
 
edit: function (comment) {
@@ -337,7 +338,10 @@ L.AnnotationManager = L.Class.extend({
 
_onAnnotationCancel: function (e) {
if (e.annotation._data.id === 'new') {
-   this._map.removeLayer(e.annotation);
+   
this._map.removeLayer(this.removeItem(e.annotation._data.id));
+   }
+   if (this._selected === e.annotation) {
+   this.unselect();
} else {
this.layout();
}
@@ -378,9 +382,8 @@ L.AnnotationManager = L.Class.extend({
}
};
this._map.sendUnoCommand('.uno:InsertAnnotation', 
comment);
-   this._map.removeLayer(e.annotation);
-   }
-   else if (e.annotation._data.trackchange) {
+   
this._map.removeLayer(this.removeItem(e.annotation._data.id));
+   } else if (e.annotation._data.trackchange) {
comment = {
ChangeTrackingId: {
type: 'long',
diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js 
b/loleaflet/src/layer/tile/WriterTileLayer.js
index b13c6df1..8e5edcb3 100644
--- a/loleaflet/src/layer/tile/WriterTileLayer.js
+++ b/loleaflet/src/layer/tile/WriterTileLayer.js
@@ -9,9 +9,10 @@ L.WriterTileLayer = L.TileLayer.extend({
if (!comment.anchorPos && this._isCursorVisible) {
comment.anchorPos = 
L.bounds(this._latLngToTwips(this._visibleCursor.getSouthWest()),

this._latLngToTwips(this._visibleCursor.getNorthEast()));
+   comment.anchorPix = 
this._twipsToPixels(comment.anchorPos.min);
}
if (comment.anchorPos) {
-   this._annotations.edit(comment);
+   
this._annotations.modify(this._annotations.add(comment));
}
},
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-11 Thread Takeshi Abe
 starmath/source/ooxmlimport.cxx |  208 
 starmath/source/ooxmlimport.hxx |3 
 2 files changed, 106 insertions(+), 105 deletions(-)

New commits:
commit 66c97812ef6d7e31a999a7a976c90a94257e4dee
Author: Takeshi Abe 
Date:   Mon Apr 10 18:43:41 2017 +0900

starmath: Prefix member of SmOoxmlImport

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

diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index da29c93ccf9b..8d5c3ed5385a 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -30,7 +30,7 @@ The primary internal data structure for the formula is the 
text representation
 // TODO create IS_OPENING(), IS_CLOSING() instead of doing 'next == OPENING( 
next )' ?
 
 SmOoxmlImport::SmOoxmlImport( oox::formulaimport::XmlStream& s )
-: stream( s )
+: m_rStream( s )
 {
 }
 
@@ -45,9 +45,9 @@ OUString SmOoxmlImport::ConvertToStarMath()
 // NOT complete
 OUString SmOoxmlImport::handleStream()
 {
-stream.ensureOpeningTag( M_TOKEN( oMath ));
+m_rStream.ensureOpeningTag( M_TOKEN( oMath ));
 OUString ret;
-while( !stream.atEnd() && stream.currentToken() != CLOSING( M_TOKEN( oMath 
)))
+while( !m_rStream.atEnd() && m_rStream.currentToken() != CLOSING( M_TOKEN( 
oMath )))
 {
 // strictly speaking, it is not OMathArg here, but currently supported
 // functionality is the same like OMathArg, in the future this may 
need improving
@@ -58,7 +58,7 @@ OUString SmOoxmlImport::handleStream()
 ret += " ";
 ret += item;
 }
-stream.ensureClosingTag( M_TOKEN( oMath ));
+m_rStream.ensureClosingTag( M_TOKEN( oMath ));
 // Placeholders are written out as nothing (i.e. nothing inside e.g. the 
 element),
 // which will result in "{}" in the formula text. Fix this up.
 ret = ret.replaceAll( "{}", "" );
@@ -72,11 +72,11 @@ OUString SmOoxmlImport::handleStream()
 OUString SmOoxmlImport::readOMathArg( int stoptoken )
 {
 OUString ret;
-while( !stream.atEnd() && stream.currentToken() != CLOSING( stoptoken ))
+while( !m_rStream.atEnd() && m_rStream.currentToken() != CLOSING( 
stoptoken ))
 {
 if( !ret.isEmpty())
 ret += " ";
-switch( stream.currentToken())
+switch( m_rStream.currentToken())
 {
 case OPENING( M_TOKEN( acc )):
 ret += handleAcc();
@@ -136,7 +136,7 @@ OUString SmOoxmlImport::readOMathArg( int stoptoken )
 ret += handleSsup();
 break;
 default:
-stream.handleUnexpectedTag();
+m_rStream.handleUnexpectedTag();
 break;
 }
 }
@@ -145,24 +145,24 @@ OUString SmOoxmlImport::readOMathArg( int stoptoken )
 
 OUString SmOoxmlImport::readOMathArgInElement( int token )
 {
-stream.ensureOpeningTag( token );
+m_rStream.ensureOpeningTag( token );
 OUString ret = readOMathArg( token );
-stream.ensureClosingTag( token );
+m_rStream.ensureClosingTag( token );
 return ret;
 }
 
 OUString SmOoxmlImport::handleAcc()
 {
-stream.ensureOpeningTag( M_TOKEN( acc ));
+m_rStream.ensureOpeningTag( M_TOKEN( acc ));
 sal_Unicode accChr = 0x302;
-if( XmlStream::Tag accPr = stream.checkOpeningTag( M_TOKEN( accPr )))
+if( XmlStream::Tag accPr = m_rStream.checkOpeningTag( M_TOKEN( accPr )))
 {
-if( XmlStream::Tag chr = stream.checkOpeningTag( M_TOKEN( chr )))
+if( XmlStream::Tag chr = m_rStream.checkOpeningTag( M_TOKEN( chr )))
 {
 accChr = chr.attribute( M_TOKEN( val ), accChr );
-stream.ensureClosingTag( M_TOKEN( chr ));
+m_rStream.ensureClosingTag( M_TOKEN( chr ));
 }
-stream.ensureClosingTag( M_TOKEN( accPr ));
+m_rStream.ensureClosingTag( M_TOKEN( accPr ));
 }
 // see aTokenTable in parse.cxx
 OUString acc;
@@ -222,28 +222,28 @@ OUString SmOoxmlImport::handleAcc()
 break;
 }
 OUString e = readOMathArgInElement( M_TOKEN( e ));
-stream.ensureClosingTag( M_TOKEN( acc ));
+m_rStream.ensureClosingTag( M_TOKEN( acc ));
 return acc + " {" + e + "}";
 }
 
 OUString SmOoxmlImport::handleBar()
 {
-stream.ensureOpeningTag( M_TOKEN( bar ));
+m_rStream.ensureOpeningTag( M_TOKEN( bar ));
 enum pos_t { top, bot } topbot = bot;
-if( stream.checkOpeningTag( M_TOKEN( barPr )))
+if( m_rStream.checkOpeningTag( M_TOKEN( barPr )))
 {
-if( XmlStream::Tag pos = stream.checkOpeningTag( M_TOKEN( pos )))
+if( XmlStream::Tag pos = m_rStream.checkOpeningTag( M_TOKEN( pos )))
 {
 if( pos.attribute( M_TOKEN( val )) == "top" )
 topbot = top;
 else if( pos.attribute( M_TOKEN( val )) == "bot" )
 topbot = bot;
- 

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

2017-04-11 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 1752dd74d61aeb17c826be28b167d3e7169d0189
Author: Ashod Nakashian 
Date:   Tue Apr 11 23:18:33 2017 -0400

wsd: avoid miscounting outstanding child forks

The number of outstanding child forks can
become negative if more children are
spawned than requested.

This prevents such a scenario from
permanently preventing WSD from spawning
new children, which happens when
OutstandingForks is negative.

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

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index d5a7fd0b..57c63523 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -332,7 +332,7 @@ static int rebalanceChildren(int balance)
 
 const auto duration = (std::chrono::steady_clock::now() - 
LastForkRequestTime);
 const auto durationMs = 
std::chrono::duration_cast(duration).count();
-if (OutstandingForks > 0 && durationMs >= CHILD_TIMEOUT_MS)
+if (OutstandingForks != 0 && durationMs >= CHILD_TIMEOUT_MS)
 {
 // Children taking too long to spawn.
 // Forget we had requested any, and request anew.
@@ -371,6 +371,10 @@ static size_t addNewChild(const 
std::shared_ptr& child)
 std::unique_lock lock(NewChildrenMutex);
 
 --OutstandingForks;
+// Prevent from going -ve if we have unexpected children.
+if (OutstandingForks < 0)
+++OutstandingForks;
+
 NewChildren.emplace_back(child);
 const auto count = NewChildren.size();
 LOG_INF("Have " << count << " spare " <<
___
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/ClientSession.cpp

2017-04-11 Thread Miklos Vajna
 wsd/ClientSession.cpp |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit b6aa51a1c5a2c6dad4b2d1044e59cb47da0d1d34
Author: Miklos Vajna 
Date:   Tue Apr 11 22:09:32 2017 +0200

wsd: avoid use-after-free in ClientSession

Commit 1e1f23716c9ee3ce880d1d927945386cf5400293 fixed this already by
introducing by-value parameters, but
8a1f321c8492d6c2824317c7e4be1a3bdfa81665 broke it. Fix this again, this
time more explicitly.

Change-Id: If29250ac2e99855796935b5cc05ccb222f8a4ad5
Reviewed-on: https://gerrit.libreoffice.org/36436
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 
(cherry picked from commit 08989a12acbe0ca3e40130f4d4af11fdbdd4118d)
Reviewed-on: https://gerrit.libreoffice.org/36441
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 2af75d21..d1140668 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -523,7 +523,8 @@ bool ClientSession::handleKitToClientMessage(const char* 
buffer, const int lengt
 }
 
 // Save to Storage and log result.
-docBroker->saveToStorage(getId(), success, result);
+std::string id = getId();
+docBroker->saveToStorage(id, success, result);
 return true;
 }
 }
@@ -604,7 +605,8 @@ bool ClientSession::handleKitToClientMessage(const char* 
buffer, const int lengt
 LOG_TRC("Removing save-as ClientSession after conversion.");
 
 // Remove us.
-docBroker->removeSession(getId());
+std::string id = getId();
+docBroker->removeSession(id);
 
 // Now terminate.
 docBroker->stop();
@@ -736,7 +738,8 @@ void ClientSession::onDisconnect()
 
 // We issue a force-save when last editable (non-readonly) session is 
going away
 // and defer destroying the last session and the docBroker.
-docBroker->removeSession(getId(), true);
+std::string id = getId();
+docBroker->removeSession(id, true);
 }
 catch (const UnauthorizedRequestException& exc)
 {
___
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/LOOLWSD.cpp

2017-04-11 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 156493efc34113d9a373b3e0d0669f8814232cee
Author: Ashod Nakashian 
Date:   Tue Apr 11 23:18:33 2017 -0400

wsd: avoid miscounting outstanding child forks

The number of outstanding child forks can
become negative if more children are
spawned than requested.

This prevents such a scenario from
permanently preventing WSD from spawning
new children, which happens when
OutstandingForks is negative.

Change-Id: Ief1e56d7b4a079e097ca2d18bd90a01d935f6b30
Reviewed-on: https://gerrit.libreoffice.org/36437
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 1752dd74d61aeb17c826be28b167d3e7169d0189)
Reviewed-on: https://gerrit.libreoffice.org/36438
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index d5a7fd0b..57c63523 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -332,7 +332,7 @@ static int rebalanceChildren(int balance)
 
 const auto duration = (std::chrono::steady_clock::now() - 
LastForkRequestTime);
 const auto durationMs = 
std::chrono::duration_cast(duration).count();
-if (OutstandingForks > 0 && durationMs >= CHILD_TIMEOUT_MS)
+if (OutstandingForks != 0 && durationMs >= CHILD_TIMEOUT_MS)
 {
 // Children taking too long to spawn.
 // Forget we had requested any, and request anew.
@@ -371,6 +371,10 @@ static size_t addNewChild(const 
std::shared_ptr& child)
 std::unique_lock lock(NewChildrenMutex);
 
 --OutstandingForks;
+// Prevent from going -ve if we have unexpected children.
+if (OutstandingForks < 0)
+++OutstandingForks;
+
 NewChildren.emplace_back(child);
 const auto count = NewChildren.size();
 LOG_INF("Have " << count << " spare " <<
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits