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

2017-04-28 Thread Christian Lohmaier
Tag 'libreoffice-5.4.0.0.alpha1' created by Christian Lohmaier 
 at 2017-04-28 17:50 +

Tag libreoffice-5.4.0.0.alpha1
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAABAgAGBQJZA4DpAAoJEPQ0oe+v7q6j59UP/1mL+I8wNwnSKf0JG9sOzADK
26xTPeh9b/Og0uESFkoqHB7SQSEW8F7BoQlKir40BGY0+6TE0eG0Yv3kpGapvPtI
kl/081aKgPPM0goqtteACxRMX76SW7XQQCqqmfrrkQqfQb3bi6nR/vzLzhO2vAkL
dMGx5u191hl3o1+sU/eY14RM7qtU5DgdQtc2uyCLWxmNgP2pnjVsW4aZOPmpwlRs
tfPtY6TO/fhiYqHvmRw9lvK2KipF1L12IOFf0sGUKeyNwrLSg1PXVDtexeQ5mrpS
28F08dli72fc+9oUL8FrxgoPbr/ZN+RBgnaK4SRTbtE25sWRU530oX6MUR5LC2z5
9vHekrfY2soomLKp3BYdl/Idk5qBjJrdXmaWZJX3hpCTZSCWRsCihY1yj4XiVCu2
TOxNdlJOMGy0BdhBOfZqjHvSxxWRvucdJUJuhasltGn7KO9TTf8h9MA1l1QnN7UQ
4WvrRoxkzN44ITNuEvQVEeC6RyRK9paPaWj7p4llx4Dim/qXg1zkTzxmGRshjuPl
ZhVnTWbNde6GsLc1/yA2CmCF76es965uxxX2PRsQPeLZcJZxBuW+6qGX584PvZ9v
wprzbfROCHcvdqBHNiMh3/mknsknNBvIr6B7oBoC3nLpYL2xAyvZ5CEe7s20QQLC
VjR239W7qiQQNPLqMakR
=qdMm
-END PGP SIGNATURE-

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


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

2017-04-28 Thread Christian Lohmaier
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6307b68e6c08cca0c623583c791d21491528a0f9
Author: Christian Lohmaier 
Date:   Fri Apr 28 19:51:57 2017 +0200

bump product version to 5.4.0.0.alpha1+

Change-Id: I6a6f88698133b77d030a3fb6b54dbafb7dca3e58

diff --git a/configure.ac b/configure.ac
index 415927b030ea..c15fa5582f59 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([LibreOffice],[5.4.0.0.alpha0+],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[5.4.0.0.alpha1+],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Christian Lohmaier
Tag 'libreoffice-5.4.0.0.alpha1' created by Christian Lohmaier 
 at 2017-04-28 17:50 +

Tag libreoffice-5.4.0.0.alpha1
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAABAgAGBQJZA4DgAAoJEPQ0oe+v7q6jCDsP/R99Qs1XKqtQYn473mJueeVs
Cq7sZ2f8453ogZs8+d49Nftp0c5vrVBevJusynmY+36IVb1+a2Fj8I9YTIvb3n/k
k249LtRfqHKF7fjKI9TzSj/dfcQmLbaG7aJdH8SBbB5jI9IpDZl93zvAZLUns+SB
7Vephbi0JN5L3bMHgG+iCSHCfFMGb2jT5onTMupshg7drNi83OXeC5MDWVQl9Hz0
qfnnm32BWGyEOmh4rc2+XzG/OIAi09ahmdWTbquV27q6qY8AxVyv56baRDS1coby
OQU2NQjl3fbd/K1NfULCuY44W4Q3IPfcZBuSVSCBXBhHMsJGvPsB7KB8a4OXLzLv
3YFUbBhJVnt/wxV5Pq6itbZJaOJMbrAfCVzBOzDek7zn6NRHYJ8sU4z0ibDP9/x6
8vxIJ74HAE96QNnPaMBsuOSRu6fc/xXrEB8wIv6Ql3UYfr07gNMYyzNk2/fyBMvH
HckUHSvXPliMjryQhZfx7800uBF64yJtd9umrU0QFogsY778UtD7JbDIGEZ3sxqm
s9c5cIEfy+jkYj+a32BT+BMKIHD/tZBfr/vY6OEHy/GqSuH4WBbxc5PoRZukL6x7
NgEvXEYaIj2pKJiKSWhojv4ulYXtDdeW7mHhNGwHz/Zno7vL65z0EDOTSwavHvBL
7oZs9iVGtzahzsU2y7tz
=Q8F9
-END PGP SIGNATURE-

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


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

2017-04-28 Thread Caolán McNamara
 scaddins/source/analysis/analysishelper.cxx |  607 --
 scaddins/source/analysis/deffuncname.hxx|  631 
 sw/source/filter/ww8/ww8par4.cxx|6 
 3 files changed, 635 insertions(+), 609 deletions(-)

New commits:
commit 0a4495f8bde3a30638baefd9506688f42d137997
Author: Caolán McNamara 
Date:   Fri Apr 28 16:22:08 2017 +0100

static_cast after dynamic_cast

Change-Id: I60a4bdc36c96c7b70db63e61e247f46439b68ac9

diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index b090f15106f2..347c398a1b01 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -287,10 +287,10 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* 
pGrf,
 
 if (pRet)   // OLE object was inserted
 {
-if (dynamic_cast< const SdrOle2Obj *>( pRet ) !=  nullptr)
+if (SdrOle2Obj *pOleObj = dynamic_cast(pRet))
 {
-pFormat = InsertOle(*static_cast(pRet), *pFlySet, 
pGrfSet);
-SdrObject::Free( pRet );// we don't need this anymore
+pFormat = InsertOle(*pOleObj, *pFlySet, pGrfSet);
+SdrObject::Free(pRet); // we don't need this anymore
 }
 else
 pFormat = 
m_rDoc.getIDocumentContentOperations().InsertDrawObj(*m_pPaM, *pRet, *pFlySet );
commit 167e46926839ae51f3d33d17f2111bb487fd765c
Author: Caolán McNamara 
Date:   Fri Apr 28 15:25:51 2017 +0100

split these out into a standalone header

cut down on the chance they get mangled by a non utf-8 editor

Change-Id: I672885c26883275ba57fbfac49a6c761ec00bef1

diff --git a/scaddins/source/analysis/analysishelper.cxx 
b/scaddins/source/analysis/analysishelper.cxx
index 5891564e290e..45b96b5c4464 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -30,6 +30,7 @@
 #include 
 #include "analysishelper.hxx"
 #include "analysis.hrc"
+#include "deffuncname.hxx"
 
 using namespace ::com::sun::star;
 using namespace sca::analysis;
@@ -46,612 +47,6 @@ using namespace sca::analysis;
 #define FUNCDATAS( FUNCNAME, DBL, OPT, NUMOFPAR, CAT, SUFFIX ) \
 { "get" #FUNCNAME, ANALYSIS_FUNCNAME_##FUNCNAME, ANALYSIS_##FUNCNAME, DBL, 
OPT, ANALYSIS_DEFFUNCNAME_##FUNCNAME, NUMOFPAR, CAT, SUFFIX }
 
-static const char* ANALYSIS_DEFFUNCNAME_Workday[2] =
-{
-u8"ARBEITSTAG",
-u8"WORKDAY"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Yearfrac[2] =
-{
-u8"BRTEILJAHRE",
-u8"YEARFRAC"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Edate[2] =
-{
-u8"EDATUM",
-u8"EDATE"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Weeknum[2] =
-{
-u8"KALENDERWOCHE",
-u8"WEEKNUM"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Eomonth[2] =
-{
-u8"MONATSENDE",
-u8"EOMONTH"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Networkdays[2] =
-{
-u8"NETTOARBEITSTAGE",
-u8"NETWORKDAYS"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Amordegrc[2] =
-{
-u8"AMORDEGRK",
-u8"AMORDEGRC"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Amorlinc[2] =
-{
-u8"AMORLINEARK",
-u8"AMORLINC"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Accrint[2] =
-{
-u8"AUFGELZINS",
-u8"ACCRINT"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Accrintm[2] =
-{
-u8"AUFGELZINSF",
-u8"ACCRINTM"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Received[2] =
-{
-u8"AUSZAHLUNG",
-u8"RECEIVED"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Disc[2] =
-{
-u8"DISAGIO",
-u8"DISC"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Duration[2] =
-{
-u8"DURATION",
-u8"DURATION"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Effect[2] =
-{
-u8"EFFEKTIV",
-u8"EFFECT"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Cumprinc[2] =
-{
-u8"KUMKAPITAL",
-u8"CUMPRINC"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Cumipmt[2] =
-{
-u8"KUMZINSZ",
-u8"CUMIPMT"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Price[2] =
-{
-u8"KURS",
-u8"PRICE"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Pricedisc[2] =
-{
-u8"KURSDISAGIO",
-u8"PRICEDISC"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Pricemat[2] =
-{
-u8"KURSFÄLLIG",
-u8"PRICEMAT"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Mduration[2] =
-{
-u8"MDURATION",
-u8"MDURATION"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Nominal[2] =
-{
-u8"NOMINAL",
-u8"NOMINAL"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Dollarfr[2] =
-{
-u8"NOTIERUNGBRU",
-u8"DOLLARFR"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Dollarde[2] =
-{
-u8"NOTIERUNGDEZ",
-u8"DOLLARDE"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Yield[2] =
-{
-u8"RENDITE",
-u8"YIELD"
-};
-
-static const char* ANALYSIS_DEFFUNCNAME_Yielddisc[2] =
-{
-u8"RENDITEDIS",
-u8"YIELDDISC"
-};
-
-static const 

Re: Google Summer of Code 2017 - Some help needed

2017-04-28 Thread Till Kamppeter

On 04/28/2017 05:26 AM, Heiko Tietze wrote:

That's really great news (and a very ambitious project). If you consider
to also touch the frontend please have a look on what the UX team did
some time ago https://pad.documentfoundation.org/p/UX-PrintDialog. Feel
free to ask in case of usability related questions. The design team will
happy to be of service.


Thanks for the link, but I cannot access it, not even read-only. It 
seems to be private.


Does a free software project like LibreOffice have trade secrets?

   Till

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


Re: Google Summer of Code 2017 - Some help needed

2017-04-28 Thread Till Kamppeter

On 04/28/2017 01:09 PM, Heiko Tietze wrote:

What a shame ;-). No idea why this didn't work, it's just an etherpad.
Perhaps the server was down for a moment. Could you please try again.


Tried it again and now it is working. Thanks.

   Till


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


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

2017-04-28 Thread Michael Stahl
 sw/inc/swevent.hxx |   39 +++
 1 file changed, 35 insertions(+), 4 deletions(-)

New commits:
commit 32403675bf9d2d0380956f9a82da71593edbb53c
Author: Michael Stahl 
Date:   Fri Apr 28 18:54:27 2017 +0200

tdf#107494 sw: fix crash in SwCallMouseEvent when deleting header

The problem is that SwCallMouseEvent::PTR.pFormat is not cleared
when the format is destroyed; instead SwDoc::CallEvent() checks via
SwFrameFormats::Contains() that the format is still alive,
which uses dynamic_cast on the deleted format.

(presumably regression from 0f98299f7aa44bbb55c1bfeddca7799f727d14b0)

Change-Id: I0d155c162d75b5687b58329a2a862ad57a4eb72e

diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx
index ed63b5f80b39..3eb0fb8bfa23 100644
--- a/sw/inc/swevent.hxx
+++ b/sw/inc/swevent.hxx
@@ -22,6 +22,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 #define SW_EVENT_OBJECT_SELECT( EVENT_APP_START + 0 )
 #define SW_EVENT_START_INS_GLOSSARY   ( EVENT_APP_START + 1 )
@@ -62,6 +64,7 @@ enum SwCallEventObjectType
 // Structure for the exchange between UI/CORE.
 
 struct SwCallMouseEvent
+: public SwClient
 {
 SwCallEventObjectType eType;
 union
@@ -84,14 +87,21 @@ struct SwCallMouseEvent
 : eType( EVENT_OBJECT_NONE )
 { PTR.pFormat = nullptr; PTR.IMAP.pIMapObj = nullptr; }
 
+SwCallMouseEvent(SwCallMouseEvent const& rOther)
+: SwClient(rOther.GetRegisteredInNonConst())
+, eType(rOther.eType)
+{
+memcpy(, , sizeof(PTR));
+}
+
 void Set( SwCallEventObjectType eTyp, const SwFrameFormat* pFormat )
-{ eType = eTyp; PTR.pFormat = pFormat; PTR.IMAP.pIMapObj = nullptr; }
+{ Clear(); eType = eTyp; PTR.pFormat = pFormat; PTR.IMAP.pIMapObj = 
nullptr; assert(pFormat); const_cast(pFormat)->Add(this); }
 
 void Set( const SwFrameFormat* pFormat, const IMapObject* pIMapObj )
-{ eType = EVENT_OBJECT_IMAGEMAP; PTR.pFormat = pFormat; 
PTR.IMAP.pIMapObj = pIMapObj; }
+{ Clear(); eType = EVENT_OBJECT_IMAGEMAP; PTR.pFormat = pFormat; 
PTR.IMAP.pIMapObj = pIMapObj; assert(pFormat); 
const_cast(pFormat)->Add(this); }
 
 void Set( const SwFormatINetFormat* pINetAttr )
-{ eType = EVENT_OBJECT_INETATTR; PTR.pINetAttr = pINetAttr; 
PTR.IMAP.pIMapObj = nullptr; }
+{ Clear(); eType = EVENT_OBJECT_INETATTR; PTR.pINetAttr = pINetAttr; 
PTR.IMAP.pIMapObj = nullptr; }
 
 bool operator==( const SwCallMouseEvent& rEvent ) const
 {
@@ -103,9 +113,30 @@ struct SwCallMouseEvent
 {   return !( *this == rEvent );}
 
 void Clear()
-{ eType = EVENT_OBJECT_NONE; PTR.pFormat = nullptr; PTR.IMAP.pIMapObj 
= nullptr; }
+{
+if (EVENT_OBJECT_IMAGE == eType || EVENT_OBJECT_URLITEM == eType 
|| EVENT_OBJECT_IMAGEMAP == eType)
+{
+// note: pFormat is not necessarily the same as
+// GetRegisteredIn() here; see ~SwFormat()
+assert(PTR.pFormat);
+GetRegisteredInNonConst()->Remove(this);
+}
+eType = EVENT_OBJECT_NONE; PTR.pFormat = nullptr; 
PTR.IMAP.pIMapObj = nullptr;
+}
 
 bool HasEvent() const { return EVENT_OBJECT_NONE != eType; }
+
+virtual void Modify(SfxPoolItem const*const pOldValue, SfxPoolItem 
const*const pNewValue) override
+{
+assert(EVENT_OBJECT_IMAGE == eType || EVENT_OBJECT_URLITEM == eType || 
EVENT_OBJECT_IMAGEMAP == eType);
+SwClient::Modify(pOldValue, pNewValue);
+if (!GetRegisteredIn() ||
+(RES_FMT_CHG == pOldValue->Which()
+ && static_cast(pOldValue)->pChangedFormat == 
PTR.pFormat))
+{
+Clear();
+}
+}
 };
 
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dictionaries

2017-04-28 Thread Christian Lohmaier
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 471315b8cd6617c225b965c89014f5d4cef844ec
Author: Christian Lohmaier 
Date:   Fri Apr 28 19:47:19 2017 +0200

reset dictionaries back to master

has been changed by 6cb9e6dad798ec59f055aebe84a9c4a21e4be40d on error

Change-Id: I9f1f8bb0e5e2cb2533fc882caae440f849c3cac3

diff --git a/dictionaries b/dictionaries
index d759f48f50da..66a5dd1c02f2 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit d759f48f50da7ecd05b045780079b54d339f36c6
+Subproject commit 66a5dd1c02f2f626fc28ba378b7ad7d5463c83b8
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Google Summer of Code 2017 - Some help needed

2017-04-28 Thread Heiko Tietze
What a shame ;-). No idea why this didn't work, it's just an etherpad.
Perhaps the server was down for a moment. Could you please try again.

On 04/28/17 18:04, Till Kamppeter wrote:
> On 04/28/2017 05:26 AM, Heiko Tietze wrote:
>> That's really great news (and a very ambitious project). If you consider
>> to also touch the frontend please have a look on what the UX team did
>> some time ago https://pad.documentfoundation.org/p/UX-PrintDialog. Feel
>> free to ask in case of usability related questions. The design team will
>> happy to be of service.
>
> Thanks for the link, but I cannot access it, not even read-only. It
> seems to be private.
>
> Does a free software project like LibreOffice have trade secrets?
>
>Till
>

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


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

2017-04-28 Thread Christian Lohmaier
Tag 'libreoffice-5.4.0.0.alpha1' created by Christian Lohmaier 
 at 2017-04-28 17:50 +

Tag libreoffice-5.4.0.0.alpha1
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAABAgAGBQJZA4D3AAoJEPQ0oe+v7q6j7tYP/AzA0cwkzNdKhk0aEE5Zi5qO
Ti5e/Hfu9mCq5IBBzG3so+G5wShl+so4+3cZTQbY1zK9yyDMznzdO6TfqtR6LGhs
Mg1ZanOjuxjxze1ZqdvxrMqqOLcfS1i0mr7eaYmPlhrH5zs3+Mjwb8/ejZxAZQ/q
zL1a5iOc8pHeTNySBkvJS95DOZSFt0ou+pk/QJOMgci5T17WUotPwDro27KVUX7L
cDTxYURz3mpJqZ4URvD67p44qQWrxaPsQPm9gNYyW1l0xgc8xQ+anCt2WlN84sr4
uZSCXbujjCx/TWsKIjT2WCMPl+ci146tdew6QdrVN1VKI+4UkTedyDeeDb0ERwsH
8KP5hJruF7NwHgOW5/GBmny+mAXcUa93+Dfip/RKlGkeFaoJyo60O+LjgqwDBGFx
nRGtjnetxo0GHCFwCDtwBOAQI60ssIHW1GUg22gjInI9pFpOxKs+MwNERiFR/+DU
9Ce+adMLuwWmY6AviwC1mW38IDCBP1UInrIIUTp8Y1RWhTMB+1waAMmSysn5Rt8T
fRN/tBWmKHiar2UooLbFOo+OLX6dFqSIda/p6Hw4zAVAlRVRc8Ym6YSV5LMPiEwm
8ohGNKK+Z/QX7OezXF4WpRzXBONUK2bHl91fr8UYBCRUX8zre5K1nEzvDEZrBgsn
aGJDyp+4L+Ywvh0NK2/t
=+jLA
-END PGP SIGNATURE-

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


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

2017-04-28 Thread Christian Lohmaier
Tag 'libreoffice-5.4.0.0.alpha1' created by Christian Lohmaier 
 at 2017-04-28 17:50 +

Tag libreoffice-5.4.0.0.alpha1
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAABAgAGBQJZA4D7AAoJEPQ0oe+v7q6jHVgQAMRcO7Au3o5XJmOdNCjJXBM0
m2LVvRuCbgsBtDOCju0wTtvAdhiGQOE79yHPPbYVM5zs449cmFyxElJpQueWJ4XH
7atyvxWQP6g8rWA3gNVoNr5azkhRULTeOx/aV7TQKWQFDZscY8JnTNiOr4Ek5Vqf
0dFYXo2Hrt+LVBB7jdN62VL+w8NBjm5iyDh89vAG8ajJOx2+KySqnkCtTNhCrSCd
HJ9ifPDFH2lsdfWgH3rKXRXMnJJMsNDepkMCd3vvtEErFiiULmPwizl1PcVJA28B
SenC6aO+FX+Tt4RiCcnka7bISkbvKE1az3HK7aer2hfLjxioOhaiLBZJ6ILwObIh
OF0Q/7K2QrRY866syobJsAnEPZ75BHTBUnR2+39zUw9eoq78mIryLvU4KQ+Azv9D
AmZ4MbW0XJ3UMoFpVu1M112VG+n937kwSFxh5IEsGTS3yUs9jI9MMM4tipoNLBw6
qW0QWjoeC82fVDc0CKaUk/X5cGXP3rzl//uBOaj/eZGjQfEUAn2pLvNiRpaMSb3K
63Czj0hfi7Zg2oGSneOz7Sl/KfqNuGcR9ZROGHXn26irUk3wYdyL11S0e0WYBHg3
UnESBlHTMgu23yC0OiNky8N3u+La9pWBG8n3HJCQkSbS3j0STsAqefh42TSp6JQa
7oQR3eAETaeWXoGk6E/R
=fmfl
-END PGP SIGNATURE-

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


[Libreoffice-commits] online.git: 4 commits - common/Log.cpp common/Log.hpp common/Seccomp.cpp common/SigUtil.cpp common/SigUtil.hpp

2017-04-28 Thread Michael Meeks
 common/Log.cpp |   15 
 common/Log.hpp |2 +
 common/Seccomp.cpp |   95 -
 common/SigUtil.cpp |   11 --
 common/SigUtil.hpp |3 +
 5 files changed, 108 insertions(+), 18 deletions(-)

New commits:
commit 31818b7dd65dcacf0c52fa8900ae129bc91c72b3
Author: Michael Meeks 
Date:   Fri Apr 28 19:06:20 2017 +0100

Trap rather than kill from seccomp and log invalid syscalls.

Change-Id: I319c10776476fea865dd7a95921f1b08b689e09f

diff --git a/common/Seccomp.cpp b/common/Seccomp.cpp
index 3156f199..b0709cd6 100644
--- a/common/Seccomp.cpp
+++ b/common/Seccomp.cpp
@@ -19,22 +19,59 @@
 #include 
 #include 
 #include 
-
-#include 
-
-#include 
-
+#include 
 #include 
 #include 
 #include 
 #include 
 
+#include 
+#include 
+#include 
+
+#ifndef SYS_SECCOMP
+#  define SYS_SECCOMP 1
+#endif
+
 #if defined(__x86_64__)
 #  define AUDIT_ARCH_NR AUDIT_ARCH_X86_64
+#  define REG_SYSCALL   REG_RAX
 #else
 #  error "Platform does not support seccomp filtering yet - unsafe."
 #endif
 
+extern "C" {
+
+static void handleSysSignal(int /* signal */,
+siginfo_t *info,
+void *context)
+{
+   ucontext_t *uctx = reinterpret_cast(context);
+
+Log::signalLogPrefix();
+Log::signalLog("SIGSYS trapped with code: ");
+Log::signalLogNumber(info->si_code);
+Log::signalLog(" and context ");
+Log::signalLogNumber(reinterpret_cast(context));
+Log::signalLog("\n");
+
+   if (info->si_code != SYS_SECCOMP || !uctx)
+   return;
+
+   unsigned int syscall = uctx->uc_mcontext.gregs[REG_SYSCALL];
+
+Log::signalLogPrefix();
+Log::signalLog(" seccomp trapped signal, un-authorized sys-call: ");
+Log::signalLogNumber(syscall);
+Log::signalLog("\n");
+
+SigUtil::dumpBacktrace();
+
+_exit(1);
+}
+
+} // extern "C"
+
 namespace Seccomp {
 
 bool lockdown(Type type)
@@ -47,7 +84,7 @@ bool lockdown(Type type)
 
 #define KILL_SYSCALL(name) \
 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_##name, 0, 1), \
-BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL)
+BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_TRAP)
 
 struct sock_filter filterCode[] = {
 // Check our architecture is correct.
@@ -139,8 +176,7 @@ bool lockdown(Type type)
 KILL_SYSCALL(seccomp), // no further fiddling
 KILL_SYSCALL(bpf), // no further fiddling
 
-// allow the rest - FIXME: prolly we should white-list
-// but LibreOffice is rather large.
+// allow the rest.
 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW)
 };
 
@@ -160,7 +196,17 @@ bool lockdown(Type type)
 return false;
 }
 
+// Trap, log, and exit on failure
+struct sigaction action;
+
+sigemptyset(_mask);
+action.sa_flags = SA_SIGINFO;
+action.sa_handler = reinterpret_cast<__sighandler_t>(handleSysSignal);
+
+sigaction(SIGSYS, , nullptr);
+
 LOG_TRC("Install seccomp filter successfully.");
+
 return true;
 }
 
commit 08c70f1315ac49a253f76b4ea08cba4a9ac7a9b6
Author: Michael Meeks 
Date:   Fri Apr 28 19:05:45 2017 +0100

Signal safe number logging (lame but useful).

Change-Id: I0b6095fc08dcc237a224b5942ab5a09e6820e43f

diff --git a/common/Log.cpp b/common/Log.cpp
index 71b5a5b6..e4a9e995 100644
--- a/common/Log.cpp
+++ b/common/Log.cpp
@@ -78,6 +78,21 @@ namespace Log
 }
 }
 
+// We need a signal safe means of writing messages
+//   $ man 7 signal
+void signalLogNumber(size_t num)
+{
+int i;
+char buf[22];
+buf[21] = '\0';
+for (i = 20; i > 0 && num > 0; --i)
+{
+buf[i] = '0' + num % 10;
+num /= 10;
+}
+signalLog(buf + i + 1);
+}
+
 char* prefix(char* buffer, const char* level, bool sigSafe)
 {
 long osTid;
diff --git a/common/Log.hpp b/common/Log.hpp
index 3f64303a..21de30f6 100644
--- a/common/Log.hpp
+++ b/common/Log.hpp
@@ -50,6 +50,8 @@ namespace Log
 void signalLogPrefix();
 /// Signal safe logging
 void signalLog(const char* message);
+/// Signal log number
+void signalLogNumber(size_t num);
 
 /// The following is to write streaming logs.
 /// Log::info() << "Value: 0x" << std::hex << value
commit a7eeacf9e05ed2447cfb6881e7bf3fcdfc25ccf4
Author: Michael Meeks 
Date:   Fri Apr 28 18:08:57 2017 +0100

SigUtil: split out dumpBacktrace.

Change-Id: I33121de341051bf40ae0d42d1d6d44843d6d1e97

diff --git a/common/SigUtil.cpp b/common/SigUtil.cpp
index c6c4ffe4..48899f37 100644
--- a/common/SigUtil.cpp
+++ b/common/SigUtil.cpp
@@ -190,6 +190,14 @@ namespace SigUtil
 
 sigaction(signal, , nullptr);
 
+dumpBacktrace();
+
+// let default handler process the signal
+kill(Poco::Process::id(), signal);
+}
+
+void 

[Libreoffice-commits] core.git: xmlsecurity/Executable_pdfverify.mk

2017-04-28 Thread Markus Mohrhard
 xmlsecurity/Executable_pdfverify.mk |4 
 1 file changed, 4 deletions(-)

New commits:
commit 6f53cf281eb3c13fc516ff79decb70b2a87a96d0
Author: Markus Mohrhard 
Date:   Sat Apr 29 05:11:40 2017 +0200

apparently the executable does not need pdfium directly anymore

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

diff --git a/xmlsecurity/Executable_pdfverify.mk 
b/xmlsecurity/Executable_pdfverify.mk
index 9a67a785983a..11c22d1d7ea6 100644
--- a/xmlsecurity/Executable_pdfverify.mk
+++ b/xmlsecurity/Executable_pdfverify.mk
@@ -11,10 +11,6 @@ $(eval $(call gb_Executable_Executable,pdfverify))
 
 $(eval $(call gb_Executable_use_sdk_api,pdfverify))
 
-$(eval $(call gb_Executable_use_externals,pdfverify,\
-   pdfium \
-))
-
 $(eval $(call gb_Executable_set_include,pdfverify,\
 $$(INCLUDE) \
 -I$(SRCDIR)/xmlsecurity/inc \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Julien Nabet
 svx/source/unodraw/unoshap2.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit ffd7e06be3a05a7912dc4fc507e03865a01c894c
Author: Julien Nabet 
Date:   Thu Apr 27 07:10:16 2017 +0200

Avoid warning about FlushCustomShapeUnoApiObjects

See 
http://nabble.documentfoundation.org/Unknown-FlushCustomShapeUnoApiObjects-property-xmloff-svx-td4212940.html

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

diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 779155c1f51a..48c0158b8fb9 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1691,6 +1691,9 @@ void SAL_CALL SvxCustomShape::setPropertyValue( const 
OUString& aPropertyName, c
 // will free the involved EditEngine and VirtualDevice.
 pTarget->mxCustomShapeEngine.set(nullptr);
 }
+// since this case is only for the application cores
+// we should return from this function now
+return;
 }
 
 bool bCustomShapeGeometry = pObject && aPropertyName == 
"CustomShapeGeometry";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Markus Mohrhard
 comphelper/source/misc/hash.cxx |6 ++
 include/comphelper/hash.hxx |1 +
 2 files changed, 7 insertions(+)

New commits:
commit cf45dda9a515e92d97dc6202b78f0dd1a41781a2
Author: Markus Mohrhard 
Date:   Fri Apr 21 05:51:26 2017 +0200

add MD5 hashing to generic digest class

Change-Id: If3abc80f8511d9c7bf0d5197ce28ef4cf60a6b45
Reviewed-on: https://gerrit.libreoffice.org/36792
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx
index eaefd59003c3..5e250f1ed0d3 100644
--- a/comphelper/source/misc/hash.cxx
+++ b/comphelper/source/misc/hash.cxx
@@ -31,6 +31,8 @@ struct HashImpl
 {
 switch (meType)
 {
+case HashType::MD5:
+return HASH_AlgMD5;
 case HashType::SHA1:
 return HASH_AlgSHA1;
 case HashType::SHA256:
@@ -48,6 +50,8 @@ struct HashImpl
 {
 switch (meType)
 {
+case HashType::MD5:
+return EVP_md5();
 case HashType::SHA1:
 return EVP_sha1();
 case HashType::SHA256:
@@ -121,6 +125,8 @@ size_t Hash::getLength() const
 {
 switch (mpImpl->meType)
 {
+case HashType::MD5:
+return 16;
 case HashType::SHA1:
 return 20;
 case HashType::SHA256:
diff --git a/include/comphelper/hash.hxx b/include/comphelper/hash.hxx
index c14c6c748fee..d8145604ac6b 100644
--- a/include/comphelper/hash.hxx
+++ b/include/comphelper/hash.hxx
@@ -16,6 +16,7 @@ namespace comphelper {
 
 enum class HashType
 {
+MD5,
 SHA1,
 SHA256,
 SHA512
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Markus Mohrhard
 sfx2/source/control/unoctitm.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit da8aa9ea1521a0c02e97299b58990721467fc126
Author: Markus Mohrhard 
Date:   Fri Apr 28 18:26:26 2017 +0200

also log the paramter passed as string arguments

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

diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 17a4e5d3c736..6f56aa1e1580 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -609,7 +609,7 @@ void collectUIInformation(const util::URL& rURL, const 
uno::Sequencehttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Markus Mohrhard
 include/oox/crypto/CryptTools.hxx|   34 
 oox/source/crypto/AgileEngine.cxx|   14 ++-
 oox/source/crypto/CryptTools.cxx |  131 ---
 oox/source/crypto/Standard2007Engine.cxx |   18 +---
 4 files changed, 20 insertions(+), 177 deletions(-)

New commits:
commit 0a3ded1def24194b01c9f2849ed91af4954fbb5f
Author: Markus Mohrhard 
Date:   Fri Apr 21 06:28:14 2017 +0200

replace oox internal hashing code with new comphelper code

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

diff --git a/include/oox/crypto/CryptTools.hxx 
b/include/oox/crypto/CryptTools.hxx
index 84e4c485cb9d..d5bc5b95bda3 100644
--- a/include/oox/crypto/CryptTools.hxx
+++ b/include/oox/crypto/CryptTools.hxx
@@ -113,40 +113,6 @@ public:
 sal_uInt32 inputLength = 0) override;
 };
 
-class Digest final
-{
-public:
-enum DigestType
-{
-UNKNOWN,
-SHA1,
-SHA512
-};
-
-private:
-DigestType meType;
-
-#if USE_TLS_OPENSSL
-EVP_MD_CTX* mpContext;
-#endif
-
-#if USE_TLS_NSS
-HASHContext* mpContext;
-#endif
-
-public:
-Digest(DigestType eType);
-~Digest();
-
-void update(std::vector& input);
-void finalize(std::vector& digest);
-
-sal_uInt32 getLength();
-
-static bool sha1(  std::vector& digest, std::vector& 
input);
-static bool sha512(std::vector& digest, std::vector& 
input);
-};
-
 } // namespace core
 } // namespace oox
 
diff --git a/oox/source/crypto/AgileEngine.cxx 
b/oox/source/crypto/AgileEngine.cxx
index 9c1095a01f4d..72539509c965 100644
--- a/oox/source/crypto/AgileEngine.cxx
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -13,6 +13,8 @@
 #include 
 #include 
 
+#include 
+
 namespace oox {
 namespace core {
 
@@ -25,9 +27,17 @@ bool hashCalc(std::vector& output,
   const OUString& sAlgorithm )
 {
 if (sAlgorithm == "SHA1")
-return Digest::sha1(output, input);
+{
+std::vector out = 
comphelper::Hash::calculateHash(input.data(), input.size(), 
comphelper::HashType::SHA1);
+output = out;
+return true;
+}
 else if (sAlgorithm == "SHA512")
-return Digest::sha512(output, input);
+{
+std::vector out = 
comphelper::Hash::calculateHash(input.data(), input.size(), 
comphelper::HashType::SHA512);
+output = out;
+return true;
+}
 return false;
 }
 
diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx
index b1e3345c5453..b23d3ebbf57b 100644
--- a/oox/source/crypto/CryptTools.cxx
+++ b/oox/source/crypto/CryptTools.cxx
@@ -193,137 +193,6 @@ sal_uInt32 Encrypt::update(std::vector& 
output, std::vector(outputLength);
 }
 
-// Digest
-
-namespace
-{
-
-#if USE_TLS_OPENSSL
-const EVP_MD* lclOpenSSLgetEngine(Digest::DigestType eType)
-{
-switch(eType)
-{
-case Digest::SHA1:
-return EVP_sha1();
-case Digest::SHA512:
-return EVP_sha512();
-default:
-break;
-}
-return NULL;
-}
-#endif
-
-#if USE_TLS_NSS
-HASH_HashType lclNSSgetHashType(Digest::DigestType eType)
-{
-switch(eType)
-{
-case Digest::SHA1:
-return HASH_AlgSHA1;
-case Digest::SHA512:
-return HASH_AlgSHA512;
-default:
-break;
-}
-return HASH_AlgNULL;
-}
-#endif
-
-}
-
-Digest::Digest(DigestType eType) :
-meType(eType)
-{
-#if USE_TLS_OPENSSL
-mpContext = EVP_MD_CTX_create();
-EVP_DigestInit_ex(mpContext, lclOpenSSLgetEngine(eType), NULL);
-#endif
-
-#if USE_TLS_NSS
-NSS_NoDB_Init(nullptr);
-mpContext = HASH_Create(lclNSSgetHashType(eType));
-HASH_Begin(mpContext);
-#endif
-}
-
-Digest::~Digest()
-{
-#if USE_TLS_OPENSSL
-if(mpContext)
-EVP_MD_CTX_destroy(mpContext);
-#endif
-
-#if USE_TLS_NSS
-if(mpContext)
-HASH_Destroy(mpContext);
-#endif
-}
-
-sal_uInt32 Digest::getLength()
-{
-switch(meType)
-{
-case SHA1:
-return msfilter::SHA1_HASH_LENGTH;
-case SHA512:
-return msfilter::SHA512_HASH_LENGTH;
-default:
-break;
-}
-return 0;
-}
-
-void Digest::update(std::vector& input)
-{
-#if USE_TLS_OPENSSL
-EVP_DigestUpdate(mpContext, input.data(), input.size());
-#endif
-#if USE_TLS_NSS
-HASH_Update(mpContext, input.data(), input.size());
-#endif
-}
-
-void Digest::finalize(std::vector& digest)
-{
-digest.clear();
-
-#if USE_TLS_OPENSSL
-unsigned int digestWrittenLength;
-digest.resize(getLength(), 0);
-EVP_DigestFinal_ex(mpContext, digest.data(), );
-#endif
-
-#if USE_TLS_NSS
-unsigned int digestWrittenLength;
-unsigned int digestLength = static_cast(getLength());
-digest.resize(digestLength, 0);
-

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

2017-04-28 Thread Markus Mohrhard
 comphelper/qa/unit/test_hash.cxx |   12 
 1 file changed, 12 insertions(+)

New commits:
commit 5bd7713a6b7aa3ad0eaa7f535cd932c2a316acb5
Author: Markus Mohrhard 
Date:   Fri Apr 21 05:51:46 2017 +0200

add test for MD5 hashing

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

diff --git a/comphelper/qa/unit/test_hash.cxx b/comphelper/qa/unit/test_hash.cxx
index d31d1764..070da3c5c6c2 100644
--- a/comphelper/qa/unit/test_hash.cxx
+++ b/comphelper/qa/unit/test_hash.cxx
@@ -18,11 +18,13 @@
 class TestHash : public CppUnit::TestFixture
 {
 public:
+void testMD5();
 void testSHA1();
 void testSHA256();
 void testSHA512();
 
 CPPUNIT_TEST_SUITE(TestHash);
+CPPUNIT_TEST(testMD5);
 CPPUNIT_TEST(testSHA1);
 CPPUNIT_TEST(testSHA256);
 CPPUNIT_TEST(testSHA512);
@@ -44,6 +46,16 @@ std::string tostring(const std::vector& a)
 
 }
 
+void TestHash::testMD5()
+{
+comphelper::Hash aHash(comphelper::HashType::MD5);
+const char* const pInput = "";
+aHash.update(reinterpret_cast(pInput), 0);
+std::vector calculate_hash = aHash.finalize();
+CPPUNIT_ASSERT_EQUAL(size_t(16), calculate_hash.size());
+CPPUNIT_ASSERT_EQUAL(std::string("d41d8cd98f00b204e9800998ecf8427e"), 
tostring(calculate_hash));
+}
+
 void TestHash::testSHA1()
 {
 comphelper::Hash aHash(comphelper::HashType::SHA1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Caolán McNamara
 svtools/source/misc/embedhlp.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit b616f7eeb67cd1833d2b86f6ef4a76c4e8f1ceb2
Author: Caolán McNamara 
Date:   Fri Apr 28 17:03:12 2017 +0100

bNeedUpdate is set to false twice

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

diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 9900317a05b1..fbebecfdf027 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -356,7 +356,6 @@ void EmbeddedObjectRef::Clear()
 }
 
 mpImpl->mxObj = nullptr;
-mpImpl->bNeedUpdate = false;
 }
 
 mpImpl->pContainer = nullptr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Jochen Nitschke
 tools/qa/cppunit/test_inetmime.cxx |8 +
 tools/source/inet/inetmime.cxx |  167 -
 2 files changed, 61 insertions(+), 114 deletions(-)

New commits:
commit 8250e1a4a3f103bf37ca09c8dbab0584a5a1c2cf
Author: Jochen Nitschke 
Date:   Fri Apr 28 01:23:00 2017 +0200

use std container for ParameterList

'ParameterList::find' was used to detect duplicate sections and
sort the parameters by attribute and section.
Checking for duplicates is done by 'std::any_of' and
the predicate 'Parameter::IsSameSection' now.
The parameters are inserted as they are parsed and sorted later
with 'std::sort' algorithm and 'Parameter::operator<'

Adapt loops to use iterators. Change a weird 'for' loop in
'parseParameters' to a 'do .. while ..' loop to match style of a
preceding loop.

Extend unit test with a case of duplicate sections.

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

diff --git a/tools/qa/cppunit/test_inetmime.cxx 
b/tools/qa/cppunit/test_inetmime.cxx
index 8b953526778c..f41b72850bf0 100644
--- a/tools/qa/cppunit/test_inetmime.cxx
+++ b/tools/qa/cppunit/test_inetmime.cxx
@@ -130,16 +130,18 @@ namespace
 input = "TEST/subTST;"
 "parm1*0*=us-ascii'en'value;PARM1*1*=1;"
 "parm2*0*=WINDOWS-1250'en-GB'value2%20%80;"
-"parm3*0*=UNKNOWN'EN'value3";
+"parm3*0*=UNKNOWN'EN'value3;"
+"parm1*1*=2";   // this parameter is a 
duplicate,
+// the scan should end before 
this parameter
 // Just scan input for valid string:
 end = INetMIME::scanContentType(input.getStr(), 
input.getStr()+input.getLength());
 CPPUNIT_ASSERT(end != nullptr);
-CPPUNIT_ASSERT_EQUAL(OUString(), OUString(end));
+CPPUNIT_ASSERT_EQUAL(OUString(";parm1*1*=2"), OUString(end)); // 
the invalid end of input
 // Scan input and parse type, subType and parameters:
 end = INetMIME::scanContentType(input.getStr(), input.getStr() + 
input.getLength(),
 , , );
 CPPUNIT_ASSERT(end != nullptr);
-CPPUNIT_ASSERT_EQUAL(OUString(), OUString(end));
+CPPUNIT_ASSERT_EQUAL(OUString(";parm1*1*=2"), OUString(end)); // 
the invalid end of input
 CPPUNIT_ASSERT_EQUAL(OUString("test"), type);
 CPPUNIT_ASSERT_EQUAL(OUString("subtst"), subType);
 CPPUNIT_ASSERT_EQUAL(
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index e95ebd56ef76..6479f70add18 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -17,8 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -366,7 +368,6 @@ void appendISO88591(OUString & rText, sal_Char const * 
pBegin,
 
 struct Parameter
 {
-Parameter * m_pNext;
 OString m_aAttribute;
 OString m_aCharset;
 OString m_aLanguage;
@@ -374,49 +375,22 @@ struct Parameter
 sal_uInt32 m_nSection;
 bool m_bExtended;
 
-inline Parameter(Parameter * pTheNext, const OString& rTheAttribute,
- const OString& rTheCharset,
- const OString& rTheLanguage,
- const OString& rTheValue, sal_uInt32 nTheSection,
- bool bTheExtended);
-};
-
-inline Parameter::Parameter(Parameter * pTheNext,
-const OString& rTheAttribute,
-const OString& rTheCharset,
-const OString& rTheLanguage,
-const OString& rTheValue,
-sal_uInt32 nTheSection, bool bTheExtended):
-m_pNext(pTheNext),
-m_aAttribute(rTheAttribute),
-m_aCharset(rTheCharset),
-m_aLanguage(rTheLanguage),
-m_aValue(rTheValue),
-m_nSection(nTheSection),
-m_bExtended(bTheExtended)
-{}
-
-struct ParameterList
-{
-Parameter * m_pList;
-
-ParameterList(): m_pList(nullptr) {}
-
-inline ~ParameterList();
-
-Parameter ** find(const OString& rAttribute, sal_uInt32 nSection,
-  bool & rPresent);
-};
-
-inline ParameterList::~ParameterList()
-{
-while (m_pList)
+bool operator<(const Parameter& rhs) const // is used by 
std::list::sort
 {
-Parameter * pNext = m_pList->m_pNext;
-delete m_pList;
-m_pList = pNext;
+int nComp = m_aAttribute.compareTo(rhs.m_aAttribute);
+return nComp < 0 ||
+(nComp == 0 && m_nSection < rhs.m_nSection);
 }
-}
+struct IsSameSection 

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

2017-04-28 Thread Eike Rathke
 i18npool/source/localedata/data/es_SV.xml |  170 +-
 1 file changed, 168 insertions(+), 2 deletions(-)

New commits:
commit f527736aa5742ddd35562441ff098e445438ef94
Author: Eike Rathke 
Date:   Thu Apr 27 22:42:11 2017 +0200

Resolves: tdf#106902 swap [es-SV] decimal and group separator

Made copying and adjusting LC_FORMAT and child elements from es-BO 
necessary,
some difference was in all existing es_* codes so no ref=... possible.

Change-Id: I114bed5348ebcaa646a749753cb542752aff58f0
(cherry picked from commit 4b605466a2304efd2b247595fe74ddf7c6d5a77d)
Reviewed-on: https://gerrit.libreoffice.org/37044
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/i18npool/source/localedata/data/es_SV.xml 
b/i18npool/source/localedata/data/es_SV.xml
index 232684d00820..472e754cf007 100644
--- a/i18npool/source/localedata/data/es_SV.xml
+++ b/i18npool/source/localedata/data/es_SV.xml
@@ -28,8 +28,174 @@
   El Salvador
 
   
-  
-  
+  
+
+  /
+  ,
+  .
+  :
+  .
+  ;
+   
+   de 
+   de 
+   
+
+
+  ‘
+  ’
+  “
+  ”
+
+AM
+PM
+metric
+  
+  
+D/M
+
+  Estandar
+
+
+  0
+
+
+  0.00
+
+
+  #,##0
+
+
+  #,##0.00
+
+
+  #,###.00
+
+
+  0.00E+000
+
+
+  0.00E+00
+
+
+  ##0.00E+00
+
+
+  0" "%
+
+
+  0.00" "%
+
+
+  [CURRENCY] #,##0.00;-[CURRENCY] #,##0.00
+
+
+  [CURRENCY] #,##0.00;-[CURRENCY] #,##0.00
+
+
+  [CURRENCY] #,##0.00;[RED]-[CURRENCY] #,##0.00
+
+
+  [CURRENCY] #,##0.00;[RED]-[CURRENCY] #,##0.00
+
+
+  #,##0.00 CCC
+
+
+  [CURRENCY] #,##0.--;[RED]-[CURRENCY] #,##0.--
+
+
+  D/MM/AA
+
+
+  D "de"  "de" 
+
+
+  DD/MM/AA
+
+
+  DD/MM/
+
+
+  D "de" MMM "de" AA
+
+
+  D "de" MMM "de" 
+
+
+  D. MMM. 
+
+
+  D "de"  "de" 
+
+
+  D.  
+
+
+  NN D "de" MMM "de" AA
+
+
+  NN DD/MMM AA
+
+
+  NN D "de"  "de" 
+
+
+  D "de"  "de" 
+
+
+  MM-DD
+
+
+  AA-MM-DD
+
+
+  -MM-DD
+  ISO 8601
+
+
+  MM/AA
+
+
+  DD/MMM
+
+
+  
+
+
+  QQ AA
+
+
+  WW
+
+
+  HH:MM
+
+
+  HH:MM:SS
+
+
+  HH:MM AM/PM
+
+
+  HH:MM:SS AM/PM
+
+
+  [HH]:MM:SS
+
+
+  MM:SS.00
+
+
+  [HH]:MM:SS.00
+
+
+  DD/MM/AA HH:MM
+
+
+  DD/MM/ HH:MM:SS
+
+  
   
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Bartosz Kosiorek
 cppcanvas/source/mtfrenderer/emfplus.cxx |   33 +++
 1 file changed, 25 insertions(+), 8 deletions(-)

New commits:
commit bafb6b59cf590f939753fc0009b8328c280837a9
Author: Bartosz Kosiorek 
Date:   Sat Apr 8 01:10:05 2017 +0200

tdf#107034 EMF+ Add support for import EmfPlusDrawPie record

The EmfPlusDrawPie record specifies drawing a section of the interior of an 
ellipse.

Change-Id: Icd9d64117cc612d348c531932931f31e4d04e567
Reviewed-on: https://gerrit.libreoffice.org/36286
Tested-by: Jenkins 
Reviewed-by: Bartosz Kosiorek 
(cherry picked from commit 2e7c94f5054dec4ab19c44209136c886793f0acb)
Reviewed-on: https://gerrit.libreoffice.org/36530
Reviewed-by: Thorsten Behrens 

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index a03b02d2b8b3..888b40a30431 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -65,7 +65,7 @@ namespace
 #define EmfPlusRecordTypeFillEllipse 0x400E
 #define EmfPlusRecordTypeDrawEllipse 0x400F
 #define EmfPlusRecordTypeFillPie 0x4010
-//TODO EmfPlusRecordTypeDrawPie 0x4011
+#define EmfPlusRecordTypeDrawPie 0x4011
 //TODO EmfPlusRecordTypeDrawArc 0x4012
 //TODO EmfPlusRecordTypeFillRegion 0x4013
 #define EmfPlusRecordTypeFillPath 0x4014
@@ -220,6 +220,7 @@ const char* emfTypeToName(sal_uInt16 type)
 case EmfPlusRecordTypeFillEllipse: return 
"EmfPlusRecordTypeFillEllipse";
 case EmfPlusRecordTypeDrawEllipse: return 
"EmfPlusRecordTypeDrawEllipse";
 case EmfPlusRecordTypeFillPie: return "EmfPlusRecordTypeFillPie";
+case EmfPlusRecordTypeDrawPie: return "EmfPlusRecordTypeDrawPie";
 case EmfPlusRecordTypeFillPath: return "EmfPlusRecordTypeFillPath";
 case EmfPlusRecordTypeDrawPath: return "EmfPlusRecordTypeDrawPath";
 case EmfPlusRecordTypeDrawImage: return "EmfPlusRecordTypeDrawImage";
@@ -1898,19 +1899,29 @@ namespace cppcanvas
 processObjectRecord (rMF, flags, dataSize);
 break;
 case EmfPlusRecordTypeFillPie:
+case EmfPlusRecordTypeDrawPie:
 {
-sal_uInt32 brushIndexOrColor;
 float startAngle, sweepAngle;
 
-rMF.ReadUInt32( brushIndexOrColor ).ReadFloat( 
startAngle ).ReadFloat( sweepAngle );
+// Silent MSVC warning C4701: potentially 
uninitialized local variable 'brushIndexOrColor' used
+sal_uInt32 brushIndexOrColor = 999;
 
-SAL_INFO("cppcanvas.emf", "EMF+ FillPie 
colorOrIndex: " << brushIndexOrColor << " startAngle: " << startAngle << " 
sweepAngle: " << sweepAngle);
+if ( type == EmfPlusRecordTypeFillPie )
+{
+rMF.ReadUInt32( brushIndexOrColor );
+SAL_INFO("cppcanvas.emf", "EMF+ FillPie 
colorOrIndex: " << brushIndexOrColor);
+}
+else
+{
+SAL_INFO("cppcanvas.emf", "EMF+ DrawPie");
+}
+rMF.ReadFloat( startAngle ).ReadFloat( sweepAngle 
);
 
 float dx, dy, dw, dh;
 
 ReadRectangle (rMF, dx, dy, dw, dh, bool(flags & 
0x4000));
 
-SAL_INFO("cppcanvas.emf", "EMF+ RectData: " << dx 
<< "," << dy << " " << dw << "x" << dh);
+SAL_INFO("cppcanvas.emf", "EMF+\t RectData: " << 
dx << "," << dy << " " << dw << "x" << dh);
 
 startAngle = 2*M_PI*startAngle/360;
 sweepAngle = 2*M_PI*sweepAngle/360;
@@ -1929,15 +1940,21 @@ namespace cppcanvas
 if (sweepAngle < 0)
 std::swap (endAngle, startAngle);
 
-SAL_INFO("cppcanvas.emf", "EMF+ adjusted angles: 
start " <<
- (360.0*startAngle/M_PI) << ", end: " << 
(360.0*endAngle/M_PI));
+SAL_INFO("cppcanvas.emf", "EMF+\t adjusted angles: 
start " <<
+ (360.0*startAngle/M_PI) << ", end: " << 
(360.0*endAngle/M_PI) <<
+ " startAngle: " << startAngle << " 
sweepAngle: " << sweepAngle);
 
 B2DPolygon polygon = 
basegfx::tools::createPolygonFromEllipseSegment (mappedCenter, mappedSize.getX 
(), mappedSize.getY (), startAngle, endAngle);
 polygon.append (mappedCenter);
 polygon.setClosed (true);
 

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

2017-04-28 Thread Jens Carl
 connectivity/source/drivers/file/fcomp.cxx |8 +++
 sc/source/ui/pagedlg/areasdlg.cxx  |   18 
 sot/source/sdstor/storage.cxx  |   32 ++---
 3 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit 488d850fd24cd636557bb86b6e4e7cced49a5dd5
Author: Jens Carl 
Date:   Wed Apr 26 03:15:02 2017 +

tdf#39486: Translate some randomly found German comments

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

diff --git a/connectivity/source/drivers/file/fcomp.cxx 
b/connectivity/source/drivers/file/fcomp.cxx
index c5d948c24197..ed41ce9343db 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -554,8 +554,8 @@ bool OPredicateInterpreter::evaluate(OCodeList& rCodeList)
 OOperand* pOperand = m_aStack.top();
 m_aStack.pop();
 
-DBG_ASSERT(m_aStack.empty(), "StackFehler");
-DBG_ASSERT(pOperand, "StackFehler");
+DBG_ASSERT(m_aStack.empty(), "Stack error");
+DBG_ASSERT(pOperand, "Stack error");
 
 bResult = pOperand->isValid();
 if (typeid(OOperandResult) == typeid(*pOperand))
@@ -581,8 +581,8 @@ void OPredicateInterpreter::evaluateSelection(OCodeList& 
rCodeList,ORowSetValueD
 OOperand* pOperand = m_aStack.top();
 m_aStack.pop();
 
-DBG_ASSERT(m_aStack.empty(), "StackFehler");
-DBG_ASSERT(pOperand, "StackFehler");
+DBG_ASSERT(m_aStack.empty(), "Stack error");
+DBG_ASSERT(pOperand, "Stack error");
 
 (*_rVal) = pOperand->getValue();
 if (typeid(OOperandResult) == typeid(*pOperand))
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx 
b/sc/source/ui/pagedlg/areasdlg.cxx
index 628f2c6ce216..e182575863f3 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -142,7 +142,7 @@ ScPrintAreasDlg::~ScPrintAreasDlg()
 
 void ScPrintAreasDlg::dispose()
 {
-// Extra-Data an ListBox-Entries abraeumen
+// clean extra data of ListBox entries
 ListBox* aLb[3] = { pLbPrintArea, pLbRepeatRow, pLbRepeatCol };
 
 for (ListBox* pBox : aLb)
@@ -271,7 +271,7 @@ void ScPrintAreasDlg::Impl_Reset()
 
 Impl_FillLists();
 
-// Druckbereich
+// printing area
 
 aStrRange.clear();
 OUString aOne;
@@ -291,12 +291,12 @@ void ScPrintAreasDlg::Impl_Reset()
 }
 pEdPrintArea->SetText( aStrRange );
 
-// Wiederholungszeile
+// repeat row
 
 lcl_GetRepeatRangeString(pRepeatRowRange, pDoc, true, aStrRange);
 pEdRepeatRow->SetText( aStrRange );
 
-// Wiederholungsspalte
+// repeat column
 
 lcl_GetRepeatRangeString(pRepeatColRange, pDoc, false, aStrRange);
 pEdRepeatCol->SetText( aStrRange );
@@ -307,7 +307,7 @@ void ScPrintAreasDlg::Impl_Reset()
 if( pDoc->IsPrintEntireSheet( nCurTab ) )
 pLbPrintArea->SelectEntryPos( SC_AREASDLG_PR_ENTIRE );
 
-pEdPrintArea->SaveValue();   // fuer FillItemSet() merken:
+pEdPrintArea->SaveValue();   // save for FillItemSet():
 pEdRepeatRow->SaveValue();
 pEdRepeatCol->SaveValue();
 }
@@ -369,7 +369,7 @@ bool ScPrintAreasDlg::Impl_CheckRefStrings()
 if ( !bRepeatColOk )
 bRepeatColOk = lcl_CheckRepeatString(aStrRepeatCol, pDoc, false, 
nullptr);
 
-// Fehlermeldungen
+// error messages
 
 bOk = (bPrintAreaOk && bRepeatRowOk && bRepeatColOk);
 
@@ -478,7 +478,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, Button*, pBtn, 
void )
 SfxStringItem   aRepeatRow( FN_PARAM_2, aStr );
 SfxStringItem   aRepeatCol( FN_PARAM_3, aStr );
 
-// Druckbereich veraendert?
+// Printing area changed?
 
 // first try the list box, if "Entire sheet" is selected
 bool bEntireSheet = (pLbPrintArea->GetSelectEntryPos() == 
SC_AREASDLG_PR_ENTIRE);
@@ -491,11 +491,11 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, Button*, pBtn, 
void )
 bDataChanged |= Impl_GetItem( pEdPrintArea, aPrintArea );
 }
 
-// Wiederholungszeile veraendert?
+// Repeat row changed?
 
 bDataChanged |= Impl_GetItem( pEdRepeatRow, aRepeatRow );
 
-// Wiederholungsspalte veraendert?
+// Repeat column changed?
 
 bDataChanged |= Impl_GetItem( pEdRepeatCol, aRepeatCol );
 
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index eb3ddae6169c..ea5d4007b45f 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -193,14 +193,14 @@ sal_uInt64 SotStorageStream::remainingSize()
 
 void SotStorageStream::CopyTo( SotStorageStream * pDestStm )
 {
-Flush(); // alle Daten schreiben
+Flush(); // write all data
 pDestStm->ClearBuffer();
 if( !pOwnStm || !pDestStm->pOwnStm )
 {
-// Wenn Ole2 oder nicht nur eigene 

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

2017-04-28 Thread Takeshi Abe
 filter/source/svg/svgreader.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 843f633c842f8540c42613cea78c5f66b262051a
Author: Takeshi Abe 
Date:   Fri Apr 28 21:10:30 2017 +0900

tdf#107142 Fix crash when opening SVG with 

which is a regression from 62283fed204e05e3f30a8ae703762d7f96c4e88a.

Note that css::xml::dom::XNode::hasAttributes() is meaningful
only when it is an element.

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

diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index fd4a58c52735..0546eea3132e 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -192,7 +192,7 @@ struct AnnotatingVisitor
 bool IsAncestorId(const uno::Reference& xParentNode, 
const OUString& rValue)
 {
 bool bSelfCycle = false;
-if (xParentNode.is())
+if (xParentNode.is() && xParentNode->getNodeType() == 
xml::dom::NodeType_ELEMENT_NODE)
 {
 if (xParentNode->hasAttributes())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Michael Stahl
 xmloff/source/xforms/XFormsSubmissionContext.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 974d48b9b8d12eecbe83a5a741c6ac729794309f
Author: Michael Stahl 
Date:   Fri Apr 28 21:51:59 2017 +0200

xmloff: fix --enable-mergedlibs build

multiple definition of `toBool(rtl::OUString const&)' since
commit 836c9bbb6486e9c0c81de9d7534b934699131d3d

Change-Id: I6a3e6a4e8a2af3c37f925cbdd684b8a99c088b1c

diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx 
b/xmloff/source/xforms/XFormsSubmissionContext.cxx
index 88fb3e374abd..c335197004a6 100644
--- a/xmloff/source/xforms/XFormsSubmissionContext.cxx
+++ b/xmloff/source/xforms/XFormsSubmissionContext.cxx
@@ -78,6 +78,8 @@ XFormsSubmissionContext::XFormsSubmissionContext(
 xModel->getSubmissions()->insert( makeAny( mxSubmission ) );
 }
 
+namespace {
+
 Any toBool( const OUString& rValue )
 {
 Any aValue;
@@ -89,6 +91,8 @@ Any toBool( const OUString& rValue )
 return aValue;
 }
 
+} // namespace
+
 void XFormsSubmissionContext::HandleAttribute( sal_uInt16 nToken,
const OUString& rValue )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Jens Carl
 sw/source/filter/html/htmlcss1.cxx |  245 +
 1 file changed, 118 insertions(+), 127 deletions(-)

New commits:
commit f22b12711e0c3914a73119c862edd1e32c53b586
Author: Jens Carl 
Date:   Wed Apr 26 05:34:53 2017 +

tdf#39648: Translate German comments and terms in sw

Translate German comments and terms in sw/source/filter/html/htmlcss1.cxx

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

diff --git a/sw/source/filter/html/htmlcss1.cxx 
b/sw/source/filter/html/htmlcss1.cxx
index 3daf8eab650d..2b120556e78b 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -64,14 +64,14 @@
 
 using namespace ::com::sun::star;
 
-// Wie viele Zeilen/Zeichen sind fuer DropCaps erlaubt?
-// (Gibt es vielleicht woanders entsprechende Werte?)
+// How many rows/characters are allowed for DropCaps?
+// (Are there maybe somewhere else corresponding values?)
 #define MAX_DROPCAP_LINES 9
 #define MAX_DROPCAP_CHARS 9
 
 static void lcl_swcss1_setEncoding( SwFormat& rFormat, rtl_TextEncoding eEnc );
 
-// Implementierung des SwCSS1Parsers (eigentlich swcss1.cxx)
+// Implementation of SwCSS1Parsers (actually swcss1.cxx)
 static struct SwCSS1ItemIds
 {
 sal_uInt16 nFormatBreak;
@@ -91,7 +91,7 @@ void SwCSS1Parser::ChgPageDesc( const SwPageDesc *pPageDesc,
 {
 size_t pos;
 bool found = pDoc->ContainsPageDesc( pPageDesc,  );
-OSL_ENSURE( found, "Seitenvorlage nicht gefunden" );
+OSL_ENSURE( found, "style not found" );
 if (found)
 pDoc->ChgPageDesc( pos, rNewPageDesc );
 }
@@ -159,7 +159,7 @@ bool SwCSS1Parser::SetFormatBreak( SfxItemSet& rItemSet,
 case SVX_CSS1_PBREAK_ALWAYS:
 case SVX_CSS1_PBREAK_LEFT:
 case SVX_CSS1_PBREAK_RIGHT:
-// LEFT/RIGHT koennte man auch am Absatz davor setzen
+// LEFT/RIGHT also could be set in the previous paragraph
 eBreak = SvxBreak::PageAfter;
 bSetBreak = true;
 break;
@@ -194,7 +194,7 @@ static void SetCharFormatAttrs( SwCharFormat *pCharFormat, 
SfxItemSet& rItemSet
 ) &&
 static_cast(pItem)->GetProp() != 100)
 {
-// %-Angaben beim FontHeight-Item werden nicht unterstuetzt
+// percentage values at the FontHeight item aren't supported
 rItemSet.ClearItem( i );
 }
 }
@@ -203,8 +203,8 @@ static void SetCharFormatAttrs( SwCharFormat *pCharFormat, 
SfxItemSet& rItemSet
 
 if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, 
 ) )
 {
-// Ein Brush-Item mit RES_BACKGROUND muss noch in eines mit
-// RES_CHRATR_BACKGROUND gewandelt werden
+// A Brush-Item with RES_BACKGROUND must be converted to one
+// with RES_CHRATR_BACKGROUND
 
 SvxBrushItem aBrushItem( *static_cast(pItem) );
 aBrushItem.SetWhich( RES_CHRATR_BACKGROUND );
@@ -221,7 +221,7 @@ static void SetCharFormatAttrs( SwCharFormat *pCharFormat, 
SfxItemSet& rItemSet
 
 void SwCSS1Parser::SetLinkCharFormats()
 {
-OSL_ENSURE( !bLinkCharFormatsSet, "Aufruf von SetLinkCharFormats unnoetig" 
);
+OSL_ENSURE( !bLinkCharFormatsSet, "Call SetLinkCharFormats unnecessary" );
 
 SvxCSS1MapEntry *pStyleEntry =
 GetTag( OOO_STRING_SVTOOLS_HTML_anchor );
@@ -278,7 +278,7 @@ static void SetTextCollAttrs( SwTextFormatColl *pColl, 
SfxItemSet& rItemSet,
 const SfxItemSet& rCollItemSet = pColl->GetAttrSet();
 const SfxPoolItem *pCollItem, *pItem;
 
-// linker, rechter Rand und Erstzeilen-Einzug
+// left, right border and first line indentation
 if( (rPropInfo.m_bLeftMargin || rPropInfo.m_bRightMargin ||
  rPropInfo.m_bTextIndent) &&
 (!rPropInfo.m_bLeftMargin || !rPropInfo.m_bRightMargin ||
@@ -299,7 +299,7 @@ static void SetTextCollAttrs( SwTextFormatColl *pColl, 
SfxItemSet& rItemSet,
 rItemSet.Put( aLRItem );
 }
 
-// oberer und unterer Rand
+// top and bottom border
 if( (rPropInfo.m_bTopMargin || rPropInfo.m_bBottomMargin) &&
 (!rPropInfo.m_bTopMargin || !rPropInfo.m_bBottomMargin) &&
 SfxItemState::SET == rCollItemSet.GetItemState(RES_UL_SPACE,true,
@@ -325,7 +325,7 @@ static void SetTextCollAttrs( SwTextFormatColl *pColl, 
SfxItemSet& rItemSet,
 ) &&
 static_cast(pItem)->GetProp() != 100)
 {
-// %-Angaben beim FontHeight-Item werden nicht unterstuetzt
+// percentage values at the FontHeight item aren't supported
 rItemSet.ClearItem( i );
 }
 }
@@ -338,7 +338,7 @@ static void SetTextCollAttrs( SwTextFormatColl *pColl, 
SfxItemSet& rItemSet,
 void SwCSS1Parser::SetTableTextColl( bool bHeader )
 {
 

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

2017-04-28 Thread Caolán McNamara
 svtools/source/misc/embedhlp.cxx |   15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

New commits:
commit ea0cf4f980e03ad27583453c6088c465c32b6eae
Author: Caolán McNamara 
Date:   Fri Apr 28 17:05:40 2017 +0100

ofz: fix leak

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

diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index fbebecfdf027..ec7eb7a87146 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -347,17 +347,16 @@ void EmbeddedObjectRef::Clear()
 }
 }
 }
+}
 
-if ( mpImpl->xListener )
-{
-mpImpl->xListener->pObject = nullptr;
-mpImpl->xListener->release();
-mpImpl->xListener = nullptr;
-}
-
-mpImpl->mxObj = nullptr;
+if (mpImpl->xListener)
+{
+mpImpl->xListener->pObject = nullptr;
+mpImpl->xListener->release();
+mpImpl->xListener = nullptr;
 }
 
+mpImpl->mxObj = nullptr;
 mpImpl->pContainer = nullptr;
 mpImpl->bIsLocked = false;
 mpImpl->bNeedUpdate = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Caolán McNamara
 connectivity/source/commontools/parameters.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b1ade4efa12740dd7c9cc4ab73836d65470ed16b
Author: Caolán McNamara 
Date:   Fri Apr 28 21:27:07 2017 +0100

loplugin:salbool

Change-Id: Ic78e1a6fc3fad22f2ffba43730f11b51f555e745

diff --git a/connectivity/source/commontools/parameters.cxx 
b/connectivity/source/commontools/parameters.cxx
index 3ef722a8fdf9..37f6a6bbd2f6 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -224,7 +224,7 @@ namespace dbtools
 {
 OUString colName;
 xDetailField->getPropertyValue("RealName") >>= colName;
-sal_Bool isFunction(false);
+bool isFunction(false);
 xDetailField->getPropertyValue("Function") >>= isFunction;
 if (isFunction)
 sFilter += colName;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

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

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

tdf#107016 EMF+ Add support of import EmfPlusRecordTypeDrawRects record

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

Change-Id: Iaa061f8502fb51de44d2e65a1c92daf297b79d2b
Reviewed-on: https://gerrit.libreoffice.org/36261
Tested-by: Jenkins 
Reviewed-by: Bartosz Kosiorek 
(cherry picked from commit a45feba83e5fb35eee1884887e8dbe795ebacde5)
Reviewed-on: https://gerrit.libreoffice.org/36528
Reviewed-by: Thorsten Behrens 

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

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

2017-04-28 Thread Eike Rathke
 basic/source/runtime/methods.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 38d9919432898c114d38022c2eb0d9fa9fea948c
Author: Eike Rathke 
Date:   Fri Apr 28 22:12:31 2017 +0200

CDateToIso: larger buffer for possible year range

Theoretically tools::Date can hold five digits years and even negative,
though Basic internally accepts only 100<=year<=. Might be that some
date calculations may result in years out of those margins, so at least
don't truncate those.

Change-Id: I3c217cc42476ce1cf8f9046111a1281288dc5bb6

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index f4e60a51b2ca..82bd2ce03134 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2031,7 +2031,7 @@ RTLFUNC(CDateToIso)
 {
 double aDate = rPar.Get(1)->GetDate();
 
-char Buffer[9];
+char Buffer[11];
 snprintf( Buffer, sizeof( Buffer ), "%04d%02d%02d",
 implGetDateYear( aDate ),
 implGetDateMonth( aDate ),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Tamás Zolnai
 svx/source/svdraw/svdedxv.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 44555103217df34b218787f3dc6a2634b41fe52e
Author: Tamás Zolnai 
Date:   Fri Apr 28 22:16:27 2017 +0200

tdf#107505: Impress - crash with two people co-editing one slide

Deleting outliner view removes the pointed Cursor (pTECursorMerker).

Change-Id: Iac17386d1d02bf52bd5322073e49da05c6e89d9b
Reviewed-on: https://gerrit.libreoffice.org/37085
Reviewed-by: Tamás Zolnai 
Tested-by: Tamás Zolnai 

diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 54bfa83f492e..c49fd72c03af 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1224,7 +1224,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool 
bDontDeleteReally)
 // and now the Outliner itself
 if (!bTextEditDontDelete) delete pTEOutliner;
 else pTEOutliner->Clear();
-if (pTEWin!=nullptr) {
+if (bTextEditDontDelete && pTEWin!=nullptr) {
 pTEWin->SetCursor(pTECursorMerker);
 }
 maHdlList.SetMoveOutside(false);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread LeMoyne Castle
 sw/source/core/unocore/unotbl.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit eea79562f1a5785a8a22cde732a091725e46bbad
Author: LeMoyne Castle 
Date:   Tue Apr 25 22:44:16 2017 -0600

tdf#107350 - prevent crash in unotbl.cxx

check pointer and throw exception instead of SIGABRT
when reading data from text tables that have
varying row &/or col lengths from
 - merged cells after first row,
 - split cells in first row, etc.

add backstop safety check -> exception because
 - complexity check fails (wrong/not called)
 - OOo uno api doc calls for exception when
   text table is 'too complex'
v2:  better error message for crash point and
   its parallel (getData[Array])

Change-Id: Ifb844c3e29042dab6b6cdb2448f7728e6ccb631d
Reviewed-on: https://gerrit.libreoffice.org/37002
Tested-by: Jenkins 
Reviewed-by: Björn Michaelsen 

diff --git a/sw/source/core/unocore/unotbl.cxx 
b/sw/source/core/unocore/unotbl.cxx
index 4125bc11026b..37d5c1e6da2b 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -3621,7 +3621,7 @@ uno::Sequence SAL_CALL 
SwXCellRange::getDataArray()
 {
 auto pCell(static_cast(pCurrentCell->get()));
 if(!pCell)
-throw uno::RuntimeException();
+throw uno::RuntimeException("Table too complex", 
static_cast(this));
 rCellAny = pCell->GetAny();
 ++pCurrentCell;
 }
@@ -3688,6 +3688,8 @@ SwXCellRange::getData()
 rRow = uno::Sequence(nColCount);
 for(auto& rValue : rRow)
 {
+if(!(*pCurrentCell))
+throw uno::RuntimeException("Table too complex", 
static_cast(this));
 rValue = (*pCurrentCell)->getValue();
 ++pCurrentCell;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Moving away from tools module

2017-04-28 Thread Chris Sherlock


> On 28 Apr 2017, at 10:30 am, Bjoern Michaelsen 
>  wrote:
> 
> Hi,
> 
>> On Fri, Apr 28, 2017 at 08:36:19AM +1000, Chris Sherlock wrote:
>> Thoughts?
> 
> tools is the "this really need to die" module. The only place anything from
> there should ever move to is oblivion.
> 
> Best,
> 
> Bjoern

Oh! But doesn't SvStream exist in tools?

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


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

2017-04-28 Thread Tor Lillqvist
 cui/source/inc/cuioptgenrl.hxx   |1 
 cui/source/options/optgenrl.cxx  |  102 +++
 cui/uiconfig/ui/optuserpage.ui   |  204 ++-
 officecfg/registry/schema/org/openoffice/UserProfile.xcs |8 
 4 files changed, 248 insertions(+), 67 deletions(-)

New commits:
commit 9416611763a6c6e5bc04a938e909727579716db0
Author: Tor Lillqvist 
Date:   Fri Apr 28 12:16:13 2017 +0300

tdf#105841: Avoid REGRESSION!!!

Let's reinstate the name charade instead. Pitäkää tunkkinne.

This reverts commit 5941496601600269296dde3e4ff8b615a8bb45ca.

This reverts commit db231633af4667e24281e0be69ab63ad3081fdc3.

Change-Id: I7d9890f3bd478bac195c1a7a59ff9822c2c83653

diff --git a/cui/source/inc/cuioptgenrl.hxx b/cui/source/inc/cuioptgenrl.hxx
index 5f1065ada287..0c56b6cdcde6 100644
--- a/cui/source/inc/cuioptgenrl.hxx
+++ b/cui/source/inc/cuioptgenrl.hxx
@@ -47,6 +47,7 @@ private:
 struct Field;
 std::vector vFields;
 // "name" fields
+unsigned nNameRow;
 unsigned nShortNameField;
 
 DECL_LINK( ModifyHdl_Impl, Edit&, void );
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 0dd5e7f0e05a..fc220de51598 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -41,6 +41,8 @@ enum RowType
 {
 Row_Company,
 Row_Name,
+Row_Name_Russian,
+Row_Name_Eastern,
 Row_Street,
 Row_Street_Russian,
 Row_City,
@@ -58,6 +60,7 @@ namespace Lang
 {
 unsigned const Others = 1;
 unsigned const Russian = 2;
+unsigned const Eastern = 4;
 unsigned const US = 8;
 unsigned const All = static_cast(-1);
 }
@@ -77,7 +80,9 @@ struct
 const vRowInfo[] =
 {
 { "companyft",   Lang::All },
-{ "nameft",  Lang::All },
+{ "nameft",  Lang::All & ~Lang::Russian & ~Lang::Eastern },
+{ "rusnameft",   Lang::Russian },
+{ "eastnameft",  Lang::Eastern },
 { "streetft",Lang::All & ~Lang::Russian },
 { "russtreetft", Lang::Russian },
 { "icityft", Lang::All & ~Lang::US },
@@ -108,8 +113,18 @@ const vFieldInfo[] =
 // Company
 { Row_Company, "company", UserOptToken::Company, EditPosition::COMPANY },
 // Name
+{ Row_Name, "firstname", UserOptToken::FirstName, EditPosition::FIRSTNAME 
},
 { Row_Name, "lastname", UserOptToken::LastName, EditPosition::LASTNAME  },
 { Row_Name, "shortname", UserOptToken::ID, EditPosition::SHORTNAME },
+// Name (russian)
+{ Row_Name_Russian, "ruslastname", UserOptToken::LastName, 
EditPosition::LASTNAME  },
+{ Row_Name_Russian, "rusfirstname", UserOptToken::FirstName, 
EditPosition::FIRSTNAME },
+{ Row_Name_Russian, "rusfathersname", UserOptToken::FathersName, 
EditPosition::UNKNOWN },
+{ Row_Name_Russian, "russhortname", UserOptToken::ID, 
EditPosition::SHORTNAME },
+// Name (eastern: reversed name ord
+{ Row_Name_Eastern, "eastlastname", UserOptToken::LastName, 
EditPosition::LASTNAME  },
+{ Row_Name_Eastern, "eastfirstname", UserOptToken::FirstName, 
EditPosition::FIRSTNAME },
+{ Row_Name_Eastern, "eastshortname", UserOptToken::ID, 
EditPosition::SHORTNAME },
 // Street
 { Row_Street, "street", UserOptToken::Street, EditPosition::STREET },
 // Street (russian)
@@ -218,7 +233,10 @@ void SvxGeneralTabPage::InitControls ()
 LangBit = Lang::Russian;
 else
 {
-LangBit = Lang::Others;
+if (MsLangId::isFamilyNameFirst(l))
+LangBit = Lang::Eastern;
+else
+LangBit = Lang::Others;
 }
 
 // creating rows
@@ -248,6 +266,7 @@ void SvxGeneralTabPage::InitControls ()
 // "short name" field?
 if (vFieldInfo[iField].nUserOptionsId == UserOptToken::ID)
 {
+nNameRow = vRows.size() - 1;
 nShortNameField = vFields.size() - 1;
 }
 }
@@ -260,7 +279,7 @@ void SvxGeneralTabPage::SetLinks ()
 {
 // link for updating the initials
 Link aLink = LINK( this, SvxGeneralTabPage, ModifyHdl_Impl );
-Row& rNameRow = *vRows[Row_Name];
+Row& rNameRow = *vRows[nNameRow];
 for (unsigned i = rNameRow.nFirstField; i != rNameRow.nLastField - 1; ++i)
 vFields[i]->pEdit->SetModifyHdl(aLink);
 }
@@ -313,22 +332,36 @@ void SvxGeneralTabPage::Reset( const SfxItemSet* rSet )
 
 // ModifyHdl_Impl()
 // This handler updates the initials (short name)
-// when the name field was updated.
+// when one of the name fields was updated.
 IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit&, rEdit, void )
 {
 // short name field and row
 Field& rShortName = *vFields[nShortNameField];
-if (rShortName.pEdit->IsEnabled())
+Row& rNameRow = *vRows[nNameRow];
+// number of initials
+unsigned const nInits = rNameRow.nLastField - rNameRow.nFirstField - 1;
+// 

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

2017-04-28 Thread Jan Holesovsky
 Makefile.am  |3 +++
 configure.ac |2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 848145503bf7b98ce4a4aa0a858a0d71dd0dbb26
Author: Jan Holesovsky 
Date:   Fri Apr 28 11:54:18 2017 +0200

Distribute the git hash for easier identification.

Change-Id: I57084231d0878de15b4b0478122f49e94af563bf

diff --git a/Makefile.am b/Makefile.am
index c72ad4d0..cfcfd7c3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -187,6 +187,9 @@ noinst_HEADERS = $(wsd_headers) $(shared_headers) 
$(kit_headers) \
  test/countloolkits.hpp \
  test/helpers.hpp
 
+dist-hook:
+   git log -1 --format=%h > $(distdir)/dist_git_hash 2> /dev/null || rm 
$(distdir)/dist_git_hash
+
 EXTRA_DIST = discovery.xml \
  favicon.ico \
  loolkitconfig.xcu \
diff --git a/configure.ac b/configure.ac
index ad4b6757..3f5daff2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,7 @@ 
AC_DEFINE_UNQUOTED([LOOLWSD_VERSION],[["$LOOLWSD_VERSION"]],[LibreOffice Online
 
 # try to add a git hash for a version if we're developing
 LOOLWSD_VERSION_HASH="$LOOLWSD_VERSION"
-git_hash=`cd ${srcdir} && git log -1 --format=%h 2> /dev/null`
+git_hash=`cd ${srcdir} && ( cat dist_git_hash 2> /dev/null || git log -1 
--format=%h 2> /dev/null )`
 if test "z$git_hash" != "z"; then
LOOLWSD_VERSION_HASH=$git_hash
 fi
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Noel Grandin
 chart2/source/controller/dialogs/DataBrowser.cxx  |   28 --
 chart2/source/controller/dialogs/DataBrowser.hxx  |4 -
 chart2/source/controller/dialogs/DataBrowserModel.cxx |8 +-
 chart2/source/controller/dialogs/DataBrowserModel.hxx |4 -
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx |2 
 chart2/source/controller/inc/ChartController.hxx  |2 
 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx |2 
 chart2/source/controller/main/ChartController_Window.cxx  |2 
 chart2/source/controller/main/ChartWindow.cxx |4 -
 chart2/source/controller/main/ObjectHierarchy.cxx |2 
 chart2/source/inc/ChartTypeHelper.hxx |   17 ++
 chart2/source/inc/LifeTime.hxx|6 +-
 chart2/source/model/main/Axis.cxx |4 -
 chart2/source/model/main/Axis.hxx |2 
 chart2/source/model/main/ChartModel.cxx   |2 
 chart2/source/model/template/ChartTypeTemplate.cxx|9 +--
 chart2/source/model/template/ChartTypeTemplate.hxx|3 -
 chart2/source/tools/AxisHelper.cxx|6 +-
 chart2/source/tools/ChartTypeHelper.cxx   |4 -
 chart2/source/tools/DiagramHelper.cxx |2 
 chart2/source/tools/ExplicitCategoriesProvider.cxx|2 
 chart2/source/tools/LifeTime.cxx  |4 -
 chart2/source/view/axes/Tickmarks_Equidistant.cxx |   12 ++--
 chart2/source/view/axes/Tickmarks_Equidistant.hxx |6 +-
 chart2/source/view/axes/VAxisProperties.cxx   |6 +-
 chart2/source/view/axes/VAxisProperties.hxx   |4 -
 chart2/source/view/axes/VCartesianAxis.cxx|4 -
 chart2/source/view/axes/VPolarAngleAxis.cxx   |2 
 chart2/source/view/axes/VPolarGrid.cxx|2 
 chart2/source/view/axes/VPolarRadiusAxis.cxx  |2 
 chart2/source/view/charttypes/BarPositionHelper.cxx   |2 
 chart2/source/view/charttypes/BarPositionHelper.hxx   |7 --
 chart2/source/view/inc/PlottingPositionHelper.hxx |2 
 chart2/source/view/main/ChartView.cxx |8 +-
 chart2/source/view/main/DummyXShape.cxx   |8 +-
 chart2/source/view/main/OpenGLRender.cxx  |   11 +--
 chart2/source/view/main/OpenGLRender.hxx  |9 +--
 chart2/source/view/main/PlottingPositionHelper.cxx|4 -
 38 files changed, 98 insertions(+), 110 deletions(-)

New commits:
commit da57421b366dfd5bef840f5caeffcd030b19c643
Author: Noel Grandin 
Date:   Fri Apr 28 12:45:40 2017 +0200

commit: loplugin:checkunusedparams in chart2

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

diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx 
b/chart2/source/controller/dialogs/DataBrowser.cxx
index 0ed15d33058c..4548d3b6f4df 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -654,7 +654,7 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 
nColumnId ) const
 {
 sal_Int32 nColIndex = static_cast< sal_Int32 >( nColumnId ) - 1;
 
-if( m_apDataBrowserModel->getCellType( nColIndex, nRow ) == 
DataBrowserModel::NUMBER )
+if( m_apDataBrowserModel->getCellType( nColIndex ) == 
DataBrowserModel::NUMBER )
 {
 double fData( m_apDataBrowserModel->getCellNumber( nColIndex, nRow 
));
 sal_Int32 nLabelColor;
@@ -664,11 +664,11 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 
nColumnId ) const
 {
 bool bColorChanged = false;
 aResult = m_spNumberFormatterWrapper->getFormattedString(
-  GetNumberFormatKey( nRow, nColumnId ),
+  GetNumberFormatKey( nColumnId ),
   fData, nLabelColor, bColorChanged );
 }
 }
-else if( m_apDataBrowserModel->getCellType( nColIndex, nRow ) == 
DataBrowserModel::TEXTORDATE )
+else if( m_apDataBrowserModel->getCellType( nColIndex ) == 
DataBrowserModel::TEXTORDATE )
 {
 uno::Any aAny = m_apDataBrowserModel->getCellAny( nColIndex, nRow 
);
 OUString aText;
@@ -694,7 +694,7 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 
nColumnId ) const
 }
 else
 {
-OSL_ASSERT( 

Broken master on iOS.

2017-04-28 Thread Jan Iversen
Hi

Commit: 
commit 3a36cf434fb4a967c9ea767cb7ac5f4da0502a0d
Author: Noel Grandin 
Date:   Tue Apr 25 15:09:53 2017 +0200

loplugin:checkunusedparams in configmgr and vcl

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

Seems to have broken the iOS build:

/Volumes/LIBREOFFICE/ios/core/vcl/ios/iosinst.cxx:92:11: error: no matching 
constructor for initialization of 'SvpSalFrame'
: SvpSalFrame( pInstance, pParent, nSalFrameStyle,
  ^~~~
/Volumes/LIBREOFFICE/ios/core/vcl/inc/headless/svpframe.hxx:59:5: note: 
candidate constructor not viable: requires 3 arguments, but 4 were provided
SvpSalFrame( SvpSalInstance* pInstance,
^
/Volumes/LIBREOFFICE/ios/core/vcl/inc/headless/svpframe.hxx:38:21: note: 
candidate constructor (the implicit copy constructor) not viable: requires 1 
argument, but 4 were provided
class VCL_DLLPUBLIC SvpSalFrame : public SalFrame
^
1 error generated.

Any suggestions ?

rgds
jan I.

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


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

2017-04-28 Thread jan Iversen
 vcl/ios/iosinst.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5a394be952c0795cd12ed0eea8f5186e44814225
Author: jan Iversen 
Date:   Fri Apr 28 12:13:06 2017 +0200

iOS, fixed build breaker.

Fast fix to build breaker from
commit 3a36cf434fb4a967c9ea767cb7ac5f4da0502a0d

Removing the parameter from the constructor gave ripple effects
to move/copy constructors, so not done for now.

Change-Id: I98e060e80946dbfe6586744e4f362ccb358a210d

diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index e71b71156035..92cd91ada51b 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -89,9 +89,9 @@ public:
  SalFrame   *pParent,
  SalFrameStyleFlags  nSalFrameStyle,
  SystemParentData   *pSysParent )
-: SvpSalFrame( pInstance, pParent, nSalFrameStyle,
-   pSysParent )
+: SvpSalFrame( pInstance, pParent, nSalFrameStyle )
 {
+pSysParent = NULL;
 if (pParent == NULL && viewWidth > 1 && viewHeight > 1)
 SetPosSize(0, 0, viewWidth, viewHeight, SAL_FRAME_POSSIZE_WIDTH | 
SAL_FRAME_POSSIZE_HEIGHT);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: config_host.mk.in configure.ac external/boost m4/ax_boost_locale.m4 RepositoryExternal.mk

2017-04-28 Thread Caolán McNamara
 RepositoryExternal.mk   |   13 ++
 config_host.mk.in   |1 
 configure.ac|1 
 external/boost/Module_boost.mk  |1 
 external/boost/StaticLibrary_boost_locale.mk|   67 +++
 external/boost/include/boost/circular_buffer.hpp|   23 +++
 external/boost/include/boost/locale.hpp |   23 +++
 external/boost/include/boost/locale/gnu_gettext.hpp |   23 +++
 external/boost/include/boost/type_index.hpp |   23 +++
 m4/ax_boost_locale.m4   |  119 
 10 files changed, 294 insertions(+)

New commits:
commit c25eee44966703cb27d632bccb39b20978341ffd
Author: Caolán McNamara 
Date:   Wed Apr 19 12:02:25 2017 +0100

build boost::locale library

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

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 7a6db951ef94..eb0b3e2c9d40 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -577,6 +577,11 @@ $(call gb_LinkTarget_add_libs,$(1),$(2))
 
 endef
 
+define gb_LinkTarget__use_boost_locale
+$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
+
+endef
+
 define gb_LinkTarget__use_boost_date_time
 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
 
@@ -624,6 +629,14 @@ $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
 
 endef
 
+define gb_LinkTarget__use_boost_locale
+$(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
+$(call gb_LinkTarget_add_libs,$(1),\
+   $(if $(filter $(OS),MACOSX),-liconv) \
+)
+
+endef
+
 define gb_LinkTarget__use_boost_date_time
 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
 
diff --git a/config_host.mk.in b/config_host.mk.in
index 6f2280d83d72..880895e3c00f 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -35,6 +35,7 @@ export LIBATOMIC_OPS_CFLAGS=$(gb_SPACE)@LIBATOMIC_OPS_CFLAGS@
 export LIBATOMIC_OPS_LIBS=$(gb_SPACE)@LIBATOMIC_OPS_LIBS@
 export BOOST_CPPFLAGS=@BOOST_CPPFLAGS@
 export BOOST_CXXFLAGS=@BOOST_CXXFLAGS@
+export BOOST_LOCALE_LIB=@BOOST_LOCALE_LIB@
 export BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
 export BOOST_FILESYSTEM_LIB=@BOOST_FILESYSTEM_LIB@
 export BOOST_IOSTREAMS_LIB=@BOOST_IOSTREAMS_LIB@
diff --git a/configure.ac b/configure.ac
index beb41ddc7d1b..1be6bb7db0c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8844,6 +8844,7 @@ if test "$with_system_boost" = "yes"; then
 AX_BOOST_DATE_TIME
 AX_BOOST_FILESYSTEM
 AX_BOOST_IOSTREAMS
+AX_BOOST_LOCALE
 AC_LANG_PUSH([C++])
 save_CXXFLAGS=$CXXFLAGS
 CXXFLAGS="$CXXFLAGS $BOOST_CPPFLAGS $CXXFLAGS_CXX11"
diff --git a/external/boost/Module_boost.mk b/external/boost/Module_boost.mk
index 8bb1c0ad7223..252bf1c9a3b3 100644
--- a/external/boost/Module_boost.mk
+++ b/external/boost/Module_boost.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_Module_Module,boost))
 $(eval $(call gb_Module_add_targets,boost,\
StaticLibrary_boost_date_time \
StaticLibrary_boost_filesystem \
+   StaticLibrary_boost_locale \
StaticLibrary_boost_system \
StaticLibrary_boost_iostreams \
UnpackedTarball_boost \
diff --git a/external/boost/StaticLibrary_boost_locale.mk 
b/external/boost/StaticLibrary_boost_locale.mk
new file mode 100644
index ..9f9338c69984
--- /dev/null
+++ b/external/boost/StaticLibrary_boost_locale.mk
@@ -0,0 +1,67 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,boost_locale))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,boost_locale,boost))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,boost_locale))
+
+# disable "auto link" "feature" on MSVC
+$(eval $(call gb_StaticLibrary_add_defs,boost_locale,\
+   -DBOOST_ALL_NO_LIB -DBOOST_LOCALE_NO_WINAPI_BACKEND 
-DBOOST_LOCALE_NO_POSIX_BACKEND \
+))
+
+ifneq ($(OS),WNT)
+
+$(eval $(call gb_StaticLibrary_add_defs,boost_locale,\
+   -DBOOST_LOCALE_WITH_ICONV \
+))
+
+endif
+
+$(eval $(call gb_StaticLibrary_use_external,boost_locale,boost_headers))
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,boost_locale,cpp))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,boost_locale,\
+   UnpackedTarball/boost/libs/locale/src/encoding/codepage \
+   UnpackedTarball/boost/libs/locale/src/shared/date_time \
+   UnpackedTarball/boost/libs/locale/src/shared/format \
+   

Re: Moving away from tools module

2017-04-28 Thread Chris Sherlock


Sent from my iPhone

> On 28 Apr 2017, at 7:07 pm, Eike Rathke  wrote:
> 
> Hi Chris,
> 
>> On Friday, 2017-04-28 08:36:19 +1000, Chris Sherlock wrote:
>> 
>> - time.hxx, date.hxx, datetime.hxx and datetimeutils.hxx - these all seem to 
>> be better suited to the SAL, and actually should we consider moving to 
>> chrono?
> 
> chrono is not a replacement as it doesn't offer the functionality of
> tools::Date and DateTime, only for Time.
> 
> I don't care in which module the source code lives or what implements
> it, but I definitely want to keep the existing functionality.
> 
> Problem with moving anything to sal is that we then guarantee stable API
> and even ABI to some degree as sal is part of the SDK, or have LibO only
> interfaces like with OUString.
> 
>  Eike
> 
> -- 
> LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
> GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 
> 2D3A
> Care about Free Software, support the FSFE https://fsfe.org/support/?erack

That's a fair point :-) 

I believe there is a proposal to include Howard Hinnant's very comprehensive 
calendaring and Timezone library into the C++ standard:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0355r2.html

Nice things about this is that the app dusting library can process the tz 
database, and a number of other interesting things besides:

https://github.com/HowardHinnant/date/blob/master/README.md

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


Re: Moving away from tools module

2017-04-28 Thread Michael Stahl
On 28.04.2017 00:36, Chris Sherlock wrote:
> Hi all,
> 
> As I'm researching my book on the guts of LibreOffice, I notice that
> tools predates the SAL. In fact it's a bit of a hodge-lodge of files,
> many of which look like they should probably migrated into other modules.
> 
> I cleaned up ErrorHandler, but I thought I'd ask about the other headers
> here:
> 
> - b3dtrans.hxx - I'm assuming the b3d bit means basegfx 3D
> transformations. I've
> submitted https://gerrit.libreoffice.org/#/c/37030/ to move it into
> basegfx but unfortunately it's failing o Windows and I don't currently
> have a working system to determine why the linker is erroring out.

i'm curious why this isn't already in basegfx - perhaps it's some sort
of compatibility layer and there are already equivalent functions in
basegfx or somewhere?  pretty sure i've seen some coordinate
transformation class somewhere, and it wasn't this one... obviously it
can't be moved to basegfx as-is since it uses tools Rectangle.

> - bigint.hxx and fract.hxx - seems to be more appropriate to the sal
> module, possibly the RTL? Great to get thoughts of others on this one

BigInt *predates* availability of 64-bit integers - i bet many of its
users would be fine with a sal_Int64 and don't need arbitrary precision.
 it even uses "short"s to represent digits, this is 16-bit code...

Fraction is nowadays basically a pImpl wrapper around some boost class
that pulls in 50k lines of amazing template metaprogramming headers so
can't be included everywhere.

> - color.hxx and colordata.hxx - should that migrate to basegfx also?

that already has a color in include/basegfx/color/ ...

> - gen.hxx - includes Pair (shouldn't that be deprecated to std::pair?),
> Point, Size, Range, Selection and Rectangle
> - poly.hxx - polygons
> - line.hxx - lines
> 
> gen.hxx, lines.hxx and poly.hxx all are drawing primitives, wouldn't
> these be better off in basegfx?

these all already exist in basegfx, the problem is that nobody has time
to convert the existing usages of tools classes to basegfx ones, which
is tricky because some of the tools classes are just amazingly badly
designed (see for example documentation of Rectangle class).

> - config.hxx - where would this go? I was thinking the RTL, but it also
> seems like something the VLC might do...

this looks like a class to handle config files - surely something like
this already exists in sal/rtl, for rtl::Bootstrap reading its stuff...

> - contr.hxx - seems better suited in the svx module

this defines 4 magic constants - why is this still in use? probably a
remnant of the tools-container -> STL conversion of 1897 or when it was?

> - cpuid.hxx - checks for SSE2 support, surely something for the SAL?
> 
> - time.hxx, date.hxx, datetime.hxx and datetimeutils.hxx - these all
> seem to be better suited to the SAL, and actually should we consider
> moving to chrono?

there is a boost datetime thing too, we were looking at that some years
ago but i forgot why we decided not to use it.  perhaps it pulls in 50k
loc of headers everywhere and makes compile times go through the roof
like boost stuff is wont to do.

> - debug.hxx and diagnose_ex.hxx - seems more suited to the RTL...

these mostly contain deprecated macros whose usage should be replaced
with either assert or macros from sal/log.hxx - but it requires
case-by-case decision as to what to replace each call with - we used to
have an easy-hack for that but it was disabled because inexperienced
developers rarely got it right.

> -extendApplicationEnvironment - seems to be a candidate for the OSL...

sal/osl definitely shouldn't be setting a URE_BOOTSTRAP variable - or
any URE layer code for that matter.

> - fldunit.hxx and fontenum.hxx - both seems to be more appropriate in
> the VCL

it appears so, but likely you'll find these to be used in modules that
don't want to depend on VCL.

> There are quite a few headers, but as you can see most look to be more
> appropriately moved to another module.. This would help streamline our
> module dependencies...

i really don't see the point of this.  the tools module is primarily a
toxic waste dump, and distributing the toxic waste across all the other
modules does not look like an improvement to me.  better to remove the
toxic waste from our git repo and dump it in some landfill where nobody
lives, or at least nobody that we know :)


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


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

2017-04-28 Thread Caolán McNamara
 hwpfilter/source/hbox.cxx|   12 +---
 hwpfilter/source/hbox.h  |7 +-
 hwpfilter/source/hwpread.cxx |  128 +--
 3 files changed, 71 insertions(+), 76 deletions(-)

New commits:
commit 032e7a4b5c4904d00b3f0ab75af113ed316343f8
Author: Caolán McNamara 
Date:   Fri Apr 28 12:52:01 2017 +0100

ofz: avoid timeout and return early on failure

Change-Id: I083aa07b311fa073ea5eeb1d569b0902e0f9c095

diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h
index 5ed353364c0f..a110d70d0f32 100644
--- a/hwpfilter/source/hbox.h
+++ b/hwpfilter/source/hbox.h
@@ -228,7 +228,7 @@ struct Cell   // Cell
 unsigned char diagonal;   // { 0=none,\=1,/=2,X=3}
 unsigned char protect;
 
-void  Read( HWPFile  );
+bool  Read(HWPFile );
 };
 
 /**
diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index 1a96eaa29046..92f484b1d10d 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -185,7 +185,7 @@ static void UpdateBBox(FBox * fbox)
 fbox->boundey = fbox->pgy + fbox->ys - 1;
 }
 
-void Cell::Read(HWPFile & hwpf)
+bool Cell::Read(HWPFile & hwpf)
 {
 hwpf.Read2b(, 1);
 hwpf.Read2b(, 1);
@@ -203,7 +203,7 @@ void Cell::Read(HWPFile & hwpf)
 hwpf.Read1b(linetype, 4);
 hwpf.Read1b(, 1);
 hwpf.Read1b(, 1);
-hwpf.Read1b(, 1);
+return hwpf.Read1b(, 1) == 1;
 }
 
 bool TxtBox::Read(HWPFile & hwpf)
@@ -288,11 +288,14 @@ bool TxtBox::Read(HWPFile & hwpf)
 if (!cell) {
 return hwpf.SetState(HWP_InvalidFileFormat);
 }
-for (ii = 0; ii < ncell; ii++)
+bool bSuccess = true;
+for (ii = 0; ii < ncell && bSuccess; ii++)
 {
-cell[ii].Read(hwpf);
+bSuccess = cell[ii].Read(hwpf);
 cell[ii].key = sal::static_int_cast(ii);
 }
+if (!bSuccess)
+return false;
 if (ncell == 1)
 style.cell = [0];
 plists.resize(ncell);
commit 6394fd4a1d56af4afab4f9683d5a2087a32588e6
Author: Caolán McNamara 
Date:   Fri Apr 28 12:49:19 2017 +0100

convert to std::vector

Change-Id: I315755d49df5d29c6c7075237b7401f16c89b449

diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx
index 88e76c7ca7f8..479279f2bc49 100644
--- a/hwpfilter/source/hbox.cxx
+++ b/hwpfilter/source/hbox.cxx
@@ -356,19 +356,18 @@ TxtBox::TxtBox()
 , protect(0)
 , cell(nullptr)
 , m_pTable(nullptr)
-, plists(nullptr)
 {
 reserved[0] = reserved[1] = 0;
 }
 
 TxtBox::~TxtBox()
 {
-delete[]cell;
+delete[] cell;
 
-for (int ii = 0; ii < nCell; ++ii)
+for (auto& entry : plists)
 {
-std::list < HWPPara* >::iterator it = plists[ii].begin();
-for (; it != plists[ii].end(); ++it)
+std::list < HWPPara* >::iterator it = entry.begin();
+for (; it != entry.end(); ++it)
 {
 HWPPara* pPara = *it;
 delete pPara;
@@ -381,11 +380,8 @@ TxtBox::~TxtBox()
 HWPPara* pPara = *it;
 delete pPara;
 }
-
-delete[]plists;
 }
 
-
 // picture(11)
 
 Picture::Picture()
diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h
index 15c97c6363f4..5ed353364c0f 100644
--- a/hwpfilter/source/hbox.h
+++ b/hwpfilter/source/hbox.h
@@ -360,11 +360,12 @@ struct TxtBox: public FBox
 short protect;//1=size lock
 
 Cell  *cell;
- Table *m_pTable;
+Table *m_pTable;
 /**
  * Paragraph list
  */
-std::list *plists;
+std::vector> plists;
+
 /**
  * Caption
  */
diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index ca2a90905e50..1a96eaa29046 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -295,10 +295,7 @@ bool TxtBox::Read(HWPFile & hwpf)
 }
 if (ncell == 1)
 style.cell = [0];
-plists = ::comphelper::newArray_null< std::list< HWPPara* > >(ncell);
-if (!plists) {
-return hwpf.SetState(HWP_InvalidFileFormat);
-}
+plists.resize(ncell);
 for (ii = 0; ii < ncell; ii++)
 hwpf.ReadParaList(plists[ii]);
  // caption
commit f30fb61c650e8b844501dcbbccbd441528b75997
Author: Caolán McNamara 
Date:   Fri Apr 28 12:36:10 2017 +0100

fix indent

Change-Id: I75faea4d701f401c5367142e4710ae613c8834be

diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index eb27376cdc77..ca2a90905e50 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -206,7 +206,6 @@ void Cell::Read(HWPFile & hwpf)
 hwpf.Read1b(, 1);
 }
 
-
 bool TxtBox::Read(HWPFile & hwpf)
 {
 int ii, ncell;
@@ -292,7 +291,7 @@ bool TxtBox::Read(HWPFile & hwpf)
 for (ii = 0; ii < ncell; ii++)
 {
 cell[ii].Read(hwpf);
-  cell[ii].key = sal::static_int_cast(ii);
+cell[ii].key = sal::static_int_cast(ii);

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

2017-04-28 Thread Eike Rathke
 basic/source/runtime/methods.cxx |   88 ---
 1 file changed, 46 insertions(+), 42 deletions(-)

New commits:
commit d6fd4252bf248d2872c713a1d83817a2dc88a9d2
Author: Eike Rathke 
Date:   Fri Apr 28 16:12:54 2017 +0200

Use invalid parameter error for malformed input, tdf#106956 follow-up

... instead of invalid procedure call.

Change-Id: I812f4c7041db9a116e65a24afb85164b4dd498b6

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 1bb3a474bc60..f4e60a51b2ca 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2051,58 +2051,62 @@ RTLFUNC(CDateFromIso)
 (void)pBasic;
 (void)bWrite;
 
-do
+if ( rPar.Count() == 2 )
 {
-if ( rPar.Count() != 2 )
-break;
-
-OUString aStr = rPar.Get(1)->GetOUString();
-const sal_Int32 nLen = aStr.getLength();
-if (nLen != 8 && nLen != 10)
-break;
-
-OUString aYearStr, aMonthStr, aDayStr;
-if (nLen == 8)
+do
 {
-// MMDD
-if (!comphelper::string::isdigitAsciiString(aStr))
+OUString aStr = rPar.Get(1)->GetOUString();
+const sal_Int32 nLen = aStr.getLength();
+if (nLen != 8 && nLen != 10)
 break;
 
-aYearStr  = aStr.copy( 0, 4 );
-aMonthStr = aStr.copy( 4, 2 );
-aDayStr   = aStr.copy( 6, 2 );
-}
-else
-{
-// -MM-DD
-const sal_Int32 nSep1 = aStr.indexOf('-');
-if (nSep1 != 4)
-break;
-const sal_Int32 nSep2 = aStr.indexOf('-', nSep1+1);
-if (nSep2 != 7)
-break;
+OUString aYearStr, aMonthStr, aDayStr;
+if (nLen == 8)
+{
+// MMDD
+if (!comphelper::string::isdigitAsciiString(aStr))
+break;
 
-aYearStr  = aStr.copy( 0, 4 );
-aMonthStr = aStr.copy( 5, 2 );
-aDayStr   = aStr.copy( 8, 2 );
-if (!comphelper::string::isdigitAsciiString(aYearStr) ||
-!comphelper::string::isdigitAsciiString(aMonthStr) ||
-!comphelper::string::isdigitAsciiString(aDayStr))
+aYearStr  = aStr.copy( 0, 4 );
+aMonthStr = aStr.copy( 4, 2 );
+aDayStr   = aStr.copy( 6, 2 );
+}
+else
+{
+// -MM-DD
+const sal_Int32 nSep1 = aStr.indexOf('-');
+if (nSep1 != 4)
+break;
+const sal_Int32 nSep2 = aStr.indexOf('-', nSep1+1);
+if (nSep2 != 7)
+break;
+
+aYearStr  = aStr.copy( 0, 4 );
+aMonthStr = aStr.copy( 5, 2 );
+aDayStr   = aStr.copy( 8, 2 );
+if (!comphelper::string::isdigitAsciiString(aYearStr) ||
+!comphelper::string::isdigitAsciiString(aMonthStr) ||
+!comphelper::string::isdigitAsciiString(aDayStr))
+break;
+}
+
+double dDate;
+if (!implDateSerial( (sal_Int16)aYearStr.toInt32(),
+(sal_Int16)aMonthStr.toInt32(), 
(sal_Int16)aDayStr.toInt32(), dDate ))
 break;
-}
 
-double dDate;
-if (!implDateSerial( (sal_Int16)aYearStr.toInt32(),
-(sal_Int16)aMonthStr.toInt32(), 
(sal_Int16)aDayStr.toInt32(), dDate ))
-break;
+rPar.Get(0)->PutDate( dDate );
 
-rPar.Get(0)->PutDate( dDate );
+return;
+}
+while (false);
 
-return;
+SbxBase::SetError( ERRCODE_SBX_BAD_PARAMETER );
+}
+else
+{
+StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
 }
-while (false);
-
-StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
 }
 
 RTLFUNC(DateSerial)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Eike Rathke
 basic/qa/basic_coverage/test_cdatetofromiso_methods.vb |3 
 basic/source/runtime/methods.cxx   |   61 +
 2 files changed, 50 insertions(+), 14 deletions(-)

New commits:
commit af754ef9d6655a7b76a39f5a2c5bef8290fc3163
Author: Eike Rathke 
Date:   Fri Apr 28 15:45:54 2017 +0200

Add unit test for CDateFromIso with -MM-DD, tdf#106956

Change-Id: Id7867228c091bb60764225a6436087dd390f13de

diff --git a/basic/qa/basic_coverage/test_cdatetofromiso_methods.vb 
b/basic/qa/basic_coverage/test_cdatetofromiso_methods.vb
index 02ec5853ccb4..3eb5e63e83ff 100644
--- a/basic/qa/basic_coverage/test_cdatetofromiso_methods.vb
+++ b/basic/qa/basic_coverage/test_cdatetofromiso_methods.vb
@@ -10,7 +10,10 @@ Function doUnitTest as Integer
 ' CDateFromIso CDateToIso
 If ( CDateToIso( CDateFromIso("20161016") ) <> "20161016" ) Then
 doUnitTest = 0
+ElseIf ( CDateToIso( CDateFromIso("2016-10-16") ) <> "20161016" ) Then
+doUnitTest = 0
 Else
 doUnitTest = 1
 End If
+' TODO: add some failure tests for misformed input, On Error whatever?
 End Function
commit cdcbdf88b7f74184b532925eaf140dbf65a2cd21
Author: Eike Rathke 
Date:   Fri Apr 28 15:37:17 2017 +0200

Resolves: tdf#106956 CDateFromIso accept also -MM-DD form

Previous implementation was over-simplified and accepted all sort of 
malformed
input to yield some arbitrary date, including longer and shorter and not
strictly numeric strings.

Change-Id: I2158429aeff7431f5ec5a1c9125018a5455a4730

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index a8468a61b908..1bb3a474bc60 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2045,31 +2045,64 @@ RTLFUNC(CDateToIso)
 }
 }
 
-// Function to convert date from ISO 8601 date format
+// Function to convert date from ISO 8601 date format MMDD or -MM-DD
 RTLFUNC(CDateFromIso)
 {
 (void)pBasic;
 (void)bWrite;
 
-if ( rPar.Count() == 2 )
+do
 {
+if ( rPar.Count() != 2 )
+break;
+
 OUString aStr = rPar.Get(1)->GetOUString();
-const sal_Int32 iMonthStart = aStr.getLength() - 4;
-OUString aYearStr  = aStr.copy( 0, iMonthStart );
-OUString aMonthStr = aStr.copy( iMonthStart, 2 );
-OUString aDayStr   = aStr.copy( iMonthStart+2, 2 );
+const sal_Int32 nLen = aStr.getLength();
+if (nLen != 8 && nLen != 10)
+break;
 
-double dDate;
-if( implDateSerial( (sal_Int16)aYearStr.toInt32(),
-(sal_Int16)aMonthStr.toInt32(), (sal_Int16)aDayStr.toInt32(), 
dDate ) )
+OUString aYearStr, aMonthStr, aDayStr;
+if (nLen == 8)
 {
-rPar.Get(0)->PutDate( dDate );
+// MMDD
+if (!comphelper::string::isdigitAsciiString(aStr))
+break;
+
+aYearStr  = aStr.copy( 0, 4 );
+aMonthStr = aStr.copy( 4, 2 );
+aDayStr   = aStr.copy( 6, 2 );
 }
+else
+{
+// -MM-DD
+const sal_Int32 nSep1 = aStr.indexOf('-');
+if (nSep1 != 4)
+break;
+const sal_Int32 nSep2 = aStr.indexOf('-', nSep1+1);
+if (nSep2 != 7)
+break;
+
+aYearStr  = aStr.copy( 0, 4 );
+aMonthStr = aStr.copy( 5, 2 );
+aDayStr   = aStr.copy( 8, 2 );
+if (!comphelper::string::isdigitAsciiString(aYearStr) ||
+!comphelper::string::isdigitAsciiString(aMonthStr) ||
+!comphelper::string::isdigitAsciiString(aDayStr))
+break;
+}
+
+double dDate;
+if (!implDateSerial( (sal_Int16)aYearStr.toInt32(),
+(sal_Int16)aMonthStr.toInt32(), 
(sal_Int16)aDayStr.toInt32(), dDate ))
+break;
+
+rPar.Get(0)->PutDate( dDate );
+
+return;
 }
-else
-{
-StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
-}
+while (false);
+
+StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
 }
 
 RTLFUNC(DateSerial)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Caolán McNamara
 writerfilter/source/dmapper/GraphicHelpers.cxx  |2 +-
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx |2 +-
 writerfilter/source/rtftok/rtftokenizer.cxx |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit e4ad1d174bf2f991c83aee3572d8292a15ec8d8c
Author: Caolán McNamara 
Date:   Fri Apr 28 14:44:49 2017 +0100

drop toString

Change-Id: If32d2bb0947d13c904da9514873f33c4c2641069

diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx 
b/writerfilter/source/dmapper/GraphicHelpers.cxx
index eae2d27ca647..2096adf802c4 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -304,7 +304,7 @@ OUString GraphicNamingHelper::NameGraphic(const OUString& 
rTemplate)
 {
 // Empty template: then auto-generate a unique name.
 std::unique_ptr pResMgr(ResMgr::CreateResMgr("svx", 
Application::GetSettings().GetUILanguageTag()));
-OUString aPrefix(ResId(STR_ObjNameSingulGRAF, *pResMgr).toString());
+OUString aPrefix(ResId(STR_ObjNameSingulGRAF, *pResMgr));
 aRet += aPrefix + OUString::number(++m_nCounter);
 }
 
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx 
b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index b700f3087d56..089c0e2a8f26 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -462,7 +462,7 @@ void OOXMLDocumentImpl::resolve(Stream & rStream)
 // Set the end position only here, so later it's enough to 
check if that is non-zero in incrementProgress().
 mnProgressEndPos = nValue;
 static ResMgr* pResMgr = ResMgr::CreateResMgr("svx", 
Application::GetSettings().GetUILanguageTag());
-OUString aDocLoad(ResId(RID_SVXSTR_DOC_LOAD, 
*pResMgr).toString());
+OUString aDocLoad(ResId(RID_SVXSTR_DOC_LOAD, *pResMgr));
 mxStatusIndicator->start(aDocLoad, mnProgressEndPos);
 mnPercentSize = mnProgressEndPos / 100;
 }
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx 
b/writerfilter/source/rtftok/rtftokenizer.cxx
index 361928e468b0..5661d4137b5b 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -66,7 +66,7 @@ RTFError RTFTokenizer::resolveParse()
 if (m_xStatusIndicator.is())
 {
 static ResMgr* pResMgr = ResMgr::CreateResMgr("svx", 
Application::GetSettings().GetUILanguageTag());
-OUString sDocLoad(ResId(RID_SVXSTR_DOC_LOAD, *pResMgr).toString());
+OUString sDocLoad(ResId(RID_SVXSTR_DOC_LOAD, *pResMgr));
 
 sal_uInt64 const nCurrentPos = Strm().Tell();
 sal_uInt64 const nEndPos = nCurrentPos + Strm().remainingSize();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Caolán McNamara
 Makefile.fetch |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 2f3060d40a7c6972a2054514e59cea36e0437951
Author: Caolán McNamara 
Date:   Fri Apr 28 11:41:44 2017 +0100

download via https rather than http

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

diff --git a/Makefile.fetch b/Makefile.fetch
index 5958db10db09..3b0cf56facd6 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -212,14 +212,14 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk 
$(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,XSLTML,XSLTML_TARBALL) \
$(call fetch_Optional,ZLIB,ZLIB_TARBALL) \
$(call fetch_Optional,ZMF,ZMF_TARBALL) \
-   ,$(call fetch_Download_item,http://dev-www.libreoffice.org/src,$(item)))
+   ,$(call 
fetch_Download_item,https://dev-www.libreoffice.org/src,$(item)))
$(foreach item, \
$(call fetch_Optional,ODK,UNOWINREG_DLL) \
$(call fetch_Optional,ODFVALIDATOR,ODFVALIDATOR_JAR) \
$(call fetch_Optional,OFFICEOTRON,OFFICEOTRON_JAR) \
-   ,$(call 
fetch_Download_item,http://dev-www.libreoffice.org/extern,$(item)))
+   ,$(call 
fetch_Download_item,https://dev-www.libreoffice.org/extern,$(item)))
$(if $(call fetch_Optional,LIBGLTF,LIBGLTF_TARBALL) \
-   , $(call 
fetch_Download_item,http://dev-www.libreoffice.org/src/libgltf,$(call 
fetch_Optional,LIBGLTF,LIBGLTF_TARBALL)))
+   , $(call 
fetch_Download_item,https://dev-www.libreoffice.org/src/libgltf,$(call 
fetch_Optional,LIBGLTF,LIBGLTF_TARBALL)))
@mkdir -p $(dir $@) && touch $@
 
 # vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - configure.ac Makefile.am

2017-04-28 Thread Jan Holesovsky
 Makefile.am  |3 +++
 configure.ac |2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 8f1d039aa347b637065929a6053a6054bf28c777
Author: Jan Holesovsky 
Date:   Fri Apr 28 11:54:18 2017 +0200

Distribute the git hash for easier identification.

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

diff --git a/Makefile.am b/Makefile.am
index a348f3f4..9091f993 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -185,6 +185,9 @@ noinst_HEADERS = $(wsd_headers) $(shared_headers) 
$(kit_headers) \
  test/countloolkits.hpp \
  test/helpers.hpp
 
+dist-hook:
+   git log -1 --format=%h > $(distdir)/dist_git_hash 2> /dev/null || rm 
$(distdir)/dist_git_hash
+
 EXTRA_DIST = discovery.xml \
  favicon.ico \
  loolkitconfig.xcu \
diff --git a/configure.ac b/configure.ac
index b04b8ea9..bff85872 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,7 @@ 
AC_DEFINE_UNQUOTED([LOOLWSD_VERSION],[["$LOOLWSD_VERSION"]],[LibreOffice Online
 
 # try to add a git hash for a version if we're developing
 LOOLWSD_VERSION_HASH="$LOOLWSD_VERSION"
-git_hash=`cd ${srcdir} && git log -1 --format=%h 2> /dev/null`
+git_hash=`cd ${srcdir} && ( cat dist_git_hash 2> /dev/null || git log -1 
--format=%h 2> /dev/null )`
 if test "z$git_hash" != "z"; then
LOOLWSD_VERSION_HASH=$git_hash
 fi
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Noel Grandin
 connectivity/source/drivers/jdbc/Array.cxx  |8 
 connectivity/source/drivers/jdbc/ResultSet.cxx  |2 +-
 connectivity/source/drivers/jdbc/tools.cxx  |2 +-
 connectivity/source/drivers/mork/MResultSet.cxx |7 ---
 connectivity/source/drivers/mork/MResultSet.hxx |1 -
 connectivity/source/inc/java/tools.hxx  |2 +-
 6 files changed, 7 insertions(+), 15 deletions(-)

New commits:
commit 04422d7f9f9f76708cd1f36fea5bd9cd50cf6083
Author: Noel Grandin 
Date:   Fri Apr 28 13:10:14 2017 +0200

loplugin:checkunusedparams in connectivity

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

diff --git a/connectivity/source/drivers/jdbc/Array.cxx 
b/connectivity/source/drivers/jdbc/Array.cxx
index 445848483dd6..9322687a0b29 100644
--- a/connectivity/source/drivers/jdbc/Array.cxx
+++ b/connectivity/source/drivers/jdbc/Array.cxx
@@ -56,7 +56,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL 
java_sql_Array::getArray( const css
 {
 SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
 {
-jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
+jobject obj = convertTypeMapToJavaMap(typeMap);
 static const char * const cSignature = 
"(Ljava/util/Map;)[Ljava/lang/Object;";
 static const char * const cMethodName = "getArray";
 static jmethodID mID(nullptr);
@@ -74,7 +74,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL 
java_sql_Array::getArrayAtIndex( sa
 {
 SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
 {
-jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
+jobject obj = convertTypeMapToJavaMap(typeMap);
 static const char * const cSignature = 
"(IILjava/util/Map;)[Ljava/lang/Object;";
 static const char * const cMethodName = "getArray";
 // submit Java-Call
@@ -93,7 +93,7 @@ css::uno::Reference< css::sdbc::XResultSet > SAL_CALL 
java_sql_Array::getResultS
 SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
 {
 // convert Parameter
-jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
+jobject obj = convertTypeMapToJavaMap(typeMap);
 // initialize temporary variable
 static const char * const cSignature = 
"(Ljava/util/Map;)Ljava/sql/ResultSet;";
 static const char * const cMethodName = "getResultSet";
@@ -113,7 +113,7 @@ css::uno::Reference< css::sdbc::XResultSet > SAL_CALL 
java_sql_Array::getResultS
 SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
 {
 // convert parameter
-jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
+jobject obj = convertTypeMapToJavaMap(typeMap);
 // initialize temporary variable
 static const char * const cSignature = 
"(Ljava/util/Map;)Ljava/sql/ResultSet;";
 static const char * const cMethodName = "getResultSetAtIndex";
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx 
b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 490006b529f7..2b5f7fded2fe 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -295,7 +295,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 
columnIndex, const Referen
 jvalue args[2];
 // convert parameter
 args[0].i = columnIndex;
-args[1].l = convertTypeMapToJavaMap(t.pEnv,typeMap);
+args[1].l = convertTypeMapToJavaMap(typeMap);
 // initialize temporary Variable
 // Java-Call
 static jmethodID mID(nullptr);
diff --git a/connectivity/source/drivers/jdbc/tools.cxx 
b/connectivity/source/drivers/jdbc/tools.cxx
index 58580ccc16d2..13ee3000ddb5 100644
--- a/connectivity/source/drivers/jdbc/tools.cxx
+++ b/connectivity/source/drivers/jdbc/tools.cxx
@@ -173,7 +173,7 @@ OUString connectivity::JavaString2String(JNIEnv 
*pEnv,jstring Str)
 return aStr;
 }
 
-jobject connectivity::convertTypeMapToJavaMap(JNIEnv* /*pEnv*/,const 
Reference< css::container::XNameAccess > & _rMap)
+jobject connectivity::convertTypeMapToJavaMap(const Reference< 
css::container::XNameAccess > & _rMap)
 {
 if ( _rMap.is() )
 {
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx 
b/connectivity/source/drivers/mork/MResultSet.cxx
index f7e29c8612b7..da0e28facaa8 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -309,13 +309,6 @@ bool OResultSet::fetchRow(sal_Int32 cardNumber,bool 
bForceReload)
 // Check whether we've already fetched the row...
 if ( !(m_aRow->get())[0].isNull() && (sal_Int32)(m_aRow->get())[0] == 
cardNumber )
 return true;
-//Check whether the old row has 

[Libreoffice-commits] core.git: 2 commits - cppu/qa include/basegfx

2017-04-28 Thread Stephan Bergmann
 cppu/qa/test_unotype.cxx   |   11 ---
 include/basegfx/point/b2dpoint.hxx |   15 ---
 include/basegfx/polygon/b2dpolygon.hxx |   28 ++--
 include/basegfx/polygon/b2dpolypolygon.hxx |   28 ++--
 include/basegfx/range/b2drange.hxx |   15 +++
 include/basegfx/range/b2irange.hxx |   22 +++---
 6 files changed, 54 insertions(+), 65 deletions(-)

New commits:
commit cd7cd5342248354ab322c3722c100d2cfb525bd8
Author: Stephan Bergmann 
Date:   Fri Apr 28 14:16:01 2017 +0200

Remove now-duplicate css::uno::Type operator <<

...was missing from 06c1dc4c09ba816affb8b65e8215bcd56a81df91
"LIBO_INTERNAL_ONLY: printing of css::uno::Reference/Type"

Change-Id: Ifb3f8f72bfeb1038f01797aab9afb5f5059f9d5b

diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx
index 20727db830f2..391e9b352962 100644
--- a/cppu/qa/test_unotype.cxx
+++ b/cppu/qa/test_unotype.cxx
@@ -25,7 +25,6 @@
 #include 
 #include 
 
-#include 
 #include 
 
 #include "com/sun/star/beans/Optional.hpp"
@@ -46,16 +45,6 @@ namespace com { namespace sun { namespace star { namespace 
uno {
 class Any;
 } } } }
 
-namespace com { namespace sun { namespace star { namespace uno {
-
-template std::basic_ostream &
-operator <<(std::basic_ostream & stream, Type const & type) {
-return stream << type.getTypeName();
-}
-
-} } } }
-
-
 namespace {
 
 struct DerivedStruct1: css::lang::EventObject {};
commit 8c9f2efe621b7d5bc41e76b734a3fe9de90fa795
Author: Stephan Bergmann 
Date:   Fri Apr 28 14:14:02 2017 +0200

Make some basegfx operator << found by ADL

...as will be needed by some upcoming replacements of CPPUNIT_ASSERT with
CPPUNIT_ASSERT_EQUAL

Change-Id: I7c861f1cb81de4540e88d89dbf095acc61a56503

diff --git a/include/basegfx/point/b2dpoint.hxx 
b/include/basegfx/point/b2dpoint.hxx
index f757cac731da..0f1613252091 100644
--- a/include/basegfx/point/b2dpoint.hxx
+++ b/include/basegfx/point/b2dpoint.hxx
@@ -123,14 +123,15 @@ namespace basegfx
 matrix are used.
 */
 BASEGFX_DLLPUBLIC B2DPoint operator*( const B2DHomMatrix& rMat, const 
B2DPoint& rPoint );
-} // end of namespace basegfx
 
-template< typename charT, typename traits >
-inline std::basic_ostream & operator <<(
-std::basic_ostream & stream, const basegfx::B2DPoint& point 
)
-{
-return stream << "(" << point.getX() << "," << point.getY() << ")";
-}
+template< typename charT, typename traits >
+inline std::basic_ostream & operator <<(
+std::basic_ostream & stream, const B2DPoint& point )
+{
+return stream << "(" << point.getX() << "," << point.getY() << ")";
+}
+
+} // end of namespace basegfx
 
 #endif // INCLUDED_BASEGFX_POINT_B2DPOINT_HXX
 
diff --git a/include/basegfx/polygon/b2dpolygon.hxx 
b/include/basegfx/polygon/b2dpolygon.hxx
index c32d8251002e..703f24548975 100644
--- a/include/basegfx/polygon/b2dpolygon.hxx
+++ b/include/basegfx/polygon/b2dpolygon.hxx
@@ -223,23 +223,23 @@ namespace basegfx
 // typedef for a vector of B2DPolygons
 typedef ::std::vector< B2DPolygon > B2DPolygonVector;
 
-} // end of namespace basegfx
-
-template< typename charT, typename traits >
-inline std::basic_ostream & operator <<(
-std::basic_ostream & stream, const basegfx::B2DPolygon& 
poly )
-{
-stream << "<" << poly.count() << ":";
-for (sal_uInt32 i = 0; i < poly.count(); i++)
+template< typename charT, typename traits >
+inline std::basic_ostream & operator <<(
+std::basic_ostream & stream, const B2DPolygon& poly )
 {
-if (i > 0)
-stream << "--";
-stream << poly.getB2DPoint(i);
+stream << "<" << poly.count() << ":";
+for (sal_uInt32 i = 0; i < poly.count(); i++)
+{
+if (i > 0)
+stream << "--";
+stream << poly.getB2DPoint(i);
+}
+stream << ">";
+
+return stream;
 }
-stream << ">";
 
-return stream;
-}
+} // end of namespace basegfx
 
 #endif // INCLUDED_BASEGFX_POLYGON_B2DPOLYGON_HXX
 
diff --git a/include/basegfx/polygon/b2dpolypolygon.hxx 
b/include/basegfx/polygon/b2dpolypolygon.hxx
index c033989a722b..ddc05a669ceb 100644
--- a/include/basegfx/polygon/b2dpolypolygon.hxx
+++ b/include/basegfx/polygon/b2dpolypolygon.hxx
@@ -131,23 +131,23 @@ namespace basegfx
 // typedef for a vector of B2DPolyPolygons
 typedef ::std::vector< B2DPolyPolygon > B2DPolyPolygonVector;
 
-} // end of namespace basegfx
-
-template< typename charT, typename traits >
-inline std::basic_ostream & operator <<(
-std::basic_ostream & stream, const basegfx::B2DPolyPolygon& 
poly )
-{
-stream << 

[Libreoffice-commits] core.git: 15 commits - basegfx/test basic/qa comphelper/qa configmgr/qa cppu/qa extensions/qa sal/qa sc/qa sdext/source starmath/qa sw/qa test/source tools/qa unotest/source vcl/

2017-04-28 Thread Stephan Bergmann
 basegfx/test/basegfx2d.cxx   |  373 +--
 basegfx/test/basegfxtools.cxx|   18 -
 basegfx/test/boxclipper.cxx  |8 
 basegfx/test/clipstate.cxx   |4 
 basegfx/test/genericclipper.cxx  |9 
 basic/qa/cppunit/test_vba.cxx|2 
 comphelper/qa/container/testifcontainer.cxx  |3 
 configmgr/qa/unit/test.cxx   |   12 
 cppu/qa/test_any.cxx |  130 ++---
 extensions/qa/update/test_update.cxx |   12 
 sal/qa/OStringBuffer/rtl_OStringBuffer.cxx   |  110 ++-
 sal/qa/osl/condition/osl_Condition.cxx   |   44 ++-
 sal/qa/osl/file/osl_File.cxx |  298 +
 sal/qa/osl/file/test_cpy_wrt_file.cxx|4 
 sal/qa/osl/module/osl_Module.cxx |   22 +
 sal/qa/osl/mutex/osl_Mutex.cxx   |   42 ++-
 sal/qa/osl/pipe/osl_Pipe.cxx |   43 ++-
 sal/qa/osl/process/osl_Thread.cxx|  170 +---
 sal/qa/osl/security/osl_Security.cxx |   15 -
 sal/qa/rtl/uri/rtl_testuri.cxx   |  268 +--
 sc/qa/unit/subsequent_filters-test.cxx   |2 
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   20 -
 sc/qa/unit/ucalc.cxx |2 
 sdext/source/pdfimport/test/tests.cxx|   92 +++---
 starmath/qa/cppunit/test_starmath.cxx|   52 +--
 sw/qa/core/Test-BigPtrArray.cxx  |   20 -
 test/source/container/xelementaccess.cxx |2 
 test/source/container/xindexaccess.cxx   |4 
 test/source/sheet/cellproperties.cxx |4 
 test/source/sheet/datapilotfield.cxx |   17 -
 test/source/sheet/xdatabaserange.cxx |   12 
 test/source/sheet/xdatapilotdescriptor.cxx   |   12 
 test/source/sheet/xdatapilottable.cxx|6 
 test/source/sheet/xdatapilottable2.cxx   |   16 -
 test/source/sheet/xnamedrange.cxx|   24 -
 test/source/sheet/xnamedranges.cxx   |   18 -
 test/source/sheet/xsheetannotation.cxx   |   10 
 test/source/sheet/xspreadsheetdocument.cxx   |2 
 test/source/sheet/xspreadsheets2.cxx |2 
 test/source/util/xsearchable.cxx |2 
 tools/qa/cppunit/test_urlobj.cxx |   36 +-
 unotest/source/cpp/directories.cxx   |6 
 vcl/qa/cppunit/errorhandler.cxx  |4 
 vcl/qa/cppunit/fontmetric.cxx|   24 -
 44 files changed, 1190 insertions(+), 786 deletions(-)

New commits:
commit 29c09916760419ebfb87a954927bcd02b186a46b
Author: Stephan Bergmann 
Date:   Fri Apr 28 14:22:53 2017 +0200

loplugin:cppunitassertequals: vcl

Change-Id: I0b1b279b9bbb82b5e7aff0b0fb6a5be0ee0b3f62

diff --git a/vcl/qa/cppunit/errorhandler.cxx b/vcl/qa/cppunit/errorhandler.cxx
index e86cc793d2bd..defc218fac5f 100644
--- a/vcl/qa/cppunit/errorhandler.cxx
+++ b/vcl/qa/cppunit/errorhandler.cxx
@@ -51,12 +51,12 @@ void ErrorHandlerTest::testGetErrorString()
!ErrorHandler::GetErrorString(ERRCODE_ABORT, 
aErrStr));
 // normally protected, but MockErrorHandler is a friend of this class
 aErrHdlr.CreateString(ErrorInfo::GetErrorInfo(ERRCODE_ABORT), aErrStr);
-CPPUNIT_ASSERT_MESSAGE("error message should be non-dynamic", aErrStr == 
"Non-dynamic error");
+CPPUNIT_ASSERT_EQUAL_MESSAGE("error message should be non-dynamic", 
OUString("Non-dynamic error"), aErrStr);
 
 CPPUNIT_ASSERT_MESSAGE("GetErrorString(ERRCODE_NONE, aErrStr) should 
return false",
!ErrorHandler::GetErrorString(ERRCODE_NONE, 
aErrStr));
 aErrHdlr.CreateString(ErrorInfo::GetErrorInfo(ERRCODE_NONE), aErrStr);
-CPPUNIT_ASSERT_MESSAGE("error message should be non-dynamic", aErrStr == 
"Non-dynamic error");
+CPPUNIT_ASSERT_EQUAL_MESSAGE("error message should be non-dynamic", 
OUString("Non-dynamic error"), aErrStr);
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(ErrorHandlerTest);
diff --git a/vcl/qa/cppunit/fontmetric.cxx b/vcl/qa/cppunit/fontmetric.cxx
index 7fdd531c52b3..93378c6e581c 100644
--- a/vcl/qa/cppunit/fontmetric.cxx
+++ b/vcl/qa/cppunit/fontmetric.cxx
@@ -107,33 +107,33 @@ void VclFontMetricTest::testEqualityOperator()
 
 aLhs.SetFullstopCenteredFlag(true);
 aRhs.SetFullstopCenteredFlag(true);
-CPPUNIT_ASSERT_EQUAL_MESSAGE( "Fullstop centered flag set same, aLhs == 
aRhs failed", aRhs, aLhs );
-CPPUNIT_ASSERT_MESSAGE( "Fullstop centered flag set same, aLhs != aRhs 
succeeded", !(aLhs != aRhs) );
+CPPUNIT_ASSERT_MESSAGE( "Fullstop centered flag set same, aLhs == aRhs 
failed", aLhs.operator ==(aRhs) );
+CPPUNIT_ASSERT_MESSAGE( "Fullstop centered flag set same, aLhs != aRhs 
succeeded", !aLhs.operator !=(aRhs) );
 
 aLhs.SetExternalLeading(10);
 aRhs.SetExternalLeading(10);
-CPPUNIT_ASSERT_EQUAL_MESSAGE( "External leading set same, aLHS == aRhs 
failed", aRhs, aLhs );
-  

[Libreoffice-commits] core.git: compilerplugins/clang solenv/CompilerTest_compilerplugins_clang.mk solenv/gbuild

2017-04-28 Thread Stephan Bergmann
 compilerplugins/clang/cppunitassertequals.cxx  |  142 ++---
 compilerplugins/clang/test/cppunitassertequals.cxx |   56 
 compilerplugins/clang/test/cppunitassertequals.hxx |   23 +++
 solenv/CompilerTest_compilerplugins_clang.mk   |5 
 solenv/gbuild/CompilerTest.mk  |1 
 5 files changed, 183 insertions(+), 44 deletions(-)

New commits:
commit a528392e71bc70136021be4e3d83732fccbb885e
Author: Stephan Bergmann 
Date:   Fri Apr 28 14:23:35 2017 +0200

Fixed/improved loplugin:cppunitassertequals

* 994e38e336beeacbd983faafac480afc94d3947e "loplugin: use TypeCheck instead 
of
  getQualifiedNameAsString" had effectively disabled this plugin (Asserter 
is a
  struct, not a namespace).  Fixed that.

* Also improved the checks, for one removing the---expensive---use of
  Plugin::parentStmt, for another making the plugin look into (...), !..., 
and
  ...&&... expressions.

* However, as the plugin had effectively already been disabled (see above) 
when
  it was switched on generally with 839e53b933322b739a7f534af58c63a2c69af7bd
  "compilerplugins: enable loplugin:cppunitassertequals by default", it now 
hit
  way more places than I had initially anticipated.  To keep the amount of 
work
  manageable, midway-through I disabled looking into ...&&... expressions 
for
  now.  That will be enabled (and resulting warnings fixed) in follow-up
  commits.

* Checks like

CPPUNIT_ASSERT(a == b)

  that actually want to check a specific overloaded operator == 
implementation,
  rather than using such an operator == to actually check that a and b are
  equal, can be rewritten as

CPPUNIT_ASSERT(operator ==(a, b))

  to avoid false warnings from this plugin.

Change-Id: If3501020e2d150ad0f2454a65a39081e31470c0f

diff --git a/compilerplugins/clang/cppunitassertequals.cxx 
b/compilerplugins/clang/cppunitassertequals.cxx
index 858ad9615cbe..37dff6acca97 100644
--- a/compilerplugins/clang/cppunitassertequals.cxx
+++ b/compilerplugins/clang/cppunitassertequals.cxx
@@ -7,11 +7,6 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include "plugin.hxx"
 #include "check.hxx"
 
@@ -29,74 +24,133 @@ public:
 
 virtual void run() override
 {
-TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+if (compiler.getLangOpts().CPlusPlus) {
+TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+}
 }
 
 bool VisitCallExpr(const CallExpr*);
-bool VisitBinaryOperator(const BinaryOperator*);
+
 private:
-void checkExpr(const Stmt* stmt);
+void checkExpr(
+SourceRange range, StringRef name, Expr const * expr, bool negated);
+
+void reportEquals(SourceRange range, StringRef name, bool negative);
 };
 
 bool CppunitAssertEquals::VisitCallExpr(const CallExpr* callExpr)
 {
-if (ignoreLocation(callExpr)) {
+auto const decl = callExpr->getDirectCallee();
+if (decl == nullptr
+|| !(loplugin::DeclCheck(decl).Function("failIf").Struct("Asserter")
+ .Namespace("CppUnit").GlobalNamespace()))
+{
 return true;
 }
-if (callExpr->getDirectCallee() == nullptr) {
+// Don't use callExpr->getLocStart() or callExpr->getExprLoc(), as those
+// fall into a nested use of the CPPUNIT_NS macro; CallExpr::getRParenLoc
+// happens to be readily available and cause good results:
+auto loc = callExpr->getRParenLoc();
+while (compiler.getSourceManager().isMacroArgExpansion(loc)) {
+loc = compiler.getSourceManager().getImmediateMacroCallerLoc(loc);
+}
+if (!compiler.getSourceManager().isMacroBodyExpansion(loc)
+|| ignoreLocation(
+compiler.getSourceManager().getImmediateMacroCallerLoc(loc)))
+{
 return true;
 }
-const FunctionDecl* functionDecl = 
callExpr->getDirectCallee()->getCanonicalDecl();
-if (functionDecl->getOverloadedOperator() != OO_EqualEqual) {
+auto name = Lexer::getImmediateMacroName(
+loc, compiler.getSourceManager(), compiler.getLangOpts());
+if (name != "CPPUNIT_ASSERT" && name != "CPPUNIT_ASSERT_MESSAGE") {
 return true;
 }
-checkExpr(callExpr);
-return true;
-}
-
-bool CppunitAssertEquals::VisitBinaryOperator(const BinaryOperator* binaryOp)
-{
-if (ignoreLocation(binaryOp)) {
+if (decl->getNumParams() != 3) {
+report(
+DiagnosticsEngine::Warning,
+("TODO: suspicious CppUnit::Asserter::failIf call with %0"
+ " parameters"),
+callExpr->getExprLoc())
+<< decl->getNumParams() << callExpr->getSourceRange();
 return true;
 }
-if (binaryOp->getOpcode() != BO_EQ) {
+auto const e1 = callExpr->getArg(0)->IgnoreParenImpCasts();
+   

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

2017-04-28 Thread Stephan Bergmann
 include/com/sun/star/uno/Reference.hxx |   14 ++
 include/com/sun/star/uno/Type.hxx  |   13 +
 2 files changed, 27 insertions(+)

New commits:
commit 06c1dc4c09ba816affb8b65e8215bcd56a81df91
Author: Stephan Bergmann 
Date:   Fri Apr 28 14:09:57 2017 +0200

LIBO_INTERNAL_ONLY: printing of css::uno::Reference/Type

...as will be needed by some upcoming replacements of CPPUNIT_ASSERT with
CPPUNIT_ASSERT_EQUAL

Change-Id: Ie2b2b982b02f2bf48e2e8be7ba642198029c8698

diff --git a/include/com/sun/star/uno/Reference.hxx 
b/include/com/sun/star/uno/Reference.hxx
index c4708f1956b9..f197007cb8ff 100644
--- a/include/com/sun/star/uno/Reference.hxx
+++ b/include/com/sun/star/uno/Reference.hxx
@@ -22,6 +22,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -432,6 +433,19 @@ inline bool BaseReference::operator != ( const 
BaseReference & rRef ) const
 return (! operator == ( rRef._pInterface ));
 }
 
+#if defined LIBO_INTERNAL_ONLY
+/**
+   Support for BaseReference in std::ostream (and thus in CPPUNIT_ASSERT or
+   SAL_INFO macros, for example).
+
+   @since LibreOffice 5.4
+*/
+template std::basic_ostream &
+operator <<(
+std::basic_ostream & stream, BaseReference const & ref)
+{ return stream << ref.get(); }
+#endif
+
 }
 }
 }
diff --git a/include/com/sun/star/uno/Type.hxx 
b/include/com/sun/star/uno/Type.hxx
index 36800ce7be78..4a7b86e72c05 100644
--- a/include/com/sun/star/uno/Type.hxx
+++ b/include/com/sun/star/uno/Type.hxx
@@ -22,6 +22,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -92,6 +93,18 @@ inline Type & Type::operator = ( const Type & rType )
 template< class T >
 typelib_TypeDescriptionReference * Array< T >::s_pType = NULL;
 
+#if defined LIBO_INTERNAL_ONLY
+/**
+   Support for Type in std::ostream (and thus in CPPUNIT_ASSERT or SAL_INFO
+   macros, for example).
+
+   @since LibreOffice 5.4
+*/
+template std::basic_ostream &
+operator <<(std::basic_ostream & stream, Type const & type)
+{ return stream << type.getTypeName(); }
+#endif
+
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Stephan Bergmann
 include/basegfx/color/bcolor.hxx|   13 +
 include/basegfx/matrix/b2dhommatrix.hxx |   16 
 2 files changed, 29 insertions(+)

New commits:
commit cc18a06a5abca3f336d2263fc8248368c08635e4
Author: Stephan Bergmann 
Date:   Fri Apr 28 14:18:54 2017 +0200

Printing of some more basegfx types

...as will be needed by some upcoming replacements of CPPUNIT_ASSERT with
CPPUNIT_ASSERT_EQUAL

Change-Id: I24ede3cc287bcc3b5e73eb400e4044c469657659

diff --git a/include/basegfx/color/bcolor.hxx b/include/basegfx/color/bcolor.hxx
index d0854e63a579..300f8db81e81 100644
--- a/include/basegfx/color/bcolor.hxx
+++ b/include/basegfx/color/bcolor.hxx
@@ -20,6 +20,10 @@
 #ifndef INCLUDED_BASEGFX_COLOR_BCOLOR_HXX
 #define INCLUDED_BASEGFX_COLOR_BCOLOR_HXX
 
+#include 
+
+#include 
+
 #include 
 #include 
 #include 
@@ -173,6 +177,15 @@ namespace basegfx
 }
 
 };
+
+template
+std::basic_ostream & operator <<(
+std::basic_ostream & stream, BColor const & color)
+{
+return stream
+<< '[' << color.getRed() << ", " << color.getGreen() << ", "
+<< color.getBlue() << ']';
+}
 } // end of namespace basegfx
 
 #endif // INCLUDED_BASEGFX_COLOR_BCOLOR_HXX
diff --git a/include/basegfx/matrix/b2dhommatrix.hxx 
b/include/basegfx/matrix/b2dhommatrix.hxx
index 524be07bcfae..a7ab0c3f5917 100644
--- a/include/basegfx/matrix/b2dhommatrix.hxx
+++ b/include/basegfx/matrix/b2dhommatrix.hxx
@@ -20,6 +20,10 @@
 #ifndef INCLUDED_BASEGFX_MATRIX_B2DHOMMATRIX_HXX
 #define INCLUDED_BASEGFX_MATRIX_B2DHOMMATRIX_HXX
 
+#include 
+
+#include 
+
 #include 
 #include 
 #include 
@@ -104,6 +108,18 @@ namespace basegfx
 aMul *= rMatA;
 return aMul;
 }
+
+template
+std::basic_ostream & operator <<(
+std::basic_ostream & stream, B2DHomMatrix const & 
matrix)
+{
+return stream
+<< '[' << matrix.get(0, 0) << ' ' << matrix.get(0, 1) << ' '
+<< matrix.get(0, 2) << "; " << matrix.get(1, 0) << ' '
+<< matrix.get(1, 1) << ' ' << matrix.get(1, 2) << "; "
+<< matrix.get(2, 0) << ' ' << matrix.get(2, 1) << ' '
+<< matrix.get(2, 2) << ']';
+}
 } // end of namespace basegfx
 
 #endif // INCLUDED_BASEGFX_MATRIX_B2DHOMMATRIX_HXX
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Noel Grandin
 compilerplugins/clang/unusedenumconstants.cxx   |5 
 compilerplugins/clang/unusedenumconstants.readonly.results  |   40 
 compilerplugins/clang/unusedenumconstants.untouched.results |2 
 compilerplugins/clang/unusedenumconstants.writeonly.results | 1068 ++--
 compilerplugins/clang/unusedfields.cxx  |5 
 compilerplugins/clang/unusedfields.untouched.results|2 
 compilerplugins/clang/unusedfields.writeonly.results|2 
 7 files changed, 567 insertions(+), 557 deletions(-)

New commits:
commit fdc6f654ca3d7278ccc47fbb887e6106ec5a96ff
Author: Noel Grandin 
Date:   Fri Apr 28 14:05:39 2017 +0200

remove unnecessary machine-specific data out of loplugin output

Change-Id: Ib8ac5acacb1dab80943b1193201021f9890121c3

diff --git a/compilerplugins/clang/unusedenumconstants.cxx 
b/compilerplugins/clang/unusedenumconstants.cxx
index 51f445b7a940..ac4b5c07fa45 100644
--- a/compilerplugins/clang/unusedenumconstants.cxx
+++ b/compilerplugins/clang/unusedenumconstants.cxx
@@ -98,6 +98,11 @@ MyFieldInfo UnusedEnumConstants::niceName(const 
EnumConstantDecl* enumConstantDe
 
 aInfo.parentClass = enumConstantDecl->getType().getAsString();
 aInfo.fieldName = enumConstantDecl->getNameAsString();
+// sometimes the name (if it's anonymous thing) contains the full path of 
the build folder, which we don't need
+size_t idx = aInfo.fieldName.find(SRCDIR);
+if (idx != std::string::npos) {
+aInfo.fieldName = aInfo.fieldName.replace(idx, strlen(SRCDIR), "");
+}
 
 SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( 
enumConstantDecl->getLocation() );
 StringRef name = compiler.getSourceManager().getFilename(expansionLoc);
diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index e29333404d2b..d9497092a5ec 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -5,25 +5,25 @@ bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx:78
 bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx:79
 enum x86_64_reg_class X86_64_X87UP_CLASS
 chart2/source/inc/CharacterProperties.hxx:120
-enum chart::CharacterProperties::(anonymous at 
/home/noel/libo3/chart2/source/inc/CharacterProperties.hxx:41:5) 
FAST_PROPERTY_ID_END_CHAR_PROP
+enum chart::CharacterProperties::(anonymous at 
chart2/source/inc/CharacterProperties.hxx:41:5) FAST_PROPERTY_ID_END_CHAR_PROP
 chart2/source/inc/TitleHelper.hxx:47
 enum chart::TitleHelper::eTitleType NORMAL_TITLE_END
 configmgr/source/access.hxx:454
-enum configmgr::Access::(anonymous at 
/home/noel/libo3/configmgr/source/access.hxx:453:5) IS_EXTENSIBLE
+enum configmgr::Access::(anonymous at configmgr/source/access.hxx:453:5) 
IS_EXTENSIBLE
 configmgr/source/access.hxx:454
-enum configmgr::Access::(anonymous at 
/home/noel/libo3/configmgr/source/access.hxx:453:5) IS_SET
+enum configmgr::Access::(anonymous at configmgr/source/access.hxx:453:5) 
IS_SET
 configmgr/source/access.hxx:455
-enum configmgr::Access::(anonymous at 
/home/noel/libo3/configmgr/source/access.hxx:453:5) IS_SET_MEMBER
+enum configmgr::Access::(anonymous at configmgr/source/access.hxx:453:5) 
IS_SET_MEMBER
 configmgr/source/access.hxx:455
-enum configmgr::Access::(anonymous at 
/home/noel/libo3/configmgr/source/access.hxx:453:5) IS_GROUP_MEMBER
+enum configmgr::Access::(anonymous at configmgr/source/access.hxx:453:5) 
IS_GROUP_MEMBER
 configmgr/source/components.hxx:154
 enum configmgr::Components::ModificationTarget Dconf
 configmgr/source/parsemanager.hxx:47
-enum configmgr::ParseManager::(anonymous at 
/home/noel/libo3/configmgr/source/parsemanager.hxx:47:5) NAMESPACE_XSI
+enum configmgr::ParseManager::(anonymous at 
configmgr/source/parsemanager.hxx:47:5) NAMESPACE_XSI
 configmgr/source/parsemanager.hxx:47
-enum configmgr::ParseManager::(anonymous at 
/home/noel/libo3/configmgr/source/parsemanager.hxx:47:5) NAMESPACE_OOR
+enum configmgr::ParseManager::(anonymous at 
configmgr/source/parsemanager.hxx:47:5) NAMESPACE_OOR
 configmgr/source/parsemanager.hxx:47
-enum configmgr::ParseManager::(anonymous at 
/home/noel/libo3/configmgr/source/parsemanager.hxx:47:5) NAMESPACE_XS
+enum configmgr::ParseManager::(anonymous at 
configmgr/source/parsemanager.hxx:47:5) NAMESPACE_XS
 connectivity/source/inc/FDatabaseMetaDataResultSet.hxx:110
 enum connectivity::ODatabaseMetaDataResultSet::MetaDataResultSetType eUDTs
 cui/source/options/optgenrl.cxx:53
@@ -293,11 +293,11 @@ sfx2/source/sidebar/SidebarController.cxx:78
 sfx2/source/sidebar/SidebarController.cxx:79
 enum sfx2::sidebar::(anonymous namespace)::MenuId MID_FIRST_HIDE
 slideshow/source/engine/shapes/viewshape.hxx:281
-enum slideshow::internal::ViewShape::(anonymous at 

[Libreoffice-commits] online.git: common/Seccomp.cpp common/Seccomp.hpp configure.ac kit/Kit.cpp Makefile.am

2017-04-28 Thread Michael Meeks
 Makefile.am|2 
 common/Seccomp.cpp |  150 +
 common/Seccomp.hpp |   21 +++
 configure.ac   |3 +
 kit/Kit.cpp|8 ++
 5 files changed, 184 insertions(+)

New commits:
commit 7f4f7526674af84660b50b8156e7c3c741d0751c
Author: Michael Meeks 
Date:   Fri Apr 28 11:02:06 2017 +0100

Initial seccomp work.

Add a list of unhelpful looking system calls to improve containment.

Change-Id: I2e4bf3e0a6a752d427299728663d17120586bb10

diff --git a/Makefile.am b/Makefile.am
index cfcfd7c3..622fe550 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,6 +47,7 @@ shared_sources = common/FileUtil.cpp \
  common/Log.cpp \
  common/Protocol.cpp \
  common/Session.cpp \
+ common/Seccomp.cpp \
  common/MessageQueue.cpp \
  common/SigUtil.cpp \
  common/SpookyV2.cpp \
@@ -152,6 +153,7 @@ shared_headers = common/Common.hpp \
  common/Log.hpp \
  common/LOOLWebSocket.hpp \
  common/Protocol.hpp \
+ common/Seccomp.hpp \
  common/Session.hpp \
  common/Unit.hpp \
  common/UnitHTTP.hpp \
diff --git a/common/Seccomp.cpp b/common/Seccomp.cpp
new file mode 100644
index ..d2959fd4
--- /dev/null
+++ b/common/Seccomp.cpp
@@ -0,0 +1,150 @@
+/* -*- 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/.
+ */
+/*
+ * Code to lock-down the environment of the processes we run, to avoid
+ * exotic or un-necessary system calls to be used to break containment.
+ */
+
+#include "config.h"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#if defined(__x86_64__)
+#  define AUDIT_ARCH_NR AUDIT_ARCH_X86_64
+#else
+#  error "Platform does not support seccomp filtering yet - unsafe."
+#endif
+
+namespace Seccomp {
+
+bool lockdown(Type type)
+{
+(void)type; // so far just the kit.
+
+// FIXME: partition better to give log() branching.
+#define KILL_SYSCALL(name) \
+BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_##name, 0, 1), \
+BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL)
+
+struct sock_filter filterCode[] = {
+// Check our architecture is correct.
+BPF_STMT(BPF_LD+BPF_W+BPF_ABS,  offsetof(struct seccomp_data, arch)),
+BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, AUDIT_ARCH_NR, 1, 0),
+BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL),
+
+// Load sycall number
+BPF_STMT(BPF_LD+BPF_W+BPF_ABS,  offsetof(struct seccomp_data, nr)),
+
+// FIXME: white-list low-numbers / safe common-cases first
+// at the expense of some cross-platform complexity ?
+
+// FIXME: should we bother blocking calls that have early
+// permission checks we don't meet ?
+
+#if 0
+// cf. eg. /usr/include/asm/unistd_64.h ...
+KILL_SYSCALL(ioctl),
+KILL_SYSCALL(mincore),
+KILL_SYSCALL(shmget),
+KILL_SYSCALL(shmat),
+KILL_SYSCALL(shmctl),
+#endif
+KILL_SYSCALL(getitimer),
+KILL_SYSCALL(setitimer),
+KILL_SYSCALL(sendfile),
+KILL_SYSCALL(shutdown),
+KILL_SYSCALL(listen),
+#if 0
+KILL_SYSCALL(wait4),
+#endif
+KILL_SYSCALL(kill),   // !
+KILL_SYSCALL(shmctl),
+KILL_SYSCALL(ptrace), // !
+KILL_SYSCALL(capset),
+#if 0
+KILL_SYSCALL(uselib),
+#endif
+KILL_SYSCALL(personality), // !
+KILL_SYSCALL(vhangup),
+KILL_SYSCALL(modify_ldt), // !
+KILL_SYSCALL(pivot_root), // !
+KILL_SYSCALL(chroot),
+KILL_SYSCALL(acct),   // !
+KILL_SYSCALL(sync),   // I/O perf.
+KILL_SYSCALL(mount),
+KILL_SYSCALL(umount2),
+KILL_SYSCALL(swapon),
+KILL_SYSCALL(swapoff),
+KILL_SYSCALL(reboot), // !
+KILL_SYSCALL(sethostname),
+KILL_SYSCALL(setdomainname),
+KILL_SYSCALL(tkill),
+KILL_SYSCALL(mbind), // vm bits
+KILL_SYSCALL(set_mempolicy), // vm bits
+KILL_SYSCALL(get_mempolicy), // vm bits
+KILL_SYSCALL(kexec_load),
+KILL_SYSCALL(add_key), // kernel keyring
+KILL_SYSCALL(request_key), // kernel keyring
+KILL_SYSCALL(keyctl),  // kernel keyring
+KILL_SYSCALL(inotify_init),
+KILL_SYSCALL(inotify_add_watch),
+KILL_SYSCALL(inotify_rm_watch),
+KILL_SYSCALL(unshare),
+KILL_SYSCALL(splice),
+KILL_SYSCALL(tee),
+

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

2017-04-28 Thread Caolán McNamara
 external/boost/StaticLibrary_boost_locale.mk |8 
 external/boost/UnpackedTarball_boost.mk  |2 +
 external/boost/boost.noiconv.patch   |   51 +++
 3 files changed, 53 insertions(+), 8 deletions(-)

New commits:
commit 3d0cbe3e7bff402f2626deb94274c0fef40e4bde
Author: Caolán McNamara 
Date:   Fri Apr 28 14:31:31 2017 +0100

try without iconv, we probably don't need it in practice

Change-Id: I14782971dd35f8d96f1e9b08fdf060aa917a1e37

diff --git a/external/boost/StaticLibrary_boost_locale.mk 
b/external/boost/StaticLibrary_boost_locale.mk
index 9f9338c69984..c08d6f8b7b06 100644
--- a/external/boost/StaticLibrary_boost_locale.mk
+++ b/external/boost/StaticLibrary_boost_locale.mk
@@ -18,14 +18,6 @@ $(eval $(call gb_StaticLibrary_add_defs,boost_locale,\
-DBOOST_ALL_NO_LIB -DBOOST_LOCALE_NO_WINAPI_BACKEND 
-DBOOST_LOCALE_NO_POSIX_BACKEND \
 ))
 
-ifneq ($(OS),WNT)
-
-$(eval $(call gb_StaticLibrary_add_defs,boost_locale,\
-   -DBOOST_LOCALE_WITH_ICONV \
-))
-
-endif
-
 $(eval $(call gb_StaticLibrary_use_external,boost_locale,boost_headers))
 
 $(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,boost_locale,cpp))
diff --git a/external/boost/UnpackedTarball_boost.mk 
b/external/boost/UnpackedTarball_boost.mk
index 813e663c2a34..efd23d317098 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -24,6 +24,8 @@ boost_patches += boost.type_index.Wundef.warnings.patch
 
 boost_patches += boost.auto_link.patch
 
+boost_patches += boost.noiconv.patch
+
 boost_patches += ubsan.patch.0
 boost_patches += rtti.patch.0
 
diff --git a/external/boost/boost.noiconv.patch 
b/external/boost/boost.noiconv.patch
new file mode 100644
index ..5ea0aab385a8
--- /dev/null
+++ b/external/boost/boost.noiconv.patch
@@ -0,0 +1,51 @@
+diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp 
boost/boost/libs/locale/src/encoding/codepage.cpp
+--- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
 foo/misc/boost/libs/locale/src/encoding/codepage.cpp
+@@ -39,6 +39,7 @@
+ char const *from_charset,
+ method_type how)
+ {
++#if defined(BOOST_LOCALE_WITH_ICONV) || 
defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
+ std::auto_ptr cvt;
+ #ifdef BOOST_LOCALE_WITH_ICONV
+ cvt.reset(new iconv_between());
+@@ -55,6 +56,7 @@
+ if(cvt->open(to_charset,from_charset,how))
+ return cvt->convert(begin,end);
+ #endif
++#endif
+ throw invalid_charset_error(std::string(to_charset) + " 
or " + from_charset);
+ }
+ 
+@@ -65,6 +67,7 @@
+ char const *charset,
+ method_type how)
+ {
++#if defined(BOOST_LOCALE_WITH_ICONV) || 
defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
+ std::auto_ptr cvt;
+ #ifdef BOOST_LOCALE_WITH_ICONV
+ cvt.reset(new iconv_to_utf());
+@@ -81,6 +84,7 @@
+ if(cvt->open(charset,how))
+ return cvt->convert(begin,end);
+ #endif
++#endif
+ throw invalid_charset_error(charset);
+ }
+ 
+@@ -91,6 +95,7 @@
+ char const *charset,
+ method_type how)
+ {
++#if defined(BOOST_LOCALE_WITH_ICONV) || 
defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
+ std::auto_ptr cvt;
+ #ifdef BOOST_LOCALE_WITH_ICONV
+ cvt.reset(new iconv_from_utf());
+@@ -107,6 +112,7 @@
+ if(cvt->open(charset,how))
+ return cvt->convert(begin,end);
+ #endif
++#endif
+ throw invalid_charset_error(charset);
+ }
+ 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: accessibility/inc accessibility/source avmedia/source include/avmedia sc/source sd/source sw/source

2017-04-28 Thread Noel Grandin
 accessibility/inc/standard/vclxaccessiblelist.hxx|7 +--
 accessibility/source/standard/vclxaccessiblelist.cxx |9 ++---
 avmedia/source/framework/mediacontrol.cxx|3 +--
 avmedia/source/viewer/mediawindow.cxx|3 +--
 include/avmedia/mediawindow.hxx  |3 +--
 sc/source/ui/drawfunc/fuins1.cxx |2 +-
 sd/source/ui/func/fuinsert.cxx   |2 +-
 sw/source/uibase/shells/grfshex.cxx  |2 +-
 8 files changed, 9 insertions(+), 22 deletions(-)

New commits:
commit dc735109bf44754b59a6fcdbcb8171d1bbf82ba3
Author: Noel Grandin 
Date:   Fri Apr 28 11:19:09 2017 +0200

loplugin:checkunusedparams in accessibility and avmedia

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

diff --git a/accessibility/inc/standard/vclxaccessiblelist.hxx 
b/accessibility/inc/standard/vclxaccessiblelist.hxx
index 9d77fe7a526a..2399d5d69603 100644
--- a/accessibility/inc/standard/vclxaccessiblelist.hxx
+++ b/accessibility/inc/standard/vclxaccessiblelist.hxx
@@ -164,13 +164,8 @@ protected:
 
 /** Call this method when the item list has been changed, i.e. items
 have been deleted or inserted.
-@param bItemInserted
-Indicate whether items have been inserted (TRUE) or removed 
(FALSE).
-@param nIndex
-Index of the new or removed item.  A value of -1 indicates that
-the whole list has been cleared.
 */
-void HandleChangedItemList (bool bItemInserted, sal_Int32 nIndex);
+void HandleChangedItemList();
 
 // VCLXAccessibleComponent
 virtual css::awt::Rectangle implGetBounds(  ) override;
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx 
b/accessibility/source/standard/vclxaccessiblelist.cxx
index d314879765cf..0da28109 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -389,14 +389,9 @@ void VCLXAccessibleList::ProcessWindowEvent (const 
VclWindowEvent& rVclWindowEve
 
 case VclEventId::ListboxItemRemoved:
 case VclEventId::ComboboxItemRemoved:
-HandleChangedItemList (false, reinterpret_cast(
-rVclWindowEvent.GetData()));
-break;
-
 case VclEventId::ListboxItemAdded:
 case VclEventId::ComboboxItemAdded:
-HandleChangedItemList (true, reinterpret_cast(
-rVclWindowEvent.GetData()));
+HandleChangedItemList();
 break;
 case VclEventId::ControlGetFocus:
 {
@@ -515,7 +510,7 @@ Reference VCLXAccessibleList::CreateChild 
(sal_Int32 nPos)
 }
 
 
-void VCLXAccessibleList::HandleChangedItemList (bool /*bItemInserted*/, 
sal_Int32 /*nIndex*/)
+void VCLXAccessibleList::HandleChangedItemList()
 {
 clearItems();
 NotifyAccessibleEvent (
diff --git a/avmedia/source/framework/mediacontrol.cxx 
b/avmedia/source/framework/mediacontrol.cxx
index 18d4f5599618..85d3f95dd97b 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -294,8 +294,7 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p, void )
 {
 OUString aURL;
 
- if (MediaWindow::executeMediaURLDialog(
- GetParent(), aURL, nullptr))
+ if (MediaWindow::executeMediaURLDialog(aURL, nullptr))
  {
  if( !MediaWindow::isMediaURL( aURL, ""/*TODO?*/, true ) )
 MediaWindow::executeFormatErrorBox( this );
diff --git a/avmedia/source/viewer/mediawindow.cxx 
b/avmedia/source/viewer/mediawindow.cxx
index 71227b86265c..54c7308976b8 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -209,8 +209,7 @@ void MediaWindow::getMediaFilters( FilterNameVector& 
rFilterNameVector )
 }
 
 
-bool MediaWindow::executeMediaURLDialog(vcl::Window*,
-OUString& rURL, bool *const o_pbLink)
+bool MediaWindow::executeMediaURLDialog(OUString& rURL, bool *const o_pbLink)
 {
 ::sfx2::FileDialogHelperaDlg( o_pbLink
 ? ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW
diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx
index c24fcdcfb589..f5dd652f2cd6 100644
--- a/include/avmedia/mediawindow.hxx
+++ b/include/avmedia/mediawindow.hxx
@@ -98,8 +98,7 @@ namespace avmedia
 static void getMediaFilters( FilterNameVector& 
rFilterNameVector );
 /// @param o_pbLink if not 0, this is an "insert" dialog: display link
 /// checkbox and store its state in *o_pbLink
-static bool executeMediaURLDialog( vcl::Window* pParent,
-OUString& rURL, 

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

2017-04-28 Thread Caolán McNamara
 filter/source/graphicfilter/icgm/class2.cxx |   15 +++
 1 file changed, 15 insertions(+)

New commits:
commit 217e9a5b581d59bc70ea4cb71a7da31411812156
Author: Caolán McNamara 
Date:   Thu Apr 27 21:45:31 2017 +0100

ofz#1284 InsertBundle may delete the bundle that pMarkerBundle is pointing 
to

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

diff --git a/filter/source/graphicfilter/icgm/class2.cxx 
b/filter/source/graphicfilter/icgm/class2.cxx
index 93b3679381b6..bedcd2e37de2 100644
--- a/filter/source/graphicfilter/icgm/class2.cxx
+++ b/filter/source/graphicfilter/icgm/class2.cxx
@@ -147,7 +147,10 @@ void CGM::ImplDoClass2()
 aTempLineBundle.eLineType = (LineType)ImplGetI( 
pElement->nIndexPrecision );
 aTempLineBundle.nLineWidth = ImplGetFloat( 
pElement->eRealPrecision, pElement->nRealSize );
 aTempLineBundle.SetColor( ImplGetBitmapColor() );
+const bool bUpdateLineBundle = aTempLineBundle.GetIndex() == 
pElement->pLineBundle->GetIndex();
 CGMElements::InsertBundle( pElement->aLineList, aTempLineBundle );
+if (bUpdateLineBundle)
+pElement->pLineBundle = 
static_cast(CGMElements::GetBundleIndex(aTempLineBundle.GetIndex(),
 pElement->aLineList, pElement->aLineBundle));
 }
 break;
 case 0x0c : /*Marker Representation*/
@@ -157,7 +160,10 @@ void CGM::ImplDoClass2()
 aTempMarkerBundle.eMarkerType = (MarkerType)ImplGetI( 
pElement->nIndexPrecision );
 aTempMarkerBundle.nMarkerSize = ImplGetFloat( 
pElement->eRealPrecision, pElement->nRealSize );
 aTempMarkerBundle.SetColor( ImplGetBitmapColor() );
+const bool bUpdateMarkerBundle = aTempMarkerBundle.GetIndex() == 
pElement->pMarkerBundle->GetIndex();
 CGMElements::InsertBundle( pElement->aMarkerList, 
aTempMarkerBundle );
+if (bUpdateMarkerBundle)
+pElement->pMarkerBundle = 
static_cast(CGMElements::GetBundleIndex(aTempMarkerBundle.GetIndex(),
 pElement->aMarkerList, pElement->aMarkerBundle));
 }
 break;
 case 0x0d : /*Text Representation*/
@@ -169,7 +175,10 @@ void CGM::ImplDoClass2()
 aTempTextBundle.nCharacterSpacing = ImplGetFloat( 
pElement->eRealPrecision, pElement->nRealSize );
 aTempTextBundle.nCharacterExpansion = ImplGetFloat( 
pElement->eRealPrecision, pElement->nRealSize );
 aTempTextBundle.SetColor( ImplGetBitmapColor() );
+const bool bUpdateTextBundle = aTempTextBundle.GetIndex() == 
pElement->pTextBundle->GetIndex();
 CGMElements::InsertBundle( pElement->aTextList, aTempTextBundle );
+if (bUpdateTextBundle)
+pElement->pTextBundle = 
static_cast(CGMElements::GetBundleIndex(aTempTextBundle.GetIndex(),
 pElement->aTextList, pElement->aTextBundle));
 }
 break;
 case 0x0e : /*Fill Representation*/
@@ -180,7 +189,10 @@ void CGM::ImplDoClass2()
 aTempFillBundle.SetColor( ImplGetBitmapColor() );
 aTempFillBundle.nFillPatternIndex = ImplGetI( 
pElement->nIndexPrecision );
 aTempFillBundle.nFillHatchIndex = ImplGetI( 
pElement->nIndexPrecision );
+const bool bUpdateFillBundle = aTempFillBundle.GetIndex() == 
pElement->pFillBundle->GetIndex();
 CGMElements::InsertBundle( pElement->aFillList, aTempFillBundle );
+if (bUpdateFillBundle)
+pElement->pFillBundle = 
static_cast(CGMElements::GetBundleIndex(aTempFillBundle.GetIndex(),
 pElement->aFillList, pElement->aFillBundle));
 }
 break;
 case 0x0f : /*Edge Representation*/
@@ -190,7 +202,10 @@ void CGM::ImplDoClass2()
 aTempEdgeBundle.eEdgeType = (EdgeType)ImplGetI( 
pElement->nIndexPrecision );
 aTempEdgeBundle.nEdgeWidth = ImplGetFloat( 
pElement->eRealPrecision, pElement->nRealSize );
 aTempEdgeBundle.SetColor( ImplGetBitmapColor() );
+const bool bUpdateEdgeBundle = aTempEdgeBundle.GetIndex() == 
pElement->pEdgeBundle->GetIndex();
 CGMElements::InsertBundle( pElement->aEdgeList, aTempEdgeBundle );
+if (bUpdateEdgeBundle)
+pElement->pEdgeBundle = 
static_cast(CGMElements::GetBundleIndex(aTempEdgeBundle.GetIndex(),
 pElement->aEdgeList, pElement->aEdgeBundle));
 }
 break;
 case 0x10 : /*Interior Style Specification Mode */break;// NS
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Kohei
 configure.ac |4 
 1 file changed, 4 insertions(+)

New commits:
commit 96f36a9a4d56bc1f09a6ae0257dbbea1ce315d62
Author: Kohei 
Date:   Thu Apr 27 23:06:23 2017 -0400

Enable formula logger when dbgutil is enabled.

So that this code will get tested by jenkin's builds.

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

diff --git a/configure.ac b/configure.ac
index 1be6bb7db0c8..415927b030ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12508,6 +12508,10 @@ if test "x$enable_formula_logger" = "xyes"; then
 AC_MSG_RESULT([yes])
 AC_DEFINE(ENABLE_FORMULA_LOGGER)
 ENABLE_FORMULA_LOGGER=TRUE
+elif test -n "$ENABLE_DBGUTIL" ; then
+AC_MSG_RESULT([yes])
+AC_DEFINE(ENABLE_FORMULA_LOGGER)
+ENABLE_FORMULA_LOGGER=TRUE
 else
 AC_MSG_RESULT([no])
 fi
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Tor Lillqvist
 cui/source/options/optgenrl.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit a631f8ec1d3ece2de5f43a143a4ecc35bdebd1dc
Author: Tor Lillqvist 
Date:   Fri Apr 28 14:57:44 2017 +0300

Fix indentation

Change-Id: I9d4b933e6a1a108427ac6583ff8305b40a620409

diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index fc220de51598..8ea85be28857 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -233,10 +233,10 @@ void SvxGeneralTabPage::InitControls ()
 LangBit = Lang::Russian;
 else
 {
-if (MsLangId::isFamilyNameFirst(l))
-LangBit = Lang::Eastern;
-else
-LangBit = Lang::Others;
+if (MsLangId::isFamilyNameFirst(l))
+LangBit = Lang::Eastern;
+else
+LangBit = Lang::Others;
 }
 
 // creating rows
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Michael Stahl
 sw/source/uibase/utlui/content.cxx |2 +-
 sw/source/uibase/wrtsh/wrtsh1.cxx  |5 +
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 7f207fca577ef820be2aec0a442df7e8ab6e14a6
Author: Michael Stahl 
Date:   Fri Apr 28 13:26:01 2017 +0200

tdf#107474 sw: fix crash when deleting header with active SdrObject

The problem is that the SdrView's text edit mode remains active when
the header is deleted, which deletes the active SdrObject that is
anchored in the header.

Then the next call to SdrBeginTextEdit() will call SdrEndTextEdit()
but the mxTextEditObj WeakReference is null then and so the cleanup
code that resets the SdrOutliner's UndoManager is not called,
but then the SdrOutliner is deleted.

What's really horrible about this is that while text editing is active,
both SdrObjEditView and ImpEditEngine consider themselves the
exclusive owner of SwDoc's UndoManager.

(regression from 12a4200e8ff7f045efcc7e9d15a24b15b248c437
 and d7b7c9fdfe63deec26c420efc3ff1fd73c21bb27)

Change-Id: I17c5165a03d2de1eaba8a335dfbfded56573f8a2

diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index d37bfcd7a1d7..617fc2cecf20 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1763,6 +1763,11 @@ void SwWrtShell::SetReadonlyOption(bool bSet)
 void SwWrtShell::ChangeHeaderOrFooter(
 const OUString& rStyleName, bool bHeader, bool bOn, bool bShowWarning)
 {
+SdrView *const pSdrView = GetDrawView();
+if (pSdrView && pSdrView->IsTextEdit())
+{   // tdf#107474 deleting header may delete active drawing object
+pSdrView->SdrEndTextEdit(true);
+}
 addCurrentPosition();
 StartAllAction();
 StartUndo( SwUndoId::HEADER_FOOTER ); // #i7983#
commit 875d9d55a3646d0a027cf776b840e7f78c7f7ab5
Author: Michael Stahl 
Date:   Fri Apr 28 13:25:46 2017 +0200

sw: remove useless comment

Change-Id: I019aa3a9381af0cb26970b69ab41258e05410617

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 4cb03a5a7423..0363ec3d535a 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2768,7 +2768,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
 SdrView* pDrawView = m_pActiveShell->GetDrawView();
 if (pDrawView)
 {
-pDrawView->SdrEndTextEdit();//Change from 
"EndTextEdit" to "SdrEndTextEdit" for acc migration
+pDrawView->SdrEndTextEdit();
 
 SwDrawModel* pDrawModel = 
m_pActiveShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
 SdrPage* pPage = pDrawModel->GetPage(0);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Christian Lohmaier
 l10ntools/source/po.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 11468ea907f7114370438db87012fb74a355bc25
Author: Christian Lohmaier 
Date:   Fri Apr 28 16:45:12 2017 +0200

allow itemlist-method's multi-line msgid strings in msgctxt

otherwise pocheck will file on strings like like e.g.

 #: analysis.src
 msgctxt ""
 "analysis.src\n"
 "ANALYSIS_Weeknum\n"
 "Returns the number of the calendar week in which the specified date 
occurs.\n"
 "This function exists for interoperability with older Microsoft Excel 
documents, for new documents use WEEKNUM instead.\n"
 "itemlist.text"
 msgid ""
 "Returns the number of the calendar week in which the specified date 
occurs.\n"
 "This function exists for interoperability with older Microsoft Excel 
documents, for new documents use WEEKNUM instead."
 msgstr ""

Change-Id: Ib64a989933ca42c5119b0ecf2339f693793d4e96

diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 87b78dd72467..7bfa070e64ce 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -491,7 +491,6 @@ bool lcl_CheckInputEntry(const GenPoEntry& rEntry)
 const OString sType = sMsgCtxt.copy( nLastDot + 1 );
 return !rEntry.getReference().isEmpty() &&
 nFirstEndLine > 0 &&
-(nLastEndLine == nFirstEndLine || nLastEndLine == 
sMsgCtxt.indexOf('\n',nFirstEndLine+1)) &&
 nLastDot - nLastEndLine > 1 &&
 (sType == "text" || sType == "quickhelptext" || sType == "title")&&
 !rEntry.getMsgId().isEmpty();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Pranav Kant
 sc/source/ui/unoobj/docuno.cxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit 1e451bb6d12677beece573512f5af700c282b25e
Author: Pranav Kant 
Date:   Wed Apr 26 17:57:55 2017 +0530

sc lok: Do not change comment indicator setting

This setting is saved to doc model when document is saved eventually. We
should respect the user settings, and not play with it like this -
changing this setting to false unconditionally.

Originally, setting SetNotesMode to false was meant to prevent any kind
of in-tile note rendering in case of LOK when it is turned off. But
turns out this option is only for note indicator i.e the red button. We
already have a LOK in-tile rendering guard in ScDocFunc::ShowNote that
prevents popping drawinglayer note even if corresponding UNO command is
sent by the LOK client.

Change-Id: Id6c7b2cd30cdbefe7dacc2a701638b2488ab245d

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index c35c98f2fee6..d44110def97e 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1050,10 +1050,6 @@ void ScModelObj::initializeForTiledRendering(const 
css::uno::SequenceSetNotesMode(false);
-
 // default tile size in pixels
 mnTilePixelWidth = 256;
 mnTilePixelHeight = 256;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: translations

2017-04-28 Thread Christian Lohmaier
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b03b29ccbb84bf4ee5211c8f1e2d9bb66e9ebc03
Author: Christian Lohmaier 
Date:   Fri Apr 28 16:50:05 2017 +0200

Updated core
Project: translations  2425bbd76383ee0ec7f94441bd432db6af2b3a58

update translations for 5.4.0 alpha1

and force-fix errors using pocheck

Change-Id: Idd8a43ec96b75f779aab472e67c1471299160b87

diff --git a/translations b/translations
index 6239d3c02042..2425bbd76383 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 6239d3c020420e52cbb304e4a6ed6f4eaa45b448
+Subproject commit 2425bbd76383ee0ec7f94441bd432db6af2b3a58
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Eike Rathke
 include/tools/date.hxx  |8 
 tools/qa/cppunit/test_date.cxx  |   17 +
 tools/source/datetime/tdate.cxx |2 +-
 3 files changed, 22 insertions(+), 5 deletions(-)

New commits:
commit 0e65e82238c8ded807d022234029163dc5b67f0a
Author: Eike Rathke 
Date:   Fri Apr 28 17:21:30 2017 +0200

Adapt documentation to reality

Change-Id: Ic76cdff3c95e68e91700ca7143e8aa8c908ed56e

diff --git a/include/tools/date.hxx b/include/tools/date.hxx
index bab1efd833f8..600c4f90a562 100644
--- a/include/tools/date.hxx
+++ b/include/tools/date.hxx
@@ -164,8 +164,8 @@ public:
 
 /** If the represented date is valid (1<=month<=12, 1<=day<=(28,29,30,31)
 depending on month/year) AND is of the Gregorian calendar (1582-10-15
-<= date) (AND implicitly date <= -12-31 due to internal
-representation) */
+<= date)
+ */
 boolIsValidAndGregorian() const;
 
 /** If the represented date is valid (1<=month<=12, 1<=day<=(28,29,30,31)
@@ -175,8 +175,8 @@ public:
 /** Normalize date, invalid day or month values are adapted such that they
 carry over to the next month or/and year, for example 1999-02-32
 becomes 1999-03-04, 1999-13-01 becomes 2000-01-01, 1999-13-42 becomes
-2000-02-11. Truncates at -12-31, -00-x will yield the
-normalized value of -01-max(1,(x-31))
+2000-02-11. Truncates at -32768-01-01 or 32767-12-31, 0001-00-x will
+yield the normalized value of -0001-12-x
 
 This may be necessary after Date ctors or if the SetDate(), SetDay(),
 SetMonth(), SetYear() methods set individual non-matching values.
commit 8bdbfdb97d94745454b2ad87d341bcb32d10461c
Author: Eike Rathke 
Date:   Fri Apr 28 17:14:32 2017 +0200

Add unit tests for Date::Normalize()

Change-Id: I4edb04748b1f407eb6ce17cd24ff022cef6e1f67

diff --git a/tools/qa/cppunit/test_date.cxx b/tools/qa/cppunit/test_date.cxx
index 0ee30089b7b5..c2c31e10b51c 100644
--- a/tools/qa/cppunit/test_date.cxx
+++ b/tools/qa/cppunit/test_date.cxx
@@ -56,6 +56,23 @@ void DateTest::testDate()
 CPPUNIT_ASSERT_EQUAL( aMin.GetDate(), (aDate += (kMinDays-10)).GetDate());
 aDate = aBCE;
 CPPUNIT_ASSERT_EQUAL( aMax.GetDate(), (aDate += (kMaxDays+10)).GetDate());
+aDate = aMax;
+aDate.SetDay(32);
+aDate.Normalize();
+CPPUNIT_ASSERT_EQUAL( aMax.GetDate(), aDate.GetDate());
+
+// 0001-00-x normalized to -0001-12-x
+aDate.SetYear(1);
+aDate.SetMonth(0);
+aDate.SetDay(22);
+aDate.Normalize();
+CPPUNIT_ASSERT_EQUAL( Date(22,12,-1).GetDate(), aDate.GetDate());
+// 1999-02-32 normalized to 1999-03-04
+aDate.SetYear(1999);
+aDate.SetMonth(2);
+aDate.SetDay(32);
+aDate.Normalize();
+CPPUNIT_ASSERT_EQUAL( Date(4,3,1999).GetDate(), aDate.GetDate());
 
 // Year -1 is a leap year.
 aDate = Date(28,2,-1);
commit 9054648bab5d4d89e7e3654847102d62ab9e77a1
Author: Eike Rathke 
Date:   Fri Apr 28 17:03:52 2017 +0200

Month 100 was always wrong

Though only in case localtime() couldn't be obtained, which is about ~never.

Fallout from

commit a3de32acc06cfcf9bb343a29c4b9854c92645f70
Date:   Wed Oct 28 11:23:36 2015 +0100

Rename (private) Date::init and reuse it

Change-Id: Idbbac69f3d90e7556cd83bbf442ef8ccaecec86e

diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index 05a1e5a1d370..46e5ad62469e 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -228,7 +228,7 @@ Date::Date( DateInitSystem )
 static_cast(aTime.tm_year+1900) );
 }
 else
-setDateFromDMY( 1, 100, 1900 );
+setDateFromDMY( 1, 1, 1900 );
 #endif
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Lionel Elie Mamane
 connectivity/source/commontools/parameters.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 9e6b275a19b3f11e9a5d87d1cbb9ad192705572f
Author: Lionel Elie Mamane 
Date:   Fri Apr 28 17:19:44 2017 +0200

tdf#107457 don't quote columns referred by expression (not by name)

Change-Id: I4894313ec27d716e9899c885ddc6be38a2447689

diff --git a/connectivity/source/commontools/parameters.cxx 
b/connectivity/source/commontools/parameters.cxx
index 4f0caca3b4de..3ef722a8fdf9 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -224,7 +224,12 @@ namespace dbtools
 {
 OUString colName;
 xDetailField->getPropertyValue("RealName") >>= colName;
-sFilter += quoteName( m_sIdentifierQuoteString, colName ) + " = :";
+sal_Bool isFunction(false);
+xDetailField->getPropertyValue("Function") >>= isFunction;
+if (isFunction)
+sFilter += colName;
+else
+sFilter += quoteName( m_sIdentifierQuoteString, colName );
 }
 
 // generate a parameter name which is not already used
@@ -235,7 +240,7 @@ namespace dbtools
 o_rNewParamName += "_";
 }
 
-return sFilter += o_rNewParamName;
+return sFilter += " =:" + o_rNewParamName;
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source include/svtools include/vcl sc/source sfx2/source svtools/source svx/source sw/source vcl/inc vcl/source

2017-04-28 Thread Caolán McNamara
 cui/source/customize/acccfg.cxx|2 
 cui/source/options/optinet2.cxx|2 
 cui/source/options/optinet2.hxx|2 
 cui/source/tabpages/autocdlg.cxx   |2 
 include/svtools/treelistbox.hxx|2 
 include/vcl/builder.hxx|   72 +++--
 include/vcl/builderfactory.hxx |2 
 include/vcl/button.hxx |8 
 include/vcl/combobox.hxx   |2 
 include/vcl/dialog.hxx |2 
 include/vcl/edit.hxx   |2 
 include/vcl/field.hxx  |4 
 include/vcl/fixed.hxx  |6 
 include/vcl/fixedhyper.hxx |2 
 include/vcl/layout.hxx |   16 -
 include/vcl/lstbox.hxx |2 
 include/vcl/vclmedit.hxx   |2 
 include/vcl/window.hxx |4 
 sc/source/ui/miscdlgs/tabbgcolordlg.cxx|2 
 sfx2/source/appl/newhelp.cxx   |8 
 svtools/source/contnr/treelistbox.cxx  |2 
 svx/source/dialog/dlgctrl.cxx  |   10 
 svx/source/dialog/relfld.cxx   |2 
 svx/source/dialog/txencbox.cxx |2 
 sw/source/ui/fldui/fldvar.cxx  |2 
 sw/source/uibase/inc/numberingtypelistbox.hxx  |2 
 sw/source/uibase/misc/numberingtypelistbox.cxx |2 
 vcl/inc/scrwnd.hxx |3 
 vcl/source/control/button.cxx  |8 
 vcl/source/control/combobox.cxx|2 
 vcl/source/control/edit.cxx|4 
 vcl/source/control/field.cxx   |4 
 vcl/source/control/fixed.cxx   |9 
 vcl/source/control/fixedhyper.cxx  |4 
 vcl/source/control/listbox.cxx |2 
 vcl/source/edit/vclmedit.cxx   |2 
 vcl/source/window/builder.cxx  |  306 -
 vcl/source/window/dialog.cxx   |2 
 vcl/source/window/layout.cxx   |   54 ++--
 vcl/source/window/window2.cxx  |   16 -
 40 files changed, 297 insertions(+), 285 deletions(-)

New commits:
commit 836c9bbb6486e9c0c81de9d7534b934699131d3d
Author: Caolán McNamara 
Date:   Fri Apr 28 15:21:11 2017 +0100

move builder attributes from OString to OUString

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

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 93d36283ed52..15778e549fac 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -657,7 +657,7 @@ VCL_BUILDER_DECL_FACTORY(SfxAccCfgTabListBox)
 {
 WinBits nWinBits = WB_TABSTOP;
 
-OString sBorder = VclBuilder::extractCustomProperty(rMap);
+OUString sBorder = VclBuilder::extractCustomProperty(rMap);
 if (!sBorder.isEmpty())
nWinBits |= WB_BORDER;
 
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 548c3b0fc157..379067fda6f0 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -136,7 +136,7 @@ void SvxNoSpaceEdit::Modify()
 }
 }
 
-bool SvxNoSpaceEdit::set_property(const OString , const OString )
+bool SvxNoSpaceEdit::set_property(const OString , const OUString )
 {
 if (rKey == "only-numeric")
 bOnlyNumeric = toBool(rValue);
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index c56ae38198b0..634975e91f6b 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -49,7 +49,7 @@ public:
 {}
 virtual void KeyInput(const KeyEvent& rKEvent) override;
 virtual void Modify() override;
-virtual bool set_property(const OString , const OString ) 
override;
+virtual bool set_property(const OString , const OUString ) 
override;
 };
 
 // class SvxProxyTabPage -
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 858a340d7ee7..5cb57a8a3de8 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2451,7 +2451,7 @@ VCL_BUILDER_DECL_FACTORY(AutoCompleteMultiListBox)
 {
 WinBits nWinBits = WB_TABSTOP;
 
-OString sBorder = VclBuilder::extractCustomProperty(rMap);
+OUString sBorder = VclBuilder::extractCustomProperty(rMap);
 if (!sBorder.isEmpty())
nWinBits |= WB_BORDER;
 
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index bb3ff359b1f1..3bc9168cbc00 100644
--- a/include/svtools/treelistbox.hxx
+++ 

Crash test update

2017-04-28 Thread Crashtest VM
New crashtest update available at 
http://dev-builds.libreoffice.org/crashtest/36977f7404c8c3255792dc9995d213510a2cdb11/


exportCrashes.csv
Description: Binary data


importCrash.csv
Description: Binary data


validationErrors.csv
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Google Summer of Code 2017 - Some help needed

2017-04-28 Thread Till Kamppeter

On 04/28/2017 05:59 AM, Caolán McNamara wrote:

The main question for me is what format/mechanism is provided by the
user of the backend as the print transport format/mechanism, e.g. if
it's simply (like cups) "give me the pdf to print" then it's relatively
easy. If it's (like GtkPrintOperation) "here's a cairo context, render
onto it what you want printed", then its not easy.



The backends simply need the PDF to be printed and the key/value-pair 
list of the option settings, nothing more. So integration should be easy.



- Would it be a good idea to modify the inner workings (not the GUI)
of the LibreOffice print dialog to talk to the printing
system(s)/printer(s) through a modular backend so that easily new
print technologies can be added or changes for the existing ones
being supplied?


Assuming that we can just supply a final pdf to the print backend then
this sounds sensible to me. Relatively not difficult to add new
parallel support for retrieving printer lists and printer info and
sending print jobs alongside our existing ones.



So as the backends will simply take the job in PDF and spreadsheet 
printing support is too complex to get into external print dialogs, let 
us go the way of making LO's original print dialog ready for the backends.


The dialog will have to look up the available backends and then do

1. On each dialog call the function to list the available printers, then 
show the list of all printers found via ll backends.


2. If the user chooses a printer to display its options (or get any 
detailed properties of it) call the function to query properties and 
options of the backend the printer comes from.


3. If the user sends off the job for printing, call the send-job 
function of the backend the printer comes from. Supply the print job in 
PDF and the option settings as key/value pairs.


4. If LO provides some kind of job monitoring, use the backend's list 
jobs functions (does LO do a thing like that?)


What I need from you is help in mentoring the student or even someone 
fully mentoring the student (this would be the best). Google says that 
mentoring a student will take around 5 hours/week.


I also need help where to find the relevant code to modify (ideally so 
that it can make it into Ubuntu 17.10 with Feature Freeze mid-August), 
how to most efficiently test-build (not needing to build the whole LO 
after each little change), coding policy guidelines, how to provide 
patches for upstream inclusion, ...


   Till

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


Re: Google Summer of Code 2017 - Some help needed

2017-04-28 Thread Heiko Tietze

On 04/27/17 23:45, Till Kamppeter wrote:
> I will mentor a student who will patch the LibreOffice print dialog > to take 
> the backends. This will not change the appearance and GUI of
> the dialog, but only the method to obtain printer and options lists >
and to send off print jobs.
That's really great news (and a very ambitious project). If you consider
to also touch the frontend please have a look on what the UX team did
some time ago https://pad.documentfoundation.org/p/UX-PrintDialog. Feel
free to ask in case of usability related questions. The design team will
happy to be of service.

Cheers,
Heiko

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


[Libreoffice-commits] online.git: debian/control

2017-04-28 Thread Andras Timar
 debian/control |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ec2836d48f17476c1ab920481a6ac3c982b4f660
Author: Andras Timar 
Date:   Fri Apr 28 10:35:31 2017 +0200

loolwsd postinst script uses fc-cache, depends on fontconfig

Change-Id: I6eb58d57cad06337fa97c91be4b14365b0d5bbb3

diff --git a/debian/control b/debian/control
index c4dc9c60..1f38edf1 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, libsm6, libssl1.0.0, 
libodbc1, libxinerama1, libcairo2, libgl1-mesa-glx, libcups2, libdbus-glib-1-2, 
cpio, ${lo:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, fontconfig, libsm6, 
libssl1.0.0, libodbc1, libxinerama1, libcairo2, libgl1-mesa-glx, libcups2, 
libdbus-glib-1-2, cpio, ${lo:Depends}
 Description: LibreOffice Online WebSocket Daemon
  LOOLWSD is a daemon that talks to web browser clients and provides LibreOffice
  services.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Andras Timar
 debian/control |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e73b9dee1bfc8005c9e5b5c2c628162b458645ae
Author: Andras Timar 
Date:   Fri Apr 28 10:36:47 2017 +0200

loolwsd postinst script uses fc-cache, depends on fontconfig

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

diff --git a/debian/control b/debian/control
index 1996b8a4..03369cfb 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, libsm6, libssl1.0.0, 
libodbc1, libxinerama1, libcairo2, libgl1-mesa-glx, libcups2, libdbus-glib-1-2, 
cpio, collaboraofficebasis5.3-calc (>= 5.3.10.8), collaboraofficebasis5.3-core 
(>= 5.3.10.8), collaboraofficebasis5.3-graphicfilter (>= 5.3.10.8), 
collaboraofficebasis5.3-images (>= 5.3.10.8), collaboraofficebasis5.3-impress 
(>= 5.3.10.8), collaboraofficebasis5.3-ooofonts (>= 5.3.10.8), 
collaboraofficebasis5.3-writer (>= 5.3.10.8), collaboraoffice5.3 (>= 5.3.10.8), 
collaboraoffice5.3-ure (>= 5.3.10.8), collaboraofficebasis5.3-en-us (>= 
5.3.10.8), collaboraofficebasis5.3-en-us-calc (>= 5.3.10.8), 
collaboraofficebasis5.3-en-us-res (>= 5.3.10.8), 
collaboraofficebasis5.3-noto-fonts (>= 5.3.10.8), collaboraofficebasis5.3-draw 
(>= 5.3.10.8), collaboraofficebasis5.3-extension-pdf-import (>= 5.3.10.8)
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, fontconfig, libsm6, 
libssl1.0.0, libodbc1, libxinerama1, libcairo2, libgl1-mesa-glx, libcups2, 
libdbus-glib-1-2, cpio, collaboraofficebasis5.3-calc (>= 5.3.10.8), 
collaboraofficebasis5.3-core (>= 5.3.10.8), 
collaboraofficebasis5.3-graphicfilter (>= 5.3.10.8), 
collaboraofficebasis5.3-images (>= 5.3.10.8), collaboraofficebasis5.3-impress 
(>= 5.3.10.8), collaboraofficebasis5.3-ooofonts (>= 5.3.10.8), 
collaboraofficebasis5.3-writer (>= 5.3.10.8), collaboraoffice5.3 (>= 5.3.10.8), 
collaboraoffice5.3-ure (>= 5.3.10.8), collaboraofficebasis5.3-en-us (>= 
5.3.10.8), collaboraofficebasis5.3-en-us-calc (>= 5.3.10.8), 
collaboraofficebasis5.3-en-us-res (>= 5.3.10.8), 
collaboraofficebasis5.3-noto-fonts (>= 5.3.10.8), collaboraofficebasis5.3-draw 
(>= 5.3.10.8), collaboraofficebasis5.3-extension-pdf-import (>= 5.3.10.8)
 Description: LibreOffice Online WebSocket Daemon
  LOOLWSD is a daemon that talks to web browser clients and provides LibreOffice
  services.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] core.git: Fix build after 7d71451e8e0226d3f3f523611f55132eda6ec10f

2017-04-28 Thread Chris Sherlock


> On 27 Apr 2017, at 6:07 pm, Stephan Bergmann  wrote:
> 
>> On 04/27/2017 10:04 AM, Stephan Bergmann wrote:
>> commit 5a7123d6869c9248a7ce3a22fffd84f76ceb360f
>> Author: Stephan Bergmann 
>> Date:   Thu Apr 27 10:03:03 2017 +0200
>> Fix build after 7d71451e8e0226d3f3f523611f55132eda6ec10f
>>  "vcl: change pImpl class names to fit with existing convention"
> 
> Please think twice (or even more often) before doing cosmetic changes like 
> that 
> 
>  "vcl: change pImpl class names to fit with existing convention".  They 
> easily cause more pain (for others) than they're worth the trouble.
> 
>> Change-Id: Ic02ca5b71a96b852951ac1b14b966b1ba2f006e9
>> diff --git a/compilerplugins/clang/vclwidgets.cxx 
>> b/compilerplugins/clang/vclwidgets.cxx
>> index 32d471240de1..2d5dd6333bc9 100644
>> --- a/compilerplugins/clang/vclwidgets.cxx
>> +++ b/compilerplugins/clang/vclwidgets.cxx
>> @@ -428,7 +428,7 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * 
>> fieldDecl) {
>>  if (containsVclReferenceBaseSubclass(fieldDecl->getType())) {
>>  // have to ignore this for now, nasty reverse dependency from 
>> tools->vcl
>>  auto check = loplugin::DeclCheck(pParentRecordDecl);
>> -if (!(check.Struct("ErrorContextImpl").GlobalNamespace()
>> +if (!(check.Struct("ImplErrorContext").GlobalNamespace()
>>|| check.Class("ScHFEditPage").GlobalNamespace()))
>>  {
>>  report(

What exactly did it break? Genuinely curious.

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


Re: [Libreoffice-commits] core.git: Fix build after 7d71451e8e0226d3f3f523611f55132eda6ec10f

2017-04-28 Thread Stephan Bergmann

On 04/28/2017 10:40 AM, Chris Sherlock wrote:

On 27 Apr 2017, at 6:07 pm, Stephan Bergmann  wrote:

On 04/27/2017 10:04 AM, Stephan Bergmann wrote:
commit 5a7123d6869c9248a7ce3a22fffd84f76ceb360f
Author: Stephan Bergmann 
Date:   Thu Apr 27 10:03:03 2017 +0200
 Fix build after 7d71451e8e0226d3f3f523611f55132eda6ec10f
  "vcl: change pImpl class names to fit with existing convention"


Please think twice (or even more often) before doing cosmetic changes like that 

 "vcl: change pImpl class names to fit with existing convention".  They easily cause 
more pain (for others) than they're worth the trouble.


 Change-Id: Ic02ca5b71a96b852951ac1b14b966b1ba2f006e9
diff --git a/compilerplugins/clang/vclwidgets.cxx 
b/compilerplugins/clang/vclwidgets.cxx
index 32d471240de1..2d5dd6333bc9 100644
--- a/compilerplugins/clang/vclwidgets.cxx
+++ b/compilerplugins/clang/vclwidgets.cxx
@@ -428,7 +428,7 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * 
fieldDecl) {
  if (containsVclReferenceBaseSubclass(fieldDecl->getType())) {
  // have to ignore this for now, nasty reverse dependency from 
tools->vcl
  auto check = loplugin::DeclCheck(pParentRecordDecl);
-if (!(check.Struct("ErrorContextImpl").GlobalNamespace()
+if (!(check.Struct("ImplErrorContext").GlobalNamespace()
|| check.Class("ScHFEditPage").GlobalNamespace()))
  {
  report(


What exactly did it break? Genuinely curious.


Just look at the Jenkins builds for 
 "vcl: change pImpl class 
names to fit with existing convention", namely 
:


In --enable-compiler-plugins --enable-werror Clang builds, compiling 
vcl/source/window/errinf.cxx now failed with a loplugin:vclwidgets 
warning/error about the changed



-struct ErrorContextImpl
+struct ImplErrorContext
 {
 vcl::Window *pWin; // FIXME: should be VclPtr for strong lifecycle
 };


as the whitelisting of that struct in 
compilerplugins/clang/vclwidgets.cxx still used the old name.

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


Re: Google Summer of Code 2017 - Some help needed

2017-04-28 Thread Caolán McNamara
On Thu, 2017-04-27 at 18:45 -0300, Till Kamppeter wrote:
> 
> In the Google Summer of Code 2017 a big project of OpenPrinting will
> be work on the print dialog. What we especially want to do is:
> 
> - Common backends to all print dialogs (GTK, Qt, LibreOffice, ...):
> - Backend for local CUPS queues
> - Backend for IPP network printers
> - Backend for Google Cloud Print printers
> - In the future: Backends for new, upcoming print technologies
> (for example a cloud printing service based on PWG standards.

The main question for me is what format/mechanism is provided by the
user of the backend as the print transport format/mechanism, e.g. if
it's simply (like cups) "give me the pdf to print" then it's relatively
easy. If it's (like GtkPrintOperation) "here's a cairo context, render
onto it what you want printed", then its not easy.

> As talked about on the IRC LO allows also switching to the GTK
> dialog and there will also be a new GTK dialog which will get
> launched in around two years.

So IIRC we did a review in 2009 of the gtk print dialog, and then
another review in 2012 and its now 2017 and apparently there will be a
new dialog in around two years :-)

> The backend idea comes already from the new GTK dialog and we want
> to get it to life as soon as possible.
> 
> It is told that it is difficult to do Spreadsheet printing with the 
> usual print dialogs and therefore it could be better for LO to stay
> with its own dialog.

Well, I'd *like* to use the gtk print dialog personally. The
reoccurring  problem is typically spreadsheet printing. You can see in
our own dialog in calc that when printing the "range" is "range and
sheets" with selection of what sheets to print and the range from those
sheets. The gtk print dialog just offers what pages to print. Gnumeric
works around this in the standard gtk print dialog with putting a
custom "gnumeric print range tab" which is distant from the page range
to print. It's not a good fit.

Multiple pages per sheet is another problem, the gtk one is more
limited than the offerings of the LibreOffice one.

Providing a preview which updates as you change the selection or
options is another problem.

What it means to change the paper size/orientation in the printer
dialog when the application supports multiple paper sizes and
orientation in the document is an open question I suppose.

> So what I would like to know is the following:
> 
> - Would it be a good idea to modify the inner workings (not the GUI)
> of the LibreOffice print dialog to talk to the printing 
> system(s)/printer(s) through a modular backend so that easily new
> print technologies can be added or changes for the existing ones
> being supplied?

Assuming that we can just supply a final pdf to the print backend then
this sounds sensible to me. Relatively not difficult to add new
parallel support for retrieving printer lists and printer info and
sending print jobs alongside our existing ones.

> - Or is it no problem for Spreadsheet printing to use the current
> and/or the future GTK print dialog so that it is a better approach to
> let LO default to the GTK dialog?

If anyone has good ideas about how to make the existing gtk dialog not
a miserable experience for spreadsheet printing that'd be cool.
Otherwise I guess defaulting to the current GTK dialog is probably not
going to fly. Maybe the next one will solve all these problems.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: configmgr/source extensions/source idl/inc idl/source sax/source unodevtools/source vcl/headless vcl/inc vcl/opengl vcl/unx

2017-04-28 Thread Noel Grandin
 configmgr/source/valueparser.cxx  |3 
 configmgr/source/valueparser.hxx  |3 
 configmgr/source/xcsparser.cxx|4 
 configmgr/source/xcuparser.cxx|4 
 extensions/source/config/ldap/ldapaccess.cxx  |9 -
 idl/inc/types.hxx |2 
 idl/source/objects/types.cxx  |5 -
 sax/source/fastparser/fastparser.cxx  |   22 ++--
 unodevtools/source/skeletonmaker/javacompskeleton.cxx |4 
 vcl/headless/svpframe.cxx |3 
 vcl/headless/svpinst.cxx  |4 
 vcl/inc/headless/svpframe.hxx |3 
 vcl/inc/openglgdiimpl.hxx |2 
 vcl/inc/unx/cupsmgr.hxx   |2 
 vcl/inc/unx/glyphcache.hxx|4 
 vcl/inc/unx/gtk/gtkdata.hxx   |3 
 vcl/inc/unx/i18n_ic.hxx   |4 
 vcl/inc/unx/printergfx.hxx|2 
 vcl/inc/unx/salbmp.h  |2 
 vcl/opengl/gdiimpl.cxx|   16 +--
 vcl/unx/generic/app/i18n_ic.cxx   |2 
 vcl/unx/generic/dtrans/X11_dndcontext.cxx |   18 +--
 vcl/unx/generic/dtrans/X11_dndcontext.hxx |9 -
 vcl/unx/generic/dtrans/X11_selection.cxx  |   52 +--
 vcl/unx/generic/dtrans/X11_selection.hxx  |8 -
 vcl/unx/generic/gdi/salbmp.cxx|8 -
 vcl/unx/generic/glyphs/glyphcache.cxx |   10 +-
 vcl/unx/generic/print/common_gfx.cxx  |4 
 vcl/unx/generic/print/genpspgraphics.cxx  |2 
 vcl/unx/generic/printer/cupsmgr.cxx   |6 -
 vcl/unx/generic/window/salframe.cxx   |4 
 vcl/unx/gtk/gtkdata.cxx   |7 -
 vcl/unx/gtk/salnativewidgets-gtk.cxx  |   82 --
 vcl/unx/gtk3/gtk3gtkdata.cxx  |7 -
 vcl/unx/gtk3/gtk3gtkinst.cxx  |   29 +++---
 35 files changed, 144 insertions(+), 205 deletions(-)

New commits:
commit 3a36cf434fb4a967c9ea767cb7ac5f4da0502a0d
Author: Noel Grandin 
Date:   Tue Apr 25 15:09:53 2017 +0200

loplugin:checkunusedparams in configmgr and vcl

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

diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx
index d26bddc481fa..10860628e491 100644
--- a/configmgr/source/valueparser.cxx
+++ b/configmgr/source/valueparser.cxx
@@ -275,8 +275,7 @@ xmlreader::XmlReader::Text ValueParser::getTextMode() const 
{
 }
 
 bool ValueParser::startElement(
-xmlreader::XmlReader & reader, int nsId, xmlreader::Span const & name,
-std::set< OUString > const *)
+xmlreader::XmlReader & reader, int nsId, xmlreader::Span const & name)
 {
 if (!node_.is()) {
 return false;
diff --git a/configmgr/source/valueparser.hxx b/configmgr/source/valueparser.hxx
index 50cab466d2d4..a1d585e89587 100644
--- a/configmgr/source/valueparser.hxx
+++ b/configmgr/source/valueparser.hxx
@@ -51,8 +51,7 @@ public:
 xmlreader::XmlReader::Text getTextMode() const;
 
 bool startElement(
-xmlreader::XmlReader & reader, int nsId, xmlreader::Span const & name,
-std::set< OUString > const *);
+xmlreader::XmlReader & reader, int nsId, xmlreader::Span const & name);
 
 bool endElement();
 
diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx
index 6c1b2fea9a4a..50415391e55e 100644
--- a/configmgr/source/xcsparser.cxx
+++ b/configmgr/source/xcsparser.cxx
@@ -125,9 +125,9 @@ xmlreader::XmlReader::Text XcsParser::getTextMode() {
 
 bool XcsParser::startElement(
 xmlreader::XmlReader & reader, int nsId, xmlreader::Span const & name,
-std::set< OUString > const * existingDependencies)
+std::set< OUString > const * /*existingDependencies*/)
 {
-if (valueParser_.startElement(reader, nsId, name, existingDependencies)) {
+if (valueParser_.startElement(reader, nsId, name)) {
 return true;
 }
 if (state_ == STATE_START) {
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx
index 34e0eb5973c8..bac4119262ca 100644
--- a/configmgr/source/xcuparser.cxx
+++ b/configmgr/source/xcuparser.cxx
@@ -72,9 +72,9 @@ xmlreader::XmlReader::Text XcuParser::getTextMode() {
 
 bool XcuParser::startElement(
 xmlreader::XmlReader & reader, int nsId, xmlreader::Span const & name,
-std::set< OUString > const * existingDependencies)
+std::set< OUString > const * 

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

2017-04-28 Thread Noel Grandin
 compilerplugins/clang/unusedmethods.results |   10 ++---
 rsc/inc/rscclass.hxx|   10 -
 rsc/source/res/rscclass.cxx |   51 
 3 files changed, 5 insertions(+), 66 deletions(-)

New commits:
commit 5503b0b79121fae89303fb00f255e57b05593930
Author: Noel Grandin 
Date:   Fri Apr 28 09:01:10 2017 +0200

loplugin:unusedmethods

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

diff --git a/compilerplugins/clang/unusedmethods.results 
b/compilerplugins/clang/unusedmethods.results
index 6781c1492c29..e25f1c810268 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -460,17 +460,17 @@ sw/inc/swrect.hxx:105
 class SvStream & WriteSwRect(class SvStream &,const class SwRect &)
 sw/qa/extras/inc/swmodeltestbase.hxx:523
 class com::sun::star::uno::Reference 
SwModelTestBase::getParagraphAnchoredObject(const int,const class 
com::sun::star::uno::Reference &) const
-sw/qa/extras/uiwriter/uiwriter.cxx:4592
+sw/qa/extras/uiwriter/uiwriter.cxx:4621
 int main()
 sw/source/core/inc/flowfrm.hxx:171
 class SwFlowFrame * SwFlowFrame::GetPrecede()
-sw/source/core/inc/frame.hxx:1188
+sw/source/core/inc/frame.hxx:1187
 class Size SwRectFnSet::GetSize(const class SwRect &) const
-sw/source/core/inc/frame.hxx:1219
+sw/source/core/inc/frame.hxx:1218
 long SwRectFnSet::LeftDist(const class SwRect &,long) const
-sw/source/core/inc/frame.hxx:1220
+sw/source/core/inc/frame.hxx:1219
 long SwRectFnSet::RightDist(const class SwRect &,long) const
-sw/source/core/inc/frame.hxx:1228
+sw/source/core/inc/frame.hxx:1227
 long SwRectFnSet::XInc(long,long) const
 sw/source/core/text/porlin.hxx:127
 _Bool SwLinePortion::IsTabRightPortion() const
diff --git a/rsc/inc/rscclass.hxx b/rsc/inc/rscclass.hxx
index 2e81aa24ac6a..382006c39c5d 100644
--- a/rsc/inc/rscclass.hxx
+++ b/rsc/inc/rscclass.hxx
@@ -89,16 +89,6 @@ public:
  RscTypCont * pTC, sal_uInt32 ) override;
 };
 
-class RscSysDepend : public RscClass
-{
-public:
-RscSysDepend( Atom nId, RESOURCE_TYPE nTypId, RscTop * 
pSuper );
-ERRTYPE WriteSysDependRc( const RSCINST &, RscWriteRc & aMem,
-  RscTypCont * pTC, sal_uInt32 );
-ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32 ) override;
-};
-
 class RscTupel : public RscClass
 {
 public:
diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx
index a6922310308f..c793771d4322 100644
--- a/rsc/source/res/rscclass.cxx
+++ b/rsc/source/res/rscclass.cxx
@@ -618,57 +618,6 @@ ERRTYPE RscClass::WriteRc( const RSCINST & rInst,
 return aError;
 }
 
-RscSysDepend::RscSysDepend( Atom nId, RESOURCE_TYPE nTypeId, RscTop * pSuper )
-: RscClass( nId, nTypeId, pSuper )
-{
-}
-
-ERRTYPE RscSysDepend::WriteSysDependRc( const RSCINST & rInst, RscWriteRc & 
rMem,
-RscTypCont * pTC, sal_uInt32 nDeep )
-{
-ERRTYPE aError;
-RSCINST aFileName;
-
-// retrieve instance with file name "FILENAME"
-aFileName = RscClass::GetCopyVar( rInst, pHS->getID( "FILE", true ) );
-if( aFileName.IsInst() )
-{
-RscWriteRc aTmpMem;
-aError = aFileName.pClass->WriteRcHeader( aFileName, aTmpMem, pTC,
-  RscId(), nDeep );
-// Obsolete - need changes in VCL
-rMem.Put( sal_uInt32(0) );
-
-// write identifier
-sal_uInt32  nId = 0x;
-if( aTmpMem.Size() && pTC && (*aTmpMem.GetUTF8( 0 ) != '\0') )
-{
-nId = pTC->PutSysName( rInst.pClass->GetTypId(),
-   aTmpMem.GetUTF8( 0 ) );
-}
-rMem.Put( nId );
-aError = aFileName.pClass->WriteRcHeader( aFileName, rMem, pTC,
-  RscId(), nDeep );
-}
-else
-aError = ERR_ERROR;
-
-return aError;
-}
-
-ERRTYPE RscSysDepend::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
-   RscTypCont * pTC, sal_uInt32 nDeep )
-{
-ERRTYPE aError = RscClass::WriteRc( rInst, rMem, pTC, nDeep );
-
-if( this == rInst.pClass )
-{
-// only when it is own class
-aError = WriteSysDependRc( rInst, rMem, pTC, nDeep );
-}
-return aError;
-}
-
 RscTupel::RscTupel( Atom nId, RESOURCE_TYPE nTypeId )
 : RscClass( nId, nTypeId, nullptr )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Gabor Kelemen
 cui/source/inc/autocdlg.hxx  |3 ---
 cui/source/inc/cuires.hrc|3 +++
 cui/source/tabpages/autocdlg.cxx |6 +-
 cui/source/tabpages/strings.src  |8 
 4 files changed, 12 insertions(+), 8 deletions(-)

New commits:
commit 264ec6d7914c71f7a56f1892a0765fff8dc54e25
Author: Gabor Kelemen 
Date:   Wed Apr 26 21:40:20 2017 +0200

tdf#107437 Fix display of Start/End Quote window titles

Drop this string surgery nonsense.
We translators can surely handle four more words.

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

diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 3a34ca6b097d..7da1f441ab4b 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -381,9 +381,6 @@ private:
 VclPtr  m_pDblEndExFT;
 VclPtr m_pDblStandardPB;
 
-OUStringm_sStartQuoteDlg;
-OUStringm_sEndQuoteDlg;
-
 OUStringm_sStandard;
 
 
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 4c75db05aa0f..599063cbca62 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -380,6 +380,9 @@
 #define RID_SVXSTR_EDITHINT (RID_SVX_START + 
1266)
 #define RID_SVXSTR_SAVE_SCREENSHOT_AS   (RID_SVX_START + 
1267)
 
+#define RID_SVXSTR_STARTQUOTE   (RID_SVX_START + 
1268)
+#define RID_SVXSTR_ENDQUOTE (RID_SVX_START + 
1269)
+
 // Hangul/Hanja Dialog
 #define RID_SVXSTR_HANGUL   (RID_SVX_START + 
1270)
 #define RID_SVXSTR_HANJA(RID_SVX_START + 
1271)
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 23f4dfa77834..858a340d7ee7 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1843,10 +1843,6 @@ OfaQuoteTabPage::OfaQuoteTabPage(vcl::Window* pParent, 
const SfxItemSet& rSet)
 get(m_pDblEndExFT, "doubleendex");
 get(m_pDblStandardPB, "defaultdouble");
 
-using comphelper::string::strip;
-
-m_sStartQuoteDlg = strip(get("startquoteft")->GetText(), ':');
-m_sEndQuoteDlg = strip(get("endquoteft")->GetText(), ':');
 m_sStandard = get("singlestartex")->GetText();
 
 bool bShowSWOptions = false;
@@ -2064,7 +2060,7 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, Button*, pBtn, void 
)
 ScopedVclPtrInstance< SvxCharacterMap > pMap( this, true );
 pMap->SetCharFont( 
OutputDevice::GetDefaultFont(DefaultFontType::LATIN_TEXT,
 LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne ));
-pMap->SetText(nMode < SGL_END ? m_sStartQuoteDlg  : m_sEndQuoteDlg );
+pMap->SetText(nMode < SGL_END ? CUI_RESSTR(RID_SVXSTR_STARTQUOTE)  : 
CUI_RESSTR(RID_SVXSTR_ENDQUOTE) );
 sal_UCS4 cDlg;
 SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
 LanguageType eLang = 
Application::GetSettings().GetLanguageTag().getLanguageType();
diff --git a/cui/source/tabpages/strings.src b/cui/source/tabpages/strings.src
index d83d42c595e5..8b7b4880e7f9 100644
--- a/cui/source/tabpages/strings.src
+++ b/cui/source/tabpages/strings.src
@@ -183,5 +183,13 @@ String RID_SVXSTR_LOAD_ERROR
 {
 Text [ en-US ] = "The selected module could not be loaded.";
 };
+String RID_SVXSTR_STARTQUOTE
+{
+Text [ en-US ] = "Start Quote";
+};
+String RID_SVXSTR_ENDQUOTE
+{
+Text [ en-US ] = "End Quote";
+};
 
 /* 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: vcl/android

2017-04-28 Thread Caolán McNamara
 vcl/android/androidinst.cxx |   12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 83b3e6ec26d32e016d5b9909415a1c76d37af747
Author: Caolán McNamara 
Date:   Fri Apr 28 09:00:45 2017 +0100

probably android build fix

Change-Id: I95fe4879fe2e43e5b11165a703066ae1a029b5b1

diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index c976a7c89732..ff644d33bbb3 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -96,10 +96,8 @@ class AndroidSalFrame : public SvpSalFrame
 public:
 AndroidSalFrame( AndroidSalInstance *pInstance,
  SalFrame   *pParent,
- SalFrameStyleFlags  nSalFrameStyle,
- SystemParentData   *pSysParent )
-: SvpSalFrame( pInstance, pParent, nSalFrameStyle,
-   pSysParent )
+ SalFrameStyleFlags  nSalFrameStyle )
+: SvpSalFrame(pInstance, pParent, nSalFrameStyle)
 {
 if (pParent == NULL && viewWidth > 1 && viewHeight > 1)
 SetPosSize(0, 0, viewWidth, viewHeight, SAL_FRAME_POSSIZE_WIDTH | 
SAL_FRAME_POSSIZE_HEIGHT);
@@ -142,14 +140,14 @@ public:
 }
 };
 
-SalFrame *AndroidSalInstance::CreateChildFrame( SystemParentData* pParent, 
SalFrameStyleFlags nStyle )
+SalFrame *AndroidSalInstance::CreateChildFrame( SystemParentData* /*pParent*/, 
SalFrameStyleFlags nStyle )
 {
-return new AndroidSalFrame( this, NULL, nStyle, pParent );
+return new AndroidSalFrame( this, NULL, nStyle );
 }
 
 SalFrame *AndroidSalInstance::CreateFrame( SalFrame* pParent, 
SalFrameStyleFlags nStyle )
 {
-return new AndroidSalFrame( this, pParent, nStyle, NULL );
+return new AndroidSalFrame( this, pParent, nStyle );
 }
 
 // All the interesting stuff is slaved from the AndroidSalInstance
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 7e65f2b862709f88825db30266e9791a93eaf5c0
Author: Olivier Hallot 
Date:   Wed Apr 26 10:27:17 2017 -0300

Updated core
Project: help  1b57b226d2944bc55f8c28a384bb2c328a720e55

Fix use of F4 in database explorer

https://listarchives.libreoffice.org/global/documentation/msg11421.html

Change-Id: I04a84c24d854740db3752690fcba0155a4042f11
Reviewed-on: https://gerrit.libreoffice.org/36994
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index f986a76171ac..1b57b226d294 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f986a76171ac9fcd45f5996dc9fc3ac31f46dd31
+Subproject commit 1b57b226d2944bc55f8c28a384bb2c328a720e55
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Olivier Hallot
 source/text/shared/explorer/database/1102.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1b57b226d2944bc55f8c28a384bb2c328a720e55
Author: Olivier Hallot 
Date:   Wed Apr 26 10:27:17 2017 -0300

Fix use of F4 in database explorer

https://listarchives.libreoffice.org/global/documentation/msg11421.html

Change-Id: I04a84c24d854740db3752690fcba0155a4042f11
Reviewed-on: https://gerrit.libreoffice.org/36994
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/source/text/shared/explorer/database/1102.xhp 
b/source/text/shared/explorer/database/1102.xhp
index 732a40dbc..40bd9f12c 100644
--- a/source/text/shared/explorer/database/1102.xhp
+++ b/source/text/shared/explorer/database/1102.xhp
@@ -41,7 +41,7 @@
 Opening a Data Source
 
 
-To open the data source view, press F4 in a text, spreadsheet or 
form document.
+To open the data source view, press Ctrl+Shift+F4 in a text, 
spreadsheet or form document.
 
 
 To view the contents of a database, click the plus sign (+) in 
front of the name in the data source view.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Tor Lillqvist
 sc/source/core/opencl/formulagroupcl.cxx |   14 --
 1 file changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 9b9b76347df54b0f5a2d6e5e019ebda0797fd641
Author: Tor Lillqvist 
Date:   Fri Apr 28 10:05:19 2017 +0300

Bin the same comment copy-pasted meaninglessly

Change-Id: I1f6498f037a2ff121ef7db0976329b12e22c2f94

diff --git a/sc/source/core/opencl/formulagroupcl.cxx 
b/sc/source/core/opencl/formulagroupcl.cxx
index e74ace0f196d..c066d74fc501 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -163,7 +163,7 @@ size_t VectorRef::Marshal( cl_kernel k, int argno, int, 
cl_program )
 {
 throw Unhandled(__FILE__, __LINE__);
 }
-// Obtain cl context
+
 ::opencl::KernelEnv kEnv;
 ::opencl::setKernelEnv();
 cl_int err;
@@ -757,7 +757,7 @@ public:
 size_t DynamicKernelStringArgument::Marshal( cl_kernel k, int argno, int, 
cl_program )
 {
 FormulaToken* ref = mFormulaTree->GetFormulaToken();
-// Obtain cl context
+
 ::opencl::KernelEnv kEnv;
 ::opencl::setKernelEnv();
 cl_int err;
@@ -1437,7 +1437,7 @@ public:
 virtual size_t Marshal( cl_kernel k, int argno, int w, cl_program 
mpProgram )
 {
 assert(Base::mpClmem == nullptr);
-// Obtain cl context
+
 ::opencl::KernelEnv kEnv;
 ::opencl::setKernelEnv();
 cl_int err;
@@ -2225,7 +2225,6 @@ public:
 }
 if (dynamic_cast(mpCodeGen.get()))
 {
-// Obtain cl context
 ::opencl::KernelEnv kEnv;
 ::opencl::setKernelEnv();
 cl_int err;
@@ -2287,7 +2286,6 @@ public:
 }
 if (OpSumIfs* OpSumCodeGen = dynamic_cast(mpCodeGen.get()))
 {
-// Obtain cl context
 ::opencl::KernelEnv kEnv;
 ::opencl::setKernelEnv();
 cl_int err;
@@ -3771,7 +3769,7 @@ void DynamicKernel::CreateKernel()
 cl_int err;
 std::string kname = "DynamicKernel" + mKernelSignature;
 // Compile kernel here!!!
-// Obtain cl context
+
 ::opencl::KernelEnv kEnv;
 ::opencl::setKernelEnv();
 const char* src = mFullProgramSrc.c_str();
@@ -3881,7 +3879,6 @@ void DynamicKernel::CreateKernel()
 
 void DynamicKernel::Launch( size_t nr )
 {
-// Obtain cl context
 ::opencl::KernelEnv kEnv;
 ::opencl::setKernelEnv();
 cl_int err;
@@ -4058,7 +4055,6 @@ public:
 // Map results back
 mpCLResBuf = mpKernel->GetResultBuffer();
 
-// Obtain cl context
 ::opencl::KernelEnv kEnv;
 ::opencl::setKernelEnv();
 
@@ -4084,7 +4080,6 @@ public:
 
 rDoc.SetFormulaResults(rTopPos, mpResBuf, mnGroupLength);
 
-// Obtain cl context
 ::opencl::KernelEnv kEnv;
 ::opencl::setKernelEnv();
 
@@ -4185,7 +4180,6 @@ void genRPNTokens( ScDocument& rDoc, const ScAddress& 
rTopPos, ScTokenArray& rCo
 
 bool waitForResults()
 {
-// Obtain cl context
 ::opencl::KernelEnv kEnv;
 ::opencl::setKernelEnv();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Noel Grandin
 solenv/gbuild/AllLangResTarget.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 215828dc6e3858b05930758fe8e3ea19d043b5b9
Author: Noel Grandin 
Date:   Fri Apr 28 09:13:13 2017 +0200

fix make internal.clean

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

diff --git a/solenv/gbuild/AllLangResTarget.mk 
b/solenv/gbuild/AllLangResTarget.mk
index 9da53605297e..2e3c114c1be0 100644
--- a/solenv/gbuild/AllLangResTarget.mk
+++ b/solenv/gbuild/AllLangResTarget.mk
@@ -244,7 +244,7 @@ $(call gb_ResTarget_get_clean_target,%) :
$(call gb_Helper_abbreviate_dirs,\
rm -f \
$(call gb_ResTarget_get_target,$*) \
-   $(call gb_ResTarget_get_install_target,$*)
+   $(call gb_ResTarget_get_install_target,$*))
 
 $(call gb_ResTarget_get_target,%) : $(gb_Helper_MISCDUMMY) \
$(gb_ResTarget_RSCDEPS)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-28 Thread Noel Grandin
 compilerplugins/clang/unusedfields.untouched.results |   46 -
 compilerplugins/clang/unusedfields.writeonly.results |   94 +--
 include/sfx2/sidebar/ControllerItem.hxx  |1 
 sfx2/source/sidebar/ControllerItem.cxx   |1 
 4 files changed, 71 insertions(+), 71 deletions(-)

New commits:
commit 6ac7dfdba4deb6b8fd96d0df18d1c1102aace64a
Author: Noel Grandin 
Date:   Fri Apr 28 08:38:29 2017 +0200

loplugin:unusedfields

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

diff --git a/compilerplugins/clang/unusedfields.untouched.results 
b/compilerplugins/clang/unusedfields.untouched.results
index ace930062cc7..19c98abb39c3 100644
--- a/compilerplugins/clang/unusedfields.untouched.results
+++ b/compilerplugins/clang/unusedfields.untouched.results
@@ -36,7 +36,7 @@ compilerplugins/clang/test/salbool.cxx:15
 S b sal_Bool
 compilerplugins/clang/test/unnecessaryoverride-dtor.hxx:42
 IncludedDerived3 m rtl::Reference
-connectivity/source/drivers/mork/MDatabaseMetaData.hxx:28
+connectivity/source/drivers/mork/MDatabaseMetaData.hxx:29
 connectivity::mork::ODatabaseMetaData m_pMetaDataHelper 
std::unique_ptr
 connectivity/source/inc/OTypeInfo.hxx:31
 connectivity::OTypeInfo aTypeName class rtl::OUString
@@ -86,17 +86,11 @@ extensions/source/scanner/scanner.hxx:46
 ScannerManager maProtector osl::Mutex
 framework/inc/dispatch/oxt_handler.hxx:95
 framework::Oxt_Handler m_xSelfHold 
css::uno::Reference
-i18nutil/source/utility/unicode.cxx:40
-DefaultScriptTypeList from com::sun::star::i18n::UnicodeScript
-i18nutil/source/utility/unicode.cxx:41
-DefaultScriptTypeList to com::sun::star::i18n::UnicodeScript
-i18nutil/source/utility/unicode.cxx:42
-DefaultScriptTypeList value com::sun::star::i18n::UnicodeScript
 include/comphelper/MasterPropertySet.hxx:38
 comphelper::SlaveData mxSlave css::uno::Reference
 include/drawinglayer/primitive2d/textlayoutdevice.hxx:61
 drawinglayer::primitive2d::TextLayouterDevice maSolarGuard class 
SolarMutexGuard
-include/editeng/unotext.hxx:605
+include/editeng/unotext.hxx:606
 SvxUnoTextRangeEnumeration mxParentText 
css::uno::Reference
 include/LibreOfficeKit/LibreOfficeKitGtk.h:33
 _LOKDocView aDrawingArea GtkDrawingArea
@@ -124,23 +118,23 @@ pyuno/source/module/pyuno_impl.hxx:226
 pyuno::(anonymous) ob_base PyObject
 pyuno/source/module/pyuno_impl.hxx:326
 pyuno::stRuntimeImpl ob_base PyObject
-reportdesign/source/ui/inc/ReportWindow.hxx:53
+reportdesign/source/ui/inc/ReportWindow.hxx:54
 rptui::OReportWindow m_pObjFac ::std::unique_ptr
-sal/osl/unx/thread.cxx:93
+sal/osl/unx/thread.cxx:97
 osl_thread_priority_st m_Highest int
-sal/osl/unx/thread.cxx:94
+sal/osl/unx/thread.cxx:98
 osl_thread_priority_st m_Above_Normal int
-sal/osl/unx/thread.cxx:95
+sal/osl/unx/thread.cxx:99
 osl_thread_priority_st m_Normal int
-sal/osl/unx/thread.cxx:96
+sal/osl/unx/thread.cxx:100
 osl_thread_priority_st m_Below_Normal int
-sal/osl/unx/thread.cxx:97
+sal/osl/unx/thread.cxx:101
 osl_thread_priority_st m_Lowest int
-sal/osl/unx/thread.cxx:115
+sal/osl/unx/thread.cxx:119
 osl_thread_global_st m_priority struct osl_thread_priority_st
 sc/qa/unit/ucalc_column.cxx:103
 aInputs aName const char *
-sc/source/filter/inc/sheetdatacontext.hxx:60
+sc/source/filter/inc/sheetdatacontext.hxx:61
 oox::xls::SheetDataContext aReleaser class SolarMutexReleaser
 sc/source/ui/inc/docsh.hxx:441
 ScDocShellModificator mpProtector std::unique_ptr
@@ -148,25 +142,31 @@ sd/source/ui/remotecontrol/ZeroconfService.hxx:36
 sd::ZeroconfService port uint
 sd/source/ui/table/TableDesignPane.hxx:110
 sd::TableDesignPane aImpl class sd::TableDesignWidget
-sd/source/ui/view/DocumentRenderer.cxx:1334
+sd/source/ui/view/DocumentRenderer.cxx:1335
 sd::DocumentRenderer::Implementation mxObjectShell SfxObjectShellRef
-sd/source/ui/view/viewshel.cxx:1234
-sd::KeepSlideSorterInSyncWithPageChanges m_aDrawLock 
sd::slidesorter::view::class SlideSorterView::DrawLock
 sd/source/ui/view/viewshel.cxx:1235
-sd::KeepSlideSorterInSyncWithPageChanges m_aModelLock 
sd::slidesorter::controller::class SlideSorterController::ModelChangeLock
+sd::KeepSlideSorterInSyncWithPageChanges m_aDrawLock 
sd::slidesorter::view::class SlideSorterView::DrawLock
 sd/source/ui/view/viewshel.cxx:1236
-sd::KeepSlideSorterInSyncWithPageChanges m_aUpdateLock 
sd::slidesorter::controller::class PageSelector::UpdateLock
+sd::KeepSlideSorterInSyncWithPageChanges m_aModelLock 
sd::slidesorter::controller::class SlideSorterController::ModelChangeLock
 sd/source/ui/view/viewshel.cxx:1237
+sd::KeepSlideSorterInSyncWithPageChanges m_aUpdateLock 
sd::slidesorter::controller::class 

Re: [Libreoffice-commits] core.git: Fix build after 7d71451e8e0226d3f3f523611f55132eda6ec10f

2017-04-28 Thread Chris Sherlock


> On 28 Apr 2017, at 6:55 pm, Stephan Bergmann  wrote:
> 
> On 04/28/2017 10:40 AM, Chris Sherlock wrote:
 On 27 Apr 2017, at 6:07 pm, Stephan Bergmann  wrote:
 On 04/27/2017 10:04 AM, Stephan Bergmann wrote:
 commit 5a7123d6869c9248a7ce3a22fffd84f76ceb360f
 Author: Stephan Bergmann 
 Date:   Thu Apr 27 10:03:03 2017 +0200
 Fix build after 7d71451e8e0226d3f3f523611f55132eda6ec10f
  "vcl: change pImpl class names to fit with existing convention"
>>> 
>>> Please think twice (or even more often) before doing cosmetic changes like 
>>> that 
>>> 
>>>  "vcl: change pImpl class names to fit with existing convention".  They 
>>> easily cause more pain (for others) than they're worth the trouble.
>>> 
 Change-Id: Ic02ca5b71a96b852951ac1b14b966b1ba2f006e9
 diff --git a/compilerplugins/clang/vclwidgets.cxx 
 b/compilerplugins/clang/vclwidgets.cxx
 index 32d471240de1..2d5dd6333bc9 100644
 --- a/compilerplugins/clang/vclwidgets.cxx
 +++ b/compilerplugins/clang/vclwidgets.cxx
 @@ -428,7 +428,7 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * 
 fieldDecl) {
  if (containsVclReferenceBaseSubclass(fieldDecl->getType())) {
  // have to ignore this for now, nasty reverse dependency from 
 tools->vcl
  auto check = loplugin::DeclCheck(pParentRecordDecl);
 -if (!(check.Struct("ErrorContextImpl").GlobalNamespace()
 +if (!(check.Struct("ImplErrorContext").GlobalNamespace()
|| check.Class("ScHFEditPage").GlobalNamespace()))
  {
  report(
>> What exactly did it break? Genuinely curious.
> 
> Just look at the Jenkins builds for 
>  "vcl: change pImpl class names to 
> fit with existing convention", namely 
> :
> 
> In --enable-compiler-plugins --enable-werror Clang builds, compiling 
> vcl/source/window/errinf.cxx now failed with a loplugin:vclwidgets 
> warning/error about the changed
> 
>> -struct ErrorContextImpl
>> +struct ImplErrorContext
>> {
>> vcl::Window *pWin; // FIXME: should be VclPtr for strong lifecycle
>> };
> 
> as the whitelisting of that struct in compilerplugins/clang/vclwidgets.cxx 
> still used the old name.
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice

I see, so it was breaking the compiler plugin. Is there any documentation 
around how the compiler plugin works? I didn't realise this would occur, and I 
must need to enable something in OS X to get clang plugins working...

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


Re: [Libreoffice-commits] core.git: Fix build after 7d71451e8e0226d3f3f523611f55132eda6ec10f

2017-04-28 Thread Noel Grandin



On 2017/04/28 11:01 AM, Chris Sherlock wrote:


I see, so it was breaking the compiler plugin. Is there any documentation 
around how the compiler plugin works? I didn't realise this would occur, and I 
must need to enable something in OS X to get clang plugins working...



The plugins don't work well on anything other than Linux. Your best is just to 
submit to jenkins and check the output there.
Or do a build in a local VM running the Linux distro of your choice.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Moving away from tools module

2017-04-28 Thread Eike Rathke
Hi Chris,

On Friday, 2017-04-28 08:36:19 +1000, Chris Sherlock wrote:

> - time.hxx, date.hxx, datetime.hxx and datetimeutils.hxx - these all seem to 
> be better suited to the SAL, and actually should we consider moving to chrono?

chrono is not a replacement as it doesn't offer the functionality of
tools::Date and DateTime, only for Time.

I don't care in which module the source code lives or what implements
it, but I definitely want to keep the existing functionality.

Problem with moving anything to sal is that we then guarantee stable API
and even ABI to some degree as sal is part of the SDK, or have LibO only
interfaces like with OUString.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Care about Free Software, support the FSFE https://fsfe.org/support/?erack


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


[Libreoffice-commits] core.git: 3 commits - include/svtools solenv/gbuild svtools/AllLangResTarget_svt.mk svtools/inc svtools/source

2017-04-28 Thread Caolán McNamara
 include/svtools/svtools.hrc   |2 --
 solenv/gbuild/AllLangResTarget.mk |   26 --
 svtools/AllLangResTarget_svt.mk   |4 
 svtools/inc/strings.hxx   |   18 ++
 svtools/source/misc/ehdl.cxx  |6 +++---
 svtools/source/misc/ehdl.src  |   32 
 6 files changed, 25 insertions(+), 63 deletions(-)

New commits:
commit 5bcd18461b8cb63b477dbb74025374b4c963161a
Author: Caolán McNamara 
Date:   Fri Apr 28 10:17:00 2017 +0100

now this argument is always true

Change-Id: I1d53ca095829b13818e58c1da1f0ed4c79a11e91

diff --git a/solenv/gbuild/AllLangResTarget.mk 
b/solenv/gbuild/AllLangResTarget.mk
index 4a0f66e50b74..3976ecc002ff 100644
--- a/solenv/gbuild/AllLangResTarget.mk
+++ b/solenv/gbuild/AllLangResTarget.mk
@@ -61,7 +61,7 @@ $(call gb_SrsPartMergeTarget_get_target,%) : $(SRCDIR)/% 
$(gb_Helper_MISCDUMMY)
 # translations are optional - use "wildcard" to avoid spurious re-builds
 # when they don't exist
 define gb_SrsPartMergeTarget_SrsPartMergeTarget
-$(call gb_SrsPartMergeTarget__SrsPartMergeTarget_impl,$(1),$(if 
$(2),$(wildcard $(foreach 
lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir 
$(1))).po
+$(call gb_SrsPartMergeTarget__SrsPartMergeTarget_impl,$(1),$(wildcard 
$(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir 
$(1))).po)))
 endef
 
 define gb_SrsPartMergeTarget__SrsPartMergeTarget_impl
@@ -112,7 +112,7 @@ $(call gb_SrsPartTarget_get_target,$(1)) : MERGEDFILE :=
 else
 $(call gb_SrsPartTarget_get_target,$(1)) : MERGEDFILE := $(call 
gb_SrsPartMergeTarget_get_target,$(1))
 $(call gb_SrsPartTarget_get_target,$(1)) : $(call 
gb_SrsPartMergeTarget_get_target,$(1))
-$(call gb_SrsPartMergeTarget_SrsPartMergeTarget,$(1),$(2))
+$(call gb_SrsPartMergeTarget_SrsPartMergeTarget,$(1))
 endif
 
 endef
@@ -196,7 +196,7 @@ define gb_SrsTarget__add_file
 ifeq ($(gb_FULLDEPS),$(true))
 $(call gb_SrsTarget_get_dep_target,$(1)) : $(call 
gb_SrsPartTarget_get_dep_target,$(2))
 endif
-$(call gb_SrsPartTarget_SrsPartTarget,$(2),$(3))
+$(call gb_SrsPartTarget_SrsPartTarget,$(2))
 $(call gb_SrsTarget_get_target,$(1)) : $(call gb_SrsPartTarget_get_target,$(2))
 $(call gb_SrsPartTarget_get_target,$(2)) :| $(call 
gb_SrsTarget_get_headers_target,$(1))
 $(call gb_SrsTarget_get_clean_target,$(1)) : PARTS += $(2)
@@ -208,7 +208,7 @@ endif
 endef
 
 define gb_SrsTarget_add_file
-$(call gb_SrsTarget__add_file,$(1),$(2),$(true))
+$(call gb_SrsTarget__add_file,$(1),$(2))
 
 endef
 
commit 6bd8918e5d14ae82ec1fd402f3b4ae2c01900d0f
Author: Caolán McNamara 
Date:   Fri Apr 28 10:13:19 2017 +0100

gb_SrsTarget_add_nonlocalizable_file is now unused

Change-Id: Ia525e2a3bdb9a7342fbb0982f637d926c5de9a38

diff --git a/solenv/gbuild/AllLangResTarget.mk 
b/solenv/gbuild/AllLangResTarget.mk
index 2e3c114c1be0..4a0f66e50b74 100644
--- a/solenv/gbuild/AllLangResTarget.mk
+++ b/solenv/gbuild/AllLangResTarget.mk
@@ -217,24 +217,6 @@ $(foreach file,$(2),$(call 
gb_SrsTarget_add_file,$(1),$(file)))
 
 endef
 
-# Add a srs file that does not have any localizable content.
-# These files will be copied instead of parsing them with transex3.
-#
-# gb_SrsTarget_add_nonlocalizable_file srs file
-define gb_SrsTarget_add_nonlocalizable_file
-$(call gb_SrsTarget__add_file,$(1),$(2),$(false))
-
-endef
-
-# Add srs files that do not have any localizable content.
-#
-# gb_SrsTarget_add_nonlocalizable_files srs file(s)
-define gb_SrsTarget_add_nonlocalizable_files
-$(foreach file,$(2),$(call gb_SrsTarget_add_nonlocalizable_file,$(1),$(file)))
-
-endef
-
-
 # ResTarget
 
 gb_ResTarget_DEFIMAGESLOCATION := $(SRCDIR)/icon-themes/galaxy/
commit 0a10bdd0b838a3bc792de5421414fecbe8575550
Author: Caolán McNamara 
Date:   Fri Apr 28 10:09:32 2017 +0100

another name for a nonlocalized string is a string

Change-Id: I165d74c59d1cccba295072a3df7b9f54dfb60449

diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index d2cc41dc5a47..7dc331fe91a8 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -124,8 +124,6 @@
 #define STR_SVT_FONTMAP_END (STR_SVT_FONTMAP_NOTAVAILABLE)
 
 #define STR_SVT_ERRORCONTEXT_START  (STR_SVT_FONTMAP_END+1)
-#define STR_ERR_HDLMESS (STR_SVT_ERRORCONTEXT_START+0)
-#define RID_ERRHDL_CLASS(STR_SVT_ERRORCONTEXT_START+1)
 #define RID_ERRCTX  (STR_SVT_ERRORCONTEXT_START+2)
 #define RID_ERRHDL  (STR_SVT_ERRORCONTEXT_START+3)
 #define STR_SVT_ERRORCONTEXT_END(RID_ERRHDL)
diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk
index b0a7545da7d2..eea65ca9354c 100644
--- a/svtools/AllLangResTarget_svt.mk
+++ b/svtools/AllLangResTarget_svt.mk
@@ -55,8 +55,4 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\
 

[Libreoffice-commits] core.git: drawinglayer/source oox/source scripting/source sd/source slideshow/source sot/source svgio/source svl/source test/source ucb/source unotools/source uui/source writerpe

2017-04-28 Thread Noel Grandin
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx  |7 -
 oox/source/export/chartexport.cxx|4 
 scripting/source/provider/MasterScriptProvider.cxx   |   47 
++
 scripting/source/vbaevents/eventhelper.cxx   |   19 

 sd/source/core/drawdoc2.cxx  |5 -
 sd/source/filter/html/htmlex.cxx |5 -
 sd/source/ui/dlg/LayerTabBar.cxx |2 
 sd/source/ui/dlg/tpoption.cxx|5 -
 sd/source/ui/func/fusel.cxx  |   11 --
 sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx |5 -
 sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx|5 -
 slideshow/source/engine/animationnodes/nodetools.cxx |8 -
 sot/source/base/exchange.cxx |6 -
 sot/source/sdstor/stg.cxx|6 -
 svgio/source/svgreader/svgtextpathnode.cxx   |7 -
 svl/source/numbers/zforlist.cxx  |6 -
 svl/source/numbers/zformat.cxx   |   11 --
 test/source/diff/diff.cxx|5 -
 ucb/source/cacher/cachedcontentresultset.cxx |7 -
 ucb/source/ucp/ftp/ftpdirp.cxx   |5 -
 ucb/source/ucp/ftp/ftpresultsetbase.cxx  |8 -
 ucb/source/ucp/tdoc/tdoc_docmgr.cxx  |5 -
 ucb/source/ucp/webdav-neon/ContentProperties.cxx |5 -
 ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx |5 -
 ucb/source/ucp/webdav-neon/NeonSession.cxx   |5 -
 ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx  |   31 
+-
 ucb/source/ucp/webdav-neon/webdavcontent.cxx |   19 
+---
 unotools/source/config/eventcfg.cxx  |5 -
 uui/source/iahndl.cxx|5 -
 writerperfect/source/common/DirectoryStream.cxx  |5 -
 writerperfect/source/writer/WordPerfectImportFilter.cxx  |4 
 xmlhelp/source/cxxhelp/provider/resultsetbase.cxx|7 -
 xmloff/source/chart/SchXMLExport.cxx |4 
 xmloff/source/draw/xexptran.cxx  |7 -
 xmloff/source/style/chrlohdl.cxx |5 -
 xmloff/source/text/txtparae.cxx  |8 -
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx   |8 -
 xmlsecurity/source/helper/documentsignaturehelper.cxx|4 
 38 files changed, 74 insertions(+), 242 deletions(-)

New commits:
commit 9348b322a5c230dfcc2231661b73e480b130fcd9
Author: Noel Grandin 
Date:   Wed Apr 12 11:21:58 2017 +0200

clang-tidy readability-simplify-boolean-expr

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

diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index a11326e1e76b..4b5e45c7ef04 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -204,12 +204,7 @@ namespace drawinglayer
 aLocalPolygon.transform(maCurrentTransformation);
 
 // try drawing; if it did not work, use standard fallback
-if(mpOutputDevice->DrawPolyLineDirect( aLocalPolygon, 0.0, 
fTransparency))
-{
-return true;
-}
-
-return false;
+return mpOutputDevice->DrawPolyLineDirect( aLocalPolygon, 0.0, 
fTransparency);
 }
 
 bool VclPixelProcessor2D::tryDrawPolygonStrokePrimitive2DDirect(const 
drawinglayer::primitive2d::PolygonStrokePrimitive2D& rSource, double 
fTransparency)
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 329a5e8aadef..4936e65b18cf 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -120,9 +120,7 @@ namespace {
 bool isPrimaryAxes(sal_Int32 nIndex)
 {
 assert(nIndex == 0 || nIndex == 1);
-if (nIndex == 1)
-return false;
-return true;
+return nIndex != 1;
 }
 
 }
diff --git a/scripting/source/provider/MasterScriptProvider.cxx 
b/scripting/source/provider/MasterScriptProvider.cxx
index 56faea32c6d2..0b4baeddd981 100644

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

2017-04-28 Thread Eike Rathke
 i18npool/source/localedata/data/sort-formats-by-formatindex.awk |   82 --
 i18npool/source/localedata/data/sort-formats.awk|  132 
++
 2 files changed, 132 insertions(+), 82 deletions(-)

New commits:
commit 72947e82fef1800d50e6d317fbfd7be05aaebf6b
Author: Eike Rathke 
Date:   Fri Apr 28 11:23:55 2017 +0200

Add group option, group by usage attribute

Change-Id: Ib20d6ca4bad6f15999abdd93b74ccb3e82a664d6

diff --git a/i18npool/source/localedata/data/sort-formats.awk 
b/i18npool/source/localedata/data/sort-formats.awk
index ffd84e4d517e..1ac040ddb75d 100755
--- a/i18npool/source/localedata/data/sort-formats.awk
+++ b/i18npool/source/localedata/data/sort-formats.awk
@@ -7,21 +7,35 @@
 # 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/.
 
-# Usage: gawk -f sort-formats-by-formatindex.awk ll_CC.xml
+# Usage: gawk -f sort-formats-by-formatindex.awk [-v group=1] ll_CC.xml
 #
 # Sort the LC_FORMAT child elements FormatElement and their children by
 # formatindex="..." value for easier comparison between locales.
+# If -v group=1 is given, the output is sorted by usage groups first, then by
+# formatindex. This could be the final sorting to commit.
 # Output goes to stdout.
 
 BEGIN {
 file = ""
+usage["FIXED_NUMBER"] = 1
+usage["SCIENTIFIC_NUMBER"] = 2
+usage["PERCENT_NUMBER"] = 3
+usage["CURRENCY"] = 4
+usage["DATE"] = 5
+usage["TIME"] = 6
+usage["DATE_TIME"] = 7
+group = (group ? 1 : 0) # -v group=... given or not
 }
 
 file != FILENAME {
 file = FILENAME
 informats = 0
+currusage = 0
 currformat = 0
+inFormatElement = 0
 delete formats
+currleader = 0
+delete leaders
 }
 
 /]/ {
@@ -33,17 +47,28 @@ file != FILENAME {
 
 informats && /<\/LC_FORMAT>/ {
 PROCINFO["sorted_in"] = "@ind_num_asc"
-for (f in formats)
+for (u in formats)
 {
-if (isarray(formats[f]))
+if (isarray(formats[u]))
 {
-for (i in formats[f])
-print formats[f][i]
+for (f in formats[u])
+{
+if (isarray(formats[u][f]))
+{
+for (i in formats[u][f])
+print formats[u][f][i]
+}
+else
+{
+# Something unhandled, adapt code.
+print "XXX formats[u][f] error: " formats[u][f]
+}
+}
 }
 else
 {
 # Something unhandled, adapt code.
-print "XXX error: " formats[f]
+print "XXX formats[u] error: " formats[u]
 }
 }
 informats = 0
@@ -58,11 +83,26 @@ informats && /<\/LC_FORMAT>/ {
 }
 
 // {
 next
 }
 
+# Prefix a leading comment (or even an element) to the next FormatElement.
+!inFormatElement {
+leaders[++currleader] = $0
+next
+}
+
 # Associate any element or comment with the current FormatElement.
 {
-formats[currformat][++child] = $0
+formats[currusage][currformat][++child] = $0
+}
+
+/<\/FormatElement>/ {
+inFormatElement = 0
 }
 
 END {
commit 952faab8ab597e86636324bdb9e8e3090bf025cc
Author: Eike Rathke 
Date:   Fri Apr 28 11:22:58 2017 +0200

Rename to sort-formats.awk that better fits plans

Change-Id: I4d4092375a040793f8aa408802978c420f33a4f3

diff --git a/i18npool/source/localedata/data/sort-formats-by-formatindex.awk 
b/i18npool/source/localedata/data/sort-formats.awk
similarity index 100%
rename from i18npool/source/localedata/data/sort-formats-by-formatindex.awk
rename to i18npool/source/localedata/data/sort-formats.awk
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-bugs] [Bug 105871] Save and Quit crash (Mac OS X)

2017-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105871

--- Comment #25 from mk...@dorkypantsr.us ---
My Mac's Energy Saver Preference Pane doesn't have "Automatic graphics
switching" as an option. See the attached window captures

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 107309] VIEWING: and skip over rows

2017-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=107309

Buovjaga  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 107349] In slide show mode if you there 2 or more videos in a single page they play same time (There is no click to play option Impress )

2017-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=107349

Buovjaga  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||todven...@suomi24.fi
 Resolution|--- |DUPLICATE

--- Comment #1 from Buovjaga  ---


*** This bug has been marked as a duplicate of bug 61422 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 61422] UI: Integrate basic playback controls for audio/ video when doing a slide show

2017-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=61422

Buovjaga  changed:

   What|Removed |Added

 CC||mustafagundogdu.ba@outlook.
   ||com

--- Comment #6 from Buovjaga  ---
*** Bug 107349 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 107373] Menu not shown when Radeon HD7670M Drivers are installed

2017-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=107373

Buovjaga  changed:

   What|Removed |Added

 CC||todven...@suomi24.fi

--- Comment #1 from Buovjaga  ---
What if you do Alt-H, Alt-A to get to the About screen, do you see the
contents? Select the text and copy and paste here.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 104461] [META] DOCX Frame related issues

2017-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=104461

Buovjaga  changed:

   What|Removed |Added

 Depends on||107119


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=107119
[Bug 107119] Fileopen: Docx generated form has frames overlapping table
-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 107119] Fileopen: Docx generated form has frames overlapping table

2017-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=107119

Buovjaga  changed:

   What|Removed |Added

   Keywords||filter:docx
 Status|UNCONFIRMED |NEW
 Blocks||104461
Summary|Fileopen: Docx generated|Fileopen: Docx generated
   |form with frames not proper |form has frames overlapping
   ||table
 Ever confirmed|0   |1

--- Comment #4 from Buovjaga  ---
Confirmed.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: 9348b322a5c230dfcc2231661b73e480b130fcd9
CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on April 28th 2016


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=104461
[Bug 104461] [META] DOCX Frame related issues
-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 102998] [META] Mail merge bugs and enhancements

2017-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=102998

Buovjaga  changed:

   What|Removed |Added

 Depends on||107047


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=107047
[Bug 107047] Single merged document wont email
-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 107047] Single merged document wont email

2017-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=107047

Buovjaga  changed:

   What|Removed |Added

 Blocks||102998


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=102998
[Bug 102998] [META] Mail merge bugs and enhancements
-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 107249] Rendering of system font vertically cramped in 5.3

2017-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=107249

Khaled Hosny  changed:

   What|Removed |Added

Summary|Rendering of system font|Rendering of system font
   |vertically cramped with |vertically cramped in 5.3
   |Harfbuzz|

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


  1   2   3   4   >