[Libreoffice-commits] core.git: include/svl svl/Library_svl.mk svl/source

2016-10-26 Thread Jochen Nitschke
 include/svl/nranges.hxx  |   34 +++---
 svl/Library_svl.mk   |1 +
 svl/source/items/itemset.cxx |4 ++--
 svl/source/items/nranges.cxx |5 +++--
 4 files changed, 33 insertions(+), 11 deletions(-)

New commits:
commit 20f2a6b3f719e83a0bef77c214c622026dbe5aca
Author: Jochen Nitschke 
Date:   Tue Oct 25 23:31:31 2016 +0200

untangle .cxx include in itemset.cxx

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

diff --git a/include/svl/nranges.hxx b/include/svl/nranges.hxx
index 373086b..d374475 100644
--- a/include/svl/nranges.hxx
+++ b/include/svl/nranges.hxx
@@ -16,16 +16,12 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifdef MACOSX
-// We need an empty block in here. Otherwise, if the #ifndef 
INCLUDED_SVL_NRANGES_HXX
-// line is the first line, the Mac OS X version of the gcc preprocessor will
-// incorrectly optimize the inclusion process and will never include this file
-// a second time
-#endif
-
 #ifndef INCLUDED_SVL_NRANGES_HXX
 #define INCLUDED_SVL_NRANGES_HXX
 
+#include 
+#include 
+
 class SfxUShortRanges
 {
 sal_uInt16* _pRanges; // 0-terminated array of 
sal_uInt16-pairs
@@ -48,6 +44,30 @@ public:
 { return _pRanges; }
 };
 
+/**
+ * Creates a sal_uInt16-ranges-array in 'rpRanges' using 'nWh1' and 'nWh2' as
+ * first range, 'nNull' as terminator or start of 2nd range and 'pArgs' as
+ * remainder.
+ *
+ * It returns the number of sal_uInt16s which are contained in the described
+ * set of sal_uInt16s.
+ */
+sal_uInt16 InitializeRanges_Impl( sal_uInt16 *&rpRanges, va_list pArgs,
+   sal_uInt16 nWh1, sal_uInt16 nWh2, sal_uInt16 
nNull );
+
+/**
+ * Determines the number of sal_uInt16s in a 0-terminated array of pairs of
+ * sal_uInt16s.
+ * The terminating 0 is not included in the count.
+ */
+sal_uInt16 Count_Impl( const sal_uInt16 *pRanges );
+
+/**
+ * Determines the total number of sal_uInt16s described in a 0-terminated
+ * array of pairs of sal_uInt16s, each representing an range of sal_uInt16s.
+ */
+sal_uInt16 Capacity_Impl( const sal_uInt16 *pRanges );
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
index 8e7b9a2..dc4e70a 100644
--- a/svl/Library_svl.mk
+++ b/svl/Library_svl.mk
@@ -91,6 +91,7 @@ $(eval $(call gb_Library_add_exception_objects,svl,\
 svl/source/items/itemset \
 svl/source/items/lckbitem \
 svl/source/items/macitem \
+svl/source/items/nranges \
 svl/source/items/poolcach \
 svl/source/items/poolio \
 svl/source/items/poolitem \
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index f8e953a..c104305 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -36,10 +36,10 @@
 #include 
 #include 
 
-static const sal_uInt16 nInitCount = 10; // Single USHORTs => 5 pairs without 
'0'
-#include "nranges.cxx"
 #include "poolio.hxx"
 
+static const sal_uInt16 nInitCount = 10; // Single USHORTs => 5 pairs without 
'0'
+
 /**
  * Ctor for a SfxItemSet with exactly the Which Ranges, which are known to
  * the supplied SfxItemPool.
diff --git a/svl/source/items/nranges.cxx b/svl/source/items/nranges.cxx
index b445cb7..85ed671 100644
--- a/svl/source/items/nranges.cxx
+++ b/svl/source/items/nranges.cxx
@@ -16,13 +16,14 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
+#include 
 
 #include 
+#include 
 #include 
-// compiled via include from itemset.cxx only!
-#include 
 
 #include 
+#include 
 
 #ifdef DBG_UTIL
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Miklos Vajna
 xmlsecurity/source/pdfio/pdfdocument.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit b1434b95d15d5e7246b3c657a68f87445eede513
Author: Miklos Vajna 
Date:   Tue Oct 25 19:55:16 2016 +0200

xmlsecurity PDF sign: use unique ID for a new signature

Otherwise Adobe Acrobat thinks they are different versions of the same
signature.

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

diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx 
b/xmlsecurity/source/pdfio/pdfdocument.cxx
index dfd3938..fc942c1 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -297,6 +297,10 @@ bool PDFDocument::RemoveSignature(size_t nPosition)
 
 bool PDFDocument::Sign(const uno::Reference& 
xCertificate, const OUString& rDescription)
 {
+// Decide what identifier to use for the new signature.
+std::vector aSignatures = GetSignatureWidgets();
+sal_uInt32 nNextSignature = aSignatures.size() + 1;
+
 m_aEditBuffer.WriteCharPtr("\n");
 
 // Write signature object.
@@ -368,7 +372,9 @@ bool PDFDocument::Sign(const 
uno::Reference& xCertificat
 m_aEditBuffer.WriteCharPtr("/P ");
 m_aEditBuffer.WriteUInt32AsString(pFirstPage->GetObjectValue());
 m_aEditBuffer.WriteCharPtr(" 0 R\n");
-m_aEditBuffer.WriteCharPtr("/T(Signature1)\n");
+m_aEditBuffer.WriteCharPtr("/T(Signature");
+m_aEditBuffer.WriteUInt32AsString(nNextSignature);
+m_aEditBuffer.WriteCharPtr(")\n");
 m_aEditBuffer.WriteCharPtr("/V ");
 m_aEditBuffer.WriteUInt32AsString(nSignatureId);
 m_aEditBuffer.WriteCharPtr(" 0 R\n");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: icon-themes/breeze icon-themes/breeze_dark icon-themes/breeze_svg

2016-10-26 Thread andreas_k
 icon-themes/breeze/cmd/lc_toggletabbarvisibility.png  |binary
 icon-themes/breeze/cmd/sc_toggletabbarvisibility.png  |binary
 icon-themes/breeze_dark/cmd/lc_toggletabbarvisibility.png |binary
 icon-themes/breeze_dark/cmd/sc_toggletabbarvisibility.png |binary
 icon-themes/breeze_svg/cmd/lc_toggletabbarvisibility.svg  |  114 ++
 icon-themes/breeze_svg/cmd/sc_toggletabbarvisibility.svg  |   13 +
 6 files changed, 127 insertions(+)

New commits:
commit c5d2a18ef7dc7a9f29a948acef9e0d64a552cd63
Author: andreas_k 
Date:   Mon Oct 24 21:42:15 2016 +0200

add toggletabbarvisibility for breeze and breeze_dark

Change-Id: I28437193e5b8c0c61d606cbb462b9ca547ca9290
Reviewed-on: https://gerrit.libreoffice.org/30233
Reviewed-by: jan iversen 
Tested-by: jan iversen 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/icon-themes/breeze/cmd/lc_toggletabbarvisibility.png 
b/icon-themes/breeze/cmd/lc_toggletabbarvisibility.png
index 1bc7df4..735a70e 100644
Binary files a/icon-themes/breeze/cmd/lc_toggletabbarvisibility.png and 
b/icon-themes/breeze/cmd/lc_toggletabbarvisibility.png differ
diff --git a/icon-themes/breeze/cmd/sc_toggletabbarvisibility.png 
b/icon-themes/breeze/cmd/sc_toggletabbarvisibility.png
index d3d0dda..421aadc 100644
Binary files a/icon-themes/breeze/cmd/sc_toggletabbarvisibility.png and 
b/icon-themes/breeze/cmd/sc_toggletabbarvisibility.png differ
diff --git a/icon-themes/breeze_dark/cmd/lc_toggletabbarvisibility.png 
b/icon-themes/breeze_dark/cmd/lc_toggletabbarvisibility.png
index 2f2e3da..7c94941 100644
Binary files a/icon-themes/breeze_dark/cmd/lc_toggletabbarvisibility.png and 
b/icon-themes/breeze_dark/cmd/lc_toggletabbarvisibility.png differ
diff --git a/icon-themes/breeze_dark/cmd/sc_toggletabbarvisibility.png 
b/icon-themes/breeze_dark/cmd/sc_toggletabbarvisibility.png
index d3d0dda..8a7e257 100644
Binary files a/icon-themes/breeze_dark/cmd/sc_toggletabbarvisibility.png and 
b/icon-themes/breeze_dark/cmd/sc_toggletabbarvisibility.png differ
diff --git a/icon-themes/breeze_svg/cmd/lc_toggletabbarvisibility.svg 
b/icon-themes/breeze_svg/cmd/lc_toggletabbarvisibility.svg
new file mode 100644
index 000..2ce7112
--- /dev/null
+++ b/icon-themes/breeze_svg/cmd/lc_toggletabbarvisibility.svg
@@ -0,0 +1,114 @@
+
+
+
+http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   width="24"
+   height="24"
+   id="svg3760"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="lc_toggletabbarvisibility.svg">
+  
+  
+
+
+
+
+
+
+
+
+
+
+
+  
+  
+
+  
+image/svg+xml
+http://purl.org/dc/dcmitype/StillImage"; />
+
+  
+
+  
+  
+
+  
+
diff --git a/icon-themes/breeze_svg/cmd/sc_toggletabbarvisibility.svg 
b/icon-themes/breeze_svg/cmd/sc_toggletabbarvisibility.svg
new file mode 100644
index 000..6cf8223
--- /dev/null
+++ b/icon-themes/breeze_svg/cmd/sc_toggletabbarvisibility.svg
@@ -0,0 +1,13 @@
+http://www.w3.org/2000/svg"; viewBox="0 0 16 16">
+  
+
+  .ColorScheme-Text {
+color:#4d4d4d;
+  }
+  
+  
+ 
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: 32-bit Clang Release Builds failing ww8export Unit Tests

2016-10-26 Thread Miklos Vajna
Hi Luke,

On Wed, Oct 26, 2016 at 01:00:59AM +, Luke Benes  
wrote:
> Debug builds and "--enable-symbols", build without any issues. 
> 
> Why would symbols be necessary? Does it also disable optimizations? 

Sounds like a compiler bug, or something fishy on our side.

And no, --enable-symbols doesn't disable optimization.

Unless you're interested in debugging this problem yourself, probably
you're better off using gcc or switching to 64bit, like everyone else
does. :-)

Regards,

Miklos


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


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

2016-10-26 Thread Wastack
 connectivity/source/drivers/firebird/Connection.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 41832d27c3325808333c21b9181db84ae9788978
Author: Wastack 
Date:   Sat Oct 22 15:28:59 2016 +0200

tdf#103373 create and connect with default user

For an embedded Firebird database resolve authentification with a
default username and password (hardcoded) instead of trusted
authentification.

Change-Id: I54ee04898a8b2bedc9a24001c64173400769f416
Reviewed-on: https://gerrit.libreoffice.org/30160
Tested-by: Jenkins 
Reviewed-by: Lionel Elie Mamane 

diff --git a/connectivity/source/drivers/firebird/Connection.cxx 
b/connectivity/source/drivers/firebird/Connection.cxx
index 17528d7..48ebba5 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -258,9 +258,8 @@ void Connection::construct(const ::rtl::OUString& url, 
const Sequence< PropertyV
 
 if (m_bIsEmbedded || m_bIsFile)
 {
-*dpb++ = isc_dpb_trusted_auth;
-*dpb++ = 1; // Length of data
-*dpb++ = 1; // TRUE
+strcpy(userName,"sysdba");
+strcpy(userPassword,"masterkey");
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'private/jmux/mm-fixes'

2016-10-26 Thread Jan-Marek Glogowski
New branch 'private/jmux/mm-fixes' available with the following commits:
commit 1f0224997689b046f504f4a03ef07685400ebed0
Author: Jan-Marek Glogowski 
Date:   Tue Oct 4 10:13:24 2016 +

tdf#102010 overwrite files with user supplied prefix

Fixes the regression introduced by
  commit e637b6743a506ef74c93ccbe15ab6642f3baa34f

This commit removed the crazy bSubjectIsFilename handling,
where I didn't understood the case of bSubjectIsFilename
and a user supplied prefix.

Mail merge to files used to just overwrite a document, if
it got a document prefix from the user, otherwise it used
the generated temporary filename.

Change-Id: Idda487023e6984de9c1e701fc088a6b7f92e9847

commit 2011a1cfb8d962c54aa964c37155b4ccc50fe9ee
Author: Jan-Marek Glogowski 
Date:   Mon Oct 3 21:51:56 2016 +0200

MM allow easier manipulation of MM test arguments

Keep the beans::NamedValue vector around and convert it to a
uno::Sequence just before executing the mail merge job.

Change-Id: Ib2b4863337af20fb4423cc1b4ea4223d66d63ae5

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


[Libreoffice-commits] core.git: Branch 'feature/cib_contract57' - sfx2/source

2016-10-26 Thread Samuel Mehrbrodt
 sfx2/source/doc/sfxbasemodel.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 4b1a86f0e87c33ed938ffb5bd5474bffa3d400ab
Author: Samuel Mehrbrodt 
Date:   Wed Oct 26 10:33:00 2016 +0200

Revert "Don't operate on destroyed SfxShell in listener"

This reverts commit dee20bd1e0cd0d9649d1cc851befb1e92aa99338.

diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 8185e6a..20f15ee 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -146,10 +146,10 @@ class SfxDocInfoListener_Impl : public 
::cppu::WeakImplHelper1<
 {
 
 public:
-SfxObjectShellRef m_pShell;
+SfxObjectShell& m_rShell;
 
-SfxDocInfoListener_Impl( const SfxObjectShellRef& i_rDoc )
-: m_pShell(i_rDoc)
+SfxDocInfoListener_Impl( SfxObjectShell& i_rDoc )
+: m_rShell(i_rDoc)
 { };
 
 virtual ~SfxDocInfoListener_Impl();
@@ -168,7 +168,7 @@ void SAL_CALL SfxDocInfoListener_Impl::modified( const 
lang::EventObject& )
 SolarMutexGuard aSolarGuard;
 
 // notify changes to the SfxObjectShell
-m_pShell->FlushDocInfo();
+m_rShell.FlushDocInfo();
 }
 
 void SAL_CALL SfxDocInfoListener_Impl::disposing( const lang::EventObject& )
@@ -826,7 +826,7 @@ IMPL_SfxBaseModel_DataContainer::impl_setDocumentProperties(
 {
 Reference const xMB(
 m_xDocumentProperties, UNO_QUERY_THROW);
-xMB->addModifyListener(new SfxDocInfoListener_Impl(m_pObjectShell));
+xMB->addModifyListener(new SfxDocInfoListener_Impl(*m_pObjectShell));
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Takeshi Abe
 dbaccess/source/ui/inc/unodatbr.hxx |2 +-
 filter/source/flash/swfwriter.hxx   |   12 +---
 filter/source/flash/swfwriter2.cxx  |2 +-
 include/xmloff/nmspmap.hxx  |9 +
 4 files changed, 4 insertions(+), 21 deletions(-)

New commits:
commit c498c97f7457fe7ef34164a822c9a1e2f04e9b1d
Author: Takeshi Abe 
Date:   Wed Oct 26 13:08:00 2016 +0900

The default std::less is fine

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

diff --git a/dbaccess/source/ui/inc/unodatbr.hxx 
b/dbaccess/source/ui/inc/unodatbr.hxx
index b66d671..f8bd65a 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -85,7 +85,7 @@ namespace dbaui
 ExternalFeature( const css::util::URL& _rURL ) : aURL( _rURL ), 
bEnabled( false ) { }
 };
 
-typedef ::std::map< sal_uInt16, ExternalFeature, ::std::less< 
sal_uInt16 > >  ExternalFeaturesMap;
+typedef ::std::map< sal_uInt16, ExternalFeature >  ExternalFeaturesMap;
 ExternalFeaturesMap m_aExternalFeatures;
 
 svx::ODataAccessDescriptorm_aDocumentDataSource;
diff --git a/filter/source/flash/swfwriter.hxx 
b/filter/source/flash/swfwriter.hxx
index 8d3c8b4..002a6e6 100644
--- a/filter/source/flash/swfwriter.hxx
+++ b/filter/source/flash/swfwriter.hxx
@@ -109,16 +109,6 @@ sal_uInt32 getFixed( double fValue );
 
 typedef ::std::map ChecksumCache;
 
-/** unsigned int 16 compare operation for stl */
-struct ltuint16
-{
-  bool operator()(sal_uInt16 s1, sal_uInt16 s2) const
-  {
-return s1 < s2;
-  }
-};
-
-
 /** container class to create bit structures */
 class BitStream
 {
@@ -159,7 +149,7 @@ public:
 
 private:
 const vcl::Font maFont;
-std::map maGlyphIndex;
+std::map maGlyphIndex;
 sal_uInt16 mnNextIndex;
 sal_uInt16 mnId;
 BitStream maGlyphData;
diff --git a/filter/source/flash/swfwriter2.cxx 
b/filter/source/flash/swfwriter2.cxx
index 9c39a2c..185bd60 100644
--- a/filter/source/flash/swfwriter2.cxx
+++ b/filter/source/flash/swfwriter2.cxx
@@ -400,7 +400,7 @@ FlashFont::~FlashFont()
 sal_uInt16 FlashFont::getGlyph( sal_uInt16 nChar, VirtualDevice* pVDev )
 {
 // see if we already created a glyph for this character
-std::map::iterator aIter( 
maGlyphIndex.find(nChar) );
+std::map::iterator aIter( maGlyphIndex.find(nChar) 
);
 if( aIter != maGlyphIndex.end() )
 {
 return aIter->second;
diff --git a/include/xmloff/nmspmap.hxx b/include/xmloff/nmspmap.hxx
index b2926d9..2befda4 100644
--- a/include/xmloff/nmspmap.hxx
+++ b/include/xmloff/nmspmap.hxx
@@ -50,13 +50,6 @@ public:
 sal_uInt16  nKey;
 };
 
-struct uInt32lt
-{
-bool operator()( sal_uInt32 r1, sal_uInt32 r2) const
-{
-return r1 < r2;
-}
-};
 typedef ::std::pair < sal_uInt16, OUString > QNamePair;
 
 struct QNamePairHash
@@ -69,7 +62,7 @@ struct QNamePairHash
 
 typedef std::unordered_map < QNamePair, OUString, QNamePairHash > QNameCache;
 typedef std::unordered_map < OUString, ::rtl::Reference , 
OUStringHash > NameSpaceHash;
-typedef std::map < sal_uInt16, ::rtl::Reference < NameSpaceEntry >, uInt32lt > 
NameSpaceMap;
+typedef std::map < sal_uInt16, ::rtl::Reference < NameSpaceEntry > > 
NameSpaceMap;
 
 class XMLOFF_DLLPUBLIC SvXMLNamespaceMap
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Giuseppe Castagno
 ucb/qa/cppunit/webdav/webdav_options.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 80cd32f78deca3fea2f731af02a2ad83134261f3
Author: Giuseppe Castagno 
Date:   Wed Oct 26 08:57:51 2016 +0200

WebDAV: Small cosmetic to unit checks.

Change server name in URI test strings.
Pass by const lvalue reference [loplugin:passstuffbyref].

Change-Id: Ic0134f0690a8e6b9abb7d0764efaeeaf3a167bcf
Reviewed-on: https://gerrit.libreoffice.org/30284
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/ucb/qa/cppunit/webdav/webdav_options.cxx 
b/ucb/qa/cppunit/webdav/webdav_options.cxx
index ce3aba7..b1a71ba 100644
--- a/ucb/qa/cppunit/webdav/webdav_options.cxx
+++ b/ucb/qa/cppunit/webdav/webdav_options.cxx
@@ -27,7 +27,7 @@ namespace
 
 void tearDown(  ) override;
 
-void DAVTypesCheckInit( webdav_ucp::DAVOptions aDavType );
+void DAVTypesCheckInit( webdav_ucp::DAVOptions& aDavType );
 void DAVTypesTest();
 
 void DAVOptsCacheTests();
@@ -51,7 +51,7 @@ namespace
 {
 }
 
-void webdav_opts_test::DAVTypesCheckInit( webdav_ucp::DAVOptions aDavType )
+void webdav_opts_test::DAVTypesCheckInit( webdav_ucp::DAVOptions& aDavType 
)
 {
 // check if the class is at reset state
 // using accessors
@@ -223,7 +223,7 @@ namespace
 aHTTPResponseStatusText.clear();
 aDavOpt.setHttpResponseStatusText( aHTTPResponseStatusText );
 
-OUString aURL = "http://a%20fake%20url/to%20test";;
+OUString aURL = "http://my.server.org/a%20fake%20url/to%20test";;
 aDavOpt.setURL( aURL );
 CPPUNIT_ASSERT_EQUAL( false, aDavOpt.isClass1() );
 CPPUNIT_ASSERT_EQUAL( false, aDavOpt.isClass2() );
@@ -240,7 +240,7 @@ namespace
 
 aURL.clear();
 aDavOpt.setURL( aURL );
-aURL = "http://a%20fake%20url/to%20test/another-url";;
+aURL = "http://my.server.org/a%20fake%20url/to%20test/another-url";;
 aDavOpt.setRedirectedURL( aURL );
 CPPUNIT_ASSERT_EQUAL( false, aDavOpt.isClass1() );
 CPPUNIT_ASSERT_EQUAL( false, aDavOpt.isClass2() );
@@ -257,7 +257,7 @@ namespace
 
 //check the init() function
 aAllowedMethods = 
"OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,PUT,LOCK,UNLOCK";
-aURL = "http://a%20fake%20url/to%20test/another-url";;
+aURL = "http://my.server.org/a%20fake%20url/to%20test/another-url";;
 aHTTPResponseStatusText = "404 Not Found";
 aDavOpt.setClass1();
 aDavOpt.setClass2();
@@ -348,8 +348,8 @@ namespace
 webdav_ucp::DAVOptions aDavOptCached;
 // init the values
 OUString aAllowedMethods = 
"OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,PUT,LOCK,UNLOCK";
-OUString aURL = "http://a%20fake%20url/to%20test/another-url";;
-OUString aRedirectedURL = 
"http://a%20fake%20url/to%20test/another-url/redirected";;
+OUString aURL = 
"http://my.server.org/a%20fake%20url/to%20test/another-url";;
+OUString aRedirectedURL = 
"http://my.server.org/a%20fake%20url/to%20test/another-url/redirected";;
 aDavOpt.setURL( aURL );
 aDavOpt.setRedirectedURL( aRedirectedURL );
 aDavOpt.setClass1();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 21 commits - comphelper/source connectivity/source dbaccess/source filter/source forms/source framework/inc framework/source include/comphelper include/filter

2016-10-26 Thread Caolán McNamara
 comphelper/source/property/propagg.cxx |2 
 connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx|4 +
 connectivity/source/drivers/odbc/OResultSet.cxx|2 
 connectivity/source/drivers/odbc/OStatement.cxx|2 
 connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx|2 
 connectivity/source/inc/odbc/OResultSet.hxx|4 +
 connectivity/source/inc/odbc/OStatement.hxx|2 
 dbaccess/source/core/api/statement.cxx |2 
 dbaccess/source/core/dataaccess/datasource.cxx |2 
 dbaccess/source/core/dataaccess/datasource.hxx |2 
 dbaccess/source/core/inc/statement.hxx |4 +
 filter/source/msfilter/mscodec.cxx |   23 
+-
 forms/source/component/Button.cxx  |2 
 forms/source/component/Button.hxx  |2 
 forms/source/component/Columns.cxx |3 -
 forms/source/component/Columns.hxx |2 
 forms/source/component/ComboBox.cxx|4 -
 forms/source/component/ComboBox.hxx|2 
 forms/source/component/DatabaseForm.cxx|5 --
 forms/source/component/DatabaseForm.hxx|2 
 forms/source/component/EditBase.cxx|5 --
 forms/source/component/EditBase.hxx|2 
 forms/source/component/FormComponent.cxx   |4 -
 forms/source/component/Grid.cxx|4 +
 forms/source/component/Grid.hxx|2 
 forms/source/component/ImageControl.cxx|2 
 forms/source/component/ImageControl.hxx|2 
 forms/source/component/clickableimage.cxx  |2 
 forms/source/component/clickableimage.hxx  |2 
 forms/source/component/formcontrolfont.cxx |2 
 forms/source/component/refvaluecomponent.cxx   |2 
 forms/source/component/refvaluecomponent.hxx   |2 
 forms/source/component/scrollbar.cxx   |2 
 forms/source/component/scrollbar.hxx   |2 
 forms/source/component/spinbutton.cxx  |2 
 forms/source/component/spinbutton.hxx  |2 
 forms/source/inc/FormComponent.hxx |4 -
 forms/source/inc/formcontrolfont.hxx   |2 
 framework/inc/classes/actiontriggerseparatorpropertyset.hxx|4 +
 framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx |2 
 include/comphelper/propagg.hxx |2 
 include/filter/msfilter/mscodec.hxx|2 
 42 files changed, 68 insertions(+), 60 deletions(-)

New commits:
commit 0b4be27b147485fb4d61d3398cbb3860e69f01c1
Author: Caolán McNamara 
Date:   Wed Oct 26 09:01:54 2016 +0100

try and silence coverity#1374267 Out-of-bounds access

Change-Id: Ib7a8866dc4acdc243e7bfa975e760afde3bb43a6

diff --git a/filter/source/msfilter/mscodec.cxx 
b/filter/source/msfilter/mscodec.cxx
index 732fe89..3cb7f44 100644
--- a/filter/source/msfilter/mscodec.cxx
+++ b/filter/source/msfilter/mscodec.cxx
@@ -248,10 +248,10 @@ void MSCodec_Xor95::Skip( std::size_t nBytes )
 MSCodec97::MSCodec97(size_t nHashLen)
 : m_nHashLen(nHashLen)
 , m_hCipher(rtl_cipher_create(rtl_Cipher_AlgorithmARCFOUR, 
rtl_Cipher_ModeStream))
+, m_aDocId(16, 0)
 , m_aDigestValue(nHashLen, 0)
 {
 assert(m_hCipher != nullptr);
-(void)memset (m_pDocId, 0, sizeof(m_pDocId));
 }
 
 MSCodec_Std97::MSCodec_Std97()
@@ -269,7 +269,7 @@ MSCodec_CryptoAPI::MSCodec_CryptoAPI()
 MSCodec97::~MSCodec97()
 {
 (void)memset(m_aDigestValue.data(), 0, m_aDigestValue.size());
-(void)memset(m_pDocId, 0, sizeof(m_pDocId));
+(void)memset(m_aDocId.data(), 0, m_aDocId.size());
 rtl_cipher_destroy(m_hCipher);
 }
 
@@ -309,10 +309,11 @@ bool MSCodec97::InitCodec( const uno::Sequence< 
beans::NamedValue >& aData )
 uno::Sequence< sal_Int8 > aUniqueID = 
aHashData.getUnpackedValueOrDefault("STD97UniqueID", uno::Sequence< sal_Int8 
>() );
 if ( aUniqueID.getLength() == 16 )
 {
-(void)memcpy( m_pDocId, aUniqueID.getConstArray(), 16 );
+assert(m_aDocId.size() == 
static_cast(aUniqueID.getLength()));
+(void)memcpy(m_aDocId.data(), aUniqueID.getConstArray(), 
m_aDocId.size());
 bResult = true;
 lcl_Pr

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

2016-10-26 Thread Takeshi Abe
 sd/Library_sd.mk   |1 +
 sd/inc/sdmod.hxx   |4 
 sd/source/ui/app/sdmod.cxx |9 -
 sd/source/ui/inc/DrawViewShell.hxx |   10 +++---
 sd/source/ui/view/drviews1.cxx |   10 +-
 sd/source/ui/view/drviews4.cxx |   11 ++-
 sd/source/ui/view/drviews5.cxx |2 +-
 sd/source/ui/view/drviewsa.cxx |   11 +--
 sd/source/ui/view/drviewsk.cxx |   37 +
 9 files changed, 66 insertions(+), 29 deletions(-)

New commits:
commit 406798f8aae3c0e305d6994fc82561a5002af0aa
Author: Takeshi Abe 
Date:   Thu Oct 20 20:26:24 2016 +0900

tdf#96948 Change color of the area behind Impress slide immediately

after saving Options > Application colours > Application background.

This fixes a regression from 1c481fe6522f4c7d883e77a4ac32f855b9bcb323.

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

diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index 22c94b8..6a267d4 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -475,6 +475,7 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/view/drviewsh \
sd/source/ui/view/drviewsi \
sd/source/ui/view/drviewsj \
+   sd/source/ui/view/drviewsk \
sd/source/ui/view/drvwshrg \
sd/source/ui/view/frmview \
sd/source/ui/view/grviewsh \
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index ed4435d..9b04cf0 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -43,6 +43,7 @@ class SvNumberFormatter;
 class SfxErrorHandler;
 class SdDrawDocument;
 class SfxFrame;
+namespace svtools { class ColorConfig; }
 
 namespace sd {
 class DrawDocShell;
@@ -129,6 +130,8 @@ public:
 SdExtPropertySetInfoCache gImplDrawPropertySetInfoCache;
 SdTypesCache gImplTypesCache;
 
+svtools::ColorConfig& GetColorConfig();
+
 protected:
 
 SdOptions*  pImpressOptions;
@@ -176,6 +179,7 @@ private:
 */
 DECL_STATIC_LINK( SdModule, EventListenerHdl, VclSimpleEvent&, void );
 
+std::unique_ptr mpColorConfig;
 };
 
 #define SD_MOD() ( 
static_cast(SfxApplication::GetModule(SfxToolsModule::Draw)) )
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index f38a67e..d5cfa2a 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -40,6 +40,7 @@
 #include 
 
 #include 
+#include 
 
 #include "sderror.hxx"
 #include "sdmod.hxx"
@@ -77,7 +78,8 @@ SdModule::SdModule(SfxObjectFactory* pFact1, 
SfxObjectFactory* pFact2 )
 pNumberFormatter( nullptr ),
 bWaterCan(false),
 mpResourceContainer(new ::sd::SdGlobalResourceContainer()),
-mbEventListenerAdded(false)
+mbEventListenerAdded(false),
+mpColorConfig(new svtools::ColorConfig)
 {
 SetName( "StarDraw" );  // Do not translate!
 pSearchItem = new SvxSearchItem(SID_SEARCH_ITEM);
@@ -220,4 +222,9 @@ OutputDevice* SdModule::GetRefDevice (::sd::DrawDocShell& )
 return GetVirtualRefDevice();
 }
 
+svtools::ColorConfig& SdModule::GetColorConfig()
+{
+return *mpColorConfig;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/DrawViewShell.hxx 
b/sd/source/ui/inc/DrawViewShell.hxx
index 22b21d7..1068edb 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class Outliner;
 class SdPage;
@@ -65,7 +66,8 @@ class ViewOverlayManager;
 */
 class DrawViewShell
 : public ViewShell,
-  public SfxListener
+  public SfxListener,
+  public utl::ConfigurationListener
 {
 public:
 SFX_DECL_INTERFACE(SD_IF_SDDRAWVIEWSHELL)
@@ -361,8 +363,6 @@ public:
 
 OUString GetSidebarContextName() const;
 
-const Color& GetAppBackgroundColor() const { return mnAppBackgroundColor; }
-void SetAppBackgroundColor( Color nNewColor )  { mnAppBackgroundColor = 
nNewColor; }
 bool IsInSwitchPage() { return mbIsInSwitchPage; }
 
 //move this method to ViewShell.
@@ -489,6 +489,10 @@ private:
 
 std::vector> m_ExternalEdits;
 
+virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* pCb, 
sal_uInt32 ) override;
+
+void ConfigureAppBackgroundColor( svtools::ColorConfig* pColorConfig = 
nullptr );
+
 // The colour of the area behind the slide (used to be called "Wiese")
 Color mnAppBackgroundColor;
 };
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 84696ce..a521675 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -380,10 +380,7 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool 
bIsLayerModeActive)
 
GetViewShellBase().GetToolBarManager()->ResetToolBars(ToolBarManager::TBG_COMMON_TASK);
 }
 
-svtools::ColorConfig aColorConfig;
-Color aFillCol

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

2016-10-26 Thread Noel Grandin
 idl/inc/types.hxx|4 +---
 idl/source/objects/types.cxx |9 ++---
 2 files changed, 3 insertions(+), 10 deletions(-)

New commits:
commit 88ec5de1c950d5b9c32fb98054557436d2aa426d
Author: Noel Grandin 
Date:   Wed Oct 26 11:56:01 2016 +0200

expand SvMetaType::ReadNamesSvIdl

it just forwards to ReadNameSvIdl

Change-Id: I803edb7a5977cf309e2cedaa3b4764bcbd933597

diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 9768f8f..bcffc37 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -34,7 +34,7 @@ public:
 tools::SvRef aType;
 SvIdentifier aSlotId;
 SvMetaAttribute();
-SvMetaAttribute( SvMetaType * );
+SvMetaAttribute( SvMetaType * );
 
 voidSetSlotId( const SvIdentifier & rId )
 { aSlotId = rId; }
@@ -59,8 +59,6 @@ class SvMetaType : public SvMetaReference
 voidWriteSfxItem( const OString& rItemName, SvIdlDataBase 
& rBase,
   SvStream & rOutStm );
 protected:
-boolReadNamesSvIdl( SvTokenStream & rInStm );
-
 boolReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & 
rInStm );
 public:
 SvMetaType();
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 6a38caa..a7b913d 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -167,12 +167,12 @@ bool SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & ,
 if( rTok.Is( SvHash_interface() ) )
 {
 SetType( MetaTypeType::Interface );
-bOk = ReadNamesSvIdl( rInStm );
+bOk = ReadNameSvIdl( rInStm );
 }
 else if( rTok.Is( SvHash_shell() ) )
 {
 SetType( MetaTypeType::Shell );
-bOk = ReadNamesSvIdl( rInStm );
+bOk = ReadNameSvIdl( rInStm );
 }
 if( !bOk )
 rInStm.Seek( nTokPos );
@@ -190,11 +190,6 @@ bool SvMetaType::ReadSvIdl( SvIdlDataBase & rBase,
 return false;
 }
 
-bool SvMetaType::ReadNamesSvIdl( SvTokenStream & rInStm )
-{
-return ReadNameSvIdl( rInStm );
-}
-
 void SvMetaType::ReadContextSvIdl( SvIdlDataBase & rBase,
   SvTokenStream & rInStm )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes36' -

2016-10-26 Thread László Németh
 0 files changed

New commits:
commit 090328d22262887ea90cfefb6026fa821ac3f09d
Author: László Németh 
Date:   Wed Oct 26 12:30:06 2016 +0200

repeat (system restart, default cache and func)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Linux distro heads-up: Some files moved to URE

2016-10-26 Thread Stephan Bergmann
With 
 
"Move i18nlangtag lib to URELIB", some files have been moved from the 
libobasis-core to the libreoffice-ure package:


* the i18nlangtag lib
* the contents of external/liblangtag/ExternalPackage_liblangtag.mk 
(i.e., the langtag lib)
* the contents of external/liblangtag/ExternalPackage_liblangtag_data.mk 
(i.e., various XML files under share/liblangtag/)
* the contents of external/icu/ExternalPackage_icu_ure.mk (i.e., the 
icudata and icuuc libs; this split-out from 
external/icu/ExternalPackage_icu.mk previously only existed for WNT)


This is mostly a heads up for Linux distro packagers, who might need to 
adapt their packaging accordingly.


(Btw, for the files to reliably end up in the right package in an 
incremental build, at least "make scp2.clean" appears to be necessary, 
for whatever missing dependency.)

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


[Libreoffice-commits] core.git: 2 commits - include/rsc include/sfx2 rsc/inc rsc/source sc/inc sc/source sd/inc sd/source sfx2/source sw/inc sw/source

2016-10-26 Thread Caolán McNamara
 include/rsc/rscsfx.hxx|   20 ---
 include/sfx2/mgetempl.hxx |2 
 include/sfx2/module.hxx   |4 
 include/sfx2/sfx.hrc  |2 
 include/sfx2/styfitem.hxx |   47 +
 rsc/inc/rscclass.hxx  |4 
 rsc/inc/rscdb.hxx |8 -
 rsc/inc/rsctop.hxx|5 
 rsc/source/parser/rscicpx.cxx |   74 --
 rsc/source/parser/rscinit.cxx |   10 -
 rsc/source/parser/rscyacc.y   |  104 
 rsc/source/res/rscclass.cxx   |   10 -
 rsc/source/res/rsctop.cxx |   11 --
 sc/inc/sc.hrc |4 
 sc/inc/scmod.hxx  |1 
 sc/source/ui/app/scmod.cxx|   20 +++
 sc/source/ui/styleui/scstyles.src |   52 --
 sd/inc/sdmod.hxx  |1 
 sd/source/ui/app/res_bmp.src  |   58 ---
 sd/source/ui/app/sdmod2.cxx   |   21 
 sd/source/ui/app/strings.src  |4 
 sd/source/ui/inc/res_bmp.hrc  |7 -
 sd/source/ui/inc/strings.hrc  |   35 +++---
 sfx2/source/appl/module.cxx   |   14 --
 sfx2/source/dialog/mgetempl.cxx   |   18 +--
 sfx2/source/dialog/styfitem.cxx   |  148 +---
 sfx2/source/dialog/templdlg.cxx   |   50 -
 sfx2/source/inc/templdgi.hxx  |6 -
 sw/inc/swmodule.hxx   |1 
 sw/source/ui/app/app.src  |  195 --
 sw/source/ui/chrdlg/swuiccoll.cxx |   30 ++---
 sw/source/uibase/app/swmodule.cxx |   39 +++
 sw/source/uibase/inc/app.hrc  |   16 ++-
 33 files changed, 349 insertions(+), 672 deletions(-)

New commits:
commit 8efdf567de92d05ccfb1305228686287e7bca9e8
Author: Caolán McNamara 
Date:   Wed Oct 26 11:34:20 2016 +0100

drop now unused SfxStyleItem, etc.

Change-Id: I61227079c376299d17250970b19acb0c415034fb

diff --git a/include/rsc/rscsfx.hxx b/include/rsc/rscsfx.hxx
index dadf191..1a4cea5 100644
--- a/include/rsc/rscsfx.hxx
+++ b/include/rsc/rscsfx.hxx
@@ -19,13 +19,7 @@
 #ifndef INCLUDED_RSC_RSCSFX_HXX
 #define INCLUDED_RSC_RSCSFX_HXX
 
-// StarView (RSC_NOTYPE) bis (RSC_NOTYPE + 0x190)
-// Sfx  (RSC_NOTYPE + 0x200) bis (RSC_NOTYPE + 0x20F)
-#define RSC_SFX_STYLE_FAMILIES (0x100 + 0x201)
-#define RSC_SFX_STYLE_FAMILY_ITEM  (0x100 + 0x202)
 #define RSC_SFX_SLOT_INFO  (0x100 + 0x203)
-// StarMoney(RSC_NOTYPE + 0x210) bis (RSC_NOTYPE + 0x22F)
-// Public   (RSC_NOTYPE + 0x300) bis (RSC_NOTYPE + 0x3FF)
 
 //== S F X ===
 // This is used as a flags enum in sw/, but only there,
@@ -42,26 +36,12 @@ enum class SfxStyleFamily {
 All = 0x7fff
 };
 
-
-// SfxTemplate
-enum class SfxStyleItem {
-None = 0x00,
-List = 0x01,
-Bitmap   = 0x02,
-Text = 0x04,
-HelpText = 0x08,
-StyleFamily  = 0x10,
-Image= 0x20
-};
-
-
 // SfxSlotInfo
 enum class SfxSlotInfo {
 SlotName  = 0x1,
 HelpText  = 0x2
 };
 
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/rsc/inc/rscclass.hxx b/rsc/inc/rscclass.hxx
index ef0295b..c34ac7f 100644
--- a/rsc/inc/rscclass.hxx
+++ b/rsc/inc/rscclass.hxx
@@ -64,10 +64,6 @@ public:
 voidPre_dtor() override;
 ERRTYPE SetVariable( Atom nVarName, RscTop * pClass,
  RSCINST * pDflt,
- RSCVAR nVarType, SfxStyleItem nMask,
- Atom nDataBaseName = InvalidAtom ) override;
-ERRTYPE SetVariable( Atom nVarName, RscTop * pClass,
- RSCINST * pDflt,
  RSCVAR nVarType, SfxSlotInfo nMask,
  Atom nDataBaseName = InvalidAtom ) override;
 ERRTYPE SetVariable( Atom nVarName, RscTop * pClass,
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 9368634..cc5ad46 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -38,7 +38,6 @@ class RscCont;
 class RscCmdLine;
 enum class KeyFuncType : sal_Int32;
 enum class MenuItemBits : sal_Int16;
-enum class SfxStyleFamily;
 enum class MapUnit;
 
 struct WriteRcContext
@@ -84,7 +83,6 @@ class RscTypCont
 voidSETCONST( RscConst *, Atom, sal_uInt32 );
 inline void SETCONST( RscConst *p1, const char * p2, KeyFuncType p3 ) { 
SETCONST(p1, p2, static_cast(p3)); }
 inline void SETCONST( RscConst *p1, Atom p2, MenuItemBits p3 ) { 
SETCONST(p1, p2, static_cast(p3)); }
-inline void SETCONST( RscConst *p1, const char * p2, SfxStyleFamily p3 ) { 
SETCONST(p1, p2, static_cast(p3)); }
 inline void SETCONST( RscConst *p1, const char * p2, MapUnit p3 ) { 
SETCONST(p1, p2, static_cast(p3)); }
 RscEnum *   InitFieldUnitsType();
 RscEnum *   InitColor();
@@ -111,12 +109,6 @@ class RscTypCont
 RscTop *InitClassMenuItem( RscTop * pSuper );
 RscTop *InitClassMenu( RscTop * pSup

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

2016-10-26 Thread Stephan Bergmann
 sc/inc/formulalogger.hxx |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 532847746f7151905ad3a78baf6e175030b6a8ff
Author: Stephan Bergmann 
Date:   Wed Oct 26 13:03:40 2016 +0200

Better way to silence loplugin:staticmethods

...in this !ENABLE_FORMULA_LOGGER dummy implementation

Change-Id: Ifaf3356ada68d70164644f89fc6dc6d66f22024b

diff --git a/sc/inc/formulalogger.hxx b/sc/inc/formulalogger.hxx
index 10a0155..0925d30 100644
--- a/sc/inc/formulalogger.hxx
+++ b/sc/inc/formulalogger.hxx
@@ -95,7 +95,6 @@ public:
  */
 class FormulaLogger
 {
-bool mbState = false; // Just to avoid loplugin:staticmethods
 public:
 
 static FormulaLogger get()
@@ -105,15 +104,14 @@ public:
 
 class GroupScope
 {
-bool mbState = false; // Just to avoid loplugin:staticmethods
 public:
-void addMessage( const OUString& /*rMsg*/ ) { mbState = !mbState; }
-void setCalcComplete() { mbState = !mbState; }
+void addMessage( const OUString& /*rMsg*/ ) { (void) this; /* 
loplugin:staticmethods */ }
+void setCalcComplete() { (void) this; /* loplugin:staticmethods */ }
 };
 
 GroupScope enterGroup( const ScDocument& /*rDoc*/, const ScFormulaCell& 
/*rCell*/ )
 {
-mbState = !mbState;
+(void) this; /* loplugin:staticmethods */
 return GroupScope();
 }
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Michael Stahl
 sw/source/filter/ww8/wrtw8sty.cxx |   15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 1bfa382b4af649ff2b56b988d89bada156e29078
Author: Michael Stahl 
Date:   Tue Oct 25 17:35:59 2016 +0200

tdf#101814 sw: MSWord export: don't override first-page with heuristics

Revert commit dcea8ba3b4fc347e7b6d9e0d5ec2fd99bd77ce6f, and do the
opposite.  The added "titlePage" check makes no sense, because in that
case there is already an explicit first-page style in the PageDesc, and
overriding that cannot be right.

The test added in that commit still succeeds, which suggests that the
root cause of that bug was elsewhere and was fixed in the meantime.

Change-Id: I9b21b6dc115be28cb0ee3360615c538d4cfee3cb
(cherry picked from commit 36e390eaa55ae302dc5a64fa7098ec43e2009748)
Reviewed-on: https://gerrit.libreoffice.org/30276
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/filter/ww8/wrtw8sty.cxx 
b/sw/source/filter/ww8/wrtw8sty.cxx
index bc52d44..d16c9fd 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1624,18 +1624,19 @@ void MSWordExportBase::SectionProperties( const 
WW8_SepInfo& rSepInfo, WW8_PdAtt
 {
 // if a Follow is set and it does not point to itself,
 // then there is a page chain.
-// Falls damit eine "Erste Seite" simuliert werden soll, so
-// koennen wir das auch als solches schreiben.
-// Anders sieht es mit Links/Rechts wechseln aus. Dafuer muss
-// erkannt werden, wo der Seitenwechsel statt findet. Hier ist
-// es aber dafuer zuspaet!
-if ( pPd->GetFollow() && pPd != pPd->GetFollow() &&
+// If this emulates a "first page", we can detect it here and write
+// it as title page.
+// With Left/Right changes it's different - we have to detect where
+// the change of pages is, but here it's too late for that!
+// tdf#101814 if there is already a explicit first-page, no point
+// in checking heuristics here.
+if ( !titlePage && pPd->GetFollow() && pPd != pPd->GetFollow() &&
  pPd->GetFollow()->GetFollow() == pPd->GetFollow() &&
  ( !rSepInfo.pPDNd || pPd->IsFollowNextPageOfNode( *rSepInfo.pPDNd 
) ) )
 {
 const SwPageDesc *pFollow = pPd->GetFollow();
 const SwFrameFormat& rFollowFormat = pFollow->GetMaster();
-if ( sw::util::IsPlausableSingleWordSection( *pPdFirstPgFormat, 
rFollowFormat ) || titlePage )
+if (sw::util::IsPlausableSingleWordSection(*pPdFirstPgFormat, 
rFollowFormat))
 {
 if (rSepInfo.pPDNd)
 pPdFirstPgFormat = pPd->GetPageFormatOfNode( 
*rSepInfo.pPDNd );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Eike Rathke
 sc/inc/externalrefmgr.hxx|3 +++
 sc/source/filter/oox/formulabuffer.cxx   |4 
 sc/source/ui/docshell/externalrefmgr.cxx |   12 
 3 files changed, 19 insertions(+)

New commits:
commit ef4051a295b76a5398e6c4a64bc0f8e1322291c7
Author: Eike Rathke 
Date:   Tue Oct 25 19:41:30 2016 +0200

Resolves: tdf#79442 in OOXML import add external files to LinkManager

Now that we store formula results without recalculating, the implicit
logic that adds files of external references to the LinkManager is not
triggered, explicitly force it during import.

Change-Id: Id867d2fa2b39841fb4c8e90941814457c8db431d
(cherry picked from commit 8464ea6961b9cc54af9c11cce1b80ed7e0cc77e2)
Reviewed-on: https://gerrit.libreoffice.org/30277
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index b9d1394..9577f9a 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -724,6 +724,9 @@ public:
 
 void enableDocTimer( bool bEnable );
 
+/** Add all known external files to the LinkManager. */
+void addFilesToLinkManager();
+
 private:
 ScExternalRefManager(const ScExternalRefManager&) = delete;
 
diff --git a/sc/source/filter/oox/formulabuffer.cxx 
b/sc/source/filter/oox/formulabuffer.cxx
index 14e3f45..d7a574e 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -435,6 +435,10 @@ void FormulaBuffer::finalizeImport()
 }
 }
 
+// With formula results being set and not recalculated we need to
+// force-trigger adding all linked external files to the LinkManager.
+rDoc.getDoc().GetExternalRefManager()->addFilesToLinkManager();
+
 rDoc.getDoc().SetAutoNameCache(nullptr);
 
 xFormulaBar->setPosition( 1.0 );
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx 
b/sc/source/ui/docshell/externalrefmgr.cxx
index dac47e5..59863f6 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2645,6 +2645,18 @@ void 
ScExternalRefManager::maybeLinkExternalFile(sal_uInt16 nFileId)
 maLinkedDocs.insert(LinkedDocMap::value_type(nFileId, true));
 }
 
+void ScExternalRefManager::addFilesToLinkManager()
+{
+if (maSrcFiles.empty())
+return;
+
+SAL_WARN_IF( maSrcFiles.size() >= SAL_MAX_UINT16,
+"sc.ui", "ScExternalRefManager::addFilesToLinkManager: files 
overflow");
+const sal_uInt16 nSize = static_cast( std::max( 
maSrcFiles.size(), SAL_MAX_UINT16));
+for (sal_uInt16 nFileId = 0; nFileId < nSize; ++nFileId)
+maybeLinkExternalFile( nFileId);
+}
+
 void ScExternalRefManager::SrcFileData::maybeCreateRealFileName(const 
OUString& rOwnDocName)
 {
 if (maRelativeName.isEmpty())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Winfried Donkers
 formula/source/core/api/token.cxx |   24 
 1 file changed, 20 insertions(+), 4 deletions(-)

New commits:
commit 1276e95193a714391c78120aadb0d347432eb35f
Author: Winfried Donkers 
Date:   Tue Oct 18 16:30:19 2016 +0200

tdf#103088, improve interoperability with Excel for LOGNORMDIST().

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

diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index 409c417..f910d71 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1525,14 +1525,30 @@ FormulaTokenArray * FormulaTokenArray::RewriteMissing( 
const MissingConvention &
 }
 if (bAdd)
 {
-if ( ( pCur->GetOpCode() == ocCeil || pCur->GetOpCode() == ocFloor 
) &&
+OpCode eOp = pCur->GetOpCode();
+if ( ( eOp == ocCeil || eOp == ocFloor ||
+   ( eOp == ocLogNormDist && pCur->GetByte() == 4 ) ) &&
  rConv.getConvention() == 
MissingConvention::FORMULA_MISSING_CONVENTION_OOXML )
 {
-FormulaToken *pToken = new FormulaToken( svByte,
-( pCur->GetOpCode() == ocCeil ? ocCeil_Math : 
ocFloor_Math ) );
+switch ( eOp )
+{
+case ocCeil :
+eOp = ocCeil_Math;
+break;
+case ocFloor :
+eOp = ocFloor_Math;
+break;
+case ocLogNormDist :
+eOp = ocLogNormDist_MS;
+break;
+default :
+eOp = ocNone;
+break;
+}
+FormulaToken *pToken = new FormulaToken( svByte, eOp );
 pNewArr->Add( pToken );
 }
-else if ( pCur->GetOpCode() == ocHypGeomDist &&
+else if ( eOp == ocHypGeomDist &&
   rConv.getConvention() == 
MissingConvention::FORMULA_MISSING_CONVENTION_OOXML )
 {
 FormulaToken *pToken = new FormulaToken( svByte, 
ocHypGeomDist_MS );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Miklos Vajna
 include/svl/grabbagitem.hxx|1 -
 starmath/source/wordexportbase.cxx |4 +---
 svl/source/items/grabbagitem.cxx   |   15 ++-
 3 files changed, 3 insertions(+), 17 deletions(-)

New commits:
commit 36c4fd5c3310029e00cb6479962623f5fd2d8cd6
Author: Miklos Vajna 
Date:   Wed Oct 26 09:06:51 2016 +0200

svl: the compiler can generate the same SfxGrabBagItem copy ctor itself

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

diff --git a/include/svl/grabbagitem.hxx b/include/svl/grabbagitem.hxx
index 38c49b8..ca49a27 100644
--- a/include/svl/grabbagitem.hxx
+++ b/include/svl/grabbagitem.hxx
@@ -25,7 +25,6 @@ public:
 
 SfxGrabBagItem();
 SfxGrabBagItem(sal_uInt16 nWhich);
-SfxGrabBagItem(const SfxGrabBagItem& rItem);
 virtual ~SfxGrabBagItem() override;
 
 const std::map& GetGrabBag() const
diff --git a/starmath/source/wordexportbase.cxx 
b/starmath/source/wordexportbase.cxx
index ea38df8..61c1d97 100644
--- a/starmath/source/wordexportbase.cxx
+++ b/starmath/source/wordexportbase.cxx
@@ -15,9 +15,7 @@ SmWordExportBase::SmWordExportBase(const SmNode* pIn)
 {
 }
 
-SmWordExportBase::~SmWordExportBase()
-{
-}
+SmWordExportBase::~SmWordExportBase() = default;
 
 void SmWordExportBase::HandleNode(const SmNode* pNode, int nLevel)
 {
diff --git a/svl/source/items/grabbagitem.cxx b/svl/source/items/grabbagitem.cxx
index 30f583e..082c422 100644
--- a/svl/source/items/grabbagitem.cxx
+++ b/svl/source/items/grabbagitem.cxx
@@ -17,25 +17,14 @@
 
 using namespace com::sun::star;
 
-SfxGrabBagItem::SfxGrabBagItem()
-{
-}
+SfxGrabBagItem::SfxGrabBagItem() = default;
 
 SfxGrabBagItem::SfxGrabBagItem(sal_uInt16 nWhich) :
 SfxPoolItem(nWhich)
 {
 }
 
-SfxGrabBagItem::SfxGrabBagItem(const SfxGrabBagItem& rItem) :
-SfxPoolItem(rItem),
-m_aMap(rItem.m_aMap)
-{
-}
-
-SfxGrabBagItem::~SfxGrabBagItem()
-{
-}
-
+SfxGrabBagItem::~SfxGrabBagItem() = default;
 
 bool SfxGrabBagItem::operator==(const SfxPoolItem& rItem) const
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Caolán McNamara
 filter/source/msfilter/mscodec.cxx|  200 
 include/filter/msfilter/mscodec.hxx   |  213 --
 include/oox/crypto/CryptTools.hxx |3 
 include/oox/crypto/Standard2007Engine.hxx |   68 -
 oox/source/crypto/CryptTools.cxx  |   14 -
 oox/source/crypto/DocumentDecryption.cxx  |   22 +--
 oox/source/crypto/Standard2007Engine.cxx  |   67 +++--
 sc/source/filter/excel/xicontent.cxx  |  106 +++---
 sc/source/filter/excel/xistream.cxx   |   70 ++---
 sc/source/filter/inc/xistream.hxx |   67 +++--
 sc/source/filter/inc/xlcontent.hxx|2 
 11 files changed, 544 insertions(+), 288 deletions(-)

New commits:
commit a5ee76c9740836397a250174dc171b36a1c5a958
Author: Caolán McNamara 
Date:   Thu Oct 20 11:19:58 2016 +0100

implement CryptoAPI RC4+SHA1 encryption scheme for xls import

there might be other variants out there in practice, but this
works for default encrypted xls of excel 2013

(cherry picked from commit 1473ce030314027c01c98f513407ed0897328585)

contains...

be more c++y

Change-Id: I673b00e111a734bc626ba3d3f6ecf9692f1ce7db
(cherry picked from commit fcf7f503b64b2cf7dbef019fb43dde033e3538e8)

hash len is 20 for xls cryptoapi configuration

Change-Id: I6e06b8578959b8147043179db57e875b1d98d57d
(cherry picked from commit 491884350ce74f36044b3348bd66356ad1c234af)

clarify hash lengths a bit more

Change-Id: I66cea4b9efb82d29e6c052ac11a6f2eaca823ce0
(cherry picked from commit 8db1b13e721683d0263925c8e0300dd86a022814)

hash len isn't going to change depending on who implements it

Change-Id: Iee585cba4acad74c11d083085153e2af96c8894f
(cherry picked from commit fcc846e8f29839eaace7e1d28746abea8f4b598a)

move some useful header information to mscodec for reuse

Change-Id: Ic7adf3ed3c8279cc93a06975d6fb337210d1af87
(cherry picked from commit fc514cbf30be1613fdf4d4b7c12cbd55ca08b9b0)

rework things in light of now available documentation

Change-Id: If5f75e27191017a8c6a3929e2a70d21840f157c6
(cherry picked from commit 3fabbd0a22219464545f933fc28c869a6fa89546)

split MSCodec_Std97 into a baseclass MSCodec97

(cherry picked from commit 06916c839b16866b47235306d2db50850df0ad7c)

Change-Id: Ia3c41a048169c78684800def94e53fc9f3201e30

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

diff --git a/filter/source/msfilter/mscodec.cxx 
b/filter/source/msfilter/mscodec.cxx
index b6ac169..a8c8677 100644
--- a/filter/source/msfilter/mscodec.cxx
+++ b/filter/source/msfilter/mscodec.cxx
@@ -245,27 +245,37 @@ void MSCodec_Xor95::Skip( sal_Size nBytes )
 mnOffset = (mnOffset + nBytes) & 0x0F;
 }
 
+MSCodec97::MSCodec97(size_t nHashLen)
+: m_nHashLen(nHashLen)
+, m_hCipher(rtl_cipher_create(rtl_Cipher_AlgorithmARCFOUR, 
rtl_Cipher_ModeStream))
+, m_aDigestValue(nHashLen, 0)
+{
+assert(m_hCipher != nullptr);
+(void)memset (m_pDocId, 0, sizeof(m_pDocId));
+}
 
-MSCodec_Std97::MSCodec_Std97 ()
+MSCodec_Std97::MSCodec_Std97()
+: MSCodec97(RTL_DIGEST_LENGTH_MD5)
 {
-m_hCipher = rtl_cipher_create (
-rtl_Cipher_AlgorithmARCFOUR, rtl_Cipher_ModeStream);
-OSL_ASSERT(m_hCipher != nullptr);
+m_hDigest = rtl_digest_create(rtl_Digest_AlgorithmMD5);
+assert(m_hDigest != nullptr);
+}
 
-m_hDigest = rtl_digest_create (
-rtl_Digest_AlgorithmMD5);
-OSL_ASSERT(m_hDigest != nullptr);
+MSCodec_CryptoAPI::MSCodec_CryptoAPI()
+: MSCodec97(RTL_DIGEST_LENGTH_SHA1)
+{
+}
 
-(void)memset (m_pDigestValue, 0, sizeof(m_pDigestValue));
-(void)memset (m_pDocId, 0, sizeof(m_pDocId));
+MSCodec97::~MSCodec97()
+{
+(void)memset(m_aDigestValue.data(), 0, m_aDigestValue.size());
+(void)memset(m_pDocId, 0, sizeof(m_pDocId));
+rtl_cipher_destroy(m_hCipher);
 }
 
-MSCodec_Std97::~MSCodec_Std97 ()
+MSCodec_Std97::~MSCodec_Std97()
 {
-(void)memset (m_pDigestValue, 0, sizeof(m_pDigestValue));
-(void)memset (m_pDocId, 0, sizeof(m_pDocId));
-rtl_digest_destroy (m_hDigest);
-rtl_cipher_destroy (m_hCipher);
+rtl_digest_destroy(m_hDigest);
 }
 
 #if DEBUG_MSO_ENCRYPTION_STD97
@@ -282,7 +292,7 @@ static inline void lcl_PrintDigest(const sal_uInt8* 
/*pDigest*/, const char* /*m
 }
 #endif
 
-bool MSCodec_Std97::InitCodec( const uno::Sequence< beans::NamedValue >& aData 
)
+bool MSCodec97::InitCodec( const uno::Sequence< beans::NamedValue >& aData )
 {
 #if DEBUG_MSO_ENCRYPTION_STD97
 fprintf(stdout, "MSCodec_Std97::InitCodec: --begin\n");fflush(stdout);
@@ -291,16 +301,17 @@ bool MSCodec_Std97::InitCodec( const uno::Sequence< 
beans::NamedValue >& aData )
 
 ::comphelper::SequenceAsHashMap aHashData( aData );
 uno::Sequence< sal_Int8 > a

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

2016-10-26 Thread Caolán McNamara
 sc/source/filter/excel/xicontent.cxx |2 
 sw/source/filter/ww8/ww8par.cxx  |  110 ---
 2 files changed, 92 insertions(+), 20 deletions(-)

New commits:
commit f13e6133fe0127734fcd4c8be2b1a526e4749656
Author: Caolán McNamara 
Date:   Sat Oct 22 20:38:19 2016 +0100

implement CryptoAPI RC4+SHA1 encryption scheme for doc import

there might be other variants out there in practice, but this
works for default encrypted doc of word 2013

(cherry picked from commit 4f07175cd03bf0fa42992a06d51aed5b421adcf2)

contains...

rework things in light of now available documentation

(cherry picked from commit 6ac3fb584409912d7a4e944a643bc9180bc03015)

Change-Id: I995a0437d4001d63e1c3a821e00c05a2af429356
68c1d9489292e63f709bfbc990ffa5ad7d0f827a
Reviewed-on: https://gerrit.libreoffice.org/30168
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/sc/source/filter/excel/xicontent.cxx 
b/sc/source/filter/excel/xicontent.cxx
index dc2423f..05a142d 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -1153,7 +1153,7 @@ XclImpDecrypterRef lclReadFilepass8_Strong(XclImpStream& 
rStream)
 rStream.Ignore(nHeaderSize - actualHeaderSize);
 
 info.verifier.saltSize = rStream.ReaduInt32();
-if (info.verifier.saltSize != 16)
+if (info.verifier.saltSize != msfilter::SALT_LENGTH)
 return xDecr;
 rStream.Read(&info.verifier.salt, sizeof(info.verifier.salt));
 rStream.Read(&info.verifier.encryptedVerifier, 
sizeof(info.verifier.encryptedVerifier));
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 48ad5d0..325a842 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5477,7 +5477,7 @@ namespace
 
 #define WW_BLOCKSIZE 0x200
 
-void DecryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream 
&rOut)
+void DecryptRC4(msfilter::MSCodec97& rCtx, SvStream &rIn, SvStream &rOut)
 {
 rIn.Seek(STREAM_SEEK_TO_END);
 const sal_Size nLen = rIn.Tell();
@@ -5611,7 +5611,7 @@ namespace
 return aEncryptionData;
 }
 
-uno::Sequence< beans::NamedValue > InitStd97Codec( 
::msfilter::MSCodec_Std97& rCodec, sal_uInt8 pDocId[16], SfxMedium& rMedium )
+uno::Sequence< beans::NamedValue > Init97Codec(msfilter::MSCodec97& 
rCodec, sal_uInt8 pDocId[16], SfxMedium& rMedium)
 {
 uno::Sequence< beans::NamedValue > aEncryptionData;
 const SfxUnoAnyItem* pEncryptionData = 
SfxItemSet::GetItem(rMedium.GetItemSet(), SID_ENCRYPTIONDATA, 
false);
@@ -5639,6 +5639,63 @@ namespace
 }
 }
 
+//TO-DO: merge this with lclReadFilepass8_Strong in sc which uses a different
+//stream thing
+static bool lclReadCryptoAPIHeader(msfilter::RC4EncryptionInfo &info, SvStream 
&rStream)
+{
+//Its possible there are other variants in existance but these
+//are the defaults I get with Word 2013
+
+rStream.ReadUInt32(info.header.flags);
+if (oox::getFlag( info.header.flags, msfilter::ENCRYPTINFO_EXTERNAL))
+return false;
+
+sal_uInt32 nHeaderSize(0);
+rStream.ReadUInt32(nHeaderSize);
+sal_uInt32 actualHeaderSize = sizeof(info.header);
+
+if (nHeaderSize < actualHeaderSize)
+return false;
+
+rStream.ReadUInt32(info.header.flags);
+rStream.ReadUInt32(info.header.sizeExtra);
+rStream.ReadUInt32(info.header.algId);
+rStream.ReadUInt32(info.header.algIdHash);
+rStream.ReadUInt32(info.header.keyBits);
+rStream.ReadUInt32(info.header.providedType);
+rStream.ReadUInt32(info.header.reserved1);
+rStream.ReadUInt32(info.header.reserved2);
+
+rStream.SeekRel(nHeaderSize - actualHeaderSize);
+
+rStream.ReadUInt32(info.verifier.saltSize);
+if (info.verifier.saltSize != msfilter::SALT_LENGTH)
+return false;
+rStream.Read(&info.verifier.salt, sizeof(info.verifier.salt));
+rStream.Read(&info.verifier.encryptedVerifier, 
sizeof(info.verifier.encryptedVerifier));
+
+rStream.ReadUInt32(info.verifier.encryptedVerifierHashSize);
+if (info.verifier.encryptedVerifierHashSize != RTL_DIGEST_LENGTH_SHA1)
+return false;
+rStream.Read(&info.verifier.encryptedVerifierHash, 
info.verifier.encryptedVerifierHashSize);
+
+// check flags and algorithm IDs, required are AES128 and SHA-1
+if (!oox::getFlag(info.header.flags, msfilter::ENCRYPTINFO_CRYPTOAPI))
+return false;
+
+if (oox::getFlag(info.header.flags, msfilter::ENCRYPTINFO_AES))
+return false;
+
+if (info.header.algId != msfilter::ENCRYPT_ALGO_RC4)
+return false;
+
+// hash algorithm ID 0 defaults to SHA-1 too
+if (info.header.algIdHash != 0 && info.header.algIdHash != 
msfilter::ENCRYPT_HASH_SHA1)
+return false;
+
+return true;
+}
+
 sal_uLong SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss)
 {
 sal_uLong nErrRet = 0;
@@ -5663,7 +5720,7

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

2016-10-26 Thread Stephan Bergmann
 ucb/qa/cppunit/webdav/webdav_options.cxx |4 ++--
 ucb/source/ucp/webdav-neon/DAVTypes.hxx  |   26 +-
 2 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 95cfef300eb1a32d700479d2cefddc3fc4d0b37c
Author: Stephan Bergmann 
Date:   Wed Oct 26 13:57:05 2016 +0200

const-ness fixes

Change-Id: I83858c0cbca0fc493ac506e2b839e43310f3bb2f

diff --git a/ucb/qa/cppunit/webdav/webdav_options.cxx 
b/ucb/qa/cppunit/webdav/webdav_options.cxx
index b1a71ba..9bdc1c5 100644
--- a/ucb/qa/cppunit/webdav/webdav_options.cxx
+++ b/ucb/qa/cppunit/webdav/webdav_options.cxx
@@ -27,7 +27,7 @@ namespace
 
 void tearDown(  ) override;
 
-void DAVTypesCheckInit( webdav_ucp::DAVOptions& aDavType );
+void DAVTypesCheckInit( webdav_ucp::DAVOptions const & aDavType );
 void DAVTypesTest();
 
 void DAVOptsCacheTests();
@@ -51,7 +51,7 @@ namespace
 {
 }
 
-void webdav_opts_test::DAVTypesCheckInit( webdav_ucp::DAVOptions& aDavType 
)
+void webdav_opts_test::DAVTypesCheckInit( webdav_ucp::DAVOptions const & 
aDavType )
 {
 // check if the class is at reset state
 // using accessors
diff --git a/ucb/source/ucp/webdav-neon/DAVTypes.hxx 
b/ucb/source/ucp/webdav-neon/DAVTypes.hxx
index 2356ab1..68ac37e 100644
--- a/ucb/source/ucp/webdav-neon/DAVTypes.hxx
+++ b/ucb/source/ucp/webdav-neon/DAVTypes.hxx
@@ -105,41 +105,41 @@ namespace webdav_ucp
 
 virtual ~DAVOptions();
 
-bool isClass1() { return m_isClass1; };
+bool isClass1() const { return m_isClass1; };
 void setClass1( bool Class1 = true ) { m_isClass1 = Class1; };
 
-bool isClass2() { return m_isClass2; };
+bool isClass2() const { return m_isClass2; };
 void setClass2( bool Class2 = true ) { m_isClass2 = Class2; };
 
-bool isClass3() { return m_isClass3; };
+bool isClass3() const { return m_isClass3; };
 void setClass3( bool Class3 = true ) { m_isClass3 = Class3; };
 
-bool isHeadAllowed() { return m_isHeadAllowed; };
+bool isHeadAllowed() const { return m_isHeadAllowed; };
 void setHeadAllowed( bool HeadAllowed = true ) { m_isHeadAllowed = 
HeadAllowed; };
 
-sal_uInt32 getStaleTime() { return m_nStaleTime ; };
+sal_uInt32 getStaleTime() const { return m_nStaleTime ; };
 void setStaleTime( const sal_uInt32 nStaleTime ) { m_nStaleTime = 
nStaleTime; };
 
-sal_uInt32 getRequestedTimeLife() { return m_nRequestedTimeLife; };
+sal_uInt32 getRequestedTimeLife() const { return m_nRequestedTimeLife; 
};
 void setRequestedTimeLife( const sal_uInt32 nRequestedTimeLife ) { 
m_nRequestedTimeLife = nRequestedTimeLife; };
 
-const OUString & getURL() { return m_sURL; };
+const OUString & getURL() const { return m_sURL; };
 void setURL( const OUString & sURL ) { m_sURL = sURL; };
 
-const OUString & getRedirectedURL() { return m_sRedirectedURL; };
+const OUString & getRedirectedURL() const { return m_sRedirectedURL; };
 void setRedirectedURL( const OUString & sRedirectedURL ) { 
m_sRedirectedURL = sRedirectedURL; };
 
 void  setAllowedMethods( const OUString & aAllowedMethods ) { 
m_aAllowedMethods = aAllowedMethods; } ;
-const OUString & getAllowedMethods() { return m_aAllowedMethods; } ;
-bool isLockAllowed() { return ( m_aAllowedMethods.indexOf( "LOCK" ) != 
-1 ); };
+const OUString & getAllowedMethods() const { return m_aAllowedMethods; 
} ;
+bool isLockAllowed() const { return ( m_aAllowedMethods.indexOf( 
"LOCK" ) != -1 ); };
 
 void setLocked( bool locked = true ) { m_isLocked = locked; } ;
-bool isLocked() { return m_isLocked; };
+bool isLocked() const { return m_isLocked; };
 
-sal_uInt16 getHttpResponseStatusCode() { return 
m_nHttpResponseStatusCode; };
+sal_uInt16 getHttpResponseStatusCode() const { return 
m_nHttpResponseStatusCode; };
 void setHttpResponseStatusCode( const sal_uInt16 
nHttpResponseStatusCode ) { m_nHttpResponseStatusCode = 
nHttpResponseStatusCode; };
 
-const OUString & getHttpResponseStatusText() { return 
m_sHttpResponseStatusText; };
+const OUString & getHttpResponseStatusText() const { return 
m_sHttpResponseStatusText; };
 void setHttpResponseStatusText( const OUString & 
rHttpResponseStatusText ) { m_sHttpResponseStatusText = 
rHttpResponseStatusText; };
 
 void init() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Giuseppe Castagno
 external/nss/ExternalProject_nss.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit da5d20562479174504c3795aa9e7ca0856883e81
Author: Giuseppe Castagno 
Date:   Thu Oct 13 11:10:00 2016 +0200

Linux: Build NSS in debug mode only in '--enable-dbgutil' mode.

With this commit, NSS debug mode is enabled only if you compile
with --enable-dbgutil using ./autogen.sh command.

Only for the Linux platform builds.

Change-Id: Ia8626f36692fd38e8b1dbd774e4bc0ccedc59072
Reviewed-on: https://gerrit.libreoffice.org/29781
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 
Reviewed-by: Michael Stahl 

diff --git a/external/nss/ExternalProject_nss.mk 
b/external/nss/ExternalProject_nss.mk
index 258e845..07cc472 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -67,6 +67,7 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call 
gb_ExternalProject
$(if $(filter MACOSX,$(OS)),\
$(if $(filter-out 
POWERPC,$(CPUNAME)),MACOS_SDK_DIR=$(MACOSX_SDK_PATH)) \
NSS_USE_SYSTEM_SQLITE=1) \
+   $(if $(filter LINUX,$(OS)),$(if 
$(ENABLE_DBGUTIL),,BUILD_OPT=1)) \
$(if $(filter SOLARIS,$(OS)),NS_USE_GCC=1) \
$(if $(CROSS_COMPILING),\
$(if $(filter 
MACOSXPOWERPC,$(OS)$(CPUNAME)),CPU_ARCH=ppc) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Miklos Vajna
 xmlsecurity/inc/pdfio/pdfdocument.hxx|   10 +
 xmlsecurity/source/pdfio/pdfdocument.cxx |  224 +++
 2 files changed, 147 insertions(+), 87 deletions(-)

New commits:
commit a324099538916eae7f7239d32fd98ec8018cbb72
Author: Miklos Vajna 
Date:   Wed Oct 26 11:59:39 2016 +0200

xmlsecurity PDF signing: only write incremental xref in an incremental 
update

We used to just dump all the object offsets in the xref of the
incremental update, but Adobe Acrobat doesn't like that, and considers
that a second signature invalidates the first. If we properly only
mention new and changed objects in the xref, then this doesn't happen.

This requires actually parsing incremental updates, the previous code
depended on LO writing not-really-incremental xrefs at the end of
incremental updates.

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

diff --git a/xmlsecurity/inc/pdfio/pdfdocument.hxx 
b/xmlsecurity/inc/pdfio/pdfdocument.hxx
index 3886eab..59c7f5d 100644
--- a/xmlsecurity/inc/pdfio/pdfdocument.hxx
+++ b/xmlsecurity/inc/pdfio/pdfdocument.hxx
@@ -11,6 +11,7 @@
 #ifndef INCLUDED_XMLSECURITY_INC_PDFIO_PDFDOCUMENT_HXX
 #define INCLUDED_XMLSECURITY_INC_PDFIO_PDFDOCUMENT_HXX
 
+#include 
 #include 
 
 #include 
@@ -48,8 +49,10 @@ class XMLSECURITY_DLLPUBLIC PDFDocument
 {
 /// This vector owns all elements.
 std::vector< std::unique_ptr > m_aElements;
-// List of object offsets we know.
-std::vector m_aXRef;
+/// Object ID <-> object offset map.
+std::map m_aXRef;
+/// Object ID <-> "are changed as part of an incremental update?" map.
+std::map m_aXRefDirty;
 /// List of xref offsets we know.
 std::vector m_aStartXRefs;
 /// List of EOF offsets we know.
@@ -61,6 +64,8 @@ class XMLSECURITY_DLLPUBLIC PDFDocument
 static int AsHex(char ch);
 /// Decode a hex dump.
 static std::vector DecodeHexString(PDFHexStringElement* 
pElement);
+/// Tokenize elements from current offset, optionally only till the next 
EOF.
+bool Tokenize(SvStream& rStream, bool bPartial);
 
 public:
 PDFDocument();
@@ -76,6 +81,7 @@ public:
 /// Remember the end location of an EOF token.
 void PushBackEOF(size_t nOffset);
 
+/// Read elements from the start of the stream till its end.
 bool Read(SvStream& rStream);
 /// Sign the read document with xCertificate in the edit buffer.
 bool Sign(const css::uno::Reference& 
xCertificate, const OUString& rDescription);
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx 
b/xmlsecurity/source/pdfio/pdfdocument.cxx
index fc942c1..7b8cea0 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -306,7 +306,8 @@ bool PDFDocument::Sign(const 
uno::Reference& xCertificat
 // Write signature object.
 sal_Int32 nSignatureId = m_aXRef.size();
 sal_uInt64 nSignatureOffset = m_aEditBuffer.Tell();
-m_aXRef.push_back(nSignatureOffset);
+m_aXRef[nSignatureId] = nSignatureOffset;
+m_aXRefDirty[nSignatureId] = true;
 OStringBuffer aSigBuffer;
 aSigBuffer.append(nSignatureId);
 aSigBuffer.append(" 0 obj\n");
@@ -347,7 +348,8 @@ bool PDFDocument::Sign(const 
uno::Reference& xCertificat
 
 // Write appearance object.
 sal_Int32 nAppearanceId = m_aXRef.size();
-m_aXRef.push_back(m_aEditBuffer.Tell());
+m_aXRef[nAppearanceId] = m_aEditBuffer.Tell();
+m_aXRefDirty[nAppearanceId] = true;
 m_aEditBuffer.WriteUInt32AsString(nAppearanceId);
 m_aEditBuffer.WriteCharPtr(" 0 obj\n");
 m_aEditBuffer.WriteCharPtr("<& xCertificat
 
 // Write the Annot object, references nSignatureId and nAppearanceId.
 sal_Int32 nAnnotId = m_aXRef.size();
-m_aXRef.push_back(m_aEditBuffer.Tell());
+m_aXRef[nAnnotId] = m_aEditBuffer.Tell();
+m_aXRefDirty[nAnnotId] = true;
 m_aEditBuffer.WriteUInt32AsString(nAnnotId);
 m_aEditBuffer.WriteCharPtr(" 0 obj\n");
 m_aEditBuffer.WriteCharPtr("<& xCertificat
 return false;
 }
 m_aXRef[nFirstPageId] = m_aEditBuffer.Tell();
+m_aXRefDirty[nFirstPageId] = true;
 m_aEditBuffer.WriteUInt32AsString(nFirstPageId);
 m_aEditBuffer.WriteCharPtr(" 0 obj\n");
 m_aEditBuffer.WriteCharPtr("<<");
@@ -446,6 +450,7 @@ bool PDFDocument::Sign(const 
uno::Reference& xCertificat
 return false;
 }
 m_aXRef[nCatalogId] = m_aEditBuffer.Tell();
+m_aXRefDirty[nCatalogId] = true;
 m_aEditBuffer.WriteUInt32AsString(nCatalogId);
 m_aEditBuffer.WriteCharPtr(" 0 obj\n");
 m_aEditBuffer.WriteCharPtr("<<");
@@ -491,13 +496,18 @@ bool PDFDocument::Sign(const 
uno::Reference& xCertificat
 
 // Write the xref table.
 sal_uInt64 nXRefOffset = m_aEditBuffer.Tell();
-m_aEditBuffer.WriteCharPtr("xref\n0 ");
-m_aEditBuffer.WriteUInt32AsString(m_aXRef.size(

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 2 commits - filter/source include/filter include/oox oox/source sc/source sw/source

2016-10-26 Thread Caolán McNamara
 filter/source/msfilter/mscodec.cxx|  206 
 include/filter/msfilter/mscodec.hxx   |  214 --
 include/oox/crypto/CryptTools.hxx |3 
 include/oox/crypto/Standard2007Engine.hxx |   76 +-
 oox/source/crypto/CryptTools.cxx  |   14 -
 oox/source/crypto/DocumentDecryption.cxx  |   22 +--
 oox/source/crypto/Standard2007Engine.cxx  |   67 +++--
 sc/source/filter/excel/xicontent.cxx  |  106 +++---
 sc/source/filter/excel/xistream.cxx   |   70 ++---
 sc/source/filter/inc/xistream.hxx |   67 +++--
 sc/source/filter/inc/xlcontent.hxx|2 
 sw/source/filter/ww8/ww8par.cxx   |  110 ---
 12 files changed, 646 insertions(+), 311 deletions(-)

New commits:
commit 6b4663e55cacf854f12a64c7949e29990302e623
Author: Caolán McNamara 
Date:   Sat Oct 22 20:38:19 2016 +0100

implement CryptoAPI RC4+SHA1 encryption scheme for doc import

there might be other variants out there in practice, but this
works for default encrypted doc of word 2013

(cherry picked from commit 4f07175cd03bf0fa42992a06d51aed5b421adcf2)

contains...

rework things in light of now available documentation

(cherry picked from commit 6ac3fb584409912d7a4e944a643bc9180bc03015)

Change-Id: I995a0437d4001d63e1c3a821e00c05a2af429356
68c1d9489292e63f709bfbc990ffa5ad7d0f827a

diff --git a/sc/source/filter/excel/xicontent.cxx 
b/sc/source/filter/excel/xicontent.cxx
index f00bbf7..8534f8a 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -1147,7 +1147,7 @@ XclImpDecrypterRef lclReadFilepass8_Strong(XclImpStream& 
rStream)
 rStream.Ignore(nHeaderSize - actualHeaderSize);
 
 info.verifier.saltSize = rStream.ReaduInt32();
-if (info.verifier.saltSize != 16)
+if (info.verifier.saltSize != msfilter::SALT_LENGTH)
 return xDecr;
 rStream.Read(&info.verifier.salt, sizeof(info.verifier.salt));
 rStream.Read(&info.verifier.encryptedVerifier, 
sizeof(info.verifier.encryptedVerifier));
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 71049f0..71e1aca 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5477,7 +5477,7 @@ namespace
 
 #define WW_BLOCKSIZE 0x200
 
-void DecryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream 
&rOut)
+void DecryptRC4(msfilter::MSCodec97& rCtx, SvStream &rIn, SvStream &rOut)
 {
 rIn.Seek(STREAM_SEEK_TO_END);
 const sal_Size nLen = rIn.Tell();
@@ -5611,7 +5611,7 @@ namespace
 return aEncryptionData;
 }
 
-uno::Sequence< beans::NamedValue > InitStd97Codec( 
::msfilter::MSCodec_Std97& rCodec, sal_uInt8 pDocId[16], SfxMedium& rMedium )
+uno::Sequence< beans::NamedValue > Init97Codec(msfilter::MSCodec97& 
rCodec, sal_uInt8 pDocId[16], SfxMedium& rMedium)
 {
 uno::Sequence< beans::NamedValue > aEncryptionData;
 const SfxUnoAnyItem* pEncryptionData = 
SfxItemSet::GetItem(rMedium.GetItemSet(), SID_ENCRYPTIONDATA, 
false);
@@ -5639,6 +5639,63 @@ namespace
 }
 }
 
+//TO-DO: merge this with lclReadFilepass8_Strong in sc which uses a different
+//stream thing
+static bool lclReadCryptoAPIHeader(msfilter::RC4EncryptionInfo &info, SvStream 
&rStream)
+{
+//Its possible there are other variants in existance but these
+//are the defaults I get with Word 2013
+
+rStream.ReadUInt32(info.header.flags);
+if (oox::getFlag( info.header.flags, msfilter::ENCRYPTINFO_EXTERNAL))
+return false;
+
+sal_uInt32 nHeaderSize(0);
+rStream.ReadUInt32(nHeaderSize);
+sal_uInt32 actualHeaderSize = sizeof(info.header);
+
+if (nHeaderSize < actualHeaderSize)
+return false;
+
+rStream.ReadUInt32(info.header.flags);
+rStream.ReadUInt32(info.header.sizeExtra);
+rStream.ReadUInt32(info.header.algId);
+rStream.ReadUInt32(info.header.algIdHash);
+rStream.ReadUInt32(info.header.keyBits);
+rStream.ReadUInt32(info.header.providedType);
+rStream.ReadUInt32(info.header.reserved1);
+rStream.ReadUInt32(info.header.reserved2);
+
+rStream.SeekRel(nHeaderSize - actualHeaderSize);
+
+rStream.ReadUInt32(info.verifier.saltSize);
+if (info.verifier.saltSize != msfilter::SALT_LENGTH)
+return false;
+rStream.Read(&info.verifier.salt, sizeof(info.verifier.salt));
+rStream.Read(&info.verifier.encryptedVerifier, 
sizeof(info.verifier.encryptedVerifier));
+
+rStream.ReadUInt32(info.verifier.encryptedVerifierHashSize);
+if (info.verifier.encryptedVerifierHashSize != RTL_DIGEST_LENGTH_SHA1)
+return false;
+rStream.Read(&info.verifier.encryptedVerifierHash, 
info.verifier.encryptedVerifierHashSize);
+
+// check flags and algorithm IDs, required are AES128 and SHA-1
+if (!oox::getFlag(info.header.flags, msfilter::ENCRYPTINFO_CRYPTOAPI))
+  

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

2016-10-26 Thread Stephan Bergmann
 Library_merged.mk  |1 +
 solenv/gbuild/extensions/pre_MergedLibsList.mk |1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 87c28ddabc5c0dcbee8f15d8d9d2e7a75750b975
Author: Stephan Bergmann 
Date:   Wed Oct 26 15:20:27 2016 +0200

i18nlangtag must presumably be dropped from Library_merged.mk

...after 475e4b477c6d7ae114c3ae51ba4872882af67a68 "Move i18nlangtag lib to
URELIB"?

Change-Id: I45c5d997ed30757157109c67f30b91c4073c6b0a

diff --git a/Library_merged.mk b/Library_merged.mk
index 8247e5a..a225b81 100644
--- a/Library_merged.mk
+++ b/Library_merged.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_Library_use_library_objects,merged,\
 $(eval $(call gb_Library_use_libraries,merged,\
cppu \
cppuhelper \
+   i18nlangtag \
$(if $(ENABLE_JAVA), \
jvmaccess \
jvmfwk) \
diff --git a/solenv/gbuild/extensions/pre_MergedLibsList.mk 
b/solenv/gbuild/extensions/pre_MergedLibsList.mk
index 8c00bd3..6a985e3 100644
--- a/solenv/gbuild/extensions/pre_MergedLibsList.mk
+++ b/solenv/gbuild/extensions/pre_MergedLibsList.mk
@@ -30,7 +30,6 @@ MERGE_LIBRARY_LIST := \
fwi \
fwk \
$(call gb_Helper_optional,DESKTOP,helplinker) \
-   i18nlangtag \
i18npool \
i18nutil \
lng \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Michael Stahl
 solenv/qa/python/gbuildtoide.py |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5ac920be30928fca515a1a393ba1b2847c12b07e
Author: Michael Stahl 
Date:   Wed Oct 26 15:21:32 2016 +0200

solenv: don't run make with LD_LIBRARY_PATH set

In a build with -fsanitize=address, this fails with:

Change-Id: Ida0d4445d7f829545b493e9dd4c2c4ef33960850
make: symbol lookup error: instdir/program/libfreebl3.so: undefined symbol: 
__asan_option_detect_stack_use_after_return

diff --git a/solenv/qa/python/gbuildtoide.py b/solenv/qa/python/gbuildtoide.py
index af2014d..4de079e 100644
--- a/solenv/qa/python/gbuildtoide.py
+++ b/solenv/qa/python/gbuildtoide.py
@@ -28,6 +28,8 @@ class CheckGbuildToIde(unittest.TestCase):
 
 def test_gbuildtoide(self):
 os.chdir(os.path.join(os.environ['SRCDIR'], 'solenv', 'qa', 'python', 
'selftest'))
+# make may find instdir/program/libfreebl3.so and fall over if that was
+del(os.environ['LD_LIBRARY_PATH']) # built with ASAN; prevent that
 make = os.environ['MAKE']
 subprocess.check_call([make, 'gbuildtoide', 'WORKDIR=%s' % 
self.tempworkmixed])
 jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToIde', 
'Library'))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 5 commits - chart2/source sc/inc sc/source sw/source

2016-10-26 Thread Eike Rathke
 chart2/source/controller/main/ChartController.cxx   |3 +++
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |3 +++
 sc/inc/externalrefmgr.hxx   |3 +++
 sc/source/filter/oox/formulabuffer.cxx  |4 
 sc/source/ui/docshell/externalrefmgr.cxx|   12 
 sw/source/filter/ww8/wrtw8sty.cxx   |   15 ---
 sw/source/filter/ww8/ww8par2.cxx|7 +++
 7 files changed, 40 insertions(+), 7 deletions(-)

New commits:
commit 81b2b9afd88b4c7828edcc5b388d4c90d36cf35e
Author: Eike Rathke 
Date:   Tue Oct 25 19:41:30 2016 +0200

Resolves: tdf#79442 in OOXML import add external files to LinkManager

Now that we store formula results without recalculating, the implicit
logic that adds files of external references to the LinkManager is not
triggered, explicitly force it during import.

Change-Id: Id867d2fa2b39841fb4c8e90941814457c8db431d
(cherry picked from commit 8464ea6961b9cc54af9c11cce1b80ed7e0cc77e2)
Reviewed-on: https://gerrit.libreoffice.org/30277
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit ef4051a295b76a5398e6c4a64bc0f8e1322291c7)

diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index 77c497f..94ed3ce 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -725,6 +725,9 @@ public:
 
 void enableDocTimer( bool bEnable );
 
+/** Add all known external files to the LinkManager. */
+void addFilesToLinkManager();
+
 private:
 ScExternalRefManager(const ScExternalRefManager&) = delete;
 
diff --git a/sc/source/filter/oox/formulabuffer.cxx 
b/sc/source/filter/oox/formulabuffer.cxx
index ef6172f..0d276a6 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -425,6 +425,10 @@ void FormulaBuffer::finalizeImport()
 }
 }
 
+// With formula results being set and not recalculated we need to
+// force-trigger adding all linked external files to the LinkManager.
+rDoc.getDoc().GetExternalRefManager()->addFilesToLinkManager();
+
 rDoc.getDoc().SetAutoNameCache(nullptr);
 
 xFormulaBar->setPosition( 1.0 );
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx 
b/sc/source/ui/docshell/externalrefmgr.cxx
index dcb5cd7..ec87fe6 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2795,6 +2795,18 @@ void 
ScExternalRefManager::maybeLinkExternalFile(sal_uInt16 nFileId)
 maLinkedDocs.insert(LinkedDocMap::value_type(nFileId, true));
 }
 
+void ScExternalRefManager::addFilesToLinkManager()
+{
+if (maSrcFiles.empty())
+return;
+
+SAL_WARN_IF( maSrcFiles.size() >= SAL_MAX_UINT16,
+"sc.ui", "ScExternalRefManager::addFilesToLinkManager: files 
overflow");
+const sal_uInt16 nSize = static_cast( std::max( 
maSrcFiles.size(), SAL_MAX_UINT16));
+for (sal_uInt16 nFileId = 0; nFileId < nSize; ++nFileId)
+maybeLinkExternalFile( nFileId);
+}
+
 void ScExternalRefManager::SrcFileData::maybeCreateRealFileName(const 
OUString& rOwnDocName)
 {
 if (maRelativeName.isEmpty())
commit f5be6a8ae62b55e782d147f8282e158314044435
Author: Michael Stahl 
Date:   Tue Oct 25 17:35:59 2016 +0200

tdf#101814 sw: MSWord export: don't override first-page with heuristics

Revert commit dcea8ba3b4fc347e7b6d9e0d5ec2fd99bd77ce6f, and do the
opposite.  The added "titlePage" check makes no sense, because in that
case there is already an explicit first-page style in the PageDesc, and
overriding that cannot be right.

The test added in that commit still succeeds, which suggests that the
root cause of that bug was elsewhere and was fixed in the meantime.

Change-Id: I9b21b6dc115be28cb0ee3360615c538d4cfee3cb
(cherry picked from commit 36e390eaa55ae302dc5a64fa7098ec43e2009748)
Reviewed-on: https://gerrit.libreoffice.org/30276
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 1bfa382b4af649ff2b56b988d89bada156e29078)

diff --git a/sw/source/filter/ww8/wrtw8sty.cxx 
b/sw/source/filter/ww8/wrtw8sty.cxx
index 75b266a..4769b73 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1623,18 +1623,19 @@ void MSWordExportBase::SectionProperties( const 
WW8_SepInfo& rSepInfo, WW8_PdAtt
 {
 // if a Follow is set and it does not point to itself,
 // then there is a page chain.
-// Falls damit eine "Erste Seite" simuliert werden soll, so
-// koennen wir das auch als solches schreiben.
-// Anders sieht es mit Links/Rechts wechseln aus. Dafuer muss
-// erkannt werden, wo der Seitenwechsel statt findet. Hier ist
-// es aber dafuer zuspaet!
-if ( pPd->GetFollow() && pPd != pPd->Ge

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

2016-10-26 Thread Eike Rathke
 include/rsc/rscsfx.hxx|8 --
 rsc/inc/rscclass.hxx  |4 -
 rsc/inc/rscdb.hxx |2 
 rsc/inc/rsctop.hxx|5 -
 rsc/source/parser/rscicpx.cxx |   20 ---
 rsc/source/parser/rscinit.cxx |4 -
 rsc/source/res/rscclass.cxx   |   10 ---
 rsc/source/res/rsctop.cxx |   11 ---
 sc/inc/markdata.hxx   |2 
 sc/source/core/data/markdata.cxx  |5 +
 sc/source/ui/docshell/docfunc.cxx |   54 ---
 sc/source/ui/inc/docfunc.hxx  |5 +
 sc/source/ui/inc/undoblk.hxx  |9 ++-
 sc/source/ui/undo/undoblk.cxx |  105 +++---
 sc/source/ui/unoobj/cellsuno.cxx  |2 
 sc/source/ui/view/viewfun2.cxx|2 
 sc/source/ui/view/viewfun3.cxx|4 -
 17 files changed, 130 insertions(+), 122 deletions(-)

New commits:
commit 647e860435c781fbb111ae59bc70dc8e6776fed5
Author: Eike Rathke 
Date:   Wed Oct 26 14:50:43 2016 +0200

Resolves: tdf#92117 create only one Undo for all UnmergeCells() calls

... during DeleteCells() and InsertCells(), instead of one Undo per
UnmergeCells() call. And actually create Undo only if bRecord requested.

Change-Id: I4f1747c3f42f36e16be81f989f0af5d048ba9d9f

diff --git a/sc/inc/markdata.hxx b/sc/inc/markdata.hxx
index 0392971..60c04d0 100644
--- a/sc/inc/markdata.hxx
+++ b/sc/inc/markdata.hxx
@@ -143,10 +143,12 @@ public:
 // iterators for table access
 typedef std::set::iterator iterator;
 typedef std::set::const_iterator const_iterator;
+typedef std::set::const_reverse_iterator const_reverse_iterator;
 iterator begin();
 iterator end();
 const_iterator begin() const;
 const_iterator end() const;
+const_reverse_iterator rbegin() const;
 };
 
 #endif
diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index 39a5728..70ec2c1 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -814,4 +814,9 @@ ScMarkData::const_iterator ScMarkData::end() const
 return maTabMarked.end();
 }
 
+ScMarkData::const_reverse_iterator ScMarkData::rbegin() const
+{
+return maTabMarked.rbegin();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index ce381de..77c029f 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1795,6 +1795,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const 
ScMarkData* pTabMark,
 nViewShellId = pViewSh->GetViewShellId();
 rDocShell.GetUndoManager()->EnterListAction( aUndo, aUndo, 0, 
nViewShellId );
 }
+std::unique_ptr pUndoRemoveMerge;
 
 itr = aMark.begin();
 for (; itr != itrEnd && nTabCount; ++itr)
@@ -1902,12 +1903,19 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, 
const ScMarkData* pTabMark,
 
 if( !qIncreaseRange.empty() )
 {
+if (bRecord && !pUndoRemoveMerge)
+{
+ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO 
);
+pUndoDoc->InitUndo( &rDoc, *aMark.begin(), 
*aMark.rbegin());
+pUndoRemoveMerge.reset( new ScUndoRemoveMerge( 
&rDocShell, pUndoDoc ));
+}
+
 for( ::std::vector::const_iterator iIter( 
qIncreaseRange.begin()); iIter != qIncreaseRange.end(); ++iIter )
 {
 ScRange aRange( *iIter );
 if( rDoc.HasAttrib( aRange, HasAttrFlags::Overlapped | 
HasAttrFlags::Merged ) )
 {
-UnmergeCells( aRange, true );
+UnmergeCells( aRange, bRecord, 
pUndoRemoveMerge.get() );
 }
 }
 }
@@ -1923,6 +1931,11 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, 
const ScMarkData* pTabMark,
 }
 }
 
+if (bRecord && pUndoRemoveMerge)
+{
+rDocShell.GetUndoManager()->AddUndoAction( pUndoRemoveMerge.release());
+}
+
 switch (eCmd)
 {
 case INS_CELLSDOWN:
@@ -2228,6 +2241,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const 
ScMarkData* pTabMark,
 nViewShellId = pViewSh->GetViewShellId();
 rDocShell.GetUndoManager()->EnterListAction( aUndo, aUndo, 0, 
nViewShellId );
 }
+std::unique_ptr pUndoRemoveMerge;
 
 itr = aMark.begin();
 for (; itr != itrEnd && *itr < nTabCount; ++itr)
@@ -2337,12 +2351,19 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, 
const ScMarkData* pTabMark,
 
 if( !qDecreaseRange.empty() )
 {
+if (bRecord && !pUndoRemoveMerge)
+{
+ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO 
);
+pUndoDoc->InitUndo( &r

Re: Problem building in Gerrit, Windows only.

2016-10-26 Thread Bjoern Michaelsen
Hi,

On Mon, Oct 24, 2016 at 09:43:30PM +0200, Michael Stahl wrote:
> this succeeded on the same "tb72" that produced the above failed build
> log, so i've pushed it to master now.

Thanks, I didnt see this, as I was booted into the world of pain (Windows)
myself yesterday to fix this and some more and thus did look at email.

Pushed the test harness to be a bit tigher with:

 https://gerrit.libreoffice.org/#/c/30293/

which succeeds on my Linux and Windows machines. Sadly the test on Windows is
15 times slower, which is a pain. Likely the full test needs to be moved out of
subsequenttest (e.g. into stagingtest), with only a smaller smoketest staying
in subsequenttest.

Best,

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


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

2016-10-26 Thread Eike Rathke
 sc/source/ui/docshell/docfunc.cxx |4 ++--
 sc/source/ui/inc/undoblk.hxx  |1 +
 sc/source/ui/undo/undoblk.cxx |4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 0ebe9fab18e732468d2b9d53dddf9f266411a0e5
Author: Eike Rathke 
Date:   Wed Oct 26 16:18:22 2016 +0200

init ScUndoRemoveMerge with range, tdf#92117 follow-up

So the original selection is restored after Undo.

Change-Id: Ie549a0b62da469ee38270ae089ea5abf9a6868e3

diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index 77c029f..4942c28 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1907,7 +1907,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const 
ScMarkData* pTabMark,
 {
 ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO 
);
 pUndoDoc->InitUndo( &rDoc, *aMark.begin(), 
*aMark.rbegin());
-pUndoRemoveMerge.reset( new ScUndoRemoveMerge( 
&rDocShell, pUndoDoc ));
+pUndoRemoveMerge.reset( new ScUndoRemoveMerge( 
&rDocShell, rRange, pUndoDoc ));
 }
 
 for( ::std::vector::const_iterator iIter( 
qIncreaseRange.begin()); iIter != qIncreaseRange.end(); ++iIter )
@@ -2355,7 +2355,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const 
ScMarkData* pTabMark,
 {
 ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO 
);
 pUndoDoc->InitUndo( &rDoc, *aMark.begin(), 
*aMark.rbegin());
-pUndoRemoveMerge.reset( new ScUndoRemoveMerge( 
&rDocShell, pUndoDoc ));
+pUndoRemoveMerge.reset( new ScUndoRemoveMerge( 
&rDocShell, rRange, pUndoDoc ));
 }
 
 for( ::std::vector::const_iterator iIter( 
qDecreaseRange.begin()); iIter != qDecreaseRange.end(); ++iIter )
diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx
index 01af186..3270402 100644
--- a/sc/source/ui/inc/undoblk.hxx
+++ b/sc/source/ui/inc/undoblk.hxx
@@ -902,6 +902,7 @@ public:
const ScCellMergeOption& rOption,
ScDocument* pNewUndoDoc );
 ScUndoRemoveMerge( ScDocShell* pNewDocShell,
+   const ScRange& rRange,
ScDocument* pNewUndoDoc );
 virtual ~ScUndoRemoveMerge() override;
 
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index ba29368..46b2ba3 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -2114,8 +2114,8 @@ ScUndoRemoveMerge::ScUndoRemoveMerge( ScDocShell* 
pNewDocShell,
 }
 
 ScUndoRemoveMerge::ScUndoRemoveMerge( ScDocShell* pNewDocShell,
-  ScDocument* pNewUndoDoc ) :
-ScBlockUndo( pNewDocShell, ScRange(), SC_UNDO_SIMPLE ),
+  const ScRange& rRange, ScDocument* 
pNewUndoDoc ) :
+ScBlockUndo( pNewDocShell, rRange, SC_UNDO_SIMPLE ),
 pUndoDoc( pNewUndoDoc )
 {
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loolwsd/DocumentBroker.cpp loolwsd/Storage.cpp loolwsd/Storage.hpp

2016-10-26 Thread Pranav Kant
 loolwsd/DocumentBroker.cpp |   41 --
 loolwsd/Storage.cpp|   42 ---
 loolwsd/Storage.hpp|   82 +
 3 files changed, 107 insertions(+), 58 deletions(-)

New commits:
commit 4269dfdf846f17e500a70bd7b55e175ac207a593
Author: Pranav Kant 
Date:   Wed Oct 26 18:17:42 2016 +0530

loolwsd: unsigned -> std::atomic

Change-Id: I41da65c7c5a43c2b1aafd8620042b0a3d34cc3af

diff --git a/loolwsd/Storage.cpp b/loolwsd/Storage.cpp
index 0f617d6..451387e 100644
--- a/loolwsd/Storage.cpp
+++ b/loolwsd/Storage.cpp
@@ -175,7 +175,7 @@ std::unique_ptr StorageBase::create(const 
Poco::URI& uri, const std
 throw BadRequestException("No Storage configured or invalid URI.");
 }
 
-unsigned LocalStorage::LastLocalStorageId = 0;
+std::atomic LocalStorage::LastLocalStorageId;
 
 LocalStorage::LocalFileInfo LocalStorage::getLocalFileInfo(const Poco::URI& 
uriPublic)
 {
diff --git a/loolwsd/Storage.hpp b/loolwsd/Storage.hpp
index 1bd8784..e9ed98c 100644
--- a/loolwsd/Storage.hpp
+++ b/loolwsd/Storage.hpp
@@ -144,7 +144,7 @@ public:
 private:
 /// True if the jailed file is not linked but copied.
 bool _isCopy;
-static unsigned LastLocalStorageId;
+static std::atomic LastLocalStorageId;
 };
 
 /// WOPI protocol backed storage.
commit cc184ea2c225024abca746dd02197ff211ae50dd
Author: Pranav Kant 
Date:   Wed Oct 26 16:45:28 2016 +0530

loolwsd: Separate FileInfo classes for different storages

The idea, for now, is to call the storage specific fileinfo
functions (getLocalFileInfo, getWOPIFileInfo) which returns the
file + user specific data for given URI. By user specific, it
means data which is token (provided in URI) dependent.
For WOPI, it would mean various user permissions
(editable/viewable etc.)

For our current storages, these calls also include the basic file
information which is common across all tokens. This can be
retreived by calling getFileInfo on the storage object.

Change-Id: Ibbd3b74b011d8bb6fe4730c33276ef9ac6c47103

diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index 3a5e1be..38846ac 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -222,19 +222,38 @@ bool DocumentBroker::load(const std::string& sessionId, 
const std::string& jailI
 
 if (_storage)
 {
-const auto fileInfo = _storage->getFileInfo(uriPublic);
+// Call the storage specific file info functions
+std::string username;
+std::chrono::duration getInfoCallDuration;
+if (dynamic_cast(_storage.get()) != nullptr)
+{
+const WopiStorage::WOPIFileInfo wopifileinfo = 
static_cast(_storage.get())->getWOPIFileInfo(uriPublic);
+username = wopifileinfo._username;
+
+if (!wopifileinfo._userCanWrite)
+{
+Log::debug("Setting the session as readonly");
+it->second->setReadOnly();
+}
+
+getInfoCallDuration = wopifileinfo._callDuration;
+}
+else if (dynamic_cast(_storage.get()) != nullptr)
+{
+const LocalStorage::LocalFileInfo localfileinfo = 
static_cast(_storage.get())->getLocalFileInfo(uriPublic);
+username = localfileinfo._username;
+}
+
+Log::debug("Setting username of the session to: " + username);
+it->second->setUserName(username);
+
+// Get basic file information from the storage
+const auto fileInfo = _storage->getFileInfo();
 if (!fileInfo.isValid())
 {
 Log::error("Invalid fileinfo for URI [" + uriPublic.toString() + 
"].");
 return false;
 }
-Log::debug("Setting username of the session to: " + 
fileInfo._userName);
-it->second->setUserName(fileInfo._userName);
-if (!fileInfo._canWrite)
-{
-Log::debug("Setting the session as readonly");
-it->second->setReadOnly();
-}
 
 // Lets load the document now
 const bool loaded = _storage->isLoaded();
@@ -249,13 +268,13 @@ bool DocumentBroker::load(const std::string& sessionId, 
const std::string& jailI
 _tileCache.reset(new TileCache(_uriPublic.toString(), 
_lastFileModifiedTime, _cacheRoot));
 }
 
-// If its WOPI storage, send the duration that it took for WOPI calls
+// Since document has been loaded, send the stats if its WOPI
 if (dynamic_cast(_storage.get()) != nullptr)
 {
 // Get the time taken to load the file from storage
-auto callDuration = 
dynamic_cast(_storage.get())->getWopiLoadDuration();
+auto callDuration = 
static_cast(_storage.get())->getWopiLoadDuration();
 // Add the time taken to check file info
-callDuration += fileInfo._callDuration;
+callDuration += getInfoCallDuration;
   

[Libreoffice-commits] online.git: loolwsd/LOOLKit.cpp

2016-10-26 Thread Pranav Kant
 loolwsd/LOOLKit.cpp |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 1f14642f8c1197ceb65a62c730326a61e23e5284
Author: Pranav Kant 
Date:   Wed Oct 26 20:11:52 2016 +0530

loolwsd: This is sessionId, not viewId

Change-Id: I98026369602fe6e25f72fe743e4f67b821ef0418

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index b88126a..07f2d25 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -1123,15 +1123,15 @@ private:
 Log::trace("Forwarding payload to " + prefix + ' ' + message);
 
 std::string name;
-std::string viewId;
-if (LOOLProtocol::parseNameValuePair(prefix, name, viewId, '-') && 
name == "child")
+std::string sessionId;
+if (LOOLProtocol::parseNameValuePair(prefix, name, sessionId, '-') && 
name == "child")
 {
-const auto it = _sessions.find(viewId);
+const auto it = _sessions.find(sessionId);
 if (it != _sessions.end())
 {
 if (message == "disconnect")
 {
-Log::debug("Removing ChildSession " + viewId);
+Log::debug("Removing ChildSession " + sessionId);
 _oldSessionIds[it->second->getViewId()] = 
it->second->getViewUserName();
 _sessions.erase(it);
 return true;
@@ -1144,7 +1144,7 @@ private:
 }
 }
 
-Log::warn() << "Child session [" << viewId << "] not found to 
forward message: " << message << Log::end;
+Log::warn() << "Child session [" << sessionId << "] not found to 
forward message: " << message << Log::end;
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Michael Meeks
 loolwsd/LOOLForKit.cpp |6 +-
 loolwsd/LOOLWSD.cpp|8 ++--
 2 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 87d5849176aa0b209fe805d66ca76c66c6eb3759
Author: Michael Meeks 
Date:   Wed Oct 26 14:40:46 2016 +0100

Pass master port number to forkit.

Fixes issues with free port selection.

diff --git a/loolwsd/LOOLForKit.cpp b/loolwsd/LOOLForKit.cpp
index 9272933..0bd55e8 100644
--- a/loolwsd/LOOLForKit.cpp
+++ b/loolwsd/LOOLForKit.cpp
@@ -297,7 +297,6 @@ int main(int argc, char** argv)
 static const char* clientPort = std::getenv("LOOL_TEST_CLIENT_PORT");
 if (clientPort)
 ClientPortNumber = std::stoi(clientPort);
-
 static const char* masterPort = std::getenv("LOOL_TEST_MASTER_PORT");
 if (masterPort)
 MasterPortNumber = std::stoi(masterPort);
@@ -332,6 +331,11 @@ int main(int argc, char** argv)
 eq = std::strchr(cmd, '=');
 ClientPortNumber = std::stoll(std::string(eq+1));
 }
+else if (std::strstr(cmd, "--masterport=") == cmd)
+{
+eq = std::strchr(cmd, '=');
+MasterPortNumber = std::stoll(std::string(eq+1));
+}
 else if (std::strstr(cmd, "--version") == cmd)
 {
 std::string version, hash;
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 3eefd6d..235c2b5 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1718,8 +1718,9 @@ void LOOLWSD::defineOptions(OptionSet& optionSet)
 .required(false)
 .repeatable(false));
 
-optionSet.addOption(Option("port", "", "Port number to listen to (default: 
" + std::to_string(DEFAULT_CLIENT_PORT_NUMBER) + "),"
- " must not be " + 
std::to_string(MasterPortNumber) + ".")
+optionSet.addOption(Option("port", "", "Port number to listen to (default: 
" +
+   std::to_string(DEFAULT_CLIENT_PORT_NUMBER) + 
"),"
+   " must not be " + 
std::to_string(MasterPortNumber) + ".")
 .required(false)
 .repeatable(false)
 .argument("port number"));
@@ -1809,6 +1810,7 @@ Process::PID LOOLWSD::createForKit()
 args.push_back("--lotemplate=" + LoTemplate);
 args.push_back("--childroot=" + ChildRoot);
 args.push_back("--clientport=" + std::to_string(ClientPortNumber));
+args.push_back("--masterport=" + std::to_string(MasterPortNumber));
 if (UnitWSD::get().hasKitHooks())
 args.push_back("--unitlib=" + UnitTestLibrary);
 if (DisplayVersion)
@@ -1957,6 +1959,8 @@ int LOOLWSD::main(const std::vector& 
/*args*/)
 while (!TerminationFlag)
 {
 UnitWSD::get().invokeTest();
+if (TerminationFlag)
+break;
 
 const pid_t pid = waitpid(forKitPid, &status, WUNTRACED | WNOHANG);
 if (pid > 0)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loolwsd/ChildSession.cpp loolwsd/ChildSession.hpp loolwsd/ClientSession.cpp loolwsd/ClientSession.hpp loolwsd/DocumentBroker.cpp loolwsd/LOOLKit.cpp loolw

2016-10-26 Thread Pranav Kant
 loolwsd/ChildSession.cpp   |6 +++---
 loolwsd/ChildSession.hpp   |6 --
 loolwsd/ClientSession.cpp  |6 +-
 loolwsd/ClientSession.hpp  |1 +
 loolwsd/DocumentBroker.cpp |7 +--
 loolwsd/LOOLKit.cpp|   19 ++-
 loolwsd/LOOLKit.hpp|   11 +++
 loolwsd/LOOLSession.cpp|6 ++
 loolwsd/LOOLSession.hpp|3 +++
 loolwsd/test/WhiteBoxTests.cpp |2 +-
 10 files changed, 49 insertions(+), 18 deletions(-)

New commits:
commit 1c9e4f57d5ff870bc93039419e2e5ac158a81a3a
Author: Pranav Kant 
Date:   Wed Oct 26 20:38:25 2016 +0530

loolwsd: Include UserId in 'viewinfo' response

Change-Id: Ia467086343ff2308f80d873dfe0a617733036a2e

diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp
index 4e1243f..e1a5bbe 100644
--- a/loolwsd/ChildSession.cpp
+++ b/loolwsd/ChildSession.cpp
@@ -413,7 +413,7 @@ namespace
 {
 
 /// Given a view ID <-> user name map and a .uno:DocumentRepair result, 
annotate with user names.
-void insertUserNames(const std::map& viewInfo, std::string& 
json)
+void insertUserNames(const std::map& viewInfo, std::string& 
json)
 {
 Poco::JSON::Parser parser;
 auto root = parser.parse(json).extract();
@@ -430,7 +430,7 @@ void insertUserNames(const std::map& 
viewInfo, std::string& js
 int viewId = action->getValue("viewId");
 auto it = viewInfo.find(viewId);
 if (it != viewInfo.end())
-action->set("userName", Poco::Dynamic::Var(it->second));
+action->set("userName", 
Poco::Dynamic::Var(it->second.username));
 }
 }
 }
@@ -466,7 +466,7 @@ bool ChildSession::getCommandValues(const char* /*buffer*/, 
int /*length*/, Stri
 std::string(pValues == nullptr ? "" : 
pValues),
 std::string(pUndo == nullptr ? "" : 
pUndo));
 // json only contains view IDs, insert matching user names.
-std::map viewInfo = _docManager.getViewInfo();
+std::map viewInfo = _docManager.getViewInfo();
 insertUserNames(viewInfo, json);
 success = sendTextFrame("commandvalues: " + json);
 std::free(pValues);
diff --git a/loolwsd/ChildSession.hpp b/loolwsd/ChildSession.hpp
index e076b4f..7b0a3ca 100644
--- a/loolwsd/ChildSession.hpp
+++ b/loolwsd/ChildSession.hpp
@@ -16,6 +16,7 @@
 #include 
 
 #include "Common.hpp"
+#include "LOOLKit.hpp"
 #include "LOOLSession.hpp"
 #include "LibreOfficeKit.hpp"
 
@@ -43,9 +44,9 @@ public:
 /// Send updated view info to all active sessions
 virtual
 void notifyViewInfo(const std::vector& viewIds) = 0;
-/// Get a view ID <-> user name map.
+/// Get a view ID <-> UserInfo map.
 virtual
-std::map getViewInfo() = 0;
+std::map getViewInfo() = 0;
 virtual
 std::mutex& getMutex() = 0;
 virtual
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 07f2d25..e08c29b 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -844,16 +844,16 @@ private:
 notifyViewInfo(viewIds);
 }
 
-std::map getViewInfo() override
+std::map getViewInfo() override
 {
 std::unique_lock lock(_mutex);
-std::map viewInfo;
+std::map viewInfo;
 
 for (auto& pair : _sessions)
 {
 const auto& session = pair.second;
 const auto viewId = session->getViewId();
-viewInfo[viewId] = session->getViewUserName();
+viewInfo[viewId] = UserInfo({session->getViewUserId(), 
session->getViewUserName()});
 }
 
 viewInfo.insert(_oldSessionIds.begin(), _oldSessionIds.end());
@@ -875,7 +875,7 @@ private:
 void notifyViewInfo(const std::vector& viewIds) override
 {
 // Store the list of viewid, username mapping in a map
-std::map viewInfoMap = getViewInfo();
+std::map viewInfoMap = getViewInfo();
 std::map viewColorsMap = getViewColors();
 std::unique_lock lock(_mutex);
 
@@ -895,10 +895,11 @@ private:
 }
 else
 {
-viewInfoObj->set("username", viewInfoMap[viewId]);
-if (viewColorsMap.find(viewInfoMap[viewId]) != 
viewColorsMap.end())
+viewInfoObj->set("userid", viewInfoMap[viewId].userid);
+viewInfoObj->set("username", viewInfoMap[viewId].username);
+if (viewColorsMap.find(viewInfoMap[viewId].username) != 
viewColorsMap.end())
 {
-color = viewColorsMap[viewInfoMap[viewId]];
+color = viewColorsMap[viewInfoMap[viewId].username];
 }
 }
 viewInfoObj->set("color", color);
@@ -1132,7 +1133,7 @@ private:
 if (message == "disconnect")
 {
 Log::debug("Removing ChildSession " + sessionId);
-  

[Libreoffice-commits] online.git: 4 commits - loleaflet/dist loleaflet/main.js loleaflet/src loolwsd/DocumentBroker.cpp loolwsd/Storage.cpp loolwsd/Storage.hpp

2016-10-26 Thread Pranav Kant
 loleaflet/dist/loleaflet.html|   13 
 loleaflet/dist/toolbar/toolbar.js|2 -
 loleaflet/main.js|   10 --
 loleaflet/src/control/Control.Menubar.js |4 --
 loleaflet/src/core/Socket.js |   12 +++
 loleaflet/src/layer/tile/TileLayer.js|6 +--
 loleaflet/src/map/Map.js |   47 +--
 loolwsd/DocumentBroker.cpp   |5 +++
 loolwsd/Storage.cpp  |5 ++-
 loolwsd/Storage.hpp  |4 ++
 10 files changed, 95 insertions(+), 13 deletions(-)

New commits:
commit e0e6a343dade6ffd33f07ca916b176aec019bd21
Author: Pranav Kant 
Date:   Wed Oct 26 21:30:12 2016 +0530

tdf#103450: Implement session management postmessage API

Change-Id: Id22759c5c103948078fb20943768a9ff6251dddf

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index d015765..2d6ceb6 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -137,12 +137,14 @@ L.Map = L.Evented.extend({
addView: function(viewid, userid, username, color) {
this._viewInfo[viewid] = {'userid': userid, 'username': 
username, 'color': color};
this.fire('addview', {viewId: viewid, username: username});
+   this.WOPIPostMessage('View_Added', {ViewId: viewid, UserId: 
userid, UserName: username, Color: color});
},
 
removeView: function(viewid) {
var username = this._viewInfo[viewid].username;
delete this._viewInfo[viewid];
this.fire('removeview', {viewId: viewid, username: username});
+   this.WOPIPostMessage('View_Removed', {ViewId: viewid});
},
 
getViewName: function(viewid) {
@@ -158,8 +160,24 @@ L.Map = L.Evented.extend({
},
 
_WOPIPostMessageListener: function(e) {
-   // TODO
-   //console.log(e);
+   if (!window.WOPIPostmessageReady) {
+   return;
+   }
+
+   var msg = JSON.parse(e.data);
+   if (msg.MessageId === 'Get_Views') {
+   var getMembersRespVal = [];
+   for (var viewInfoIdx in this._viewInfo) {
+   getMembersRespVal.push({
+   ViewId: viewInfoIdx,
+   UserName: 
this._viewInfo[viewInfoIdx].username,
+   UserId: 
this._viewInfo[viewInfoIdx].userid,
+   Color: this._viewInfo[viewInfoIdx].color
+   });
+   }
+
+   this.WOPIPostMessage('Get_Views_Resp', 
getMembersRespVal);
+   }
},
 
WOPIPostMessage: function(msgId, values) {
commit 56f6ee7a57acd299cf8a9a70e78fab4f82080db6
Author: Pranav Kant 
Date:   Wed Oct 26 21:15:33 2016 +0530

loleaflet: Store userid in map

Change-Id: Ia54516b52ace3f722ae27ee28b5a11897dedc479

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 90dcc34..22d7aa5 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -758,8 +758,8 @@ L.TileLayer = L.GridLayer.extend({
this._onUpdateViewCursor(viewId);
},
 
-   _addView: function(viewId, username, color) {
-   this._map.addView(viewId, username, color);
+   _addView: function(viewId, userid, username, color) {
+   this._map.addView(viewId, userid, username, color);
 
//TODO: We can initialize color and other properties here.
if (typeof this._viewCursors[viewId] !== 'undefined') {
@@ -799,7 +799,7 @@ L.TileLayer = L.GridLayer.extend({
var viewIds = [];
for (var viewInfoIdx in viewInfo) {
if (!(parseInt(viewInfo[viewInfoIdx].id) in 
this._map._viewInfo)) {
-   this._addView(viewInfo[viewInfoIdx].id, 
viewInfo[viewInfoIdx].username, viewInfo[viewInfoIdx].color);
+   this._addView(viewInfo[viewInfoIdx].id, 
viewInfo[viewInfoIdx].userid, viewInfo[viewInfoIdx].username, 
viewInfo[viewInfoIdx].color);
}
viewIds.push(viewInfo[viewInfoIdx].id);
}
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 87c0197..d015765 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -134,8 +134,8 @@ L.Map = L.Evented.extend({
 
// public methods that modify map state
 
-   addView: function(viewid, username, color) {
-   this._viewInfo[viewid] = {'username': username, 'color': color};
+   addView: function(viewid, userid, username, color) {
+   this._viewInfo[viewid] = {'userid': userid, 'username': 
username, 'color

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

2016-10-26 Thread Stephan Bergmann
 filter/source/msfilter/mscodec.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 0b7bc00ae30473a26a5812798a7854511a460310
Author: Stephan Bergmann 
Date:   Wed Oct 26 16:31:40 2016 +0200

Revert "clang plugin for push_back after using sized constructor"

This reverts commit e2fa592c770222344fccb0e39db3d500fc7690b5, sould no 
longer be
necessary after 3be8c4c2bb919d69a2812c76edbaeaa41d149edb "The badvectorinit
plug-in probably can be retired".

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

diff --git a/filter/source/msfilter/mscodec.cxx 
b/filter/source/msfilter/mscodec.cxx
index 3cb7f44..c57559b 100644
--- a/filter/source/msfilter/mscodec.cxx
+++ b/filter/source/msfilter/mscodec.cxx
@@ -364,8 +364,7 @@ void MSCodec_CryptoAPI::InitKey (
 sal_uInt32 saltSize = 16;
 
 // Prepare initial data -> salt + password (in 16-bit chars)
-std::vector initialData;
-initialData.insert(initialData.begin(), pDocId, pDocId + saltSize);
+std::vector initialData(pDocId, pDocId + saltSize);
 
 // Fill PassData into KeyData.
 for (sal_Int32 nInd = 0; nInd < 16 && pPassData[nInd]; ++nInd)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Miklos Vajna
 xmlsecurity/inc/pdfio/pdfdocument.hxx  |   10 +
 xmlsecurity/qa/unit/pdfsigning/data/2good.pdf  |binary
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx  |  113 ++---
 xmlsecurity/source/helper/documentsignaturemanager.cxx |7 -
 xmlsecurity/source/helper/pdfsignaturehelper.cxx   |3 
 xmlsecurity/source/pdfio/pdfdocument.cxx   |   54 ++--
 xmlsecurity/source/pdfio/pdfverify.cxx |3 
 7 files changed, 155 insertions(+), 35 deletions(-)

New commits:
commit b6f98b71155d3c7af70bfc623cfaa7da0fbb905f
Author: Miklos Vajna 
Date:   Wed Oct 26 17:55:02 2016 +0200

xmlsecurity PDF verify: support SHA-256

And various other minor fixes.

Change-Id: Ifcccebf48aac8ad526406f2d7a402a840d3c91cd

diff --git a/xmlsecurity/inc/pdfio/pdfdocument.hxx 
b/xmlsecurity/inc/pdfio/pdfdocument.hxx
index f42350a..8ef7afd 100644
--- a/xmlsecurity/inc/pdfio/pdfdocument.hxx
+++ b/xmlsecurity/inc/pdfio/pdfdocument.hxx
@@ -75,6 +75,8 @@ public:
 static size_t FindStartXRef(SvStream& rStream);
 void ReadXRef(SvStream& rStream);
 static void SkipWhitespace(SvStream& rStream);
+/// Instead of all whitespace, just skip CR and NL characters.
+static void SkipLineBreaks(SvStream& rStream);
 size_t GetObjectOffset(size_t nIndex) const;
 const std::vector< std::unique_ptr >& GetElements();
 std::vector GetPages();
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx 
b/xmlsecurity/source/pdfio/pdfdocument.cxx
index a1ac63c..df7a809 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -784,7 +785,7 @@ bool PDFDocument::Tokenize(SvStream& rStream, bool bPartial)
 return false;
 }
 
-PDFDocument::SkipWhitespace(rStream);
+PDFDocument::SkipLineBreaks(rStream);
 m_aElements.push_back(std::unique_ptr(new 
PDFStreamElement(nLength)));
 if (!m_aElements.back()->Read(rStream))
 return false;
@@ -822,7 +823,7 @@ bool PDFDocument::Tokenize(SvStream& rStream, bool bPartial)
 }
 else
 {
-SAL_WARN("xmlsecurity.pdfio", "PDFDocument::Tokenize: 
unexpected '" << aKeyword << "' keyword");
+SAL_WARN("xmlsecurity.pdfio", "PDFDocument::Tokenize: 
unexpected '" << aKeyword << "' keyword at byte position " << rStream.Tell());
 return false;
 }
 }
@@ -830,7 +831,7 @@ bool PDFDocument::Tokenize(SvStream& rStream, bool bPartial)
 {
 if (!isspace(ch))
 {
-SAL_WARN("xmlsecurity.pdfio", "PDFDocument::Tokenize: 
unexpected character: " << ch);
+SAL_WARN("xmlsecurity.pdfio", "PDFDocument::Tokenize: 
unexpected character: " << ch << " at byte position " << rStream.Tell());
 return false;
 }
 }
@@ -1034,6 +1035,24 @@ void PDFDocument::SkipWhitespace(SvStream& rStream)
 }
 }
 
+void PDFDocument::SkipLineBreaks(SvStream& rStream)
+{
+char ch = 0;
+
+while (true)
+{
+rStream.ReadChar(ch);
+if (rStream.IsEof())
+break;
+
+if (ch != '\n' && ch != '\r')
+{
+rStream.SeekRel(-1);
+return;
+}
+}
+}
+
 size_t PDFDocument::GetObjectOffset(size_t nIndex) const
 {
 auto it = m_aXRef.find(nIndex);
@@ -1388,7 +1407,10 @@ bool PDFDocument::ValidateSignature(SvStream& rStream, 
PDFObjectElement* pSignat
 switch (SECOID_FindOIDTag(&aAlgorithm))
 {
 case SEC_OID_SHA1:
-nMaxResultLen = 20;
+nMaxResultLen = msfilter::SHA1_HASH_LENGTH;
+break;
+case SEC_OID_SHA256:
+nMaxResultLen = msfilter::SHA256_HASH_LENGTH;
 break;
 default:
 SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature: 
unrecognized algorithm");
@@ -1519,14 +1541,14 @@ bool PDFNumberElement::Read(SvStream& rStream)
 m_nOffset = rStream.Tell();
 char ch;
 rStream.ReadChar(ch);
-if (!isdigit(ch) && ch != '-')
+if (!isdigit(ch) && ch != '-' && ch != '.')
 {
 rStream.SeekRel(-1);
 return false;
 }
 while (!rStream.IsEof())
 {
-if (!isdigit(ch) && ch != '-')
+if (!isdigit(ch) && ch != '-' && ch != '.')
 {
 rStream.SeekRel(-1);
 m_nLength = rStream.Tell() - m_nOffset;
@@ -1599,25 +1621,28 @@ const OString& PDFHexStringElement::GetValue() const
 
 bool PDFLiteralStringElement::Read(SvStream& rStream)
 {
-char ch;
+char nPrevCh = 0;
+char ch = 0;
 rStream.ReadChar(ch);
 if (ch != '(')
 {
 SAL_INFO("xmlsecurity.pdfio", "PDFHexStringElement::Read: expec

[Libreoffice-commits] core.git: Branch 'feature/fixes36' - vcl/source

2016-10-26 Thread László Németh
 vcl/source/gdi/pdfextoutdevdata.cxx |6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 56ebe9fb8467a1777eaa495bb4a571200b0697b1
Author: László Németh 
Date:   Wed Oct 26 20:55:27 2016 +0200

Revert "tdf#99723: target ratio must be reached"

This reverts commit 0a72b24b2991f40c756031b9bfddfa35bcb78f63.

diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx 
b/vcl/source/gdi/pdfextoutdevdata.cxx
index 1a58c90..34d0c1b 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -830,18 +830,14 @@ bool PDFExtOutDevData::HasAdequateCompression( const 
Graphic &rGraphic,
 { 80, 1500 }, { 75, 1700 }
 };
 sal_Int32 nTargetRatio = 1;
-bool bIsTargetRatioReached = false;
 for (auto & rRatio : aRatios)
 {
 if ( mnCompressionQuality > rRatio.mnQuality )
-{
-bIsTargetRatioReached = true;
 break;
-}
 nTargetRatio = rRatio.mnRatio;
 }
 
-return ((nCurrentRatio > nTargetRatio) && bIsTargetRatioReached);
+return nCurrentRatio > nTargetRatio;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Michael Stahl
 solenv/qa/python/gbuildtoide.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dad2f1440c1fed230da40927503e30267ce1fa84
Author: Michael Stahl 
Date:   Wed Oct 26 21:08:02 2016 +0200

fix "TabError: inconsistent use of tabs and spaces in indentation"

Change-Id: Iff27ff4a01dc8c20b01a6247554b6cc7195a2306

diff --git a/solenv/qa/python/gbuildtoide.py b/solenv/qa/python/gbuildtoide.py
index e189995..2d06102 100644
--- a/solenv/qa/python/gbuildtoide.py
+++ b/solenv/qa/python/gbuildtoide.py
@@ -29,7 +29,7 @@ class CheckGbuildToIde(unittest.TestCase):
 def test_gbuildtoide(self):
 os.chdir(os.path.join(os.environ['SRCDIR'], 'solenv', 'qa', 'python', 
'selftest'))
 # make may find instdir/program/libfreebl3.so and fall over if that was
-   if 'LD_LIBRARY_PATH' in os.environ:
+if 'LD_LIBRARY_PATH' in os.environ:
 del(os.environ['LD_LIBRARY_PATH']) # built with ASAN; prevent that
 make = os.environ['MAKE']
 subprocess.check_call([make, 'gbuildtoide', 'WORKDIR=%s' % 
self.tempworkmixed])
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Caolán McNamara
 sd/source/ui/dlg/headerfooterdlg.cxx |   35 ---
 1 file changed, 20 insertions(+), 15 deletions(-)

New commits:
commit ad5a6b4d589ed7e13a5bb57339826021d377c046
Author: Caolán McNamara 
Date:   Wed Oct 26 21:11:29 2016 +0100

fix leak in HeaderFooterTabPage seen examining coverity#1371205

In the case that the field data is not a SvxDateTimeField or SvxDateField
then the old "aFieldInfo.pFieldItem = nullptr" call will mean that
the pFieldItem is leaked for that element.

The only thing needed later is the existance of a date field, and the 
field's
position, so encode those two facts as a bool and EPosition and
stop abusing aFieldInfo.pFieldItem to serve as a flag

Change-Id: I6a1c46d32406dbd6865cfcf6d23a3863bada6810

diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx 
b/sd/source/ui/dlg/headerfooterdlg.cxx
index 02307627..fa7bdf9 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -627,35 +627,38 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( 
LanguageType &rLanguage, boo
 if( pOPO )
 pOutl->SetText( *pOPO );
 
-EFieldInfo aFieldInfo;
-aFieldInfo.pFieldItem = nullptr;
+EPosition aDateFieldPosition;
+bool bHasDateFieldItem = false;
 
 sal_Int32 nParaCount = pEdit->GetParagraphCount();
-sal_Int32 nPara;
-for( nPara = 0; (nPara < nParaCount) && (aFieldInfo.pFieldItem == 
nullptr); nPara++ )
+for (sal_Int32 nPara = 0; (nPara < nParaCount) && 
!bHasDateFieldItem; ++nPara)
 {
-sal_uInt16 nFieldCount = pEdit->GetFieldCount( nPara );
-sal_uInt16 nField;
-for( nField = 0; (nField < nFieldCount) && 
(aFieldInfo.pFieldItem == nullptr); nField++ )
+sal_uInt16 nFieldCount = pEdit->GetFieldCount(nPara);
+for (sal_uInt16 nField = 0; (nField < nFieldCount) && 
!bHasDateFieldItem; ++nField)
 {
-aFieldInfo = pEdit->GetFieldInfo( nPara, nField );
-if( aFieldInfo.pFieldItem )
+EFieldInfo aFieldInfo = pEdit->GetFieldInfo(nPara, nField);
+if (aFieldInfo.pFieldItem)
 {
 const SvxFieldData* pFieldData = 
aFieldInfo.pFieldItem->GetField();
-if( pFieldData && ( dynamic_cast< const 
SvxDateTimeField *>( pFieldData ) != nullptr || dynamic_cast< const 
SvxDateField *>( pFieldData ) != nullptr))
+if (dynamic_cast(pFieldData) 
!= nullptr ||
+dynamic_cast(pFieldData) != 
nullptr)
 {
+bHasDateFieldItem = true;
+aDateFieldPosition = aFieldInfo.aPosition;
 break;
 }
 }
-aFieldInfo.pFieldItem = nullptr;
 }
 }
 
-if( aFieldInfo.pFieldItem != nullptr )
+if (bHasDateFieldItem)
 {
 if( bSet )
 {
-SfxItemSet aSet( pEdit->GetAttribs( 
aFieldInfo.aPosition.nPara, aFieldInfo.aPosition.nIndex, 
aFieldInfo.aPosition.nIndex+1, GetAttribsFlags::CHARATTRIBS ) );
+SfxItemSet aSet(pEdit->GetAttribs(aDateFieldPosition.nPara,
+  
aDateFieldPosition.nIndex,
+  
aDateFieldPosition.nIndex+1,
+  
GetAttribsFlags::CHARATTRIBS));
 
 SvxLanguageItem aItem( rLanguage, EE_CHAR_LANGUAGE );
 aSet.Put( aItem );
@@ -666,7 +669,8 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( 
LanguageType &rLanguage, boo
 SvxLanguageItem aItemCTL( rLanguage, EE_CHAR_LANGUAGE_CTL 
);
 aSet.Put( aItemCTL );
 
-ESelection aSel( aFieldInfo.aPosition.nPara, 
aFieldInfo.aPosition.nIndex, aFieldInfo.aPosition.nPara, 
aFieldInfo.aPosition.nIndex+1 );
+ESelection aSel(aDateFieldPosition.nPara, 
aDateFieldPosition.nIndex,
+aDateFieldPosition.nPara, 
aDateFieldPosition.nIndex+1 );
 pEdit->QuickSetAttribs( aSet, aSel );
 
 pObj->SetOutlinerParaObject( pOutl->CreateParaObject() );
@@ -674,7 +678,8 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( 
LanguageType &rLanguage, boo
 }
 else
 {
-rLanguage =  pOutl->GetLanguage( 
aFieldInfo.aPosition.nPara, aFieldInfo.aPosition.nIndex );
+rLanguage =  pOutl->GetLanguage(aDateFieldPosition.nPara,
+aDateFieldPos

[Libreoffice-commits] core.git: 2 commits - android/mobile-config.py bin/convwatch.py bin/test-hid-vs-ui.py bin/upload_symbols.py librelogo/source pyuno/demo pyuno/source scripting/source sfx2/qa sole

2016-10-26 Thread Michael Stahl
 TEMPLATE.SOURCECODE.HEADER   |   13 +
 android/mobile-config.py |4 +++-
 bin/convwatch.py |2 +-
 bin/test-hid-vs-ui.py|4 ++--
 bin/upload_symbols.py|4 ++--
 librelogo/source/LibreLogo/LibreLogo.py  |4 ++--
 pyuno/demo/biblioaccess.py   |4 ++--
 pyuno/demo/hello_world_comp.py   |4 ++--
 pyuno/demo/ooextract.py  |4 ++--
 pyuno/demo/swriter.py|4 ++--
 pyuno/demo/swritercomp.py|4 ++--
 pyuno/demo/swritercompclient.py  |4 ++--
 pyuno/source/loader/pythonloader.py  |4 ++--
 pyuno/source/module/uno.py   |4 ++--
 pyuno/source/module/unohelper.py |4 ++--
 pyuno/source/officehelper.py |3 +++
 scripting/source/pyprov/msgbox.py|5 +++--
 scripting/source/pyprov/pythonscript.py  |2 ++
 sfx2/qa/python/check_sidebar.py  |4 ++--
 sfx2/qa/python/check_sidebar_registry.py |4 ++--
 solenv/gbuild/Configuration.mk   |1 +
 solenv/gbuild/Extension.mk   |1 -
 solenv/gbuild/extensions/post_Counters.mk|2 ++
 solenv/gbuild/extensions/post_GbuildToIde.mk |2 ++
 solenv/gbuild/extensions/pre_Counters.mk |1 +
 solenv/gbuild/extensions/pre_MergedLibsList.mk   |1 -
 solenv/gbuild/extensions/pre_SharedLangList.mk   |1 +
 solenv/gbuild/platform/windows.mk|1 -
 solenv/qa/python/gbuildtoide.py  |3 ++-
 sw/qa/python/check_styles.py |4 ++--
 sw/qa/python/check_table.py  |2 +-
 uitest/calc_tests/about_test.py  |4 ++--
 uitest/calc_tests/create_chart.py|4 ++--
 uitest/calc_tests/create_range_name.py   |4 ++--
 uitest/calc_tests/edit_chart.py  |4 ++--
 uitest/calc_tests/function_wizard.py |4 ++--
 uitest/calc_tests/gridwin.py |4 ++--
 uitest/calc_tests/gridwindow.py  |4 ++--
 uitest/calc_tests/tdf96453.py|4 ++--
 uitest/demo_ui/char_dialog.py|4 ++--
 uitest/demo_ui/checkbox.py   |4 ++--
 uitest/demo_ui/combobox.py   |4 ++--
 uitest/demo_ui/edit.py   |4 ++--
 uitest/demo_ui/gridwin.py|4 ++--
 uitest/demo_ui/handle_multiple_files.py  |4 ++--
 uitest/demo_ui/listbox.py|4 ++--
 uitest/demo_ui/radiobutton.py|5 ++---
 uitest/demo_ui/spinfield.py  |4 ++--
 uitest/demo_ui/tabcontrol.py |4 ++--
 uitest/demo_ui/tabdialog.py  |4 ++--
 uitest/demo_ui/treelist.py   |4 ++--
 uitest/impress_tests/drawinglayer.py |4 +++-
 uitest/impress_tests/start.py|4 ++--
 uitest/libreoffice/calc/conditional_format.py|5 ++---
 uitest/libreoffice/calc/document.py  |4 ++--
 uitest/libreoffice/connection.py |4 ++--
 uitest/libreoffice/uno/eventlistener.py  |4 ++--
 uitest/libreoffice/uno/propertyvalue.py  |4 ++--
 uitest/math_tests/start.py   |4 ++--
 uitest/test_main.py  |4 ++--
 uitest/uitest/config.py  |4 ++--
 uitest/uitest/debug.py   |4 ++--
 uitest/uitest/framework.py   |4 ++--
 uitest/uitest/path.py|4 ++--
 uitest/uitest/test.py|4 ++--
 uitest/uitest/uihelper/calc.py   |4 ++--
 uitest/uitest/uihelper/common.py |4 ++--
 uitest/writer_tests/start.py |4 ++--
 unotest/source/python/org/libreoffice/unotest.py |4 ++--
 69 files changed, 142 insertions(+), 116 deletions(-)

New commits:
commit aa70294ffc0abbeeb30b4c4001e4db8b3539bf75
Author: Michael Stahl 
Date:   Wed Oct 26 22:13:33 2016 +0200

normalize existing emacs/vim mode-lines in python files

Bunch of these were setting C++ or Make modes and icky tabs...

Also, reportedly Emacs can figure out to enable python-mode
automatically.

Change-Id: I50072488fb92cb4d27aa3f74f717a28ae3967543

diff --git a/TEMPLATE.SOURCECODE.HEADER b/TEMPLATE.SOURCECODE.HEADER
index 7ba2a9f..f842da6 100644
--- a/TEMPLATE.SOURCECODE.HEADER
+++ b/TEMPLATE.SOURCECODE.HEADER
@@ -54,6 +54,19 @@ For makefiles:
 ...
 # vim: set noet sw=4 ts=4:
 
+For Python files:
+
+# -*- tab-width: 4; 

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

2016-10-26 Thread Caolán McNamara
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |   10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 424c7fb6cadd726480f01354c25bf4d01a685635
Author: Caolán McNamara 
Date:   Wed Oct 26 21:23:16 2016 +0100

we don't need ree after the loop here

Change-Id: Ib288ab3a7abf8f45c1175c36dcd4349dc4ad019f

diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx 
b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 0faf064..b887715 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1617,11 +1617,10 @@ namespace accessibility
 SvxAccessibleTextAdapter& rCacheTF = GetTextForwarder();
 sal_Int32 nAllFieldLen = 0;
 sal_Int32 nField = rCacheTF.GetFieldCount(nParaIndex), 
nFoundFieldIndex = -1;
-EFieldInfo ree;
 sal_Int32  reeBegin=0, reeEnd=0;
-for (sal_Int32 j = 0; j < nField; j++)
+for (sal_Int32 j = 0; j < nField; ++j)
 {
-ree = rCacheTF.GetFieldInfo(nParaIndex, j);
+EFieldInfo ree = rCacheTF.GetFieldInfo(nParaIndex, j);
 reeBegin  = ree.aPosition.nIndex + nAllFieldLen;
 reeEnd = reeBegin + ree.aCurrentText.getLength();
 nAllFieldLen += (ree.aCurrentText.getLength() - 1);
@@ -1655,11 +1654,10 @@ namespace accessibility
 SvxAccessibleTextAdapter& rCacheTF = GetTextForwarder();
 sal_Int32 nAllFieldLen = 0;
 sal_Int32 nField = rCacheTF.GetFieldCount(nParaIndex), 
nFoundFieldIndex = -1;
-EFieldInfo ree;
 sal_Int32  reeBegin=0, reeEnd=0;
-for (sal_Int32 j = 0; j < nField; j++)
+for (sal_Int32 j = 0; j < nField; ++j)
 {
-ree = rCacheTF.GetFieldInfo(nParaIndex, j);
+EFieldInfo ree = rCacheTF.GetFieldInfo(nParaIndex, j);
 reeBegin  = ree.aPosition.nIndex + nAllFieldLen;
 reeEnd = reeBegin + ree.aCurrentText.getLength();
 nAllFieldLen += (ree.aCurrentText.getLength() - 1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Caolán McNamara
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |  116 ++--
 1 file changed, 62 insertions(+), 54 deletions(-)

New commits:
commit c484c353ef8ad3d40dce7f1ef1ea1b3620c504d0
Author: Caolán McNamara 
Date:   Wed Oct 26 21:33:31 2016 +0100

rework to avoid coverity#1371205 Missing move assignment operator

Change-Id: I117fa0891e8cd1bf339bded93a7ee19d799caf9f

diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx 
b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index b887715..a078191 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -867,42 +867,22 @@ namespace accessibility
 return pValues[a].Name < pValues[b].Name;
 }
 };
+}
 
-OUString AccessibleEditableTextPara::GetFieldTypeNameAtIndex(sal_Int32 
nIndex)
+namespace
+{
+OUString GetFieldTypeNameFromField(EFieldInfo &ree)
 {
 OUString strFldType;
-SvxAccessibleTextAdapter& rCacheTF = GetTextForwarder();
-//For field object info
-sal_Int32 nParaIndex = GetParagraphIndex();
-sal_Int32 nAllFieldLen = 0;
-sal_Int32 nField = rCacheTF.GetFieldCount(nParaIndex), 
nFoundFieldIndex = -1;
-EFieldInfo ree;
-sal_Int32  reeBegin, reeEnd;
 sal_Int32 nFieldType = -1;
-for(sal_Int32 j = 0; j < nField; j++)
-{
-ree = rCacheTF.GetFieldInfo(nParaIndex, j);
-reeBegin  = ree.aPosition.nIndex + nAllFieldLen;
-reeEnd = reeBegin + ree.aCurrentText.getLength();
-nAllFieldLen += (ree.aCurrentText.getLength() - 1);
-if( reeBegin > nIndex )
-{
-break;
-}
-if(  nIndex >= reeBegin && nIndex < reeEnd )
-{
-nFoundFieldIndex = j;
-break;
-}
-}
-if (nFoundFieldIndex >= 0 && ree.pFieldItem)
+if (ree.pFieldItem)
 {
 // So we get a field, check its type now.
 nFieldType = ree.pFieldItem->GetField()->GetClassId() ;
 }
-switch(nFieldType)
+switch (nFieldType)
 {
-case text::textfield::Type::DATE:
+case text::textfield::Type::DATE:
 {
 const SvxDateField* pDateField = static_cast< const 
SvxDateField* >(ree.pFieldItem->GetField());
 if (pDateField)
@@ -912,23 +892,23 @@ namespace accessibility
 else if (pDateField->GetType() == SVXDATETYPE_VAR)
 strFldType = "date (variable)";
 }
+break;
 }
-break;
-case text::textfield::Type::PAGE:
-strFldType = "page-number";
-break;
-//support the sheet name & pages fields
-case text::textfield::Type::PAGES:
-strFldType = "page-count";
-break;
-case text::textfield::Type::TABLE:
-strFldType = "sheet-name";
-break;
-//End
-case text::textfield::Type::TIME:
-strFldType = "time";
-break;
-case text::textfield::Type::EXTENDED_TIME:
+case text::textfield::Type::PAGE:
+strFldType = "page-number";
+break;
+//support the sheet name & pages fields
+case text::textfield::Type::PAGES:
+strFldType = "page-count";
+break;
+case text::textfield::Type::TABLE:
+strFldType = "sheet-name";
+break;
+//End
+case text::textfield::Type::TIME:
+strFldType = "time";
+break;
+case text::textfield::Type::EXTENDED_TIME:
 {
 const SvxExtTimeField* pTimeField = static_cast< const 
SvxExtTimeField* >(ree.pFieldItem->GetField());
 if (pTimeField)
@@ -938,20 +918,48 @@ namespace accessibility
 else if (pTimeField->GetType() == SVXTIMETYPE_VAR)
 strFldType = "time (variable)";
 }
+break;
 }
-break;
-case text::textfield::Type::AUTHOR:
-strFldType = "author";
-break;
-case text::textfield::Type::EXTENDED_FILE:
-case text::textfield::Type::DOCINFO_TITLE:
-strFldType = "file name";
-break;
-default:
-break;
+case text::textfield::Type::AUTHOR:
+strFldType = "author";
+break;
+case text::textfield::Type::EXTENDED_FILE:
+case text::textfield::Type::DOCINFO_TITLE:
+strFldType = "file name";
+break;
+default:
+break;
 }
 return strFldType;
 }
+}
+
+namespace accessibility
+{
+ 

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

2016-10-26 Thread Stephan Bergmann
 sal/osl/all/log.cxx   |   27 +--
 sal/osl/all/logformat.hxx |   29 -
 2 files changed, 9 insertions(+), 47 deletions(-)

New commits:
commit 90439a2f211b723a0cf6d699ca8cb4da7384580a
Author: Stephan Bergmann 
Date:   Wed Oct 26 23:08:04 2016 +0200

sal::detail::logFormat is no longer needed

...since 97354578d7195bce927f0c00c4e2ae9cd7344776 "Remove the obsolete
functionality originally underlying osl/diagnose.h"

Change-Id: I7c920bca9cdddb37fcbbc15d8629d01c21eb0787

diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index afde142..00bd67cb 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -27,8 +27,6 @@
 #include "sal/types.h"
 #include "misc.hxx"
 
-#include "logformat.hxx"
-
 #if defined ANDROID
 #include 
 #elif defined WNT
@@ -365,24 +363,17 @@ void sal_detail_logFormat(
 if (report(level, area)) {
 std::va_list args;
 va_start(args, format);
-osl::detail::logFormat(level, area, where, format, args);
+char buf[1024];
+int const len = sizeof buf - RTL_CONSTASCII_LENGTH("...");
+int n = vsnprintf(buf, len, format, args);
+if (n < 0) {
+std::strcpy(buf, "???");
+} else if (n >= len) {
+std::strcpy(buf + len - 1, "...");
+}
+log(level, area, where, buf);
 va_end(args);
 }
 }
 
-void osl::detail::logFormat(
-sal_detail_LogLevel level, char const * area, char const * where,
-char const * format, std::va_list arguments)
-{
-char buf[1024];
-int const len = sizeof buf - RTL_CONSTASCII_LENGTH("...");
-int n = vsnprintf(buf, len, format, arguments);
-if (n < 0) {
-std::strcpy(buf, "???");
-} else if (n >= len) {
-std::strcpy(buf + len - 1, "...");
-}
-log(level, area, where, buf);
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/all/logformat.hxx b/sal/osl/all/logformat.hxx
deleted file mode 100644
index 0e579a9..000
--- a/sal/osl/all/logformat.hxx
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_SAL_OSL_ALL_LOGFORMAT_HXX
-#define INCLUDED_SAL_OSL_ALL_LOGFORMAT_HXX
-
-#include "sal/config.h"
-
-#include 
-
-#include "sal/detail/log.h"
-
-namespace osl { namespace detail {
-
-void logFormat(
-sal_detail_LogLevel level, char const * area, char const * where,
-char const * format, std::va_list arguments);
-
-} }
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Julien Nabet
 reportdesign/source/ui/dlg/Condition.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a369b0a056ba121b00328a1dc74cd48d8735b361
Author: Julien Nabet 
Date:   Sun Oct 23 13:26:49 2016 +0200

Related tdf#103421: disposeAndClear m_aColorSet (reportdesign)

m_aColorSet has been declared as VclPtr
then initialized with VclPtr::Create(this, WinBits( WB_ITEMBORDER 
| WB_NAMEFIELD | WB_3DLOOK | WB_NO_DIRECTSELECT))
Following vcl/README.lifecycle, we're on the case 2 of "Who owns & disposes 
what ?"
so we should use disposeAndClear

Change-Id: I5809b54b8a15c365362c05c35a7499d8f4f69ed2
Reviewed-on: https://gerrit.libreoffice.org/30176
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 
(cherry picked from commit ef663010434da24ecda35d0f0c26ce1a2b2c0f6c)
Reviewed-on: https://gerrit.libreoffice.org/30177
Reviewed-by: Katarina Behrens 

diff --git a/reportdesign/source/ui/dlg/Condition.cxx 
b/reportdesign/source/ui/dlg/Condition.cxx
index 36cf305..63ed903 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -161,7 +161,7 @@ OColorPopup::~OColorPopup()
 void OColorPopup::dispose()
 {
 disposeBuilder();
-m_aColorSet.clear();
+m_aColorSet.disposeAndClear();
 m_pCondition.clear();
 FloatingWindow::dispose();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes36' - filter/source include/vcl vcl/source

2016-10-26 Thread László Németh
 filter/source/pdf/pdfexport.cxx |2 
 include/vcl/pdfextoutdevdata.hxx|   20 ++---
 vcl/source/gdi/pdfextoutdevdata.cxx |   73 ++--
 3 files changed, 10 insertions(+), 85 deletions(-)

New commits:
commit ad876cf437e5967d34c43905f3f45a3efc678ee8
Author: László Németh 
Date:   Wed Oct 26 23:04:41 2016 +0200

Revert "tdf#97662 - Try to preserve original compressed JPEGs harder."

This reverts commit 76ec54e8c9f3580450bca85236a4f5af0c328588.

Conflicts:
include/vcl/pdfextoutdevdata.hxx
vcl/source/gdi/pdfextoutdevdata.cxx

Change-Id: I38a3f4882a64dc1618b700ea4f414efbb29ed301

diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 469e20f..db2ddb6 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -821,8 +821,6 @@ bool PDFExport::Export( const OUString& rFile, const 
Sequence< PropertyValue >&
 pPDFExtOutDevData->SetIsExportBookmarks( mbExportBookmarks );
 pPDFExtOutDevData->SetIsExportHiddenSlides( 
mbExportHiddenSlides );
 pPDFExtOutDevData->SetIsLosslessCompression( 
mbUseLosslessCompression );
-pPDFExtOutDevData->SetCompressionQuality( mnQuality );
-pPDFExtOutDevData->SetMaxImageResolution( mnMaxImageResolution 
);
 pPDFExtOutDevData->SetIsReduceImageResolution( 
mbReduceImageResolution );
 pPDFExtOutDevData->SetIsExportNamedDestinations( 
mbExportBmkToDest );
 
diff --git a/include/vcl/pdfextoutdevdata.hxx b/include/vcl/pdfextoutdevdata.hxx
index 48fab90..930d56c 100644
--- a/include/vcl/pdfextoutdevdata.hxx
+++ b/include/vcl/pdfextoutdevdata.hxx
@@ -86,8 +86,6 @@ class VCL_DLLPUBLIC PDFExtOutDevData : public ExtOutDevData
 boolmbExportNDests; //i56629
 sal_Int32   mnFormsFormat;
 sal_Int32   mnPage;
-sal_Int32   mnCompressionQuality;
-sal_Int32   mnMaxImageResolution;
 css::lang::Locale   maDocLocale;
 
 PageSyncData*   mpPageSyncData;
@@ -105,6 +103,8 @@ public:
 
 void PlayGlobalActions( PDFWriter& rWriter );
 
+
+
 boolGetIsExportNotes() const { return mbExportNotes;}
 voidSetIsExportNotes( const bool bExportNotes );
 
@@ -135,14 +135,10 @@ public:
 sal_Int32   GetCurrentPageNumber() const { return mnPage;}
 voidSetCurrentPageNumber( const sal_Int32 nPage );
 
-boolGetIsLosslessCompression() const { return 
mbUseLosslessCompression;}
+boolGetIsLosslessCompression() const { return 
mbUseLosslessCompression;}
 voidSetIsLosslessCompression( const bool bLosslessCompression );
 
-voidSetCompressionQuality( const sal_Int32 nQuality );
-
-voidSetMaxImageResolution( const sal_Int32 nQuality );
-
-boolGetIsReduceImageResolution() const { return 
mbReduceImageResolution;}
+boolGetIsReduceImageResolution() const { return 
mbReduceImageResolution;}
 voidSetIsReduceImageResolution( const bool bReduceImageResolution 
);
 
 const css::lang::Locale& GetDocumentLocale() const { return maDocLocale;}
@@ -182,15 +178,9 @@ public:
 rOutputRect, e.g. for cropped graphics.
  */
 voidEndGroup( const Graphic&rGraphic,
-  sal_uInt8 nTransparency,
+  sal_uInt8 nTransparency,
   const Rectangle&  rOutputRect,
   const Rectangle&  rVisibleOutputRect );
-
-/// Detect if stream is compressed enough to avoid de-compress / scale & 
re-compress
-boolHasAdequateCompression( const Graphic &rGraphic,
-const Rectangle &rOutputRect,
-const Rectangle &rVisibleOutputRect ) 
const;
-
 //--->i56629
 /** Create a new named destination to be used in a link to this document 
from another PDF document
  (see PDF spec 1.4, 8.2.1)
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx 
b/vcl/source/gdi/pdfextoutdevdata.cxx
index 34d0c1b..ff33463 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -309,7 +309,6 @@ struct PageSyncData
 void PushAction( const OutputDevice& rOutDev, const 
PDFExtOutDevDataSync::Action eAct );
 bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, 
const PDFExtOutDevData& rOutDevData );
 };
-
 void PageSyncData::PushAction( const OutputDevice& rOutDev, const 
PDFExtOutDevDataSync::Action eAct )
 {
 GDIMetaFile* pMtf = rOutDev.GetConnectMetaFile();
@@ -408,21 +407,12 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, 
sal_uInt32& rCurGDIMtfAc
 }
 else if ( aBeg->eAct == 
PDFExtOutDevDataSync::EndGroupGfxLink )
 {
-

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

2016-10-26 Thread Eike Rathke
 stoc/source/javavm/javavm.cxx |   73 --
 1 file changed, 64 insertions(+), 9 deletions(-)

New commits:
commit effb27326746945763bda70e2c375c86a40a05fc
Author: Eike Rathke 
Date:   Tue Oct 25 16:48:11 2016 +0200

Java 7 DISPLAY and FORMAT locale and script field

Change-Id: Ie62105c60a327f6e5cbcf1a801b341e988471d73
Reviewed-on: https://gerrit.libreoffice.org/30308
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index b27df6f..b780b7a 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -366,27 +366,82 @@ void getDefaultLocaleFromConfig(
 xConfRegistry_simple->open("org.openoffice.Setup", true, false);
 css::uno::Reference xRegistryRootKey = 
xConfRegistry_simple->getRootKey();
 
-// read locale
-css::uno::Reference locale = 
xRegistryRootKey->openKey("L10N/ooLocale");
-if(locale.is() && !locale->getStringValue().isEmpty()) {
-LanguageTag aLanguageTag( locale->getStringValue());
+// Since 1.7 Java knows DISPLAY and FORMAT locales, which match our UI and
+// system locale. See
+// 
http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/file/569b1b644416/src/share/classes/java/util/Locale.java
+// https://docs.oracle.com/javase/tutorial/i18n/locale/scope.html
+// https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html
+
+// Read UI language/locale.
+css::uno::Reference xUILocale = 
xRegistryRootKey->openKey("L10N/ooLocale");
+if(xUILocale.is() && !xUILocale->getStringValue().isEmpty()) {
+LanguageTag aLanguageTag( xUILocale->getStringValue());
 OUString language;
 OUString script;
 OUString country;
-// Java knows nothing but plain old ISO language and country codes.
+// Java knows nothing but plain old ISO codes, unless Locale.Builder or
+// Locale.forLanguageTag() are used, or non-standardized variant field
+// content which we ignore.
 aLanguageTag.getIsoLanguageScriptCountry( language, script, country);
 
 if(!language.isEmpty()) {
-OUString prop = "user.language="
-  + language;
+OUString prop = "user.language=" + language;
+pjvm->pushProp(prop);
+}
 
+// As of Java 7 also script is supported.
+if(!script.isEmpty()) {
+OUString prop = "user.script=" + script;
 pjvm->pushProp(prop);
 }
 
 if(!country.isEmpty()) {
-OUString prop = "user.country="
-  + country;
+OUString prop = "user.country=" + country;
+pjvm->pushProp(prop);
+}
+
+// Java 7 DISPLAY category is our UI language/locale.
+if(!language.isEmpty()) {
+OUString prop = "user.language.display=" + language;
+pjvm->pushProp(prop);
+}
 
+if(!script.isEmpty()) {
+OUString prop = "user.script.display=" + script;
+pjvm->pushProp(prop);
+}
+
+if(!country.isEmpty()) {
+OUString prop = "user.country.display=" + country;
+pjvm->pushProp(prop);
+}
+}
+
+// Read system locale.
+css::uno::Reference xLocale = 
xRegistryRootKey->openKey("L10N/ooSetupSystemLocale");
+if(xLocale.is() && !xLocale->getStringValue().isEmpty()) {
+LanguageTag aLanguageTag( xLocale->getStringValue());
+OUString language;
+OUString script;
+OUString country;
+// Java knows nothing but plain old ISO codes, unless Locale.Builder or
+// Locale.forLanguageTag() are used, or non-standardized variant field
+// content which we ignore.
+aLanguageTag.getIsoLanguageScriptCountry( language, script, country);
+
+// Java 7 FORMAT category is our system locale.
+if(!language.isEmpty()) {
+OUString prop = "user.language.format=" + language;
+pjvm->pushProp(prop);
+}
+
+if(!script.isEmpty()) {
+OUString prop = "user.script.format=" + script;
+pjvm->pushProp(prop);
+}
+
+if(!country.isEmpty()) {
+OUString prop = "user.country.format=" + country;
 pjvm->pushProp(prop);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Eike Rathke
 sc/source/ui/docshell/externalrefmgr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 329ecb67808767d677383e5fd6089feaab4cd9e4
Author: Eike Rathke 
Date:   Thu Oct 27 00:28:44 2016 +0200

trust the size ... tdf#79442 follow-up

... and don't unnecessarily loop over the whole range.
Actually a max/min typo.

Change-Id: I3dbda3a7388baa337c3922ad992fd3946074c3b7

diff --git a/sc/source/ui/docshell/externalrefmgr.cxx 
b/sc/source/ui/docshell/externalrefmgr.cxx
index 7056966..285cbdd 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2653,7 +2653,7 @@ void ScExternalRefManager::addFilesToLinkManager()
 
 SAL_WARN_IF( maSrcFiles.size() >= SAL_MAX_UINT16,
 "sc.ui", "ScExternalRefManager::addFilesToLinkManager: files 
overflow");
-const sal_uInt16 nSize = static_cast( std::max( 
maSrcFiles.size(), SAL_MAX_UINT16));
+const sal_uInt16 nSize = static_cast( std::min( 
maSrcFiles.size(), SAL_MAX_UINT16));
 for (sal_uInt16 nFileId = 0; nFileId < nSize; ++nFileId)
 maybeLinkExternalFile( nFileId);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Repository.mk solenv/CustomTarget_gbuildtesttools.mk solenv/Executable_gbuildtojson.mk solenv/gbuild solenv/gbuildtojson solenv/Module_solenv.mk solenv/PythonTest_solen

2016-10-26 Thread Bjoern Michaelsen
 Repository.mk|1 
 solenv/CustomTarget_gbuildtesttools.mk   |   17 
 solenv/Executable_gbuildtojson.mk|   16 
 solenv/Module_solenv.mk  |2 
 solenv/PythonTest_solenv_python.mk   |5 -
 solenv/gbuild/extensions/post_GbuildToIde.mk |   92 +--
 solenv/gbuildtojson/gbuildtojson.cxx |  104 +++
 solenv/qa/python/gbuildtoide.py  |  100 ++---
 8 files changed, 296 insertions(+), 41 deletions(-)

New commits:
commit dd8c8d81de4f361d8f4d259d8a27ac15ab871031
Author: Bjoern Michaelsen 
Date:   Wed Oct 26 12:45:26 2016 +0200

add test for running gbuildtoide on non-build modules

- do concat for json in C++, everything else seems fragile on Windows
- have APPEND vars separately
- check that gbuildtoide work on modules without a full build (modulo
  some blacklisted "creative" ones)

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

diff --git a/Repository.mk b/Repository.mk
index 61c2127..48ce934 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
concat-deps \
cpp \
cppunittester \
+   gbuildtojson \
$(if $(filter MSC,$(COM)), \
gcc-wrapper \
g++-wrapper \
diff --git a/solenv/CustomTarget_gbuildtesttools.mk 
b/solenv/CustomTarget_gbuildtesttools.mk
new file mode 100755
index 000..1b3df07
--- /dev/null
+++ b/solenv/CustomTarget_gbuildtesttools.mk
@@ -0,0 +1,17 @@
+# -*- 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_CustomTarget_CustomTarget,solenv/gbuildtesttools))
+
+$(call gb_CustomTarget_get_target,solenv/gbuildtesttools) :
+   echo -n "{ \"MAKE\": \"$(if $(filter WNT,$(OS)),$(shell cygpath -u 
$(MAKE)),$(MAKE))\"" > $@
+   echo -n ", \"BASH\": \"$(if $(filter WNT,$(OS)),$(shell cygpath -m 
`which bash`),bash)\"" >> $@
+   echo -n ", \"GBUILDTOJSON\": \"$(call 
gb_Executable_get_target,gbuildtojson)\" }" >> $@
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/Executable_gbuildtojson.mk 
b/solenv/Executable_gbuildtojson.mk
new file mode 100644
index 000..6797bf3
--- /dev/null
+++ b/solenv/Executable_gbuildtojson.mk
@@ -0,0 +1,16 @@
+# -*- 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_Executable_Executable,gbuildtojson))
+
+$(eval $(call gb_Executable_add_exception_objects,gbuildtojson,\
+   solenv/gbuildtojson/gbuildtojson \
+))
+
+# vim:set noet sw=4 ts=4:
diff --git a/solenv/Module_solenv.mk b/solenv/Module_solenv.mk
index d179771..78fe4b9 100644
--- a/solenv/Module_solenv.mk
+++ b/solenv/Module_solenv.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_Module_Module,solenv))
 
 $(eval $(call gb_Module_add_targets_for_build,solenv,\
Executable_concat-deps \
+   Executable_gbuildtojson \
 ))
 
 ifeq ($(COM),MSC)
@@ -23,6 +24,7 @@ endif
 
 ifneq ($(DISABLE_PYTHON),TRUE)
 $(eval $(call gb_Module_add_subsequentcheck_targets,solenv,\
+   CustomTarget_gbuildtesttools \
PythonTest_solenv_python \
 ))
 endif
diff --git a/solenv/PythonTest_solenv_python.mk 
b/solenv/PythonTest_solenv_python.mk
index 8ed1c20..bd66715 100644
--- a/solenv/PythonTest_solenv_python.mk
+++ b/solenv/PythonTest_solenv_python.mk
@@ -13,9 +13,6 @@ $(eval $(call 
gb_PythonTest_add_modules,solenv_python,$(SRCDIR)/solenv/qa/python
gbuildtoide \
 ))
 
-# force gbuildtoide.py to use the same make binary as is used here
-$(eval $(call gb_PythonTest_set_defs,solenv_python,\
-MAKE="$(MAKE)" \
-))
+$(call gb_PythonTest_get_target,solenv_python): $(call 
gb_CustomTarget_get_target,solenv/gbuildtesttools)
 
 # vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/extensions/post_GbuildToIde.mk 
b/solenv/gbuild/extensions/post_GbuildToIde.mk
index 06d36fe..4ed8d61 100644
--- a/solenv/gbuild/extensions/post_GbuildToIde.mk
+++ b/solenv/gbuild/extensions/post_GbuildToIde.mk
@@ -9,37 +9,43 @@
 
 ifneq ($(filter gbuildtoide,$(MAKECMDGOALS)),)
 
+# possibly recurse to ensure gbuildtojson was build before running the modded 
make
+gb_GbuildToIde_prep := $(shell $(MAKE) -f $(SRCDIR)/solenv/Makefile 
Executable_gbuildtojson)
 gb_FULLDEPS:=
 
 gbuildtoide:
-   true
+   @true
 
 .PHONY : foo

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

2016-10-26 Thread Bjoern Michaelsen
 solenv/qa/python/gbuildtoide.py |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit bbd44f8f89839b5abb4ec6c7ea195431de5b2f48
Author: Bjoern Michaelsen 
Date:   Thu Oct 27 00:11:45 2016 +0200

for now, use a limited subset for testing on windows as it is so slow

Change-Id: I06f77d8aa0a82bd3bb065095a64849d07d11c6a3
Reviewed-on: https://gerrit.libreoffice.org/30311
Reviewed-by: Björn Michaelsen 
Tested-by: Björn Michaelsen 

diff --git a/solenv/qa/python/gbuildtoide.py b/solenv/qa/python/gbuildtoide.py
index 2bd2728..4be7f0b 100644
--- a/solenv/qa/python/gbuildtoide.py
+++ b/solenv/qa/python/gbuildtoide.py
@@ -121,6 +121,9 @@ class CheckGbuildToIdeModules(unittest.TestCase):
 def test_gbuildtoide(self):
 blacklisted_modules = ['compilerplugins', 'cli_ure', 'dictionaries', 
'bridges', 'helpcompiler', 'helpcontent2', 'icon-themes', 'sal', 'shell', 
'cppu', 'cppuhelper', 'cpputools', 'extensions', 'external', 'i18npool', 
'javaunohelper', 'jurt', 'lingucomponent', 'odk', 'scaddins', 'solenv', 'stoc', 
'tools', 'tranlations', 'writerfilter']
 modules = ['accessibility', 'android', 'animations', 'apple_remote', 
'avmedia', 'basctl', 'basegfx', 'basic', 'bean', 'canvas', 'chart2', 
'codemaker', 'comphelper', 'cppcanvas', 'cui', 'dbaccess', 'desktop', 
'drawinglayer', 'dtrans', 'editeng', 'embeddedobj', 'embedserv', 
'eventattacher', 'extras', 'filter', 'forms', 'formula', 'fpicker', 
'framework', 'hwpfilter', 'i18nlangtag', 'i18nutil', 'idl', 'idlc', 
'instsetoo_native', 'io', 'ios', 'jvmaccess', 'jvmfwk', 'l10ntools', 
'librelogo', 'libreofficekit', 'linguistic', 'lotuswordpro', 'mysqlc', 
'nlpsolver', 'o3tl', 'offapi', 'officecfg', 'onlineupdate', 'oovbaapi', 'oox', 
'opencl', 'package', 'postprocess', 'pyuno', 'registry', 'remotebridges', 
'reportbuilder', 'reportdesign', 'ridljar', 'rsc', 'salhelper', 'sax', 'sc', 
'sccomp', 'scp2', 'scripting', 'sd', 'sdext', 'setup_native', 'sfx2', 
'slideshow', 'smoketest', 'soltools', 'sot', 'starmath', 'store', 'svgio', 
'svl', 'svtools', 'svx', 'sw', 'swext', 'sysui', 'test', 'testtoo
 ls', 'toolkit', 'tubes', 'ucb', 'ucbhelper', 'udkapi', 'uitest', 
'UnoControls', 'unodevtools', 'unoidl', 'unoil', 'unotest', 'unotools', 
'unoxml', 'ure', 'uui', 'vbahelper', 'vcl', 'winaccessibility', 'wizards', 
'writerperfect', 'xmerge', 'xmlhelp', 'xmloff', 'xmlreader', 'xmlscript', 
'xmlsecurity']
+if os.environ['OS'] == 'WNT':
+# for now, use a limited subset for testing on windows as it is so 
annoyingly slow on this
+modules = ['chart2', 'cui', 'dbaccess', 'framework', 'oox', 
'sfx2', 'svl', 'svtools', 'svx', 'toolkit', 'vcl', 'xmloff']
 for module in modules:
 shutil.rmtree(self.tempwork)
 os.makedirs(os.path.join(self.tempwork, 'LinkTarget', 
'Executable'))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Eike Rathke
 sc/source/filter/excel/xilink.cxx |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit e2dc12fa1803d5e3d6a06b2533d04c1bc54c8113
Author: Eike Rathke 
Date:   Thu Oct 20 00:58:06 2016 +0200

Resolves: tdf#85553 intern SharedString of cached external references result

(cherry picked from commit 0d2797fdb06f504e7213b3859a53c363f4f56bc9)

 Conflicts:
sc/source/filter/excel/xilink.cxx

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

diff --git a/sc/source/filter/excel/xilink.cxx 
b/sc/source/filter/excel/xilink.cxx
index 467cc99..f779a5f 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -71,7 +71,8 @@ public:
 /** Reads a CRN record (external referenced cell) at the specified 
address. */
 voidReadCrn( XclImpStream& rStrm, const XclAddress& 
rXclPos );
 
-voidLoadCachedValues(const 
ScExternalRefCache::TableTypeRef& pCacheTable);
+voidLoadCachedValues( const 
ScExternalRefCache::TableTypeRef& pCacheTable,
+  svl::SharedStringPool& rPool );
 
 private:
 typedef std::shared_ptr< XclImpCrn > XclImpCrnRef;
@@ -574,7 +575,8 @@ void XclImpSupbookTab::ReadCrn( XclImpStream& rStrm, const 
XclAddress& rXclPos )
 maCrnList.push_back( crnRef );
 }
 
-void XclImpSupbookTab::LoadCachedValues(const 
ScExternalRefCache::TableTypeRef& pCacheTable)
+void XclImpSupbookTab::LoadCachedValues( const 
ScExternalRefCache::TableTypeRef& pCacheTable,
+svl::SharedStringPool& rPool )
 {
 if (maCrnList.empty())
 return;
@@ -608,8 +610,8 @@ void XclImpSupbookTab::LoadCachedValues(const 
ScExternalRefCache::TableTypeRef&
 break;
 case EXC_CACHEDVAL_STRING:
 {
-const OUString& rStr = pCrn->GetString();
-ScExternalRefCache::TokenRef pToken(new 
formula::FormulaStringToken(rStr));
+svl::SharedString aSS( rPool.intern( pCrn->GetString()));
+ScExternalRefCache::TokenRef pToken(new 
formula::FormulaStringToken( aSS));
 pCacheTable->setCell(rAddr.mnCol, rAddr.mnRow, pToken, 0, 
false);
 }
 break;
@@ -753,7 +755,7 @@ void XclImpSupbook::LoadCachedValues()
 {
 const OUString& rTabName = (*itTab)->GetTabName();
 ScExternalRefCache::TableTypeRef pCacheTable = 
pRefMgr->getCacheTable(nFileId, rTabName, true);
-(*itTab)->LoadCachedValues(pCacheTable);
+(*itTab)->LoadCachedValues( pCacheTable, GetSharedStringPool());
 pCacheTable->setWholeTableCached();
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


localization of ui

2016-10-26 Thread baigali
I'm now working on libreoffice user interface localization in traditional 
Mongolian, and I using this wiki 
https://wiki.documentfoundation.org/LibreOffice_Localization_Guide/Adding_a_New_Language_or_Locale
built libreoffice with traditional Mongolian resource ,but on windows10 
,traditional Mongolian translation of ui is empty ,on windows7 is tofo.Can 
someone tell me where is the problem?___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-10-26 Thread Eike Rathke
 sc/source/ui/docshell/externalrefmgr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fac78d1d350184319d91d4f7d15bb3f22dccf0da
Author: Eike Rathke 
Date:   Thu Oct 27 00:28:44 2016 +0200

trust the size ... tdf#79442 follow-up

... and don't unnecessarily loop over the whole range.
Actually a max/min typo.

Change-Id: I3dbda3a7388baa337c3922ad992fd3946074c3b7
(cherry picked from commit 329ecb67808767d677383e5fd6089feaab4cd9e4)
Reviewed-on: https://gerrit.libreoffice.org/30312
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/source/ui/docshell/externalrefmgr.cxx 
b/sc/source/ui/docshell/externalrefmgr.cxx
index 59863f6..546f102 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2652,7 +2652,7 @@ void ScExternalRefManager::addFilesToLinkManager()
 
 SAL_WARN_IF( maSrcFiles.size() >= SAL_MAX_UINT16,
 "sc.ui", "ScExternalRefManager::addFilesToLinkManager: files 
overflow");
-const sal_uInt16 nSize = static_cast( std::max( 
maSrcFiles.size(), SAL_MAX_UINT16));
+const sal_uInt16 nSize = static_cast( std::min( 
maSrcFiles.size(), SAL_MAX_UINT16));
 for (sal_uInt16 nFileId = 0; nFileId < nSize; ++nFileId)
 maybeLinkExternalFile( nFileId);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-26 Thread Noel Grandin
 sw/inc/PostItMgr.hxx|2 
 sw/inc/SwNumberTree.hxx |7 
 sw/inc/dcontact.hxx |4 
 sw/inc/doc.hxx  |   15 -
 sw/inc/expfld.hxx   |3 
 sw/inc/fmtmeta.hxx  |1 
 sw/inc/hhcwrp.hxx   |1 
 sw/inc/ndtxt.hxx|8 
 sw/inc/swcrsr.hxx   |1 
 sw/inc/txtinet.hxx  |3 
 sw/inc/undobj.hxx   |1 
 sw/inc/unoframe.hxx |6 
 sw/inc/unotbl.hxx   |2 
 sw/source/core/SwNumberTree/SwNumberTree.cxx|   15 -
 sw/source/core/access/accportions.cxx   |7 
 sw/source/core/access/accportions.hxx   |1 
 sw/source/core/crsr/swcrsr.cxx  |7 
 sw/source/core/doc/docfmt.cxx   |2 
 sw/source/core/doc/docnum.cxx   |   11 
 sw/source/core/docnode/threadmanager.cxx|2 
 sw/source/core/draw/dcontact.cxx|2 
 sw/source/core/fields/expfld.cxx|   42 +--
 sw/source/core/inc/anchoredobjectposition.hxx   |4 
 sw/source/core/inc/cntfrm.hxx   |6 
 sw/source/core/inc/flyfrm.hxx   |1 
 sw/source/core/inc/frmtool.hxx  |5 
 sw/source/core/inc/swfont.hxx   |9 
 sw/source/core/inc/threadmanager.hxx|5 
 sw/source/core/layout/flowfrm.cxx   |2 
 sw/source/core/layout/fly.cxx   |8 
 sw/source/core/layout/frmtool.cxx   |   11 
 sw/source/core/objectpositioning/anchoredobjectposition.cxx |2 
 sw/source/core/text/txtpaint.cxx|2 
 sw/source/core/text/txtpaint.hxx|7 
 sw/source/core/txtnode/fmtatr2.cxx  |9 
 sw/source/core/txtnode/txtedt.cxx   |  134 +++-
 sw/source/core/undo/undobj.cxx  |   12 -
 sw/source/core/unocore/unoframe.cxx |2 
 sw/source/core/unocore/unotbl.cxx   |2 
 sw/source/filter/html/htmlcss1.cxx  |2 
 sw/source/filter/html/swcss1.hxx|7 
 sw/source/filter/ww8/wrtw8nds.cxx   |3 
 sw/source/filter/ww8/wrtww8.cxx |5 
 sw/source/filter/ww8/wrtww8.hxx |3 
 sw/source/filter/ww8/ww8par2.cxx|   13 -
 sw/source/filter/ww8/ww8par2.hxx|2 
 sw/source/filter/ww8/ww8scan.cxx|   25 --
 sw/source/filter/ww8/ww8scan.hxx|3 
 sw/source/filter/xml/xmltbli.cxx|   13 -
 sw/source/filter/xml/xmltbli.hxx|6 
 sw/source/ui/table/tautofmt.cxx |   20 -
 sw/source/uibase/docvw/PostItMgr.cxx|   11 
 sw/source/uibase/docvw/srcedtw.cxx  |   15 -
 sw/source/uibase/inc/srcedtw.hxx|2 
 sw/source/uibase/lingu/hhcwrp.cxx   |7 
 55 files changed, 118 insertions(+), 383 deletions(-)

New commits:
commit a7ea18ffe715776cb0e2b39e98569c75605ee332
Author: Noel Grandin 
Date:   Tue Oct 25 15:53:44 2016 +0200

loplugin:expandablemethods in sw

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

diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 85f1133..68887aa 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -189,8 +189,6 @@ class SwPostItMgr: public SfxListener
 voidInsertItem( SfxBroadcaster* pItem, bool 
bCheckExistance, bool bFocus);
 voidRemoveItem( SfxBroadcaster* pBroadcast );
 
-voidSort();
-
 public:
 SwPostItMgr(SwView* aDoc);
 virtual ~SwPostItMgr() override;
diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx
index 28281fd..eab2793 100644
--- a/sw/inc/SwNumberTree.hxx
+++ b/sw/inc/SwNumberTree.hxx
@@ -480,13 +480,6 @@ protected:
   bool bValidating = false) const;
 
 /**
-   Set this node as last valid child of its 

Re: Fabio Biocchetti license statement

2016-10-26 Thread Jan Iversen
WELCOME
Thanks for your license statement.

I have added you to our wiki:
https://wiki.documentfoundation.org/Development/Developers

If you want help to get started or have any questions, then please contact me. 
I am here to help you (and others) in getting their first patch submitted.

LibreOffice is a very big program and getting it built, setting up gerrit, and 
getting the first patch right can be a bit challenging, therefore do not 
hesitate to email me if you want help.

We have made a step by step guide to help you get started:
https://wiki.documentfoundation.org/Development/GetInvolved

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


Re: Ulrich Gemkow license statement

2016-10-26 Thread Jan Iversen
WELCOME
Thanks for your license statement.

I have added you to our wiki:
https://wiki.documentfoundation.org/Development/Developers

If you want help to get started or have any questions, then please contact me. 
I am here to help you (and others) in getting their first patch submitted.

LibreOffice is a very big program and getting it built, setting up gerrit, and 
getting the first patch right can be a bit challenging, therefore do not 
hesitate to email me if you want help.

We have made a step by step guide to help you get started:
https://wiki.documentfoundation.org/Development/GetInvolved

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


Re: License Statement

2016-10-26 Thread Jan Iversen
WELCOME
Thanks for your license statement.

I have added you to our wiki:
https://wiki.documentfoundation.org/Development/Developers

If you want help to get started or have any questions, then please contact me. 
I am here to help you (and others) in getting their first patch submitted.

LibreOffice is a very big program and getting it built, setting up gerrit, and 
getting the first patch right can be a bit challenging, therefore do not 
hesitate to email me if you want help.

We have made a step by step guide to help you get started:
https://wiki.documentfoundation.org/Development/GetInvolved

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


Re: Marc Antoine Dumont license statement

2016-10-26 Thread Jan Iversen
WELCOME
Thanks for your license statement.

I have added you to our wiki:
https://wiki.documentfoundation.org/Development/Developers

If you want help to get started or have any questions, then please contact me. 
I am here to help you (and others) in getting their first patch submitted.

LibreOffice is a very big program and getting it built, setting up gerrit, and 
getting the first patch right can be a bit challenging, therefore do not 
hesitate to email me if you want help.

We have made a step by step guide to help you get started:
https://wiki.documentfoundation.org/Development/GetInvolved

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


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

2016-10-26 Thread Tor Lillqvist
 xmlsecurity/source/helper/xmlsignaturehelper.cxx |7 -
 xmlsecurity/source/helper/xsecctl.cxx|  113 ---
 2 files changed, 46 insertions(+), 74 deletions(-)

New commits:
commit 7507bffd471c5e3c8d31f2ce350208aa3992e4a7
Author: Tor Lillqvist 
Date:   Wed Oct 26 13:29:18 2016 +0300

Sorry, could not resist: Bin pointless variables

We should also just use the string literals as such in the code (some
newer parts of this module already does that), and not hide them
behind preprocessor macros. An Easy Hack?

Change-Id: I3ab5793ff265a4aceff2fed1562a54bfb0ce3ccb

diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx 
b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index 8a895b5..7bf7ebe 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -169,8 +169,6 @@ uno::Reference 
XMLSignatureHelper::CreateDocumentHandlerWithH
 /*
  * write the xml context for signatures
  */
-OUString tag_AllSignatures(TAG_DOCUMENTSIGNATURES);
-
 SvXMLAttributeList *pAttributeList = new SvXMLAttributeList();
 OUString sNamespace;
 if (mbODFPre1_2)
@@ -184,7 +182,7 @@ uno::Reference 
XMLSignatureHelper::CreateDocumentHandlerWithH
 
 xSaxWriter->startDocument();
 xSaxWriter->startElement(
-tag_AllSignatures,
+TAG_DOCUMENTSIGNATURES,
 uno::Reference< css::xml::sax::XAttributeList > (pAttributeList));
 
 return xSaxWriter;
@@ -192,8 +190,7 @@ uno::Reference 
XMLSignatureHelper::CreateDocumentHandlerWithH
 
 void XMLSignatureHelper::CloseDocumentHandler( const 
uno::Reference& xDocumentHandler )
 {
-OUString tag_AllSignatures(TAG_DOCUMENTSIGNATURES);
-xDocumentHandler->endElement( tag_AllSignatures );
+xDocumentHandler->endElement( TAG_DOCUMENTSIGNATURES );
 xDocumentHandler->endDocument();
 }
 
diff --git a/xmlsecurity/source/helper/xsecctl.cxx 
b/xmlsecurity/source/helper/xsecctl.cxx
index 87f65cf..3d003fb 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -581,31 +581,6 @@ void XSecController::exportSignature(
  *  signatureInfo   - signature to be exported
  
**/
 {
-/*
- * defines all element tags in Signature element.
- */
-OUString tag_Signature(TAG_SIGNATURE);
-OUString tag_SignedInfo(TAG_SIGNEDINFO);
-OUString tag_CanonicalizationMethod(TAG_CANONICALIZATIONMETHOD);
-OUString tag_SignatureMethod(TAG_SIGNATUREMETHOD);
-OUString tag_Reference(TAG_REFERENCE);
-OUString tag_Transforms(TAG_TRANSFORMS);
-OUString tag_Transform(TAG_TRANSFORM);
-OUString tag_DigestMethod(TAG_DIGESTMETHOD);
-OUString tag_DigestValue(TAG_DIGESTVALUE);
-OUString tag_SignatureValue(TAG_SIGNATUREVALUE);
-OUString tag_KeyInfo(TAG_KEYINFO);
-OUString tag_X509Data(TAG_X509DATA);
-OUString tag_X509IssuerSerial(TAG_X509ISSUERSERIAL);
-OUString tag_X509IssuerName(TAG_X509ISSUERNAME);
-OUString tag_X509SerialNumber(TAG_X509SERIALNUMBER);
-OUString tag_X509Certificate(TAG_X509CERTIFICATE);
-OUString tag_Object(TAG_OBJECT);
-OUString tag_SignatureProperties(TAG_SIGNATUREPROPERTIES);
-OUString tag_SignatureProperty(TAG_SIGNATUREPROPERTY);
-OUString tag_Date(TAG_DATE);
-OUString tag_Description(TAG_DESCRIPTION);
-
 const SignatureReferenceInformations& vReferenceInfors = 
signatureInfo.vSignatureReferenceInfors;
 SvXMLAttributeList *pAttributeList;
 
@@ -624,11 +599,11 @@ void XSecController::exportSignature(
 OUString(signatureInfo.ouSignatureId));
 }
 
-xDocumentHandler->startElement( tag_Signature, cssu::Reference< 
cssxs::XAttributeList > (pAttributeList));
+xDocumentHandler->startElement( TAG_SIGNATURE, cssu::Reference< 
cssxs::XAttributeList > (pAttributeList));
 {
 /* Write SignedInfo element */
 xDocumentHandler->startElement(
-tag_SignedInfo,
+TAG_SIGNEDINFO,
 cssu::Reference< cssxs::XAttributeList > (new 
SvXMLAttributeList()));
 {
 /* Write CanonicalizationMethod element */
@@ -636,16 +611,16 @@ void XSecController::exportSignature(
 pAttributeList->AddAttribute(
 ATTR_ALGORITHM,
 ALGO_C14N);
-xDocumentHandler->startElement( tag_CanonicalizationMethod, 
cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
-xDocumentHandler->endElement( tag_CanonicalizationMethod );
+xDocumentHandler->startElement( TAG_CANONICALIZATIONMETHOD, 
cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
+xDocumentHandler->endElement( TAG_CANONICALIZATIONMETHOD );
 
 /* Write SignatureMethod element */
 pAttributeList = new SvXMLAttributeList();
 pAttributeList->AddAttribute(
 ATTR_ALGORITHM,

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

2016-10-26 Thread Miklos Vajna
 filter/source/pdf/impdialog.cxx |   78 
 1 file changed, 17 insertions(+), 61 deletions(-)

New commits:
commit 729c2cd35133eeef78ff0fed063094088809b211
Author: Miklos Vajna 
Date:   Wed Oct 26 20:56:36 2016 +0200

filter: use comphelper::containerToSequence() in ImpPDFTabDialog

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

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 65657b1..52bae8d 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -28,6 +28,8 @@
 #include "sfx2/passwd.hxx"
 #include "svtools/miscopt.hxx"
 
+#include "comphelper/propertyvalue.hxx"
+#include "comphelper/sequence.hxx"
 #include "comphelper/storagehelper.hxx"
 
 #include "com/sun/star/text/XTextRange.hpp"
@@ -449,72 +451,26 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
 maConfigItem.WriteBool( "EnableCopyingOfContent", mbCanCopyOrExtract );
 maConfigItem.WriteBool( "EnableTextAccessForAccessibilityTools", 
mbCanExtractForAccessibility );
 
-Sequence< PropertyValue > aRet( maConfigItem.GetFilterData() );
-
-// FIXME: OMG, this is horrible coding style...
-int nElementAdded = 12;
-
-aRet.realloc( aRet.getLength() + nElementAdded );
-
-sal_uInt32 const nLength(aRet.getLength());
-aRet[ nLength - nElementAdded ].Name = "Watermark";
-aRet[ nLength - nElementAdded ].Value <<= maWatermarkText;
-nElementAdded--;
-
-aRet[ nLength - nElementAdded ].Name = "EncryptFile";
-aRet[ nLength - nElementAdded ].Value <<= mbEncrypt;
-nElementAdded--;
-
-aRet[ nLength - nElementAdded ].Name = "PreparedPasswords";
-aRet[ nLength - nElementAdded ].Value <<= mxPreparedPasswords;
-nElementAdded--;
-
-aRet[ nLength - nElementAdded ].Name = "RestrictPermissions";
-aRet[ nLength - nElementAdded ].Value <<= mbRestrictPermissions;
-nElementAdded--;
-
-aRet[ nLength - nElementAdded ].Name = "PreparedPermissionPassword";
-aRet[ nLength - nElementAdded ].Value <<= maPreparedOwnerPassword;
-nElementAdded--;
+std::vector aRet;
 
+aRet.push_back(comphelper::makePropertyValue("Watermark", 
maWatermarkText));
+aRet.push_back(comphelper::makePropertyValue("EncryptFile", mbEncrypt));
+aRet.push_back(comphelper::makePropertyValue("PreparedPasswords", 
mxPreparedPasswords));
+aRet.push_back(comphelper::makePropertyValue("RestrictPermissions", 
mbRestrictPermissions));
+aRet.push_back(comphelper::makePropertyValue("PreparedPermissionPassword", 
maPreparedOwnerPassword));
 if( mbIsRangeChecked )
-{
-aRet[ nLength - nElementAdded ].Name = "PageRange";
-aRet[ nLength - nElementAdded ].Value <<= msPageRange;
-nElementAdded--;
-}
+aRet.push_back(comphelper::makePropertyValue("PageRange", 
msPageRange));
 else if( mbSelectionIsChecked )
-{
-aRet[ nLength - nElementAdded ].Name = "Selection";
-aRet[ nLength - nElementAdded ].Value = maSelection;
-nElementAdded--;
-}
-
-aRet[ nLength - nElementAdded ].Name = "SignatureLocation";
-aRet[ nLength - nElementAdded ].Value <<= msSignLocation;
-nElementAdded--;
-
-aRet[ nLength - nElementAdded ].Name = "SignatureReason";
-aRet[ nLength - nElementAdded ].Value <<= msSignReason;
-nElementAdded--;
-
-aRet[ nLength - nElementAdded ].Name = "SignatureContactInfo";
-aRet[ nLength - nElementAdded ].Value <<= msSignContact;
-nElementAdded--;
-
-aRet[ nLength - nElementAdded ].Name = "SignaturePassword";
-aRet[ nLength - nElementAdded ].Value <<= msSignPassword;
-nElementAdded--;
-
-aRet[ nLength - nElementAdded ].Name = "SignatureCertificate";
-aRet[ nLength - nElementAdded ].Value <<= maSignCertificate;
-nElementAdded--;
+aRet.push_back(comphelper::makePropertyValue("Selection", 
maSelection));
 
-aRet[ nLength - nElementAdded ].Name = "SignatureTSA";
-aRet[ nLength - nElementAdded ].Value <<= msSignTSA;
-nElementAdded--;
+aRet.push_back(comphelper::makePropertyValue("SignatureLocation", 
msSignLocation));
+aRet.push_back(comphelper::makePropertyValue("SignatureReason", 
msSignReason));
+aRet.push_back(comphelper::makePropertyValue("SignatureContactInfo", 
msSignContact));
+aRet.push_back(comphelper::makePropertyValue("SignaturePassword", 
msSignPassword));
+aRet.push_back(comphelper::makePropertyValue("SignatureCertificate", 
maSignCertificate));
+aRet.push_back(comphelper::makePropertyValue("SignatureTSA", msSignTSA));
 
-return aRet;
+return comphelper::concatSequences(maConfigItem.GetFilterData(), 
comphelper::containerToSequence(aRet));
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org

[Libreoffice-commits] core.git: Branch 'feature/fixes36' - vcl/opengl

2016-10-26 Thread Tomaž Vajngerl
 vcl/opengl/areaScaleFragmentShader.glsl |  144 +++-
 1 file changed, 50 insertions(+), 94 deletions(-)

New commits:
commit 20bef6e93403c2b207b055870b3985af93a74d8a
Author: Tomaž Vajngerl 
Date:   Sun Oct 23 23:54:21 2016 +0200

opengl: array-less area scale fragment shader

This reduces problems with this shader - like using of the array.
All calculations are done right away now.

Change-Id: I8c02ab617a144821fa8db9ebfb4abe686acafbcd

diff --git a/vcl/opengl/areaScaleFragmentShader.glsl 
b/vcl/opengl/areaScaleFragmentShader.glsl
index c83c5e0..714cb7d 100644
--- a/vcl/opengl/areaScaleFragmentShader.glsl
+++ b/vcl/opengl/areaScaleFragmentShader.glsl
@@ -13,8 +13,6 @@ int min( int a, int b ) { return a < b ? a : b; }
 float min( float a, float b ) { return a < b ? a : b; }
 #endif
 
-/* TODO Use textureOffset for newest version of GLSL */
-
 uniform sampler2D sampler;
 uniform int swidth;
 uniform int sheight;
@@ -34,118 +32,76 @@ varying vec2 mask_coord;
 uniform sampler2D mask;
 #endif
 
+float calculateContribution(float fLow, float fHigh, int value)
+{
+float start = max(0.0, fLow - value);
+float end   = max(0.0, (value + 1) - fHigh);
+return (1.0 - start - end) / (fHigh - fLow);
+}
+
 void main(void)
 {
 // Convert to pixel coordinates again.
-int dx = int( tex_coord.s * xdestconvert );
-int dy = int( tex_coord.t * ydestconvert );
-
-// Note: These values are always the same for the same X (or Y),
-// so they could be precalculated in C++ and passed to the shader,
-// but GLSL has limits on the size of uniforms passed to it,
-// so it'd need something like texture buffer objects from newer
-// GLSL versions, and it seems the hassle is not really worth it.
-
-// How much each column/row will contribute to the resulting pixel.
-// assert( xscale <= 100 ); assert( yscale <= 100 );
-float xratio[ 16 + 2 ];
-float yratio[ 16 + 2 ];
-// For finding the first and last source pixel.
-int xpixel[ 16 + 2 ];
-int ypixel[ 16 + 2 ];
-
-int xpos = 0;
-int ypos = 0;
+int dx = int(tex_coord.s * xdestconvert);
+int dy = int(tex_coord.t * ydestconvert);
 
 // Compute the range of source pixels which will make up this destination 
pixel.
-float fsx1 = dx * xscale;
-float fsx2 = fsx1 + xscale;
+float fsx1 = min(dx * xscale,   float(swidth - 1));
+float fsx2 = min(fsx1 + xscale, float(swidth - 1));
+
+float fsy1 = min(dy * yscale,   float(sheight - 1));
+float fsy2 = min(fsy1 + yscale, float(sheight - 1));
+
 // To whole pixel coordinates.
-int sx1 = int( ceil( fsx1 ) );
-int sx2 = int( floor( fsx2 ) );
-// Range checking.
-sx2 = min( sx2, swidth - 1 );
-sx1 = min( sx1, sx2 );
-
-// How much one full column contributes to the resulting pixel.
-float width = min( xscale, swidth - fsx1 );
-
-if( sx1 - fsx1 > 0.001 )
-{   // The first column contributes only partially.
-xpixel[ xpos ] = sx1 - 1;
-xratio[ xpos ] = ( sx1 - fsx1 ) / width;
-++xpos;
-}
-for( int sx = sx1; sx < sx2; ++sx )
-{   // Columns that fully contribute to the resulting pixel.
-xpixel[ xpos ] = sx;
-xratio[ xpos ] = 1.0 / width;
-++xpos;
-}
-if( fsx2 - sx2 > 0.001 )
-{   // The last column contributes only partially.
-xpixel[ xpos ] = sx2;
-xratio[ xpos ] = min( min( fsx2 - sx2, 1.0 ) / width, 1.0 );
-++xpos;
-}
+int xstart = int(floor(fsx1));
+int xend   = int(floor(fsx2));
 
-// The same for Y.
-float fsy1 = dy * yscale;
-float fsy2 = fsy1 + yscale;
-int sy1 = int( ceil( fsy1 ) );
-int sy2 = int( floor( fsy2 ) );
-sy2 = min( sy2, sheight - 1 );
-sy1 = min( sy1, sy2 );
+int ystart = int(floor(fsy1));
+int yend   = int(floor(fsy2));
 
-float height = min( yscale, sheight - fsy1 );
+#ifdef ARRAY_BASED
+int posX = 0;
+float ratio[16];
 
-if( sy1 - fsy1 > 0.001 )
-{
-ypixel[ ypos ] = sy1 - 1;
-yratio[ ypos ] = ( sy1 - fsy1 ) / height;
-++ypos;
-}
-for( int sy = sy1; sy < sy2; ++sy )
+for (int x = xstart; x <= xend; ++x)
 {
-ypixel[ ypos ] = sy;
-yratio[ ypos ] = 1.0 / height;
-++ypos;
+float contributionX = calculateContribution(fsx1, fsx2, x);
+ratio[posX] = contributionX;
+posX++;
 }
-if( fsy2 - sy2 > 0.001 )
-{
-ypixel[ ypos ] = sy2;
-yratio[ ypos ] = min( min( fsy2 - sy2, 1.0 ) / height, 1.0 );
-++ypos;
-}
-
-int xstart = xpixel[ 0 ];
-int xend = xpixel[ xpos - 1 ];
-int ystart = ypixel[ 0 ];
-int yend = ypixel[ ypos - 1 ];
+#endif
 
-vec4 sum = vec4( 0.0, 0.0, 0.0, 0.0 );
+vec4 sumAll = vec4(0.0, 0.0, 0.0, 0.0);
 
-ypos = 0;
-for( int y = ystart; y <= yend; ++y, ++ypos )
+for (int y = ystart; y <= yend; ++y)
 {
-vec