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

2018-02-15 Thread Stephan Bergmann
 solenv/flatpak-manifest.in |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 0dfef73bea7ea70577209a9ed68ad037c8bbab4c
Author: Stephan Bergmann 
Date:   Thu Feb 15 09:11:31 2018 +0100

Adapt solenv/flatpak-manifest.in

...to 45a4e70484e7d90dab07a677914ada2d948b415c "Update orcus to 0.13.3."

Change-Id: I6a400b264b7ae0be73b55110a67617d0e5f3d3fa

diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index ae78d0823953..1afcb4cdcc3e 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -360,10 +360,10 @@
 "dest-filename": "external/tarballs/openldap-2.4.45.tgz"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/liborcus-0.13.2.tar.gz";,
-"sha256": 
"0f8e85dc163881c358bd175227a970e3c70443109e2bb0d8d422439c31641df2",
+"url": 
"https://dev-www.libreoffice.org/src/liborcus-0.13.3.tar.gz";,
+"sha256": 
"62e76de1fd3101e77118732b860354121b40a87bbb1ebfeb8203477fffac16e9",
 "type": "file",
-"dest-filename": "external/tarballs/liborcus-0.13.2.tar.gz"
+"dest-filename": "external/tarballs/liborcus-0.13.3.tar.gz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/poppler-0.59.0.tar.xz";,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Samuel Mehrbrodt
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 591a0b5fed800860db750fabfa4d6ec9fb00923b
Author: Samuel Mehrbrodt 
Date:   Tue Feb 13 09:31:11 2018 +0100

Improve explanation for support key in configure

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

diff --git a/configure.ac b/configure.ac
index bafe11e8..0f1ffd5c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,7 +98,7 @@ AC_ARG_ENABLE([ssl],
 
 AC_ARG_WITH([support-public-key],
 AS_HELP_STRING([--with-support-public-key=],
-[Implements signed key with expiration required for support. 
Almost certainly you don not want to use this.]))
+[Implements signed key with expiration required for support. 
Targeted at LibreOffice Online Service Providers.]))
 
 AC_ARG_WITH([max-connections],
 AS_HELP_STRING([--with-max-connections],
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Caolán McNamara
 sw/source/filter/ww8/ww8par.cxx  |6 
 sw/source/filter/ww8/ww8par.hxx  |6 
 sw/source/filter/ww8/ww8par2.cxx |  238 +++
 sw/source/filter/ww8/ww8par2.hxx |  148 
 sw/source/filter/ww8/ww8par4.cxx |2 
 5 files changed, 198 insertions(+), 202 deletions(-)

New commits:
commit 2affa16c998bc08c1e2adbc832c5fecf3d52c1f0
Author: Caolán McNamara 
Date:   Wed Feb 14 21:16:12 2018 +

ofz#6360 Direct-leak

Change-Id: Ie058f6cf9af88f486e11c2cca1efec81ec01c04e
Reviewed-on: https://gerrit.libreoffice.org/49783
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 a3a90efed173..e6a5d3bd6b4a 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1939,7 +1939,7 @@ WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr 
,WW8_CP nStartCp) :
 mpSFlyPara(pRdr->m_xSFlyPara.release()),
 mpPreviousNumPaM(pRdr->m_pPreviousNumPaM),
 mpPrevNumRule(pRdr->m_pPrevNumRule),
-mpTableDesc(pRdr->m_pTableDesc),
+mxTableDesc(std::move(pRdr->m_xTableDesc)),
 mnInTable(pRdr->m_nInTable),
 mnCurrentColl(pRdr->m_nCurrentColl),
 mcSymbol(pRdr->m_cSymbol),
@@ -1962,7 +1962,6 @@ WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr 
,WW8_CP nStartCp) :
 pRdr->m_nInTable = 0;
 pRdr->m_pPreviousNumPaM = nullptr;
 pRdr->m_pPrevNumRule = nullptr;
-pRdr->m_pTableDesc = nullptr;
 pRdr->m_nCurrentColl = 0;
 
 pRdr->m_xCtrlStck.reset(new SwWW8FltControlStack(&pRdr->m_rDoc, 
pRdr->m_nFieldFlags,
@@ -1994,7 +1993,7 @@ void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr )
 pRdr->m_xSFlyPara.reset(mpSFlyPara);
 pRdr->m_pPreviousNumPaM = mpPreviousNumPaM;
 pRdr->m_pPrevNumRule = mpPrevNumRule;
-pRdr->m_pTableDesc = mpTableDesc;
+pRdr->m_xTableDesc = std::move(mxTableDesc);
 pRdr->m_cSymbol = mcSymbol;
 pRdr->m_bSymbol = mbSymbol;
 pRdr->m_bIgnoreText = mbIgnoreText;
@@ -4168,7 +4167,6 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, 
SotStorage* pStorage,
 , m_pAktColl(nullptr)
 , m_pDfltTextFormatColl(nullptr)
 , m_pStandardFormatColl(nullptr)
-, m_pTableDesc(nullptr)
 , m_pDrawModel(nullptr)
 , m_pDrawPg(nullptr)
 , m_pDrawEditEngine(nullptr)
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 329cf0acfd28..9d84a13ec742 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -593,7 +593,7 @@ private:
 WW8SwFlyPara* mpSFlyPara;
 SwPaM* mpPreviousNumPaM;
 const SwNumRule* mpPrevNumRule;
-WW8TabDesc* mpTableDesc;
+std::unique_ptr mxTableDesc;
 int mnInTable;
 sal_uInt16 mnCurrentColl;
 sal_Unicode mcSymbol;
@@ -1230,9 +1230,9 @@ private:
 std::unique_ptr m_xWFlyPara;  // WW-parameter
 std::unique_ptr m_xSFlyPara;// Sw parameters created 
from previous
 
-WW8TabDesc* m_pTableDesc; // description of table properties
+std::unique_ptr m_xTableDesc; // description of table 
properties
 //Keep track of tables within tables
-std::stack m_aTableStack;
+std::stack> m_aTableStack;
 
 ANLDRuleMap m_aANLDRules;
 std::unique_ptr m_xNumOlst; // position in text
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 93f1190a6093..3120179717f6 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -76,56 +76,6 @@
 
 using namespace ::com::sun::star;
 
-// Gets filled in WW8TabDesc::MergeCells().
-// Algorithm must ensure proper row and column order in WW8SelBoxInfo!
-class WW8SelBoxInfo
-{
-private:
-std::vector > m_vRows;
-
-WW8SelBoxInfo(WW8SelBoxInfo const&) = delete;
-WW8SelBoxInfo& operator=(WW8SelBoxInfo const&) = delete;
-
-public:
-short nGroupXStart;
-short nGroupWidth;
-bool bGroupLocked;
-
-WW8SelBoxInfo(short nXCenter, short nWidth)
-: nGroupXStart( nXCenter ), nGroupWidth( nWidth ), bGroupLocked(false)
-{}
-
-size_t size() const
-{
-size_t nResult = 0;
-for (auto& it : m_vRows)
-nResult += it.size();
-return nResult;
-}
-
-size_t rowsCount() const { return m_vRows.size(); }
-
-const std::vector& row( size_t nIndex ) { return 
m_vRows[nIndex]; }
-
-void push_back( SwTableBox* pBox )
-{
-bool bDone = false;
-for (auto& iRow : m_vRows)
-if (iRow[0]->GetUpper() == pBox->GetUpper())
-{
-iRow.push_back(pBox);
-bDone = true;
-break;
-}
-if (!bDone)
-{
-const size_t sz = m_vRows.size();
-m_vRows.resize(sz+1);
-m_vRows[sz].push_back(pBox);
-}
-}
-};
-
 WW8TabBandDesc::WW8TabBandDesc()
 {
 memset(this, 0, sizeof(*this));
@@ -140,104 +90,6 @@ WW8TabBandDesc:

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

2018-02-15 Thread Miklos Vajna
 sw/inc/docsh.hxx |6 --
 sw/inc/docufld.hxx   |2 +-
 sw/inc/editsh.hxx|   15 ---
 sw/inc/fesh.hxx  |2 --
 sw/inc/finalthreadmanager.hxx|3 +--
 sw/inc/fldbas.hxx|1 -
 sw/inc/flddropdown.hxx   |2 +-
 sw/source/core/edit/autofmt.cxx  |1 +
 sw/source/core/edit/edtab.cxx|1 +
 sw/source/core/unocore/unotbl.cxx|1 +
 sw/source/uibase/dochdl/swdtflvr.cxx |1 +
 xmloff/source/core/xmlimp.cxx|7 +++
 12 files changed, 18 insertions(+), 24 deletions(-)

New commits:
commit 798a989937a4acf7830588637f8c3902b4d985d8
Author: Miklos Vajna 
Date:   Wed Feb 14 22:13:06 2018 +0100

Fix some IWYU warnings

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

diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index e2c754f1ca32..cbee1542e559 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -29,8 +29,6 @@
 #include "shellid.hxx"
 
 #include 
-#include 
-#include 
 
 #include 
 
@@ -55,6 +53,10 @@ class IDocumentSettingAccess;
 class IDocumentChartDataProviderAccess;
 class SwDocShell;
 class SwDrawModel;
+namespace svt
+{
+class EmbeddedObjectRef;
+}
 
 // initialize DrawModel (in form of a SwDrawModel) and DocShell (in form of a 
SwDocShell)
 // as needed, one or both parameters may be zero
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 4d133ff26cb0..13af74471311 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -25,13 +25,13 @@
 #include 
 
 #include "fldbas.hxx"
-#include "numrule.hxx"
 
 class SetGetExpFields;
 class SwTextField;
 class SwFrame;
 class OutlinerParaObject;
 class SwTextAPIObject;
+class SwCharFormat;
 
 enum SwAuthorFormat
 {
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 2fd055f6c87c..99c970233810 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -21,27 +21,16 @@
 
 #include "crsrsh.hxx"
 
-#include "IMark.hxx"
 #include "charfmt.hxx"
 #include "fldupde.hxx"
 #include "frmfmt.hxx"
-#include "itabenum.hxx"
-#include "swdbdata.hxx"
 #include "swdllapi.h"
 #include "swundo.hxx"
 #include "tblenum.hxx"
 #include "tox.hxx"
-#include 
 
-#include 
-#include 
-
-#include 
-
-#include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -102,6 +91,9 @@ class SwAuthEntry;
 class SwRewriter;
 class SwView;
 struct SwConversionArgs;
+struct SvxSwAutoFormatFlags;
+struct SwInsertTableOptions;
+struct SwDBData;
 enum class SvtScriptType;
 enum class SfxClassificationPolicyType;
 enum class RedlineFlags;
@@ -114,6 +106,7 @@ namespace com { namespace sun { namespace star { namespace 
uno {
 namespace svx{
 struct SpellPortion;
 typedef std::vector SpellPortions;
+class ClassificationResult;
 }
 
 namespace sfx2{
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 9923aad5bff6..67be27486aea 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -20,7 +20,6 @@
 #define INCLUDED_SW_INC_FESH_HXX
 
 #include 
-#include 
 #include 
 
 #include 
@@ -31,7 +30,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
diff --git a/sw/inc/finalthreadmanager.hxx b/sw/inc/finalthreadmanager.hxx
index 982fd62cd12f..26c526178ff0 100644
--- a/sw/inc/finalthreadmanager.hxx
+++ b/sw/inc/finalthreadmanager.hxx
@@ -21,12 +21,11 @@
 #define INCLUDED_SW_SOURCE_CORE_INC_FINALTHREADMANAGER_HXX
 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index e3fed4461a70..44e06c2c34be 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include "toxe.hxx"
 
 class SwDoc;
 class SvNumberFormatter;
diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx
index 81074d8fabca..36aa09fe0b3d 100644
--- a/sw/inc/flddropdown.hxx
+++ b/sw/inc/flddropdown.hxx
@@ -19,7 +19,7 @@
 #ifndef INCLUDED_SW_INC_FLDDROPDOWN_HXX
 #define INCLUDED_SW_INC_FLDDROPDOWN_HXX
 
-#include 
+#include 
 #include "swdllapi.h"
 #include "fldbas.hxx"
 
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index b1b276c97e4d..f201ac55f62f 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -65,6 +65,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index a7f20c31e757..4f69a04b713b 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -48,6 +48,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/sw/source/core/unocore/unotbl.cxx 
b/sw/source/core/unocore/unotbl.cxx
index 210eb3881b19..2c4d45151cca 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unoc

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

2018-02-15 Thread Fyodor Yemelyanenko
 editeng/source/misc/svxacorr.cxx |2 +-
 sw/source/core/edit/acorrect.cxx |6 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit aac475436271ddeabf6d9a4c3984ba77accf56ce
Author: Fyodor Yemelyanenko 
Date:   Wed Jan 10 10:27:08 2018 +1000

tdf#83260 editeng sw: avoid accessing dead nodes in AutoCorrect

When change tracking is ON (Redlining) and Edit->Change Tracking->Show==OFF
Autocorrection and Undo operations crash LO.

Change-Id: I616f2de143b78fc83483a6589cfa1dd1ab61675a
Reviewed-on: https://gerrit.libreoffice.org/47686
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 46c22fc84c49..1119879f178c 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1382,7 +1382,7 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, 
const OUString& rTxt,
 
 if( IsAutoCorrFlag( ChgToEnEmDash ) )
 {
-FnChgToEnEmDash( rDoc, rTxt, nCapLttrPos, nEnd, eLang 
);
+FnChgToEnEmDash( rDoc, aPara, nCapLttrPos, nEnd, eLang 
);
 }
 }
 break;
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index fbce36232d08..d2595462212f 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -339,6 +339,12 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, 
sal_Int32 nEndPos,
 {
 // replace the selection
 pDoc->getIDocumentContentOperations().ReplaceRange( aPam, 
pFnd->GetLong(), false);
+// tdf#83260 After calling 
sw::DocumentContentOperationsManager::ReplaceRange
+// pTextNd may become invalid when change tracking is on and 
Edit -> Track Changes -> Show == OFF.
+// ReplaceRange shows changes, this moves deleted nodes from 
special section to document.
+// Then Show mode is disabled again. As a result pTextNd may 
be invalidated.
+pTextNd = rCursor.GetNode().GetTextNode();
+
 bRet = true;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Michael Stahl
 editeng/source/misc/svxacorr.cxx  |4 +++
 sw/qa/extras/uiwriter/data/tdf83260-1.odt |binary
 sw/qa/extras/uiwriter/uiwriter.cxx|   35 ++
 sw/source/filter/xml/swxml.cxx|5 
 4 files changed, 44 insertions(+)

New commits:
commit 1c8efde4daea648204e3ba19f8edc01ef3e548bd
Author: Michael Stahl 
Date:   Wed Feb 14 12:57:49 2018 +0100

tdf#83260 sw: call CompressRedlines() in ODF import

It's possible that an ODF document contains redlines that will be
deduplicated by CompressRedlines().

If that happens during some editing operation, then a SwRedline
will be deleted and the nodes array becomes smaller by at least 3
nodes; any Undo actions that were created prior to the operation
that called CompressRedlines() will store invalid node indexes now
and Undo will crash.

So presumably it's a precondition of editing operations
that CompressRedlines() is a no-op.

Interestingly CompressRedlines() is also called from
SwEditShell::Undo()/Redo().

Ensure it's a no-op later by calling CompressRedlines() immediately
after load.

(Hopefully this should also work for the Insert File case.)

Add a test too.

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

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 1119879f178c..302c941b06b7 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1228,6 +1228,7 @@ OUString SvxAutoCorrect::GetQuote( SvxAutoCorrDoc const & 
rDoc, sal_Int32 nInsPo
 return sRet;
 }
 
+// WARNING: rText may become invalid, see comment below
 void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
 sal_Int32 nInsPos, sal_Unicode cChar,
 bool bInsert, bool& io_bNbspRunNext, 
vcl::Window const * pFrameWin )
@@ -1338,6 +1339,9 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, 
const OUString& rTxt,
 
 if( IsAutoCorrFlag( Autocorrect ) )
 {
+// WARNING ATTENTION: rTxt is an alias of the text node's OUString
+// and becomes INVALID if ChgAutoCorrWord returns true!
+// => use aPara/pPara to create a valid copy of the string!
 OUString aPara;
 OUString* pPara = IsAutoCorrFlag(CapitalStartSentence) ? &aPara : 
nullptr;
 
diff --git a/sw/qa/extras/uiwriter/data/tdf83260-1.odt 
b/sw/qa/extras/uiwriter/data/tdf83260-1.odt
new file mode 100644
index ..b6e144b57751
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf83260-1.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 8dee21388fbe..0a16a201ad1a 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -156,6 +156,7 @@ public:
 void testChineseConversionSimplifiedToTraditional();
 void testFdo85554();
 void testAutoCorr();
+void testTdf83260();
 void testMergeDoc();
 void testCreatePortions();
 void testBookmarkUndo();
@@ -337,6 +338,7 @@ public:
 CPPUNIT_TEST(testChineseConversionSimplifiedToTraditional);
 CPPUNIT_TEST(testFdo85554);
 CPPUNIT_TEST(testAutoCorr);
+CPPUNIT_TEST(testTdf83260);
 CPPUNIT_TEST(testMergeDoc);
 CPPUNIT_TEST(testCreatePortions);
 CPPUNIT_TEST(testBookmarkUndo);
@@ -1424,6 +1426,39 @@ void SwUiWriterTest::testAutoCorr()
 CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getColumns()->getCount());
 }
 
+void SwUiWriterTest::testTdf83260()
+{
+SwDoc* const pDoc(createDoc("tdf83260-1.odt"));
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect());
+
+// enabled but not shown
+CPPUNIT_ASSERT(IDocumentRedlineAccess::IsHideChanges(
+pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+CPPUNIT_ASSERT(IDocumentRedlineAccess::IsRedlineOn(
+pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
CPPUNIT_ASSERT(!pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty());
+
+// the document contains redlines that are combined with CompressRedlines()
+// if that happens during AutoCorrect then indexes in Undo are off -> crash
+pWrtShell->Insert("tset");
+pWrtShell->AutoCorrect(corr, u' ');
+sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+auto const nActions(rUndoManager.GetUndoActionCount());
+for (auto i = nActions; 0 < i; --i)
+{
+rUndoManager.Undo();
+}
+for (auto i = nActions; 0 < i; --i)
+{
+rUndoManager.Redo();
+}
+for (auto i = nActions; 0 < i; --i)
+{
+rUndoManager.Undo();
+}
+}
+
 void SwUiWriterTest::testMergeDoc()
 {
 SwDoc* const pDoc1(crea

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - loleaflet/dist

2018-02-15 Thread Pranav Kant
 loleaflet/dist/toolbar/toolbar.js |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 341afa6dc368dae8c57d3243b6e1d18c5c10a04f
Author: Pranav Kant 
Date:   Thu Feb 15 11:55:40 2018 +0530

Fix some buttons doesn't show up in mobile mode

Change-Id: I25ceecc56e2dae9a0b31e038412c7b74447c391f
(cherry picked from commit c470116012eaf1ee47c4dc77c92eca125dd70577)
Reviewed-on: https://gerrit.libreoffice.org/49786
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index fc6cb8dc..d9f5da21 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -117,6 +117,8 @@ function resizeToolbar() {
_unmobilify();
}
 
+   toolbarUp.refresh();
+   toolbarUpMore.refresh();
// move items from toolbar-up-more -> toolbar-up
while ($('#toolbar-up')[0].scrollWidth <= $(window).width()) {
var item = toolbarUpMore.items[0];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: bundled/include

2018-02-15 Thread Andras Timar
 bundled/include/LibreOfficeKit/LibreOfficeKit.h  |1 
 bundled/include/LibreOfficeKit/LibreOfficeKit.hxx|6 +++--
 bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h |2 -
 bundled/include/LibreOfficeKit/LibreOfficeKitInit.h  |   22 +++
 4 files changed, 19 insertions(+), 12 deletions(-)

New commits:
commit 68b17446a0c08f28a195c9dc9fdee78e2c10b991
Author: Andras Timar 
Date:   Thu Feb 15 10:08:47 2018 +0100

Updated LibreOfficeKit headers

Change-Id: I6da94250d81d1f62d8f2191660b37b960033f11c

diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h 
b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index ebc112fb..7492fcc7 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
@@ -302,6 +302,7 @@ struct _LibreOfficeKitDocumentClass
 
 /// @see lok::Document::postExtTextInputEvent
 void (*postExtTextInputEvent) (LibreOfficeKitDocument* pThis,
+   unsigned nWindowId,
int nType,
const char* pText);
 
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
index 09835608..55e29ebd 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -540,12 +540,14 @@ public:
 /**
  * Post the text input from external input window, like IME
  *
+ * @param nWindowId Specify the window id to post the input event to. If
+ * nWindow is 0, the event is posted into the document
  * @param nType see LibreOfficeKitExtTextInputType
  * @param pText Text for LOK_EXT_TEXTINPUT
  */
-void postExtTextInputEvent(int nType, const char* pText)
+void postExtTextInputEvent(unsigned nWindowId, int nType, const char* 
pText)
 {
-mpDoc->pClass->postExtTextInputEvent(mpDoc, nType, pText);
+mpDoc->pClass->postExtTextInputEvent(mpDoc, nWindowId, nType, pText);
 }
 
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h 
b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
index ccbc3b96..b90aa627 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -563,7 +563,7 @@ typedef enum
  * - "invalidate" - the area as described by "rectangle" is invalidated
  *Clients must request the new area
  * - "cursor_invalidate" - cursor is invalidated. New position is in 
"rectangle"
- * - "cursor_visible" - cursor visible status is changed. Status is 
availabe
+ * - "cursor_visible" - cursor visible status is changed. Status is 
available
  *in "visible" field
  * - "close" - window is closed
  */
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h 
b/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h
index a0c111a9..ce5054ac 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -68,7 +68,6 @@ extern "C"
 {
 (void)pPath;
 }
-#endif // IOS
 
 static void *lok_dlsym(void *Hnd, const char *pName)
 {
@@ -79,10 +78,10 @@ extern "C"
 {
 return dlclose(Hnd);
 }
+#endif // IOS
 
 
 #else
-#pragma warning(disable:4996)
 #if !defined WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 #endif
@@ -165,12 +164,12 @@ extern "C"
 }
 #endif
 
+#if !defined(IOS)
 static void *lok_dlopen( const char *install_path, char ** _imp_lib )
 {
 char *imp_lib;
 void *dlhandle;
 
-#if !defined(IOS)
 size_t partial_length, imp_lib_size;
 struct stat dir_st;
 
@@ -233,14 +232,10 @@ static void *lok_dlopen( const char *install_path, char 
** _imp_lib )
 return NULL;
 }
 }
-#else
-(void)install_path;
-imp_lib = strdup("the app executable");
-dlhandle = RTLD_MAIN_ONLY;
-#endif
 *_imp_lib = imp_lib;
 return dlhandle;
 }
+#endif
 
 typedef LibreOfficeKit *(LokHookFunction)( const char *install_path);
 
@@ -248,10 +243,16 @@ typedef LibreOfficeKit *(LokHookFunction2)( const char 
*install_path, const char
 
 typedef int (LokHookPreInit)  ( const char *install_path, const 
char *user_profile_url );
 
+#if defined(IOS)
+extern __attribute__ ((visibility("default")))
+LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const 
char* user_profile_path);
+#endif
+
 static LibreOfficeKit *lok_init_2( const char *install_path,  const char 
*user_profile_url )
 {
-char *imp_lib;
+#if !defined(IOS)
 void *dlhandle;
+char *imp_lib;
 LokHookFunction *pSym;
 LokHookFunction2 *pSym2;
 
@@ -288,6 +289,9 @@ static LibreOfficeKit *lok_init_2( const char 
*install_path,  const char *user_p
 // dlhandle is "leaked"
 // coverity[leaked_storage]
 return p

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

2018-02-15 Thread Pranav Kant
 loleaflet/dist/toolbar.css|4 ++--
 loleaflet/dist/toolbar/toolbar.js |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 49bbe4367ff65264677e05ca1fa0744d7b8c90b3
Author: Pranav Kant 
Date:   Thu Feb 15 15:06:27 2018 +0530

Don't shift when hovering; increase input width

Change-Id: I454ecf9ac92ff7f80c97d4ff94fb9770ce5f1b64

diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css
index daf08ecc..d5dd36df 100644
--- a/loleaflet/dist/toolbar.css
+++ b/loleaflet/dist/toolbar.css
@@ -77,8 +77,9 @@
 z-index: 1050;
 right: 35px;
 top: 2px;
-width: 135px;
+width: 200px;
 font-size: 16px;
+padding-right: 20px;
 border: 1px solid transparent;
 background-color: transparent;
 }
@@ -95,7 +96,6 @@
 background-position: right;
 background-repeat: no-repeat;
 padding-right: 20px;
-width: 120px;
 }
 
 #closebuttonwrapper {
commit 11673e589d1faaea2d84288eeb958ac5c793e824
Author: Pranav Kant 
Date:   Thu Feb 15 13:23:20 2018 +0530

loleaflet: Hide items from correct toolbar

Change-Id: I3020f01d693ad2f99202f8a99a7efb9eadc25158

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index b504ebc5..34c3fdaa 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -58,7 +58,7 @@ function _mobilify() {
}
for (itemIdx in toolbarUpMore.items) {
id = toolbarUpMore.items[itemIdx].id;
-   if (toolbarUpMobileItems.indexOf(id) === -1 && 
toolbarUp.get(id) && !toolbarUp.get(id).hidden) {
+   if (toolbarUpMobileItems.indexOf(id) === -1 && 
toolbarUpMore.get(id) && !toolbarUpMore.get(id).hidden) {
toolbarUpMore.hide(id);
}
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread David Tardon
 src/lib/MSPUBParser.cpp |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 2be062bd914c000899a03822664f9a523d435f3e
Author: David Tardon 
Date:   Thu Feb 15 10:42:06 2018 +0100

drop unnecessary variables

Change-Id: If3d15512433406399716e458c666b81dc7aa41ef

diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index da4de8b..1f6fa95 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -1973,12 +1973,10 @@ void 
MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input, const Esc
   }
   if (rotated90)
   {
-int initialX = absolute.m_xs;
-int initialY = absolute.m_ys;
 int initialWidth = int64_t(absolute.m_xe) - absolute.m_xs;
 int initialHeight = int64_t(absolute.m_ye) - absolute.m_ys;
-int centerX = int64_t(initialX) + initialWidth / 2;
-int centerY = int64_t(initialY) + initialHeight / 2;
+int centerX = int64_t(absolute.m_xs) + initialWidth / 2;
+int centerY = int64_t(absolute.m_ys) + initialHeight / 2;
 int xs = centerX - initialHeight / 2;
 int ys = centerY - initialWidth / 2;
 int xe = xs + initialHeight;
commit a500976df2557c4c4c5f90bda0a401319573ceff
Author: David Tardon 
Date:   Thu Feb 15 10:41:20 2018 +0100

ofz#6339 avoid signed int overflow

Change-Id: I6459deafb6d0dabc47e6e446457165b6814f348e

diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 1078eda..da4de8b 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -1977,8 +1977,8 @@ void 
MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input, const Esc
 int initialY = absolute.m_ys;
 int initialWidth = int64_t(absolute.m_xe) - absolute.m_xs;
 int initialHeight = int64_t(absolute.m_ye) - absolute.m_ys;
-int centerX = initialX + initialWidth / 2;
-int centerY = initialY + initialHeight / 2;
+int centerX = int64_t(initialX) + initialWidth / 2;
+int centerY = int64_t(initialY) + initialHeight / 2;
 int xs = centerX - initialHeight / 2;
 int ys = centerY - initialWidth / 2;
 int xe = xs + initialHeight;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Takeshi Abe
 starmath/inc/node.hxx|3 ++-
 starmath/source/cursor.cxx   |7 +++
 starmath/source/mathmlimport.cxx |   20 ++--
 starmath/source/node.cxx |9 +++--
 starmath/source/visitors.cxx |2 +-
 5 files changed, 23 insertions(+), 18 deletions(-)

New commits:
commit abcd7825101afb9ef9ff93932f8e1bd7c3bb91bb
Author: Takeshi Abe 
Date:   Wed Feb 14 22:08:37 2018 +0900

starmath: Prefer moving subnodes to copying them

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

diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 01423959652b..f4d90b9ada05 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -235,8 +235,9 @@ public:
 
 using   SmNode::GetSubNode;
 virtual SmNode *GetSubNode(size_t nIndex) override;
+void ClearSubNodes();
 void SetSubNodes(SmNode *pFirst, SmNode *pSecond, SmNode *pThird = 
nullptr);
-void SetSubNodes(const SmNodeArray &rNodeArray);
+void SetSubNodes(SmNodeArray&& rNodeArray);
 
 virtual void  GetAccessibleText( OUStringBuffer &rText ) const override;
 
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index bc6d5227d043..1d0e987e02cc 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -219,7 +219,7 @@ void SmCursor::DeletePrev(OutputDevice* pDev){
 else if(i > nLineOffset)
 lines[i-1] = pLineParent->GetSubNode(i);
 }
-pLineParent->SetSubNodes(lines);
+pLineParent->SetSubNodes(std::move(lines));
 //Rebuild graph
 mpAnchor = nullptr;
 mpPosition = nullptr;
@@ -1147,8 +1147,7 @@ SmNodeList* SmCursor::LineToList(SmStructureNode* pLine, 
SmNodeList* list){
 list->push_back(pChild);
 }
 }
-SmNodeArray emptyArray(0);
-pLine->SetSubNodes(emptyArray);
+pLine->ClearSubNodes();
 delete pLine;
 return list;
 }
@@ -1436,7 +1435,7 @@ SmNode* SmNodeListParser::Expression(){
 
 //Create SmExpressionNode, I hope SmToken() will do :)
 SmStructureNode* pExpr = new SmExpressionNode(SmToken());
-pExpr->SetSubNodes(NodeArray);
+pExpr->SetSubNodes(std::move(NodeArray));
 return pExpr;
 }
 
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 85361823fbf2..bf90545a5e99 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -1168,7 +1168,7 @@ void SmXMLFencedContext_Impl::EndElement()
 
 SmToken aDummy;
 SmStructureNode *pBody = new SmExpressionNode(aDummy);
-pBody->SetSubNodes(aRelationArray);
+pBody->SetSubNodes(std::move(aRelationArray));
 
 
 pSNode->SetSubNodes(pLeft,pBody,pRight);
@@ -1613,7 +1613,7 @@ void SmXMLSubContext_Impl::GenericEndElement(SmTokenType 
eType, SmSubSup eSubSup
 
 aSubNodes[eSubSup+1] = popOrZero(rNodeStack);
 aSubNodes[0] = popOrZero(rNodeStack);
-pNode->SetSubNodes(aSubNodes);
+pNode->SetSubNodes(std::move(aSubNodes));
 rNodeStack.push_front(std::move(pNode));
 }
 
@@ -1672,7 +1672,7 @@ void 
SmXMLSubSupContext_Impl::GenericEndElement(SmTokenType eType,
 aSubNodes[aSup+1] = popOrZero(rNodeStack);
 aSubNodes[aSub+1] = popOrZero(rNodeStack);
 aSubNodes[0] =  popOrZero(rNodeStack);
-pNode->SetSubNodes(aSubNodes);
+pNode->SetSubNodes(std::move(aSubNodes));
 rNodeStack.push_front(std::move(pNode));
 }
 
@@ -2318,7 +2318,7 @@ void SmXMLDocContext_Impl::EndElement()
 LineArray[n - (j + 1)] = pNode.release();
 }
 std::unique_ptr pSNode2(new SmTableNode(aDummy));
-pSNode2->SetSubNodes(LineArray);
+pSNode2->SetSubNodes(std::move(LineArray));
 rNodeStack.push_front(std::move(pSNode2));
 }
 
@@ -2454,7 +2454,7 @@ void SmXMLRowContext_Impl::EndElement()
 SmToken aDummy;
 std::unique_ptr pSNode(new SmBraceNode(aToken));
 SmStructureNode *pBody = new SmExpressionNode(aDummy);
-pBody->SetSubNodes(aRelationArray2);
+pBody->SetSubNodes(std::move(aRelationArray2));
 
 pSNode->SetSubNodes(pLeft,pBody,pRight);
 pSNode->SetScaleMode(SmScaleMode::Height);
@@ -2489,7 +2489,7 @@ void SmXMLRowContext_Impl::EndElement()
 
 SmToken aDummy;
 std::unique_ptr pSNode(new SmExpressionNode(aDummy));
-pSNode->SetSubNodes(aRelationArray);
+pSNode->SetSubNodes(std::move(aRelationArray));
 rNodeStack.push_front(std::move(pSNode));
 }
 
@@ -2635,7 +2635,7 @@ void 
SmXMLMultiScriptsContext_Impl::ProcessSubSupPairs(bool bIsPrescript)
 (!pScriptNode->GetToken().aText.isEmpty(
 aSubNodes[eSup+1] = pScriptNode;
 
-pNode->SetSubNodes(aSubNodes);
+pNode->SetSubNodes(std::move(aSubNodes));
 aReverseStack.push_front(std::move(pNode));
 }
 assert

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

2018-02-15 Thread Noel Grandin
 canvas/source/cairo/cairo_canvasbitmap.cxx |   77 ++---
 include/vcl/BitmapTools.hxx|8 +++
 vcl/source/bitmap/BitmapTools.cxx  |   77 +
 3 files changed, 91 insertions(+), 71 deletions(-)

New commits:
commit 32d8a32dcf85e2cee589ee19bc72b4abf73f9681
Author: Noel Grandin 
Date:   Wed Feb 14 14:27:12 2018 +0200

move cairo surface code from canvas to BitmapTools

part of making Bitmap an implementation detail of vcl/

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

diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx 
b/canvas/source/cairo/cairo_canvasbitmap.cxx
index 7894e2e978e2..27ce9af37758 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.cxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.cxx
@@ -22,7 +22,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 
@@ -118,77 +118,12 @@ namespace cairocanvas
 if ( !mbHasAlpha )
 break;
 
-::Size aSize( maSize.getX(), maSize.getY() );
-// FIXME: if we could teach VCL/ about cairo handles, life 
could
-// be significantly better here perhaps.
-cairo_surface_t *pPixels;
-pPixels = cairo_image_surface_create( CAIRO_FORMAT_ARGB32,
-  aSize.Width(), 
aSize.Height() );
-cairo_t *pCairo = cairo_create( pPixels );
-if( !pPixels || !pCairo || cairo_status(pCairo) != 
CAIRO_STATUS_SUCCESS )
-break;
+BitmapEx* pBitmapEx = vcl::bitmap::CreateFromCairoSurface(
+  ::Size( maSize.getX(), maSize.getY() 
),
+  
getSurface()->getCairoSurface().get());
+if (pBitmapEx)
+aRV <<= reinterpret_cast( pBitmapEx );
 
-// suck ourselves from the X server to this buffer so then we 
can fiddle with
-// Alpha to turn it into the ultra-lame vcl required format 
and then push it
-// all back again later at vast expense [ urgh ]
-cairo_set_source_surface( pCairo, 
getSurface()->getCairoSurface().get(), 0, 0 );
-cairo_set_operator( pCairo, CAIRO_OPERATOR_SOURCE );
-cairo_paint( pCairo );
-
-::Bitmap aRGB( aSize, 24 );
-::AlphaMask aMask( aSize );
-
-BitmapWriteAccess *pRGBWrite( aRGB.AcquireWriteAccess() );
-if( pRGBWrite )
-{
-BitmapWriteAccess *pMaskWrite( aMask.AcquireWriteAccess() 
);
-if( pMaskWrite )
-{
-cairo_surface_flush(pPixels);
-unsigned char *pSrc = cairo_image_surface_get_data( 
pPixels );
-unsigned int nStride = cairo_image_surface_get_stride( 
pPixels );
-for( unsigned long y = 0; y < static_cast(aSize.Height()); y++ )
-{
-sal_uInt32 *pPix = reinterpret_cast(pSrc + nStride * y);
-for( unsigned long x = 0; x < static_cast(aSize.Width()); x++ )
-{
-#if defined OSL_BIGENDIAN
-sal_uInt8 nB = (*pPix >> 24);
-sal_uInt8 nG = (*pPix >> 16) & 0xff;
-sal_uInt8 nR = (*pPix >> 8) & 0xff;
-sal_uInt8 nAlpha = *pPix & 0xff;
-#else
-sal_uInt8 nAlpha = (*pPix >> 24);
-sal_uInt8 nR = (*pPix >> 16) & 0xff;
-sal_uInt8 nG = (*pPix >> 8) & 0xff;
-sal_uInt8 nB = *pPix & 0xff;
-#endif
-if( nAlpha != 0 && nAlpha != 255 )
-{
-// Cairo uses pre-multiplied alpha - we do 
not => re-multiply
-nR = static_cast(MinMax( 
(static_cast(nR) * 255) / nAlpha, 0, 255 ));
-nG = static_cast(MinMax( 
(static_cast(nG) * 255) / nAlpha, 0, 255 ));
-nB = static_cast(MinMax( 
(static_cast(nB) * 255) / nAlpha, 0, 255 ));
-}
-pRGBWrite->SetPixel( y, x, BitmapColor( nR, 
nG, nB ) );
-pMaskWrite->SetPixelIndex( y, x, 255 - nAlpha 
);
-pPix++;
-}
-}
-aMask.ReleaseAccess( pMaskWrite );
-}
-::Bitmap::ReleaseAccess( pRGBWrite )

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - include/svl sc/CppunitTest_sc_subsequent_export_test.mk sc/inc sc/qa sc/source svl/source sw/CppunitTest_sw_odfexport.mk sw/qa xmloff/source

2018-02-15 Thread Michael Stahl
 include/svl/PasswordHelper.hxx  |7 +
 sc/CppunitTest_sc_subsequent_export_test.mk |2 
 sc/inc/tabprotection.hxx|2 
 sc/qa/unit/data/fods/protection-key1.fods   |   20 
 sc/qa/unit/data/fods/protection-key2.fods   |   20 
 sc/qa/unit/data/fods/protection-key3.fods   |   20 
 sc/qa/unit/data/fods/protection-key4.fods   |   20 
 sc/qa/unit/data/fods/protection-key5.fods   |   20 
 sc/qa/unit/subsequent_export-test.cxx   |  118 +++-
 sc/source/core/data/tabprotection.cxx   |   27 +
 sc/source/filter/xml/xmlexprt.cxx   |   25 +
 sc/source/ui/docshell/docsh.cxx |4 
 svl/source/misc/PasswordHelper.cxx  |   52 +-
 sw/CppunitTest_sw_odfexport.mk  |1 
 sw/qa/extras/odfexport/data/protection-key.fodt |   48 +
 sw/qa/extras/odfexport/odfexport.cxx|   32 ++
 xmloff/source/text/XMLSectionExport.cxx |8 +
 17 files changed, 416 insertions(+), 10 deletions(-)

New commits:
commit d28ceb7511a8df9345b1c9818baaad5532853a12
Author: Michael Stahl 
Date:   Tue Feb 6 17:35:36 2018 +0100

tdf#115483 svl xmloff sc sw: verify all ODF 1.2 protection-key hashes

ODF 1.2 has added some mandatory requirements for protection-key hashes
which did not exist in ODF 1.1.

This affects sections and indexes in ODT documents, as well as
spreadsheets and sheets in ODS documents.

1. Accept the following hashed passwords:
* UTF16 LE/BE encoded StarOffice-SHA1, OOo legacy and allowed by ODF 1.1
* UTF8 encoded proper SHA1, as required by ODF 1.2
* UTF8 encoded SHA256, as required by ODF 1.2
- specified either with the wrong URL used in the ODF 1.2 spec
  or the correct URL from the W3C spec, see OFFICE-3702
* Excel+SHA1 double-hash, only in Calc, see OFFICE-2112

2. Round-trip any of the above as-is
* for SHA256 only write the URL from the ODF 1.2 spec

3. Generate only UTF16 LE encoded SHA1 for now, so that older LO
   releases can still verify the password
* some time in the future, switch to generating some valid ODF 1.2 hash

More changes are necessary in Calc, which can actually preserve
different hashes for the same passwords in its runtime data model,
whereas Writer just has a single buffer without even any metadata.

For the Calc unit tests we need one document per hash because the
protection-key attribute can be set on the entire spreadsheet, which
is an unique element in the document.

There are further uses of SvlPasswordHelper for change-tracking passwords,
but apparently those are stored in settings.xml, so ODF has no
requirements for them, so let's leave that as it is.

Reviewed-on: https://gerrit.libreoffice.org/49352
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit 398275ba9f4d65bebcc78864e70eee6212a84397)

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

diff --git a/include/svl/PasswordHelper.hxx b/include/svl/PasswordHelper.hxx
index ca048ed85924..a71f2ca7c172 100644
--- a/include/svl/PasswordHelper.hxx
+++ b/include/svl/PasswordHelper.hxx
@@ -33,10 +33,15 @@ public:
 SVL_DLLPUBLIC static void GetHashPassword(css::uno::Sequence 
& rPassHash, const sal_Char* pPass, sal_uInt32 nLen);
 
 SVL_DLLPUBLIC static void 
GetHashPassword(css::uno::Sequence& rPassHash, const OUString& sPass);
+SVL_DLLPUBLIC static void 
GetHashPasswordSHA1UTF8(css::uno::Sequence& rPassHash, const 
OUString& sPass);
+SVL_DLLPUBLIC static void 
GetHashPasswordSHA256(css::uno::Sequence& rPassHash, const OUString& 
sPass);
 /**
 Use this method to compare a given string with another given Hash value.
 This is necessary, because in older versions exists different hashes of 
the same string. They were endian dependent.
-We need this to handle old files. This method will compare against big and 
little endian. See #101326#
+We need this to handle old files. This method will compare against big and
+little endian UTF-16.
+tdf#115483: also check 2 different new ways of hashing that were added in
+ODF 1.2, requiring UTF-8 encoding.
 */
 SVL_DLLPUBLIC static bool CompareHashPassword(const 
css::uno::Sequence& rOldPassHash, const OUString& sNewPass);
 };
diff --git a/sc/CppunitTest_sc_subsequent_export_test.mk 
b/sc/CppunitTest_sc_subsequent_export_test.mk
index b97423e27f89..cf6125f6ef04 100644
--- a/sc/CppunitTest_sc_subsequent_export_test.mk
+++ b/sc/CppunitTest_sc_subsequent_export_test.mk
@@ -72,6 +72,8 @@ $(eval $(call 
gb_CppunitTest_use_components,sc_subsequent_export_test,\
 embeddedobj/util/embobj \
 

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

2018-02-15 Thread Michael Stahl
 svl/source/misc/PasswordHelper.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 6561fcc13334b93e886ad392af1515df45a2ae9b
Author: Michael Stahl 
Date:   Tue Feb 13 15:46:20 2018 +0100

svl: clear temporary copies of passwords in SvlPasswordHelper

This is an obvious place to start, but there might be more copies
elsewhere.

Change-Id: I3c3ea6cb54f40fe5c21c3128b55aeaad1ff74b42
Reviewed-on: https://gerrit.libreoffice.org/49669
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit 306cd912b5b84c02ae9b786f72963506369df649)
Reviewed-on: https://gerrit.libreoffice.org/49720
Reviewed-by: Eike Rathke 

diff --git a/svl/source/misc/PasswordHelper.cxx 
b/svl/source/misc/PasswordHelper.cxx
index 48aa165507ee..4f8cbb655b08 100644
--- a/svl/source/misc/PasswordHelper.cxx
+++ b/svl/source/misc/PasswordHelper.cxx
@@ -33,6 +33,7 @@ void 
SvPasswordHelper::GetHashPasswordSHA256(uno::Sequence& rPassHash,
 ::comphelper::HashType::SHA256));
 rPassHash.realloc(hash.size());
 ::std::copy(hash.begin(), hash.end(), rPassHash.begin());
+rtl_secureZeroMemory(const_cast(tmp.getStr()), 
tmp.getLength());
 }
 
 void SvPasswordHelper::GetHashPasswordSHA1UTF8(uno::Sequence& 
rPassHash, OUString const& rPassword)
@@ -43,6 +44,7 @@ void 
SvPasswordHelper::GetHashPasswordSHA1UTF8(uno::Sequence& rPassHas
 ::comphelper::HashType::SHA1));
 rPassHash.realloc(hash.size());
 ::std::copy(hash.begin(), hash.end(), rPassHash.begin());
+rtl_secureZeroMemory(const_cast(tmp.getStr()), 
tmp.getLength());
 }
 
 void SvPasswordHelper::GetHashPassword(uno::Sequence& rPassHash, 
const sal_Char* pPass, sal_uInt32 nLen)
@@ -69,6 +71,7 @@ void 
SvPasswordHelper::GetHashPasswordLittleEndian(uno::Sequence& rPas
 }
 
 GetHashPassword(rPassHash, pCharBuffer.get(), nSize * sizeof(sal_Unicode));
+rtl_secureZeroMemory(pCharBuffer.get(), nSize * sizeof(sal_Unicode));
 }
 
 void SvPasswordHelper::GetHashPasswordBigEndian(uno::Sequence& 
rPassHash, const OUString& sPass)
@@ -84,6 +87,7 @@ void 
SvPasswordHelper::GetHashPasswordBigEndian(uno::Sequence& rPassHa
 }
 
 GetHashPassword(rPassHash, pCharBuffer.get(), nSize * sizeof(sal_Unicode));
+rtl_secureZeroMemory(pCharBuffer.get(), nSize * sizeof(sal_Unicode));
 }
 
 void SvPasswordHelper::GetHashPassword(uno::Sequence& rPassHash, 
const OUString& sPass)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/comphelper

2018-02-15 Thread Tor Lillqvist
 include/comphelper/windowsdebugoutput.hxx |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 09cb65bb92318bf8edb467fcd7720f072306f379
Author: Tor Lillqvist 
Date:   Thu Feb 15 12:15:48 2018 +0200

Make this work also outside LibreOffice code (for test programs)

If LIBO_INTERNAL_ONLY is not defined, just include 
directly. Don't use OUStrings.

Change-Id: I9ddaab6029c5198538c47b623457f4ff2089e3f6

diff --git a/include/comphelper/windowsdebugoutput.hxx 
b/include/comphelper/windowsdebugoutput.hxx
index 5efda11e7271..53719899b0bc 100644
--- a/include/comphelper/windowsdebugoutput.hxx
+++ b/include/comphelper/windowsdebugoutput.hxx
@@ -15,10 +15,16 @@
 #ifndef INCLUDED_COMPHELPER_WINDOWSDEBUGOUTPUT_HXX
 #define INCLUDED_COMPHELPER_WINDOWSDEBUGOUTPUT_HXX
 
+#include 
 #include 
+#include 
+
+#ifdef LIBO_INTERNAL_ONLY
 #include 
 #include 
-#include 
+#else
+#include 
+#endif
 
 template 
 inline std::basic_ostream& operator<<(std::basic_ostream& stream,
@@ -31,7 +37,7 @@ inline std::basic_ostream& 
operator<<(std::basic_ostream(pRiid));
+stream << std::wstring_convert, 
wchar_t>().to_bytes(std::wstring(pRiid));
 CoTaskMemFree(pRiid);
 return stream;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Fyodor Yemelyanenko
 editeng/source/misc/svxacorr.cxx |2 +-
 sw/source/core/edit/acorrect.cxx |6 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit aff321ae3c872ad881252979c9f10ab1a01c0ea0
Author: Fyodor Yemelyanenko 
Date:   Wed Jan 10 10:27:08 2018 +1000

tdf#83260 editeng sw: avoid accessing dead nodes in AutoCorrect

When change tracking is ON (Redlining) and Edit->Change Tracking->Show==OFF
Autocorrection and Undo operations crash LO.

Change-Id: I616f2de143b78fc83483a6589cfa1dd1ab61675a
Reviewed-on: https://gerrit.libreoffice.org/47686
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 
(cherry picked from commit aac475436271ddeabf6d9a4c3984ba77accf56ce)
Reviewed-on: https://gerrit.libreoffice.org/49794
Tested-by: Jenkins 

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 8131483e0241..658e6c619f33 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1387,7 +1387,7 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, 
const OUString& rTxt,
 
 if( IsAutoCorrFlag( ChgToEnEmDash ) )
 {
-FnChgToEnEmDash( rDoc, rTxt, nCapLttrPos, nEnd, eLang 
);
+FnChgToEnEmDash( rDoc, aPara, nCapLttrPos, nEnd, eLang 
);
 }
 }
 break;
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index fbce36232d08..d2595462212f 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -339,6 +339,12 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, 
sal_Int32 nEndPos,
 {
 // replace the selection
 pDoc->getIDocumentContentOperations().ReplaceRange( aPam, 
pFnd->GetLong(), false);
+// tdf#83260 After calling 
sw::DocumentContentOperationsManager::ReplaceRange
+// pTextNd may become invalid when change tracking is on and 
Edit -> Track Changes -> Show == OFF.
+// ReplaceRange shows changes, this moves deleted nodes from 
special section to document.
+// Then Show mode is disabled again. As a result pTextNd may 
be invalidated.
+pTextNd = rCursor.GetNode().GetTextNode();
+
 bRet = true;
 }
 }
___
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-3-0' - loleaflet/src

2018-02-15 Thread Aron Budea
 loleaflet/src/control/Control.Menubar.js |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit c5f88ade7b550c5260dcd431e0eac51f4b34a33d
Author: Aron Budea 
Date:   Thu Feb 15 07:30:14 2018 +0100

loleaflet: add download as RTF option

Change-Id: Id258461ff49bcc6d6a0b1e4df826c184e769c5e1
Reviewed-on: https://gerrit.libreoffice.org/49787
Reviewed-by: pranavk 
Tested-by: pranavk 
(cherry picked from commit 1cfe416559951ad7079a176d4c02de9aa0c1e5fe)
Reviewed-on: https://gerrit.libreoffice.org/49788
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 8ba9d677..9b3b8a8d 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -23,7 +23,8 @@ L.Control.Menubar = L.Control.extend({
{name: _('PDF Document (.pdf)'), id: 
'downloadas-pdf', type: 'action'},
{name: _('ODF text document (.odt)'), 
id: 'downloadas-odt', type: 'action'},
{name: _('Microsoft Word 2003 (.doc)'), 
id: 'downloadas-doc', type: 'action'},
-   {name: _('Microsoft Word (.docx)'), id: 
'downloadas-docx', type: 'action'}]}]
+   {name: _('Microsoft Word (.docx)'), id: 
'downloadas-docx', type: 'action'},
+   {name: _('Rich Text (.rtf)'), id: 
'downloadas-rtf', type: 'action'}]}],
},
{name: _UNO('.uno:EditMenu', 'text'), type: 'menu', 
menu: [
{uno: '.uno:Undo'},
@@ -374,7 +375,7 @@ L.Control.Menubar = L.Control.extend({
allowedReadonlyMenus: ['file', 'downloadas', 'view', 'help'],
 
allowedViewModeActions: [
-   'downloadas-pdf', 'downloadas-odt', 'downloadas-doc', 
'downloadas-docx', // file menu
+   'downloadas-pdf', 'downloadas-odt', 'downloadas-doc', 
'downloadas-docx', 'downloadas-rtf', // file menu
'downloadas-odp', 'downloadas-ppt', 'downloadas-pptx', 
// file menu
'downloadas-ods', 'downloadas-xls', 'downloadas-xlsx', 
// file menu
'fullscreen', 'zoomin', 'zoomout', 'zoomreset', // view 
menu
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Eike Rathke
 sc/inc/dbdata.hxx|1 +
 sc/source/ui/docshell/docsh5.cxx |   21 ++---
 2 files changed, 19 insertions(+), 3 deletions(-)

New commits:
commit 74d30155c5067271fb98bacbcb895c215e61678d
Author: Eike Rathke 
Date:   Thu Feb 15 12:50:40 2018 +0100

Resolves: tdf#115046 don't restore a sheet-local DBData from temporary

And don't clear AutoFilter button flags in the new temporary range.

Change-Id: I273de1e04632ac99c267523b2843665d257fd361

diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index 2fea51e1a74b..061ef5187cfa 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -122,6 +122,7 @@ public:
 
 const OUString& GetName() const { return aName; }
 const OUString& GetUpperName() const { return aUpper; }
+SCTAB   GetTab() const  { return nTable; }
 voidGetArea(SCTAB& rTab, SCCOL& rCol1, SCROW& rRow1, SCCOL& rCol2, 
SCROW& rRow2) const;
 SC_DLLPUBLIC void GetArea(ScRange& rRange) const;
 voidSetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2);
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 6921f0b353ea..d55f0f29f9c5 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -222,8 +222,10 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, 
ScGetDBMode eMode, ScGe
 // other ranges, use the document global temporary anonymous range
 // instead. But, if AutoFilter is to be toggled then do use the
 // sheet-local DB range.
+bool bSheetLocal = true;
 if (eMode != SC_DB_AUTOFILTER && pNoNameData->HasAutoFilter())
 {
+bSheetLocal = false;
 pNoNameData = aDocument.GetAnonymousDBData();
 if (!pNoNameData)
 {
@@ -231,14 +233,24 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, 
ScGetDBMode eMode, ScGe
 nTab, nStartCol, nStartRow, nEndCol, nEndRow, 
true, bHasHeader);
 aDocument.SetAnonymousDBData( pNoNameData);
 }
+// ScDocShell::CancelAutoDBRange() would restore the
+// sheet-local anonymous DBData from pOldAutoDBRange, unset so
+// that won't happen with data of a previous sheet-local
+// DBData.
+delete pOldAutoDBRange;
+pOldAutoDBRange = nullptr;
 }
-
-if ( !pOldAutoDBRange )
+else if (!pOldAutoDBRange)
 {
 // store the old unnamed database range with its settings for 
undo
 // (store at the first change, get the state before all 
changes)
 pOldAutoDBRange = new ScDBData( *pNoNameData );
 }
+else if (pOldAutoDBRange->GetTab() != pNoNameData->GetTab())
+{
+// Different sheet-local unnamed DB range than the previous 
one.
+*pOldAutoDBRange = *pNoNameData;
+}
 
 SCCOL nOldX1;   // take old range 
away cleanly
 SCROW nOldY1;   //! (UNDO ???)
@@ -255,7 +267,10 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, 
ScGetDBMode eMode, ScGe
 nStartCol <= nOldY2 && nOldY1 <= nEndCol)
 bHasHeader = true;
 
-DBAreaDeleted( nOldTab, nOldX1, nOldY1, nOldX2 );
+// Remove AutoFilter button flags only for sheet-local DB range,
+// not if a temporary is used.
+if (bSheetLocal)
+DBAreaDeleted( nOldTab, nOldX1, nOldY1, nOldX2 );
 
 pNoNameData->SetSortParam( ScSortParam() ); // reset 
parameter
 pNoNameData->SetQueryParam( ScQueryParam() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 4 commits - include/tools include/vcl jvmfwk/plugins sd/source svx/source vcl/inc vcl/source

2018-02-15 Thread Noel Grandin
 include/tools/gen.hxx   |8 ++
 include/vcl/toolbox.hxx |1 
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx  |   64 +++---
 sd/source/ui/animations/CustomAnimationPane.cxx |4 +
 svx/source/tbxctrls/tbxcolorupdate.cxx  |   82 +++-
 vcl/inc/toolbox.h   |1 
 vcl/source/window/toolbox.cxx   |3 
 vcl/source/window/toolbox2.cxx  |   22 ++
 8 files changed, 90 insertions(+), 95 deletions(-)

New commits:
commit dd4fc3b1e3f8a7c69a44c26715b2e3cdb22aede9
Author: Noel Grandin 
Date:   Thu Feb 15 10:48:53 2018 +0200

introduce Move/Adjust methods to Point,Rect,Size

to make my following changes with the changetoolsgen plugin easier to
read

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

diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 87e1e54b3eed..0e5289b0765c 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -82,6 +82,8 @@ public:
 long&   Y() { return nB; }
 
 voidMove( long nHorzMove, long nVertMove );
+voidMoveX( long nHorzMove ) { nA += nHorzMove; }
+voidMoveY( long nVertMove ) { nB += nVertMove; }
 
 voidRotateAround( long& rX, long& rY, short nOrientation ) 
const;
 
@@ -191,6 +193,8 @@ public:
 
 long&   Width()  { return nA; }
 long&   Height() { return nB; }
+voidAdjustWidth( long n ) { nA += n; }
+voidAdjustHeight( long n ) { nB += n; }
 
 longgetWidth() const { return Width(); }
 longgetHeight() const { return Height(); }
@@ -400,6 +404,10 @@ public:
 
 /// Move the top and left edges by a delta, preserving width and height
 inline void Move( long nHorzMoveDelta, long nVertMoveDelta );
+voidMoveLeft( long nHorzMoveDelta ) { nLeft += 
nHorzMoveDelta; }
+voidMoveRight( long nHorzMoveDelta ) { nRight += 
nHorzMoveDelta; }
+voidMoveTop( long nVertMoveDelta ) { nTop += 
nVertMoveDelta; }
+voidMoveBottom( long nVertMoveDelta ) { nBottom += 
nVertMoveDelta; }
 inline void SetPos( const Point& rPoint );
 voidSetSize( const Size& rSize );
 inline Size GetSize() const;
commit cc8e8215c8d7583f36feca20f0a1235edc05a6d7
Author: Stephan Bergmann 
Date:   Thu Feb 15 08:31:49 2018 +0100

Find Java 9 with the new registry keys on Windows

See 
 section "Windows Registry Key Changes".

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

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index fb6ec2ba6eb4..187a2789b4cc 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -569,31 +569,6 @@ bool decodeOutput(const OString& s, OUString* out)
 
 
 #if defined(_WIN32)
-void addJavaInfoFromWinReg(
-std::vector > & allInfos,
-std::vector > & addedInfos)
-{
-// Get Java s from registry
-std::vector vecJavaHome;
-if(getSDKInfoFromRegistry(vecJavaHome))
-{
-// create impl objects
-for (auto const& javaHome : vecJavaHome)
-{
-getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
-}
-}
-
-vecJavaHome.clear();
-if(getJREInfoFromRegistry(vecJavaHome))
-{
-for (auto const& javaHome : vecJavaHome)
-{
-getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
-}
-   }
-}
-
 
 bool getJavaInfoFromRegistry(const wchar_t* szRegKey,
  vector& vecJavaHome)
@@ -678,6 +653,45 @@ bool getJREInfoFromRegistry(vector& vecJavaHome)
 return getJavaInfoFromRegistry(HKEY_SUN_JRE, vecJavaHome);
 }
 
+void addJavaInfoFromWinReg(
+std::vector > & allInfos,
+std::vector > & addedInfos)
+{
+// Get Java s from registry
+std::vector vecJavaHome;
+if(getSDKInfoFromRegistry(vecJavaHome))
+{
+// create impl objects
+for (auto const& javaHome : vecJavaHome)
+{
+getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+}
+}
+
+vecJavaHome.clear();
+if(getJREInfoFromRegistry(vecJavaHome))
+{
+for (auto const& javaHome : vecJavaHome)
+{
+getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+}
+   }
+
+vecJavaHome.clear();
+if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JDK", vecJavaHome)) 

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

2018-02-15 Thread Tamás Zolnai
 oox/inc/drawingml/textparagraphproperties.hxx   |4 +
 oox/inc/drawingml/textparagraphpropertiescontext.hxx|1 
 oox/source/drawingml/textparagraphproperties.cxx|   11 
 oox/source/drawingml/textparagraphpropertiescontext.cxx |   17 +++---
 sd/qa/unit/data/pptx/tdf51340.pptx  |binary
 sd/qa/unit/import-tests.cxx |   42 
 6 files changed, 66 insertions(+), 9 deletions(-)

New commits:
commit 5fba3d6ddef478b12bd15906682474400845a02b
Author: Tamás Zolnai 
Date:   Wed Feb 14 02:15:54 2018 +0100

tdf#51340: Line spacing is imported incorrectly from PPTX

Move the line spacing member to the TextParagraphProperties class
which is used to do the inheritance from master / layout slides.

Reviewed-on: https://gerrit.libreoffice.org/49692
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 
(cherry picked from commit 53551d49d3be2301985f2cf2d8bb23ff374ecfd1)

Change-Id: I0bf92420963163eae78e06ebc7fdfa1f2c72fdf8
Reviewed-on: https://gerrit.libreoffice.org/49745
Tested-by: Jenkins 
Reviewed-by: Andras Timar 

diff --git a/oox/inc/drawingml/textparagraphproperties.hxx 
b/oox/inc/drawingml/textparagraphproperties.hxx
index cac6d64f0447..2710dcb484b2 100644
--- a/oox/inc/drawingml/textparagraphproperties.hxx
+++ b/oox/inc/drawingml/textparagraphproperties.hxx
@@ -97,6 +97,9 @@ public:
 boost::optional< css::style::ParagraphAdjust >&   getParaAdjust() { 
return moParaAdjust; }
 voidsetParaAdjust( 
css::style::ParagraphAdjust nParaAdjust ) { moParaAdjust = nParaAdjust; }
 
+TextSpacing&getLineSpacing() { return 
maLineSpacing; }
+voidsetLineSpacing( const TextSpacing& 
rLineSpacing ) { maLineSpacing = rLineSpacing; }
+
 voidapply( const TextParagraphProperties& 
rSourceProps );
 voidpushToPropSet( const 
::oox::core::XmlFilterBase* pFilterBase,
 const css::uno::Reference < 
css::beans::XPropertySet > & xPropSet,
@@ -126,6 +129,7 @@ protected:
 boost::optional< sal_Int32 >moFirstLineIndentation;
 boost::optional< css::style::ParagraphAdjust >moParaAdjust;
 sal_Int16   mnLevel;
+TextSpacing maLineSpacing;
 };
 
 } }
diff --git a/oox/inc/drawingml/textparagraphpropertiescontext.hxx 
b/oox/inc/drawingml/textparagraphpropertiescontext.hxx
index 2de92b5b05ab..3cd2d0d375b4 100644
--- a/oox/inc/drawingml/textparagraphpropertiescontext.hxx
+++ b/oox/inc/drawingml/textparagraphpropertiescontext.hxx
@@ -42,7 +42,6 @@ public:
 
 private:
 TextParagraphProperties& mrTextParagraphProperties;
-TextSpacing maLineSpacing;
 BulletList& mrBulletList;
 std::vector< css::style::TabStop >  maTabList;
 std::shared_ptr< BlipFillProperties > mxBlipProps;
diff --git a/oox/source/drawingml/textparagraphproperties.cxx 
b/oox/source/drawingml/textparagraphproperties.cxx
index bc523073bfff..f80a411b2ab0 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -388,6 +388,8 @@ void TextParagraphProperties::apply( const 
TextParagraphProperties& rSourceProps
 mnLevel = rSourceProps.mnLevel;
 if( rSourceProps.moParaAdjust )
 moParaAdjust = rSourceProps.moParaAdjust;
+if( rSourceProps.maLineSpacing.bHasValue )
+maLineSpacing = rSourceProps.maLineSpacing;
 }
 
 void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* 
pFilterBase,
@@ -494,6 +496,15 @@ void TextParagraphProperties::pushToPropSet( const 
::oox::core::XmlFilterBase* p
 {
 aPropSet.setProperty( PROP_ParaAdjust, 
css::style::ParagraphAdjust_LEFT);
 }
+
+if ( maLineSpacing.bHasValue )
+{
+aPropSet.setProperty( PROP_ParaLineSpacing, 
maLineSpacing.toLineSpacing());
+}
+else
+{
+aPropSet.setProperty( PROP_ParaLineSpacing, css::style::LineSpacing( 
css::style::LineSpacingMode::PROP, 100 ));
+}
 }
 
 float TextParagraphProperties::getCharHeightPoints( float fDefault ) const
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx 
b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 616ec3d3cd0c..2bccee095209 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -133,8 +133,8 @@ 
TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler2H
 TextParagraphPropertiesContext::~TextParagraphPropertiesContext()
 {
 PropertyMap& rPropertyMap( 
mrTextParagraphProperties.getTextParagraphPropertyMap() );
-if ( maLineSpacing.bHasValue )
-rPropertyMap.setProperty( PROP_ParaLineSpacing, 
maLineSpacing.toLineSpacing());
+if ( mrTextParagraphProperti

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

2018-02-15 Thread Tamás Zolnai
 oox/inc/drawingml/textparagraphproperties.hxx   |4 +
 oox/inc/drawingml/textparagraphpropertiescontext.hxx|1 
 oox/source/drawingml/textparagraphproperties.cxx|   11 
 oox/source/drawingml/textparagraphpropertiescontext.cxx |   17 +++---
 sd/qa/unit/data/pptx/tdf51340.pptx  |binary
 sd/qa/unit/import-tests.cxx |   42 
 6 files changed, 66 insertions(+), 9 deletions(-)

New commits:
commit 173944948522854a7a1df89e48c20c83113ca77d
Author: Tamás Zolnai 
Date:   Wed Feb 14 02:15:54 2018 +0100

tdf#51340: Line spacing is imported incorrectly from PPTX

Move the line spacing member to the TextParagraphProperties class
which is used to do the inheritance from master / layout slides.

Reviewed-on: https://gerrit.libreoffice.org/49692
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 
(cherry picked from commit 53551d49d3be2301985f2cf2d8bb23ff374ecfd1)

Change-Id: I0bf92420963163eae78e06ebc7fdfa1f2c72fdf8
Reviewed-on: https://gerrit.libreoffice.org/49746
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/oox/inc/drawingml/textparagraphproperties.hxx 
b/oox/inc/drawingml/textparagraphproperties.hxx
index fb9f3ccf2acb..9ca5f3e6ceda 100644
--- a/oox/inc/drawingml/textparagraphproperties.hxx
+++ b/oox/inc/drawingml/textparagraphproperties.hxx
@@ -96,6 +96,9 @@ public:
 boost::optional< sal_Int16 >&   getParaAdjust() { return moParaAdjust; 
}
 voidsetParaAdjust( sal_Int16 nParaAdjust ) 
{ moParaAdjust = nParaAdjust; }
 
+TextSpacing&getLineSpacing() { return 
maLineSpacing; }
+voidsetLineSpacing( const TextSpacing& 
rLineSpacing ) { maLineSpacing = rLineSpacing; }
+
 voidapply( const TextParagraphProperties& 
rSourceProps );
 voidpushToPropSet( const 
::oox::core::XmlFilterBase* pFilterBase,
 const css::uno::Reference < 
css::beans::XPropertySet > & xPropSet,
@@ -125,6 +128,7 @@ protected:
 boost::optional< sal_Int32 >moFirstLineIndentation;
 boost::optional< sal_Int16 >moParaAdjust;
 sal_Int16   mnLevel;
+TextSpacing maLineSpacing;
 };
 
 } }
diff --git a/oox/inc/drawingml/textparagraphpropertiescontext.hxx 
b/oox/inc/drawingml/textparagraphpropertiescontext.hxx
index ba3fe098db1b..4c37c470e565 100644
--- a/oox/inc/drawingml/textparagraphpropertiescontext.hxx
+++ b/oox/inc/drawingml/textparagraphpropertiescontext.hxx
@@ -42,7 +42,6 @@ public:
 
 protected:
 TextParagraphProperties& mrTextParagraphProperties;
-TextSpacing maLineSpacing;
 BulletList& mrBulletList;
 std::list< css::style::TabStop >  maTabList;
 std::shared_ptr< BlipFillProperties > mxBlipProps;
diff --git a/oox/source/drawingml/textparagraphproperties.cxx 
b/oox/source/drawingml/textparagraphproperties.cxx
index 4d281c052bd1..f165be19bb40 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -387,6 +387,8 @@ void TextParagraphProperties::apply( const 
TextParagraphProperties& rSourceProps
 mnLevel = rSourceProps.mnLevel;
 if( rSourceProps.moParaAdjust )
 moParaAdjust = rSourceProps.moParaAdjust;
+if( rSourceProps.maLineSpacing.bHasValue )
+maLineSpacing = rSourceProps.maLineSpacing;
 }
 
 void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* 
pFilterBase,
@@ -493,6 +495,15 @@ void TextParagraphProperties::pushToPropSet( const 
::oox::core::XmlFilterBase* p
 {
 aPropSet.setProperty( PROP_ParaAdjust, 
css::style::ParagraphAdjust_LEFT);
 }
+
+if ( maLineSpacing.bHasValue )
+{
+aPropSet.setProperty( PROP_ParaLineSpacing, 
maLineSpacing.toLineSpacing());
+}
+else
+{
+aPropSet.setProperty( PROP_ParaLineSpacing, css::style::LineSpacing( 
css::style::LineSpacingMode::PROP, 100 ));
+}
 }
 
 float TextParagraphProperties::getCharHeightPoints( float fDefault ) const
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx 
b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 3a0eb4156849..051bfd989119 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -133,8 +133,8 @@ 
TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler2H
 TextParagraphPropertiesContext::~TextParagraphPropertiesContext()
 {
 PropertyMap& rPropertyMap( 
mrTextParagraphProperties.getTextParagraphPropertyMap() );
-if ( maLineSpacing.bHasValue )
-rPropertyMap.setProperty( PROP_ParaLineSpacing, 
maLineSpacing.toLineSpacing());
+if ( mrTextParagraphProperties.getLineSpacing().bHasValue )
+rPropert

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3-desktop' - oox/inc oox/source sd/qa

2018-02-15 Thread Tamás Zolnai
 oox/inc/drawingml/textparagraphproperties.hxx   |4 +
 oox/inc/drawingml/textparagraphpropertiescontext.hxx|1 
 oox/source/drawingml/textparagraphproperties.cxx|   11 
 oox/source/drawingml/textparagraphpropertiescontext.cxx |   17 +++---
 sd/qa/unit/data/pptx/tdf51340.pptx  |binary
 sd/qa/unit/import-tests.cxx |   42 
 6 files changed, 66 insertions(+), 9 deletions(-)

New commits:
commit 5dfc6ad6258ff72541c0da7bdf9978fb0b6da006
Author: Tamás Zolnai 
Date:   Wed Feb 14 02:15:54 2018 +0100

tdf#51340: Line spacing is imported incorrectly from PPTX

Move the line spacing member to the TextParagraphProperties class
which is used to do the inheritance from master / layout slides.

Reviewed-on: https://gerrit.libreoffice.org/49692
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 
(cherry picked from commit 53551d49d3be2301985f2cf2d8bb23ff374ecfd1)

Change-Id: I0bf92420963163eae78e06ebc7fdfa1f2c72fdf8
Reviewed-on: https://gerrit.libreoffice.org/49807
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/oox/inc/drawingml/textparagraphproperties.hxx 
b/oox/inc/drawingml/textparagraphproperties.hxx
index fb9f3ccf2acb..9ca5f3e6ceda 100644
--- a/oox/inc/drawingml/textparagraphproperties.hxx
+++ b/oox/inc/drawingml/textparagraphproperties.hxx
@@ -96,6 +96,9 @@ public:
 boost::optional< sal_Int16 >&   getParaAdjust() { return moParaAdjust; 
}
 voidsetParaAdjust( sal_Int16 nParaAdjust ) 
{ moParaAdjust = nParaAdjust; }
 
+TextSpacing&getLineSpacing() { return 
maLineSpacing; }
+voidsetLineSpacing( const TextSpacing& 
rLineSpacing ) { maLineSpacing = rLineSpacing; }
+
 voidapply( const TextParagraphProperties& 
rSourceProps );
 voidpushToPropSet( const 
::oox::core::XmlFilterBase* pFilterBase,
 const css::uno::Reference < 
css::beans::XPropertySet > & xPropSet,
@@ -125,6 +128,7 @@ protected:
 boost::optional< sal_Int32 >moFirstLineIndentation;
 boost::optional< sal_Int16 >moParaAdjust;
 sal_Int16   mnLevel;
+TextSpacing maLineSpacing;
 };
 
 } }
diff --git a/oox/inc/drawingml/textparagraphpropertiescontext.hxx 
b/oox/inc/drawingml/textparagraphpropertiescontext.hxx
index ba3fe098db1b..4c37c470e565 100644
--- a/oox/inc/drawingml/textparagraphpropertiescontext.hxx
+++ b/oox/inc/drawingml/textparagraphpropertiescontext.hxx
@@ -42,7 +42,6 @@ public:
 
 protected:
 TextParagraphProperties& mrTextParagraphProperties;
-TextSpacing maLineSpacing;
 BulletList& mrBulletList;
 std::list< css::style::TabStop >  maTabList;
 std::shared_ptr< BlipFillProperties > mxBlipProps;
diff --git a/oox/source/drawingml/textparagraphproperties.cxx 
b/oox/source/drawingml/textparagraphproperties.cxx
index 4d281c052bd1..f165be19bb40 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -387,6 +387,8 @@ void TextParagraphProperties::apply( const 
TextParagraphProperties& rSourceProps
 mnLevel = rSourceProps.mnLevel;
 if( rSourceProps.moParaAdjust )
 moParaAdjust = rSourceProps.moParaAdjust;
+if( rSourceProps.maLineSpacing.bHasValue )
+maLineSpacing = rSourceProps.maLineSpacing;
 }
 
 void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* 
pFilterBase,
@@ -493,6 +495,15 @@ void TextParagraphProperties::pushToPropSet( const 
::oox::core::XmlFilterBase* p
 {
 aPropSet.setProperty( PROP_ParaAdjust, 
css::style::ParagraphAdjust_LEFT);
 }
+
+if ( maLineSpacing.bHasValue )
+{
+aPropSet.setProperty( PROP_ParaLineSpacing, 
maLineSpacing.toLineSpacing());
+}
+else
+{
+aPropSet.setProperty( PROP_ParaLineSpacing, css::style::LineSpacing( 
css::style::LineSpacingMode::PROP, 100 ));
+}
 }
 
 float TextParagraphProperties::getCharHeightPoints( float fDefault ) const
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx 
b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 3a0eb4156849..051bfd989119 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -133,8 +133,8 @@ 
TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler2H
 TextParagraphPropertiesContext::~TextParagraphPropertiesContext()
 {
 PropertyMap& rPropertyMap( 
mrTextParagraphProperties.getTextParagraphPropertyMap() );
-if ( maLineSpacing.bHasValue )
-rPropertyMap.setProperty( PROP_ParaLineSpacing, 
maLineSpacing.toLineSpacing());
+if ( mrTextParagraphProperties.getLineSpacing().bHasValue )
+rPropert

[Libreoffice-commits] core.git: 2 commits - include/comphelper

2018-02-15 Thread Tor Lillqvist
 include/comphelper/windowsdebugoutput.hxx |  413 +-
 1 file changed, 412 insertions(+), 1 deletion(-)

New commits:
commit 1647bfa019124aefd34d8ad231d19399e93a6096
Author: Tor Lillqvist 
Date:   Thu Feb 15 14:17:20 2018 +0200

Apply clang-format

Change-Id: I089cdb8c770df5e8c99d55870061a18645b2cd05

diff --git a/include/comphelper/windowsdebugoutput.hxx 
b/include/comphelper/windowsdebugoutput.hxx
index 594afc7280d3..4e396db92715 100644
--- a/include/comphelper/windowsdebugoutput.hxx
+++ b/include/comphelper/windowsdebugoutput.hxx
@@ -38,7 +38,8 @@ inline std::basic_ostream& 
operator<<(std::basic_ostream, 
wchar_t>().to_bytes(std::wstring(pRiid));
+stream << std::wstring_convert, 
wchar_t>().to_bytes(
+std::wstring(pRiid));
 CoTaskMemFree(pRiid);
 return stream;
 }
@@ -56,52 +57,144 @@ inline std::basic_ostream& 
operator<<(std::basic_ostream& 
operator<<(std::basic_ostreamint64; break;
-case VT_DATE: stream << *(double*)rVariant.byref; break; // FIXME
-case VT_BSTR: stream << (OLECHAR*)rVariant.byref; break;
-case VT_DISPATCH: stream << rVariant.byref; break;
+case VT_I2:
+stream << *(short*)rVariant.byref;
+break;
+case VT_I4:
+stream << *(int*)rVariant.byref;
+break;
+case VT_R4:
+stream << *(float*)rVariant.byref;
+break;
+case VT_R8:
+stream << *(double*)rVariant.byref;
+break;
+case VT_CY:
+stream << ((CY*)rVariant.byref)->int64;
+break;
+case VT_DATE:
+stream << *(double*)rVariant.byref;
+break; // FIXME
+case VT_BSTR:
+stream << (OLECHAR*)rVariant.byref;
+break;
+case VT_DISPATCH:
+stream << rVariant.byref;
+break;
+case VT_ERROR:
+case VT_HRESULT:
+flags = stream.flags();
+stream << std::hex << *(int*)rVariant.byref;
+stream.setf(flags);
+break;
+case VT_BOOL:
+stream << (*(VARIANT_BOOL*)rVariant.byref ? "YES" : "NO");
+break;
+case VT_VARIANT:
+stream << *(VARIANT*)rVariant.byref;
+break;
+case VT_UNKNOWN:
+stream << *(IUnknown**)rVariant.byref;
+break;
+case VT_DECIMAL:
+flags = stream.flags();
+width = stream.width();
+fill = stream.fill();
+stream << std::hex << std::setw(8) << std::setfill('0')
+   << ((DECIMAL*)rVariant.byref)->Hi32;
+stream << std::setw(16) << ((DECIMAL*)rVariant.byref)->Lo64;
+stream.setf(flags);
+stream << std::setw(width) << std::setfill(fill);
+break;
+case VT_I1:
+stream << (int)*(char*)rVariant.byref;
+break;
+case VT_UI1:
+stream << (unsigned int)*(unsigned char*)rVariant.byref;
+break;
+case VT_UI2:
+stream << *(unsigned short*)rVariant.byref;
+break;
+case VT_UI4:
+stream << *(unsigned int*)rVariant.byref;
+break;
+case VT_I8:
+stream << *(long long*)rVariant.byref;
+break;
+case VT_UI8:
+stream << *(unsigned long long*)rVariant.byref;
+break;
+case VT_INT:
+stream << *(int*)rVariant.byref;
+break;
+case VT_UINT:
+stream << *(unsigned int*)rVariant.byref;
+break;
+case VT_INT_PTR:
+stream << *(intptr_t*)rVariant.byref;
+break;
+case VT_UINT_PTR:
+stream << *(uintptr_t*)rVariant.byref;
+break;
+case VT_PTR:
+case VT_CARRAY:
+stream << *(void**)rVariant.byref;
+break;
+case VT_SAFEARRAY:
+break; // FIXME
+case VT_LPSTR:
+stream << *(char**)rVariant.byref;
+break;
+case VT_LPWSTR:
+stream << std::wstring_convert, 
wchar_t>().to_bytes(
+std::wstring(*(wchar_t**)rVariant.byref));
+break;
+case VT_FILETIME:
+break; // FIXME
+case VT_BLOB:
+break; // FIXME
+case VT_STREAM:
+break; // FIXME
+case VT_STORAGE:
+break; // FIXME
+case VT_STREAMED_OBJECT:
+break; // FIXME
+case VT_STORED_OBJECT:
+  

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

2018-02-15 Thread Jan-Marek Glogowski
 uui/source/iahndl.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit a8a0e22edc53a58b293771ef793e9d6a0ac2f712
Author: Jan-Marek Glogowski 
Date:   Wed Feb 14 12:30:47 2018 +0100

tdf#114676 release the SolarMutex, if we own it

This is a follow up on the SolarMutex unification. Quite probably
the updater process, which is now aborting when releasing the
not-owned mutex, should somewhere acquire it.

In the end this functions currently can be called with or without
the SolarMutex being owned by the calling thread.

This conditional release is really a horrible hack / workaround;
but my guess is - like all hacks - it'll stay for longer.

Change-Id: I90e30149c2fef8bdf3dc0396bf8eb7491eedeabd
Reviewed-on: https://gerrit.libreoffice.org/49717
Tested-by: Jenkins 
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 0e04523b040785e2ce552143d20adcbb40b61d42)
Reviewed-on: https://gerrit.libreoffice.org/49795
Reviewed-by: Mike Kaganski 

diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index e2ce02c659d5..67f28e089e51 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -172,7 +172,11 @@ UUIInteractionHelper::handleRequest(
 HandleData aHD(rRequest);
 Link aLink(&aHD,handlerequest);
 Application::PostUserEvent(aLink,this);
+comphelper::SolarMutex& rSolarMutex = Application::GetSolarMutex();
+sal_uInt32 nLockCount = (rSolarMutex.IsCurrentThread()) ? 
rSolarMutex.release(true) : 0;
 aHD.wait();
+if (nLockCount)
+rSolarMutex.acquire(nLockCount);
 return aHD.bHandled;
 }
 else
@@ -223,7 +227,11 @@ UUIInteractionHelper::getStringFromRequest(
 HandleData aHD(rRequest);
 Link aLink(&aHD,getstringfromrequest);
 Application::PostUserEvent(aLink,this);
+comphelper::SolarMutex& rSolarMutex = Application::GetSolarMutex();
+sal_uInt32 nLockCount = (rSolarMutex.IsCurrentThread()) ? 
rSolarMutex.release(true) : 0;
 aHD.wait();
+if (nLockCount)
+rSolarMutex.acquire(nLockCount);
 return aHD.m_aResult;
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Vasily Melenchuk
 sd/inc/sdpage.hxx|1 -
 sd/qa/unoapi/knownissues.xcl |5 +
 sd/source/core/sdpage.cxx|   38 +++---
 sd/source/core/sdpage2.cxx   |7 +++
 4 files changed, 19 insertions(+), 32 deletions(-)

New commits:
commit 3462a55f0696ae06ea6714723c54eb7c67c2cbaa
Author: Vasily Melenchuk 
Date:   Tue Jan 30 10:26:27 2018 +0300

tdf#115345: removed slide orientation setting method.

Slide orientation is dependent value and can be easily calculated
based on slide dimensions.

Also modification of slide orientation without changing of page
dimensions brings page in inconsistent state.

Change-Id: I86921668b648a8110d16b31507f2ce5d6c88484a
Reviewed-on: https://gerrit.libreoffice.org/49334
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index dcef647fb59e..42af131102c0 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -122,7 +122,6 @@ friend class sd::UndoAttrObject;
 boolmbBackgroundFullSize; ///< Background object to represent the 
whole page.
 rtl_TextEncoding meCharSet;   ///< Text encoding
 sal_uInt16  mnPaperBin;   ///< PaperBin
-Orientation meOrientation;///< Print orientation.
 SdPageLink* mpPageLink;   ///< Page link (at left sides only)
 
 sd::AnnotationVectormaAnnotations;
diff --git a/sd/qa/unoapi/knownissues.xcl b/sd/qa/unoapi/knownissues.xcl
index a7ec4216100a..d9e0690013a1 100644
--- a/sd/qa/unoapi/knownissues.xcl
+++ b/sd/qa/unoapi/knownissues.xcl
@@ -16,6 +16,11 @@
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
 
+### tdf#115345 - not useful to set Orientation ###
+sd.SdDrawPage::com::sun::star::drawing::GenericDrawPage
+sd.SdGenericDrawPage::com::sun::star::drawing::GenericDrawPage
+sd.SdMasterPage::com::sun::star::drawing::GenericDrawPage
+
 ### i84994 ###
 sd.SdXImpressDocument::com::sun::star::view::XPrintable
 # -> disabled in sd.sce
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 6e4c3dffbfee..867c4df6c3c0 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -129,16 +129,6 @@ SdPage::SdPage(SdDrawDocument& rNewDoc, bool bMasterPage)
 // presentation template of the outline objects. Therefore, it already
 // contains the designator for the outline (STR_LAYOUT_OUTLINE).
 maLayoutName = SdResId(STR_LAYOUT_DEFAULT_NAME)+ SD_LT_SEPARATOR 
STR_LAYOUT_OUTLINE;
-Size aPageSize(GetSize());
-
-if (aPageSize.Width() > aPageSize.Height())
-{
-meOrientation = Orientation::Landscape;
-}
-else
-{
-meOrientation = Orientation::Portrait;
-}
 }
 
 namespace
@@ -1757,20 +1747,6 @@ void SdPage::SetSize(const Size& aSize)
 if (aSize != aOldSize)
 {
 FmFormPage::SetSize(aSize);
-
-if (aOldSize.Height() == 10 && aOldSize.Width() == 10)
-{
-// this page gets a valid size for the first time. Therefore
-// we initialize the orientation.
-if (aSize.Width() > aSize.Height())
-{
-meOrientation = Orientation::Landscape;
-}
-else
-{
-meOrientation = Orientation::Portrait;
-}
-}
 }
 }
 
@@ -2614,14 +2590,22 @@ const OUString& SdPage::GetName() const
 return maCreatedPageName;
 }
 
-void SdPage::SetOrientation( Orientation eOrient)
+void SdPage::SetOrientation( Orientation /*eOrient*/)
 {
-meOrientation = eOrient;
+// Do nothing
 }
 
 Orientation SdPage::GetOrientation() const
 {
-return meOrientation;
+Size aSize = GetSize();
+if ( aSize.getWidth() > aSize.getHeight() )
+{
+return Orientation::Landscape;
+}
+else
+{
+return Orientation::Portrait;
+}
 }
 
 /*
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 21903145ea61..deab43fa74fa 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -397,7 +397,6 @@ SdPage::SdPage(const SdPage& rSrcPage)
 mbBackgroundFullSize = rSrcPage.mbBackgroundFullSize;
 meCharSet= rSrcPage.meCharSet;
 mnPaperBin   = rSrcPage.mnPaperBin;
-meOrientation= rSrcPage.meOrientation;
 
 mpPageLink   = nullptr;// is set when inserting via 
ConnectLink()
 
@@ -573,9 +572,9 @@ bool SdPage::Equals(const SdPage& rOtherPage) const
 mbLoopSound == rOtherPage.mbLoopSound && mbStopSound == 
rOtherPage.mbStopSound &&
 maBookmarkName == rOtherPage.maBookmarkName && mbScaleObjects == 
rOtherPage.mbScaleObjects &&
 mbBackgroundFullSize == rOtherPage.mbBackgroundFullSize && 
meCharSet == rOtherPage.meCharSet &&
-mnPaperBin == rOtherPage.mnPaperBin && meOrientation == 
rOtherPage.meOrientation &&
- 

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - wsd/DocumentBroker.cpp

2018-02-15 Thread Pranav Kant
 wsd/DocumentBroker.cpp |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 61ffc7c0a15107db7ac7304584cf42b89946f3d6
Author: Pranav Kant 
Date:   Thu Feb 1 22:43:47 2018 +0530

wsd: DocumentBroker: Don't initiate the document close

Just broadcast the message and let clients deal with it. This is similar
to how we do it when we find the document conflict via CheckFileInfo

Change-Id: I52855fcb96a359b3915afe71d481321f79b4554b
Reviewed-on: https://gerrit.libreoffice.org/49748
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index c0d33348..4be7a88c 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -837,14 +837,11 @@ bool DocumentBroker::saveToStorageInternal(const 
std::string& sessionId,
 {
 LOG_ERR("PutFile says that Document changed in storage");
 _documentChangedInStorage = true;
+std::string message = "close: documentconflict";
 if (_isModified)
-{
-broadcastMessage("error: cmd=storage kind=documentconflict");
-}
-else
-{
-closeDocument("documentconflict");
-}
+message = "error: cmd=storage kind=documentconflict";
+
+broadcastMessage(message);
 }
 
 return 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-3-0' - wsd/DocumentBroker.hpp wsd/LOOLWSD.cpp

2018-02-15 Thread Pranav Kant
 wsd/DocumentBroker.hpp |3 ---
 wsd/LOOLWSD.cpp|3 +--
 2 files changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 30e867946ebfb668565387204171b975f55d7c2e
Author: Pranav Kant 
Date:   Fri Feb 2 00:36:53 2018 +0530

wsd: Bin superfluous public method

Passing the reason to stop() method also does the same thing.

Change-Id: I16b648495382c14f31839acca815835df76d8dca
Reviewed-on: https://gerrit.libreoffice.org/49750
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 1571e426..a398e701 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -349,9 +349,6 @@ public:
 /// Sends a message to all sessions
 void broadcastMessage(const std::string& message);
 
-/// Sets the reason for closing document;
-void setCloseReason(const std::string& closeReason) { _closeReason = 
closeReason; }
-
 private:
 
 /// Shutdown all client connections with the given reason.
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 1f60f24b..b713ac0c 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1547,8 +1547,7 @@ private:
 {
 auto lock = docBroker->getLock();
 docBroker->assertCorrectThread();
-docBroker->setCloseReason("docdisconnected");
-docBroker->stop("Lost connection with LOKit.");
+docBroker->stop("docisdisconnected");
 }
 }
 
___
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-3-0' - wsd/DocumentBroker.cpp

2018-02-15 Thread Pranav Kant
 wsd/DocumentBroker.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ff5fd0ebdac600b3e1a869338b8d55e50bbedd5a
Author: Pranav Kant 
Date:   Thu Feb 1 23:58:43 2018 +0530

wsd: Don't save if document ends up being unmodified

Change-Id: Ie027f5b49c37e7df3f36499e0fef3eca78173969
Reviewed-on: https://gerrit.libreoffice.org/49749
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 4be7a88c..7f04412b 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -896,7 +896,7 @@ bool DocumentBroker::autoSave(const bool force)
 {
 LOG_TRC("Sending forced save command for [" << _docKey << "].");
 // Don't terminate editing as this can be invoked by the admin OOM, 
but otherwise force saving anyway.
-sent = sendUnoSave(savingSessionId, /*dontTerminateEdit=*/ true, 
/*dontSaveIfUnmodified=*/ false, /*isAutosave=*/ false);
+sent = sendUnoSave(savingSessionId, /*dontTerminateEdit=*/ true, 
/*dontSaveIfUnmodified=*/ true, /*isAutosave=*/ false);
 }
 else if (_isModified)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Caolán McNamara
 filter/source/msfilter/msdffimp.cxx |2 +-
 sw/source/filter/ww8/ww8scan.cxx|7 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit a315bfee11b99b41ed6c2fc855e2ff9e10ce9a2b
Author: Caolán McNamara 
Date:   Thu Feb 15 09:06:43 2018 +

ofz#6364 Integer-overflow

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

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index ef25e6353e46..b88e56badd9d 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -3899,7 +3899,12 @@ void WW8PLCFx_SubDoc::GetSprms(WW8PLCFxDesc* p)
 return;
 }
 
-p->nEndPos = p->nStartPos + 1;
+if (o3tl::checked_add(p->nStartPos, 1, p->nEndPos))
+{
+SAL_WARN("sw.ww8", "broken offset, ignoring");
+p->nEndPos = p->nStartPos = WW8_CP_MAX;
+return;
+}
 
 if (!pText)
 return;
commit a12ad856148f2e2da55dcaa6e6c295bea6dc38c7
Author: Caolán McNamara 
Date:   Thu Feb 15 09:09:27 2018 +

ofz#6365 Integer-overflow

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

diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index 59b042359b6c..4d0403a1163e 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -2822,7 +2822,7 @@ void DffPropertyReader::ImportGradientColor( SfxItemSet& 
aSet,MSO_FillType eMSO_
 nChgColors ^= 1;
 else if ( nFocus < 0 )//If it is a negative focus, the color will be 
swapped
 {
-nFocus = -nFocus;
+nFocus = o3tl::saturating_toggle_sign(nFocus);
 nChgColors ^= 1;
 }
 
___
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-3-0' - 3 commits - test/Makefile.am test/UnitWopiOwnertermination.cpp test/WopiTestServer.hpp wsd/ClientSession.cpp wsd/Docu

2018-02-15 Thread Pranav Kant
 test/Makefile.am  |6 +-
 test/UnitWopiOwnertermination.cpp |   89 ++
 test/WopiTestServer.hpp   |1 
 wsd/ClientSession.cpp |2 
 wsd/DocumentBroker.cpp|   14 +++--
 wsd/DocumentBroker.hpp|4 +
 6 files changed, 107 insertions(+), 9 deletions(-)

New commits:
commit d53d1dd467ef897d6a77d696a08a5470e127dc3c
Author: Pranav Kant 
Date:   Fri Feb 2 13:17:45 2018 +0530

Document stop() vs closeDocument()

Change-Id: I52483c0300d1d4c5b1def80b71ccd0661590bfab
Reviewed-on: https://gerrit.libreoffice.org/49753
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index a5345f67..443d8ab5 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -226,7 +226,7 @@ public:
 /// Start processing events
 void startThread();
 
-/// Flag for termination.
+/// Flag for termination. Note that this doesn't save any unsaved changes 
in the document
 void stop(const std::string& reason);
 
 /// Thread safe termination of this broker if it has a lingering thread
@@ -321,6 +321,7 @@ public:
 
 int getRenderedTileCount() { return _debugRenderedTileCount; }
 
+/// Ask the document broker to close. Makes sure that the document is 
saved.
 void closeDocument(const std::string& reason);
 
 /// Called by the ChildProcess object to notify
commit 8a3f8bd352dffccc078f6fa9acf63dac13b0d5c4
Author: Pranav Kant 
Date:   Fri Feb 2 13:08:25 2018 +0530

wsd: Don't request closing here, just stop the broker

Asking the doc broker to close means that it will save the current
document to storage before shutting down. But we don't want that because
storing the current document to storage means overwriting the document
which has been changed underneath us.

Change-Id: I8df45d2f0cf3f65936dc3030f483e52fd1703146
Reviewed-on: https://gerrit.libreoffice.org/49752
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 8d7ea60e..e23ec418 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -190,7 +190,7 @@ bool ClientSession::_handleInput(const char *buffer, int 
length)
 LOG_DBG("Document marked as changed in storage and user ["
 << getUserId() << ", " << getUserName()
 << "] wants to refresh the document for all.");
-docBroker->closeDocument("documentconflict " + getUserName());
+docBroker->stop("documentconflict " + getUserName());
 }
 
 return true;
commit cdaf6bdfb04b2371fc84a5a71b60fcf017c81297
Author: Pranav Kant 
Date:   Fri Feb 2 11:34:48 2018 +0530

wsd: Use a close request flag to break out of doc broker poll thread

... instead of directly stop()ing it. The close request approach also
makes sure that outgoing document is saved to storage.

Change-Id: I44f61db00dbd326dec80f59f4a2cbb617048aa94
Reviewed-on: https://gerrit.libreoffice.org/49751
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/test/Makefile.am b/test/Makefile.am
index aa54e0cb..4808573a 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -17,7 +17,7 @@ noinst_LTLIBRARIES = \
unit-storage.la unit-client.la \
unit-admin.la unit-tilecache.la \
unit-fuzz.la unit-oob.la unit-oauth.la \
-   unit-wopi.la unit-wopi-saveas.la
+   unit-wopi.la unit-wopi-saveas.la unit-wopi-ownertermination.la
 
 MAGIC_TO_FORCE_SHLIB_CREATION = -rpath /dummy
 AM_LDFLAGS = -pthread -module $(MAGIC_TO_FORCE_SHLIB_CREATION) $(ZLIB_LIBS)
@@ -82,6 +82,8 @@ unit_wopi_la_SOURCES = UnitWOPI.cpp
 unit_wopi_la_LIBADD = $(CPPUNIT_LIBS)
 unit_wopi_saveas_la_SOURCES = UnitWOPISaveAs.cpp
 unit_wopi_saveas_la_LIBADD = $(CPPUNIT_LIBS)
+unit_wopi_ownertermination_la_SOURCES = UnitWopiOwnertermination.cpp
+unit_wopi_ownertermination_la_LIBADD = $(CPPUNIT_LIBS)
 
 if HAVE_LO_PATH
 SYSTEM_STAMP = @SYSTEMPLATE_PATH@/system_stamp
@@ -95,7 +97,7 @@ check-local:
./run_unit.sh --log-file test.log --trs-file test.trs
 # FIXME 2: unit-oob.la fails with symbol undefined:
 # UnitWSD::testHandleRequest(UnitWSD::TestRequest, UnitHTTPServerRequest&, 
UnitHTTPServerResponse&) ,
-TESTS = unit-prefork.la unit-tilecache.la unit-timeout.la unit-oauth.la 
unit-wopi.la unit-wopi-saveas.la
+TESTS = unit-prefork.la unit-tilecache.la unit-timeout.la unit-oauth.la 
unit-wopi.la unit-wopi-saveas.la unit-wopi-ownertermination.la
 # TESTS = unit-client.la
 # TESTS += unit-admin.la
 # TESTS += unit-storage.la
diff --git a/test/UnitWopiOwnertermination.cpp 
b/test/UnitWopiOwnertermination.cpp
new file mode 100644
index ..d356ab0e
--- /dev/null
+++ b/test/UnitWopiOwnertermination.cpp
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * Th

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - loleaflet/reference.html loleaflet/src wsd/ClientSession.cpp wsd/protocol.txt

2018-02-15 Thread Pranav Kant
 loleaflet/reference.html  |   66 +-
 loleaflet/src/core/Socket.js  |   12 ++
 loleaflet/src/map/handler/Map.WOPI.js |   15 +++
 wsd/ClientSession.cpp |8 
 wsd/protocol.txt  |   18 +
 5 files changed, 109 insertions(+), 10 deletions(-)

New commits:
commit 804acd2adea6b944da709086a42915d81d479a12
Author: Pranav Kant 
Date:   Fri Feb 2 11:35:29 2018 +0530

Version restore states

See documentation

Change-Id: Ica3cd3744643157c5a2c6c1e42e0858ad641da16
Reviewed-on: https://gerrit.libreoffice.org/49754
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/reference.html b/loleaflet/reference.html
index 7894f2a7..51516b44 100644
--- a/loleaflet/reference.html
+++ b/loleaflet/reference.html
@@ -33,7 +33,7 @@
 API Reference
 
 
-   
+
Map

Usage example
@@ -2759,17 +2759,20 @@ Editor to WOPI host

Status: 
DocumentLoadedTime: 
-   
-   If Status is Frame_Ready, loleaflet frame is loaded and UI
-   can be shown. 
-   When Status is Document_Loaded, document has been completely
-   loaded and host can also start sending document-specific query
-   messages using post message API such as Get_Views,
-   Get_Export_Formats etc. DocumentLoadedTime is specified
-   only in this case.
+   Features: 
+   
+   If Status is Frame_Ready, loleaflet frame is loaded 
and UI
+   can be shown. 
+   Accompanying keys: Features: This client's 
capabilities.
+   Supported values are: VersionStates. Tells the host 
that client supports different version states. See Version Restore for more 
details.
+   When Status is Document_Loaded, document has been completely
+   loaded and host can also start using PostMessage API.
+   Accompanying keys:
+   DocumentLoadedTime


 
+
 WOPI host to editor
 

@@ -2986,6 +2989,51 @@ Actions response

 
 
+Version Restore
+WOPI host to editor
+
+
+   MessageId
+   Values
+   Description
+
+
+   Host_VersionRestore
+   
+   Status: 
+   
+   
+   Only possible value of Status (for now) is Pre_Restore.
+   This message is sent by the host before actually restoring 
the document
+   and after user showed the intent to restore the document. 
This is so such
+   that if there are any unsaved changes, Online can save them to 
storage before
+   document is restored.
+   
+
+
+Editor to WOPI host
+
+
+   MessageId
+   Values
+   Description
+
+
+   App_VersionRestore
+   
+   Status: 
+   
+   
+   This is the reply for the Host_VersionRestore message. Possible 
values for Status
+   (for now) is: Pre_Restore_Ack. It means that host can 
go ahead with restoring the
+   document to an earlier revision.
+   
+
+
+
+Note
+These messages are only emitted if App_LoadingStatus contains 
VersionStates in Features. Otherwise, host can immediately 
restore the version to earlier revision.
+
 Miscellaneous
 WOPI host to editor
 
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 0d1b..068edc9a 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -258,6 +258,7 @@ L.Socket = L.Class.extend({
textMsg = textMsg.substring('close: '.length);
msg = '';
var postMsgData = {};
+   var showMsgAndReload = false;
// This is due to document owner terminating the session
if (textMsg === 'ownertermination') {
msg = _('Session terminated by document owner');
@@ -310,7 +311,18 @@ L.Socket = L.Class.extend({
}
else if (textMsg.startsWith('documentconflict')) {
msg = _('Document has changed in storage. 
Loading the new document. Your version is available as revision.');
+   showMsgAndReload = true;
+   }
+   else if (textMsg.startsWith('versionrestore:')) {
+   textMsg = 
textMsg.substring('versionrestore:'.length).trim();
+   if (textMsg === 'prerestore_ack') {
+   msg = _('Restoring older revision. Any 
unsaved changes will be available in version history');
+  

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - test/Makefile.am test/UnitWOPIVersionRestore.cpp test/WopiTestServer.hpp

2018-02-15 Thread Pranav Kant
 test/Makefile.am|8 ++
 test/UnitWOPIVersionRestore.cpp |  119 
 test/WopiTestServer.hpp |3 +
 3 files changed, 128 insertions(+), 2 deletions(-)

New commits:
commit 61892b58eaa414c44ba9cc750cd4fc33c1be8d6e
Author: Pranav Kant 
Date:   Thu Feb 8 19:54:37 2018 +0530

versionrestore: unit test; checks if wsd saves a modified document

See comment for more details

Change-Id: If79537c4ca61926f06015ad6827a473d18a2a79f
(cherry picked from commit 5bd4d6781813e0a91edc527cb33b4d4eb0f84c2d)
Reviewed-on: https://gerrit.libreoffice.org/49755
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/test/Makefile.am b/test/Makefile.am
index 4808573a..1e5e16dc 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -17,7 +17,9 @@ noinst_LTLIBRARIES = \
unit-storage.la unit-client.la \
unit-admin.la unit-tilecache.la \
unit-fuzz.la unit-oob.la unit-oauth.la \
-   unit-wopi.la unit-wopi-saveas.la unit-wopi-ownertermination.la
+   unit-wopi.la unit-wopi-saveas.la \
+   unit-wopi-ownertermination.la unit-wopi-versionrestore.la
+
 
 MAGIC_TO_FORCE_SHLIB_CREATION = -rpath /dummy
 AM_LDFLAGS = -pthread -module $(MAGIC_TO_FORCE_SHLIB_CREATION) $(ZLIB_LIBS)
@@ -84,6 +86,8 @@ unit_wopi_saveas_la_SOURCES = UnitWOPISaveAs.cpp
 unit_wopi_saveas_la_LIBADD = $(CPPUNIT_LIBS)
 unit_wopi_ownertermination_la_SOURCES = UnitWopiOwnertermination.cpp
 unit_wopi_ownertermination_la_LIBADD = $(CPPUNIT_LIBS)
+unit_wopi_versionrestore_la_SOURCES = UnitWOPIVersionRestore.cpp
+unit_wopi_versionrestore_la_LIBADD = $(CPPUNIT_LIBS)
 
 if HAVE_LO_PATH
 SYSTEM_STAMP = @SYSTEMPLATE_PATH@/system_stamp
@@ -97,7 +101,7 @@ check-local:
./run_unit.sh --log-file test.log --trs-file test.trs
 # FIXME 2: unit-oob.la fails with symbol undefined:
 # UnitWSD::testHandleRequest(UnitWSD::TestRequest, UnitHTTPServerRequest&, 
UnitHTTPServerResponse&) ,
-TESTS = unit-prefork.la unit-tilecache.la unit-timeout.la unit-oauth.la 
unit-wopi.la unit-wopi-saveas.la unit-wopi-ownertermination.la
+TESTS = unit-prefork.la unit-tilecache.la unit-timeout.la unit-oauth.la 
unit-wopi.la unit-wopi-saveas.la unit-wopi-ownertermination.la 
unit-wopi-versionrestore.la
 # TESTS = unit-client.la
 # TESTS += unit-admin.la
 # TESTS += unit-storage.la
diff --git a/test/UnitWOPIVersionRestore.cpp b/test/UnitWOPIVersionRestore.cpp
new file mode 100644
index ..fb0c9400
--- /dev/null
+++ b/test/UnitWOPIVersionRestore.cpp
@@ -0,0 +1,119 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "config.h"
+
+#include "WopiTestServer.hpp"
+#include "Log.hpp"
+#include "Unit.hpp"
+#include "UnitHTTP.hpp"
+#include "helpers.hpp"
+
+#include 
+#include 
+#include 
+
+
+/*
+ * 1) Modifies a current document
+ * 2) Issue a version restore request
+ * 3) Wait for the ack from wsd
+ * 4) checks, after getting ack from wsd, if it saved our unsaved changes
+ */
+class UnitWOPIVersionRestore : public WopiTestServer
+{
+enum class Phase
+{
+Load,
+Modify,
+VersionRestoreRequest,
+VersionRestoreAck,
+Polling
+} _phase;
+
+bool _isDocumentSaved = false;
+
+public:
+UnitWOPIVersionRestore() :
+_phase(Phase::Load)
+{
+}
+
+void assertPutFileRequest(const Poco::Net::HTTPRequest& /*request*/) 
override
+{
+if (_phase == Phase::Polling)
+{
+_isDocumentSaved = true;
+}
+}
+
+bool filterSendMessage(const char* data, const size_t len, const WSOpCode 
/* code */, const bool /* flush */, int& /*unitReturn*/) override
+{
+std::string message(data, len);
+if (message == "close: versionrestore: prerestore_ack")
+{
+_phase = Phase::VersionRestoreAck;
+}
+
+return false;
+}
+
+void invokeTest() override
+{
+constexpr char testName[] = "UnitWOPIVersionRestore";
+
+switch (_phase)
+{
+case Phase::Load:
+{
+initWebsocket("/wopi/files/0?access_token=anything");
+
+helpers::sendTextFrame(*_ws->getLOOLWebSocket(), "load url=" + 
_wopiSrc, testName);
+
+_phase = Phase::Modify;
+break;
+}
+case Phase::Modify:
+{
+helpers::sendTextFrame(*_ws->getLOOLWebSocket(), "key 
type=input char=97 key=0", testName);
+helpers::sendTextFrame(*_ws->getLOOLWebSocket(), "key type=up 
char=0 key=512", testName);
+
+_phase = Phase::VersionRestoreRequest;
+SocketPoll:

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - test/WopiTestServer.hpp

2018-02-15 Thread Pranav Kant
 test/WopiTestServer.hpp |   13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 3181b25c35f5b26f8e582fc670fa0811b988
Author: Pranav Kant 
Date:   Thu Feb 8 20:15:47 2018 +0530

Try to act like a wopi test server bit more realistically

Change-Id: If10a65a3e7740a752057f63072f1ada1be3552e7
(cherry picked from commit cb0d65289907dca851c0a5386483b709c3dcd2df)
Reviewed-on: https://gerrit.libreoffice.org/49756
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/test/WopiTestServer.hpp b/test/WopiTestServer.hpp
index aea2..6efff2fb 100644
--- a/test/WopiTestServer.hpp
+++ b/test/WopiTestServer.hpp
@@ -34,6 +34,9 @@ protected:
 /// Content of the file.
 std::string _fileContent;
 
+/// Last modified time of the file
+Poco::Timestamp _fileLastModifiedTime;
+
 public:
 WopiTestServer(std::string fileContent = "Hello, world")
 : UnitWSD()
@@ -96,7 +99,7 @@ protected:
 fileInfo->set("UserFriendlyName", "test");
 fileInfo->set("UserCanWrite", "true");
 fileInfo->set("PostMessageOrigin", "localhost");
-fileInfo->set("LastModifiedTime", 
Poco::DateTimeFormatter::format(now, Poco::DateTimeFormat::ISO8601_FORMAT));
+fileInfo->set("LastModifiedTime", 
Poco::DateTimeFormatter::format(_fileLastModifiedTime, 
Poco::DateTimeFormat::ISO8601_FORMAT));
 fileInfo->set("EnableOwnerTermination", "true");
 
 std::ostringstream jsonStream;
@@ -107,7 +110,7 @@ protected:
 
 std::ostringstream oss;
 oss << "HTTP/1.1 200 OK\r\n"
-<< "Last-Modified: " << 
Poco::DateTimeFormatter::format(Poco::Timestamp(), 
Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
+<< "Last-Modified: " << 
Poco::DateTimeFormatter::format(_fileLastModifiedTime, 
Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
 << "User-Agent: " << WOPI_AGENT_STRING << "\r\n"
 << "Content-Length: " << responseString.size() << "\r\n"
 << "Content-Type: " << mimeType << "\r\n"
@@ -130,7 +133,7 @@ protected:
 
 std::ostringstream oss;
 oss << "HTTP/1.1 200 OK\r\n"
-<< "Last-Modified: " << 
Poco::DateTimeFormatter::format(Poco::Timestamp(), 
Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
+<< "Last-Modified: " << 
Poco::DateTimeFormatter::format(_fileLastModifiedTime, 
Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
 << "User-Agent: " << WOPI_AGENT_STRING << "\r\n"
 << "Content-Length: " << _fileContent.size() << "\r\n"
 << "Content-Type: " << mimeType << "\r\n"
@@ -155,7 +158,7 @@ protected:
 
 std::ostringstream oss;
 oss << "HTTP/1.1 200 OK\r\n"
-<< "Last-Modified: " << 
Poco::DateTimeFormatter::format(Poco::Timestamp(), 
Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
+<< "Last-Modified: " << 
Poco::DateTimeFormatter::format(_fileLastModifiedTime, 
Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
 << "User-Agent: " << WOPI_AGENT_STRING << "\r\n"
 << "Content-Length: " << content.size() << "\r\n"
 << "Content-Type: application/json\r\n"
@@ -175,7 +178,7 @@ protected:
 
 std::ostringstream oss;
 oss << "HTTP/1.1 200 OK\r\n"
-<< "Last-Modified: " << 
Poco::DateTimeFormatter::format(Poco::Timestamp(), 
Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
+<< "Last-Modified: " << 
Poco::DateTimeFormatter::format(_fileLastModifiedTime, 
Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
 << "User-Agent: " << WOPI_AGENT_STRING << "\r\n"
 << "\r\n";
 
___
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-3-0' - common/Unit.hpp net/Socket.hpp test/Makefile.am test/UnitWOPIDocumentConflict.cpp test/WopiTestServer.hpp wsd/LOOLWSD

2018-02-15 Thread Pranav Kant
 common/Unit.hpp   |4 -
 net/Socket.hpp|2 
 test/Makefile.am  |   10 ++
 test/UnitWOPIDocumentConflict.cpp |  136 ++
 test/WopiTestServer.hpp   |   40 ++-
 wsd/LOOLWSD.cpp   |2 
 6 files changed, 188 insertions(+), 6 deletions(-)

New commits:
commit 292186d1b66bd7077a9a28dc590f423bf550f3a8
Author: Pranav Kant 
Date:   Fri Feb 9 00:21:54 2018 +0530

document conflict: unit test

Change-Id: I4ea310fe5adb198bc7b5e083f6bd4b0431c0cdef
(cherry picked from commit 39f11ab4f7be708acc5e913d62e99321d8675357)
Reviewed-on: https://gerrit.libreoffice.org/49757
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/common/Unit.hpp b/common/Unit.hpp
index 97db1c39..5844cc3b 100644
--- a/common/Unit.hpp
+++ b/common/Unit.hpp
@@ -29,6 +29,8 @@ class WebSocketHandler;
 // Forward declaration to avoid pulling the world here.
 namespace Poco
 {
+class MemoryInputStream;
+
 namespace Net
 {
 class HTTPServerRequest;
@@ -117,7 +119,7 @@ public:
 }
 
 /// Custom response to a http request.
-virtual bool handleHttpRequest(const Poco::Net::HTTPRequest& /*request*/, 
std::shared_ptr& /*socket*/)
+virtual bool handleHttpRequest(const Poco::Net::HTTPRequest& /*request*/, 
Poco::MemoryInputStream& /*message*/,std::shared_ptr& /*socket*/)
 {
 return false;
 }
diff --git a/net/Socket.hpp b/net/Socket.hpp
index da34b5e3..7e5035b4 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -501,7 +501,7 @@ public:
 } while (rc == -1 && errno == EINTR);
 
 if (rc == -1 && errno != EAGAIN && errno != EWOULDBLOCK)
-LOG_SYS("wakeup socket #" << fd << " is closd at wakeup?");
+LOG_SYS("wakeup socket #" << fd << " is closed at wakeup?");
 }
 
 /// Wakeup the main polling loop in another thread
diff --git a/test/Makefile.am b/test/Makefile.am
index 1e5e16dc..81346fe0 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -18,7 +18,8 @@ noinst_LTLIBRARIES = \
unit-admin.la unit-tilecache.la \
unit-fuzz.la unit-oob.la unit-oauth.la \
unit-wopi.la unit-wopi-saveas.la \
-   unit-wopi-ownertermination.la unit-wopi-versionrestore.la
+   unit-wopi-ownertermination.la unit-wopi-versionrestore.la \
+   unit-wopi-documentconflict.la
 
 
 MAGIC_TO_FORCE_SHLIB_CREATION = -rpath /dummy
@@ -88,6 +89,8 @@ unit_wopi_ownertermination_la_SOURCES = 
UnitWopiOwnertermination.cpp
 unit_wopi_ownertermination_la_LIBADD = $(CPPUNIT_LIBS)
 unit_wopi_versionrestore_la_SOURCES = UnitWOPIVersionRestore.cpp
 unit_wopi_versionrestore_la_LIBADD = $(CPPUNIT_LIBS)
+unit_wopi_documentconflict_la_SOURCES = UnitWOPIDocumentConflict.cpp
+unit_wopi_documentconflict_la_LIBADD = $(CPPUNIT_LIBS)
 
 if HAVE_LO_PATH
 SYSTEM_STAMP = @SYSTEMPLATE_PATH@/system_stamp
@@ -101,7 +104,10 @@ check-local:
./run_unit.sh --log-file test.log --trs-file test.trs
 # FIXME 2: unit-oob.la fails with symbol undefined:
 # UnitWSD::testHandleRequest(UnitWSD::TestRequest, UnitHTTPServerRequest&, 
UnitHTTPServerResponse&) ,
-TESTS = unit-prefork.la unit-tilecache.la unit-timeout.la unit-oauth.la 
unit-wopi.la unit-wopi-saveas.la unit-wopi-ownertermination.la 
unit-wopi-versionrestore.la
+TESTS = unit-prefork.la unit-tilecache.la unit-timeout.la \
+unit-oauth.la unit-wopi.la unit-wopi-saveas.la \
+unit-wopi-ownertermination.la unit-wopi-versionrestore.la \
+unit-wopi-documentconflict.la
 # TESTS = unit-client.la
 # TESTS += unit-admin.la
 # TESTS += unit-storage.la
diff --git a/test/UnitWOPIDocumentConflict.cpp 
b/test/UnitWOPIDocumentConflict.cpp
new file mode 100644
index ..0b1cbb8e
--- /dev/null
+++ b/test/UnitWOPIDocumentConflict.cpp
@@ -0,0 +1,136 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "config.h"
+
+#include "WopiTestServer.hpp"
+#include "Log.hpp"
+#include "Unit.hpp"
+#include "UnitHTTP.hpp"
+#include "helpers.hpp"
+
+#include 
+#include 
+
+/**
+ * This test asserts that the unsaved changes in the opened document are
+ * discarded in case document is changed in storage behind our back. We don't
+ * want to overwrite the document which is in storage when the user asks us to
+ * do so.
+ */
+class UnitWOPIDocumentConflict : public WopiTestServer
+{
+enum class Phase
+{
+Load,
+ModifyAndChangeStorageDoc,
+LoadNewDocument,
+Polling
+} _phase;
+
+enum class DocLoaded
+{
+   Doc1,
+   Doc2
+} _docLoaded;
+
+const std::string _testName = "UnitWOPIDocumentConflict";
+
+pu

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - test/WopiTestServer.hpp

2018-02-15 Thread Pranav Kant
 test/WopiTestServer.hpp |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 8b83f0a1de17aa9f83ab62179a95a0035c6d3740
Author: Pranav Kant 
Date:   Fri Feb 9 01:14:18 2018 +0530

Unbreak some wopi tests; use fractional fractional iso8601

And we read the "LastModifiedTime" from the JSON payload in PutFile
response, not from the headers. Change that so that wsd now reads the
correct time.

Change-Id: Ic930ef4cfb2744367d04ba460fa1cbeb045b7356
(cherry picked from commit 40a56e31ddc6a470d81a410f102e41938516f043)
Reviewed-on: https://gerrit.libreoffice.org/49758
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/test/WopiTestServer.hpp b/test/WopiTestServer.hpp
index 651fef49..9cac0598 100644
--- a/test/WopiTestServer.hpp
+++ b/test/WopiTestServer.hpp
@@ -112,7 +112,7 @@ protected:
 fileInfo->set("UserFriendlyName", "test");
 fileInfo->set("UserCanWrite", "true");
 fileInfo->set("PostMessageOrigin", "localhost");
-fileInfo->set("LastModifiedTime", 
Poco::DateTimeFormatter::format(_fileLastModifiedTime, 
Poco::DateTimeFormat::ISO8601_FORMAT));
+fileInfo->set("LastModifiedTime", 
Poco::DateTimeFormatter::format(Poco::DateTime(_fileLastModifiedTime), 
Poco::DateTimeFormat::ISO8601_FRAC_FORMAT));
 fileInfo->set("EnableOwnerTermination", "true");
 
 std::ostringstream jsonStream;
@@ -190,6 +190,7 @@ protected:
 std::string wopiTimestamp = request.get("X-LOOL-WOPI-Timestamp");
 if (!wopiTimestamp.empty())
 {
+
 const std::string fileModifiedTime =
 
Poco::DateTimeFormatter::format(Poco::DateTime(_fileLastModifiedTime),
 
Poco::DateTimeFormat::ISO8601_FRAC_FORMAT);
@@ -199,7 +200,7 @@ protected:
 oss << "HTTP/1.1 409 Conflict\r\n"
 << "User-Agent: " << WOPI_AGENT_STRING << "\r\n"
 << "\r\n"
-<< "{\"LOOLStatusCode\":" << 
LOOLStatusCode::DocChanged << "}";
+<< "{\"LOOLStatusCode\":" << 
static_cast(LOOLStatusCode::DocChanged) << "}";
 
 socket->send(oss.str());
 socket->shutdown();
@@ -216,9 +217,9 @@ protected:
 
 std::ostringstream oss;
 oss << "HTTP/1.1 200 OK\r\n"
-<< "Last-Modified: " << 
Poco::DateTimeFormatter::format(_fileLastModifiedTime, 
Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
 << "User-Agent: " << WOPI_AGENT_STRING << "\r\n"
-<< "\r\n";
+<< "\r\n"
+<< "{\"LastModifiedTime\": \"" << 
Poco::DateTimeFormatter::format(_fileLastModifiedTime, 
Poco::DateTimeFormat::ISO8601_FRAC_FORMAT) << "\" }";
 
 socket->send(oss.str());
 socket->shutdown();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/comphelper

2018-02-15 Thread Tor Lillqvist
 include/comphelper/windowsdebugoutput.hxx |   37 +++---
 1 file changed, 34 insertions(+), 3 deletions(-)

New commits:
commit 032c49b98635f3cc787d90cb744fcc212405a833
Author: Tor Lillqvist 
Date:   Thu Feb 15 15:43:28 2018 +0200

Do what the TODO said

Change-Id: I6358b550482188c6fdaf0cd01af353850d12138b

diff --git a/include/comphelper/windowsdebugoutput.hxx 
b/include/comphelper/windowsdebugoutput.hxx
index 4e396db92715..28eaab810ff2 100644
--- a/include/comphelper/windowsdebugoutput.hxx
+++ b/include/comphelper/windowsdebugoutput.hxx
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #ifdef LIBO_INTERNAL_ONLY
 #include 
@@ -35,11 +36,41 @@ inline std::basic_ostream& 
operator<<(std::basic_ostream, 
wchar_t>().to_bytes(
 std::wstring(pRiid));
+
+DWORD nSize;
+if (RegGetValueW(HKEY_CLASSES_ROOT, 
std::wstring(L"CLSID\\").append(pRiid).data(), NULL,
+ RRF_RT_REG_SZ, NULL, NULL, &nSize)
+== ERROR_SUCCESS)
+{
+std::vector sValue(nSize / 2);
+if (RegGetValueW(HKEY_CLASSES_ROOT, 
std::wstring(L"CLSID\\").append(pRiid).data(), NULL,
+ RRF_RT_REG_SZ, NULL, sValue.data(), &nSize)
+== ERROR_SUCCESS)
+{
+stream << "=\""
+   << std::wstring_convert, 
wchar_t>().to_bytes(
+  std::wstring(sValue.data()))
+   << "\"";
+}
+}
+else if (RegGetValueW(HKEY_CLASSES_ROOT, 
std::wstring(L"Interface\\").append(pRiid).data(),
+  NULL, RRF_RT_REG_SZ, NULL, NULL, &nSize)
+ == ERROR_SUCCESS)
+{
+std::vector sValue(nSize / 2);
+if (RegGetValueW(HKEY_CLASSES_ROOT, 
std::wstring(L"Interface\\").append(pRiid).data(), NULL,
+ RRF_RT_REG_SZ, NULL, sValue.data(), &nSize)
+== ERROR_SUCCESS)
+{
+stream << "=\""
+   << std::wstring_convert, 
wchar_t>().to_bytes(
+  std::wstring(sValue.data()))
+   << "\"";
+}
+}
+
 CoTaskMemFree(pRiid);
 return stream;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Caolán McNamara
 sw/source/filter/ww8/ww8par3.cxx |   18 +-
 1 file changed, 13 insertions(+), 5 deletions(-)

New commits:
commit cc2c2bb8001d48d2909ec4d418634ba00652bcf0
Author: Caolán McNamara 
Date:   Thu Feb 15 09:16:08 2018 +

ofz#6368 Integer-overflow

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

diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index ed52e72b00d2..515a2aaec72b 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -44,6 +44,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -131,13 +132,20 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( 
WW8FieldDesc* pF, OUString& rStr )
 WW8_CP currentCP=pF->nSCode;
 WW8_CP currentLen=pF->nLen;
 
-sal_uInt16 bkmFindIdx;
-OUString aBookmarkFind=pB->GetBookmark(currentCP-1, 
currentCP+currentLen-1, bkmFindIdx);
+WW8_CP nEnd;
+if (o3tl::checked_add(currentCP, currentLen-1, nEnd)) {
+SAL_WARN("sw.ww8", "broken offset, ignoring");
+}
+else
+{
+sal_uInt16 bkmFindIdx;
+OUString aBookmarkFind=pB->GetBookmark(currentCP-1, nEnd, 
bkmFindIdx);
 
-if (!aBookmarkFind.isEmpty()) {
-pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark bookmark as 
consumed, such that tl'll not get inserted as a "normal" bookmark again
 if (!aBookmarkFind.isEmpty()) {
-aBookmarkName=aBookmarkFind;
+pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark bookmark as 
consumed, such that tl'll not get inserted as a "normal" bookmark again
+if (!aBookmarkFind.isEmpty()) {
+aBookmarkName=aBookmarkFind;
+}
 }
 }
 }
___
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-3-0' - favicon.ico

2018-02-15 Thread Andras Timar
 favicon.ico |binary
 1 file changed

New commits:
commit 64a16d0b06197f0407c6ff3fa74524a4722452dc
Author: Andras Timar 
Date:   Thu Feb 15 15:20:25 2018 +0100

Collabora's favicon

Change-Id: Id42815a6d8e18788cf2ecfcf86911d5169b935de

diff --git a/favicon.ico b/favicon.ico
index b890a56a..10c05577 100644
Binary files a/favicon.ico and b/favicon.ico differ
___
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-3-0' - bundled/include common/Protocol.cpp kit/ChildSession.cpp kit/ChildSession.hpp loleaflet/src test/WhiteBoxTests.cpp ws

2018-02-15 Thread Pranav Kant
 bundled/include/LibreOfficeKit/LibreOfficeKit.h  |5 +
 bundled/include/LibreOfficeKit/LibreOfficeKit.hxx|   11 
 bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h |   48 +--
 common/Protocol.cpp  |2 
 kit/ChildSession.cpp |   27 ++
 kit/ChildSession.hpp |1 
 loleaflet/src/map/handler/Map.Keyboard.js|   15 +++--
 test/WhiteBoxTests.cpp   |3 +
 wsd/ClientSession.cpp|1 
 9 files changed, 102 insertions(+), 11 deletions(-)

New commits:
commit e243ced8958759ee47d06567f3bfb72028fc8dc8
Author: Pranav Kant 
Date:   Thu Feb 8 00:00:45 2018 +0530

IME support

Dialogs still need to be adapted to this. Only works for documents as of
now.

Change-Id: I0fb1114e279a9e563943f3f65dd5a577523e9841
(cherry picked from commit ad1da235d3c7ac893fc7c0d0369b4b7b3ed29db6)
Reviewed-on: https://gerrit.libreoffice.org/49774
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h 
b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index 8ac97371..bb99e04a 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
@@ -289,6 +289,11 @@ struct _LibreOfficeKitDocumentClass
 /// @see lok::Document::setViewLanguage().
 void (*setViewLanguage) (LibreOfficeKitDocument* pThis, int nId, const 
char* language);
 
+/// @see lok::Document::postExtTextInputEvent
+void (*postExtTextInputEvent) (LibreOfficeKitDocument* pThis,
+   int nType,
+   const char* pText);
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
index d7fa22b7..c076c0f0 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -536,6 +536,17 @@ public:
 mpDoc->pClass->setViewLanguage(mpDoc, nId, language);
 }
 
+/**
+ * Post the text input from external input window, like IME
+ *
+ * @param nType see LibreOfficeKitExtTextInputType
+ * @param pText Text for LOK_EXT_TEXTINPUT
+ */
+void postExtTextInputEvent(int nType, const char* pText)
+{
+mpDoc->pClass->postExtTextInputEvent(mpDoc, nType, pText);
+}
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h 
b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
index f14ce4d3..ccbc3b96 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -267,6 +267,11 @@ typedef enum
 /**
  * The size and/or the position of the cell cursor changed.
  *
+ * Payload format: "x, y, width, height, column, row", where the first
+ * 4 numbers are document coordinates, in twips, and the last 2 are table
+ * coordinates starting from 0.
+ * When the cursor is not shown the payload format is the "EMPTY" string.
+ *
  * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
  */
 LOK_CALLBACK_CELL_CURSOR = 17,
@@ -509,11 +514,12 @@ typedef enum
  * The column/row header is no more valid because of a column/row insertion
  * or a similar event. Clients must query a new column/row header set.
  *
- * The payload says if we are invalidating a row or column header.
+ * The payload says if we are invalidating a row or column header. So,
+ * payload values can be: "row", "column", "all".
  */
 LOK_CALLBACK_INVALIDATE_HEADER = 33,
 /**
- * The text content of the address field in Calc.
+ * The text content of the address field in Calc. Eg: "A7"
  */
 LOK_CALLBACK_CELL_ADDRESS = 34,
 /**
@@ -534,7 +540,32 @@ typedef enum
  */
 LOK_CALLBACK_RULER_UPDATE = 35,
 /**
- * Dialog invalidation
+ * Window related callbacks are emitted under this category. It includes
+ * external windows like dialogs, autopopups for now.
+ *
+ * The payload format is:
+ *
+ * {
+ *"id": "unique integer id of the dialog",
+ *"action": "",
+ *"type": ""
+ *"rectangle": "x, y, width, height"
+ * }
+ *
+ * "type" tells the type of the window the action is associated with
+ *  - "dialog" - window is a dialog
+ *  - "child" - window is a floating window (combo boxes, etc.)
+ *
+ * "action" can take following values:
+ * - "created" - window is created in the backend, client can render it now
+ * - "title_changed" - window's title is changed
+ * - "size_changed" - window's size is changed
+ * - "invalidate"

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - loleaflet/dist loleaflet/src

2018-02-15 Thread Pranav Kant
 loleaflet/dist/leaflet.css|4 ++--
 loleaflet/src/layer/tile/TileLayer.js |5 +
 loleaflet/src/map/Map.js  |3 ++-
 3 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 33665347bc3ade2d977ce40b5927f7f48d0538df
Author: Pranav Kant 
Date:   Thu Feb 8 15:04:29 2018 +0530

Move the IME candidate window with cursor position

Change-Id: I7b37b0c4981b4ebcefb7606915711ca2adec3c31
(cherry picked from commit 1e91799663945fdfde84385bcfbb96fd03c6fe2e)
Reviewed-on: https://gerrit.libreoffice.org/49775
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css
index c324ebfd..b2bf8115 100644
--- a/loleaflet/dist/leaflet.css
+++ b/loleaflet/dist/leaflet.css
@@ -679,7 +679,7 @@ div.leaflet-cursor-container:hover > .leaflet-cursor-header 
{
 }
 
 .clipboard-container {
-   position: fixed;
+   position: absolute;
left: 0px;
top: 0px;
width: 0px;
@@ -863,4 +863,4 @@ div.leaflet-cursor-container:hover > .leaflet-cursor-header 
{
border-radius: 2px;
top: 24px;
color: white;
-   }
\ No newline at end of file
+   }
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 0ac34006..a4b95dbc 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1438,6 +1438,11 @@ L.TileLayer = L.GridLayer.extend({
this._cursorMarker.setLatLng(cursorPos, 
pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom(;
}
this._map.addLayer(this._cursorMarker);
+
+   // move the hidden input field with the cursor
+   var clipContainer = 
L.DomUtil.get('doc-clipboard-container');
+   var pos = 
this._map.latLngToLayerPoint(L.latLng(cursorPos)).round();
+   L.DomUtil.setPosition(clipContainer, pos);
}
else if (this._cursorMarker) {
this._map.removeLayer(this._cursorMarker);
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 10f5acfd..ad092edc 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -692,7 +692,8 @@ L.Map = L.Evented.extend({
throw new Error('Map container is already 
initialized.');
}
 
-   var textAreaContainer = L.DomUtil.create('div', 
'clipboard-container', container.parentElement);
+   var textAreaContainer = L.DomUtil.create('div', 
'clipboard-container', container);
+   textAreaContainer.id = 'doc-clipboard-container';
this._textArea = L.DomUtil.create('input', 'clipboard', 
textAreaContainer);
this._textArea.setAttribute('type', 'text');
this._textArea.setAttribute('autocorrect', 'off');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Thorsten Behrens
 vcl/unx/gtk/gtkinst.cxx |4 +++-
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx |2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit d1b3455cfb4fcd438f3f29d8c14bb0f04423b8ad
Author: Thorsten Behrens 
Date:   Thu Feb 15 14:01:01 2018 +0100

gtk3_kde5: advertise vcl plugin correctly in about dialog

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

diff --git a/vcl/unx/gtk/gtkinst.cxx b/vcl/unx/gtk/gtkinst.cxx
index 959e387633ec..1d3dbf2f0294 100644
--- a/vcl/unx/gtk/gtkinst.cxx
+++ b/vcl/unx/gtk/gtkinst.cxx
@@ -179,7 +179,9 @@ void GtkInstance::EnsureInit()
 
 ImplSVData* pSVData = ImplGetSVData();
 delete pSVData->maAppData.mpToolkitName;
-#if GTK_CHECK_VERSION(3,0,0)
+#ifdef GTK_TOOLKIT_NAME
+pSVData->maAppData.mpToolkitName = new OUString(GTK_TOOLKIT_NAME);
+#elif GTK_CHECK_VERSION(3,0,0)
 pSVData->maAppData.mpToolkitName = new OUString("gtk3");
 #else
 pSVData->maAppData.mpToolkitName = new OUString("gtk2");
diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx
index d3f797ce9234..e25ec8b0ec9f 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+// make gtk3 plug advertise correctly as kde5 hybrid
+#define GTK_TOOLKIT_NAME "gtk3_kde5"
 #include "../gtk3/gtk3gtkinst.cxx"
 
 #include "gtk3_kde5_filepicker.hxx"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - vcl/unx

2018-02-15 Thread Thorsten Behrens
 vcl/unx/gtk/gtkinst.cxx |4 +++-
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx |2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 5c81db553106fd7bb97b8fa74783cbab292d7db2
Author: Thorsten Behrens 
Date:   Thu Feb 15 14:01:01 2018 +0100

gtk3_kde5: advertise vcl plugin correctly in about dialog

Change-Id: Icfe977f7f9750003d992d795cad8cd86d7055e59
Reviewed-on: https://gerrit.libreoffice.org/49813
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 
(cherry picked from commit d1b3455cfb4fcd438f3f29d8c14bb0f04423b8ad)
Reviewed-on: https://gerrit.libreoffice.org/49820

diff --git a/vcl/unx/gtk/gtkinst.cxx b/vcl/unx/gtk/gtkinst.cxx
index ac3bdef63890..3c4246538569 100644
--- a/vcl/unx/gtk/gtkinst.cxx
+++ b/vcl/unx/gtk/gtkinst.cxx
@@ -190,7 +190,9 @@ void GtkInstance::EnsureInit()
 
 ImplSVData* pSVData = ImplGetSVData();
 delete pSVData->maAppData.mpToolkitName;
-#if GTK_CHECK_VERSION(3,0,0)
+#ifdef GTK_TOOLKIT_NAME
+pSVData->maAppData.mpToolkitName = new OUString(GTK_TOOLKIT_NAME);
+#elif GTK_CHECK_VERSION(3,0,0)
 pSVData->maAppData.mpToolkitName = new OUString("gtk3");
 #else
 pSVData->maAppData.mpToolkitName = new OUString("gtk2");
diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx
index d3f797ce9234..e25ec8b0ec9f 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+// make gtk3 plug advertise correctly as kde5 hybrid
+#define GTK_TOOLKIT_NAME "gtk3_kde5"
 #include "../gtk3/gtk3gtkinst.cxx"
 
 #include "gtk3_kde5_filepicker.hxx"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Caolán McNamara
 sw/source/filter/ww8/ww8scan.cxx |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 89e9f4984d0dfbc2b69a04e59abc1a3a5d69a0c1
Author: Caolán McNamara 
Date:   Thu Feb 15 09:12:40 2018 +

ofz#6366 Integer-overflow

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

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index b88e56badd9d..b64d1b7bc616 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -1465,11 +1465,15 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
 bIsUnicode = m_pWw8Fib->m_fExtChar;
 }
 
-sal_Int32 nLen = nCpEnd - nCpStart;
+sal_Int32 nLen;
+if (o3tl::checked_sub(nCpEnd, nCpStart, nLen))
+{
+SAL_WARN("sw.ww8", "broken offset, ignoring");
+return WW8_CP_MAX;
+}
 if (bIsUnicode)
 {
-bool bFail = o3tl::checked_multiply(nLen, 2, nLen);
-if (bFail)
+if (o3tl::checked_multiply(nLen, 2, nLen))
 {
 SAL_WARN("sw.ww8", "broken offset, ignoring");
 return WW8_CP_MAX;
___
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-3-0' - loleaflet/src

2018-02-15 Thread Pranav Kant
 loleaflet/src/layer/tile/TileLayer.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6b6bb753ff532d88addbf7ce9a90191455947dd0
Author: Pranav Kant 
Date:   Fri Feb 9 15:06:06 2018 +0530

loleaflet: IME candidate window pos should be wrt container, not layer

Change-Id: I362fb414d114d64650a6c6ec466d066ea815b333
(cherry picked from commit 2a8159ad759e1eab4b6dfb8d898029a1d16059f4)
Reviewed-on: https://gerrit.libreoffice.org/49776
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index a4b95dbc..7072a848 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1441,7 +1441,7 @@ L.TileLayer = L.GridLayer.extend({
 
// move the hidden input field with the cursor
var clipContainer = 
L.DomUtil.get('doc-clipboard-container');
-   var pos = 
this._map.latLngToLayerPoint(L.latLng(cursorPos)).round();
+   var pos = 
this._map.latLngToContainerPoint(L.latLng(cursorPos)).round();
L.DomUtil.setPosition(clipContainer, pos);
}
else if (this._cursorMarker) {
___
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

2018-02-15 Thread Caolán McNamara
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |4 ++--
 vcl/source/gdi/pdfwriter_impl.cxx  |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c4b23192b4ab1f3ea75df7e48da36b6b17de248b
Author: Caolán McNamara 
Date:   Tue Feb 13 12:28:53 2018 +

tdf#96892 3 to 5 digit precision

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

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index cb03680a4703..5aadf9fe3d4f 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -732,14 +732,14 @@ void PdfExportTest::testTdf108963()
 CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_LINETO, 
FPDFPathSegment_GetType(pSegment));
 FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
 CPPUNIT_ASSERT_EQUAL(275102, static_cast(round(fX * 1000)));
-CPPUNIT_ASSERT_EQUAL(267590, static_cast(round(fY * 1000)));
+CPPUNIT_ASSERT_EQUAL(267591, static_cast(round(fY * 1000)));
 CPPUNIT_ASSERT(!FPDFPathSegment_GetClose(pSegment));
 
 pSegment = FPDFPath_GetPathSegment(pPdfPageObject, 2);
 CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_LINETO, 
FPDFPathSegment_GetType(pSegment));
 FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
 CPPUNIT_ASSERT_EQUAL(287518, static_cast(round(fX * 1000)));
-CPPUNIT_ASSERT_EQUAL(251801, static_cast(round(fY * 1000)));
+CPPUNIT_ASSERT_EQUAL(251802, static_cast(round(fY * 1000)));
 CPPUNIT_ASSERT(!FPDFPathSegment_GetClose(pSegment));
 
 pSegment = FPDFPath_GetPathSegment(pPdfPageObject, 3);
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index fcb30130d3c4..dd8aebb49a24 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -505,8 +505,8 @@ void doTestCode()
 }
 #endif
 
-static const sal_Int32 nLog10Divisor = 3;
-static const double fDivisor = 1000.0;
+static const sal_Int32 nLog10Divisor = 5;
+static const double fDivisor = 10.0;
 
 static inline double pixelToPoint( double px ) { return px/fDivisor; }
 static inline sal_Int32 pointToPixel( double pt ) { return 
sal_Int32(pt*fDivisor); }
___
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-3-0' - kit/ChildSession.cpp loleaflet/src

2018-02-15 Thread Pranav Kant
 kit/ChildSession.cpp   |   12 +++-
 loleaflet/src/control/Control.LokDialog.js |   21 -
 loleaflet/src/layer/tile/TileLayer.js  |5 +
 loleaflet/src/map/handler/Map.Keyboard.js  |   28 +++-
 4 files changed, 43 insertions(+), 23 deletions(-)

New commits:
commit 9a063c72613c2d5448e457c2ded9e0e82266fcd4
Author: Pranav Kant 
Date:   Tue Feb 13 23:05:54 2018 +0530

Adapt to IME API changes; better reuse of Map's key handler

Change-Id: I670243ea155ac698c694531d3fc16a574f418bf4
(cherry picked from commit 6d4f02ac2aff539132e66bce237ed4b6c20cc43f)
Reviewed-on: https://gerrit.libreoffice.org/49777
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 655eae1e..c98bbe48 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -771,13 +771,15 @@ bool ChildSession::insertFile(const char* /*buffer*/, int 
/*length*/, const std:
 bool ChildSession::extTextInputEvent(const char* /*buffer*/, int /*length*/,
  const std::vector& tokens)
 {
-int type;
+int id, type;
 std::string text;
-if (tokens.size() < 3 ||
-!getTokenKeyword(tokens[1], "type",
+if (tokens.size() < 4 ||
+!getTokenInteger(tokens[1], "id", id) || id < 0 ||
+!getTokenKeyword(tokens[2], "type",
 {{"input", LOK_EXT_TEXTINPUT}, {"end", 
LOK_EXT_TEXTINPUT_END}},
  type) ||
-!getTokenString(tokens[2], "text", text))
+!getTokenString(tokens[3], "text", text))
+
 {
 sendTextFrame("error: cmd=" + std::string(tokens[0]) + " kind=syntax");
 return false;
@@ -785,7 +787,7 @@ bool ChildSession::extTextInputEvent(const char* 
/*buffer*/, int /*length*/,
 
 std::unique_lock lock(_docManager.getDocumentMutex());
 getLOKitDocument()->setView(_viewId);
-getLOKitDocument()->postExtTextInputEvent(type, text.c_str());
+getLOKitDocument()->postExtTextInputEvent(id, type, text.c_str());
 
 return true;
 }
diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index ae9b712c..d30e2411 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -231,11 +231,18 @@ L.Control.LokDialog = L.Control.extend({
var lokEventType = e.type.replace('mouse', 'button');
this._postWindowMouseEvent(lokEventType, 
this._toRawDlgId(strDlgId), e.offsetX, e.offsetY, 1, buttons, 0);
}, this);
-   L.DomEvent.on(dialogCanvas, 'keyup keypress keydown', 
function(e) {
-   // _onKeyDown fn below requires this kind of structure 
but leaflet DomEvent.on doesn't pass it
-   e.originalEvent = e;
-   map['keyboard']._onKeyDown(e, 
L.bind(this._postWindowKeyboardEvent, this, this._toRawDlgId(strDlgId)));
-   }, this);
+   L.DomEvent.on(dialogCanvas,
+ 'keyup keypress keydown compositionstart 
compositionupdate compositionend',
+ function(e) {
+ e.originalEvent = e; // _onKeyDown fn 
below requires real event in e.originalEvent
+ var fn = this._postWindowKeyboardEvent;
+ if (e.type.startsWith('composition')) {
+ fn = 
this._postWindowCompositionEvent;
+ }
+ map['keyboard']._onKeyDown(e, L.bind(fn,
+  this,
+  
this._toRawDlgId(strDlgId)));
+ }, this);
L.DomEvent.on(dialogCanvas, 'contextmenu', function() {
return false;
});
@@ -243,6 +250,10 @@ L.Control.LokDialog = L.Control.extend({
this._launchDialogCursor(strDlgId);
},
 
+   _postWindowCompositionEvent: function(winid, type, text) {
+   this._map._docLayer._postCompositionEvent(winid, type, text);
+   },
+
_postWindowMouseEvent: function(type, winid, x, y, count, buttons, 
modifier) {
this._map._socket.sendMessage('windowmouse id=' + winid +  ' 
type=' + type +
  ' x=' + x + ' y=' + y + ' count=' 
+ count +
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 7072a848..8e36d7ab 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1372,6 +1372,11 @@ L.TileLayer = L.GridLayer.extend({
' char=' + charcode + ' key=' + keycode

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

2018-02-15 Thread Pranav Kant
 loleaflet/src/control/Control.LokDialog.js |   92 ++---
 loleaflet/src/map/handler/Map.Keyboard.js  |9 +-
 2 files changed, 76 insertions(+), 25 deletions(-)

New commits:
commit 8227c6853a4f0b59a84d61ddd537f79232f868dc
Author: Pranav Kant 
Date:   Wed Feb 14 18:11:31 2018 +0530

Use real input element for user input instead of canvas

This allows moving the IME candidate window according to where the
cursor in the lok dialog is.

Change-Id: Icf17f1fc1d3f6af619c8e0037c32109d2b4721fc
(cherry picked from commit 199b582e06a3234a1803553bf5be88c4d462ffc6)
Reviewed-on: https://gerrit.libreoffice.org/49778
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index d30e2411..7b43848b 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -2,7 +2,7 @@
  * L.Control.LokDialog used for displaying LOK dialogs
  */
 
-/* global vex $ map */
+/* global vex $ map L */
 L.Control.LokDialog = L.Control.extend({
 
dialogIdPrefix: 'lokdialog-',
@@ -145,12 +145,7 @@ L.Control.LokDialog = L.Control.extend({
var y = parseInt(rectangle[1]);
var height = parseInt(rectangle[3]);
 
-   var dialogCursor = L.DomUtil.get(strDlgId + 
'-cursor');
-   L.DomUtil.setStyle(dialogCursor, 'height', 
height + 'px');
-   L.DomUtil.setStyle(dialogCursor, 'display', 
this._dialogs[e.id].cursorVisible ? 'block' : 'none');
-   // set the position of the cursor container 
element
-   L.DomUtil.setStyle(this._dialogs[e.id].cursor, 
'left', x + 'px');
-   L.DomUtil.setStyle(this._dialogs[e.id].cursor, 
'top', y + 'px');
+   this._updateDialogCursor(e.id, x, y, height);
}
} else if (e.action === 'title_changed') {
if (e.title && this._dialogs[parseInt(e.id)]) {
@@ -174,7 +169,20 @@ L.Control.LokDialog = L.Control.extend({
this._map.sendUnoCommand(e.uno);
},
 
-   _launchDialogCursor: function(dialogId) {
+   _updateDialogCursor: function(dlgId, x, y, height) {
+   var strDlgId = this._toDlgPrefix(dlgId);
+   var dialogCursor = L.DomUtil.get(strDlgId + '-cursor');
+   L.DomUtil.setStyle(dialogCursor, 'height', height + 'px');
+   L.DomUtil.setStyle(dialogCursor, 'display', 
this._dialogs[dlgId].cursorVisible ? 'block' : 'none');
+   // set the position of the cursor container element
+   L.DomUtil.setStyle(this._dialogs[dlgId].cursor, 'left', x + 
'px');
+   L.DomUtil.setStyle(this._dialogs[dlgId].cursor, 'top', y + 
'px');
+
+   // update the input as well
+   this._updateDialogInput(dlgId);
+   },
+
+   _createDialogCursor: function(dialogId) {
var id = this._toRawDlgId(dialogId);
this._dialogs[id].cursor = L.DomUtil.create('div', 
'leaflet-cursor-container', L.DomUtil.get(dialogId));
var cursor = L.DomUtil.create('div', 'leaflet-cursor 
lokdialog-cursor', this._dialogs[id].cursor);
@@ -182,6 +190,39 @@ L.Control.LokDialog = L.Control.extend({
L.DomUtil.addClass(cursor, 'blinking-cursor');
},
 
+   _createDialogInput: function(dialogId) {
+   var id = this._toRawDlgId(dialogId);
+   var clipDlgContainer = L.DomUtil.create('div', 
'clipboard-container', L.DomUtil.get(dialogId));
+   clipDlgContainer.id = dialogId + '-clipboard-container';
+   var dlgTextArea = L.DomUtil.create('input', 'clipboard', 
clipDlgContainer);
+   dlgTextArea.setAttribute('type', 'text');
+   dlgTextArea.setAttribute('autocorrect', 'off');
+   dlgTextArea.setAttribute('autocapitalize', 'off');
+   dlgTextArea.setAttribute('autocomplete', 'off');
+   dlgTextArea.setAttribute('spellcheck', 'false');
+   this._dialogs[id].input = dlgTextArea;
+
+   return dlgTextArea;
+   },
+
+   _updateDialogInput: function(dlgId) {
+   if (!this._dialogs[dlgId].input)
+   return;
+
+   var strDlgId = this._toDlgPrefix(dlgId);
+   var left = 
parseInt(L.DomUtil.getStyle(this._dialogs[dlgId].cursor, 'left'));
+   var top = 
parseInt(L.DomUtil.getStyle(this._dialogs[dlgId].cursor, 'top'));
+   var dlgContainer = L.DomUtil.get(strDlgId + 
'-clipboard-container');
+   L.DomUtil.setPosition(dlgContainer, new L.Point(left, top));
+   },
+
+   focus: function(dlgId) {
+   if (!this._isOpen(

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - loleaflet/dist

2018-02-15 Thread Pranav Kant
 loleaflet/dist/toolbar/toolbar.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 72ea966c271129ce3e776e707ca8258b37fe9c99
Author: Pranav Kant 
Date:   Thu Feb 15 13:23:20 2018 +0530

loleaflet: Hide items from correct toolbar

Change-Id: I3020f01d693ad2f99202f8a99a7efb9eadc25158
(cherry picked from commit 11673e589d1faaea2d84288eeb958ac5c793e824)
Reviewed-on: https://gerrit.libreoffice.org/49800
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index d9f5da21..db7e9b67 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -57,7 +57,7 @@ function _mobilify() {
}
for (itemIdx in toolbarUpMore.items) {
id = toolbarUpMore.items[itemIdx].id;
-   if (toolbarUpMobileItems.indexOf(id) === -1 && 
toolbarUp.get(id) && !toolbarUp.get(id).hidden) {
+   if (toolbarUpMobileItems.indexOf(id) === -1 && 
toolbarUpMore.get(id) && !toolbarUpMore.get(id).hidden) {
toolbarUpMore.hide(id);
}
}
___
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-3-0' - loleaflet/dist

2018-02-15 Thread Aditya Dewan
 loleaflet/dist/toolbar.css|3 ++-
 loleaflet/dist/toolbar/toolbar.js |4 
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 093dd959f0737cb060e1a99fdf274b0be051982d
Author: Aditya Dewan 
Date:   Sat Dec 16 02:15:35 2017 +0530

show/hide of document name on top right

Change-Id: I83ae0256c0fdd1c9f61495638ecf9d69f5473790
Reviewed-on: https://gerrit.libreoffice.org/46576
Reviewed-by: pranavk 
Tested-by: pranavk 
(cherry picked from commit 30b44bf37349f9a0d42182f018f377d6d3ce9066)
(cherry picked from commit 49bbe4367ff65264677e05ca1fa0744d7b8c90b3)
Reviewed-on: https://gerrit.libreoffice.org/48376
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css
index 6564ae95..a00694d7 100644
--- a/loleaflet/dist/toolbar.css
+++ b/loleaflet/dist/toolbar.css
@@ -79,7 +79,7 @@
 top: 2px;
 width: 200px;
 font-size: 16px;
-//font-weight: bold;
+padding-right: 20px;
 border: 1px solid transparent;
 background-color: transparent;
 }
@@ -95,6 +95,7 @@
 background-image: url('../images/lc_editdoc.svg');
 background-position: right;
 background-repeat: no-repeat;
+padding-right: 20px;
 }
 
 #closebuttonwrapper {
diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index db7e9b67..d083e4d6 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -73,6 +73,8 @@ function _mobilify() {
oneUser = '1';
noUser = '0';
updateUserListCount();
+
+   $('#document-name-input').hide();
 }
 
 function _unmobilify() {
@@ -104,6 +106,8 @@ function _unmobilify() {
oneUser = _('1 user');
noUser = _('0 users');
updateUserListCount();
+
+   $('#document-name-input').show();
 }
 
 function resizeToolbar() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Makefile.am robots.txt wsd/LOOLWSD.cpp

2018-02-15 Thread Andras Timar
 Makefile.am |4 +---
 robots.txt  |2 --
 wsd/LOOLWSD.cpp |   29 +
 3 files changed, 30 insertions(+), 5 deletions(-)

New commits:
commit 8aa4a5145cafb7579105caafee4c127c97a010a4
Author: Andras Timar 
Date:   Thu Feb 15 15:17:32 2018 +0100

wsd: handle request for robots.txt

Change-Id: Ib82db2ee8c878e6a61b62b49ceaeb72e2d05718d
Reviewed-on: https://gerrit.libreoffice.org/49819
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/Makefile.am b/Makefile.am
index 542f8d53..6e6a847d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,8 +14,7 @@ dist_doc_DATA = wsd/README \
 loolwsddatadir = @LOOLWSD_DATADIR@
 
 loolwsddata_DATA = discovery.xml \
-   favicon.ico \
-   robots.txt
+   favicon.ico
 
 loolwsdconfigdir = @LOOLWSD_CONFIGDIR@
 
@@ -208,7 +207,6 @@ EXTRA_DIST = discovery.xml \
  loolwsd.spec \
  loolwsd.xml.in \
  loolwsd.service \
- robots.txt \
  sysconfig.loolwsd \
  debian/compat \
  debian/copyright \
diff --git a/robots.txt b/robots.txt
deleted file mode 100644
index 1f53798b..
--- a/robots.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-User-agent: *
-Disallow: /
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 97c0953f..e052462e 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1829,6 +1829,10 @@ private:
 {
 handleWopiDiscoveryRequest(request);
 }
+else if (request.getMethod() == HTTPRequest::HTTP_GET && 
request.getURI() == "/robots.txt")
+{
+handleRobotsTxtRequest(request);
+}
 else
 {
 StringTokenizer reqPathTokens(request.getURI(), "/?", 
StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
@@ -1964,6 +1968,31 @@ private:
 LOG_INF("Sent discovery.xml successfully.");
 }
 
+void handleRobotsTxtRequest(const Poco::Net::HTTPRequest& request)
+{
+LOG_DBG("HTTP request: " << request.getURI());
+const std::string mimeType = "text/plain";
+const std::string responseString = "User-agent: *\nDisallow: /\n";
+
+std::ostringstream oss;
+oss << "HTTP/1.1 200 OK\r\n"
+<< "Last-Modified: " << 
Poco::DateTimeFormatter::format(Poco::Timestamp(), 
Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
+<< "User-Agent: " << WOPI_AGENT_STRING << "\r\n"
+<< "Content-Length: " << responseString.size() << "\r\n"
+<< "Content-Type: " << mimeType << "\r\n"
+<< "\r\n";
+
+if (request.getMethod() == Poco::Net::HTTPRequest::HTTP_GET)
+{
+oss << responseString;
+}
+
+std::shared_ptr socket = _socket.lock();
+socket->send(oss.str());
+socket->shutdown();
+LOG_INF("Sent robots.txt response successfully.");
+}
+
 static std::string getContentType(const std::string& fileName)
 {
 const std::string nodePath = Poco::format("//[@ext='%s']", 
Poco::Path(fileName).getExtension());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Samuel Thibault license statement

2018-02-15 Thread Samuel Thibault
Hello,

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

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


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

2018-02-15 Thread Michael Stahl
 sw/inc/unoframe.hxx |2 +-
 sw/source/core/unocore/unoframe.cxx |9 +++--
 2 files changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 0310430ed0455418cfe85e150f14496aff724897
Author: Michael Stahl 
Date:   Wed Feb 14 14:43:04 2018 +0100

sw: replace DELETEZ with unique_ptr in SwXFrame

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

diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx
index f913fb708cd2..de5c9b8ac71a 100644
--- a/sw/inc/unoframe.hxx
+++ b/sw/inc/unoframe.hxx
@@ -71,7 +71,7 @@ private:
 bool bIsDescriptor;
 OUStringm_sName;
 
-SwPaM*  m_pCopySource;
+std::unique_ptr  m_pCopySource;
 
 sal_Int64   m_nDrawAspect;
 
diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index 9b886f7e1682..0ab6c8c26aa1 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1199,7 +1199,6 @@ SwXFrame::SwXFrame(FlyCntType eSet, const 
::SfxItemPropertySet* pSet, SwDoc *pDo
 , m_pDoc(pDoc)
 , eType(eSet)
 , bIsDescriptor(true)
-, m_pCopySource(nullptr)
 , m_nDrawAspect(embed::Aspects::MSOLE_CONTENT)
 {
 // Register ourselves as a listener to the document (via the page 
descriptor)
@@ -1253,7 +1252,6 @@ SwXFrame::SwXFrame(SwFrameFormat& rFrameFormat, 
FlyCntType eSet, const ::SfxItem
 , m_pDoc(nullptr)
 , eType(eSet)
 , bIsDescriptor(false)
-, m_pCopySource(nullptr)
 , m_nDrawAspect(embed::Aspects::MSOLE_CONTENT)
 {
 }
@@ -1261,7 +1259,7 @@ SwXFrame::SwXFrame(SwFrameFormat& rFrameFormat, 
FlyCntType eSet, const ::SfxItem
 SwXFrame::~SwXFrame()
 {
 SolarMutexGuard aGuard;
-delete m_pCopySource;
+m_pCopySource.reset();
 m_pProps.reset();
 EndListeningAll();
 }
@@ -1352,8 +1350,7 @@ uno::Reference< beans::XPropertySetInfo >  
SwXFrame::getPropertySetInfo()
 
 void SwXFrame::SetSelection(SwPaM& rCopySource)
 {
-delete m_pCopySource;
-m_pCopySource = new SwPaM( *rCopySource.Start() );
+m_pCopySource.reset(new SwPaM(*rCopySource.Start()));
 m_pCopySource->SetMark();
 *m_pCopySource->GetMark() = *rCopySource.End();
 }
@@ -2785,7 +2782,7 @@ void SwXFrame::attachToRange(const uno::Reference< 
text::XTextRange > & xTextRan
 pDoc->SetFlyFrameAttr( *pFormat, aAnchorSet );
 delete pAnchorItem;
 }
-DELETEZ( m_pCopySource );
+m_pCopySource.reset();
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread jan Iversen
 bridges/Library_cpp_uno.mk|2 
 bridges/source/cpp_uno/gcc3_ios/abi.cxx   |  328 --
 bridges/source/cpp_uno/gcc3_ios/abi.hxx   |   61 ---
 bridges/source/cpp_uno/gcc3_ios/call.cxx  |   78 
 bridges/source/cpp_uno/gcc3_ios/call.hxx  |   37 --
 bridges/source/cpp_uno/gcc3_ios/callvirtualmethod.cxx |  180 -
 bridges/source/cpp_uno/gcc3_ios/callvirtualmethod.hxx |   40 --
 7 files changed, 1 insertion(+), 725 deletions(-)

New commits:
commit 9a62dcf333b2e9b470d5aa1b5c2ddaae6732ad32
Author: jan Iversen 
Date:   Thu Feb 15 15:55:30 2018 +0100

iOS, reduce arm64 files to actually needed

Still comparing the "old" gcc3_ios_arm with the new one, in order to make
the asm code work.

Change-Id: I3a2fdfc1891a6a4d7065917f5ef8bd19c49b3987

diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index 73744d2d682c..51eaa5624788 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -24,7 +24,7 @@ endif
 else ifeq ($(CPUNAME),ARM64)
 
 bridges_SELECTED_BRIDGE := gcc3_ios
-bridge_noopt_objects := abi call callvirtualmethod cpp2uno except uno2cpp
+bridge_noopt_objects := cpp2uno except uno2cpp
 bridge_asm_objects := ios64_helper
 
 else ifeq ($(CPUNAME),AARCH64)
diff --git a/bridges/source/cpp_uno/gcc3_ios/abi.cxx 
b/bridges/source/cpp_uno/gcc3_ios/abi.cxx
deleted file mode 100644
index 042a857bae32..
--- a/bridges/source/cpp_uno/gcc3_ios/abi.cxx
+++ /dev/null
@@ -1,328 +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 .
- */
-#ifdef __x86_64
-
-// This is an implementation of the x86-64 ABI as described in 'System V
-// Application Binary Interface, AMD64 Architecture Processor Supplement'
-// (http://www.x86-64.org/documentation/abi-0.95.pdf)
-//
-// The code in this file is a modification of src/x86/ffi64.c from libffi
-// (http://sources.redhat.com/libffi/) which is under the following license:
-
-/* ---
-   ffi.c - Copyright (c) 2002  Bo Thorsen 
-
-   x86-64 Foreign Function Interface
-
-   Permission is hereby granted, free of charge, to any person obtaining
-   a copy of this software and associated documentation files (the
-   ``Software''), to deal in the Software without restriction, including
-   without limitation the rights to use, copy, modify, merge, publish,
-   distribute, sublicense, and/or sell copies of the Software, and to
-   permit persons to whom the Software is furnished to do so, subject to
-   the following conditions:
-
-   The above copyright notice and this permission notice shall be included
-   in all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
-   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-   IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-   OTHER DEALINGS IN THE SOFTWARE.
-   --- */
-
-#include "sal/config.h"
-
-#include "abi.hxx"
-
-#include 
-
-using namespace x86_64;
-
-/* Register class used for passing given 64bit part of the argument.
-   These represent classes as documented by the PS ABI, with the exception
-   of SSESF, SSEDF classes, that are basically SSE class, just gcc will
-   use SF or DFmode move instead of DImode to avoid reformatting penalties.
-
-   Similarly we play games with INTEGERSI_CLASS to use cheaper SImode moves
-   whenever possible (upper half does contain padding).
- */
-enum x86_64_reg_class
-{
-X86_64_NO_CLASS,
-X86_64_INTEGER_CLASS,
-X86_64_INTEGERSI_CLASS,
-X86_64_SSE_CLASS,
-X86_64_SSESF_CLASS,
-X86_64_SSEDF_CLASS,
-X86_64_SSEUP_CLASS,
-X86_64_X87_CLASS,
-X86_64_X87UP_CLASS,
-X86_64_MEMORY_CLASS
-};
-
-#define MAX_

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

2018-02-15 Thread Michael Stahl
 sdext/source/pdfimport/pdfparse/pdfparse.cxx |   11 +++
 sw/source/core/inc/UndoSplitMove.hxx |2 +-
 sw/source/core/undo/unspnd.cxx   |   24 ++--
 3 files changed, 26 insertions(+), 11 deletions(-)

New commits:
commit a8ea79b10bfc4851d092270f02fa8c817c9bc0d9
Author: Michael Stahl 
Date:   Wed Feb 14 20:49:21 2018 +0100

sdext: disable MSVC 2017 warnings from boost headers

Change-Id: I6eb816f155a222ca4299fd425c79d38bf2d464dc

diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx 
b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index e5350d26745d..a13b44b0a371 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -20,12 +20,23 @@
 
 #include 
 
+// boost using obsolete stuff
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4996)
+#endif
+
 // workaround windows compiler: do not include multi_pass.hpp
 #include 
 #include 
 #include 
 #include 
 #include 
+
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
+
 #include 
 
 #include 
commit 21c3a446ccc6fa0f812531b072f5d18875b7aaca
Author: Michael Stahl 
Date:   Wed Feb 14 14:37:16 2018 +0100

sw: replace DELETEZ with unique_ptr in SwUndoSplitNode

Change-Id: Iaac10057c7be6f49bc5930725dffa7884c35d814

diff --git a/sw/source/core/inc/UndoSplitMove.hxx 
b/sw/source/core/inc/UndoSplitMove.hxx
index 9119248bb5f5..d4a86dea4cbc 100644
--- a/sw/source/core/inc/UndoSplitMove.hxx
+++ b/sw/source/core/inc/UndoSplitMove.hxx
@@ -24,7 +24,7 @@
 
 class SwUndoSplitNode: public SwUndo
 {
-SwHistory* pHistory;
+std::unique_ptr m_pHistory;
 SwRedlineData* pRedlData;
 sal_uLong nNode;
 sal_Int32 nContent;
diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx
index 0b388491ef86..2253c3df5124 100644
--- a/sw/source/core/undo/unspnd.cxx
+++ b/sw/source/core/undo/unspnd.cxx
@@ -37,7 +37,7 @@
 
 SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
 bool bChkTable )
-: SwUndo( SwUndoId::SPLITNODE, pDoc ), pHistory( nullptr ), pRedlData( 
nullptr ), nNode( rPos.nNode.GetIndex() ),
+: SwUndo( SwUndoId::SPLITNODE, pDoc ), pRedlData( nullptr ), nNode( 
rPos.nNode.GetIndex() ),
 nContent( rPos.nContent.GetIndex() ),
 bTableFlag( false ), bChkTableStt( bChkTable )
 {
@@ -45,11 +45,13 @@ SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const 
SwPosition& rPos,
 OSL_ENSURE( pTextNd, "only for TextNode" );
 if( pTextNd->GetpSwpHints() )
 {
-pHistory = new SwHistory;
-pHistory->CopyAttr( pTextNd->GetpSwpHints(), nNode, 0,
+m_pHistory.reset(new SwHistory);
+m_pHistory->CopyAttr(pTextNd->GetpSwpHints(), nNode, 0,
 pTextNd->GetText().getLength(), false );
-if( !pHistory->Count() )
-DELETEZ( pHistory );
+if (!m_pHistory->Count())
+{
+m_pHistory.reset();
+}
 }
 // consider Redline
 if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
@@ -63,7 +65,7 @@ SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const 
SwPosition& rPos,
 
 SwUndoSplitNode::~SwUndoSplitNode()
 {
-delete pHistory;
+m_pHistory.reset();
 delete pRedlData;
 }
 
@@ -126,14 +128,14 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & 
rContext)
 RemoveIdxRel( nNode+1, *rPam.GetPoint() );
 
 pTNd->JoinNext();
-if( pHistory )
+if (m_pHistory)
 {
 rPam.GetPoint()->nContent = 0;
 rPam.SetMark();
 rPam.GetPoint()->nContent = pTNd->GetText().getLength();
 
 pDoc->RstTextAttrs( rPam, true );
-pHistory->TmpRollback( pDoc, 0, false );
+m_pHistory->TmpRollback( pDoc, 0, false );
 }
 
 pDoc->UpdateParRsid( pTNd, nParRsid );
@@ -159,8 +161,10 @@ void SwUndoSplitNode::RedoImpl(::sw::UndoRedoContext & 
rContext)
 SwDoc* pDoc = rPam.GetDoc();
 pDoc->getIDocumentContentOperations().SplitNode( *rPam.GetPoint(), 
bChkTableStt );
 
-if( pHistory )
-pHistory->SetTmpEnd( pHistory->Count() );
+if (m_pHistory)
+{
+m_pHistory->SetTmpEnd(m_pHistory->Count());
+}
 
 if( ( pRedlData && IDocumentRedlineAccess::IsRedlineOn( 
GetRedlineFlags() )) ||
 ( !( RedlineFlags::Ignore & GetRedlineFlags() ) &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] website.git: Branch 'update' - check.php

2018-02-15 Thread Christian Lohmaier
 check.php |   35 +++
 1 file changed, 27 insertions(+), 8 deletions(-)

New commits:
commit b8e3b0efeae3b286067b121fa4428374a15f9f54
Author: Christian Lohmaier 
Date:   Thu Feb 15 15:59:42 2018 +0100

enable update to 6.0.1 and 5.4.5

diff --git a/check.php b/check.php
index e1fef66..51ef67d 100644
--- a/check.php
+++ b/check.php
@@ -510,6 +510,25 @@ $build_hash_to_version = array(
 '32c8895c6cae21571f364dbb059f419a743ee44d' => '5.4.3.1',
 'facb2780328619f348f035e17baa8b2984099ca4' => '5.4.3.2',
 '92a7159f7e4af62137622921e809f8546db437e5' => '5.4.3.2', # hotfix1, Final
+# 5.4.4
+'da790616461e15a10c95a80eb8ef8ee7b726c114' => '5.4.4.1',
+'2524958677847fb3bb44820e40380acbe820f960' => '5.4.4.2', # Final
+# 5.4.5
+'79c9829dd5d8054ec39a82dc51cd9eff340dbee8' => '5.4.5.1', # unscheduled, 
due to  unresponsible secfix
+
+##
+# 6.0.0 versions
+'c6800cf490f53fde5b2426a9ef8841495c81ed17' => '6.0.0.0.a1', # alpha1
+'c1d1f859b268f650143d48f294999cda0fa57350' => '6.0.0.0.a1', # 
alpha1-buildfix1
+'97471ab4eb4db4c487195658631696bb3238656c' => '6.0.0.0.b1', # beta1
+'13edaaa12f25de343fce136064e27da66c1c4fa4' => '6.0.0.0.b2', # beta2
+'d2bec56d7865f05a1003dc88449f2b0fdd85309a' => '6.0.0.1', # rc1
+'d13b6f5b8f357b3226a359e4ed08281d7d81d238' => '6.0.0.2', # rc2
+'06b618bb6f431d27fd2def25aa19c833e29b61cd' => '6.0.0.2', # rc2-buildfix2
+'64a0f66915f38c6217de274f0aa8e15618924765' => '6.0.0.3', # Final
+# 6.0.1
+'1a915a3f2906b005770de982c78bfccb21913273' => '6.0.1.0.0+', # unreleased, 
testbuild for crashfix
+'60bfb1526849283ce2491346ed2aa51c465abfe6' => '6.0.1.1', # unscheduled, 
due to  unresponsible secfix
 );
 
 # Descriptions of the target versions
@@ -522,17 +541,17 @@ $build_hash_to_version = array(
 #   where '' and '' will be substitued with the right value
 #   NOTE: '&' in the URL has to be escaped as &
 $update_map = array(
-'stable' => array('gitid'   => 
'6b8ed514a9f8b44d37a1b96673cbbdd077e24059',
-  'id'  => 'LibreOffice 5.3.7',
-  'version' => '5.3.7',
+'stable' => array('gitid'   => 
'79c9829dd5d8054ec39a82dc51cd9eff340dbee8',
+  'id'  => 'LibreOffice 5.4.5',
+  'version' => '5.4.5',
   'update_type' => 'text/html',
-  'update_src'  => 
'https://www.libreoffice.org/download/download/?lang=&version=5.3.7',
+  'update_src'  => 
'https://www.libreoffice.org/download/download/?lang=&version=5.4.5',
   'substitute'  => true ),
-'latest' => array('gitid'   => 
'92a7159f7e4af62137622921e809f8546db437e5',
-  'id'  => 'LibreOffice 5.4.3',
-  'version' => '5.4.3',
+'latest' => array('gitid'   => 
'60bfb1526849283ce2491346ed2aa51c465abfe6',
+  'id'  => 'LibreOffice 6.0.1',
+  'version' => '6.0.1',
   'update_type' => 'text/html',
-  'update_src'  => 
'https://www.libreoffice.org/download/download/?lang=&version=5.4.3',
+  'update_src'  => 
'https://www.libreoffice.org/download/download/?lang=&version=6.0.1',
   'substitute'  => true ),
 );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Miklos Vajna
 editeng/source/xml/xmltxtexp.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit e20164ad9f2b3125c8ecdb5f19feee4a654e24f2
Author: Miklos Vajna 
Date:   Thu Feb 15 11:52:46 2018 +0100

editeng: fix up ODF export test code to build again

The ability to inspect the output from the editeng ODF export is useful,
but the test code no longer built as the used SfxMedium ctor is gone.

We don't really need a full SfxMedium, a simple SvFileStream is enough.

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

diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index 1ada3a700339..083d23626bd8 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -312,8 +312,8 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& 
rStream, const ESelection&
 
 /* testcode
 const OUString aURL( "file:///e:/test.xml" );
-SfxMedium aMedium( aURL, StreamMode::WRITE | StreamMode::TRUNC, 
sal_True );
-uno::Reference xOut( new 
utl::OOutputStreamWrapper( *aMedium.GetOutStream() ) );
+SvFileStream aStream(aURL, StreamMode::WRITE | StreamMode::TRUNC);
+xOut = new utl::OOutputStreamWrapper(aStream);
 */
 
 
@@ -329,7 +329,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& 
rStream, const ESelection&
 xExporter->exportDoc();
 
 /* testcode
-aMedium.Commit();
+aStream.Close();
 */
 
 }
___
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-3-0' - loleaflet/src

2018-02-15 Thread Henry Castro
 loleaflet/src/layer/AnnotationManager.js |   19 ---
 loleaflet/src/layer/marker/Annotation.js |4 +++-
 2 files changed, 7 insertions(+), 16 deletions(-)

New commits:
commit a5250566f98645b2bee03aa86fcf261a5824e9c8
Author: Henry Castro 
Date:   Thu Feb 1 21:43:15 2018 -0400

loleaflet: propagate text selected events to parent element

Change-Id: I9b88c42b6bf40dfe856e92f345633855234c7a5d
Reviewed-on: https://gerrit.libreoffice.org/49126
Reviewed-by: Jan Holesovsky 
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/loleaflet/src/layer/AnnotationManager.js 
b/loleaflet/src/layer/AnnotationManager.js
index c3e9b9a2..5636456b 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -70,15 +70,9 @@ L.AnnotationManager = L.Class.extend({
weight: 2,
opacity: 0.25
});
+   comment.textSelected.addEventParent(this._map);
L.DomEvent.on(comment.textSelected, 'contextmenu', 
L.DomEvent.preventDefault);
-   comment.textSelected.on('click', function(e) {
-   // Simulate a click at this position in the 
document
-   var latlng = 
this._map.mouseEventToLatLng(e.originalEvent);
-   var pos = 
this._map._docLayer._latLngToTwips(latlng);
-   
this._map._docLayer._postMouseEvent('buttondown', pos.x, pos.y, 1, 1, 0);
-   this._map._docLayer._postMouseEvent('buttonup', 
pos.x, pos.y, 1, 1, 0);
-
-   // Also select this comment
+   comment.textSelected.on('click', function() {
this.selectById(comment.id);
}, this);
}
@@ -108,14 +102,9 @@ L.AnnotationManager = L.Class.extend({
fillOpacity: 0,
opacity: 0
});
+   redline.textSelected.addEventParent(this._map);
L.DomEvent.on(redline.textSelected, 'contextmenu', 
L.DomEvent.preventDefault);
-   redline.textSelected.on('click', function(e) {
-   // Simulate a click at this position in the 
document
-   var latlng = 
this._map.mouseEventToLatLng(e.originalEvent);
-   var pos = 
this._map._docLayer._latLngToTwips(latlng);
-   
this._map._docLayer._postMouseEvent('buttondown', pos.x, pos.y, 1, 1, 0);
-   this._map._docLayer._postMouseEvent('buttonup', 
pos.x, pos.y, 1, 1, 0);
-
+   redline.textSelected.on('click', function() {
this.selectById(redline.id);
}, this);
}
diff --git a/loleaflet/src/layer/marker/Annotation.js 
b/loleaflet/src/layer/marker/Annotation.js
index 9682034d..73c4b560 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -37,7 +37,8 @@ L.Annotation = L.Layer.extend({
onRemove: function (map) {
map._panes.popupPane.removeChild(this._container);
if (this._data.textSelected) {
-   this._map.removeLayer(this._data.textSelected);
+   this._data.textSelected.removeEventParent(map);
+   map.removeLayer(this._data.textSelected);
}
this._map = null;
},
@@ -52,6 +53,7 @@ L.Annotation = L.Layer.extend({
 
setData: function (data) {
if (this._data.textSelected) {
+   this._data.textSelected.removeEventParent(this._map);
this._map.removeLayer(this._data.textSelected);
}
this._data = data;
___
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-3-0' - loleaflet/dist loleaflet/src

2018-02-15 Thread Henry Castro
 loleaflet/dist/loleaflet.css  |4 
 loleaflet/src/layer/tile/TileLayer.js |   12 ++--
 loleaflet/src/map/handler/Map.Keyboard.js |6 +-
 3 files changed, 19 insertions(+), 3 deletions(-)

New commits:
commit 91e4dce9b6f4e2f1a258e1a4e14365d1edb9c468
Author: Henry Castro 
Date:   Sat Feb 10 14:20:52 2018 -0400

loleaflet: copy text of the annotation element to clipboard

Change-Id: I8675b3752656afc1ba79d614d2f1fe3e7d98f600
Reviewed-on: https://gerrit.libreoffice.org/49546
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css
index 57185f0e..98bffaa7 100644
--- a/loleaflet/dist/loleaflet.css
+++ b/loleaflet/dist/loleaflet.css
@@ -142,6 +142,10 @@ body {
 .loleaflet-annotation {
position: absolute;
text-align: center;
+   user-select: text;
+   -moz-user-select: text;
+   -webkit-user-select: text;
+   -ms-user-select: text;
 }
 
 .loleaflet-annotation-content-wrapper, 
.loleaflet-annotation-redline-content-wrapper {
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 8e36d7ab..5f777182 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1815,7 +1815,11 @@ L.TileLayer = L.GridLayer.extend({
_onCopy: function (e) {
e = e.originalEvent;
e.preventDefault();
-   if (this._selectionTextContent) {
+   if (this._map._docLayer._textArea.value !== '') {
+   L.Compatibility.clipboardSet(e, 
this._map._docLayer._textArea.value);
+   this._map._docLayer._textArea.value = '';
+   }
+   if (this._textSelectionStart && this._textSelectionEnd && 
this._selectionTextContent) {
L.Compatibility.clipboardSet(e, 
this._selectionTextContent);
 
// remember the copied text, for rich copy/paste inside 
a document
@@ -1828,7 +1832,11 @@ L.TileLayer = L.GridLayer.extend({
_onCut: function (e) {
e = e.originalEvent;
e.preventDefault();
-   if (this._selectionTextContent) {
+   if (this._map._docLayer._textArea.value !== '') {
+   L.Compatibility.clipboardSet(e, 
this._map._docLayer._textArea.value);
+   this._map._docLayer._textArea.value = '';
+   }
+   if (this._textSelectionStart && this._textSelectionEnd && 
this._selectionTextContent) {
L.Compatibility.clipboardSet(e, 
this._selectionTextContent);
 
// remember the copied text, for rich copy/paste inside 
a document
diff --git a/loleaflet/src/map/handler/Map.Keyboard.js 
b/loleaflet/src/map/handler/Map.Keyboard.js
index c7161535..11c9d57b 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -428,6 +428,10 @@ L.Map.Keyboard = L.Handler.extend({
},
 
_handleCtrlCommand: function (e) {
+   // Control
+   if (e.originalEvent.keyCode == 17)
+   return true;
+
if (e.type !== 'keydown' && e.originalEvent.key !== 'c' && 
e.originalEvent.key !== 'v' && e.originalEvent.key !== 'x' &&
/* Safari */ e.originalEvent.keyCode !== 99 && 
e.originalEvent.keyCode !== 118 && e.originalEvent.keyCode !== 120) {
e.originalEvent.preventDefault();
@@ -515,7 +519,7 @@ L.Map.Keyboard = L.Handler.extend({
case 91: // Left Cmd (Safari)
case 93: // Right Cmd (Safari)
// we prepare for a copy or cut event
-   this._map._docLayer._textArea.value = 'dummy text';
+   this._map._docLayer._textArea.value = 
window.getSelection().toString();
this._map._docLayer._textArea.focus();
this._map._docLayer._textArea.select();
return true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


minutes of ESC call ...

2018-02-15 Thread Stephan Bergmann

* Present:
+ Jani, Stephan, Caolan, Oliver, Heiko, Sophie, Xisco, Cloph, 
Michael S,

  Thorsten, Eike, Miklos

* Completed Action Items:

* Pending Action Items:
+ come up with a list of retiring committers to mail (Norbert)
+ go over the past budget ideas & cleanup as a base (Thorsten)

* Release Engineering update (Christian)
   + 6.0.1.1
  + done
   + 6.0.2 RC1 – Feb 20
   + created 6.1/6.2 schedule, everybody check if it fits your needs
  + remember to be careful with late features for 6.2, might affect 
Debian

(Thorsten)
  + esp. bumping external requirements/internal libs (cloph)
   + 5.4.6 cycle shortened, too (additional one)
  + RC1 Feb 27
   + Android
 + beta → production for 5% of the users (as a start)
   + Online

* Documentation (Olivier)
+ Triaging  Doc bugs in BZ
   + 211 NEW / Unconfirmed Documentation bugs
   + Closed several related to wikihelp (jay)
+ Tweaks in the new Help online (buovjaga)
+ Starting to get help for new offline help packaging, seeking help!
+ Started drawing board for online XHP (help ) editor
+ Guides : Stalled during FOSDEM. Shall resume this week.


* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
249(249) (topicUI) bugs open, 326(326) (needsUXEval) needs to 
be evaluated by the UXteam

+ Updates:
BZ changes   1 week1 month   3 months   12 months
 added  8(1)  21(4) 37(3)  116(5)
 commented 41(-22)   233(22)   502(10)2064(-14)
   removed  0(0)   0(0)  2(0)   15(0)
  resolved  2(-1) 11(-4)46(-1) 215(-5)
+ top 10 contributors:
  Tietze, Heiko made 88 changes in 1 month, and 894 changes in 
1 year
  Philips, Yousuf made 44 changes in 1 month, and 797 changes 
in 1 year
  Thomas Lendo made 37 changes in 1 month, and 444 changes in 1 
year

  Buovjaga made 36 changes in 1 month, and 239 changes in 1 year
  Xisco Faulí made 32 changes in 1 month, and 418 changes in 1 year
  Cor Nouws made 26 changes in 1 month, and 169 changes in 1 year
  Foote, V Stuart made 20 changes in 1 month, and 302 changes 
in 1 year

  Budea, Áron made 19 changes in 1 month, and 62 changes in 1 year
  Thomas Linard made 18 changes in 1 month, and 64 changes in 1 
year
  Dan Dascalescu made 16 changes in 1 month, and 19 changes in 
1 year


+ Farewell Jay 
https://www.mail-archive.com/design@global.libreoffice.org/msg08575.html

  + 2085 tickets created, 4418 commented, 564 patches submitted

+ Users complain about our proper handling of scroll key
  + https://bugs.documentfoundation.org/show_bug.cgi?id=111627
  + Additional option suggested in tdf#112876

+ New bitmaps at Gallery and Area fill settings
  + dropped www-back and sg3.*
  + tested whether inserting causes saved or linked? (Miklos)
be careful when it’s a link, better check
  + https://gerrit.libreoffice.org/#/c/49551/

+ Scope of Sheet -> Link to External Data unclear
  + import of html tables only vs. data / streams incl. CSV
   + restricted by design atm, will never work with arbitrary
 kinds of data (Eike)
   + CSV might be an option (take the whole data as one table)
   + note about unsupported format for other formats?
   + continue discussion in issue tdf#114994 .. 114997
  + https://help.libreoffice.org/Calc/Link_to_External_Data = webquery

* Crash Hunting (Caolan)
+ 1(-6) import failure, 0(+0) export failures
+ 4(+0) coverity
+  45 fuzzers * 3 sanitizers+engine combos (asan+libfuzzer,
ubsan+libfuzzer, asan+afl), font parser last added

* Crash Reporter (Xisco)
+ http://crashreport.libreoffice.org/stats/version/5.3.7.2
+ 1063 (last 7 days) (down)
+ http://crashreport.libreoffice.org/stats/version/5.4.4.2
  + 1017 (last 7 days) (down)
+ http://crashreport.libreoffice.org/stats/version/5.4.5.1
  + 259 (last 7 days) (-)
+ http://crashreport.libreoffice.org/stats/version/6.0.0.3
  + 4945 (last 7 days) (down)
+ http://crashreport.libreoffice.org/stats/version/6.0.1.1
+ 808 (last 7 days)
+ reports look like longer-running ones now.

+ Service seems to be down now.

* GSOC Application (Thorsten, Heiko)
   + Organizations Announced: February 12
/accepted
   + Student Application Period: March 12 - 27
   + Application Review Period: March 27 - April 23
   + Student Projects Announced: April 23
   + Community Bonding: April 23 - May 14
   + Coding: May 14 - August 6
   + Evaluation 1: June 11 - 15
   + Evaluation 2: July 9 - 13
   + Students Submit Code and Final Evaluations: August 6 - 14
   + Mentors Submit Final Evaluations: August 14 - 21
   + Results Announced: August 22

   + Everybody look at the ideas page, please

* Hackfests & Events (Michae

[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - 10 commits - download.lst external/expat external/graphite external/icu external/libxml2 external/python3 postprocess/C

2018-02-15 Thread Andras Timar
 download.lst   
|   11 
 external/expat/StaticLibrary_expat.mk  
|1 
 external/expat/StaticLibrary_expat_x64.mk  
|1 
 external/expat/UnpackedTarball_expat.mk
|1 
 external/graphite/graphite2.win64.patch.1  
|   10 
 external/icu/UnpackedTarball_icu.mk
|1 
 external/icu/icu4c-changeset-40324.patch.1 
|   11 
 
external/libxml2/0001-Fix-buffer-size-checks-in-xmlSnprintfElementContent.patch.1
  |  116 
 external/libxml2/0001-Fix-handling-of-parameter-entity-references.patch.1  
|  287 ++
 external/libxml2/0001-Fix-type-confusion-in-xmlValidateOneNamespace.patch.1
|   43 
 
external/libxml2/0001-Increase-buffer-space-for-port-in-HTTP-redirect-supp.patch.1
 |   31 
 external/libxml2/0001-Prevent-unwanted-external-entity-reference.patch.1   
|   35 
 external/libxml2/UnpackedTarball_xml2.mk   
|5 
 external/python3/ExternalPackage_python3.mk
|6 
 external/python3/UnpackedTarball_python3.mk
|   17 
 external/python3/python-3.3.0-darwin.patch.1   
|4 
 external/python3/python-3.3.3-aix.patch.1  
|7 
 external/python3/python-3.3.3-elf-rpath.patch.1
|   14 
 external/python3/python-3.3.3-py17797.patch.1  
|   49 
 external/python3/python-3.5.0-tcltk.disable.patch  
|   16 
 external/python3/python-3.5.4-msvc-disable.patch.1 
|   18 
 external/python3/python-3.5.4-ssl.patch.1  
|   87 
 external/python3/python-lsan.patch.0   
|   19 
 external/python3/python-vc2013.patch.1 
| 1213 --
 external/python3/ubsan.patch.0 
|   27 
 postprocess/CustomTarget_signing.mk
|1 
 pyuno/README   
|2 
 27 files changed, 632 insertions(+), 1401 deletions(-)

New commits:
commit d342f7b35b2a83afc4d155b0e652d9e8ed49886e
Author: Andras Timar 
Date:   Tue May 30 23:24:38 2017 +0200

tdf#86776 Digitally sign soffice.bin on Windows

Change-Id: I79e223f7ac8367a22668c015afddafe1c8b8cd42
Reviewed-on: https://gerrit.libreoffice.org/38250
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
(cherry picked from commit d56c5e7e3eb74c476202700c70de5d4de86b74be)

diff --git a/postprocess/CustomTarget_signing.mk 
b/postprocess/CustomTarget_signing.mk
index 23a81ef68654..1d7193cc517c 100644
--- a/postprocess/CustomTarget_signing.mk
+++ b/postprocess/CustomTarget_signing.mk
@@ -42,6 +42,7 @@ ifneq ($(ENABLE_DBGUTIL),TRUE)
$(INSTDIR)/URE/bin/*.exe \
$(INSTDIR)/program/*.dll \
$(INSTDIR)/program/*.exe \
+   $(INSTDIR)/program/soffice.bin \
$(INSTDIR)/program/shlxthdl/*.dll \
$(INSTDIR)/sdk/cli/*.dll \
$(INSTDIR)/sdk/bin/*.exe \
commit 5d81937fdbe82418f0be7c2b5cc2355e285b5b34
Author: Michael Stahl 
Date:   Wed Sep 21 23:42:52 2016 +0200

python3: put a RPATH into libpython3.so

libpython3.so is the "ABI compatible" wrapper library around
libpython3.5m.so - it is not actually used by anything in LO right now,
but let's ensure it has RPATH $ORIGIN just in case.

This revealed that the AIX patch in python3 accidentally changed the
SONAME of libpython3.5m.so from upstream's libpython3.5m.so.1.0
on ELF platforms, because the SONAME variable was set in the shell
command but read as a make variable in the next line, which is actually
evaluated earlier.

So rename a few files in packages to use the upstream SONAME.

Change-Id: I3611f75eee62b0993b853230521a2fa41ac5cd9c
(cherry picked from commit b078e0d638514b298616838fae090b8294bac32f)

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 3a37e2e0f14d..0bde9ae68c8a 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -45,9 +45,8 @@ $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYT
 else
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin,python))
 $(eval $(call 
gb_ExternalPackage_add

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

2018-02-15 Thread Michael Stahl
 sdext/source/pdfimport/pdfparse/pdfparse.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7e241cda123e8afac329445121c86020ae93
Author: Michael Stahl 
Date:   Thu Feb 15 16:58:54 2018 +0100

sdext: suppress another MSVC warning

Somehow a8ea79b10bfc4851d092270f02fa8c817c9bc0d9 caused another warning
to appear in the MSVC 2015 that is used in jenkins builds.  Whyever.

Change-Id: Iba73de5739078972129d0a2de7d8a6437c12b2e0

diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx 
b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index a13b44b0a371..9512cfcf3bf3 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -24,6 +24,7 @@
 #if defined(_MSC_VER)
 #pragma warning(push)
 #pragma warning(disable:4996)
+#pragma warning(disable:4503)
 #endif
 
 // workaround windows compiler: do not include multi_pass.hpp
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Michael Stahl
 sdext/source/pdfimport/pdfparse/pdfparse.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 764e4a4cd384ce9aafa2ba4ba862f7dc8a4c8934
Author: Michael Stahl 
Date:   Thu Feb 15 17:11:23 2018 +0100

sdext: if all else fails USE BIGGER HAMMER

Change-Id: I83803461310580c47886322e20c0949a371a0407

diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx 
b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index 9512cfcf3bf3..5d69d767aa97 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -34,10 +34,6 @@
 #include 
 #include 
 
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif
-
 #include 
 
 #include 
@@ -682,5 +678,9 @@ PDFEntry* PDFReader::read( const char* pFileName )
 #endif // WIN32
 }
 
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
+
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Caolán McNamara
 filter/source/graphicfilter/ipsd/ipsd.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 79297e32646bf8276f38b1317319abd36cdd45a8
Author: Caolán McNamara 
Date:   Thu Feb 15 13:12:41 2018 +

ofz#6376 Floating-point-exception

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

diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx 
b/filter/source/graphicfilter/ipsd/ipsd.cxx
index 344dbb6d3e07..d962f603c50d 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -125,7 +125,7 @@ bool PSDReader::ReadPSD(Graphic & rGraphic )
 }
 }
 
-if ((mnDestBitDepth == 1 || mnDestBitDepth == 8) && mvPalette.empty())
+if ((mnDestBitDepth == 1 || mnDestBitDepth == 8 || mbTransparent) && 
mvPalette.empty())
 {
 mbStatus = false;
 return mbStatus;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Gabor Kelemen
 include/svx/strings.hrc|   18 --
 svx/inc/strings.hxx|   18 --
 svx/source/unodraw/unoprov.cxx |   34 ++
 3 files changed, 62 insertions(+), 8 deletions(-)

New commits:
commit 11d0e4d946950204fd9f1d23f206b91e8326388e
Author: Gabor Kelemen 
Date:   Tue Dec 5 07:42:28 2017 +0100

tdf#105000, related tdf#80196: Make new color names translatable

Make the new color names of the Tonal palette translatable
These were added in 98419425080f58880f2d0d85749a4a55e8abb40b

Change-Id: I9a55fbd50bbb97d294f7e6cfdfbe56c2605d5ae7
Reviewed-on: https://gerrit.libreoffice.org/45838
Tested-by: Jenkins 
Reviewed-by: Heiko Tietze 
(cherry picked from commit 8901c7c7bc4db5076a615ef942af6fb65e943ee3)
Reviewed-on: https://gerrit.libreoffice.org/49704
Reviewed-by: Miklos Vajna 

diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 2f09ea00f289..6d3cd2fdcabe 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -601,10 +601,24 @@
 #define RID_SVXSTR_COLOR_DARKTEAL   
NC_("RID_SVXSTR_COLOR_DARKTEAL", "Dark Teal")
 #define RID_SVXSTR_COLOR_DARKGREEN  
NC_("RID_SVXSTR_COLOR_DARKGREEN", "Dark Green")
 #define RID_SVXSTR_COLOR_DARKLIME   
NC_("RID_SVXSTR_COLOR_DARKLIME", "Dark Lime")
+// Elements of the Tonal color palette
+#define RID_SVXSTR_COLOR_VIOLET_OUG 
NC_("RID_SVXSTR_COLOR_VIOLET_OUG", "Violet (Out of Gamut)")
+#define RID_SVXSTR_COLOR_BLUE_OUG   
NC_("RID_SVXSTR_COLOR_BLUE_OUG", "Blue (Out of Gamut)")
+#define RID_SVXSTR_COLOR_AZURE_OUG  
NC_("RID_SVXSTR_COLOR_AZURE_OUG", "Azure (Out of Gamut)")
+#define RID_SVXSTR_COLOR_SPRINGGREEN_OUG
NC_("RID_SVXSTR_COLOR_SPRINGGREEN_OUG", "Spring Green (Out of Gamut)")
+#define RID_SVXSTR_COLOR_GREEN_OUG  
NC_("RID_SVXSTR_COLOR_GREEN_OUG", "Green (Out of Gamut)")
+#define RID_SVXSTR_COLOR_CHARTREUSEGREEN_OUG
NC_("RID_SVXSTR_COLOR_CHARTREUSEGREEN_OUG", "Chartreuse Green (Out of Gamut)")
+#define RID_SVXSTR_COLOR_ORANGE_OUG 
NC_("RID_SVXSTR_COLOR_ORANGE_OUG", "Orange (Out of Gamut)")
+#define RID_SVXSTR_COLOR_RED_OUG
NC_("RID_SVXSTR_COLOR_RED_OUG", "Red (Out of Gamut)")
+#define RID_SVXSTR_COLOR_ROSE_OUG   
NC_("RID_SVXSTR_COLOR_ROSE_OUG", "Rose (Out of Gamut)")
+#define RID_SVXSTR_COLOR_MAGENTA
NC_("RID_SVXSTR_COLOR_MAGENTA", "Magenta")
+#define RID_SVXSTR_COLOR_AZURE  
NC_("RID_SVXSTR_COLOR_AZURE", "Azure")
+#define RID_SVXSTR_COLOR_CYAN   
NC_("RID_SVXSTR_COLOR_CYAN", "Cyan")
+#define RID_SVXSTR_COLOR_SPRINGGREEN
NC_("RID_SVXSTR_COLOR_SPRINGGREEN", "Spring Green")
+#define RID_SVXSTR_COLOR_CHARTREUSEGREEN
NC_("RID_SVXSTR_COLOR_CHARTREUSEGREEN", "Chartreuse Green")
+#define RID_SVXSTR_COLOR_ROSE   
NC_("RID_SVXSTR_COLOR_ROSE", "Rose")
 /* Old default color names, probably often used in saved files */
 #define RID_SVXSTR_COLOR_BLUE_CLASSIC   
NC_("RID_SVXSTR_COLOR_BLUE_CLASSIC", "Blue classic")
-#define RID_SVXSTR_COLOR_CYAN   
NC_("RID_SVXSTR_COLOR_CYAN", "Cyan")
-#define RID_SVXSTR_COLOR_MAGENTA
NC_("RID_SVXSTR_COLOR_MAGENTA", "Magenta")
 #define RID_SVXSTR_COLOR_BLUEGREY   
NC_("RID_SVXSTR_COLOR_BLUEGREY", "Blue gray")
 #define RID_SVXSTR_COLOR_BORDEAUX   
NC_("RID_SVXSTR_COLOR_BORDEAUX", "Bordeaux")
 #define RID_SVXSTR_COLOR_PALE_YELLOW
NC_("RID_SVXSTR_COLOR_PALE_YELLOW", "Pale yellow")
diff --git a/svx/inc/strings.hxx b/svx/inc/strings.hxx
index 20a2fb6046d0..99b1d06f1494 100644
--- a/svx/inc/strings.hxx
+++ b/svx/inc/strings.hxx
@@ -22,9 +22,7 @@
 #define RID_SVXSTR_COLOR_BLACK_DEF  "Black"
 #define RID_SVXSTR_COLOR_BLUE_DEF   "Blue"
 #define RID_SVXSTR_COLOR_GREEN_DEF  "Green"
-#define RID_SVXSTR_COLOR_CYAN_DEF   "Cyan"
 #define RID_SVXSTR_COLOR_RED_DEF"Red"
-#define RID_SVXSTR_COLOR_MAGENTA_DEF"Magenta"
 #define RID_SVXSTR_COLOR_GREY_DEF   "Gray"
 #define RID_SVXSTR_COLOR_YELLOW_DEF "Yellow"
 #define RID_SVXSTR_COLOR_WHITE_DEF  "White"
@@ -77,6 +75,22 @@
 #define RID_SVXSTR_COLOR_DARKTEAL_DEF   "Dark Teal"
 #define RID_SVXSTR_COLOR_DARKGREEN_DEF  "Dark Green"
 #define RID_SVXSTR_COLOR_DARKLIME_DEF   "Dark Lime"
+// Reference strings for the Tonal palette
+#define RID_SVXSTR_COLOR_VIOLET_OUG_DEF "Violet (Out of Gamut)"
+#define RID_SVXSTR_COLOR_BLUE_OUG_DEF 

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

2018-02-15 Thread jan Iversen
 bridges/source/cpp_uno/gcc3_ios/cpp2uno.cxx  |   14 ++
 bridges/source/cpp_uno/gcc3_ios/except.cxx   |2 
 bridges/source/cpp_uno/gcc3_ios/generate-snippets.pl |  114 +++
 bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx  |3 
 4 files changed, 130 insertions(+), 3 deletions(-)

New commits:
commit f563a81000ce43e95e117229b72228386077f94e
Author: jan Iversen 
Date:   Thu Feb 15 18:00:33 2018 +0100

iOS, add old snippet script.

We need to check if the script generated the same code always.
Looks like nFunIndexes is never changed.

Change-Id: Ic247cccbf1e4a75e6a0acf5807fdcf84bfcf4cb3

diff --git a/bridges/source/cpp_uno/gcc3_ios/generate-snippets.pl 
b/bridges/source/cpp_uno/gcc3_ios/generate-snippets.pl
new file mode 100755
index ..a8548836fef3
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_ios/generate-snippets.pl
@@ -0,0 +1,114 @@
+#!/usr/bin/perl -w # -*- tab-width: 4; indent-tabs-mode: nil; 
cperl-indent-level: 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/.
+#
+
+my $nFunIndexes = 8;
+my $nVtableOffsets = 4;
+
+sub gen_arm ($$)
+{
+my ($funIndex, $vtableOffset) = @_;
+if ($funIndex & 0x8000) {
+printf ("#ifndef __arm64\n");
+}
+printf ("codeSnippet_%08x_%d:\n", $funIndex, $vtableOffset);
+printf ("#ifdef __arm\n");
+# Note: pc is the address of instruction being executed plus 8
+printf ("mov ip, pc\n");
+printf ("#else\n");
+printf ("adr x15, .+8\n");
+printf ("#endif\n");
+printf ("b _privateSnippetExecutor\n");
+printf (".long %#08x\n", $funIndex);
+printf (".long %d\n", $vtableOffset);
+if ($funIndex & 0x8000) {
+printf ("#endif\n");
+}
+}
+
+sub gen_x86 ($$$)
+{
+my ($funIndex, $vtableOffset, $executor) = @_;
+printf ("codeSnippet_%08x_%d_%s:\n", $funIndex, $vtableOffset, $executor);
+printf ("movl \$%#08x, %%eax\n", $funIndex);
+printf ("movl \$%d, %%edx\n", $vtableOffset);
+printf ("jmp _privateSnippetExecutor%s\n", $executor);
+}
+
+printf (".text\n");
+
+printf ("#if defined(__arm) || defined(__arm64)\n");
+
+printf ("\n");
+printf ("// Each codeSnippetX function stores into ip (arm64: x15) an address 
and branches to _privateSnippetExecutor\n");
+printf ("// The address is that following the branch instruction, containing 
two 32-bit ints:\n");
+printf ("// - the function index, which for 32-bit can have the 0x8000 bit 
set\n");
+printf ("//   to indicate that a hidden parameter is used for returning large 
values\n");
+printf ("// - the vtable offset\n");
+printf ("\n");
+
+printf (".align 4\n");
+printf ("\n");
+
+foreach my $funIndex (0 .. $nFunIndexes-1)
+{
+   foreach my $vtableOffset (0 .. $nVtableOffsets-1)
+   {
+   gen_arm ($funIndex, $vtableOffset);
+   gen_arm ($funIndex|0x8000, $vtableOffset);
+   }
+}
+
+printf ("#else\n");
+printf (".align 1, 0x90\n");
+
+foreach my $funIndex (0 .. $nFunIndexes-1)
+{
+foreach my $vtableOffset (0 .. $nVtableOffsets-1)
+{
+foreach my $executor ('General', 'Void', 'Hyper', 'Float', 'Double', 
'Class')
+{
+gen_x86 ($funIndex, $vtableOffset, $executor);
+gen_x86 ($funIndex|0x8000, $vtableOffset, $executor);
+}
+}
+  }
+
+printf ("#endif\n");
+
+printf (".globl _nFunIndexes\n");
+printf ("_nFunIndexes:\n");
+printf (".long %d\n", $nFunIndexes);
+
+printf (".globl _nVtableOffsets\n");
+printf ("_nVtableOffsets:\n");
+printf (".long %d\n", $nVtableOffsets);
+
+printf (".globl _codeSnippets\n");
+printf ("_codeSnippets:\n");
+
+foreach my $funIndex (0 .. $nFunIndexes-1)
+{
+foreach my $vtableOffset (0 .. $nVtableOffsets-1)
+{
+printf ("#if defined(__arm) || defined(__arm64)\n");
+printf (".long codeSnippet_%08x_%d - _codeSnippets\n", $funIndex, 
$vtableOffset);
+printf ("#ifndef __arm64\n");
+printf (".long codeSnippet_%08x_%d - _codeSnippets\n", 
$funIndex|0x8000, $vtableOffset);
+printf ("#endif\n");
+printf ("#else\n");
+foreach my $executor ('General', 'Void', 'Hyper', 'Float', 'Double', 
'Class')
+{
+printf (".long codeSnippet_%08x_%d_%s - _codeSnippets\n", 
$funIndex, $vtableOffset, $executor);
+printf (".long codeSnippet_%08x_%d_%s - _codeSnippets\n", 
$funIndex|0x8000, $vtableOffset, $executor);
+}
+printf ("#endif\n");
+}
+}
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
commit 4b86076d5efc2e416181cc4c9e56b21870121892
Author: jan Iversen 
Date:   Thu Feb 15 17:57:47 2018 +0100

iOS, update to original files

Update to old files (from Tor in 2013) to prepare for gen

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

2018-02-15 Thread Thorsten Behrens
 sd/source/ui/unoidl/unomodel.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cf385d9cbbd7e64dd981595e07cac7f3e05519f8
Author: Thorsten Behrens 
Date:   Thu Feb 15 18:20:57 2018 +0100

sd: fix whitespace

Change-Id: Ibefd63909b0e505f52471373ef566f7309d6d5de

diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 50702bed3a3e..2ff6f93c0680 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -577,7 +577,7 @@ void SdXImpressDocument::SetModified() throw()
 }
 
 // XModel
-void SAL_CALL SdXImpressDocument::lockControllers(  )
+void SAL_CALL SdXImpressDocument::lockControllers(  )
 {
 ::SolarMutexGuard aGuard;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Noel Grandin
 include/vcl/BitmapTools.hxx   |2 +-
 lotuswordpro/source/filter/lwpbackgroundstuff.cxx |   10 +-
 lotuswordpro/source/filter/lwpbackgroundstuff.hxx |2 +-
 svx/source/sdr/primitive2d/sdrprimitivetools.cxx  |2 +-
 vcl/source/bitmap/BitmapTools.cxx |   10 +-
 5 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 380da094b0ad765b80c353a6b6d2a1aa6a003f6a
Author: Noel Grandin 
Date:   Thu Feb 15 13:27:30 2018 +0200

ofz#6372 fix bitmap decoding of pattern in LwpBackgroundStuff

after
commit b90e098a354323b635bab3ee8f9c79deb1e734fe
use BitmapEx in LwpBackgroundStuff

 maybe the lotuswordpro original stride is really 4 after all
(as a common stride), with the first byte on each line containing the
8bits for each row

The original code in GetPattern() looked pretty dodgy since it was
copying 32-bytes into an 8 byte buffer.
Assume that the reversing part is right, and that the format is really a
1bit packed 8x8 image.

Also fix the decoding of such a image in CreateFromData to assume packed
format, which is more predictable.

Also fix the bug in createDefaultCross_3x3 which changing the assert
revealed.

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

diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 4caafb3545e4..cf790e85be14 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -64,7 +64,7 @@ void loadFromSvg(SvStream& rStream, const OUString& sPath, 
BitmapEx& rBitmapEx,
 @param pData
 The block of data to copy
 @param nStride
-The number of bytes in a scanline, must >= width
+The number of bytes in a scanline, must be >= (width * nBitCount / 8)
 */
 BitmapEx VCL_DLLPUBLIC CreateFromData( sal_uInt8 const *pData, sal_Int32 
nWidth, sal_Int32 nHeight, sal_Int32 nStride, sal_uInt16 nBitCount );
 
diff --git a/lotuswordpro/source/filter/lwpbackgroundstuff.cxx 
b/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
index 7ee17a64fdd8..6aecf25ddcaf 100644
--- a/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
+++ b/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
@@ -76,7 +76,7 @@ void LwpBackgroundStuff::Read(LwpObjectStream* pStrm)
 pStrm->SkipExtra();
 }
 
-void LwpBackgroundStuff::GetPattern(sal_uInt16 btPttnIndex, sal_uInt8* 
pPttnArray)
+void LwpBackgroundStuff::GetPattern(sal_uInt16 btPttnIndex, sal_uInt8 
(&pPttnArray)[8])
 {
 if (btPttnIndex > 71)
 {
@@ -85,9 +85,9 @@ void LwpBackgroundStuff::GetPattern(sal_uInt16 btPttnIndex, 
sal_uInt8* pPttnArra
 }
 assert((2 < btPttnIndex) && (btPttnIndex < 72));
 const sal_uInt8* pTempArray = s_pLwpPatternTab[btPttnIndex];
-for(sal_uInt8 i = 0; i < 32; i++)
+for(sal_uInt8 i = 0; i < 8; i++)
 {
-pPttnArray[i] = (i%4 == 0) ? pTempArray[7-i/4] : 0;
+pPttnArray[i] = pTempArray[7-i];
 }
 }
 
@@ -110,11 +110,11 @@ XFBGImage* LwpBackgroundStuff::GetFillPattern()
 }
 
 // get pattern array from pattern table
-sal_uInt8 aPttnArray[32];
+sal_uInt8 aPttnArray[8];
 GetPattern(m_nID, aPttnArray);
 
 // create bitmap object from the pattern array
-BitmapEx aBmp = vcl::bitmap::CreateFromData( aPttnArray, 8, 8, 8, 1 );
+BitmapEx aBmp = vcl::bitmap::CreateFromData( aPttnArray, 8, 8, 1, 1 );
 
 // create XOBitmap object from bitmap object
 XOBitmap aXOBitmap( aBmp );
diff --git a/lotuswordpro/source/filter/lwpbackgroundstuff.hxx 
b/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
index 6f3ab8a1ca16..ee2c4af4d5ec 100644
--- a/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
+++ b/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
@@ -145,7 +145,7 @@ public:
 }
 
 private:
-static void GetPattern(sal_uInt16 btPttnIndex, sal_uInt8* pPttnArray);
+static void GetPattern(sal_uInt16 btPttnIndex, sal_uInt8 (&pPttnArray)[8]);
 
 public:
 voidRead(LwpObjectStream *pStrm);
diff --git a/svx/source/sdr/primitive2d/sdrprimitivetools.cxx 
b/svx/source/sdr/primitive2d/sdrprimitivetools.cxx
index 6b8a61ea4b01..8eecbeee0715 100644
--- a/svx/source/sdr/primitive2d/sdrprimitivetools.cxx
+++ b/svx/source/sdr/primitive2d/sdrprimitivetools.cxx
@@ -53,7 +53,7 @@ namespace drawinglayer
r, g, b, 0,   r, g, b, 0,   r, g, b, 0,
0, 0, 0, a,   r, g, b, 0,   0, 0, 0, a
 };
-BitmapEx aBitmap = vcl::bitmap::CreateFromData(cross, 3, 3, 3, 
32);
+BitmapEx aBitmap = vcl::bitmap::CreateFromData(cross, 3, 3, 
12, 32);
 
 // create and exchange at aRetVal
 delete aRetVal.set(new BitmapEx(aBitmap));
diff --git a/vcl/source/bitmap/BitmapTools.cxx 
b/vcl/source/bitmap/BitmapTools.cxx
index ee0aef4f1f67..a171fd848a39 100644
--- a/v

Re: Implementing accessibility non-regression check tool

2018-02-15 Thread Samuel Thibault
Hello,

For now I have patched the build system to call the tool as the attached
patch does, does it look OK? (basically it's called along building the
image list in the UIC rule, I need to doublecheck the clean rule, but
the build rule works fine)

Samuel
diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk
index 688f596..cc9f7bf 100644
--- a/solenv/gbuild/Helper.mk
+++ b/solenv/gbuild/Helper.mk
@@ -272,6 +272,10 @@ define gb_Helper_get_imagelists
 $(foreach ui,$(gb_UIConfig_REGISTERED),$(call 
gb_UIConfig_get_imagelist_target,$(ui)))
 endef
 
+define gb_Helper_get_a11yerrors
+$(foreach ui,$(gb_UIConfig_REGISTERED),$(call 
gb_UIConfig_get_a11yerrors_target,$(ui)))
+endef
+
 # call 
gb_Helper_replace_if_different_and_touch,source,target,optional-touch-reference-file
 define gb_Helper_replace_if_different_and_touch
 if cmp -s $(1) $(2); then rm $(1); \
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index a831065..26bbf7f 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -156,6 +156,7 @@ gb_ScpTemplateTarget_get_target = $(abspath 
$(WORKDIR)/ScpTemplateTarget/$(dir $
 gb_SdiTarget_get_target = $(WORKDIR)/SdiTarget/$(1)
 gb_ThesaurusIndexTarget_get_target = 
$(WORKDIR)/ThesaurusIndexTarget/$(basename $(1)).idx
 gb_UIConfig_get_imagelist_target = $(WORKDIR)/UIConfig/$(1).ilst
+gb_UIConfig_get_a11yerrors_target = $(WORKDIR)/UIConfig/$(1).a11yerrors
 gb_UIConfig_get_target = $(WORKDIR)/UIConfig/$(1).done
 gb_UIImageListTarget_get_target = $(WORKDIR)/UIImageListTarget/$(1).ilst
 gb_UIMenubarTarget_get_target = $(WORKDIR)/UIMenubarTarget/$(1).xml
@@ -280,6 +281,7 @@ $(eval $(call gb_Helper_make_clean_targets,\
CppunitTestFakeExecutable \
CustomTarget \
ExternalProject \
+   UIA11YErrors \
UIConfig \
UIImageListTarget \
UIMenubarTarget \
diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 01bfdba..53235c3 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -94,6 +94,7 @@ endef
 # * UIConfig/ containing all nontranslatable files
 
 gb_UIConfig_INSTDIR := $(LIBO_SHARE_FOLDER)/config/soffice.cfg
+gb_UIConfig_a11yerrors_COMMAND = $(SRCDIR)/bin/gla11y
 
 $(dir $(call gb_UIConfig_get_target,%)).dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
@@ -101,7 +102,7 @@ $(dir $(call gb_UIConfig_get_target,%)).dir :
 $(dir $(call gb_UIConfig_get_target,%))%/.dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
 
-$(call gb_UIConfig_get_target,%) : $(call gb_UIConfig_get_imagelist_target,%)
+$(call gb_UIConfig_get_target,%) : $(call gb_UIConfig_get_imagelist_target,%) 
$(call gb_UIConfig_get_a11yerrors_target,%)
$(call gb_Output_announce,$*,$(true),UIC,2)
$(call gb_Helper_abbreviate_dirs,\
touch $@ \
@@ -110,6 +111,16 @@ $(call gb_UIConfig_get_target,%) : $(call 
gb_UIConfig_get_imagelist_target,%)
 $(call gb_UIConfig_get_imagelist_target,%) :
$(call gb_UIConfig__command)
 
+define gb_UIConfig_a11yerrors__command
+$(call gb_Output_announce,$(2),$(true),UIA,1)
+$(call gb_Helper_abbreviate_dirs,\
+   $(gb_UIConfig_a11yerrors_COMMAND) $(UIFILE) > $@
+)
+endef
+
+$(call gb_UIConfig_get_a11yerrors_target,%) :
+   $(call gb_UIConfig_a11yerrors__command,$@,$*)
+
 .PHONY : $(call gb_UIConfig_get_clean_target,%)
 $(call gb_UIConfig_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),UIC,2)
@@ -117,6 +128,11 @@ $(call gb_UIConfig_get_clean_target,%) :
rm -f $(call gb_UIConfig_get_target,$*) \
)
 
+.PHONY : $(call gb_UIA11YErrorsTarget_get_clean_target,%)
+$(call gb_UIA11YErrorsTarget_get_clean_target,%) :
+   $(call gb_Output_announce,$*,$(false),UIA,2)
+   rm -f $(call gb_UIConfig_get_a11yerrors_target,$*)
+
 gb_UIConfig_get_packagename = UIConfig/$(1)
 gb_UIConfig_get_packagesetname = UIConfig/$(1)
 
@@ -138,6 +154,7 @@ $(call gb_PackageSet_add_package,$(call 
gb_UIConfig_get_packagesetname,$(1)),$(c
 
 $(call gb_UIConfig_get_target,$(1)) :| $(dir $(call 
gb_UIConfig_get_target,$(1))).dir
 $(call gb_UIConfig_get_imagelist_target,$(1)) :| $(dir $(call 
gb_UIConfig_get_imagelist_target,$(1))).dir
+$(call gb_UIConfig_get_a11yerrors_target,$(1)) :| $(dir $(call 
gb_UIConfig_get_a11yerrors_target,$(1))).dir
 $(call gb_UIConfig_get_target,$(1)) : $(call gb_PackageSet_get_target,$(call 
gb_UIConfig_get_packagesetname,$(1)))
 $(call gb_UIConfig_get_clean_target,$(1)) : $(call 
gb_PackageSet_get_clean_target,$(call gb_UIConfig_get_packagesetname,$(1)))
 
@@ -168,6 +185,9 @@ $(call gb_UIConfig_get_imagelist_target,$(1)) : 
UI_IMAGELISTS += $(call gb_UIIma
 $(call gb_UIConfig_get_imagelist_target,$(1)) : $(call 
gb_UIImageListTarget_get_target,$(2))
 $(call gb_UIConfig_get_clean_target,$(1)) : $(call 
gb_UIImageListTarget_get_clean_target,$(2))
 
+$(call gb_UIConfig_get_a11yerrors_target,$(1)) : UIFILE := $(SRCDIR)/$(2).ui
+$(call gb_UIConfig_get_clean_target

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

2018-02-15 Thread Michael Stahl
 sdext/source/pdfimport/pdfparse/pdfparse.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit ebbae6a1f5e183953baac8e9a9d5b0bd2f333fbe
Author: Michael Stahl 
Date:   Thu Feb 15 20:24:11 2018 +0100

sdext: MSVC 2015 is trash

Change-Id: I8549b52417520c0fe52977137fc570d65b0800fc

diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx 
b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index 5d69d767aa97..e8636a4a2dab 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -21,10 +21,9 @@
 #include 
 
 // boost using obsolete stuff
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && _MSC_VER >= 1900
 #pragma warning(push)
 #pragma warning(disable:4996)
-#pragma warning(disable:4503)
 #endif
 
 // workaround windows compiler: do not include multi_pass.hpp
@@ -678,9 +677,8 @@ PDFEntry* PDFReader::read( const char* pFileName )
 #endif // WIN32
 }
 
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && _MSC_VER >= 1900
 #pragma warning(pop)
 #endif
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Miklos Vajna
 sw/source/core/layout/anchoredobject.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 819767ec0ed65992f3a8e02e0d57ea06e7f7a8a3
Author: Miklos Vajna 
Date:   Tue Feb 13 11:44:36 2018 +0100

sw: work around what seems to be a gcc-4.8 compiler bug

Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault.
(anonymous namespace)::print_type<15> (ctx=..., 
info=0x7fff7f90, unknown_name=...) at 
../../../../../libstdc++-v3/src/c++11/debug.cc:641
641 ../../../../../libstdc++-v3/src/c++11/debug.cc: No such 
file or directory.
(gdb) up
#1  0x76abb008 in (anonymous namespace)::print_description 
(ctx=..., inst=...) at ../../../../../libstdc++-v3/src/c++11/debug.cc:817
817 in ../../../../../libstdc++-v3/src/c++11/debug.cc
(gdb)
#2  0x76abc7aa in (anonymous namespace)::print_description 
(param=..., ctx=...) at ../../../../../libstdc++-v3/src/c++11/debug.cc:835
835 in ../../../../../libstdc++-v3/src/c++11/debug.cc
(gdb)
#3  __gnu_debug::_Error_formatter::_M_error (this=0x7fff7af0) 
at ../../../../../libstdc++-v3/src/c++11/debug.cc:1061
1061in ../../../../../libstdc++-v3/src/c++11/debug.cc
(gdb)
#4  0x7fffca2b6313 in 
__gnu_debug::operator!=<__gnu_cxx::__normal_iterator > 
>, std::__debug::vector > 
> (__lhs=0x0, __rhs=invalid iterator) at 
/usr/include/c++/4.8/debug/safe_iterator.h:535
535   _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! 
__rhs._M_singular(),
(gdb)
#5  0x7fffca7f3de2 in SwAnchoredObject::UpdateObjInSortedList 
(this=0x1fa6fd8) at 
/git/libreoffice/master/sw/source/core/layout/anchoredobject.cxx:629
629 for (SwAnchoredObject* pAnchoredObj : 
*pObjs)

Given that valgrind doesn't point out anything and the old and the new code 
is
meant to be the same, my only guess is that the baseline gcc has some 
codegen
bug. This happens reasonably frequently, current bugdoc was a DOCX file
with 4 shapes anchored to the same paragraph, affecting only dbgutil
builds, it seems.

The tdf#115719 bugdoc is a reproducer for the crash.

(cherry picked from commit d34dcde1d0ccee2d78eea08185f12949f53ceae3)

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

diff --git a/sw/source/core/layout/anchoredobject.cxx 
b/sw/source/core/layout/anchoredobject.cxx
index 7562791510f5..a88d36eba220 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -625,8 +625,9 @@ void SwAnchoredObject::UpdateObjInSortedList()
 {
 const SwSortedObjs* pObjs = GetAnchorFrame()->GetDrawObjs();
 // determine start index
-for (SwAnchoredObject* pAnchoredObj : *pObjs)
+for (auto it = pObjs->begin(); it != pObjs->end(); ++it)
 {
+SwAnchoredObject* pAnchoredObj = *it;
 if ( pAnchoredObj->ConsiderObjWrapInfluenceOnObjPos() )
 
pAnchoredObj->InvalidateObjPosForConsiderWrapInfluence();
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Michael Stahl
 sdext/source/pdfimport/pdfparse/pdfparse.cxx |   14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 20cf158b85d40bdc7e1092dcbfe648c48339aec6
Author: Michael Stahl 
Date:   Thu Feb 15 20:56:41 2018 +0100

sdext: disable the warnings TWICE because they're sneaky bastards

Let's hope this will finally work, it was like this before commit
4e102d6a4b483098e80ca86e19ee8576ae5356f1

Change-Id: I6337d4f1abc386e71747b2a37e55a3578bcbf340

diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx 
b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index e8636a4a2dab..97ba78d2a80b 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -21,9 +21,10 @@
 #include 
 
 // boost using obsolete stuff
-#if defined(_MSC_VER) && _MSC_VER >= 1900
+#if defined(_MSC_VER)
 #pragma warning(push)
 #pragma warning(disable:4996)
+#pragma warning(disable:4503)
 #endif
 
 // workaround windows compiler: do not include multi_pass.hpp
@@ -38,6 +39,15 @@
 #include 
 #include 
 
+// disable warnings again because someone along the line has enabled them
+// (we have  included boost headers, what did you expect?)
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4996)
+#pragma warning(disable:4503)
+#endif
+
+
 using namespace boost::spirit;
 using namespace pdfparse;
 
@@ -677,7 +687,7 @@ PDFEntry* PDFReader::read( const char* pFileName )
 #endif // WIN32
 }
 
-#if defined(_MSC_VER) && _MSC_VER >= 1900
+#if defined(_MSC_VER)
 #pragma warning(pop)
 #endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - jvmfwk/plugins

2018-02-15 Thread Stephan Bergmann
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx |   64 +
 1 file changed, 39 insertions(+), 25 deletions(-)

New commits:
commit 8c9d3e283e290fa241f9680da80a33dcc63751d5
Author: Stephan Bergmann 
Date:   Thu Feb 15 08:31:49 2018 +0100

Find Java 9 with the new registry keys on Windows

See 
 section "Windows Registry Key Changes".

Change-Id: Ic30ce430663cc1608c6268fa937142f73c55f138
Reviewed-on: https://gerrit.libreoffice.org/49792
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit cc8e8215c8d7583f36feca20f0a1235edc05a6d7)
Reviewed-on: https://gerrit.libreoffice.org/49811
Reviewed-by: Michael Stahl 

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 5a74b6c169ca..9808c8707e96 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -575,31 +575,6 @@ bool decodeOutput(const OString& s, OUString* out)
 
 
 #if defined(_WIN32)
-void addJavaInfoFromWinReg(
-std::vector > & allInfos,
-std::vector > & addedInfos)
-{
-// Get Java s from registry
-std::vector vecJavaHome;
-if(getSDKInfoFromRegistry(vecJavaHome))
-{
-// create impl objects
-for (auto const& javaHome : vecJavaHome)
-{
-getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
-}
-}
-
-vecJavaHome.clear();
-if(getJREInfoFromRegistry(vecJavaHome))
-{
-for (auto const& javaHome : vecJavaHome)
-{
-getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
-}
-   }
-}
-
 
 bool getJavaInfoFromRegistry(const wchar_t* szRegKey,
  vector& vecJavaHome)
@@ -685,6 +660,45 @@ bool getJREInfoFromRegistry(vector& vecJavaHome)
 return getJavaInfoFromRegistry(HKEY_SUN_JRE, vecJavaHome);
 }
 
+void addJavaInfoFromWinReg(
+std::vector > & allInfos,
+std::vector > & addedInfos)
+{
+// Get Java s from registry
+std::vector vecJavaHome;
+if(getSDKInfoFromRegistry(vecJavaHome))
+{
+// create impl objects
+for (auto const& javaHome : vecJavaHome)
+{
+getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+}
+}
+
+vecJavaHome.clear();
+if(getJREInfoFromRegistry(vecJavaHome))
+{
+for (auto const& javaHome : vecJavaHome)
+{
+getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+}
+   }
+
+vecJavaHome.clear();
+if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JDK", vecJavaHome)) {
+for (auto const & javaHome: vecJavaHome) {
+getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+}
+}
+
+vecJavaHome.clear();
+if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JRE", vecJavaHome)) {
+for (auto const & javaHome: vecJavaHome) {
+getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+}
+}
+}
+
 #endif // WNT
 
 void bubbleSortVersion(vector >& vec)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - jvmfwk/plugins

2018-02-15 Thread Stephan Bergmann
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx |   72 +
 1 file changed, 43 insertions(+), 29 deletions(-)

New commits:
commit 0963c34dd38bec8c1105c20edecee831ca88fe2d
Author: Stephan Bergmann 
Date:   Thu Feb 15 08:31:49 2018 +0100

Find Java 9 with the new registry keys on Windows

See 
 section "Windows Registry Key Changes".

Reviewed-on: https://gerrit.libreoffice.org/49792
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit cc8e8215c8d7583f36feca20f0a1235edc05a6d7)
Conflicts:
jvmfwk/plugins/sunmajor/pluginlib/util.cxx

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

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 3c31e60c63e6..f124d6a29dc8 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -576,35 +576,6 @@ bool decodeOutput(const OString& s, OUString* out)
 
 
 #if defined(_WIN32)
-void addJavaInfoFromWinReg(
-std::vector > & allInfos,
-std::vector > & addedInfos)
-{
-// Get Java s from registry
-std::vector vecJavaHome;
-if(getSDKInfoFromRegistry(vecJavaHome))
-{
-// create impl objects
-typedef std::vector::iterator ItHome;
-for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
-++it_home)
-{
-getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
-}
-}
-
-vecJavaHome.clear();
-if(getJREInfoFromRegistry(vecJavaHome))
-{
-typedef std::vector::iterator ItHome;
-for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
-++it_home)
-{
-getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
-}
-   }
-}
-
 
 bool getJavaInfoFromRegistry(const wchar_t* szRegKey,
  vector& vecJavaHome)
@@ -686,6 +657,49 @@ bool getJREInfoFromRegistry(vector& vecJavaHome)
 return getJavaInfoFromRegistry(HKEY_SUN_JRE, vecJavaHome);
 }
 
+void addJavaInfoFromWinReg(
+std::vector > & allInfos,
+std::vector > & addedInfos)
+{
+// Get Java s from registry
+std::vector vecJavaHome;
+if(getSDKInfoFromRegistry(vecJavaHome))
+{
+// create impl objects
+typedef std::vector::iterator ItHome;
+for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
+++it_home)
+{
+getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
+}
+}
+
+vecJavaHome.clear();
+if(getJREInfoFromRegistry(vecJavaHome))
+{
+typedef std::vector::iterator ItHome;
+for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
+++it_home)
+{
+getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
+}
+   }
+
+vecJavaHome.clear();
+if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JDK", vecJavaHome)) {
+for (auto const & javaHome: vecJavaHome) {
+getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+}
+}
+
+vecJavaHome.clear();
+if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JRE", vecJavaHome)) {
+for (auto const & javaHome: vecJavaHome) {
+getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+}
+}
+}
+
 #endif // WNT
 
 void bubbleSortVersion(vector >& vec)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Stephan Bergmann
 framework/source/helper/statusindicatorfactory.cxx |3 ++-
 framework/source/helper/wakeupthread.cxx   |1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 831c4f1874f01bcd7282cdf08b1446acc5c4760e
Author: Stephan Bergmann 
Date:   Wed Feb 14 13:21:40 2018 +0100

tdf#108005: Problems with progress bar while saving document

...as StatusIndicatorFactory::m_pWakeUp is still non-null after it has 
already
been used while loading the document.  Regression introduced with
017f250764ec7b4ecb82ac19f5b3f68cadf1bf56 "Ensure WakeUpThread is joined 
before
exit".

(Also, WakeUpThread::stop could take up to 25 msec longer than necessary, 
as it
failed to set condition_, so would always have waited for 
WakeUpThread::execute
to finish its next 25 msec condition_.wait call.)

Change-Id: Ic7fe15f1b90f3b8292cd2ceccdc2719a00743d44
Reviewed-on: https://gerrit.libreoffice.org/49718
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 57574c2bcc60d37620288c403267c34d960f5863)
Reviewed-on: https://gerrit.libreoffice.org/49781
Reviewed-by: Michael Stahl 

diff --git a/framework/source/helper/statusindicatorfactory.cxx 
b/framework/source/helper/statusindicatorfactory.cxx
index 577cabf82ac3..649145d95833 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -547,7 +548,7 @@ void StatusIndicatorFactory::impl_stopWakeUpThread()
 rtl::Reference wakeUp;
 {
 osl::MutexGuard g(m_mutex);
-wakeUp = m_pWakeUp;
+std::swap(wakeUp, m_pWakeUp);
 }
 if (wakeUp.is())
 {
diff --git a/framework/source/helper/wakeupthread.cxx 
b/framework/source/helper/wakeupthread.cxx
index b13621225d21..503f6707a010 100644
--- a/framework/source/helper/wakeupthread.cxx
+++ b/framework/source/helper/wakeupthread.cxx
@@ -53,6 +53,7 @@ void framework::WakeUpThread::stop() {
 osl::MutexGuard g(mutex_);
 terminate_ = true;
 }
+condition_.set();
 join();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Stephan Bergmann
 framework/source/helper/statusindicatorfactory.cxx |3 ++-
 framework/source/helper/wakeupthread.cxx   |1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 56b96f3cc1f03313afade4f642861efb76d0bb54
Author: Stephan Bergmann 
Date:   Wed Feb 14 13:21:40 2018 +0100

tdf#108005: Problems with progress bar while saving document

...as StatusIndicatorFactory::m_pWakeUp is still non-null after it has 
already
been used while loading the document.  Regression introduced with
017f250764ec7b4ecb82ac19f5b3f68cadf1bf56 "Ensure WakeUpThread is joined 
before
exit".

(Also, WakeUpThread::stop could take up to 25 msec longer than necessary, 
as it
failed to set condition_, so would always have waited for 
WakeUpThread::execute
to finish its next 25 msec condition_.wait call.)

Change-Id: Ic7fe15f1b90f3b8292cd2ceccdc2719a00743d44
Reviewed-on: https://gerrit.libreoffice.org/49718
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 57574c2bcc60d37620288c403267c34d960f5863)
Reviewed-on: https://gerrit.libreoffice.org/49780
Reviewed-by: Michael Stahl 

diff --git a/framework/source/helper/statusindicatorfactory.cxx 
b/framework/source/helper/statusindicatorfactory.cxx
index 2d5563d1213c..e3753e2f3ca7 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -547,7 +548,7 @@ void StatusIndicatorFactory::impl_stopWakeUpThread()
 rtl::Reference wakeUp;
 {
 osl::MutexGuard g(m_mutex);
-wakeUp = m_pWakeUp;
+std::swap(wakeUp, m_pWakeUp);
 }
 if (wakeUp.is())
 {
diff --git a/framework/source/helper/wakeupthread.cxx 
b/framework/source/helper/wakeupthread.cxx
index b13621225d21..503f6707a010 100644
--- a/framework/source/helper/wakeupthread.cxx
+++ b/framework/source/helper/wakeupthread.cxx
@@ -53,6 +53,7 @@ void framework::WakeUpThread::stop() {
 osl::MutexGuard g(mutex_);
 terminate_ = true;
 }
+condition_.set();
 join();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Caolán McNamara
 vcl/source/filter/jpeg/jpegc.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6864b7d9b72d85cc7f8be19136708eaebae1bfe4
Author: Caolán McNamara 
Date:   Thu Feb 15 15:26:20 2018 +

for fuzzing, reduce allowed warnings again

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

diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index 8a8ea3707379..5b36ba3f1e7c 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -72,7 +72,7 @@ extern "C" void outputMessage (j_common_ptr cinfo)
 
 static int GetWarningLimit()
 {
-return utl::ConfigManager::IsFuzzing() ? 100 : 1000;
+return utl::ConfigManager::IsFuzzing() ? 10 : 1000;
 }
 
 extern "C" void emitMessage (j_common_ptr cinfo, int msg_level)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Caolán McNamara
 filter/source/graphicfilter/itiff/itiff.cxx |   13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 1cde1dd46b04321721fc9f474acec706ccc7961b
Author: Caolán McNamara 
Date:   Thu Feb 15 14:06:41 2018 +

ofz#6345 Integer-overflow

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

diff --git a/filter/source/graphicfilter/itiff/itiff.cxx 
b/filter/source/graphicfilter/itiff/itiff.cxx
index 24b6c7143863..83285b922cf7 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1520,10 +1520,21 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & 
rGraphic )
 }
 }
 
+sal_Int32 nImageDataSize(0);
+if (bStatus)
+{
+if (o3tl::checked_multiply(nImageWidth, 
nImageLength, nImageDataSize) ||
+o3tl::checked_multiply(nImageDataSize, 
(HasAlphaChannel() ? 4 : 3), nImageDataSize) ||
+nImageDataSize > SAL_MAX_INT32/2)
+{
+bStatus = false;
+}
+}
+
 if ( bStatus )
 {
 maBitmapPixelSize = Size(nImageWidth, nImageLength);
-mpBitmap.reset(new sal_uInt8[nImageWidth * nImageLength * 
(HasAlphaChannel() ? 4 : 3)]);
+mpBitmap.reset(new sal_uInt8[nImageDataSize]);
 
 if (bStatus && ReadMap())
 {
___
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-3-0' - loleaflet/src

2018-02-15 Thread Andras Timar
 loleaflet/src/control/Control.Menubar.js |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8c6b75565c4155456420aca8f09dd4671ac17387
Author: Andras Timar 
Date:   Thu Feb 15 21:59:30 2018 +0100

loleaflet: fix Insert Header and Footer menu

Change-Id: I7ba5101c752aeef9f3c5f674bfbb900704333c7f

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 9b3b8a8d..349b7b5f 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -65,9 +65,9 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:InsertAnnotation', 'text'), 
id: 'insertcomment', type: 'action'},
{type: 'separator'},
{name: _UNO('.uno:InsertHeaderFooterMenu', 
'text'), type: 'menu', menu: [
-   {name: _UNO('.uno:InsertPageHeader'), 
type: 'menu', menu: [
+   {name: _UNO('.uno:InsertPageHeader', 
'text'), type: 'menu', menu: [
{name: _('All'), disabled: 
true, id: 'insertheader', tag: '_ALL_', uno: '.uno:InsertPageHeader?'}]},
-   {name: _UNO('.uno:InsertPageFooter'), 
type: 'menu', menu: [
+   {name: _UNO('.uno:InsertPageFooter', 
'text'), type: 'menu', menu: [
{name: _('All'), disabled: 
true, id: 'insertfooter', tag: '_ALL_', uno: '.uno:InsertPageFooter?'}]}
]},
{uno: '.uno:InsertFootnote'},
___
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-3-0' - loleaflet/po

2018-02-15 Thread Andras Timar
 loleaflet/po/ui-ab.po |  247 ++--
 loleaflet/po/ui-gl.po |  243 ++--
 loleaflet/po/ui-hr.po |  276 +-
 loleaflet/po/ui-hu.po |  234 +-
 loleaflet/po/ui-ru.po |  258 +++---
 loleaflet/po/ui-sv.po |  252 ++---
 6 files changed, 758 insertions(+), 752 deletions(-)

New commits:
commit f652da057391a466c13953e0be6558e0c0f26d4d
Author: Andras Timar 
Date:   Thu Feb 15 22:17:45 2018 +0100

loleaflet: Update translations from Pootle

Change-Id: Ib278654e7e6808dcc434ff6a37027123a4b11bd4

diff --git a/loleaflet/po/ui-ab.po b/loleaflet/po/ui-ab.po
index 9842970f..94454e8b 100644
--- a/loleaflet/po/ui-ab.po
+++ b/loleaflet/po/ui-ab.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-01-23 11:12+0100\n"
+"POT-Creation-Date: 2018-02-15 22:05+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME \n"
 "Language-Team: LANGUAGE \n"
@@ -10,8 +10,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Translate Toolkit 2.2.3\n"
-"X-Pootle-Revision: 3061153\n"
+"X-Generator: Translate Toolkit 2.2.5\n"
+"X-Pootle-Revision: 3082701\n"
 "X-Pootle-Path: /ab/libo_online/loleaflet-ui-ab.po\n"
 
 #: admin.strings.js:5
@@ -64,7 +64,7 @@ msgstr ""
 
 #: admin.strings.js:17
 msgid "Bytes sent"
-msgstr ""
+msgstr "Идәықәҵоуп баит"
 
 #: admin.strings.js:18
 msgid "Bytes received"
@@ -92,7 +92,7 @@ msgstr ""
 
 #: admin.strings.js:24
 msgid "Modified"
-msgstr ""
+msgstr "Иҧсахуп"
 
 #: admin.strings.js:25
 msgid "Kill"
@@ -114,7 +114,7 @@ msgstr ""
 msgid "Network Graph"
 msgstr ""
 
-#: admin.strings.js:30 src/layer/marker/Annotation.js:222
+#: admin.strings.js:30 src/layer/marker/Annotation.js:224
 msgid "Save"
 msgstr "Иеиқәырхатәуп"
 
@@ -147,9 +147,8 @@ msgid "Maximum file size allowed to write to disk (in MB) - 
reduce only"
 msgstr ""
 
 #: admin.strings.js:38
-#, fuzzy
 msgid "Documents:"
-msgstr "Адокументқәа"
+msgstr "Адокументқәа;"
 
 #: admin.strings.js:39
 msgid "Expired:"
@@ -177,7 +176,7 @@ msgstr ""
 
 #: evol.colorpicker.strings.js:7
 msgid "No history yet."
-msgstr ""
+msgstr "Анҵамҭақәа ыҟам"
 
 #: dist/errormessages.js:1
 msgid "No disk space left on server, please contact the server administrator 
to continue."
@@ -237,201 +236,201 @@ msgstr ""
 msgid "Document cannot be saved. Check your permissions or contact the storage 
server administrator."
 msgstr ""
 
-#: dist/toolbar/toolbar.js:103
+#: dist/toolbar/toolbar.js:105
 msgid "%n users"
 msgstr "Ахархәаҩцәа: %n"
 
-#: dist/toolbar/toolbar.js:104
+#: dist/toolbar/toolbar.js:106
 msgid "1 user"
 msgstr "Ахархәаҩцәа: 1"
 
-#: dist/toolbar/toolbar.js:105
+#: dist/toolbar/toolbar.js:107
 msgid "0 users"
 msgstr "Ахархәаҩцәа: 0"
 
-#: dist/toolbar/toolbar.js:269
+#: dist/toolbar/toolbar.js:275
 msgid "Are you sure you want to delete this page?"
 msgstr "Ианыхтәума абри адаҟьа?"
 
-#: dist/toolbar/toolbar.js:454
+#: dist/toolbar/toolbar.js:460
 msgid "Document repair"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:495
+#: dist/toolbar/toolbar.js:501
 msgid "Insert table"
 msgstr "Ибжьаргылатәуп атаблица"
 
-#: dist/toolbar/toolbar.js:500
+#: dist/toolbar/toolbar.js:506
 msgid "More"
 msgstr "Иҵегь"
 
-#: dist/toolbar/toolbar.js:598 dist/toolbar/toolbar.js:1072
+#: dist/toolbar/toolbar.js:604 dist/toolbar/toolbar.js:1078
 msgid "Sum"
 msgstr "Аицҵалыҵ"
 
-#: dist/toolbar/toolbar.js:599
+#: dist/toolbar/toolbar.js:605
 msgid "Function"
 msgstr "Афункциа"
 
-#: dist/toolbar/toolbar.js:600 src/layer/marker/Annotation.js:161
+#: dist/toolbar/toolbar.js:606 src/layer/marker/Annotation.js:163
 msgid "Cancel"
 msgstr "Иаҟәыхтәуп"
 
-#: dist/toolbar/toolbar.js:601
+#: dist/toolbar/toolbar.js:607
 msgid "Accept"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:617
+#: dist/toolbar/toolbar.js:623
 msgid "First sheet"
 msgstr "Актәи абӷьыц"
 
-#: dist/toolbar/toolbar.js:618
+#: dist/toolbar/toolbar.js:624
 msgid "Previous sheet"
 msgstr "Аҧхьатәи абӷьыц"
 
-#: dist/toolbar/toolbar.js:619
+#: dist/toolbar/toolbar.js:625
 msgid "Next sheet"
 msgstr "Анаҩстәи абӷьыц"
 
-#: dist/toolbar/toolbar.js:620
+#: dist/toolbar/toolbar.js:626
 msgid "Last sheet"
 msgstr "Аҵыхәтәантәи абӷьыц"
 
-#: dist/toolbar/toolbar.js:630 src/control/Control.Menubar.js:265
+#: dist/toolbar/toolbar.js:636 src/control/Control.Menubar.js:270
 msgid "Fullscreen presentation"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:647
+#: dist/toolbar/toolbar.js:653
 msgid "Search:"
 msgstr "Иҧшаатәуп:"
 
-#: dist/toolbar/toolbar.js:654
+#: dist/toolbar/toolbar.js:660
 msgid "Cancel the search"
 msgstr "Иаҟәыхтәуп аҧшаара"
 
-#: dist/toolbar/toolbar.js:659
+#: dist/toolbar/toolbar.js:665
 msgid "No user

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

2018-02-15 Thread Andras Timar
 configure.ac |2 +-
 debian/changelog |6 ++
 debian/control   |2 +-
 loolwsd.spec.in  |4 ++--
 4 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 414020eebadbd4b32d59c64b72fc2e68a02a20b1
Author: Andras Timar 
Date:   Thu Feb 15 22:26:24 2018 +0100

Bump version to 3.1.0

Change-Id: I4cfe386fda07aa3073decf0e56fda2fccc79a8b5

diff --git a/configure.ac b/configure.ac
index 94d05087..4921f953 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.63])
 
-AC_INIT([loolwsd], [3.0.0], [libreoffice@lists.freedesktop.org])
+AC_INIT([loolwsd], [3.1.0], [libreoffice@lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
 AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability])
diff --git a/debian/changelog b/debian/changelog
index fa54fdcc..cd7ee9d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+loolwsd (3.1.0-1) unstable; urgency=medium
+
+  * see the git log: http://col.la/cool30
+
+ -- Andras Timar   Thu, 15 Feb 2018 22:00:00 +0100
+
 loolwsd (3.0.0-7) unstable; urgency=medium
 
   * see the git log: http://col.la/cool30
diff --git a/debian/control b/debian/control
index e442d6ee..d6c67ca1 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Standards-Version: 3.9.7
 Package: loolwsd
 Section: web
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, fontconfig, libsm6, 
libxinerama1, libxrender1, libgl1-mesa-glx, libcups2, cpio, libcap2-bin, 
libxcb-render0, libxcb-shm0, collaboraofficebasis5.3-calc (>= 5.3.10.39), 
collaboraofficebasis5.3-core (>= 5.3.10.39), 
collaboraofficebasis5.3-graphicfilter (>= 5.3.10.39), 
collaboraofficebasis5.3-images (>= 5.3.10.39), collaboraofficebasis5.3-impress 
(>= 5.3.10.39), collaboraofficebasis5.3-ooofonts (>= 5.3.10.39), 
collaboraofficebasis5.3-writer (>= 5.3.10.39), collaboraoffice5.3 (>= 
5.3.10.39), collaboraoffice5.3-ure (>= 5.3.10.39), 
collaboraofficebasis5.3-en-us (>= 5.3.10.39), 
collaboraofficebasis5.3-en-us-calc (>= 5.3.10.39), 
collaboraofficebasis5.3-en-us-res (>= 5.3.10.39), 
collaboraofficebasis5.3-noto-fonts (>= 5.3.10.39), collaboraofficebasis5.3-draw 
(>= 5.3.10.39), collaboraofficebasis5.3-extension-pdf-import (>= 5.3.10.39), 
collaboraofficebasis5.3-filter-data (>= 5.3.10.39)
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, fontconfig, libsm6, 
libxinerama1, libxrender1, libgl1-mesa-glx, libcups2, cpio, libcap2-bin, 
libxcb-render0, libxcb-shm0, collaboraofficebasis5.3-calc (>= 5.3.10.40), 
collaboraofficebasis5.3-core (>= 5.3.10.40), 
collaboraofficebasis5.3-graphicfilter (>= 5.3.10.40), 
collaboraofficebasis5.3-images (>= 5.3.10.40), collaboraofficebasis5.3-impress 
(>= 5.3.10.40), collaboraofficebasis5.3-ooofonts (>= 5.3.10.40), 
collaboraofficebasis5.3-writer (>= 5.3.10.40), collaboraoffice5.3 (>= 
5.3.10.40), collaboraoffice5.3-ure (>= 5.3.10.40), 
collaboraofficebasis5.3-en-us (>= 5.3.10.40), 
collaboraofficebasis5.3-en-us-calc (>= 5.3.10.40), 
collaboraofficebasis5.3-en-us-res (>= 5.3.10.40), 
collaboraofficebasis5.3-noto-fonts (>= 5.3.10.40), collaboraofficebasis5.3-draw 
(>= 5.3.10.40), collaboraofficebasis5.3-extension-pdf-import (>= 5.3.10.40), 
collaboraofficebasis5.3-filter-data (>= 5.3.10.40)
 Conflicts: collaboraofficebasis5.3-gnome-integration, 
collaboraofficebasis5.3-kde-integration
 Description: LibreOffice Online WebSocket Daemon
  LOOLWSD is a daemon that talks to web browser clients and provides LibreOffice
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index a1524fc3..ae110121 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -12,7 +12,7 @@ Name:   loolwsd%{name_suffix}
 Name:   loolwsd
 %endif
 Version:@PACKAGE_VERSION@
-Release:7%{?dist}
+Release:1%{?dist}
 %if 0%{?suse_version} == 1110
 Group:  Productivity/Office/Suite
 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
@@ -38,7 +38,7 @@ BuildRequires:  libcap-progs linux-glibc-devel 
systemd-rpm-macros
 BuildRequires:  libcap-progs
 %endif
 
-Requires:   collaboraoffice5.3 >= 5.3.10.39 collaboraoffice5.3-ure >= 
5.3.10.39 collaboraofficebasis5.3-core >= 5.3.10.39 
collaboraofficebasis5.3-writer >= 5.3.10.39 collaboraofficebasis5.3-impress >= 
5.3.10.39 collaboraofficebasis5.3-graphicfilter >= 5.3.10.39 
collaboraofficebasis5.3-en-US >= 5.3.10.39 collaboraofficebasis5.3-calc >= 
5.3.10.39 collaboraofficebasis5.3-en-US-res >= 5.3.10.39 
collaboraofficebasis5.3-en-US-calc >= 5.3.10.39 
collaboraofficebasis5.3-ooofonts >= 5.3.10.39 collaboraofficebasis5.3-images >= 
5.3.10.39 collaboraofficebasis5.3-noto-fonts >= 5.3.10.39 
collaboraofficebasis5.3-draw >= 5.3.10.39 
collaboraofficebasis5.3-extension-pdf-import >= 5.3.10.39 
collaboraofficebasis5.3-filter-data >= 5.3.10.39
+Requires:   collaboraoffice5.3 >= 5.3.10.40 collaboraoffice5.3-ure >= 
5.3.10.40 collaboraofficebasis5.3-core >= 5.3.10.40 
collaboraofficebasis5.3-writer >= 5.3.10.40 collaboraofficebasis5.3-imp

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

2018-02-15 Thread Andras Timar
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 926a200f0aaed63dda3c019da246720350a3e246
Author: Andras Timar 
Date:   Thu Feb 15 22:28:16 2018 +0100

Bump version to 5.3-40

Change-Id: Iacd281b1c97e5db66ecfeb3c7bf9298a13230d2a

diff --git a/configure.ac b/configure.ac
index f741ac3562b2..76d5a94739e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[5.3.10.39],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[5.3.10.40],[],[],[https://collaboraoffice.com/])
 
 AC_PREREQ([2.59])
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: setup_native/CustomTarget_scripts.mk setup_native/scripts

2018-02-15 Thread Michael Stahl
 setup_native/CustomTarget_scripts.mk  |   20 -
 setup_native/scripts/install_solaris.sh   |  376 --
 setup_native/scripts/uninstall_solaris.sh |   74 -
 3 files changed, 470 deletions(-)

New commits:
commit e1082e45361a92a31adedcc3ed0a35c704bca543
Author: Michael Stahl 
Date:   Thu Feb 15 22:23:10 2018 +0100

setup_native: remove {un,}install_solaris.sh

These scripts were never shipped to end users (the corresponding
install_linux.sh was only added to the instset in LO times,
see 117b3242dbdcf5c9690921f2f4cf1495df10c11e) but were used
by QA and developers to install multiple Solaris builds
as non-root using getuid.so.

But the "archive" installation set can be used for the
same purpopse and doesn't require a custom script.

Change-Id: I665277bef7c5ddd58e798f5f1b1c6a97a0f3cfc5

diff --git a/setup_native/CustomTarget_scripts.mk 
b/setup_native/CustomTarget_scripts.mk
index 5a50a69b4e36..c7f8c5b0aec1 100644
--- a/setup_native/CustomTarget_scripts.mk
+++ b/setup_native/CustomTarget_scripts.mk
@@ -35,24 +35,4 @@ $(scripts_WORKDIR)/uninstall: 
$(SRCDIR)/setup_native/scripts/uninstall_linux.sh
 endif
 endif
 
-ifeq ($(OS),SOLARIS)
-$(eval $(call gb_CustomTarget_register_targets,setup_native/scripts,\
-   install \
-   uninstall \
-   getuid.so.stripped \
-))
-
-$(scripts_WORKDIR)/getuid.so.stripped: $(call gb_Library_get_target,getuid)
-   cp $< $@
-   /usr/ccs/bin/strip $@
-
-$(scripts_WORKDIR)/install: $(SRCDIR)/setup_native/scripts/install_solaris.sh 
$(scripts_WORKDIR)/getuid.so.stripped
-   $(PERL) -w $(SRCDIR)/setup_native/scripts/install_create.pl $^ $@
-   chmod 775 $@
-
-$(scripts_WORKDIR)/uninstall: 
$(SRCDIR)/setup_native/scripts/uninstall_solaris.sh 
$(scripts_WORKDIR)/getuid.so.stripped
-   $(PERL) -w $(SRCDIR)/setup_native/scripts/install_create.pl $^ $@
-   chmod 775 $@
-endif
-
 # vim: set noet sw=4 ts=4:
diff --git a/setup_native/scripts/install_solaris.sh 
b/setup_native/scripts/install_solaris.sh
deleted file mode 100644
index de60ea92be67..
--- a/setup_native/scripts/install_solaris.sh
+++ /dev/null
@@ -1,376 +0,0 @@
-#!/usr/bin/env bash
-#
-# 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 .
-#
-
-ADD="no"
-LINK="no"
-UPDATE="no"
-USAGE="Usage: $0 [-a] [-l] [-h]  "
-
-help()
-{
-  echo
-  echo "User Mode Installation script for developer and knowledgeable early 
access tester"
-  echo
-  echo "This installation method is not intended for use in a production 
environment!"
-  echo "Using this script is unsupported and completely at your own risk"
-  echo
-  echo "Usage:" $0 "  [-l]"
-  echo ":   directory *only* containing the Solaris 
pkg packages to be installed"
-  echo "or language pack shell script containing 
the Solaris pkg packages"
-  echo ": directory to where the office and the 
pkg database will get installed into"
-  echo
-  echo "Optional Parameter:"
-  echo "-a :  add to an existing "
-  echo "-l :  create a link \"soffice\" in $HOME"
-  echo "-h :  output this help"
-}
-
-try_to_unpack_languagepack_file()
-{
-  FILENAME=$PACKAGE_PATH
-
-  # Checking, if $FILENAME is a language pack.
-  # String "language package" has to exist in the shell script file.
-  # If this is no language pack, the installation is not supported
-
-  SEARCHSTRING=`head -n 10 $FILENAME | grep "language package"`
-
-  if [ ! -z "$SEARCHSTRING" ]
-  then
-echo "First parameter $FILENAME is a language pack";
-  else
-printf "\nERROR: First parameter $FILENAME is a file, but no language pack 
shell script.\n"
-echo $USAGE
-exit 2
-  fi
-
-  echo "Unpacking shell script $FILENAME"
-  # TAILLINE=`head -n 20 $FILENAME | sed --quiet 's/linenum=//p'`
-  TAILLINE=`head -n 20 $FILENAME | sed -n 's/linenum=//p'`
-
-  if [ -x "/usr/bin/mktemp" ]  # available in Solaris 10
-  then
-UNPACKDIR=`mktemp -d`
-  else
-UNPACKDIR=/var/tmp/install_$$
-mkdir $UNPACKDIR
-  fi
-
-  echo $UNPACKDIR
-  tail +$TAILLINE $FILENAME | gunzip | (cd $UNPACKDIR; tar xvf -)
-
-  # Setting the new package path, in which the packages exist
-  PACKAGE_PATH=

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

2018-02-15 Thread Andras Timar
 loleaflet/po/templates/loleaflet-ui.pot  |  244 ---
 loleaflet/src/control/Control.Menubar.js |6 
 2 files changed, 131 insertions(+), 119 deletions(-)

New commits:
commit 7e99607e31d00f76299670621745e6454cf1ef3e
Author: Andras Timar 
Date:   Thu Feb 15 22:33:49 2018 +0100

loleaflet: updated UI pot file

diff --git a/loleaflet/po/templates/loleaflet-ui.pot 
b/loleaflet/po/templates/loleaflet-ui.pot
index e3bcd7d8..88b2448f 100644
--- a/loleaflet/po/templates/loleaflet-ui.pot
+++ b/loleaflet/po/templates/loleaflet-ui.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-01-17 16:48+0100\n"
+"POT-Creation-Date: 2018-02-15 22:32+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME \n"
 "Language-Team: LANGUAGE \n"
@@ -117,7 +117,7 @@ msgstr ""
 msgid "Network Graph"
 msgstr ""
 
-#: admin.strings.js:30 src/layer/marker/Annotation.js:222
+#: admin.strings.js:30 src/layer/marker/Annotation.js:224
 msgid "Save"
 msgstr ""
 
@@ -268,234 +268,238 @@ msgid ""
 "server administrator."
 msgstr ""
 
-#: dist/toolbar/toolbar.js:104
+#: dist/toolbar/toolbar.js:106
 msgid "%n users"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:105
+#: dist/toolbar/toolbar.js:107
 msgid "1 user"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:106
+#: dist/toolbar/toolbar.js:108
 msgid "0 users"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:270
+#: dist/toolbar/toolbar.js:276
 msgid "Are you sure you want to delete this page?"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:456
+#: dist/toolbar/toolbar.js:465
 msgid "Textwrap"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:457
+#: dist/toolbar/toolbar.js:466
 msgid "No wrap"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:458
+#: dist/toolbar/toolbar.js:467
 msgid "Page wrap"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:459
+#: dist/toolbar/toolbar.js:468
 msgid "Wrap anchor only"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:460
+#: dist/toolbar/toolbar.js:469
 msgid "Ideal wrap"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:461
+#: dist/toolbar/toolbar.js:470
 msgid "Left wrap"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:462
+#: dist/toolbar/toolbar.js:471
 msgid "Right wrap"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:463
+#: dist/toolbar/toolbar.js:472
 msgid "Wrap through"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:469
+#: dist/toolbar/toolbar.js:478
 msgid "Document repair"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:512
+#: dist/toolbar/toolbar.js:521
 msgid "Insert table"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:517
+#: dist/toolbar/toolbar.js:526
 msgid "More"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:615 dist/toolbar/toolbar.js:1089
+#: dist/toolbar/toolbar.js:624 dist/toolbar/toolbar.js:1099
 msgid "Sum"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:616
+#: dist/toolbar/toolbar.js:625
 msgid "Function"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:617 src/layer/marker/Annotation.js:161
+#: dist/toolbar/toolbar.js:626 src/layer/marker/Annotation.js:163
 msgid "Cancel"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:618
+#: dist/toolbar/toolbar.js:627
 msgid "Accept"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:634
+#: dist/toolbar/toolbar.js:643
 msgid "First sheet"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:635
+#: dist/toolbar/toolbar.js:644
 msgid "Previous sheet"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:636
+#: dist/toolbar/toolbar.js:645
 msgid "Next sheet"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:637
+#: dist/toolbar/toolbar.js:646
 msgid "Last sheet"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:647 src/control/Control.Menubar.js:269
+#: dist/toolbar/toolbar.js:647
+msgid "Insert sheet"
+msgstr ""
+
+#: dist/toolbar/toolbar.js:657 src/control/Control.Menubar.js:274
 msgid "Fullscreen presentation"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:664
+#: dist/toolbar/toolbar.js:674
 msgid "Search:"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:671
+#: dist/toolbar/toolbar.js:681
 msgid "Cancel the search"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:676
+#: dist/toolbar/toolbar.js:686
 msgid "No users"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:680
+#: dist/toolbar/toolbar.js:690
 msgid "Always follow the editor"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:683
+#: dist/toolbar/toolbar.js:693
 msgid "Current"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:690 src/control/Control.Menubar.js:59
-#: src/control/Control.Menubar.js:237
+#: dist/toolbar/toolbar.js:700 src/control/Control.Menubar.js:60
+#: src/control/Control.Menubar.js:242
 msgid "Reset zoom"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:722
+#: dist/toolbar/toolbar.js:732
 msgid "%user has joined"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:723
+#: dist/toolbar/toolbar.js:733
 msgid "%user has left"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:889 dist/toolbar/toolbar.js:1469
+#: dist/toolbar/toolbar.js:899 dist/toolbar/toolbar.js:1484
 msgid "Size"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:1067
+#: dist/toolbar/toolbar.js:1077
 msgid "Number of Sheets"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:1

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - bundled/include

2018-02-15 Thread Andras Timar
 bundled/include/LibreOfficeKit/LibreOfficeKit.h   |1 +
 bundled/include/LibreOfficeKit/LibreOfficeKit.hxx |6 --
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit f96d59cc023aeb15f1468082c4ab79392e007900
Author: Andras Timar 
Date:   Thu Feb 15 23:01:26 2018 +0100

Update bundled LOK headers

Change-Id: I526d3a4207f1721761a3877f50d8580aab840b7c

diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h 
b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index bb99e04a..2af965e4 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
@@ -291,6 +291,7 @@ struct _LibreOfficeKitDocumentClass
 
 /// @see lok::Document::postExtTextInputEvent
 void (*postExtTextInputEvent) (LibreOfficeKitDocument* pThis,
+   unsigned nWindowId,
int nType,
const char* pText);
 
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
index c076c0f0..fabd3b29 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -539,12 +539,14 @@ public:
 /**
  * Post the text input from external input window, like IME
  *
+ * @param nWindowId Specify the window id to post the input event to. If
+ * nWindow is 0, the event is posted into the document
  * @param nType see LibreOfficeKitExtTextInputType
  * @param pText Text for LOK_EXT_TEXTINPUT
  */
-void postExtTextInputEvent(int nType, const char* pText)
+void postExtTextInputEvent(unsigned nWindowId, int nType, const char* 
pText)
 {
-mpDoc->pClass->postExtTextInputEvent(mpDoc, nType, pText);
+mpDoc->pClass->postExtTextInputEvent(mpDoc, nWindowId, nType, pText);
 }
 
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3-desktop' - jvmfwk/plugins

2018-02-15 Thread Stephan Bergmann
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx |   72 +
 1 file changed, 43 insertions(+), 29 deletions(-)

New commits:
commit 3e2bc9edb8cb71fbeb892ba2bd3587343870e21d
Author: Stephan Bergmann 
Date:   Thu Feb 15 08:31:49 2018 +0100

Find Java 9 with the new registry keys on Windows

See 
 section "Windows Registry Key Changes".

Reviewed-on: https://gerrit.libreoffice.org/49792
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit cc8e8215c8d7583f36feca20f0a1235edc05a6d7)
Conflicts:
jvmfwk/plugins/sunmajor/pluginlib/util.cxx

Change-Id: Ic30ce430663cc1608c6268fa937142f73c55f138
Reviewed-on: https://gerrit.libreoffice.org/49823
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index d1a0088f1510..062abf494f0a 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -577,35 +577,6 @@ bool decodeOutput(const OString& s, OUString* out)
 
 
 #if defined(_WIN32)
-void addJavaInfoFromWinReg(
-std::vector > & allInfos,
-std::vector > & addedInfos)
-{
-// Get Java s from registry
-std::vector vecJavaHome;
-if(getSDKInfoFromRegistry(vecJavaHome))
-{
-// create impl objects
-typedef std::vector::iterator ItHome;
-for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
-++it_home)
-{
-getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
-}
-}
-
-vecJavaHome.clear();
-if(getJREInfoFromRegistry(vecJavaHome))
-{
-typedef std::vector::iterator ItHome;
-for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
-++it_home)
-{
-getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
-}
-   }
-}
-
 
 bool getJavaInfoFromRegistry(const wchar_t* szRegKey,
  vector& vecJavaHome)
@@ -687,6 +658,49 @@ bool getJREInfoFromRegistry(vector& vecJavaHome)
 return getJavaInfoFromRegistry(HKEY_SUN_JRE, vecJavaHome);
 }
 
+void addJavaInfoFromWinReg(
+std::vector > & allInfos,
+std::vector > & addedInfos)
+{
+// Get Java s from registry
+std::vector vecJavaHome;
+if(getSDKInfoFromRegistry(vecJavaHome))
+{
+// create impl objects
+typedef std::vector::iterator ItHome;
+for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
+++it_home)
+{
+getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
+}
+}
+
+vecJavaHome.clear();
+if(getJREInfoFromRegistry(vecJavaHome))
+{
+typedef std::vector::iterator ItHome;
+for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
+++it_home)
+{
+getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
+}
+   }
+
+vecJavaHome.clear();
+if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JDK", vecJavaHome)) {
+for (auto const & javaHome: vecJavaHome) {
+getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+}
+}
+
+vecJavaHome.clear();
+if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JRE", vecJavaHome)) {
+for (auto const & javaHome: vecJavaHome) {
+getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+}
+}
+}
+
 #endif // WNT
 
 void bubbleSortVersion(vector >& vec)
___
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' - jvmfwk/plugins

2018-02-15 Thread Stephan Bergmann
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx |   72 +
 1 file changed, 43 insertions(+), 29 deletions(-)

New commits:
commit 1104be609f2847387da2da16c4dd1be624f1c858
Author: Stephan Bergmann 
Date:   Thu Feb 15 08:31:49 2018 +0100

Find Java 9 with the new registry keys on Windows

See 
 section "Windows Registry Key Changes".

Reviewed-on: https://gerrit.libreoffice.org/49792
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit cc8e8215c8d7583f36feca20f0a1235edc05a6d7)
Conflicts:
jvmfwk/plugins/sunmajor/pluginlib/util.cxx

Change-Id: Ic30ce430663cc1608c6268fa937142f73c55f138
Reviewed-on: https://gerrit.libreoffice.org/49822
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index d1a0088f1510..062abf494f0a 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -577,35 +577,6 @@ bool decodeOutput(const OString& s, OUString* out)
 
 
 #if defined(_WIN32)
-void addJavaInfoFromWinReg(
-std::vector > & allInfos,
-std::vector > & addedInfos)
-{
-// Get Java s from registry
-std::vector vecJavaHome;
-if(getSDKInfoFromRegistry(vecJavaHome))
-{
-// create impl objects
-typedef std::vector::iterator ItHome;
-for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
-++it_home)
-{
-getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
-}
-}
-
-vecJavaHome.clear();
-if(getJREInfoFromRegistry(vecJavaHome))
-{
-typedef std::vector::iterator ItHome;
-for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
-++it_home)
-{
-getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
-}
-   }
-}
-
 
 bool getJavaInfoFromRegistry(const wchar_t* szRegKey,
  vector& vecJavaHome)
@@ -687,6 +658,49 @@ bool getJREInfoFromRegistry(vector& vecJavaHome)
 return getJavaInfoFromRegistry(HKEY_SUN_JRE, vecJavaHome);
 }
 
+void addJavaInfoFromWinReg(
+std::vector > & allInfos,
+std::vector > & addedInfos)
+{
+// Get Java s from registry
+std::vector vecJavaHome;
+if(getSDKInfoFromRegistry(vecJavaHome))
+{
+// create impl objects
+typedef std::vector::iterator ItHome;
+for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
+++it_home)
+{
+getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
+}
+}
+
+vecJavaHome.clear();
+if(getJREInfoFromRegistry(vecJavaHome))
+{
+typedef std::vector::iterator ItHome;
+for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end();
+++it_home)
+{
+getAndAddJREInfoByPath(*it_home, allInfos, addedInfos);
+}
+   }
+
+vecJavaHome.clear();
+if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JDK", vecJavaHome)) {
+for (auto const & javaHome: vecJavaHome) {
+getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+}
+}
+
+vecJavaHome.clear();
+if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JRE", vecJavaHome)) {
+for (auto const & javaHome: vecJavaHome) {
+getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
+}
+}
+}
+
 #endif // WNT
 
 void bubbleSortVersion(vector >& vec)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: accessibility/source basctl/source basic/source editeng/source include/svl sc/source sd/source svl/qa svl/source svx/source sw/source

2018-02-15 Thread Caolán McNamara
 accessibility/source/extended/textwindowaccessibility.cxx|2 -
 basctl/source/basicide/basides1.cxx  |4 +--
 basctl/source/basicide/basidesh.cxx  |4 +--
 basic/source/classes/sb.cxx  |6 ++---
 basic/source/classes/sbxmod.cxx  |6 ++---
 basic/source/sbx/sbxcoll.cxx |2 -
 basic/source/sbx/sbxobj.cxx  |8 +++
 editeng/source/editeng/impedit5.cxx  |2 -
 include/svl/lstner.hxx   |   12 ++-
 sc/source/ui/Accessibility/AccessibleDocument.cxx|2 -
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx |2 -
 sc/source/ui/condformat/condformatdlgentry.cxx   |4 +--
 sc/source/ui/view/prevwsh.cxx|4 +--
 sc/source/ui/view/tabvwsh4.cxx   |6 ++---
 sd/source/ui/view/ViewShellBase.cxx  |4 +--
 svl/qa/unit/notify/test_SfxBroadcaster.cxx   |8 +++
 svl/source/notify/lstner.cxx |8 +++
 svx/source/gallery2/gallery1.cxx |2 -
 svx/source/svdraw/svdobj.cxx |2 -
 svx/source/svdraw/svdotxat.cxx   |2 -
 svx/source/tbxctrls/colrctrl.cxx |2 -
 sw/source/uibase/uiview/srcview.cxx  |2 -
 sw/source/uibase/uiview/view.cxx |4 +--
 23 files changed, 54 insertions(+), 44 deletions(-)

New commits:
commit 7faa218231b7a807412feada3aa1223b43b5626e
Author: Caolán McNamara 
Date:   Thu Feb 15 14:10:30 2018 +

ofz#6311 still problems with SdrEdgeObj listening to same obj at start as 
end

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

diff --git a/accessibility/source/extended/textwindowaccessibility.cxx 
b/accessibility/source/extended/textwindowaccessibility.cxx
index 24433d0505bc..50b472d66371 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -38,7 +38,7 @@ void SfxListenerGuard::startListening(::SfxBroadcaster & 
rNotifier)
 {
 assert(m_pNotifier == nullptr && "called more than once");
 m_pNotifier = &rNotifier;
-m_rListener.StartListening(*m_pNotifier, true);
+m_rListener.StartListening(*m_pNotifier, DuplicateHandling::Prevent);
 }
 
 void SfxListenerGuard::endListening()
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index 4c3f3dabffe5..c79557501913 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -282,7 +282,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
 
 ScriptDocument aDocument( 
ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
 
-StartListening( *pBasMgr, true /* log on only once */ );
+StartListening(*pBasMgr, DuplicateHandling::Prevent /* log on only 
once */);
 OUString aLibName( rInfo.GetLib() );
 if ( aLibName.isEmpty() )
 aLibName = "Standard" ;
@@ -1229,7 +1229,7 @@ VclPtr Shell::ShowActiveModuleWindow( 
StarBASIC const * pBasic )
 else
 SAL_WARN( "basctl.basicide", "No BASIC!");
 if (BasicManager* pBasicMgr = FindBasicManager(pBasic))
-StartListening( *pBasicMgr, true /* log on only once */ );
+StartListening(*pBasicMgr, DuplicateHandling::Prevent /* log on 
only once */);
 return pWin;
 }
 return nullptr;
diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index 8c5518d17160..ad39f4c84b70 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -633,7 +633,7 @@ void Shell::UpdateWindows()
 ++doc
 )
 {
-StartListening( *doc->getBasicManager(), true /* log on only once */ );
+StartListening(*doc->getBasicManager(), DuplicateHandling::Prevent /* 
log on only once */);
 
 // libraries
 Sequence< OUString > aLibNames( doc->getLibraryNames() );
@@ -669,7 +669,7 @@ void Shell::UpdateWindows()
 {
 StarBASIC* pLib = doc->getBasicManager()->GetLib( 
aLibName );
 if ( pLib )
-StartListening( pLib->GetBroadcaster(), true /* 
log on only once */ );
+StartListening(pLib->GetBroadcaster(), 
DuplicateHandling::Prevent /* log on only once */);
 
 try
 {
diff --git a/basic/source/classe

[Libreoffice-commits] core.git: desktop/source framework/source include/sfx2 include/vcl sfx2/source sw/inc sw/source sw/uiconfig vcl/inc vcl/source vcl/unx

2018-02-15 Thread Caolán McNamara
 desktop/source/app/app.cxx  |4 
 framework/source/jobs/helponstartup.cxx |2 
 include/sfx2/sfxhelp.hxx|2 
 include/vcl/field.hxx   |4 
 include/vcl/help.hxx|7 
 include/vcl/layout.hxx  |   28 
 include/vcl/lstbox.hxx  |2 
 include/vcl/svapp.hxx   |   11 
 include/vcl/weld.hxx|  495 ++
 include/vcl/window.hxx  |3 
 sfx2/source/appl/appserv.cxx|2 
 sfx2/source/appl/sfxhelp.cxx|  200 +++-
 sw/inc/swabstdlg.hxx|2 
 sw/source/ui/chrdlg/break.cxx   |  168 +--
 sw/source/ui/dialog/swdlgfact.cxx   |   17 
 sw/source/ui/dialog/swdlgfact.hxx   |   13 
 sw/source/uibase/inc/break.hxx  |   51 -
 sw/source/uibase/inc/uitool.hxx |2 
 sw/source/uibase/shells/textsh1.cxx |7 
 sw/source/uibase/utlui/uitool.cxx   |   14 
 sw/uiconfig/swriter/ui/insertbreak.ui   |1 
 vcl/inc/salframe.hxx|6 
 vcl/inc/salinst.hxx |   11 
 vcl/inc/unx/gtk/gtkframe.hxx|1 
 vcl/inc/unx/gtk/gtkinst.hxx |2 
 vcl/source/app/help.cxx |5 
 vcl/source/app/salvtables.cxx   | 1085 ++
 vcl/source/control/combobox.cxx |2 
 vcl/source/control/field.cxx|   14 
 vcl/source/control/listbox.cxx  |5 
 vcl/source/window/builder.cxx   |  116 ++
 vcl/source/window/menuwindow.cxx|4 
 vcl/source/window/window2.cxx   |6 
 vcl/unx/gtk3/gtk3gtkframe.cxx   |2 
 vcl/unx/gtk3/gtk3gtkinst.cxx| 1572 +++-
 35 files changed, 3699 insertions(+), 167 deletions(-)

New commits:
commit 6a3f9de585fc0e8e6191db5210729ae6b3730e7d
Author: Caolán McNamara 
Date:   Tue Feb 13 17:41:03 2018 +

native dialog initial basis

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

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index d00adb195ac0..936671f07e58 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1995,7 +1995,7 @@ void Desktop::OpenClients()
 #elif defined WNT
 aHelpURL += "&System=WIN";
 #endif
-Application::GetHelp()->Start(aHelpURL, nullptr);
+Application::GetHelp()->Start(aHelpURL, static_cast(nullptr));
 return;
 }
 }
@@ -2361,7 +2361,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& 
rAppEvent )
 break;
 case ApplicationEvent::Type::OpenHelpUrl:
 // start help for a specific URL
-Application::GetHelp()->Start(rAppEvent.GetStringData(), nullptr);
+Application::GetHelp()->Start(rAppEvent.GetStringData(), 
static_cast(nullptr));
 break;
 case ApplicationEvent::Type::Print:
 {
diff --git a/framework/source/jobs/helponstartup.cxx 
b/framework/source/jobs/helponstartup.cxx
index ebabadf6fd7b..67f670f31e3e 100644
--- a/framework/source/jobs/helponstartup.cxx
+++ b/framework/source/jobs/helponstartup.cxx
@@ -139,7 +139,7 @@ css::uno::Any SAL_CALL HelpOnStartup::execute(const 
css::uno::Sequence< css::bea
 // Note: The help window brings itself to front ...
 Help* pHelp = Application::GetHelp();
 if (pHelp)
-pHelp->Start(sModuleDependentHelpURL, nullptr);
+pHelp->Start(sModuleDependentHelpURL, 
static_cast(nullptr));
 }
 }
 
diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx
index fb2eeac49707..d9b41b6544f7 100644
--- a/include/sfx2/sfxhelp.hxx
+++ b/include/sfx2/sfxhelp.hxx
@@ -34,8 +34,10 @@ class SFX2_DLLPUBLIC SfxHelp : public Help
 
 private:
 SAL_DLLPRIVATE static bool Start_Impl( const OUString& rURL, const 
vcl::Window* pWindow, const OUString& rKeyword );
+SAL_DLLPRIVATE static bool Start_Impl(const OUString& rURL, weld::Widget* 
pWidget, const OUString& rKeyword);
 SAL_DLLPRIVATE virtual void SearchKeyword( const OUString& rKeyWord ) 
override;
 SAL_DLLPRIVATE virtual bool Start( const OUString& rURL, const 
vcl::Window* pWindow ) override;
+SAL_DLLPRIVATE virtual bool Start(const OUString& rURL, weld::Widget* 
pWidget) override;
 SAL_DLLPRIVATE static OUString GetHelpModuleName_Impl(const OUString 
&rHelpId);
 SAL_DLLPRIVATE static OUString CreateHelpURL_Impl( const OUString& 
aCommandURL, const OUString& rModuleName );
 
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index be973f6d8bdf..0380259acf01 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -40,6 +40,7 @@ class VCL_DLLPUBLIC FormatterBase
 {
 private:
 VclPtrmpField;
+Link   maOutputHdl;
 st

Guidance for GSoC

2018-02-15 Thread Vishal Karodia
Hello there,

I've been trying to get started to open source for some months. It would be
great if you could guide me or just tell me where i should start from. I
have a GitHub account and know C++ upto file handling and have been using
LibreOffice for quite a long time now. I've been thinking of preparing for
GSoC 2019 and need this valuable guidance.

Would be great if you reply to this email and help me a little.

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


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

2018-02-15 Thread Noel Grandin
 include/tools/gen.hxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 28753a11d4d5198d473660f386176cec5a1b4533
Author: Noel Grandin 
Date:   Thu Feb 15 16:15:26 2018 +0200

rename MoveFoo to AdjustFoo in Point/Rect/Size

 noel_grandin, "MoveLeft" is a somewhat misleading function name
in dd4fc3b1e3f8a7c69a44c26715b2e3cdb22aede9
 sberg, better ideas?
 AdjustLeft etc., like the AdjustWidth/Height?
 sberg, sure, np

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

diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 0e5289b0765c..38ca77af9046 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -82,8 +82,8 @@ public:
 long&   Y() { return nB; }
 
 voidMove( long nHorzMove, long nVertMove );
-voidMoveX( long nHorzMove ) { nA += nHorzMove; }
-voidMoveY( long nVertMove ) { nB += nVertMove; }
+voidAdjustX( long nHorzMove ) { nA += nHorzMove; }
+voidAdjustY( long nVertMove ) { nB += nVertMove; }
 
 voidRotateAround( long& rX, long& rY, short nOrientation ) 
const;
 
@@ -404,10 +404,10 @@ public:
 
 /// Move the top and left edges by a delta, preserving width and height
 inline void Move( long nHorzMoveDelta, long nVertMoveDelta );
-voidMoveLeft( long nHorzMoveDelta ) { nLeft += 
nHorzMoveDelta; }
-voidMoveRight( long nHorzMoveDelta ) { nRight += 
nHorzMoveDelta; }
-voidMoveTop( long nVertMoveDelta ) { nTop += 
nVertMoveDelta; }
-voidMoveBottom( long nVertMoveDelta ) { nBottom += 
nVertMoveDelta; }
+voidAdjustLeft( long nHorzMoveDelta ) { nLeft += 
nHorzMoveDelta; }
+voidAdjustRight( long nHorzMoveDelta ) { nRight += 
nHorzMoveDelta; }
+voidAdjustTop( long nVertMoveDelta ) { nTop += 
nVertMoveDelta; }
+voidAdjustBottom( long nVertMoveDelta ) { nBottom += 
nVertMoveDelta; }
 inline void SetPos( const Point& rPoint );
 voidSetSize( const Size& rSize );
 inline Size GetSize() const;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-15 Thread Noel Grandin
 compilerplugins/clang/changetoolsgen.cxx |  179 +--
 compilerplugins/clang/plugin.cxx |6 -
 2 files changed, 130 insertions(+), 55 deletions(-)

New commits:
commit da2f9c20f61033caa29757942b4f3e709a48ed7c
Author: Noel Grandin 
Date:   Thu Feb 15 14:01:04 2018 +0200

loplugin:changetoolsgen various improvements

- use AdjustFoo variants of methods on Rect/Size/Point
- ignore double assignments
- improve error messages
- handle expressions that include macros by using getExpansionLoc
- replace ++X() with X() + 1

Change-Id: Ida6b06b2a92e9226168aff6b1b8031f5867687b4

diff --git a/compilerplugins/clang/changetoolsgen.cxx 
b/compilerplugins/clang/changetoolsgen.cxx
index 93856ca311f6..53246226eff8 100644
--- a/compilerplugins/clang/changetoolsgen.cxx
+++ b/compilerplugins/clang/changetoolsgen.cxx
@@ -37,10 +37,12 @@ public:
 private:
 bool ChangeAssignment(Stmt const* parent, std::string const& methodName,
   std::string const& setPrefix);
-bool ChangeBinaryOperator(BinaryOperator const* parent, CXXMemberCallExpr 
const* call,
-  std::string const& methodName, std::string 
const& setPrefix);
+bool ChangeBinaryOperatorPlusMinus(BinaryOperator const* parent, 
CXXMemberCallExpr const* call,
+   std::string const& methodName);
+bool ChangeBinaryOperatorOther(BinaryOperator const* parent, 
CXXMemberCallExpr const* call,
+   std::string const& methodName, std::string 
const& setPrefix);
 bool ChangeUnaryOperator(UnaryOperator const* parent, CXXMemberCallExpr 
const* call,
- std::string const& methodName, std::string const& 
setPrefix);
+ std::string const& methodName);
 std::string extractCode(SourceLocation startLoc, SourceLocation endLoc);
 };
 
@@ -108,31 +110,58 @@ bool 
ChangeToolsGen::VisitCXXMemberCallExpr(CXXMemberCallExpr const* call)
 return true;
 if (auto unaryOp = dyn_cast(parent))
 {
-if (!ChangeUnaryOperator(unaryOp, call, methodName, setPrefix))
-report(DiagnosticsEngine::Warning, "Could not fix this one1", 
call->getLocStart());
+if (!ChangeUnaryOperator(unaryOp, call, methodName))
+report(DiagnosticsEngine::Warning, "Could not fix, unary", 
call->getLocStart());
 return true;
 }
 auto binaryOp = dyn_cast(parent);
 if (!binaryOp)
 {
-//parent->dump();
-//report(DiagnosticsEngine::Warning, "Could not fix this 
one3", call->getLocStart());
+// normal getter
 return true;
 }
 auto opcode = binaryOp->getOpcode();
 if (opcode == BO_Assign)
 {
+// Check for assignments embedded inside other expressions
+auto parent2 = getParentStmt(parent);
+if (dyn_cast_or_null(parent2))
+parent2 = getParentStmt(parent2);
+if (parent2 && isa(parent2))
+{
+report(DiagnosticsEngine::Warning, "Could not fix, embedded 
assign",
+   call->getLocStart());
+return true;
+}
+// Check for
+//   X.Width() = X.Height() = 1;
+if (auto rhs = 
dyn_cast(binaryOp->getRHS()->IgnoreParenImpCasts()))
+if (rhs->getOpcode() == BO_Assign)
+{
+report(DiagnosticsEngine::Warning, "Could not fix, double 
assign",
+   call->getLocStart());
+return true;
+}
 if (!ChangeAssignment(parent, methodName, setPrefix))
-report(DiagnosticsEngine::Warning, "Could not fix this one4", 
call->getLocStart());
+report(DiagnosticsEngine::Warning, "Could not fix, assign", 
call->getLocStart());
 return true;
 }
-if (opcode == BO_RemAssign || opcode == BO_AddAssign || opcode == 
BO_SubAssign
-|| opcode == BO_MulAssign || opcode == BO_DivAssign)
+if (opcode == BO_AddAssign || opcode == BO_SubAssign)
 {
-if (!ChangeBinaryOperator(binaryOp, call, methodName, setPrefix))
-report(DiagnosticsEngine::Warning, "Could not fix this one5", 
call->getLocStart());
+if (!ChangeBinaryOperatorPlusMinus(binaryOp, call, methodName))
+report(DiagnosticsEngine::Warning, "Could not fix, 
assign-and-change",
+   call->getLocStart());
 return true;
 }
+else if (opcode == BO_RemAssign || opcode == BO_MulAssign || opcode == 
BO_DivAssign)
+{
+if (!ChangeBinaryOperatorOther(binaryOp, call, methodName, setPrefix))
+report(DiagnosticsEngine::Warning, "Could not fix, 
assign-and-change",
+   call->getLocStart());
+return true;
+}
+else
+assert(false);
 return true;
 }
 
@@ -144,8 +173,8 @@ bool ChangeToolsGen::ChangeAssignment(Stmt const* parent, 
std::string const& met
   

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

2018-02-15 Thread Miklos Vajna
 connectivity/source/drivers/writer/WCatalog.cxx |3 ++-
 sw/source/filter/ww8/rtfattributeoutput.cxx |1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5b12898378556538c86f92ed368d6be6c461a169
Author: Miklos Vajna 
Date:   Thu Feb 15 22:52:30 2018 +0100

connectitivty: can use o3tl::make_unique<> here

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

diff --git a/connectivity/source/drivers/writer/WCatalog.cxx 
b/connectivity/source/drivers/writer/WCatalog.cxx
index ea78c89bc4e7..9d273e201945 100644
--- a/connectivity/source/drivers/writer/WCatalog.cxx
+++ b/connectivity/source/drivers/writer/WCatalog.cxx
@@ -24,6 +24,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 
@@ -54,7 +55,7 @@ void OWriterCatalog::refreshTables()
 if (m_pTables)
 m_pTables->reFill(aVector);
 else
-m_pTables.reset(new OWriterTables(m_xMetaData, *this, m_aMutex, 
aVector));
+m_pTables = o3tl::make_unique(m_xMetaData, *this, 
m_aMutex, aVector);
 }
 
 } // namespace writer
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 88c70e14532d..50a653d79560 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -63,7 +63,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits