use of xsltproc without '--nonet'

2015-08-25 Thread Richard PALO
I noticed (by chance) some uses of xsltproc without the '--nonet' option in the 
following files:
> extras/CustomTarget_autocorr.mk
> extras/CustomTarget_autotextshare.mk
> extras/CustomTarget_autotextuser.mk
> solenv/gbuild/UIConfig.mk
> solenv/gbuild/platform/macosx.mk

Is there any particular reason these cannot be forced to build locally like the 
other uses of xsltproc?
-- 
Richard PALO


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


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

2015-08-25 Thread Caolán McNamara
 sw/qa/core/data/ww5/pass/hang-1.doc |binary
 sw/source/filter/ww8/ww8scan.cxx|   17 +
 sw/source/filter/ww8/ww8scan.hxx|1 +
 3 files changed, 18 insertions(+)

New commits:
commit cce05bd5e655ae1db7165e086183371bf071dae3
Author: Caolán McNamara 
Date:   Mon Aug 24 12:36:41 2015 +0100

guard against hangs with bogus unsorted plcfs

This reverts commit 6d21cbd1238556535ec1bb1adf35b25bc8eb898b.

Change-Id: I309302ab5357b8404ee4c75bd0bfcb4f816e0588
(cherry picked from commit 74c0f74422671f8005f2cfc0ae94e5656bcea31e)
Reviewed-on: https://gerrit.libreoffice.org/17951
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/sw/qa/core/data/ww5/pass/hang-1.doc 
b/sw/qa/core/data/ww5/pass/hang-1.doc
new file mode 100644
index 000..6033724
Binary files /dev/null and b/sw/qa/core/data/ww5/pass/hang-1.doc differ
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 496e81a..1dbf102 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2125,6 +2125,8 @@ void WW8PLCF::ReadPLCF(SvStream& rSt, WW8_FC nFilePos, 
sal_uInt32 nPLCF)
 #endif // OSL_BIGENDIAN
 // Pointer to content array
 pPLCF_Contents = reinterpret_cast(&pPLCF_PosArray[nIMax + 
1]);
+
+TruncToSortedRange();
 }
 
 OSL_ENSURE(bValid, "Document has corrupt PLCF, ignoring it");
@@ -2144,6 +2146,21 @@ void WW8PLCF::MakeFailedPLCF()
 pPLCF_Contents = reinterpret_cast(&pPLCF_PosArray[nIMax + 1]);
 }
 
+void WW8PLCF::TruncToSortedRange()
+{
+//Docs state that: ... all Plcs ... are sorted in ascending order.
+//So ensure that here for broken documents.
+for (auto nI = 0; nI < nIMax; ++nI)
+{
+if (pPLCF_PosArray[nI] > pPLCF_PosArray[nI+1])
+{
+SAL_WARN("sw.ww8", "Document has unsorted PLCF, truncated to 
sorted portion");
+nIMax = nI;
+break;
+}
+}
+}
+
 void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN)
 {
 OSL_ENSURE( nIMax < ncpN, "Pcl.Fkp: Why is PLCF too big?" );
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index e1002f7..9b258af 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -291,6 +291,7 @@ private:
 
 void MakeFailedPLCF();
 
+void TruncToSortedRange();
 public:
 WW8PLCF(SvStream& rSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
 WW8_CP nStartPos = -1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Caolán McNamara
 sw/qa/core/data/ww5/pass/hang-2.doc |binary
 sw/source/filter/ww8/ww8scan.cxx|9 -
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit d8b8bb7bb6a4b50190efd9f1f6909f42e353546c
Author: Caolán McNamara 
Date:   Mon Aug 24 14:05:00 2015 +0100

limit seeks to valid area

(cherry picked from commit c0c9075163f06c0b5c2ad9cf428f1cfacf9fe1fb)

Change-Id: I401d93491999a3fc3db4f597eea9c4fe5b9bc926
Reviewed-on: https://gerrit.libreoffice.org/17955
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/sw/qa/core/data/ww5/pass/hang-2.doc 
b/sw/qa/core/data/ww5/pass/hang-2.doc
new file mode 100644
index 000..5f76093
Binary files /dev/null and b/sw/qa/core/data/ww5/pass/hang-2.doc differ
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 1dbf102..c227c12 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -6726,9 +6726,8 @@ WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 
nPos, sal_uInt32 nSize)
 sal_uInt8* pData = pDataPtr;
 
 sal_uInt32 nRead = nMaxDopSize < nSize ? nMaxDopSize : nSize;
-rSt.Seek( nPos );
-if (2 > nSize || nRead != rSt.Read(pData, nRead))
-nDopError = ERR_SWG_READ_ERROR; // Error melden
+if (nSize < 2 || !checkSeek(rSt, nPos) || nRead != rSt.Read(pData, nRead))
+nDopError = ERR_SWG_READ_ERROR; // report error
 else
 {
 if (nMaxDopSize > nRead)
@@ -7575,8 +7574,8 @@ SEPr::SEPr() :
 
 bool checkSeek(SvStream &rSt, sal_uInt32 nOffset)
 {
-return (nOffset != SAL_MAX_UINT32 &&
-rSt.Seek(nOffset) == static_cast(nOffset));
+const sal_uInt64 nMaxSeek(rSt.Tell() + rSt.remainingSize());
+return (nOffset <= nMaxSeek && rSt.Seek(nOffset) == nOffset);
 }
 
 bool checkRead(SvStream &rSt, void *pDest, sal_uInt32 nLength)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Caolán McNamara
 filter/qa/cppunit/data/tiff/fail/hang-10.tiff  |binary
 filter/source/graphicfilter/itiff/lzwdecom.cxx |   12 
 2 files changed, 12 insertions(+)

New commits:
commit aed68b0c79b4edac79d18a7c273ab1bf21665614
Author: Caolán McNamara 
Date:   Mon Aug 24 15:31:41 2015 +0100

detect and reject loop in tif

Change-Id: I77d315fa432a3eb1a65539489a2ba6da8508b283
(cherry picked from commit 6b82437dca30eba0f0c9dde6fdc84cb8f7740f8f)
Reviewed-on: https://gerrit.libreoffice.org/17957
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/filter/qa/cppunit/data/tiff/fail/hang-10.tiff 
b/filter/qa/cppunit/data/tiff/fail/hang-10.tiff
new file mode 100644
index 000..e5e9ebc
Binary files /dev/null and b/filter/qa/cppunit/data/tiff/fail/hang-10.tiff 
differ
diff --git a/filter/source/graphicfilter/itiff/lzwdecom.cxx 
b/filter/source/graphicfilter/itiff/lzwdecom.cxx
index 82f6acc..5fb7514 100644
--- a/filter/source/graphicfilter/itiff/lzwdecom.cxx
+++ b/filter/source/graphicfilter/itiff/lzwdecom.cxx
@@ -19,6 +19,8 @@
 
 
 #include "lzwdecom.hxx"
+#include 
+#include 
 
 #define MAX_TABLE_SIZE 4096
 
@@ -161,8 +163,18 @@ void LZWDecompressor::AddToTable(sal_uInt16 nPrevCode, 
sal_uInt16 nCodeFirstData
 return;
 }
 
+std::vector aSeenIndexes;
 while (pTable[nCodeFirstData].nDataCount>1)
+{
+if (std::find(aSeenIndexes.begin(), aSeenIndexes.end(), 
nCodeFirstData) != aSeenIndexes.end())
+{
+SAL_WARN("filter.tiff", "Loop in chain");
+bEOIFound = true;
+return;
+}
+aSeenIndexes.push_back(nCodeFirstData);
 nCodeFirstData=pTable[nCodeFirstData].nPrevCode;
+}
 
 pTable[nTableSize].nPrevCode=nPrevCode;
 pTable[nTableSize].nDataCount=pTable[nPrevCode].nDataCount+1;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Tor Lillqvist
 vcl/inc/opengl/FixedTextureAtlas.hxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 4809c42c091e60a2b5fdfa6792c6130acf123466
Author: Tor Lillqvist 
Date:   Tue Aug 25 10:22:26 2015 +0300

Nitpick: Follow our header guard naming convention

Change-Id: I939d36dbb0a298f8181367f74001115ef89d5bc2

diff --git a/vcl/inc/opengl/FixedTextureAtlas.hxx 
b/vcl/inc/opengl/FixedTextureAtlas.hxx
index c4f5d60..3627140 100644
--- a/vcl/inc/opengl/FixedTextureAtlas.hxx
+++ b/vcl/inc/opengl/FixedTextureAtlas.hxx
@@ -8,8 +8,8 @@
  *
  */
 
-#ifndef INCLUDED_VCL_INC_OPENGL_FIXED_TEXTURE_ATLAS_H
-#define INCLUDED_VCL_INC_OPENGL_FIXED_TEXTURE_ATLAS_H
+#ifndef INCLUDED_VCL_INC_OPENGL_FIXEDTEXTUREATLAS_HXX
+#define INCLUDED_VCL_INC_OPENGL_FIXEDTEXTUREATLAS_HXX
 
 #include "opengl/texture.hxx"
 
@@ -34,6 +34,6 @@ public:
 }
 };
 
-#endif // INCLUDED_VCL_INC_OPENGL_FIXED_TEXTURE_ATLAS_H
+#endif // INCLUDED_VCL_INC_OPENGL_FIXEDTEXTUREATLAS_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Caolán McNamara
 sw/qa/core/data/ww5/pass/crash-1.doc |binary
 sw/source/filter/ww8/ww8scan.cxx |5 ++---
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit ced9ee8e90a7ce8778cf07733ce05ab85d5f4bdb
Author: Caolán McNamara 
Date:   Mon Aug 24 15:29:54 2015 +0100

loop over successfully read bookmarks

not over the amount that should be there

Change-Id: Ia2c353f9d7e274a5bebf405e1743ef1d1872b4de
(cherry picked from commit 02e9b490a9401744a8a0699ad5dd10281b6b0b30)
Reviewed-on: https://gerrit.libreoffice.org/17958
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/sw/qa/core/data/ww5/pass/crash-1.doc 
b/sw/qa/core/data/ww5/pass/crash-1.doc
new file mode 100644
index 000..5b94b9a
Binary files /dev/null and b/sw/qa/core/data/ww5/pass/crash-1.doc differ
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index c227c12..21a74b1 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -4161,10 +4161,10 @@ OUString WW8PLCFx_Book::GetBookmark(long nStart,long 
nEnd, sal_uInt16 &nIndex)
 {
 bool bFound = false;
 sal_uInt16 i = 0;
-if( pBook[0] && pBook[1] )
+if (pBook[0] && pBook[1])
 {
 WW8_CP nStartAkt, nEndAkt;
-do
+while (i < aBookNames.size())
 {
 void* p;
 sal_uInt16 nEndIdx;
@@ -4187,7 +4187,6 @@ OUString WW8PLCFx_Book::GetBookmark(long nStart,long 
nEnd, sal_uInt16 &nIndex)
 }
 ++i;
 }
-while (i < pBook[0]->GetIMax());
 }
 return bFound ? aBookNames[i] : OUString();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Stephan Bergmann
 sw/source/filter/ww8/ww8scan.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e90c874f521a9fe9f2a0f21eaf8b01aec775c16c
Author: Stephan Bergmann 
Date:   Mon Aug 24 17:21:48 2015 +0200

Handle zero nPLCF

...as found by ASan in CppunitTest_sw_filters_test:

> Testing file:///.../sw/qa/core/data/ww6/pass/crash-1.doc:
> ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020009382b0 
at pc 0x2b1dcb5eabac bp 0x7fffe8ccbdb0 sp 0x7fffe8ccbda8
> READ of size 4 at 0x6020009382b0 thread T0
>  WW8PLCF::SeekPos(int) sw/source/filter/ww8/ww8scan.cxx:2219:14
>  WW8PLCF::WW8PLCF(SvStream&, int, int, int, int, int, int) 
sw/source/filter/ww8/ww8scan.cxx:2080:9
>  WW8PLCFx_Fc_FKP::WW8PLCFx_Fc_FKP(SvStream*, SvStream*, SvStream*, WW8Fib 
const&, ePLCFT, int) sw/source/filter/ww8/ww8scan.cxx:2883:21
>  WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP(SvStream*, SvStream*, SvStream*, 
WW8ScannerBase const&, ePLCFT) sw/source/filter/ww8/ww8scan.cxx:3088:7
>  WW8ScannerBase::WW8ScannerBase(SvStream*, SvStream*, SvStream*, WW8Fib*) 
sw/source/filter/ww8/ww8scan.cxx:1588:20
>  SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) 
sw/source/filter/ww8/ww8par.cxx:5022:20
>  SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:5767:19
>  SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:6039:19
>  WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString 
const&) sw/source/filter/ww8/ww8par.cxx:6157:20
>  SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18
>  SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22
>  SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23
>  SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
sw/qa/core/filters-test.cxx:112:20
>  SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) 
sw/qa/core/filters-test.cxx:71:12
>  test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString 
const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, 
SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:129:20
>  test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:154:5
>  SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5
> 0x6020009382b1 is located 0 bytes to the right of 1-byte region 
[0x6020009382b0,0x6020009382b1)
> allocated by thread T0 here:
>  operator new[](unsigned long) 
/home/sbergman/clang/trunk/src/projects/compiler-rt/lib/asan/asan_new_delete.cc:64
>  WW8PLCF::ReadPLCF(SvStream&, int, unsigned int) 
sw/source/filter/ww8/ww8scan.cxx:2091:26
>  WW8PLCF::WW8PLCF(SvStream&, int, int, int, int, int, int) 
sw/source/filter/ww8/ww8scan.cxx:2075:9
>  WW8PLCFx_Fc_FKP::WW8PLCFx_Fc_FKP(SvStream*, SvStream*, SvStream*, WW8Fib 
const&, ePLCFT, int) sw/source/filter/ww8/ww8scan.cxx:2883:21
>  WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP(SvStream*, SvStream*, SvStream*, 
WW8ScannerBase const&, ePLCFT) sw/source/filter/ww8/ww8scan.cxx:3088:7
>  WW8ScannerBase::WW8ScannerBase(SvStream*, SvStream*, SvStream*, WW8Fib*) 
sw/source/filter/ww8/ww8scan.cxx:1588:20
>  SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) 
sw/source/filter/ww8/ww8par.cxx:5022:20
>  SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:5767:19
>  SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:6039:19
>  WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString 
const&) sw/source/filter/ww8/ww8par.cxx:6157:20
>  SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18
>  SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22
>  SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23
>  SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
sw/qa/core/filters-test.cxx:112:20
>  SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) 
sw/qa/core/filters-test.cxx:71:12
>  test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString 
const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, 
SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:129:20
>  test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
unotes

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

2015-08-25 Thread Stephan Bergmann
 sw/source/filter/ww8/ww8graf.cxx |6 ++-
 sw/source/filter/ww8/ww8scan.cxx |   73 +--
 sw/source/filter/ww8/ww8scan.hxx |2 -
 3 files changed, 52 insertions(+), 29 deletions(-)

New commits:
commit 1f3162c473c43a87b261fce83a69e44085394f45
Author: Stephan Bergmann 
Date:   Mon Aug 24 19:21:48 2015 +0200

Handle GetBaseCp overflow

...as found by UBSan in CppunitTest_sw_filters_test (see below); note the 
TODOs
how best to report the errors up the call stack.

> Testing file:///.../sw/qa/core/data/ww6/pass/crash-3.doc:
> sw/source/filter/ww8/ww8scan.cxx:5240:63: runtime error: signed integer 
overflow: 175948 + 1768712052 cannot be represented in type 'int'
>  WW8Fib::GetBaseCp(ManTypes) const 
sw/source/filter/ww8/ww8scan.cxx:5240:63
>  SwWW8ImplReader::Read_GrafLayer(long) 
sw/source/filter/ww8/ww8graf.cxx:2393:18
>  SwWW8ImplReader::ReadChar(long, long) 
sw/source/filter/ww8/ww8par.cxx:3630:17
>  SwWW8ImplReader::ReadChars(int&, int, long, long) 
sw/source/filter/ww8/ww8par.cxx:3432:27
>  SwWW8ImplReader::ReadText(int, int, ManTypes) 
sw/source/filter/ww8/ww8par.cxx:3970:22
>  SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) 
sw/source/filter/ww8/ww8par.cxx:5169:9
>  SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:5767:19
>  SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:6039:19
>  WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString 
const&) sw/source/filter/ww8/ww8par.cxx:6157:20
>  SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18
>  SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22
>  SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23
>  SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
sw/qa/core/filters-test.cxx:112:20
>  SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) 
sw/qa/core/filters-test.cxx:71:12
>  test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString 
const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, 
SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:129:20
>  test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:154:5
>  SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5

Change-Id: I0b14f5c1e025565eb131e64590b7d5ff0135e767
Reviewed-on: https://gerrit.libreoffice.org/17965
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit d281b4607638231b8a3716bdc80846c24ce55cc7)
Reviewed-on: https://gerrit.libreoffice.org/17969
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 6d5ee95..d3156f3 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -867,7 +867,8 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, 
WW8_CP& rEndCp,
 // den um -2 (bzw. -1 bei Ver8) korrigierten End-Cp zurueck
 sal_Int32 SwWW8ImplReader::GetRangeAsDrawingString(OUString& rString, long 
nStartCp, long nEndCp, ManTypes eType)
 {
-WW8_CP nOffset = m_pWwFib->GetBaseCp(eType);
+WW8_CP nOffset = 0;
+m_pWwFib->GetBaseCp(eType, &nOffset); //TODO: check return value
 
 OSL_ENSURE(nStartCp <= nEndCp, "+Wo ist der Grafik-Text (7) ?");
 if (nStartCp == nEndCp)
@@ -2390,7 +2391,8 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long 
nGrafAnchorCp )
 
 ::SetProgressState(m_nProgress, m_pDocShell); // Update
 
-m_nDrawCpO = m_pWwFib->GetBaseCp(m_pPlcxMan->GetManType() == MAN_HDFT ? 
MAN_TXBX_HDFT : MAN_TXBX);
+m_nDrawCpO = 0;
+m_pWwFib->GetBaseCp(m_pPlcxMan->GetManType() == MAN_HDFT ? MAN_TXBX_HDFT : 
MAN_TXBX, &m_nDrawCpO); //TODO: check return value
 
 GrafikCtor();
 
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 312abf4..1f7f526 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -4595,7 +4595,9 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes 
nType, long nStartCp,
 break;
 }
 
-nCpO = pWwFib->GetBaseCp(nType);
+WW8_CP cp = 0;
+pWwFib->GetBaseCp(nType, &cp); //TODO: check return value
+nCpO = cp;
 
 if( nStartCp || nCpO )
 SeekPos( nStartCp );// PLCFe auf Text-StartPos einstellen
@@ -5235,46 +5237,65 @@ namespace
 }
 }
 
-WW8_CP WW8Fib::GetBaseCp(ManTypes nType) const
+bool WW8Fib::GetBaseCp(ManTypes nType, WW8_CP * cp) const
 {
+assert(cp != nullptr);
   

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

2015-08-25 Thread Caolán McNamara
 sw/source/filter/ww8/ww8graf.cxx |2 +-
 sw/source/filter/ww8/ww8par.cxx  |3 ++-
 sw/source/filter/ww8/ww8par.hxx  |3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 436ccb0df15c1c654e5b3eebfd3ba94ddd2341c5
Author: Caolán McNamara 
Date:   Mon Aug 24 20:36:58 2015 +0100

consider validity of m_nDrawCpO

(cherry picked from commit 8329eb5e4a368f29501cfdf060f96e52df912dd2)

Change-Id: Ifbd131440bad6d840d369c99628cb8904697ad96
Reviewed-on: https://gerrit.libreoffice.org/17971
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index d3156f3..77e9712 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2392,7 +2392,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long 
nGrafAnchorCp )
 ::SetProgressState(m_nProgress, m_pDocShell); // Update
 
 m_nDrawCpO = 0;
-m_pWwFib->GetBaseCp(m_pPlcxMan->GetManType() == MAN_HDFT ? MAN_TXBX_HDFT : 
MAN_TXBX, &m_nDrawCpO); //TODO: check return value
+m_bDrawCpOValid = m_pWwFib->GetBaseCp(m_pPlcxMan->GetManType() == MAN_HDFT 
? MAN_TXBX_HDFT : MAN_TXBX, &m_nDrawCpO);
 
 GrafikCtor();
 
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 1a33e2b..583d876 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4183,6 +4183,7 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, 
SotStorage* pStorage,
 , m_nIniFlags1(0)
 , m_nFieldFlags(0)
 , m_bRegardHindiDigits( false )
+, m_bDrawCpOValid( false )
 , m_nDrawCpO(0)
 , m_nPicLocFc(0)
 , m_nObjLocFc(0)
@@ -6182,7 +6183,7 @@ bool SwMSDffManager::GetOLEStorageName(long nOLEId, 
OUString& rStorageName,
 // Note: Ask MM for initialization of  and .
 // Note: Ask MM about assertions in method 
.
 WW8_CP nStartCp, nEndCp;
-if ( rReader.GetTxbxTextSttEndCp(nStartCp, nEndCp,
+if ( rReader.m_bDrawCpOValid && 
rReader.GetTxbxTextSttEndCp(nStartCp, nEndCp,
 static_cast((nOLEId >> 16) & 0x),
 static_cast(nOLEId & 0x)) )
 {
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index e53eb76..9808af9 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1267,7 +1267,8 @@ private:
 sal_uInt32 m_nFieldTagBad[3];  // dito fuers Taggen von nicht 
importierbaren F.
 bool m_bRegardHindiDigits;  // import digits in CTL scripts as Hindi 
numbers
 
-WW8_CP m_nDrawCpO;// Anfang der Txbx-SubDocs
+bool m_bDrawCpOValid;
+WW8_CP m_nDrawCpO;// start of Txbx-SubDocs
 
 sal_uLong m_nPicLocFc;// Picture Location in File (FC)
 sal_uLong m_nObjLocFc;// Object Location in File (FC)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Caolán McNamara
 filter/qa/cppunit/data/pbm/fail/crash-1.pbm |6 ++
 filter/source/graphicfilter/ipbm/ipbm.cxx   |   11 ++-
 2 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 25418bf4997e3f1b31e0da87ee0947ad9c8da2ce
Author: Caolán McNamara 
Date:   Mon Aug 24 20:43:37 2015 +0100

in reality we are limited to max sal_Int32 here

so accept that and test if the values were accepted or limited

Change-Id: Iaed5ebc2f12b52055506147c71117a2ad88d28ac
(cherry picked from commit 0a76c1fd6875bd094ebe2bfbed3d01c98dc0c19e)
Reviewed-on: https://gerrit.libreoffice.org/17972
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/filter/qa/cppunit/data/pbm/fail/crash-1.pbm 
b/filter/qa/cppunit/data/pbm/fail/crash-1.pbm
new file mode 100644
index 000..9ddcddf
--- /dev/null
+++ b/filter/qa/cppunit/data/pbm/fail/crash-1.pbm
@@ -0,0 +1,6 @@
+P3
+3000 1
+255
+103  79  59
+ 95  7P  55
+ 87  67  51
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx 
b/filter/source/graphicfilter/ipbm/ipbm.cxx
index e545334..18b3249 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -37,7 +37,7 @@ private:
 sal_uLong   mnMode; // 0->PBM, 1->PGM, 2->PPM
 Bitmap  maBmp;
 BitmapWriteAccess*  mpAcc;
-sal_uLong   mnWidth, mnHeight;  // dimensions in pixel
+sal_Int32   mnWidth, mnHeight;  // dimensions in pixel
 sal_uLong   mnCol;
 sal_uLong   mnMaxVal;   // max value in the 
 boolImplReadBody();
@@ -83,7 +83,7 @@ bool PBMReader::ReadPBM(Graphic & rGraphic )
 if ( !( mbStatus = ImplReadHeader() ) )
 return false;
 
-if ( ( mnMaxVal == 0 ) || ( mnWidth == 0 ) || ( mnHeight == 0 ) )
+if ( ( mnMaxVal == 0 ) || ( mnWidth <= 0 ) || ( mnHeight <= 0 ) )
 return false;
 
 // 0->PBM, 1->PGM, 2->PPM
@@ -91,7 +91,8 @@ bool PBMReader::ReadPBM(Graphic & rGraphic )
 {
 case 0 :
 maBmp = Bitmap( Size( mnWidth, mnHeight ), 1 );
-if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == 0 )
+mpAcc = maBmp.AcquireWriteAccess();
+if (!mpAcc || mpAcc->Width() != mnWidth || mpAcc->Height() != 
mnHeight)
 return false;
 mpAcc->SetPaletteEntryCount( 2 );
 mpAcc->SetPaletteColor( 0, BitmapColor( 0xff, 0xff, 0xff ) );
@@ -242,8 +243,8 @@ bool PBMReader::ImplReadBody()
 boolbPara, bFinished = false;
 sal_uInt8   nDat = 0, nCount;
 sal_uLong   nGrey, nRGB[3];
-sal_uLong   nWidth = 0;
-sal_uLong   nHeight = 0;
+sal_Int32 nWidth = 0;
+sal_Int32 nHeight = 0;
 
 if ( mbRaw )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Caolán McNamara
 sw/qa/core/data/ww5/pass/crash-2.doc |binary
 sw/source/filter/ww8/ww8par4.cxx |9 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 666fb214e93d542dd80e48b9e008727129b5764f
Author: Caolán McNamara 
Date:   Tue Aug 25 08:55:09 2015 +0100

there may be no storage available in older formats

Change-Id: I23cbaf7fc1320168eb75ca33fd6d704125508785

diff --git a/sw/qa/core/data/ww5/pass/crash-2.doc 
b/sw/qa/core/data/ww5/pass/crash-2.doc
new file mode 100644
index 000..23a1897
Binary files /dev/null and b/sw/qa/core/data/ww5/pass/crash-2.doc differ
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index 22f75da..5ef7a77 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -337,8 +337,11 @@ bool 
SwWW8ImplReader::ImportOleWMF(tools::SvRef xSrc1,GDIMetaFile &r
 SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
 const Graphic* pGrf, const SfxItemSet* pFlySet, const Rectangle& aVisArea )
 {
-SdrObject* pRet = 0;
-OSL_ENSURE( m_pStg, "ohne storage geht hier fast gar nichts!" );
+if (!m_pStg)
+{
+SAL_WARN("sw.ww8", "no storage for ole objects");
+return nullptr;
+}
 
 ::SetProgressState( m_nProgress, m_rDoc.GetDocShell() ); // Update
 
@@ -390,6 +393,8 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
 }
 }
 
+SdrObject* pRet = 0;
+
 if (!(m_bIsHeader || m_bIsFooter))
 {
 //Can't put them in headers/footers :-(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Caolán McNamara
 sw/qa/core/data/ww5/pass/hang-1.doc |binary
 sw/source/filter/ww8/ww8scan.cxx|   19 ++-
 sw/source/filter/ww8/ww8scan.hxx|1 +
 3 files changed, 19 insertions(+), 1 deletion(-)

New commits:
commit 76bd64a9d09e06a38747c25f9ad93dff5376aeaf
Author: Caolán McNamara 
Date:   Mon Aug 24 12:36:41 2015 +0100

guard against hangs with bogus unsorted plcfs

This reverts commit 6d21cbd1238556535ec1bb1adf35b25bc8eb898b.

(cherry picked from commit 74c0f74422671f8005f2cfc0ae94e5656bcea31e)

Change-Id: I309302ab5357b8404ee4c75bd0bfcb4f816e0588
Reviewed-on: https://gerrit.libreoffice.org/17953
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/sw/qa/core/data/ww5/pass/hang-1.doc 
b/sw/qa/core/data/ww5/pass/hang-1.doc
new file mode 100644
index 000..6033724
Binary files /dev/null and b/sw/qa/core/data/ww5/pass/hang-1.doc differ
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 7b65eb6..0339495 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2121,7 +2121,9 @@ void WW8PLCF::ReadPLCF(SvStream& rSt, WW8_FC nFilePos, 
sal_uInt32 nPLCF)
 nIdx = 0;
 #endif // OSL_BIGENDIAN
 // Pointer to content array
-pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
+pPLCF_Contents = reinterpret_cast(&pPLCF_PosArray[nIMax + 
1]);
+
+TruncToSortedRange();
 }
 
 OSL_ENSURE(bValid, "Document has corrupt PLCF, ignoring it");
@@ -2141,6 +2143,21 @@ void WW8PLCF::MakeFailedPLCF()
 pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
 }
 
+void WW8PLCF::TruncToSortedRange()
+{
+//Docs state that: ... all Plcs ... are sorted in ascending order.
+//So ensure that here for broken documents.
+for (auto nI = 0; nI < nIMax; ++nI)
+{
+if (pPLCF_PosArray[nI] > pPLCF_PosArray[nI+1])
+{
+SAL_WARN("sw.ww8", "Document has unsorted PLCF, truncated to 
sorted portion");
+nIMax = nI;
+break;
+}
+}
+}
+
 void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN)
 {
 OSL_ENSURE( nIMax < ncpN, "Pcl.Fkp: Why is PLCF too big?" );
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 57e53e9..d931e1c 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -292,6 +292,7 @@ private:
 
 void MakeFailedPLCF();
 
+void TruncToSortedRange();
 public:
 WW8PLCF(SvStream& rSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
 WW8_CP nStartPos = -1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - ae/c10dffbd66cc6b4a8fc7ca6bb75cf589c81509

2015-08-25 Thread Caolán McNamara
 ae/c10dffbd66cc6b4a8fc7ca6bb75cf589c81509 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit a41d5500f211b5ba18605d54f91977c09ddd3046
Author: Caolán McNamara 
Date:   Tue Aug 25 08:58:14 2015 +0100

Notes added by 'git notes add'

diff --git a/ae/c10dffbd66cc6b4a8fc7ca6bb75cf589c81509 
b/ae/c10dffbd66cc6b4a8fc7ca6bb75cf589c81509
new file mode 100644
index 000..837381f
--- /dev/null
+++ b/ae/c10dffbd66cc6b4a8fc7ca6bb75cf589c81509
@@ -0,0 +1 @@
+prefer: 6cd04e9ea447a4828a6fc03d47a7d136f3914501
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Caolán McNamara
 sw/qa/core/data/ww5/pass/hang-2.doc |binary
 sw/source/filter/ww8/ww8scan.cxx|9 -
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 35b895a710b9f43fbffc6ff7dcc461de4663bbba
Author: Caolán McNamara 
Date:   Mon Aug 24 14:05:00 2015 +0100

limit seeks to valid area

(cherry picked from commit c0c9075163f06c0b5c2ad9cf428f1cfacf9fe1fb)

Change-Id: I401d93491999a3fc3db4f597eea9c4fe5b9bc926
Reviewed-on: https://gerrit.libreoffice.org/17956
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/sw/qa/core/data/ww5/pass/hang-2.doc 
b/sw/qa/core/data/ww5/pass/hang-2.doc
new file mode 100644
index 000..5f76093
Binary files /dev/null and b/sw/qa/core/data/ww5/pass/hang-2.doc differ
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 0339495..366bd31 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -6698,9 +6698,8 @@ WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 
nPos, sal_uInt32 nSize)
 sal_uInt8* pData = pDataPtr;
 
 sal_uInt32 nRead = nMaxDopSize < nSize ? nMaxDopSize : nSize;
-rSt.Seek( nPos );
-if (2 > nSize || nRead != rSt.Read(pData, nRead))
-nDopError = ERR_SWG_READ_ERROR; // Error melden
+if (nSize < 2 || !checkSeek(rSt, nPos) || nRead != rSt.Read(pData, nRead))
+nDopError = ERR_SWG_READ_ERROR; // report error
 else
 {
 if (nMaxDopSize > nRead)
@@ -7547,8 +7546,8 @@ SEPr::SEPr() :
 
 bool checkSeek(SvStream &rSt, sal_uInt32 nOffset)
 {
-return (nOffset != SAL_MAX_UINT32 &&
-rSt.Seek(nOffset) == static_cast(nOffset));
+const sal_uInt64 nMaxSeek(rSt.Tell() + rSt.remainingSize());
+return (nOffset <= nMaxSeek && rSt.Seek(nOffset) == nOffset);
 }
 
 bool checkRead(SvStream &rSt, void *pDest, sal_uInt32 nLength)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 6 commits - basctl/source include/tools sc/source svtools/source sw/source

2015-08-25 Thread Noel Grandin
 basctl/source/dlged/dlgedview.cxx|4 -
 include/tools/gen.hxx|   98 +--
 sc/source/ui/cctrl/cbuttonw.cxx  |2 
 svtools/source/hatchwindow/ipwin.cxx |   38 ++---
 sw/source/core/draw/dcontact.cxx |2 
 sw/source/core/draw/dflyobj.cxx  |8 --
 6 files changed, 39 insertions(+), 113 deletions(-)

New commits:
commit 2a0f9f08914fad8ec858d2a8d6e9d16ceddaa7e3
Author: Noel Grandin 
Date:   Thu Aug 20 16:46:41 2015 +0200

simplify some declarations

Change-Id: I348e7f984e5e8b4b915d11de8182da07a6356f8d

diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index e0b7ace..74e97ba 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -39,8 +39,8 @@ enum TriState { TRISTATE_FALSE, TRISTATE_TRUE, TRISTATE_INDET 
};
 class SAL_WARN_UNUSED Pair
 {
 public:
-Pair();
-Pair( long nA, long nB );
+Pair() : nA(0), nB(0) {}
+Pair( long _nA, long _nB ) : nA(_nA), nB(_nB) {}
 
 longA() const { return nA; }
 longB() const { return nB; }
@@ -59,17 +59,6 @@ protected:
 longnB;
 };
 
-inline Pair::Pair()
-{
-nA = nB = 0;
-}
-
-inline Pair::Pair( long _nA, long _nB )
-{
-Pair::nA = _nA;
-Pair::nB = _nB;
-}
-
 inline bool Pair::operator == ( const Pair& rPair ) const
 {
 return ((nA == rPair.nA) && (nB == rPair.nB));
@@ -85,8 +74,8 @@ inline bool Pair::operator != ( const Pair& rPair ) const
 class SAL_DLLPUBLIC_EXPORT SAL_WARN_UNUSED Point : public Pair
 {
 public:
-Point();
-Point( long nX, long nY );
+Point() {}
+Point( long nX, long nY ) : Pair( nX, nY ) {}
 
 longX() const { return nA; }
 longY() const { return nB; }
@@ -115,14 +104,6 @@ public:
 voidsetY(long nY)  { Y() = nY; }
 };
 
-inline Point::Point()
-{
-}
-
-inline Point::Point( long nX, long nY ) : Pair( nX, nY )
-{
-}
-
 inline void Point::Move( long nHorzMove, long nVertMove )
 {
 nA += nHorzMove;
@@ -189,8 +170,8 @@ inline std::basic_ostream & operator <<(
 class SAL_WARN_UNUSED Size : public Pair
 {
 public:
-Size();
-Size( long nWidth, long nHeight );
+Size() {}
+Size( long nWidth, long nHeight ) : Pair( nWidth, nHeight 
) {}
 
 longWidth() const  { return nA; }
 longHeight() const { return nB; }
@@ -204,15 +185,6 @@ public:
 voidsetHeight(long nHeight)  { Height() = nHeight; }
 };
 
-inline Size::Size()
-{
-}
-
-inline Size::Size( long nWidth, long nHeight ) :
-Pair( nWidth, nHeight )
-{
-}
-
 template< typename charT, typename traits >
 inline std::basic_ostream & operator <<(
 std::basic_ostream & stream, const Size& size )
@@ -227,8 +199,8 @@ inline std::basic_ostream & operator <<(
 class SAL_WARN_UNUSED Range : public Pair
 {
 public:
-Range();
-Range( long nMin, long nMax );
+Range() {}
+Range( long nMin, long nMax ) : Pair( nMin, nMax ) {}
 
 longMin() const { return nA; }
 longMax() const { return nB; }
@@ -242,14 +214,6 @@ public:
 voidJustify();
 };
 
-inline Range::Range()
-{
-}
-
-inline Range::Range( long nMin, long nMax ) : Pair( nMin, nMax )
-{
-}
-
 inline bool Range::IsInside( long nIs ) const
 {
 return ((nA <= nIs) && (nIs <= nB ));
@@ -280,9 +244,9 @@ inline std::basic_ostream & operator <<(
 class SAL_WARN_UNUSED Selection : public Pair
 {
 public:
-Selection();
-Selection( long nPos );
-Selection( long nMin, long nMax );
+Selection() {}
+Selection( long nPos ) : Pair( nPos, nPos ) {}
+Selection( long nMin, long nMax ) : Pair( nMin, nMax ) {}
 
 longMin() const { return nA; }
 longMax() const { return nB; }
@@ -302,19 +266,6 @@ public:
 voidsetMax(long nMax)  { Max() = nMax; }
 };
 
-inline Selection::Selection()
-{
-}
-
-inline Selection::Selection( long nPos ) : Pair( nPos, nPos )
-{
-}
-
-inline Selection::Selection( long nMin, long nMax ) :
-   Pair( nMin, nMax )
-{
-}
-
 inline bool Selection::IsInside( long nIs ) const
 {
 return ((nA <= nIs) && (nIs < nB ));
@@ -470,7 +421,7 @@ inline Rectangle::Rectangle( const Point& rLT, const Size& 
rSize )
 
 inline bool Rectangle::IsEmpty() const
 {
-return ((nRight == RECT_EMPTY) || (nBottom == RECT_EMPTY));
+return (nRight == RECT_EMPTY) || (nBottom == RECT_EMPTY);
 }
 
 inline Point Rectangle::TopLeft() const
@@ -623,18 +574,18 @@ inline Rectangle Rectangle::GetIntersection( const 
Rectangle& rRect 

[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 7b/40f37a5a85526fb5651e8ab4fdff0b8e9e61d3

2015-08-25 Thread Caolán McNamara
 7b/40f37a5a85526fb5651e8ab4fdff0b8e9e61d3 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 18f0b292eed0c9568ac5584074eb56815dcf6294
Author: Caolán McNamara 
Date:   Tue Aug 25 08:59:09 2015 +0100

Notes added by 'git notes add'

diff --git a/7b/40f37a5a85526fb5651e8ab4fdff0b8e9e61d3 
b/7b/40f37a5a85526fb5651e8ab4fdff0b8e9e61d3
new file mode 100644
index 000..8ebbe55
--- /dev/null
+++ b/7b/40f37a5a85526fb5651e8ab4fdff0b8e9e61d3
@@ -0,0 +1 @@
+ignore: obsolete
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - c0/40a9c430a21c074b0d31ae91a9ff579537c40e

2015-08-25 Thread Caolán McNamara
 c0/40a9c430a21c074b0d31ae91a9ff579537c40e |1 +
 1 file changed, 1 insertion(+)

New commits:
commit d96beba1fd9fcb273806394376d2f713cb99a319
Author: Caolán McNamara 
Date:   Tue Aug 25 08:58:43 2015 +0100

Notes added by 'git notes add'

diff --git a/c0/40a9c430a21c074b0d31ae91a9ff579537c40e 
b/c0/40a9c430a21c074b0d31ae91a9ff579537c40e
new file mode 100644
index 000..8e5c182
--- /dev/null
+++ b/c0/40a9c430a21c074b0d31ae91a9ff579537c40e
@@ -0,0 +1 @@
+ignore: aoo
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sal/osl

2015-08-25 Thread Michael Meeks
 sal/osl/unx/signal.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d5cc5bb38445c9b0acf33b463d722b504ac84df6
Author: Michael Meeks 
Date:   Fri Aug 21 10:00:47 2015 +0100

tdf#93569 - restore ACT_ABORT distinction.

In order to handle signals, we need to have ACT_ABORT in place
and distinct from ACT_SYSTEM.

cf. if (Signals[i].Action != ACT_SYSTEM) during setup.

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

diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 050aa81..76ee790 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -65,7 +65,7 @@
 #define ACT_EXIT2
 #define ACT_SYSTEM  3
 #define ACT_HIDE4
-#define ACT_ABORT   ACT_SYSTEM
+#define ACT_ABORT   5
 
 #if defined HAVE_VALGRIND_HEADERS
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - configure.ac download.lst external/libmwaw filter/source writerperfect/qa writerperfect/source

2015-08-25 Thread David Tardon
 configure.ac   |2 
 download.lst   |4 
 external/libmwaw/Library_mwaw.mk   |6 
 filter/source/config/fragments/filters/Mac_RagTime.xcu |2 
 writerperfect/qa/unit/data/draw/libmwaw/pass/MacDraft_5.5.drw  |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/RagTime_5.5.rag |binary
 writerperfect/source/common/WPFTEncodingDialog.cxx |   99 
++
 writerperfect/source/common/WPXSvInputStream.cxx   |2 
 8 files changed, 77 insertions(+), 38 deletions(-)

New commits:
commit 6b0585a5b7e32d9acb6d8bc5f15d187959c7cc5b
Author: David Tardon 
Date:   Mon Aug 24 20:49:00 2015 +0200

upload libmwaw 0.3.6

Change-Id: I09249673d42d36bf72ee1ffbf8f3f37734bd8bae

diff --git a/configure.ac b/configure.ac
index 5944d23..145c3d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7698,7 +7698,7 @@ 
libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
 dnl ===
 dnl Check for system libmwaw
 dnl ===
-libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.5])
+libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.6])
 
 dnl ===
 dnl Check for system libpagemaker
diff --git a/download.lst b/download.lst
index bc5a9f6..0f321c0 100644
--- a/download.lst
+++ b/download.lst
@@ -105,8 +105,8 @@ export MDDS_MD5SUM := ef2560ed5416652a7fe195305b14cebe
 export MDDS_TARBALL := mdds_0.12.1.tar.bz2
 export MSPUB_MD5SUM := ff9d0f9dd8fbc523408ea1953d5bde41
 export MSPUB_TARBALL := libmspub-0.1.2.tar.bz2
-export MWAW_MD5SUM := bdc58bbf89aaaf6d29b3516d96830a06
-export MWAW_VERSION_MICRO := 5
+export MWAW_MD5SUM := a8364bf2e4ece2860ab96d6bee75f1d7
+export MWAW_VERSION_MICRO := 6
 export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.bz2
 export MYSQLCPPCONN_TARBALL := 
7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
diff --git a/external/libmwaw/Library_mwaw.mk b/external/libmwaw/Library_mwaw.mk
index 052362a..f5aeee0 100644
--- a/external/libmwaw/Library_mwaw.mk
+++ b/external/libmwaw/Library_mwaw.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_Library_add_defs,mwaw,\
 $(eval $(call gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/ActaParser \
UnpackedTarball/libmwaw/src/lib/ActaText \
+   UnpackedTarball/libmwaw/src/lib/ApplePictParser \
UnpackedTarball/libmwaw/src/lib/BeagleWksBMParser \
UnpackedTarball/libmwaw/src/lib/BeagleWksDBParser \
UnpackedTarball/libmwaw/src/lib/BeagleWksDRParser \
@@ -117,6 +118,8 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/MWAWTable \
UnpackedTarball/libmwaw/src/lib/MWAWTextListener \
UnpackedTarball/libmwaw/src/lib/MacDocParser \
+   UnpackedTarball/libmwaw/src/lib/MacDraft5Parser \
+   UnpackedTarball/libmwaw/src/lib/MacDraft5StyleManager \
UnpackedTarball/libmwaw/src/lib/MacDraftParser \
UnpackedTarball/libmwaw/src/lib/MacDrawParser \
UnpackedTarball/libmwaw/src/lib/MacDrawProParser \
@@ -152,9 +155,12 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/NisusWrtText \
UnpackedTarball/libmwaw/src/lib/RagTime5ClusterManager \
UnpackedTarball/libmwaw/src/lib/RagTime5Graph \
+   UnpackedTarball/libmwaw/src/lib/RagTime5Layout \
UnpackedTarball/libmwaw/src/lib/RagTime5Parser \
+   UnpackedTarball/libmwaw/src/lib/RagTime5Pipeline \
UnpackedTarball/libmwaw/src/lib/RagTime5Spreadsheet \
UnpackedTarball/libmwaw/src/lib/RagTime5StructManager \
+   UnpackedTarball/libmwaw/src/lib/RagTime5StyleManager \
UnpackedTarball/libmwaw/src/lib/RagTime5Text \
UnpackedTarball/libmwaw/src/lib/RagTimeParser \
UnpackedTarball/libmwaw/src/lib/RagTimeSpreadsheet \
diff --git a/filter/source/config/fragments/filters/Mac_RagTime.xcu 
b/filter/source/config/fragments/filters/Mac_RagTime.xcu
index 69a23b2..6344292 100644
--- a/filter/source/config/fragments/filters/Mac_RagTime.xcu
+++ b/filter/source/config/fragments/filters/Mac_RagTime.xcu
@@ -15,7 +15,7 @@
 com.sun.star.comp.Writer.MWAWImportFilter
 
 
-RagTime Mac v2-3 Document
+RagTime Mac v2-5 Document
 
 
 0
diff --git a/writerperfect/qa/unit/data/draw/libmwaw/pass/MacDraft_5.5.drw 
b/writerperfect/qa/unit/data/draw/libmwaw/pass/MacDraft_5.5.drw
new file mode 100644
index 000..5bb15fc
Binary files /dev/null and 
b/writerperfect/qa/unit/data/draw/libmwaw/pass/MacDraft_5.5.drw differ
diff --git a/writerperfect/qa/unit/data/writer/libmw

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

2015-08-25 Thread Caolán McNamara
 sw/qa/core/data/ww5/pass/crash-1.doc |binary
 sw/source/filter/ww8/ww8scan.cxx |5 ++---
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit fc8da14e6ec6db437bd2959efd63391c7632a23d
Author: Caolán McNamara 
Date:   Mon Aug 24 15:29:54 2015 +0100

loop over successfully read bookmarks

not over the amount that should be there

Change-Id: Ia2c353f9d7e274a5bebf405e1743ef1d1872b4de
(cherry picked from commit 02e9b490a9401744a8a0699ad5dd10281b6b0b30)
Reviewed-on: https://gerrit.libreoffice.org/17960
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/sw/qa/core/data/ww5/pass/crash-1.doc 
b/sw/qa/core/data/ww5/pass/crash-1.doc
new file mode 100644
index 000..5b94b9a
Binary files /dev/null and b/sw/qa/core/data/ww5/pass/crash-1.doc differ
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 366bd31..1a97613 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -4142,10 +4142,10 @@ OUString WW8PLCFx_Book::GetBookmark(long nStart,long 
nEnd, sal_uInt16 &nIndex)
 {
 bool bFound = false;
 sal_uInt16 i = 0;
-if( pBook[0] && pBook[1] )
+if (pBook[0] && pBook[1])
 {
 WW8_CP nStartAkt, nEndAkt;
-do
+while (i < aBookNames.size())
 {
 void* p;
 sal_uInt16 nEndIdx;
@@ -4168,7 +4168,6 @@ OUString WW8PLCFx_Book::GetBookmark(long nStart,long 
nEnd, sal_uInt16 &nIndex)
 }
 ++i;
 }
-while (i < pBook[0]->GetIMax());
 }
 return bFound ? aBookNames[i] : OUString();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Stephan Bergmann
 sw/source/filter/ww8/ww8graf.cxx |6 ++-
 sw/source/filter/ww8/ww8scan.cxx |   73 +--
 sw/source/filter/ww8/ww8scan.hxx |2 -
 3 files changed, 52 insertions(+), 29 deletions(-)

New commits:
commit b0b558e2ef87a102582ea7fd5df73c9cee460b3b
Author: Stephan Bergmann 
Date:   Mon Aug 24 19:21:48 2015 +0200

Handle GetBaseCp overflow

...as found by UBSan in CppunitTest_sw_filters_test (see below); note the 
TODOs
how best to report the errors up the call stack.

> Testing file:///.../sw/qa/core/data/ww6/pass/crash-3.doc:
> sw/source/filter/ww8/ww8scan.cxx:5240:63: runtime error: signed integer 
overflow: 175948 + 1768712052 cannot be represented in type 'int'
>  WW8Fib::GetBaseCp(ManTypes) const 
sw/source/filter/ww8/ww8scan.cxx:5240:63
>  SwWW8ImplReader::Read_GrafLayer(long) 
sw/source/filter/ww8/ww8graf.cxx:2393:18
>  SwWW8ImplReader::ReadChar(long, long) 
sw/source/filter/ww8/ww8par.cxx:3630:17
>  SwWW8ImplReader::ReadChars(int&, int, long, long) 
sw/source/filter/ww8/ww8par.cxx:3432:27
>  SwWW8ImplReader::ReadText(int, int, ManTypes) 
sw/source/filter/ww8/ww8par.cxx:3970:22
>  SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) 
sw/source/filter/ww8/ww8par.cxx:5169:9
>  SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:5767:19
>  SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:6039:19
>  WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString 
const&) sw/source/filter/ww8/ww8par.cxx:6157:20
>  SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18
>  SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22
>  SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23
>  SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
sw/qa/core/filters-test.cxx:112:20
>  SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) 
sw/qa/core/filters-test.cxx:71:12
>  test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString 
const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, 
SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:129:20
>  test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:154:5
>  SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5

Reviewed-on: https://gerrit.libreoffice.org/17965
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit d281b4607638231b8a3716bdc80846c24ce55cc7)

Change-Id: I0b14f5c1e025565eb131e64590b7d5ff0135e767
Reviewed-on: https://gerrit.libreoffice.org/17970
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index cf0f39b..6562bc7 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -883,7 +883,8 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, 
WW8_CP& rEndCp,
 // den um -2 (bzw. -1 bei Ver8) korrigierten End-Cp zurueck
 sal_Int32 SwWW8ImplReader::GetRangeAsDrawingString(OUString& rString, long 
nStartCp, long nEndCp, ManTypes eType)
 {
-WW8_CP nOffset = pWwFib->GetBaseCp(eType);
+WW8_CP nOffset = 0;
+pWwFib->GetBaseCp(eType, &nOffset); //TODO: check return value
 
 OSL_ENSURE(nStartCp <= nEndCp, "+Wo ist der Grafik-Text (7) ?");
 if (nStartCp == nEndCp)
@@ -2375,7 +2376,8 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long 
nGrafAnchorCp )
 
 ::SetProgressState(nProgress, mpDocShell); // Update
 
-nDrawCpO = pWwFib->GetBaseCp(pPlcxMan->GetManType() == MAN_HDFT ? 
MAN_TXBX_HDFT : MAN_TXBX);
+nDrawCpO = 0;
+pWwFib->GetBaseCp(pPlcxMan->GetManType() == MAN_HDFT ? MAN_TXBX_HDFT : 
MAN_TXBX, &nDrawCpO); //TODO: check return value
 
 GrafikCtor();
 
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 9ae3fe8..7070a94 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -4576,7 +4576,9 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes 
nType, long nStartCp,
 break;
 }
 
-nCpO = pWwFib->GetBaseCp(nType);
+WW8_CP cp = 0;
+pWwFib->GetBaseCp(nType, &cp); //TODO: check return value
+nCpO = cp;
 
 if( nStartCp || nCpO )
 SeekPos( nStartCp );// PLCFe auf Text-StartPos einstellen
@@ -5216,46 +5218,65 @@ namespace
 }
 }
 
-WW8_CP WW8Fib::GetBaseCp(ManTypes nType) const
+bool WW8Fib::GetBaseCp(ManTypes nType, WW8_CP * cp) const
 {
+assert(cp != nullptr);
 WW8_CP nOffset = 0;

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

2015-08-25 Thread Stephan Bergmann
 sw/source/filter/ww8/ww8scan.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit bd409ff7c3ce8fa6fc890d91a30fc0996fe4651b
Author: Stephan Bergmann 
Date:   Mon Aug 24 17:21:48 2015 +0200

Handle zero nPLCF

...as found by ASan in CppunitTest_sw_filters_test:

> Testing file:///.../sw/qa/core/data/ww6/pass/crash-1.doc:
> ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020009382b0 
at pc 0x2b1dcb5eabac bp 0x7fffe8ccbdb0 sp 0x7fffe8ccbda8
> READ of size 4 at 0x6020009382b0 thread T0
>  WW8PLCF::SeekPos(int) sw/source/filter/ww8/ww8scan.cxx:2219:14
>  WW8PLCF::WW8PLCF(SvStream&, int, int, int, int, int, int) 
sw/source/filter/ww8/ww8scan.cxx:2080:9
>  WW8PLCFx_Fc_FKP::WW8PLCFx_Fc_FKP(SvStream*, SvStream*, SvStream*, WW8Fib 
const&, ePLCFT, int) sw/source/filter/ww8/ww8scan.cxx:2883:21
>  WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP(SvStream*, SvStream*, SvStream*, 
WW8ScannerBase const&, ePLCFT) sw/source/filter/ww8/ww8scan.cxx:3088:7
>  WW8ScannerBase::WW8ScannerBase(SvStream*, SvStream*, SvStream*, WW8Fib*) 
sw/source/filter/ww8/ww8scan.cxx:1588:20
>  SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) 
sw/source/filter/ww8/ww8par.cxx:5022:20
>  SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:5767:19
>  SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:6039:19
>  WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString 
const&) sw/source/filter/ww8/ww8par.cxx:6157:20
>  SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18
>  SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22
>  SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23
>  SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
sw/qa/core/filters-test.cxx:112:20
>  SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) 
sw/qa/core/filters-test.cxx:71:12
>  test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString 
const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, 
SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:129:20
>  test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:154:5
>  SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5
> 0x6020009382b1 is located 0 bytes to the right of 1-byte region 
[0x6020009382b0,0x6020009382b1)
> allocated by thread T0 here:
>  operator new[](unsigned long) 
/home/sbergman/clang/trunk/src/projects/compiler-rt/lib/asan/asan_new_delete.cc:64
>  WW8PLCF::ReadPLCF(SvStream&, int, unsigned int) 
sw/source/filter/ww8/ww8scan.cxx:2091:26
>  WW8PLCF::WW8PLCF(SvStream&, int, int, int, int, int, int) 
sw/source/filter/ww8/ww8scan.cxx:2075:9
>  WW8PLCFx_Fc_FKP::WW8PLCFx_Fc_FKP(SvStream*, SvStream*, SvStream*, WW8Fib 
const&, ePLCFT, int) sw/source/filter/ww8/ww8scan.cxx:2883:21
>  WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP(SvStream*, SvStream*, SvStream*, 
WW8ScannerBase const&, ePLCFT) sw/source/filter/ww8/ww8scan.cxx:3088:7
>  WW8ScannerBase::WW8ScannerBase(SvStream*, SvStream*, SvStream*, WW8Fib*) 
sw/source/filter/ww8/ww8scan.cxx:1588:20
>  SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) 
sw/source/filter/ww8/ww8par.cxx:5022:20
>  SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:5767:19
>  SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:6039:19
>  WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString 
const&) sw/source/filter/ww8/ww8par.cxx:6157:20
>  SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18
>  SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22
>  SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23
>  SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
sw/qa/core/filters-test.cxx:112:20
>  SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) 
sw/qa/core/filters-test.cxx:71:12
>  test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString 
const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, 
SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:129:20
>  test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
unotes

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

2015-08-25 Thread Zolnai Tamás
 sw/source/core/layout/paintfrm.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8f44345f1e3e604dae86fef438014d4941b1d298
Author: Zolnai Tamás 
Date:   Sun Aug 23 19:15:14 2015 +0200

tdf#91969: Parts of paragraph border is missing

...when border is around more than one paragraph

Regression from:
16f637dab3c1b5f7ac9eacf2c57347800d3fdf09

Change-Id: Iea9455dd7cc3c301c3e2d5d7903c98d98e515595
(cherry picked from commit 8d933132ab01f0070225fae6cf704c9a1982e8f8)
Reviewed-on: https://gerrit.libreoffice.org/17979
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 4a27d6f..0d8bcaa 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -477,13 +477,13 @@ static sal_uInt8 lcl_TryMergeLines(
 {
 double const fMergeGap(properties.nSPixelSzW + properties.nSHalfPixelSzW); 
// NOT static!
 // A is above/before B
-if( mergeA.second <= mergeB.second &&
+if( mergeA.second <= mergeB.first &&
 mergeA.second + fMergeGap >= mergeB.first )
 {
 return 1;
 }
 // B is above/before A
-else if( mergeB.second <= mergeA.second &&
+else if( mergeB.second <= mergeA.first &&
  mergeB.second + fMergeGap >= mergeA.first )
 {
 return 2;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - filter/qa filter/source

2015-08-25 Thread Caolán McNamara
 filter/qa/cppunit/data/tiff/fail/hang-10.tiff  |binary
 filter/source/graphicfilter/itiff/lzwdecom.cxx |   12 
 2 files changed, 12 insertions(+)

New commits:
commit 93b4ed17f499bef5a3005f3c870e47e5de1c847e
Author: Caolán McNamara 
Date:   Mon Aug 24 15:31:41 2015 +0100

detect and reject loop in tif

Change-Id: I77d315fa432a3eb1a65539489a2ba6da8508b283
(cherry picked from commit 6b82437dca30eba0f0c9dde6fdc84cb8f7740f8f)
Reviewed-on: https://gerrit.libreoffice.org/17959
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/filter/qa/cppunit/data/tiff/fail/hang-10.tiff 
b/filter/qa/cppunit/data/tiff/fail/hang-10.tiff
new file mode 100644
index 000..e5e9ebc
Binary files /dev/null and b/filter/qa/cppunit/data/tiff/fail/hang-10.tiff 
differ
diff --git a/filter/source/graphicfilter/itiff/lzwdecom.cxx 
b/filter/source/graphicfilter/itiff/lzwdecom.cxx
index 82f6acc..5fb7514 100644
--- a/filter/source/graphicfilter/itiff/lzwdecom.cxx
+++ b/filter/source/graphicfilter/itiff/lzwdecom.cxx
@@ -19,6 +19,8 @@
 
 
 #include "lzwdecom.hxx"
+#include 
+#include 
 
 #define MAX_TABLE_SIZE 4096
 
@@ -161,8 +163,18 @@ void LZWDecompressor::AddToTable(sal_uInt16 nPrevCode, 
sal_uInt16 nCodeFirstData
 return;
 }
 
+std::vector aSeenIndexes;
 while (pTable[nCodeFirstData].nDataCount>1)
+{
+if (std::find(aSeenIndexes.begin(), aSeenIndexes.end(), 
nCodeFirstData) != aSeenIndexes.end())
+{
+SAL_WARN("filter.tiff", "Loop in chain");
+bEOIFound = true;
+return;
+}
+aSeenIndexes.push_back(nCodeFirstData);
 nCodeFirstData=pTable[nCodeFirstData].nPrevCode;
+}
 
 pTable[nTableSize].nPrevCode=nPrevCode;
 pTable[nTableSize].nDataCount=pTable[nPrevCode].nDataCount+1;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - filter/qa filter/source

2015-08-25 Thread Caolán McNamara
 filter/qa/cppunit/data/pbm/fail/crash-1.pbm |6 ++
 filter/source/graphicfilter/ipbm/ipbm.cxx   |   11 ++-
 2 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 84df27c093b4a52df92bef570cde96dcebdf35c9
Author: Caolán McNamara 
Date:   Mon Aug 24 20:43:37 2015 +0100

in reality we are limited to max sal_Int32 here

so accept that and test if the values were accepted or limited

Change-Id: Iaed5ebc2f12b52055506147c71117a2ad88d28ac
(cherry picked from commit 0a76c1fd6875bd094ebe2bfbed3d01c98dc0c19e)
Reviewed-on: https://gerrit.libreoffice.org/17973
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/filter/qa/cppunit/data/pbm/fail/crash-1.pbm 
b/filter/qa/cppunit/data/pbm/fail/crash-1.pbm
new file mode 100644
index 000..9ddcddf
--- /dev/null
+++ b/filter/qa/cppunit/data/pbm/fail/crash-1.pbm
@@ -0,0 +1,6 @@
+P3
+3000 1
+255
+103  79  59
+ 95  7P  55
+ 87  67  51
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx 
b/filter/source/graphicfilter/ipbm/ipbm.cxx
index 720bc9f..231b0e6 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -37,7 +37,7 @@ private:
 sal_uLong   mnMode; // 0->PBM, 1->PGM, 2->PPM
 Bitmap  maBmp;
 BitmapWriteAccess*  mpAcc;
-sal_uLong   mnWidth, mnHeight;  // dimensions in pixel
+sal_Int32   mnWidth, mnHeight;  // dimensions in pixel
 sal_uLong   mnCol;
 sal_uLong   mnMaxVal;   // max value in the 
 boolImplCallback( sal_uInt16 nPercent );
@@ -99,7 +99,7 @@ bool PBMReader::ReadPBM(Graphic & rGraphic )
 if ( ( mbStatus = ImplReadHeader() ) == false )
 return false;
 
-if ( ( mnMaxVal == 0 ) || ( mnWidth == 0 ) || ( mnHeight == 0 ) )
+if ( ( mnMaxVal == 0 ) || ( mnWidth <= 0 ) || ( mnHeight <= 0 ) )
 return false;
 
 // 0->PBM, 1->PGM, 2->PPM
@@ -107,7 +107,8 @@ bool PBMReader::ReadPBM(Graphic & rGraphic )
 {
 case 0 :
 maBmp = Bitmap( Size( mnWidth, mnHeight ), 1 );
-if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == 0 )
+mpAcc = maBmp.AcquireWriteAccess();
+if (!mpAcc || mpAcc->Width() != mnWidth || mpAcc->Height() != 
mnHeight)
 return false;
 mpAcc->SetPaletteEntryCount( 2 );
 mpAcc->SetPaletteColor( 0, BitmapColor( 0xff, 0xff, 0xff ) );
@@ -258,8 +259,8 @@ bool PBMReader::ImplReadBody()
 boolbPara, bFinished = false;
 sal_uInt8   nDat = 0, nCount;
 sal_uLong   nGrey, nRGB[3];
-sal_uLong   nWidth = 0;
-sal_uLong   nHeight = 0;
+sal_Int32 nWidth = 0;
+sal_Int32 nHeight = 0;
 
 if ( mbRaw )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/source

2015-08-25 Thread Caolán McNamara
 vcl/source/gdi/salgdilayout.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f9410a54f8d01e8eafceb9e2239f339d9bb8f094
Author: Caolán McNamara 
Date:   Sun Aug 23 20:46:53 2015 +0100

don't mirror 0, RECT_EMPTY, 0, RECT_EMPTY rectangle

leave it untouched to make gtk3 rtl spin buttons possible
where the additional mirrorValue contains the region
of the spinbuttons to render within this rectangle

Change-Id: I2648d98ed36373c95947cc4d78e2e54797f01155
Reviewed-on: https://gerrit.libreoffice.org/17940
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/17942
Tested-by: Jenkins 

diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index b7ffccf..bd5d8bd 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -728,7 +728,9 @@ bool SalGraphics::DrawNativeControl( ControlType nType, 
ControlPart nPart, const
 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && 
pOutDev->IsRTLEnabled()) )
 {
 Rectangle rgn( rControlRegion );
-mirror( rgn, pOutDev );
+Rectangle aNull;
+if (rgn != aNull)
+mirror(rgn, pOutDev);
 std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone());
 mirror( *mirrorValue, pOutDev );
 bool bRet = drawNativeControl( nType, nPart, rgn, nState, 
*mirrorValue, aCaption );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/unx

2015-08-25 Thread Khaled Hosny
 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx |   29 +++---
 1 file changed, 22 insertions(+), 7 deletions(-)

New commits:
commit 3a0ca27411f37b86a56737d89349ac629863af00
Author: Khaled Hosny 
Date:   Mon Aug 17 04:00:49 2015 +0200

Fix GTK3 right-to-left rendering of spin buttons

The buttons were not drawn at all

Change-Id: I51dfa30a6daa1034b5e978b09bcdfcc83e859f3d
Reviewed-on: https://gerrit.libreoffice.org/17790
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/17943
Tested-by: Jenkins 

diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx 
b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 1f04b2e..90d8734 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -137,25 +137,40 @@ Rectangle GtkSalGraphics::NWGetSpinButtonRect( 
ControlPart nPart, Rectangle aAre
 buttonRect.SetSize(Size(buttonWidth, buttonHeight));
 buttonRect.setY(aAreaRect.Top());
 buttonRect.Bottom() = buttonRect.Top() + aAreaRect.GetHeight();
+Rectangle partRect(buttonRect);
 if ( nPart == PART_BUTTON_UP )
 {
-buttonRect.setX(aAreaRect.Left() + (aAreaRect.GetWidth() - 
buttonRect.GetWidth()));
+if (AllSettings::GetLayoutRTL())
+partRect.setX(aAreaRect.Left());
+else
+partRect.setX(aAreaRect.Left() + (aAreaRect.GetWidth() - 
buttonRect.GetWidth()));
 }
 else if( nPart == PART_BUTTON_DOWN )
 {
-buttonRect.setX(aAreaRect.Left() + (aAreaRect.GetWidth() - 
2*buttonRect.GetWidth()));
+if (AllSettings::GetLayoutRTL())
+partRect.setX(aAreaRect.Left() + buttonRect.GetWidth());
+else
+partRect.setX(aAreaRect.Left() + (aAreaRect.GetWidth() - 2 * 
buttonRect.GetWidth()));
 }
 else
 {
-buttonRect.Right() = (aAreaRect.Left() + (aAreaRect.GetWidth() - 
2*buttonRect.GetWidth()))-1;
-buttonRect.Left()   = aAreaRect.Left();
-buttonRect.Top()= aAreaRect.Top();
-buttonRect.Bottom() = aAreaRect.Bottom();
+if (AllSettings::GetLayoutRTL())
+{
+partRect.Right() = aAreaRect.Left() + aAreaRect.GetWidth();
+partRect.Left()  = aAreaRect.Left() + (2 * buttonRect.GetWidth()) 
- 1;
+}
+else
+{
+partRect.Right() = (aAreaRect.Left() + (aAreaRect.GetWidth() - 2 * 
buttonRect.GetWidth())) - 1;
+partRect.Left()  = aAreaRect.Left();
+}
+partRect.Top()= aAreaRect.Top();
+partRect.Bottom() = aAreaRect.Bottom();
 }
 
 gtk_style_context_restore(mpSpinStyle);
 
-return buttonRect;
+return partRect;
 }
 
 Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle 
aAreaRect )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Caolán McNamara
 dev/null |binary
 1 file changed

New commits:
commit af9751a760e9007d0450adf2753d8a65be5f536c
Author: Caolán McNamara 
Date:   Tue Aug 25 09:23:06 2015 +0100

disable test case pending index assert fix

Change-Id: Ic48e22169dff2ed06b75af519ca39addef7d07de

diff --git a/sw/qa/core/data/ww5/pass/crash-2.doc 
b/sw/qa/core/data/ww5/pass/crash-2.doc
deleted file mode 100644
index 23a1897..000
Binary files a/sw/qa/core/data/ww5/pass/crash-2.doc and /dev/null differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes7' - vcl/win

2015-08-25 Thread Tor Lillqvist
 vcl/win/source/gdi/winlayout.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 12450a5236d9c86390f5a706612bb7935aff332a
Author: Tor Lillqvist 
Date:   Tue Aug 25 11:52:20 2015 +0300

Turn on glyph caching by default when using OpenGL

Can now be turned off with a SAL_DISABLE_GLYPH_CACHING environment variable.

Change-Id: I7ac14d72dc0f85c0682d92492eb96bec1d207609

diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index f26d3eb..d341806 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -1658,7 +1658,7 @@ void UniscribeLayout::DrawTextImpl(HDC hDC) const
 
 bool UniscribeLayout::CacheGlyphs(SalGraphics& rGraphics) const
 {
-static bool bDoGlyphCaching = (std::getenv("SAL_ENABLE_GLYPH_CACHING") != 
NULL);
+static bool bDoGlyphCaching = (std::getenv("SAL_DISABLE_GLYPH_CACHING") == 
NULL);
 
 if (!bDoGlyphCaching)
 return false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/README.vars vcl/win

2015-08-25 Thread Tor Lillqvist
 vcl/README.vars  |2 +-
 vcl/win/source/gdi/winlayout.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9a68eb9c1f54d4c4e14a46c11ba9eafca35a2b82
Author: Tor Lillqvist 
Date:   Tue Aug 25 11:52:20 2015 +0300

Turn on glyph caching by default when using OpenGL

Can now be turned off with a SAL_DISABLE_GLYPH_CACHING environment variable.

Change-Id: I7ac14d72dc0f85c0682d92492eb96bec1d207609

diff --git a/vcl/README.vars b/vcl/README.vars
index b76b051..0cc8576 100644
--- a/vcl/README.vars
+++ b/vcl/README.vars
@@ -21,4 +21,4 @@ OpenGL
 --
 SAL_FORCEGL - force enable OpenGL
 SAL_WITHOUT_WIDGET_CACHE - disable LRU caching of native widget texutres
-SAL_ENABLE_GLYPH_CACHING - render glyphs to textures and use those, Windows 
only, WIP, broken
+SAL_DISABLE_GLYPH_CACHING - don't render glyphs through OpenGL textures
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index f26d3eb..d341806 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -1658,7 +1658,7 @@ void UniscribeLayout::DrawTextImpl(HDC hDC) const
 
 bool UniscribeLayout::CacheGlyphs(SalGraphics& rGraphics) const
 {
-static bool bDoGlyphCaching = (std::getenv("SAL_ENABLE_GLYPH_CACHING") != 
NULL);
+static bool bDoGlyphCaching = (std::getenv("SAL_DISABLE_GLYPH_CACHING") == 
NULL);
 
 if (!bDoGlyphCaching)
 return false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Thorsten Behrens
 vcl/qa/cppunit/timer.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6bdd93e3562d0871b7b7179689f01601b5d10538
Author: Thorsten Behrens 
Date:   Tue Aug 25 11:04:38 2015 +0200

vcl: disable randomly failing timer unit tests

Change-Id: Iab26a2b55586fc824c5edbea519c4f68ba4a548f

diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx
index 85dc9ac..e89a28f 100644
--- a/vcl/qa/cppunit/timer.cxx
+++ b/vcl/qa/cppunit/timer.cxx
@@ -23,7 +23,7 @@
 
 // #define TEST_WATCHDOG
 // Comment if UT fails randomly.
-#define TEST_TIMERPRECISION
+//#define TEST_TIMERPRECISION
 
 /// Avoid our timer tests just wedging the build if they fail.
 class WatchDog : public osl::Thread
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Caolán McNamara
 sw/source/filter/ww8/ww8graf.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d68539562a7d1f0472376855d9f8a25bd8fe93cf
Author: Caolán McNamara 
Date:   Tue Aug 25 10:08:38 2015 +0100

misplaced brace

Change-Id: I6e43fd4a4b45f0217de8b6d93ef2403e46e39489

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 7e920d7..2b66ea6 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -758,7 +758,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long 
nStartCp, long nEndCp,
 }
 for (myIter aIter2 = aIter+1; aIter2 != aEnd; ++aIter2)
 aIter2->Adjust(nChanged);
-}
+}
 
 /*
  Don't worry about the new pPlcxMan, the restorer removes it when
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Noel Grandin
 cui/source/inc/cuigaldlg.hxx  |2 +-
 cui/source/inc/cuigrfflt.hxx  |2 +-
 cui/source/options/fontsubs.hxx   |4 ++--
 dbaccess/source/core/dataaccess/intercept.hxx |2 +-
 include/svtools/PlaceEditDialog.hxx   |2 +-
 include/svtools/ServerDetailsControls.hxx |2 +-
 include/svx/srchdlg.hxx   |6 +++---
 include/vcl/graphicfilter.hxx |2 +-
 sc/source/ui/inc/tabpages.hxx |2 +-
 sd/source/ui/inc/View.hxx |2 +-
 sd/source/ui/slideshow/showwindow.hxx |2 +-
 svtools/source/filter/exportdialog.hxx|   12 ++--
 svtools/source/graphic/grfcache.hxx   |2 +-
 svx/source/dialog/_bmpmask.cxx|6 +++---
 svx/source/gallery2/galbrws2.cxx  |4 ++--
 sw/source/ui/envelp/swuilabimp.hxx|2 +-
 sw/source/ui/fldui/flddb.hxx  |4 ++--
 sw/source/ui/fldui/fldpage.hxx|2 +-
 sw/source/ui/fldui/fldvar.hxx |2 +-
 sw/source/ui/index/swuiidxmrk.cxx |2 +-
 sw/source/uibase/inc/convert.hxx  |2 +-
 sw/source/uibase/inc/fldedt.hxx   |2 +-
 sw/source/uibase/inc/instable.hxx |4 ++--
 sw/source/uibase/inc/mailmrge.hxx |8 
 sw/source/uibase/inc/optpage.hxx  |4 ++--
 sw/source/uibase/inc/redlndlg.hxx |2 +-
 sw/source/uibase/inc/swuiidxmrk.hxx   |2 +-
 sw/source/uibase/table/tablepg.hxx|2 +-
 28 files changed, 45 insertions(+), 45 deletions(-)

New commits:
commit fab18ef350058081967c66e1eea50dde44d08c41
Author: Noel Grandin 
Date:   Tue Aug 25 10:15:42 2015 +0200

parameter names are useless in DECL_LINK declarations

Change-Id: I77f7b528ed97964bdc153f820f6f96977ddb9254

diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index a7d987e..64c92e5 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -160,7 +160,7 @@ private:
 
 DECL_LINK( ClickCancelBtn, void* );
 DECL_LINK_TYPED( TimeoutHdl, Idle*, void );
-DECL_LINK( ActualizeHdl, INetURLObject* pURL );
+DECL_LINK( ActualizeHdl, INetURLObject* );
 
 public:
 ActualizeProgress( vcl::Window* pWindow, GalleryTheme* 
pThm );
diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx
index 74a481f..93efc3b 100644
--- a/cui/source/inc/cuigrfflt.hxx
+++ b/cui/source/inc/cuigrfflt.hxx
@@ -74,7 +74,7 @@ private:
 boolbIsBitmap;
 
 DECL_LINK_TYPED(ImplPreviewTimeoutHdl, Timer *, void);
-DECL_LINK( ImplModifyHdl, void* p );
+DECL_LINK( ImplModifyHdl, void* );
 
 protected:
 VclPtr  mpPreview;
diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx
index 90e0e60..5a47c78 100644
--- a/cui/source/options/fontsubs.hxx
+++ b/cui/source/options/fontsubs.hxx
@@ -81,8 +81,8 @@ class SvxFontSubstTabPage : public SfxTabPage
 
 SvLBoxButtonData*   pCheckButtonData;
 
-DECL_LINK(SelectHdl, vcl::Window *pWin = 0);
-DECL_LINK(NonPropFontsHdl, CheckBox* pBox);
+DECL_LINK(SelectHdl, vcl::Window *);
+DECL_LINK(NonPropFontsHdl, CheckBox* );
 
 SvTreeListEntry*CreateEntry(OUString& rFont1, OUString& rFont2);
 voidCheckEnable();
diff --git a/dbaccess/source/core/dataaccess/intercept.hxx 
b/dbaccess/source/core/dataaccess/intercept.hxx
index 767fadf..2d7e8ec 100644
--- a/dbaccess/source/core/dataaccess/intercept.hxx
+++ b/dbaccess/source/core/dataaccess/intercept.hxx
@@ -39,7 +39,7 @@ class OInterceptor : public ::cppu::WeakImplHelper< 
css::frame::XDispatchProvide
 css::frame::XDispatch,
 
css::document::XDocumentEventListener>
 {
-DECL_LINK( OnDispatch, void* _aURL  );
+DECL_LINK( OnDispatch, void*  );
 protected:
 virtual ~OInterceptor();
 public:
diff --git a/include/svtools/PlaceEditDialog.hxx 
b/include/svtools/PlaceEditDialog.hxx
index 6ab6c52..066689e 100644
--- a/include/svtools/PlaceEditDialog.hxx
+++ b/include/svtools/PlaceEditDialog.hxx
@@ -88,7 +88,7 @@ private:
 DECL_LINK ( SelectTypeHdl, void * );
 DECL_LINK ( EditLabelHdl, void * );
 DECL_LINK ( EditUsernameHdl, void * );
-DECL_LINK ( ToggledPassHdl, CheckBox * pCheckBox );
+DECL_LINK ( ToggledPassHdl, CheckBox * );
 
 };
 
diff --git a/include/svtools/ServerDetailsControls.hxx 
b/include/svtools/ServerDetailsControls.hxx
index f3f02fa..de35aa7 100644
--- a/include/svtools/ServerDetailsControls.hxx
+++ b/include/svtools/ServerDetailsControls.hxx
@@ -102,7 +102,7 @@ class DavDetailsContainer : public HostDetailsContainer
 virtual bool verifyScheme( const OUString& rScheme ) SAL_OVERR

[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - fpicker/source

2015-08-25 Thread Szymon Kłos
 fpicker/source/office/RemoteFilesDialog.cxx |   24 
 1 file changed, 24 insertions(+)

New commits:
commit db7d1b4af5a309fe368d01cb9965ba632f2fbee2
Author: Szymon Kłos 
Date:   Tue Aug 25 11:51:11 2015 +0200

Remove stored password if service is deleted

Change-Id: I500a8ee2874f7a9577e37fe25f5813e5821e9719

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index 19ea5b5..dfc14e1 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -824,6 +824,30 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, 
MenuButton *, pButton,
 
 if( aBox->Execute() == RET_YES )
 {
+// remove password
+try
+{
+if( m_xMasterPasswd->isPersistentStoringAllowed() )
+{
+OUString sUrl( m_aServices[nPos]->GetUrl() );
+
+Reference< XInteractionHandler > xInteractionHandler(
+InteractionHandler::createWithParent( m_xContext, 
0 ),
+UNO_QUERY );
+
+UrlRecord aURLEntries = m_xMasterPasswd->find( sUrl, 
xInteractionHandler );
+
+if( aURLEntries.Url == sUrl && 
aURLEntries.UserList.getLength() )
+{
+OUString sUserName = 
aURLEntries.UserList[0].UserName;
+
+m_xMasterPasswd->removePersistent( sUrl, sUserName 
);
+}
+}
+}
+catch( const Exception& )
+{}
+
 m_aServices.erase( m_aServices.begin() + nPos );
 m_pServices_lb->RemoveEntry( nSelected );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Change Default System Font?

2015-08-25 Thread Nathan Wells
Hello,

I've been wanting to reverse a "feature" I requested for LibreOffice for
two years now but haven't been able to get any traction (the feature
request and then rescinded request is here:
https://bugs.documentfoundation.org/show_bug.cgi?id=52020 ). So I am
preparing to do a build of LibreOffice with the feature removed myself so
that Khmer and Minority Language users affected can go back to using
LibreOffice again.

But since I haven't used LibreOffice for the Khmer language for sometime I
recently downloaded LibreOffice 5 and found I was unable to change the
menu/system font to a font that supported Khmer.
Previously I was able to do this by Tools > Options... > LibreOffice > View
> User Interface section > uncheck Use system font for user interface and
then use a font replacement table for Andale Sans UI and replace it with
whatever font I want.

Because I can't change the system/menu in LibreOffice to a font that
supports Khmer, even if I am successful at my own build, it would be
worthless since we use spelling and grammar checkers that need Khmer in the
system/menu font to be usable.

Can anyone help me out by directing me to the source code that would need
to be changed in order to specify my own system font for LibreOffice?

Thanks for your time and consideration,
Nathan Wells
sbbic.org
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-08-25 Thread Stephan Bergmann
 filter/source/graphicfilter/ipbm/ipbm.cxx |   24 
 sw/source/filter/ww8/ww8scan.cxx  |  145 +-
 2 files changed, 146 insertions(+), 23 deletions(-)

New commits:
commit 662498ab80833a2b671c247fb859603632e52105
Author: Stephan Bergmann 
Date:   Tue Aug 25 11:58:42 2015 +0200

Avoid overflow in PBMReader::ImplReadHeader

...as found by UBSan in CppunitTest_filter_ppm_test on
filter/qa/cppunit/data/pbm/fail/crash-1.pbm

Change-Id: Ib7c50ef1f07aba6b78f79c608be69c3dac38ddfe

diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx 
b/filter/source/graphicfilter/ipbm/ipbm.cxx
index 18b3249..d7cf941 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -218,17 +218,41 @@ bool PBMReader::ImplReadHeader()
 nDat -= '0';
 if ( nCount == 0 )
 {
+if (mnWidth > SAL_MAX_INT32 / 10)
+{
+return false;
+}
 mnWidth *= 10;
+if (nDat > SAL_MAX_INT32 - mnWidth)
+{
+return false;
+}
 mnWidth += nDat;
 }
 else if ( nCount == 1 )
 {
+if (mnHeight > SAL_MAX_INT32 / 10)
+{
+return false;
+}
 mnHeight *= 10;
+if (nDat > SAL_MAX_INT32 - mnHeight)
+{
+return false;
+}
 mnHeight += nDat;
 }
 else if ( nCount == 2 )
 {
+if (mnMaxVal > std::numeric_limits::max() / 10)
+{
+return false;
+}
 mnMaxVal *= 10;
+if (nDat > std::numeric_limits::max() - mnMaxVal)
+{
+return false;
+}
 mnMaxVal += nDat;
 }
 }
commit 6373886870503a981b65f204f9113aebff540ab8
Author: Stephan Bergmann 
Date:   Mon Aug 24 17:31:24 2015 +0200

Handle non-aligned FFNs

...as found by UBSan in CppunitTest_sw_filters_test (see below), and at the 
same
time limit reads within the pA array to its bounds.

> Testing file:///.../sw/qa/core/data/ww6/pass/crash-2.doc:
> sw/source/filter/ww8/ww8scan.cxx:6473:32: runtime error: upcast of 
misaligned address 0x620e70e7 for type 'WW8_FFN_Ver6', which requires 2 
byte alignment
> 0x620e70e7: note: pointer points here
>  00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 0e 00 00 6a 00  00 00 
00 0e 00 00 6a 00  00 00 6a
>  ^
>  WW8Fonts::WW8Fonts(SvStream&, WW8Fib&) 
sw/source/filter/ww8/ww8scan.cxx:6473:32
>  SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) 
sw/source/filter/ww8/ww8par.cxx:4961:20
>  SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:5767:19
>  SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:6039:19
>  WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString 
const&) sw/source/filter/ww8/ww8par.cxx:6157:20
>  SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18
>  SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22
>  SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23
>  SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
sw/qa/core/filters-test.cxx:112:20
>  SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) 
sw/qa/core/filters-test.cxx:71:12
>  test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString 
const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, 
SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:129:20
>  test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:154:5
>  SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5

Change-Id: I31ac8dc11d985745785c9dda1cec8a11a41098bb

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index dcebc0c..07b1dd6 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -20,10 +20,12 @@
 #include "ww8scan.hxx"
 #include "ww8par.hxx"
 
+#include 
+#include 
+#include 
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -6323,10 +6325,15 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, OUString* 
pString, short* pcbStd )
 return pStd;
 }
 
-struct WW8_FFN_Ver6 : public WW8_FFN_BASE
+namespace {
+const sal_uInt16 maxStrS

What autogen.sh for an alternative ContentProvider for dav:// scheme?

2015-08-25 Thread Giuseppe Castagno

Hi all,

while I was trying with a fairly current master to open a WebDAV file as:

./soffice 
dav://192.168.1.80:8080/alfresco/webdav/Sites/davtest/documentLibrary/Lorem_ipsum.odt


I got the following warnings:

warn:ucb.ucp.gio:17565:1:ucb/source/ucp/gio/gio_content.cxx:400: 
ignoring GError "Not a WebDAV enabled share" for 



warn:ucb.ucp.gio:30167:1:ucb/source/ucp/gio/gio_content.cxx:400: 
ignoring GError "Not a WebDAV enabled share" for 



warn:unotools.misc:30167:1:unotools/source/misc/mediadescriptor.cxx:688: 
caught Exception "Unable to retrieve value of property 'IsDocument'!" 
while opening 



warn:filter.config:30167:1:filter/source/config/cache/typedetection.cxx:456: 
caught Exception "Could not open stream for 
" 
while querying type of 



warn:fwk.dispatch:30167:1:framework/source/dispatch/loaddispatcher.cxx:132: 
caught LoadEnvException 0 "type detection failed" while dispatching 



warn:sal.osl.mutex:30167:1:sal/osl/unx/mutex.cxx:102: pthread_mutex_lock 
failed: Invalid argument
warn:sal.osl.mutex:30167:1:sal/osl/unx/mutex.cxx:139: 
pthread_mutex_unlock failed: Invalid argument


A log on the net told me the OPTIONS method the Alfresco server answered 
advertised itself as a WebDAV share.

The User-Agent on the http transaction was gvfs/1.20.3.

master was built with following autogen.sh input:

--with-lang='en-US' \
--enable-debug \
--enable-selective-debuginfo="sal/ offapi/ tools/ unotools/ sfx2/ 
ucbhelper/ ucb/"


OTOH, doing the same test on a LO 5.0 production build (5.0.0.5) I got 
no error and the content provider was the WebDAV ContentProvider, net 
log confirmed it (User-Agent was LibreOffice).


Is this due to a different configuration on LO 5.0.0.5 production build 
or is there a difference in ucb code?


--
Kind Regards,
Giuseppe Castagno aka beppec56
Acca Esse http://www.acca-esse.eu
giuseppe.castagno at acca-esse.eu
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-08-25 Thread Yousuf Philips
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx |2 +-
 sc/uiconfig/scalc/ui/sidebarnumberformat.ui|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c936d690a69d4d0332caade1a481ae1c3a6e06e7
Author: Yousuf Philips 
Date:   Tue Aug 25 04:55:05 2015 +0400

Correct icon for number format in Calc's sidebar

Change-Id: Icc5958d77277c6938b8a03ef44dfd71b9350e288
Reviewed-on: https://gerrit.libreoffice.org/17978
Reviewed-by: Maxim Monastirsky 
Tested-by: Maxim Monastirsky 

diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx 
b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 4ec8606..0350373 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -38,7 +38,7 @@ using namespace css;
 using namespace css::uno;
 using ::sfx2::sidebar::Theme;
 
-const char UNO_NUMERICFIELD[] = ".uno:NumericField";
+const char UNO_NUMERICFIELD[] = ".uno:NumberFormatDecimal";
 const char UNO_NUMBERFORMATPERCENT[]  = ".uno:NumberFormatPercent";
 const char UNO_NUMBERFORMATCURRENCY[] = ".uno:NumberFormatCurrency";
 
diff --git a/sc/uiconfig/scalc/ui/sidebarnumberformat.ui 
b/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
index 94e100a..16641e1 100644
--- a/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
+++ b/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
@@ -83,7 +83,7 @@
 False
 True
 False
-.uno:NumericField
+.uno:NumberFormatDecimal
 toolbutton3
 True
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Maxim Monastirsky
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx |   25 -
 sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx |1 
 sc/uiconfig/scalc/ui/sidebarnumberformat.ui|3 --
 3 files changed, 29 deletions(-)

New commits:
commit 882604ad9546c7d267b1c0beed29448e072cf0a3
Author: Maxim Monastirsky 
Date:   Tue Aug 25 13:20:11 2015 +0300

Some cleanup

Change-Id: Ia22866225b2a726ed69c9f18d02d1ebffdafde8f

diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx 
b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 0350373..e78bf7f 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -38,10 +38,6 @@ using namespace css;
 using namespace css::uno;
 using ::sfx2::sidebar::Theme;
 
-const char UNO_NUMERICFIELD[] = ".uno:NumberFormatDecimal";
-const char UNO_NUMBERFORMATPERCENT[]  = ".uno:NumberFormatPercent";
-const char UNO_NUMBERFORMATCURRENCY[] = ".uno:NumberFormatCurrency";
-
 namespace sc { namespace sidebar {
 
 NumberFormatPropertyPanel::NumberFormatPropertyPanel(
@@ -97,8 +93,6 @@ void NumberFormatPropertyPanel::Initialize()
 mpLbCategory->SetAccessibleName(OUString( "Category"));
 mpLbCategory->SetDropDownLineCount(mpLbCategory->GetEntryCount());
 
-mpTBCategory->SetSelectHdl ( LINK(this, NumberFormatPropertyPanel, 
NumFormatHdl) );
-
 aLink = LINK(this, NumberFormatPropertyPanel, NumFormatValueHdl);
 
 mpEdDecimals->SetModifyHdl( aLink );
@@ -112,25 +106,6 @@ void NumberFormatPropertyPanel::Initialize()
 mpTBCategory->SetAccessibleRelationLabeledBy(mpTBCategory);
 }
 
-IMPL_LINK_TYPED( NumberFormatPropertyPanel, NumFormatHdl, ToolBox*, pBox, void 
)
-{
-const OUString aCommand(pBox->GetItemCommand(pBox->GetCurItemId()));
-sal_uInt16 nId = 0;
-
-if(aCommand == UNO_NUMERICFIELD)
-nId = 1;
-else if(aCommand == UNO_NUMBERFORMATPERCENT)
-nId = 2;
-else if(aCommand == UNO_NUMBERFORMATCURRENCY)
-nId = 3;
-
-if( nId != mnCategorySelected )
-{
-SfxUInt16Item aItem( SID_NUMBER_TYPE_FORMAT,  nId );
-GetBindings()->GetDispatcher()->Execute(SID_NUMBER_TYPE_FORMAT, 
SfxCallMode::RECORD, &aItem, 0L);
-}
-}
-
 IMPL_LINK( NumberFormatPropertyPanel, NumFormatSelectHdl, ListBox*, pBox )
 {
 sal_uInt16 nVal = pBox->GetSelectEntryPos();
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx 
b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
index 5c61709..c401b8a 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
@@ -84,7 +84,6 @@ private:
 ::sfx2::sidebar::EnumContextmaContext;
 SfxBindings*mpBindings;
 
-DECL_LINK_TYPED(NumFormatHdl, ToolBox*, void);
 DECL_LINK(NumFormatSelectHdl, ListBox*);
 DECL_LINK(NumFormatValueHdl, void*);
 
diff --git a/sc/uiconfig/scalc/ui/sidebarnumberformat.ui 
b/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
index 16641e1..1251181 100644
--- a/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
+++ b/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
@@ -56,7 +56,6 @@
 True
 False
 .uno:NumberFormatCurrency
-toolbutton1
 True
   
   
@@ -70,7 +69,6 @@
 True
 False
 .uno:NumberFormatPercent
-toolbutton2
 True
   
   
@@ -84,7 +82,6 @@
 True
 False
 .uno:NumberFormatDecimal
-toolbutton3
 True
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-qa] Interoperability Test File

2015-08-25 Thread Marina Latini


- Messaggio originale -
> Da: "Joel Madero" 
> A: "libreoffice-dev" , "Libreoffice-qa" 
> 
> Inviato: Martedì, 25 agosto 2015 6:04:59
> Oggetto: [Libreoffice-qa] Interoperability Test File
> 
> Hi All,

Hi Joel, All,

> 
> I don't know if anyone has a repository of test files for
> interoperability but one of our great users provided a test file and
> reported a whole slew of interop bugs about it.
> 
> https://bugs.documentfoundation.org/attachment.cgi?id=118139
> 
> Bug #'s
> https://bugs.documentfoundation.org/show_bug.cgi?id=93637

bibisected :)

Best,
Marina

-- 
==
Marina Latini 
mar...@studiostorti.com


Studio Storti Srl
Via dell'industria, 8 36040 - Torri di Quartesolo (VI)
Piazza San Nazaro in Brolo, 15 20122 - Milano (MI)
http://www.studiostorti.com
==
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-08-25 Thread Caolán McNamara
 sw/qa/core/data/ww5/pass/crash-3.doc |binary
 sw/source/filter/ww8/ww8graf.cxx |   69 +--
 sw/source/filter/ww8/ww8par.hxx  |1 
 3 files changed, 59 insertions(+), 11 deletions(-)

New commits:
commit cc596d8d0f2f896d000833ffcba0035e3812c657
Author: Caolán McNamara 
Date:   Tue Aug 25 10:48:12 2015 +0100

ensure editeng str len is in sync with attributes

for the duration of inserting attributes, and excess
dos newline chars can be removed safely afterwards

Change-Id: If70e34fec1c0819f827f483d3d7ac4f19b3caef8

diff --git a/sw/qa/core/data/ww5/pass/crash-3.doc 
b/sw/qa/core/data/ww5/pass/crash-3.doc
new file mode 100644
index 000..54931a2
Binary files /dev/null and b/sw/qa/core/data/ww5/pass/crash-3.doc differ
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 2b66ea6..d37be70 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -443,23 +443,23 @@ SdrObject* SwWW8ImplReader::ReadPolyLine(WW8_DPHEAD* pHd, 
SfxAllItemSet &rSet)
 return pObj;
 }
 
-ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
+ESelection GetESelection(EditEngine &rDrawEditEngine, long nCpStart, long 
nCpEnd)
 {
-sal_Int32 nPCnt = m_pDrawEditEngine->GetParagraphCount();
+sal_Int32 nPCnt = rDrawEditEngine.GetParagraphCount();
 sal_Int32 nSP = 0;
 sal_Int32 nEP = 0;
 while(  (nSP < nPCnt)
-&&  (nCpStart >= m_pDrawEditEngine->GetTextLen( nSP ) + 1) )
+&&  (nCpStart >= rDrawEditEngine.GetTextLen( nSP ) + 1) )
 {
-nCpStart -= m_pDrawEditEngine->GetTextLen( nSP ) + 1;
+nCpStart -= rDrawEditEngine.GetTextLen( nSP ) + 1;
 nSP++;
 }
 // Beim Ende erst 1 Zeichen spaeter auf naechste Zeile umschalten,
 // da sonst Zeilenattribute immer eine Zeile zu weit reichen.
 while(  (nEP < nPCnt)
-&&  (nCpEnd > m_pDrawEditEngine->GetTextLen( nEP ) + 1) )
+&&  (nCpEnd > rDrawEditEngine.GetTextLen( nEP ) + 1) )
 {
-nCpEnd -= m_pDrawEditEngine->GetTextLen( nEP ) + 1;
+nCpEnd -= rDrawEditEngine.GetTextLen( nEP ) + 1;
 nEP++;
 }
 return ESelection( nSP, nCpStart, nEP, nCpEnd );
@@ -641,7 +641,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long 
nStartCp, long nEndCp,
 comphelper::string::padToLength(sTemp,
 nTextStart - nStartReplace, cReplaceSymbol);
 
m_pDrawEditEngine->QuickInsertText(sTemp.makeStringAndClear(),
-GetESelection(nStartReplace - nStartCp,
+GetESelection(*m_pDrawEditEngine, nStartReplace - 
nStartCp,
 nTextStart - nStartCp ) );
 }
 }
@@ -718,7 +718,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long 
nStartCp, long nEndCp,
 if( pS->Count() )
 {
 m_pDrawEditEngine->QuickSetAttribs( *pS,
-GetESelection( nTextStart - nStartCp, nEnd - nStartCp ) );
+GetESelection(*m_pDrawEditEngine, nTextStart - nStartCp, 
nEnd - nStartCp ) );
 delete pS;
 pS = new SfxItemSet(m_pDrawEditEngine->GetEmptyItemSet());
 }
@@ -736,7 +736,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long 
nStartCp, long nEndCp,
 myIter aEnd = aChunks.end();
 for (myIter aIter = aChunks.begin(); aIter != aEnd; ++aIter)
 {
-ESelection aSel(GetESelection(aIter->GetStartPos()-nStartCp,
+ESelection aSel(GetESelection(*m_pDrawEditEngine, 
aIter->GetStartPos()-nStartCp,
 aIter->GetEndPos()-nStartCp));
 OUString aString(m_pDrawEditEngine->GetText(aSel));
 const sal_Int32 nOrigLen = aString.getLength();
@@ -891,6 +891,47 @@ sal_Int32 
SwWW8ImplReader::GetRangeAsDrawingString(OUString& rString, long nStar
 return 0;
 }
 
+//EditEngine::InsertText will replace dos lines resulting in a shorter
+//string than is passed in, so inserting attributes based on the original
+//string len can fail. So here replace the dos line ends similar to
+//how EditEngine does it, but preserve the length and replace the extra
+//chars with placeholders, record the position of the placeholders and
+//remove those extra chars after attributes have been inserted
+std::vector replaceDosLineEndsButPreserveLength(OUString &rIn)
+{
+OUStringBuffer aNewData(rIn);
+std::vector aDosLineEndDummies;
+sal_Int32 i = 0;
+sal_Int32 nStrLen = rIn.getLength();
+while (i < nStrLen)
+{
+// \r or \n causes linebreak
+if (rIn[i] == '\r' || rIn[i] == '\n')
+{
+// skip char if \r\n or \n\r
+if ( (i+1) < nStrLen && ((rIn[i+1] == '\r') || (rIn[i+1] == '\n')) 
&&
+ (rIn[i] != rIn[i+1]) )
+{
+++i;
+aDo

Re: use of xsltproc without '--nonet'

2015-08-25 Thread Christian Lohmaier
Hi Richard,

On Tue, Aug 25, 2015 at 8:53 AM, Richard PALO  wrote:
> I noticed (by chance) some uses of xsltproc without the '--nonet' option in 
> the following files:
>> extras/CustomTarget_autocorr.mk
>> extras/CustomTarget_autotextshare.mk
>> extras/CustomTarget_autotextuser.mk
>> solenv/gbuild/UIConfig.mk
>> solenv/gbuild/platform/macosx.mk
>
> Is there any particular reason these cannot be forced to build locally like 
> the other uses of xsltproc?

What do you mean?
nonet means that xlstproc should not  look for the
schemata/DTD/Entities definition at the URLs defined in the xml.

ciao
Christian
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-08-25 Thread Eike Rathke
 i18nlangtag/source/isolang/isolang.cxx |1 +
 include/i18nlangtag/lang.h |1 +
 svtools/source/misc/langtab.src|1 +
 3 files changed, 3 insertions(+)

New commits:
commit 76bc0e061b7fb9d0da90e4099d9f429496fe6b4d
Author: Eike Rathke 
Date:   Tue Aug 25 12:53:58 2015 +0200

tdf#93468 add Arpitan (Switzerland) [frp-CH]

Change-Id: Icb96b45c936b974938c2dfae48960f727a1dc84d

diff --git a/i18nlangtag/source/isolang/isolang.cxx 
b/i18nlangtag/source/isolang/isolang.cxx
index 8fe729f..7edfb70 100644
--- a/i18nlangtag/source/isolang/isolang.cxx
+++ b/i18nlangtag/source/isolang/isolang.cxx
@@ -658,6 +658,7 @@ static IsoLanguageCountryEntry const aImplIsoLangEntries[] =
 { LANGUAGE_USER_OCCITAN_ARANESE,"oc", "ES", 0 },
 { LANGUAGE_USER_ARPITAN_FRANCE,"frp", "FR", 0 },
 { LANGUAGE_USER_ARPITAN_ITALY, "frp", "IT", 0 },
+{ LANGUAGE_USER_ARPITAN_SWITZERLAND,   "frp", "CH", 0 },
 { LANGUAGE_MULTIPLE,   "mul", ""  , 0 },// 
multiple languages, many languages are used
 { LANGUAGE_UNDETERMINED,   "und", ""  , 0 },// 
undetermined language, language cannot be identified
 { LANGUAGE_NONE,   "zxx", ""  , 0 },// added 
to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic 
information
diff --git a/include/i18nlangtag/lang.h b/include/i18nlangtag/lang.h
index a79d2db..aeccf95 100644
--- a/include/i18nlangtag/lang.h
+++ b/include/i18nlangtag/lang.h
@@ -700,6 +700,7 @@ typedef unsigned short LanguageType;
 #define LANGUAGE_USER_ENGLISH_UK_OXENDICT   0x9409  /* makeLangID( 0x25, 
getPrimaryLanguage( LANGUAGE_ENGLISH_UK)) */
 #define LANGUAGE_USER_ARPITAN_FRANCE0x0696
 #define LANGUAGE_USER_ARPITAN_ITALY 0x0A96  /* makeLangID( 0x02, 
getPrimaryLanguage( LANGUAGE_USER_ARPITAN_FRANCE)) */
+#define LANGUAGE_USER_ARPITAN_SWITZERLAND   0x0E96  /* makeLangID( 0x03, 
getPrimaryLanguage( LANGUAGE_USER_ARPITAN_FRANCE)) */
 
 
 /* Primary language ID range for on-the-fly assignment. */
diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src
index c03ee9c..fd27105 100644
--- a/svtools/source/misc/langtab.src
+++ b/svtools/source/misc/langtab.src
@@ -395,6 +395,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE
 < "Aranese" ; LANGUAGE_USER_OCCITAN_ARANESE ; > ;
 < "Arpitan (France)" ; LANGUAGE_USER_ARPITAN_FRANCE ; > ;
 < "Arpitan (Italy)" ; LANGUAGE_USER_ARPITAN_ITALY ; > ;
+< "Arpitan (Switzerland)" ; LANGUAGE_USER_ARPITAN_SWITZERLAND ; > ;
 };
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2015-08-25 Thread Christian Lohmaier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3ac03b3f2747e723efc93a5a4ca82d72445eecf0
Author: Christian Lohmaier 
Date:   Tue Aug 25 13:03:49 2015 +0200

Updated core
Project: help  67285d99b8c9373ba3fa992679353ee1a5bc4da9

typo "Navigator displays" → "The Navigator displays"

via pootle-feedback

Change-Id: I25578b8a780e607ce553e17289d96cdc7185577e

diff --git a/helpcontent2 b/helpcontent2
index 7a2cad7..67285d9 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 7a2cad733d9090afec58f6ac7cd9e97ca410a1fb
+Subproject commit 67285d99b8c9373ba3fa992679353ee1a5bc4da9
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: use of xsltproc without '--nonet'

2015-08-25 Thread Richard PALO
Le 25/08/15 12:55, Christian Lohmaier a écrit :
> Hi Richard,
> 
> On Tue, Aug 25, 2015 at 8:53 AM, Richard PALO  wrote:
>> I noticed (by chance) some uses of xsltproc without the '--nonet' option in 
>> the following files:
>>> extras/CustomTarget_autocorr.mk
>>> extras/CustomTarget_autotextshare.mk
>>> extras/CustomTarget_autotextuser.mk
>>> solenv/gbuild/UIConfig.mk
>>> solenv/gbuild/platform/macosx.mk
>>
>> Is there any particular reason these cannot be forced to build locally like 
>> the other uses of xsltproc?
> 
> What do you mean?
> nonet means that xlstproc should not  look for the
> schemata/DTD/Entities definition at the URLs defined in the xml.
> 
> ciao
> Christian
> 
> 
exactly.
Builds should [strive to] be local; consequently any dtds should be available 
locally, *especially* when "--disable-fetch-external" is specified. Otherwise 
the results may differ when connected or not.

-- 
Richard PALO

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


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

2015-08-25 Thread Christian Lohmaier
 source/text/smath/01/0602.xhp   |4 ++--
 source/text/swriter/guide/navigator.xhp |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 67285d99b8c9373ba3fa992679353ee1a5bc4da9
Author: Christian Lohmaier 
Date:   Tue Aug 25 13:03:49 2015 +0200

typo "Navigator displays" → "The Navigator displays"

via pootle-feedback

Change-Id: I25578b8a780e607ce553e17289d96cdc7185577e

diff --git a/source/text/swriter/guide/navigator.xhp 
b/source/text/swriter/guide/navigator.xhp
index eefb67b..8c99bd6 100644
--- a/source/text/swriter/guide/navigator.xhp
+++ b/source/text/swriter/guide/navigator.xhp
@@ -39,7 +39,7 @@
 MW added "pages;"
 Navigator for Text Documents
 
-  The Navigatordisplays the different parts of your document, such as 
headings, tables, frames, objects, or hyperlinks.
+  The Navigator displays the different parts of your document, such as 
headings, tables, frames, objects, or hyperlinks.
   
  
 To open the Navigator, press F5.
@@ -52,4 +52,4 @@
   
   Navigator

-
\ No newline at end of file
+
commit 6c16fbcbd1fd650c037fe082e768a30d0245de3f
Author: Christian Lohmaier 
Date:   Tue Aug 25 13:01:48 2015 +0200

add back localize="false" to bookmarks without translatable strings

Change-Id: Ied7966021a0945900b50a71eefd3152f6977cd12

diff --git a/source/text/smath/01/0602.xhp 
b/source/text/smath/01/0602.xhp
index 3d9f96d..aaf49f8 100644
--- a/source/text/smath/01/0602.xhp
+++ b/source/text/smath/01/0602.xhp
@@ -30,7 +30,7 @@
 
   importing; %PRODUCTNAME Math 
formulas
   MathML; import from 
file
-  
+  
   Import Formula from File
   This command opens a dialog for importing a 
formula.
   The 
Insert dialog is set up like the Open dialog under 
File. Use the Insert dialog to load, edit and display 
a formula saved as a file in the Commands window.
@@ -42,7 +42,7 @@
 
   MathML; import via 
clipboard
   importing; MathML
-  
+  
   Import MathML from Clipboard
   This command transforms MathML clipboard content to 
StarMath and inserts it at the current cursor 
position.
   If the 
transformation fails, nothing is inserted.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: What autogen.sh for an alternative ContentProvider for dav:// scheme?

2015-08-25 Thread Stephan Bergmann

On 08/25/2015 12:07 PM, Giuseppe Castagno wrote:

master was built with following autogen.sh input:

--with-lang='en-US' \
--enable-debug \
--enable-selective-debuginfo="sal/ offapi/ tools/ unotools/ sfx2/
ucbhelper/ ucb/"

OTOH, doing the same test on a LO 5.0 production build (5.0.0.5) I got
no error and the content provider was the WebDAV ContentProvider, net
log confirmed it (User-Agent was LibreOffice).

Is this due to a different configuration on LO 5.0.0.5 production build
or is there a difference in ucb code?


The reason for this is 
 
"rhbz#1134285: Access dav, davs URLs via GVFS" (see commit message for 
details) together with the fact that the TDF LO 5.0 Linux build uses 
--enable-gnome-vfs (cf. distro-configs/LibreOfficeLinux.conf) while your 
(master) build defaults to --enable-gio.


Punchline: use standard http/https URL schemes instead of non-standard 
dav/davs ones.

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


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

2015-08-25 Thread Mark Hung
 include/oox/export/drawingml.hxx |6 +++--
 oox/source/export/drawingml.cxx  |   33 +++
 sd/qa/unit/data/odp/tdf80224.odp |binary
 sd/qa/unit/export-tests.cxx  |   21 +++
 sd/source/filter/eppt/epptbase.hxx   |1 
 sd/source/filter/eppt/pptx-epptbase.cxx  |4 +++
 sd/source/filter/eppt/pptx-epptooxml.cxx |5 +++-
 7 files changed, 55 insertions(+), 15 deletions(-)

New commits:
commit 43679f94b45f4d9e120c64a3fb5cc3ee77f12b11
Author: Mark Hung 
Date:   Sun Aug 2 14:40:18 2015 +0800

Fix tdf#80224 Custom text color changed to black on .PPTX export

1) Indirect property values were ignored, now they are used.
2) Write endParaRPr so that PowerPoint display them.
3) Automatic colors are written as white or black based on
   whether background is dark.

Change-Id: I255c16f35149b738be2daf2800b1c90389f2c7cf
Reviewed-on: https://gerrit.libreoffice.org/17472
Tested-by: Jenkins 
Reviewed-by: Norbert Thiebaud 

diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index bfd3c6c..55ef5c7 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -99,6 +99,7 @@ protected:
 ::oox::core::XmlFilterBase* mpFB;
 /// If set, this is the parent of the currently handled shape.
 com::sun::star::uno::Reference m_xParent;
+bool mbIsBackgroundDark;
 
 bool GetProperty( ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet > rXPropSet, const OUString& aName );
 bool GetPropertyAndState( ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet > rXPropSet,
@@ -118,7 +119,7 @@ protected:
 
 public:
 DrawingML( ::sax_fastparser::FSHelperPtr pFS, ::oox::core::XmlFilterBase* 
pFB = NULL, DocumentType eDocumentType = DOCUMENT_PPTX, DMLTextExport* 
pTextExport = 0 )
-: meDocumentType( eDocumentType ), mpTextExport(pTextExport), mpFS( 
pFS ), mpFB( pFB ) {}
+: meDocumentType( eDocumentType ), mpTextExport(pTextExport), mpFS( 
pFS ), mpFB( pFB ), mbIsBackgroundDark( false ) {}
 void SetFS( ::sax_fastparser::FSHelperPtr pFS ) { mpFS = pFS; }
 ::sax_fastparser::FSHelperPtr GetFS() { return mpFS; }
 ::oox::core::XmlFilterBase* GetFB() { return mpFB; }
@@ -126,6 +127,7 @@ public:
 /// The application-specific text exporter callback, if there is one.
 DMLTextExport* GetTextExport() { return mpTextExport; }
 
+void SetBackgroundDark(bool bIsDark) { mbIsBackgroundDark = bIsDark; }
 /// If bRelPathToMedia is true add "../" to image folder path while adding 
the image relationship
 OUString WriteImage( const Graphic &rGraphic , bool bRelPathToMedia = 
false);
 
@@ -173,7 +175,7 @@ public:
 void WriteParagraphNumbering( ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet > rXPropSet,
   sal_Int16 nLevel );
 void WriteRun( ::com::sun::star::uno::Reference< 
::com::sun::star::text::XTextRange > rRun );
-void WriteRunProperties( ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet > rRun, bool bIsField, sal_Int32 nElement 
= XML_rPr );
+void WriteRunProperties( ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet > rRun, bool bIsField, sal_Int32 nElement 
= XML_rPr ,bool bCheckDirect = true);
 
 void WritePresetShape( const char* pShape );
 void WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool 
bPredefinedHandlesUsed, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, const 
::com::sun::star::beans::PropertyValue& rProp );
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index a153ff2..6685948 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -113,6 +113,9 @@ namespace drawingml {
 if ( GETA(propName) ) \
 mAny >>= variable;
 
+#define CGETAD(propName) \
+(( bCheckDirect && GetPropertyAndState( rXPropSet, rXPropState, OUString( 
#propName ), eState ) && eState == beans::PropertyState_DIRECT_VALUE 
)||GetProperty( rXPropSet, OUString( #propName ) ))
+
 // not thread safe
 int DrawingML::mnImageCounter = 1;
 int DrawingML::mnWdpImageCounter = 1;
@@ -1173,7 +1176,7 @@ void DrawingML::WriteShapeTransformation( Reference< 
XShape > rXShape, sal_Int32
 WriteTransformation( Rectangle( Point( aPos.X, aPos.Y ), Size( 
aSize.Width, aSize.Height ) ), nXmlNamespace, bFlipH, bFlipV, 
OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(nRotation) );
 }
 
-void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool 
bIsField, sal_Int32 nElement /*= XML_rPr*/ )
+void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool 
bIsField, sal_Int32 nElement /*= XML_rPr*/, bool bCheckDirect/* = true */)
 {
 Reference< XPropertySet > rXPropSet( rRun, UNO_QUERY );
 Reference< XPropertyState > rXPropState( rRun, UNO_QUERY );
@@ -1220,7 +1223,7 @@ v

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

2015-08-25 Thread Mark Hung
 sw/source/core/text/itrpaint.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b14861e1dfb9f83d26d6032ae96b664845528f2a
Author: Mark Hung 
Date:   Sat Aug 1 22:48:39 2015 +0800

Fix tdf#77514 CJK ruby text in RTL( vertical ) base line issue.

Change-Id: Id670e83db01efe6bcd5fb6bb374ab9cb92898f88
Reviewed-on: https://gerrit.libreoffice.org/17460
Tested-by: Jenkins 
Reviewed-by: Norbert Thiebaud 

diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 903301e..56d155b 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -236,7 +236,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, 
SwSaveClip &rClip,
 // we calculate Y value for the whole line
 SwTextGridItem const*const pGrid(GetGridItem(GetTextFrm()->FindPageFrm()));
 const bool bAdjustBaseLine =
-GetLineInfo().HasSpecialAlign( GetTextFrm()->IsVertical() ) ||
+( !GetTextFrm()->IsVertical() || GetLineInfo().HasSpecialAlign( true ) 
) && (! GetTextFrm()->IsInFly()) &&
 ( 0 != pGrid );
 const SwTwips nLineBaseLine = GetInfo().GetPos().Y() + nTmpAscent;
 if ( ! bAdjustBaseLine )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Mark Hung
 oox/source/export/drawingml.cxx   |5 +++-
 sd/qa/unit/data/odp/bulletCharAndFont.odp |binary
 sd/qa/unit/export-tests.cxx   |   34 ++
 3 files changed, 38 insertions(+), 1 deletion(-)

New commits:
commit 65a66d41fd0e13d0aad9df935091b731b4af650a
Author: Mark Hung 
Date:   Mon Jul 27 23:53:18 2015 +0800

Fix tdf#77881,tdf#80520,tdf#89525 bulllets lost issue.

Replace bullet char before write out font description
since it may be altered if bullet font has been changed
(i.e. StarSymbol to WingDings ).

Change-Id: I0461cc0a5e4628b36177602bba7ed7f74a0751eb
Reviewed-on: https://gerrit.libreoffice.org/17376
Tested-by: Jenkins 
Reviewed-by: Norbert Thiebaud 

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 6685948..49e8b0c 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1727,10 +1727,14 @@ void DrawingML::WriteParagraphNumbering( Reference< 
XPropertySet > rXPropSet, sa
 mpFS->singleElementNS( XML_a, XML_buSzPct,
XML_val, IS( std::max( (sal_Int32)25000, 
std::min( (sal_Int32)40, 1000*( (sal_Int32)nBulletRelSize ) ) ) ), FSEND );
 if( bHasFontDesc )
+{
+if ( SVX_NUM_CHAR_SPECIAL == nNumberingType )
+aBulletChar = SubstituteBullet( aBulletChar, aFontDesc );
 mpFS->singleElementNS( XML_a, XML_buFont,
XML_typeface, 
aFontDesc.Name.toUtf8().getStr(),
XML_charset, (aFontDesc.CharSet == 
awt::CharSet::SYMBOL) ? "2" : NULL,
FSEND );
+}
 
 OUString pAutoNumType = GetAutoNumType( nNumberingType, bSDot, 
bPBehind, bPBoth );
 
@@ -1743,7 +1747,6 @@ void DrawingML::WriteParagraphNumbering( Reference< 
XPropertySet > rXPropSet, sa
 }
 else
 {
-aBulletChar = SubstituteBullet( aBulletChar, aFontDesc );
 mpFS->singleElementNS(XML_a, XML_buChar, XML_char, USS( OUString( 
aBulletChar ) ), FSEND);
 }
 }
diff --git a/sd/qa/unit/data/odp/bulletCharAndFont.odp 
b/sd/qa/unit/data/odp/bulletCharAndFont.odp
new file mode 100644
index 000..51277b2
Binary files /dev/null and b/sd/qa/unit/data/odp/bulletCharAndFont.odp differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index a90a3de..375ed3e 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -56,6 +56,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -120,6 +121,7 @@ public:
 void testTableCellBorder();
 void testBulletColor();
 void testTdf62176();
+void testBulletCharAndFont();
 void testBulletMarginAndIndentation();
 void testParaMarginAndindentation();
 void testTransparentBackground();
@@ -159,6 +161,7 @@ public:
 CPPUNIT_TEST(testTableCellBorder);
 CPPUNIT_TEST(testBulletColor);
 CPPUNIT_TEST(testTdf62176);
+CPPUNIT_TEST(testBulletCharAndFont);
 CPPUNIT_TEST(testBulletMarginAndIndentation);
 CPPUNIT_TEST(testParaMarginAndindentation);
 CPPUNIT_TEST(testTransparentBackground);
@@ -1022,6 +1025,37 @@ void SdExportTest::testTdf62176()
 uno::Reference xParagraph2(paraEnum2->nextElement(), 
uno::UNO_QUERY_THROW);
 CPPUNIT_ASSERT_EQUAL(OUString("Hello World"), xParagraph2->getString());
 }
+void SdExportTest::testBulletCharAndFont()
+{
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc("/sd/qa/unit/data/odp/bulletCharAndFont.odp"), ODP);
+xDocShRef = saveAndReload( xDocShRef, PPTX );
+uno::Reference< drawing::XDrawPagesSupplier > xDoc( 
xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
+uno::Reference< drawing::XDrawPage > xPage( 
xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
+uno::Reference< drawing::XShape > xShape(xPage->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xText = 
uno::Reference(xShape, uno::UNO_QUERY_THROW)->getText();
+uno::Reference paraEnumAccess;
+paraEnumAccess.set(xText, uno::UNO_QUERY);
+uno::Reference paraEnum = 
paraEnumAccess->createEnumeration();
+uno::Reference const xParagraph(paraEnum->nextElement(), 
uno::UNO_QUERY_THROW);
+uno::Reference< beans::XPropertySet > xPropSet( xParagraph, 
uno::UNO_QUERY_THROW );
+uno::Reference 
xLevels(xPropSet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+uno::Sequence aProps;
+xLevels->getByIndex(0) >>= aProps; // 1st level
+OUStringsBulletChar(sal_Unicode(0xf06c));
+for (int i = 0; i < aProps.getLength(); ++i)
+{
+const beans::PropertyValue& rProp = aProps[i];
+if (rProp.Name == "BulletChar")
+CPPUNIT_ASSERT_EQUAL_MESSAGE( "BulletChar incorrect.", sBulletChar 
,rProp.Value.get());
+if (rProp.Name == "BulletFont")
+{
+awt::FontDescriptor aFontDescriptor;
+

Re: Change Default System Font?

2015-08-25 Thread Nathan Wells
Actually, it looks like if I create a replacement table for Segoe UI then
it works. I'm in Windows 10, maybe that was the reason for the change.

Thanks,
Nathan

On Tue, Aug 25, 2015 at 4:55 PM, Nathan Wells  wrote:

> Hello,
>
> I've been wanting to reverse a "feature" I requested for LibreOffice for
> two years now but haven't been able to get any traction (the feature
> request and then rescinded request is here:
> https://bugs.documentfoundation.org/show_bug.cgi?id=52020 ). So I am
> preparing to do a build of LibreOffice with the feature removed myself so
> that Khmer and Minority Language users affected can go back to using
> LibreOffice again.
>
> But since I haven't used LibreOffice for the Khmer language for sometime I
> recently downloaded LibreOffice 5 and found I was unable to change the
> menu/system font to a font that supported Khmer.
> Previously I was able to do this by Tools > Options... > LibreOffice >
> View > User Interface section > uncheck Use system font for user interface
> and then use a font replacement table for Andale Sans UI and replace it
> with whatever font I want.
>
> Because I can't change the system/menu in LibreOffice to a font that
> supports Khmer, even if I am successful at my own build, it would be
> worthless since we use spelling and grammar checkers that need Khmer in the
> system/menu font to be usable.
>
> Can anyone help me out by directing me to the source code that would need
> to be changed in order to specify my own system font for LibreOffice?
>
> Thanks for your time and consideration,
> Nathan Wells
> sbbic.org
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: - Extended tips in Helpcontent & VCL + Glade

2015-08-25 Thread Caolán McNamara
On Sun, 2015-08-23 at 08:37 -0300, Olivier Hallot wrote:
> Hi all
> 
> Just playing with a new linux master build today and I found that the
>  
>  bla bla 
> bla
> 
> of a widget in a UI dialog, edited by Glade, indeed acts like an
> extended tip () for help content for the widget, 
> provided
> the "extented tips" in Tools - Options - General - Extended tips" is
> unmarked.
> 
> In other words, it is possible to have extended tips moved into these
> dialogs.


What is probably a better fit is to leave the tooltip .ui field for the
short "normal" tooltips. And use the "accessibility description" for
the big long extended tips that are current in help.

> 
> The benefits I see are
> 
> * Have the text of the e.t. in the UI and facilitate translation job
> (context)

agreed, and it also has the advantage that the "extended tips" are
always available even if help is not installed.

Another advantage is that the current ahelp tags have a "this refers to
the last defined helpid" i.e. "." markup and this is horribly broken in
a huge number of cases :-(

> * a quite large work of moving e.t. from helpcontent to UI.

Another disadvantage might be increased size of the default download
and install.

> * An impact in the translations of the UI (not sure it can be 
> automated).

This, "impact in the translations" is the problem really from my side.
It's the dev<->translator bridging. Ideally on the dev-side we'd be
able to e.g. make all the changes ourselves and update the .po files
with the moved strings and push them to translation website and there
would then be no additional translator work.


> * when unmarking Extended tips in the Options, we loose e.t. of 
> toolbars and other non-Glade UI objects.
> 
> * by filling the tooltip_markup property, e.t. are always enabled in 
> a dialog.

I think these problems can be solved by moving extended tips into the
a11y description and considering them both the same thing.


Markus has an extended-tip extraction tool as ./bin/extract-tooltip.py
FWIW

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


[Libreoffice-commits] core.git: offapi/com offapi/UnoApi_offapi.mk

2015-08-25 Thread Laurent Godard
 offapi/UnoApi_offapi.mk |   10 +-
 offapi/com/sun/star/frame/XController2.idl  |1 +
 offapi/com/sun/star/ui/XDeck.idl|6 --
 offapi/com/sun/star/ui/XDecks.idl   |7 ++-
 offapi/com/sun/star/ui/XPanel.idl   |4 +++-
 offapi/com/sun/star/ui/XPanels.idl  |9 -
 offapi/com/sun/star/ui/XSidebarProvider.idl |1 +
 7 files changed, 28 insertions(+), 10 deletions(-)

New commits:
commit c609b30b12df9118a9fb5fcf06177a39c54d895a
Author: Laurent Godard 
Date:   Mon Aug 24 14:15:57 2015 +0200

sidebar uno api corrections

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

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 0a915f4..505f4f5 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -4013,17 +4013,17 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/ui,\
XContextChangeEventMultiplexer \
XContextMenuInterception \
XContextMenuInterceptor \
+   XDeck \
+   XDecks \
XDockingAreaAcceptor \
XImageManager \
XModuleUIConfigurationManager \
XModuleUIConfigurationManager2 \
XModuleUIConfigurationManagerSupplier \
-   XSidebar \
-   XSidebarPanel \
XPanel \
XPanels \
-   XDeck \
-   XDecks \
+   XSidebar \
+   XSidebarPanel \
XSidebarProvider \
XStatusbarItem \
XToolPanel \
@@ -4036,7 +4036,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/ui,\
XUIConfigurationStorage \
XUIElement \
XUIElementFactory \
-XUIElementFactoryManager \
+   XUIElementFactoryManager \
XUIElementFactoryRegistration \
XUIElementSettings \
XUpdateModel \
diff --git a/offapi/com/sun/star/frame/XController2.idl 
b/offapi/com/sun/star/frame/XController2.idl
index 400b7ae..23c64f1 100644
--- a/offapi/com/sun/star/frame/XController2.idl
+++ b/offapi/com/sun/star/frame/XController2.idl
@@ -63,6 +63,7 @@ interface XController2 : XController
 CreationArguments;
 
 /** get the sidebar if exists
+@since LibreOffice 5.1
 */
 ::com::sun::star::ui::XSidebarProvider getSidebar();
 };
diff --git a/offapi/com/sun/star/ui/XDeck.idl b/offapi/com/sun/star/ui/XDeck.idl
index 53b7397..f19ed40 100644
--- a/offapi/com/sun/star/ui/XDeck.idl
+++ b/offapi/com/sun/star/ui/XDeck.idl
@@ -15,7 +15,9 @@
 
  module com {  module sun {  module star {  module ui {
 
-/** provides access to Desk */
+/** provides access to Deck
+@since LibreOffice 5.1
+*/
 
 interface XDeck
 
@@ -39,7 +41,7 @@ interface XDeck
 */
 boolean isActive();
 
-/** Activate the deck and isplays its content
+/** Activate the deck and displays its content
 
 @param bActivate
 The requested state for the deck
diff --git a/offapi/com/sun/star/ui/XDecks.idl 
b/offapi/com/sun/star/ui/XDecks.idl
index ba7c3a7..0ed2977 100644
--- a/offapi/com/sun/star/ui/XDecks.idl
+++ b/offapi/com/sun/star/ui/XDecks.idl
@@ -15,11 +15,16 @@
 
  module com {  module sun {  module star {  module ui {
 
-/** provides access to Desks of a Sidebar.*/
+/** provides access to Decks of a Sidebar.
+@since LibreOffice 5.1
+*/
 
 interface XDecks
 
 {
+/**
+returned ANYs are actually of type com::sun::star::ui::XDeck
+*/
 interface com::sun::star::container::XIndexAccess;
 interface com::sun::star::container::XNameAccess;
 };
diff --git a/offapi/com/sun/star/ui/XPanel.idl 
b/offapi/com/sun/star/ui/XPanel.idl
index 0070d23..f02d8b3 100644
--- a/offapi/com/sun/star/ui/XPanel.idl
+++ b/offapi/com/sun/star/ui/XPanel.idl
@@ -16,7 +16,9 @@
 
  module com {  module sun {  module star {  module ui {
 
-/** provides access to Desk */
+/** provides access to Panel
+@since LibreOffice 5.1
+*/
 
 interface XPanel
 
diff --git a/offapi/com/sun/star/ui/XPanels.idl 
b/offapi/com/sun/star/ui/XPanels.idl
index a2aa851..3617855 100644
--- a/offapi/com/sun/star/ui/XPanels.idl
+++ b/offapi/com/sun/star/ui/XPanels.idl
@@ -15,14 +15,21 @@
 
  module com {  module sun {  module star {  module ui {
 
-/** provides access to Panels of a Deck.*/
+/** provides access to Panels of a Deck.
+@since LibreOffice 5.1
+*/
 
 interface XPanels
 
 {
+/**
+returned ANYs are actually of type com::sun::star::ui::XPanel
+*/
 interface com::sun::star::container::XIndexAccess;
 interface com::sun::star::container::XNameAccess;
 
+/** The deck Id that contains the Panels
+*/
 string getDeckId();
 };
 
diff --git a/offapi/com/sun/star/ui/XSidebarProvider.idl 
b/offapi/com/sun/star/ui/XSidebarProvider.idl
index 8392bea..96dbfd8 100644
--- a/offapi/com/sun/star/ui/XSidebarProvider.idl
+++ b/offapi/com/sun/star/ui/XSideba

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

2015-08-25 Thread Stephan Bergmann
 offapi/com/sun/star/ui/XSidebarProvider.idl |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 6d39088c8f7b8f78d64fef208918dd46fc44
Author: Stephan Bergmann 
Date:   Tue Aug 25 14:14:02 2015 +0200

Remove redundant @since tag

Change-Id: Icc3e913d4150e724c87e8293f7b641ee8ca19177

diff --git a/offapi/com/sun/star/ui/XSidebarProvider.idl 
b/offapi/com/sun/star/ui/XSidebarProvider.idl
index 96dbfd8..242bad7 100644
--- a/offapi/com/sun/star/ui/XSidebarProvider.idl
+++ b/offapi/com/sun/star/ui/XSidebarProvider.idl
@@ -57,8 +57,6 @@ interface XSidebarProvider: com::sun::star::uno::XInterface
 
 /**
  * Returns the sidebar object
- *
- * @since LibreOffice 5.1
  */
 com::sun::star::ui::XSidebar getSidebar();
 } ;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Stephan Bergmann
 offapi/com/sun/star/ui/XDeck.idl |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit dea1d492db761cc0c0301d3a6d3aa9cd970a8ab9
Author: Stephan Bergmann 
Date:   Tue Aug 25 14:15:01 2015 +0200

typo

Change-Id: I555d4b79a61b371a39ad0f0b76c2d34c22414962

diff --git a/offapi/com/sun/star/ui/XDeck.idl b/offapi/com/sun/star/ui/XDeck.idl
index f19ed40..e5f73e2 100644
--- a/offapi/com/sun/star/ui/XDeck.idl
+++ b/offapi/com/sun/star/ui/XDeck.idl
@@ -41,7 +41,7 @@ interface XDeck
 */
 boolean isActive();
 
-/** Activate the deck and displays its content
+/** Activate the deck and display its content
 
 @param bActivate
 The requested state for the deck
@@ -89,4 +89,4 @@ interface XDeck
 
 #endif
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread David Tardon
 download.lst   
 |4 -
 
external/libwps/0001-QuattroPro-parser-correct-a-mistake-when-reading-neg.patch 
|   26 ---
 external/libwps/0001-error-C2065-M_PI-undeclared-identifier.patch  
 |   35 --
 external/libwps/UnpackedTarball_libwps.mk  
 |2 
 4 files changed, 2 insertions(+), 65 deletions(-)

New commits:
commit 737e2061cc2364a0f9b3a268cdaebba7773886ce
Author: David Tardon 
Date:   Tue Aug 25 12:24:54 2015 +0200

upload libwps 0.4.1

Change-Id: I53dc6d358952a046a4c1f03246441742dfa3d685

diff --git a/download.lst b/download.lst
index 0f321c0..8b1d7d2 100644
--- a/download.lst
+++ b/download.lst
@@ -151,8 +151,8 @@ export WPD_MD5SUM := 0773d79a1f240ef9f4f20242b13c5bb7
 export WPD_TARBALL := libwpd-0.10.0.tar.bz2
 export WPG_MD5SUM := 17da9770cb8b317b7633f9807b32b71a
 export WPG_TARBALL := libwpg-0.3.0.tar.bz2
-export WPS_MD5SUM := e9162d2566421d9d71b3ad2377a68fd5
-export WPS_VERSION_MICRO := 0
+export WPS_MD5SUM := b510da17dabf97864f821a71f1fe9025
+export WPS_VERSION_MICRO := 1
 export WPS_TARBALL := libwps-0.4.$(WPS_VERSION_MICRO).tar.bz2
 export XSLTML_TARBALL := a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
 export ZLIB_MD5SUM := 44d667c142d7cda120332623eab69f40
diff --git 
a/external/libwps/0001-QuattroPro-parser-correct-a-mistake-when-reading-neg.patch
 
b/external/libwps/0001-QuattroPro-parser-correct-a-mistake-when-reading-neg.patch
deleted file mode 100644
index d5a6f54..000
--- 
a/external/libwps/0001-QuattroPro-parser-correct-a-mistake-when-reading-neg.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 45a3dd5393e07340d5a63d8a8735789d73a61b17 Mon Sep 17 00:00:00 2001
-From: osnola 
-Date: Mon, 18 May 2015 08:27:59 +0200
-Subject: [PATCH] QuattroPro parser: correct a mistake when reading negative
- cell's position
-

- src/lib/QuattroSpreadsheet.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/lib/QuattroSpreadsheet.cpp b/src/lib/QuattroSpreadsheet.cpp
-index cb0f4f5..ce5e20a 100644
 a/src/lib/QuattroSpreadsheet.cpp
-+++ b/src/lib/QuattroSpreadsheet.cpp
-@@ -1668,7 +1668,7 @@ bool QuattroSpreadsheet::readCell
-   else
-   {
-   val &= 0x3FFF;
--  if (val & 0x2000) val = val - 0x4000;
-+  if (val>0x1000) val = val - 0x2000;
-   }
-   if (dim==2)
-   val += sheetId;
--- 
-2.3.2 (Apple Git-55)
-
diff --git a/external/libwps/0001-error-C2065-M_PI-undeclared-identifier.patch 
b/external/libwps/0001-error-C2065-M_PI-undeclared-identifier.patch
deleted file mode 100644
index 01109dc..000
--- a/external/libwps/0001-error-C2065-M_PI-undeclared-identifier.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 94af34d42129bad72fd7ce50dc6901287509703e Mon Sep 17 00:00:00 2001
-From: David Tardon 
-Date: Mon, 18 May 2015 18:50:25 +0200
-Subject: [PATCH] error C2065: M_PI : undeclared identifier
-

- src/lib/libwps_internal.h | 5 +
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/lib/libwps_internal.h b/src/lib/libwps_internal.h
-index fb9016d..02a87bc 100644
 a/src/lib/libwps_internal.h
-+++ b/src/lib/libwps_internal.h
-@@ -28,6 +28,7 @@
- #include 
- #endif
- 
-+#include 
- #include 
- #include 
- #include 
-@@ -36,6 +37,10 @@
- #include 
- #include 
- 
-+#ifndef M_PI
-+#define M_PI 3.14159265358979323846
-+#endif
-+
- #if defined(_MSC_VER) || defined(__DJGPP__)
- typedef signed char int8_t;
- typedef unsigned char uint8_t;
--- 
-2.4.0
-
diff --git a/external/libwps/UnpackedTarball_libwps.mk 
b/external/libwps/UnpackedTarball_libwps.mk
index 9839f06..c990efc 100644
--- a/external/libwps/UnpackedTarball_libwps.mk
+++ b/external/libwps/UnpackedTarball_libwps.mk
@@ -14,8 +14,6 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,libwps,$(WPS_TARBALL)))
 $(eval $(call gb_UnpackedTarball_set_patchlevel,libwps,1))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libwps,\
-   
external/libwps/0001-QuattroPro-parser-correct-a-mistake-when-reading-neg.patch 
\
-   external/libwps/0001-error-C2065-M_PI-undeclared-identifier.patch \
$(if $(SYSTEM_REVENGE),,external/libwps/rpath.patch.0) \
 ))
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Tor Lillqvist
 sc/source/core/opencl/formulagroupcl.cxx |   48 --
 sc/source/core/opencl/op_spreadsheet.cxx |  102 ---
 2 files changed, 96 insertions(+), 54 deletions(-)

New commits:
commit d4310b6cd8a367666cc702c3e47cf12a35407ef7
Author: Tor Lillqvist 
Date:   Tue Aug 25 15:38:58 2015 +0300

Cosmetics

Try to use some sane consistent formatting in this function. No semantic
change.

Change-Id: Ic9e4625c910f826246451e8ff9e18d6131c04a78

diff --git a/sc/source/core/opencl/op_spreadsheet.cxx 
b/sc/source/core/opencl/op_spreadsheet.cxx
index 3b06460..c005d2a 100644
--- a/sc/source/core/opencl/op_spreadsheet.cxx
+++ b/sc/source/core/opencl/op_spreadsheet.cxx
@@ -39,21 +39,23 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream 
&ss,
 ss << "double intermediate = DBL_MAX;\n";
 ss << "int singleIndex = gid0;\n";
 ss << "int rowNum = -1;\n";
+
 GenTmpVariables(ss,vSubArguments);
 int arg=0;
 CheckSubArgumentIsNan(ss,vSubArguments,arg++);
 int secondParaWidth = 1;
-if(vSubArguments[1]->GetFormulaToken()->GetType() ==
-formula::svDoubleVectorRef)
+
+if (vSubArguments[1]->GetFormulaToken()->GetType() == 
formula::svDoubleVectorRef)
 {
 FormulaToken *tmpCur = vSubArguments[1]->GetFormulaToken();
-const formula::DoubleVectorRefToken*pCurDVR= static_cast(tmpCur);
+const formula::DoubleVectorRefToken*pCurDVR = static_cast(tmpCur);
 secondParaWidth = pCurDVR->GetArrays().size();
 }
-arg+=secondParaWidth;
+
+arg += secondParaWidth;
 CheckSubArgumentIsNan(ss,vSubArguments,arg++);
-if(vSubArguments.size() == (unsigned int)(3+(secondParaWidth-1)))
+
+if (vSubArguments.size() == (unsigned int)(3+(secondParaWidth-1)))
 {
 ss << "double tmp";
 ss << 3+(secondParaWidth-1);
@@ -64,53 +66,57 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream 
&ss,
 CheckSubArgumentIsNan(ss,vSubArguments,arg++);
 }
 
-if(vSubArguments[1]->GetFormulaToken()->GetType() ==
-formula::svDoubleVectorRef)
+if (vSubArguments[1]->GetFormulaToken()->GetType() == 
formula::svDoubleVectorRef)
 {
 FormulaToken *tmpCur = vSubArguments[1]->GetFormulaToken();
-const formula::DoubleVectorRefToken*pCurDVR= static_cast(tmpCur);
-size_t nCurWindowSize = pCurDVR->GetArrayLength() <
-pCurDVR->GetRefRowSize() ? pCurDVR->GetArrayLength():
-pCurDVR->GetRefRowSize() ;
+const formula::DoubleVectorRefToken*pCurDVR = static_cast(tmpCur);
+size_t nCurWindowSize = pCurDVR->GetArrayLength() < 
pCurDVR->GetRefRowSize() ? pCurDVR->GetArrayLength() : pCurDVR->GetRefRowSize() 
;
 int unrollSize = 8;
 ss << "int loop;\n";
-if (!pCurDVR->IsStartFixed() && pCurDVR->IsEndFixed()) {
+if (!pCurDVR->IsStartFixed() && pCurDVR->IsEndFixed())
+{
 ss << "loop = ("IsEndFixed()) {
+}
+else if (pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed())
+{
 ss << "loop = ("IsEndFixed())
+{
+ss << "gid0 + j * "<< unrollSize <<";\n";
 }
-if(!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed())
+else
 {
-   ss << "int doubleIndex = i+gid0;\n";
-}else
+ss << "j * "<< unrollSize <<";\n";
+}
+if (!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed())
 {
-   ss << "int doubleIndex = i;\n";
+ss << "int doubleIndex = i+gid0;\n";
+}
+else
+{
+ss << "int doubleIndex = i;\n";
 }
 ss << "if(tmp";
 ss << 3+(secondParaWidth-1);
 ss << " == 1)\n";
 ss << "{\n";
 
-for(int j =0;j < unrollSize;j++)
+for (int j = 0;j < unrollSize; j++)
 {
 CheckSubArgumentIsNan(ss,vSubArguments,1+i);
 
@@ -131,7 +137,7 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream 
&ss,
 
 ss << "}else\n";
 ss << "{\n";
-for(int j =0;j < unrollSize;j++)
+for (int j = 0; j < unrollSize; j++)
 {
 CheckSubArgumentIsNan(ss,vSubArguments,1+i);
 
@@ -149,15 +155,14 @@ void 
OpVLookup::GenSlidingWindowFunction(std::stringstream &ss,
 ss << "}\n";
 ss << "if(rowNum!=-1)\n";
 ss << "{\n";
-for(int j=0;j< secondParaWidth; j++)
+for (int j = 0; j < secondParaWidth; j++)
 {
-
 ss << "if(tmp";
 ss << 2+(secondParaWidth-1);
 ss << " == ";
 ss << j+1;
 ss << ")\n";
- 

Re: What autogen.sh for an alternative ContentProvider for dav:// scheme?

2015-08-25 Thread Giuseppe Castagno

Hi Stephan,

On 08/25/2015 01:14 PM, Stephan Bergmann wrote:

On 08/25/2015 12:07 PM, Giuseppe Castagno wrote:

master was built with following autogen.sh input:


...



Is this due to a different configuration on LO 5.0.0.5 production build
or is there a difference in ucb code?


The reason for this is

"rhbz#1134285: Access dav, davs URLs via GVFS" (see commit message for
details) together with the fact that the TDF LO 5.0 Linux build uses
--enable-gnome-vfs (cf. distro-configs/LibreOfficeLinux.conf) while your
(master) build defaults to --enable-gio.


I see, thanks for the hints.



Punchline: use standard http/https URL schemes instead of non-standard
dav/davs ones.


I know, I know :-)

But the main reason for asking is the way our users employ the dav:// 
and davs:// schemes in local interaction with a browser, as in this [1].


So probably something else is needed in local use only.

The internal scheme vnd.sun.star.webdav: may be used, though misses the 
https:// counterpart (vnd.sun.star.webdavs: ?).


Or something entirely new: vnd.tdf.org.dav: / vnd.tdf.org.davs: ? :-)

In order to use pure WebDAV and not the file system mapped one.

So in the the users will have a choice (in Linux, don't know in other 
platforms):


- WebDAV file system mapped: dav:// davs://
- pure WebDAV: a choice among the others I suggested above.

--
Kind Regards,
Giuseppe Castagno aka beppec56
Acca Esse http://www.acca-esse.eu
giuseppe.castagno at acca-esse.eu
[1] 
https://code.google.com/p/alfresco-share-online-edition-addon/#Registering_the_dav_protocol_in_Linux


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


Re: use of xsltproc without '--nonet'

2015-08-25 Thread David Tardon
Hi,

On Tue, Aug 25, 2015 at 08:53:41AM +0200, Richard PALO wrote:
> I noticed (by chance) some uses of xsltproc without the '--nonet' option in 
> the following files:
> > extras/CustomTarget_autocorr.mk
> > extras/CustomTarget_autotextshare.mk
> > extras/CustomTarget_autotextuser.mk
> > solenv/gbuild/UIConfig.mk
> > solenv/gbuild/platform/macosx.mk
> 
> Is there any particular reason these cannot be forced to build locally like 
> the other uses of xsltproc?

Why do you think the option has been left out intentionally? Or, even
better, why do you think it has been left out? A more plausible
explanation is that the author of the code (I in all cases, IIRC) forgot
to use it...

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


Re: What autogen.sh for an alternative ContentProvider for dav:// scheme?

2015-08-25 Thread Stephan Bergmann

On 08/25/2015 02:51 PM, Giuseppe Castagno wrote:

On 08/25/2015 01:14 PM, Stephan Bergmann wrote:

On 08/25/2015 12:07 PM, Giuseppe Castagno wrote:
Punchline: use standard http/https URL schemes instead of non-standard
dav/davs ones.


I know, I know :-)

But the main reason for asking is the way our users employ the dav://
and davs:// schemes in local interaction with a browser, as in this [1].

So probably something else is needed in local use only.

The internal scheme vnd.sun.star.webdav: may be used, though misses the
https:// counterpart (vnd.sun.star.webdavs: ?).

Or something entirely new: vnd.tdf.org.dav: / vnd.tdf.org.davs: ? :-)

In order to use pure WebDAV and not the file system mapped one.

So in the the users will have a choice (in Linux, don't know in other
platforms):

- WebDAV file system mapped: dav:// davs://
- pure WebDAV: a choice among the others I suggested above.


I don't really understand what requires use of URL schemes different 
from http/https in your users' scenarios.  But, depending on how tightly 
you control your users' environments, another option might be to install 
into their environments configuration settings (under 
/org.openoffice.ucb.Configuration/ContentProviders/Local/SecondaryKeys/Office/ProviderData) 
that do map the dav/davs URL schemes to the 
com.sun.star.ucb.WebDAVContentProvider service (instead of implicitly 
leaving them to be handled by a default-registered gnome-vfs or gio 
service, if applicable, or to be left unhandled).  (Which would of 
course undo for these users the fix for rhbz#1134285 mentioned above, 
where applicable.)

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


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

2015-08-25 Thread Andrzej Hunt
 sc/source/ui/condformat/condformatdlg.cxx |   34 +++---
 sc/source/ui/inc/condformatdlg.hxx|3 ++
 2 files changed, 30 insertions(+), 7 deletions(-)

New commits:
commit 14323c74935337775c05975f907a78bd692e8d44
Author: Andrzej Hunt 
Date:   Thu May 14 16:50:46 2015 +0100

Update title of Conditional Format dialog when range modified

Previously the title was set during construction as e.g.
"Conditional Format: A2:B245"

However the selected range can be modified while the dialog is open,
hence we update it whenever the selected range is modified.

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

diff --git a/sc/source/ui/condformat/condformatdlg.cxx 
b/sc/source/ui/condformat/condformatdlg.cxx
index fec9373..059aaf9 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -450,13 +450,6 @@ ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, 
SfxChildWindow* pCW,
 get(mpCondFormList, "list");
 mpCondFormList->init(mpViewData->GetDocument(), this, pFormat, rRange, 
rPos, eType);
 
-OUStringBuffer aTitle( GetText() );
-aTitle.append(" ");
-OUString aRangeString;
-rRange.Format(aRangeString, SCA_VALID, pViewData->GetDocument(),
-pViewData->GetDocument()->GetAddressConvention());
-aTitle.append(aRangeString);
-SetText(aTitle.makeStringAndClear());
 mpBtnOk->SetClickHdl(LINK(this, ScCondFormatDlg, BtnPressedHdl ) );
 mpBtnAdd->SetClickHdl( LINK( mpCondFormList, ScCondFormatList, AddBtnHdl ) 
);
 mpBtnRemove->SetClickHdl( LINK( mpCondFormList, ScCondFormatList, 
RemoveBtnHdl ) );
@@ -464,7 +457,20 @@ ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, 
SfxChildWindow* pCW,
 mpEdRange->SetModifyHdl( LINK( this, ScCondFormatDlg, EdRangeModifyHdl ) );
 mpEdRange->SetGetFocusHdl( LINK( this, ScCondFormatDlg, RangeGetFocusHdl ) 
);
 
+OUString aRangeString;
+rRange.Format(aRangeString, SCA_VALID, pViewData->GetDocument(),
+pViewData->GetDocument()->GetAddressConvention());
 mpEdRange->SetText(aRangeString);
+
+msBaseTitle = GetText();
+updateTitle();
+}
+
+void ScCondFormatDlg::updateTitle()
+{
+OUString aTitle = msBaseTitle + " " + mpEdRange->GetText();
+
+SetText(aTitle);
 }
 
 ScCondFormatDlg::~ScCondFormatDlg()
@@ -500,6 +506,17 @@ void ScCondFormatDlg::SetActive()
 void ScCondFormatDlg::RefInputDone( bool bForced )
 {
 ScAnyRefDlg::RefInputDone(bForced);
+
+// ScAnyRefModalDlg::RefInputDone resets the title back
+// to it's original state.
+// I.e. if we open the dialog normally, and then click into the sheet
+// to modify the selection, the title is updated such that the range
+// is only a single cell (e.g. $A$1), after which the dialog switches
+// into the RefInput mode. During the RefInput mode the title is updated
+// as expected, however at the end RefInputDone overwrites the title
+// with the initial (now incorrect) single cell range. Hence we correct
+// it here.
+updateTitle();
 }
 
 bool ScCondFormatDlg::IsTableLocked() const
@@ -541,6 +558,7 @@ void ScCondFormatDlg::SetReference(const ScRange& rRef, 
ScDocument*)
 OUString aRefStr(rRef.Format(n, mpViewData->GetDocument(),
 
ScAddress::Details(mpViewData->GetDocument()->GetAddressConvention(), 0, 0)));
 pEdit->SetRefString( aRefStr );
+updateTitle();
 }
 }
 
@@ -766,6 +784,8 @@ IMPL_LINK( ScCondFormatDlg, EdRangeModifyHdl, Edit*, pEdit )
 
pEdit->SetControlBackground(GetSettings().GetStyleSettings().GetWindowColor());
 else
 pEdit->SetControlBackground(COL_LIGHTRED);
+
+updateTitle();
 return 0;
 }
 
diff --git a/sc/source/ui/inc/condformatdlg.hxx 
b/sc/source/ui/inc/condformatdlg.hxx
index 1438510..531b8c1 100644
--- a/sc/source/ui/inc/condformatdlg.hxx
+++ b/sc/source/ui/inc/condformatdlg.hxx
@@ -116,6 +116,9 @@ private:
 
 VclPtr mpLastEdit;
 
+OUString msBaseTitle;
+void updateTitle();
+
 DECL_LINK( EdRangeModifyHdl, Edit* );
 protected:
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Michael Meeks
 svx/source/dialog/graphctl.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 2f31a4c1e8c2bbe9e3e4dba6e24ce4d206831e3b
Author: Michael Meeks 
Date:   Tue Aug 25 14:41:50 2015 +0100

tdf#92213 - avoid potential crasher from unusual idle handler.

Change-Id: Id5715f8753d17b3955ac87b9260318ac56e64a08

diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index d5855042..81a1096 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -90,14 +90,19 @@ GraphCtrl::~GraphCtrl()
 
 void GraphCtrl::dispose()
 {
+aUpdateIdle.Stop();
+
 if( mpAccContext )
 {
 mpAccContext->disposing();
 mpAccContext->release();
 }
 delete pView;
+pView = NULL;
 delete pModel;
+pModel = NULL;
 delete pUserCall;
+pUserCall = NULL;
 Control::dispose();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Tobias Lippert
 sc/inc/chart2uno.hxx  |8 ++
 sc/source/ui/unoobj/chart2uno.cxx |  109 +-
 2 files changed, 45 insertions(+), 72 deletions(-)

New commits:
commit 1979c48bf96bc1fd8f3558b6c9970935ddd79723
Author: Tobias Lippert 
Date:   Fri Jul 31 19:49:46 2015 +0200

tdf#68016 Speed up ScChart2DataSequence by caching addresses

The lookup of getNumberFormatKeyByIndex() is sped up by storing the
addresses into the cached data array m_aDataArray.

The existing cache invalidating strategy should hold since the
cache was already storing information about hidden fields and
ranges, which is the information which affects the addresses.

Also: Change data type of m_aDataArray from std::list to std::vector to
allow index-based access.

Also: Change for-loops over m_aDataArray to range-based loops with auto
variables to make them more readable

Change-Id: I9a5038892a384e7d5e72556a52faaf98b475a839
Reviewed-on: https://gerrit.libreoffice.org/16485
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx
index 03e988c..68387a6 100644
--- a/sc/inc/chart2uno.hxx
+++ b/sc/inc/chart2uno.hxx
@@ -262,6 +262,10 @@ public:
 virtual ::com::sun::star::uno::Sequence< OUString >
 SAL_CALL generateLabel(::com::sun::star::chart2::data::LabelOrigin 
nOrigin)
 throw (::com::sun::star::uno::RuntimeException, std::exception) 
SAL_OVERRIDE;
+
+/** Get the number format key for the n-th data entry
+ * If nIndex == -1, then you will get the number format key for the first 
non-empty entry
+ */
 virtual ::sal_Int32 SAL_CALL getNumberFormatKeyByIndex( ::sal_Int32 nIndex 
)
 throw (::com::sun::star::lang::IndexOutOfBoundsException,
::com::sun::star::uno::RuntimeException,
@@ -416,6 +420,7 @@ private:
 double  mfValue;
 OUString maString;
 boolmbIsValue;
+ScAddress   mAddress;
 Item();
 };
 
@@ -431,7 +436,8 @@ private:
 ScChart2DataSequence& mrParent;
 };
 
-::std::list   m_aDataArray;
+/** This vector contains the cached data which was calculated with 
BuildDataCache(). */
+std::vector   m_aDataArray;
 
 /**
  * Cached data for getData.  We may also need to cache data for the
diff --git a/sc/source/ui/unoobj/chart2uno.cxx 
b/sc/source/ui/unoobj/chart2uno.cxx
index e0793a2..5373bf8 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -2642,6 +2642,8 @@ void ScChart2DataSequence::BuildDataCache()
 ; // do nothing
 }
 
+aItem.mAddress = ScAddress(nCol, nRow, nTab);
+
 m_aDataArray.push_back(aItem);
 ++nDataCount;
 }
@@ -2808,7 +2810,7 @@ void ScChart2DataSequence::CopyData(const 
ScChart2DataSequence& r)
 return;
 }
 
-list aDataArray(r.m_aDataArray);
+std::vector aDataArray(r.m_aDataArray);
 m_aDataArray.swap(aDataArray);
 
 m_aHiddenValues = r.m_aHiddenValues;
@@ -3023,13 +3025,13 @@ uno::Sequence< uno::Any> SAL_CALL 
ScChart2DataSequence::getData()
 sal_Int32 nCount = m_aDataArray.size();
 m_aMixedDataCache.realloc(nCount);
 uno::Any* pArr = m_aMixedDataCache.getArray();
-::std::list::const_iterator itr = m_aDataArray.begin(), itrEnd = 
m_aDataArray.end();
-for (; itr != itrEnd; ++itr, ++pArr)
+for (const Item &rItem : m_aDataArray)
 {
-if (itr->mbIsValue)
-*pArr <<= itr->mfValue;
+if (rItem.mbIsValue)
+*pArr <<= rItem.mfValue;
 else
-*pArr <<= itr->maString;
+*pArr <<= rItem.maString;
+++pArr;
 }
 }
 return m_aMixedDataCache;
@@ -3052,9 +3054,11 @@ uno::Sequence< double > SAL_CALL 
ScChart2DataSequence::getNumericalData()
 sal_Int32 nCount = m_aDataArray.size();
 uno::Sequence aSeq(nCount);
 double* pArr = aSeq.getArray();
-::std::list::const_iterator itr = m_aDataArray.begin(), itrEnd = 
m_aDataArray.end();
-for (; itr != itrEnd; ++itr, ++pArr)
-*pArr = itr->mbIsValue ? itr->mfValue : fNAN;
+for (const Item& rItem : m_aDataArray)
+{
+*pArr = rItem.mbIsValue ? rItem.mfValue : fNAN;
+++pArr;
+}
 
 return aSeq;
 }
@@ -3076,9 +3080,11 @@ uno::Sequence< OUString > SAL_CALL 
ScChart2DataSequence::getTextualData()
 {
 aSeq =  uno::Sequence(nCount);
 OUString* pArr = aSeq.getArray();
-::std::list::const_iterator itr = m_aDataArray.begin(), itrEnd = 
m_aDataArray.end();
-for(; itr != itrEnd; ++itr, ++pArr)
-*pArr = itr->maString;
+for (const Item& rItem : m_aDataArray)
+ 

[PATCH]

2015-08-25 Thread Olivier R.
Hi *,

Here is a patch to update the French spelling dictionary.
For 5.0 and master.

0001-Update-French-spelling-dictionary-v5.patch

  

Thanks.

Olivier



--
View this message in context: 
http://nabble.documentfoundation.org/PATCH-tp4158216.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-08-25 Thread Julien Nabet
 sw/source/ui/chrdlg/numpara.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ad8e2baf68ed5edccabdf56584768fcdaabbab5c
Author: Julien Nabet 
Date:   Sat Aug 22 15:43:20 2015 +0200

tdf#93351: Edit style button in Schema & Numbering should point to List 
styles

Related to 
http://cgit.freedesktop.org/libreoffice/core/commit/?id=e38f63d861715fb56f41af82b897c2128ea20b38

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

diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 096f06e..39230e9 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -334,7 +334,7 @@ IMPL_LINK_NOARG( SwParagraphNumTabPage, 
EditNumStyleSelectHdl_Impl )
 IMPL_LINK_NOARG(SwParagraphNumTabPage, EditNumStyleHdl_Impl)
 {
 OUString aTemplName(m_pNumberStyleLB->GetSelectEntry());
-ExecuteEditNumStyle_Impl( SID_STYLE_EDIT, aTemplName, 
OUString(),SFX_STYLE_FAMILY_PARA, 0 );
+ExecuteEditNumStyle_Impl( SID_STYLE_EDIT, aTemplName, 
OUString(),SFX_STYLE_FAMILY_PSEUDO, 0 );
 return 0;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Deletion of vcl::Window's inside ToolBar

2015-08-25 Thread Caolán McNamara
On Fri, 2015-08-21 at 23:51 +0530, Dennis Francis wrote:
> Hi all,
> 
> I am trying to understand where the SvxFontNameBox_Impl objects are 
> deallocated. With help from 
> gdb and opengrok, I found that it is held in ImplToolItem::mpWindow. 
> But in ImplToolItem destructor it says clearly not to remove mpWindow 
> as a comment.

> 
> ImplToolItem::~ImplToolItem() { 
> // don't dispose mpWindow - we get copied around.
> }

Digging into the other examples, I guess that SetItemWindow was called
on the toolbar with the SvxFontNameBox_Impl window as an argument ?

If that's the case then the pattern appears to be that what object
called SetItemWindow on the toolbar should call SetItemWindow(id, 0) to
remove the window from the toolbar and then call disposeAndClear on the
window.

i.e. what entity put the item into the toolbar is the same entity that
has to remove it and dispose it.

What's the reproducing scenario here, is it the fontname widget in the
standard toolbar, e.g. just start and exit writer to reproduce ?

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


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

2015-08-25 Thread David Tardon
 src/lib/VSDMetaData.cpp  |5 +
 src/lib/VSDParser.cpp|   12 
 src/lib/libvisio_utils.h |3 +++
 3 files changed, 16 insertions(+), 4 deletions(-)

New commits:
commit 4b03893826bcc5f859b0ac3bea6a98269499d99f
Author: David Tardon 
Date:   Tue Aug 25 16:27:18 2015 +0200

sanitize page dimensions and scale

Change-Id: Ie170d9911b9f7349e4700efd5e2c089423f4218b

diff --git a/src/lib/VSDParser.cpp b/src/lib/VSDParser.cpp
index 827ed48..3074784 100644
--- a/src/lib/VSDParser.cpp
+++ b/src/lib/VSDParser.cpp
@@ -1102,17 +1102,21 @@ void 
libvisio::VSDParser::readPageProps(librevenge::RVNGInputStream *input)
 {
   // Skip bytes representing unit to *display* (value is always inches)
   input->seek(1, librevenge::RVNG_SEEK_CUR);
-  double pageWidth = readDouble(input);
+  const double pageWidth = std::max(readDouble(input), 0);
   input->seek(1, librevenge::RVNG_SEEK_CUR);
-  double pageHeight = readDouble(input);
+  const double pageHeight = std::max(readDouble(input), 0);
   input->seek(1, librevenge::RVNG_SEEK_CUR);
   m_shadowOffsetX = readDouble(input);
   input->seek(1, librevenge::RVNG_SEEK_CUR);
   m_shadowOffsetY = readDouble(input);
   input->seek(1, librevenge::RVNG_SEEK_CUR);
-  double scale = readDouble(input);
+  const double numerator = readDouble(input);
   input->seek(1, librevenge::RVNG_SEEK_CUR);
-  scale /= readDouble(input);
+  double denominator = readDouble(input);
+  if (VSD_ALMOST_ZERO(denominator))
+denominator = 1;
+
+  const double scale = std::abs(numerator / denominator);
 
   if (m_isStencilStarted && m_currentStencil)
   {
diff --git a/src/lib/libvisio_utils.h b/src/lib/libvisio_utils.h
index 0ff3a16..c6c3a03 100644
--- a/src/lib/libvisio_utils.h
+++ b/src/lib/libvisio_utils.h
@@ -14,6 +14,9 @@
 
 #include "VSDTypes.h"
 
+#define VSD_EPSILON 1E-6
+#define VSD_ALMOST_ZERO(m) (fabs(m) <= VSD_EPSILON)
+
 #ifdef _MSC_VER
 
 typedef unsigned char uint8_t;
commit 4700056698abce223b3da120d58019c4626b5e57
Author: David Tardon 
Date:   Tue Aug 25 16:12:25 2015 +0200

afl: avoid out of bounds access to vector

Change-Id: I51fdad6cca395bb5aadc916ef452ee020f07

diff --git a/src/lib/VSDMetaData.cpp b/src/lib/VSDMetaData.cpp
index 00dca07..7241b00 100644
--- a/src/lib/VSDMetaData.cpp
+++ b/src/lib/VSDMetaData.cpp
@@ -8,6 +8,7 @@
  */
 
 #include "VSDMetaData.h"
+#include 
 #include 
 #include 
 #include 
@@ -238,6 +239,9 @@ librevenge::RVNGString 
libvisio::VSDMetaData::readCodePageString(librevenge::RVN
 {
   uint32_t size = readU32(input);
 
+  if (size == 0)
+return librevenge::RVNGString();
+
   std::vector characters;
   for (uint32_t i = 0; i < size; ++i)
 characters.push_back(readU8(input));
@@ -267,6 +271,7 @@ librevenge::RVNGString 
libvisio::VSDMetaData::readCodePageString(librevenge::RVN
 
 if (U_SUCCESS(status) && conv)
 {
+  assert(!characters.empty());
   const char *src = (const char *)&characters[0];
   const char *srcLimit = (const char *)src + characters.size();
   while (src < srcLimit)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 92018] Implement caching for native widget rendering for Mac / OpenGL rendering

2015-08-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=92018

Michael Meeks  changed:

   What|Removed |Added

 Blocks|93529   |

--- Comment #5 from Michael Meeks  ---
Dropping tracker for now - this is mac specific.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-08-25 Thread Stephan Bergmann
 filter/source/graphicfilter/ipbm/ipbm.cxx |   24 
 1 file changed, 24 insertions(+)

New commits:
commit 0382dd6b26a77484cc2818ea1655da373fa92e5f
Author: Stephan Bergmann 
Date:   Tue Aug 25 11:58:42 2015 +0200

Avoid overflow in PBMReader::ImplReadHeader

...as found by UBSan in CppunitTest_filter_ppm_test on
filter/qa/cppunit/data/pbm/fail/crash-1.pbm

Change-Id: Ib7c50ef1f07aba6b78f79c608be69c3dac38ddfe
(cherry picked from commit 662498ab80833a2b671c247fb859603632e52105)
Reviewed-on: https://gerrit.libreoffice.org/17989
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx 
b/filter/source/graphicfilter/ipbm/ipbm.cxx
index 231b0e6..89ac09d 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -234,17 +234,41 @@ bool PBMReader::ImplReadHeader()
 nDat -= '0';
 if ( nCount == 0 )
 {
+if (mnWidth > SAL_MAX_INT32 / 10)
+{
+return false;
+}
 mnWidth *= 10;
+if (nDat > SAL_MAX_INT32 - mnWidth)
+{
+return false;
+}
 mnWidth += nDat;
 }
 else if ( nCount == 1 )
 {
+if (mnHeight > SAL_MAX_INT32 / 10)
+{
+return false;
+}
 mnHeight *= 10;
+if (nDat > SAL_MAX_INT32 - mnHeight)
+{
+return false;
+}
 mnHeight += nDat;
 }
 else if ( nCount == 2 )
 {
+if (mnMaxVal > std::numeric_limits::max() / 10)
+{
+return false;
+}
 mnMaxVal *= 10;
+if (nDat > std::numeric_limits::max() - mnMaxVal)
+{
+return false;
+}
 mnMaxVal += nDat;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Stephan Bergmann
 sw/source/filter/ww8/ww8scan.cxx |  147 ---
 1 file changed, 123 insertions(+), 24 deletions(-)

New commits:
commit e5a9e86a3f454cec9ff8ecc12ed93970ef555d0e
Author: Stephan Bergmann 
Date:   Mon Aug 24 17:31:24 2015 +0200

Handle non-aligned FFNs

...as found by UBSan in CppunitTest_sw_filters_test (see below), and at the 
same
time limit reads within the pA array to its bounds.

> Testing file:///.../sw/qa/core/data/ww6/pass/crash-2.doc:
> sw/source/filter/ww8/ww8scan.cxx:6473:32: runtime error: upcast of 
misaligned address 0x620e70e7 for type 'WW8_FFN_Ver6', which requires 2 
byte alignment
> 0x620e70e7: note: pointer points here
>  00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 0e 00 00 6a 00  00 00 
00 0e 00 00 6a 00  00 00 6a
>  ^
>  WW8Fonts::WW8Fonts(SvStream&, WW8Fib&) 
sw/source/filter/ww8/ww8scan.cxx:6473:32
>  SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) 
sw/source/filter/ww8/ww8par.cxx:4961:20
>  SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:5767:19
>  SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:6039:19
>  WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString 
const&) sw/source/filter/ww8/ww8par.cxx:6157:20
>  SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18
>  SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22
>  SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23
>  SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
sw/qa/core/filters-test.cxx:112:20
>  SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) 
sw/qa/core/filters-test.cxx:71:12
>  test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString 
const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, 
SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:129:20
>  test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:154:5
>  SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5

(cherry picked from commit 6373886870503a981b65f204f9113aebff540ab8)

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

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 7070a94..0cd7b68 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -20,10 +20,12 @@
 #include "ww8scan.hxx"
 #include "ww8par.hxx"
 
+#include 
+#include 
+#include 
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -6329,10 +6331,15 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, OUString* 
pString, short* pcbStd )
 return pStd;
 }
 
-struct WW8_FFN_Ver6 : public WW8_FFN_BASE
+namespace {
+const sal_uInt16 maxStrSize = 65;
+}
+
+struct WW8_FFN_Ver6
 {
-// ab Ver6
-sal_Char szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
+WW8_FFN_BASE base;
+// from Ver6
+sal_Char szFfn[maxStrSize]; // 0x6 bzw. 0x40 ab Ver8 zero terminated 
string that
 // records name of font.
 // Maximal size of szFfn is 65 characters.
 // Vorsicht: Dieses Array kann auch kleiner sein!!!
@@ -6411,6 +6418,50 @@ namespace
 }
 return nMax;
 }
+
+template bool readU8(
+sal_uInt8 const * p, std::size_t offset, sal_uInt8 const * pEnd,
+T * value)
+{
+assert(p <= pEnd);
+assert(value != nullptr);
+if (offset >= static_cast(pEnd - p)) {
+return false;
+}
+*value = p[offset];
+return true;
+}
+
+bool readS16(
+sal_uInt8 const * p, std::size_t offset, sal_uInt8 const * pEnd,
+short * value)
+{
+assert(p <= pEnd);
+assert(value != nullptr);
+if (offset > static_cast(pEnd - p)
+|| static_cast(pEnd - p) - offset < 2)
+{
+return false;
+}
+*value = unsigned(p[offset]) + (unsigned(p[offset + 1]) << 8);
+return true;
+}
+
+sal_Int32 getStringLength(
+sal_uInt8 const * p, std::size_t offset, sal_uInt8 const * pEnd)
+{
+assert(p <= pEnd);
+assert(pEnd - p <= SAL_MAX_INT32);
+if (offset >= static_cast(pEnd - p)) {
+return -1;
+}
+void const * p2 = std::memchr(
+p + offset, 0, static_cast(pEnd - p) - offset);
+if (p2 

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

2015-08-25 Thread Stephan Bergmann
 filter/source/graphicfilter/ipbm/ipbm.cxx |   24 
 1 file changed, 24 insertions(+)

New commits:
commit 4c8bba9a8e7488b268fc4f6c9e06195b42565375
Author: Stephan Bergmann 
Date:   Tue Aug 25 11:58:42 2015 +0200

Avoid overflow in PBMReader::ImplReadHeader

...as found by UBSan in CppunitTest_filter_ppm_test on
filter/qa/cppunit/data/pbm/fail/crash-1.pbm

Change-Id: Ib7c50ef1f07aba6b78f79c608be69c3dac38ddfe
(cherry picked from commit 662498ab80833a2b671c247fb859603632e52105)
Reviewed-on: https://gerrit.libreoffice.org/17984
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx 
b/filter/source/graphicfilter/ipbm/ipbm.cxx
index 18b3249..d7cf941 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -218,17 +218,41 @@ bool PBMReader::ImplReadHeader()
 nDat -= '0';
 if ( nCount == 0 )
 {
+if (mnWidth > SAL_MAX_INT32 / 10)
+{
+return false;
+}
 mnWidth *= 10;
+if (nDat > SAL_MAX_INT32 - mnWidth)
+{
+return false;
+}
 mnWidth += nDat;
 }
 else if ( nCount == 1 )
 {
+if (mnHeight > SAL_MAX_INT32 / 10)
+{
+return false;
+}
 mnHeight *= 10;
+if (nDat > SAL_MAX_INT32 - mnHeight)
+{
+return false;
+}
 mnHeight += nDat;
 }
 else if ( nCount == 2 )
 {
+if (mnMaxVal > std::numeric_limits::max() / 10)
+{
+return false;
+}
 mnMaxVal *= 10;
+if (nDat > std::numeric_limits::max() - mnMaxVal)
+{
+return false;
+}
 mnMaxVal += nDat;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Stephan Bergmann
 sw/source/filter/ww8/ww8scan.cxx |  147 ---
 1 file changed, 123 insertions(+), 24 deletions(-)

New commits:
commit db39370e91c68910daf1f5959f6494b4891e7ba2
Author: Stephan Bergmann 
Date:   Mon Aug 24 17:31:24 2015 +0200

Handle non-aligned FFNs

...as found by UBSan in CppunitTest_sw_filters_test (see below), and at the 
same
time limit reads within the pA array to its bounds.

> Testing file:///.../sw/qa/core/data/ww6/pass/crash-2.doc:
> sw/source/filter/ww8/ww8scan.cxx:6473:32: runtime error: upcast of 
misaligned address 0x620e70e7 for type 'WW8_FFN_Ver6', which requires 2 
byte alignment
> 0x620e70e7: note: pointer points here
>  00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 0e 00 00 6a 00  00 00 
00 0e 00 00 6a 00  00 00 6a
>  ^
>  WW8Fonts::WW8Fonts(SvStream&, WW8Fib&) 
sw/source/filter/ww8/ww8scan.cxx:6473:32
>  SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) 
sw/source/filter/ww8/ww8par.cxx:4961:20
>  SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:5767:19
>  SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) 
sw/source/filter/ww8/ww8par.cxx:6039:19
>  WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString 
const&) sw/source/filter/ww8/ww8par.cxx:6157:20
>  SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18
>  SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22
>  SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23
>  SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
sw/qa/core/filters-test.cxx:112:20
>  SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) 
sw/qa/core/filters-test.cxx:71:12
>  test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString 
const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, 
SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:129:20
>  test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) 
unotest/source/cpp/filters-test.cxx:154:5
>  SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5

(cherry picked from commit 6373886870503a981b65f204f9113aebff540ab8)

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

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 1f7f526..47cdde9 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -20,10 +20,12 @@
 #include "ww8scan.hxx"
 #include "ww8par.hxx"
 
+#include 
+#include 
+#include 
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -6357,10 +6359,15 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, OUString* 
pString, short* pcbStd )
 return pStd;
 }
 
-struct WW8_FFN_Ver6 : public WW8_FFN_BASE
+namespace {
+const sal_uInt16 maxStrSize = 65;
+}
+
+struct WW8_FFN_Ver6
 {
-// ab Ver6
-sal_Char szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
+WW8_FFN_BASE base;
+// from Ver6
+sal_Char szFfn[maxStrSize]; // 0x6 bzw. 0x40 ab Ver8 zero terminated 
string that
 // records name of font.
 // Maximal size of szFfn is 65 characters.
 // Vorsicht: Dieses Array kann auch kleiner sein!!!
@@ -6439,6 +6446,50 @@ namespace
 }
 return nMax;
 }
+
+template bool readU8(
+sal_uInt8 const * p, std::size_t offset, sal_uInt8 const * pEnd,
+T * value)
+{
+assert(p <= pEnd);
+assert(value != nullptr);
+if (offset >= static_cast(pEnd - p)) {
+return false;
+}
+*value = p[offset];
+return true;
+}
+
+bool readS16(
+sal_uInt8 const * p, std::size_t offset, sal_uInt8 const * pEnd,
+short * value)
+{
+assert(p <= pEnd);
+assert(value != nullptr);
+if (offset > static_cast(pEnd - p)
+|| static_cast(pEnd - p) - offset < 2)
+{
+return false;
+}
+*value = unsigned(p[offset]) + (unsigned(p[offset + 1]) << 8);
+return true;
+}
+
+sal_Int32 getStringLength(
+sal_uInt8 const * p, std::size_t offset, sal_uInt8 const * pEnd)
+{
+assert(p <= pEnd);
+assert(pEnd - p <= SAL_MAX_INT32);
+if (offset >= static_cast(pEnd - p)) {
+return -1;
+}
+void const * p2 = std::memchr(
+p + offset, 0, static_cast(pEnd - p) - offset);
+if (p2 

Re: What autogen.sh for an alternative ContentProvider for dav:// scheme?

2015-08-25 Thread Giuseppe Castagno

On 08/25/2015 03:24 PM, Stephan Bergmann wrote:

On 08/25/2015 02:51 PM, Giuseppe Castagno wrote:

On 08/25/2015 01:14 PM, Stephan Bergmann wrote:

On 08/25/2015 12:07 PM, Giuseppe Castagno wrote:


...


In order to use pure WebDAV and not the file system mapped one.

So in the the users will have a choice (in Linux, don't know in other
platforms):

- WebDAV file system mapped: dav:// davs://
- pure WebDAV: a choice among the others I suggested above.


I don't really understand what requires use of URL schemes different
from http/https in your users' scenarios.  But, depending on how tightly


Here it's how it's supposed to work [1].

Proved to be very difficult to open a http/https link from a browser and 
have it sent to LO and not the browser itself, at least using the scarce 
example I had.


Probably there is another way I don't know ATM.


you control your users' environments, another option might be to install
into their environments configuration settings (under
/org.openoffice.ucb.Configuration/ContentProviders/Local/SecondaryKeys/Office/ProviderData)
that do map the dav/davs URL schemes to the
com.sun.star.ucb.WebDAVContentProvider service (instead of implicitly
leaving them to be handled by a default-registered gnome-vfs or gio
service, if applicable, or to be left unhandled).  (Which would of
course undo for these users the fix for rhbz#1134285 mentioned above,
where applicable.)


that would be a good idea, especially in Windows where dav:// doesn't 
work at all in master (checked with a daily build), and http/https links 
inside a browser have difficulty same as above.


Finally, ATM on Linux (Ubuntu 14.04) the gio service complained the 
share was not WebDAV while it actually was, see the warnings on the 
first message of this thread, so I wasn't able to see it at work.


--
Kind Regards,
Giuseppe Castagno aka beppec56
Acca Esse http://www.acca-esse.eu
giuseppe.castagno at acca-esse.eu
[1] https://www.youtube.com/watch?t=23&v=dd9mT5WbCyk

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


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

2015-08-25 Thread Dennis Francis
 vcl/generic/glyphs/glyphcache.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 20618ddc2793064c7c55d9c765a8113abb45b153
Author: Dennis Francis 
Date:   Thu Aug 20 22:53:19 2015 +0530

fixes a memory leak that appeared in tdf#93392 valgrind trace

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

diff --git a/vcl/generic/glyphs/glyphcache.cxx 
b/vcl/generic/glyphs/glyphcache.cxx
index c15e548..6f9e611 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -60,6 +60,8 @@ void GlyphCache::InvalidateAllGlyphs()
 for( FontList::iterator it = maFontList.begin(), end = maFontList.end(); 
it != end; ++it )
 {
 ServerFont* pServerFont = it->second;
+// free all pServerFont related data
+pServerFont->GarbageCollect( mnLruIndex+0x1000 );
 mrPeer.RemovingFont(*pServerFont);
 delete pServerFont;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 76291] FILESAVE: Chinese hyperlinks modified upon Saving

2015-08-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=76291

Vasily Melenchuk  changed:

   What|Removed |Added

   See Also||https://bugs.documentfounda
   ||tion.org/show_bug.cgi?id=93
   ||449

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-08-25 Thread Olivier Hallot
 AllLangHelp_sbasic.mk|1 
 AllLangHelp_shared.mk|1 
 source/text/sbasic/shared/0103.xhp   |3 -
 source/text/sbasic/shared/code-stubs.xhp |   46 +
 source/text/shared/00/0406.xhp   |2 
 source/text/shared/need_help.xhp |   49 ++
 source/text/shared/optionen/BasicIDE.xhp |   70 +++
 source/text/shared/optionen/experimental.xhp |   36 +
 8 files changed, 174 insertions(+), 34 deletions(-)

New commits:
commit fff841e50d4e1b36453820b66f150d708ebfff2b
Author: Olivier Hallot 
Date:   Sun Jul 26 17:39:23 2015 -0300

TDF#80588 Help page for Basic IDE Options

Help page for Basic IDE Option in Tools - LibreOffice - Basic IDE Options

Before merging this patch it is necessary to verify correctness of the help 
page contents.

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

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index 183490b..d93e0b7 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -319,6 +319,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
 helpcontent2/source/text/sbasic/shared/03132400 \
 helpcontent2/source/text/sbasic/shared/03132500 \
 helpcontent2/source/text/sbasic/shared/05060700 \
+helpcontent2/source/text/sbasic/shared/code-stubs \
 helpcontent2/source/text/sbasic/shared/keys \
 helpcontent2/source/text/sbasic/shared/main0211 \
 helpcontent2/source/text/sbasic/shared/main0601 \
diff --git a/AllLangHelp_shared.mk b/AllLangHelp_shared.mk
index b6ffe86..50cd9a6 100644
--- a/AllLangHelp_shared.mk
+++ b/AllLangHelp_shared.mk
@@ -899,6 +899,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\
 helpcontent2/source/text/shared/optionen/01160200 \
 helpcontent2/source/text/shared/optionen/01160201 \
 helpcontent2/source/text/shared/optionen/BasicIDE \
+helpcontent2/source/text/shared/optionen/experimental \
 helpcontent2/source/text/shared/optionen/java \
 helpcontent2/source/text/shared/optionen/javaclasspath \
 helpcontent2/source/text/shared/optionen/javaparameters \
diff --git a/source/text/sbasic/shared/0103.xhp 
b/source/text/sbasic/shared/0103.xhp
index a231d8c..8ff95c2 100644
--- a/source/text/sbasic/shared/0103.xhp
+++ b/source/text/sbasic/shared/0103.xhp
@@ -18,7 +18,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
-   
+
 
 
 
@@ -42,5 +42,6 @@
 
 
 
+
 
 
diff --git a/source/text/sbasic/shared/code-stubs.xhp 
b/source/text/sbasic/shared/code-stubs.xhp
new file mode 100644
index 000..469c2d9
--- /dev/null
+++ b/source/text/sbasic/shared/code-stubs.xhp
@@ -0,0 +1,46 @@
+
+
+
+
+
+  
+BasicCodeStubs
+/text/sbasic/shared/code-stubs.xhp
+  
+
+
+
+
+  
+Dim aPicker As com.sun.star.ui.dialogs.XfilePicker
+  
+
+
+  
+aPicker.getDisplayDirectory()
+  
+
+
+  
+Dim intVar as Integer
+  
+
+
+
+
\ No newline at end of file
diff --git a/source/text/shared/00/0406.xhp 
b/source/text/shared/00/0406.xhp
index b83488e..4dd7eb7 100644
--- a/source/text/shared/00/0406.xhp
+++ b/source/text/shared/00/0406.xhp
@@ -202,7 +202,7 @@
 
   Choose %PRODUCTNAME - 
PreferencesTools - 
Options - $[officename] - Open CL
 
-  Choose %PRODUCTNAME - 
PreferencesTools - 
Options - $[officename] - Basic IDE
+  Choose %PRODUCTNAME - 
PreferencesTools - 
Options - $[officename] - Basic IDE 
Options
 
   Choose %PRODUCTNAME - 
PreferencesTools - 
Options - $[officename] - Online Update 
 
diff --git a/source/text/shared/need_help.xhp b/source/text/shared/need_help.xhp
index 414d5fc..8788bf4 100644
--- a/source/text/shared/need_help.xhp
+++ b/source/text/shared/need_help.xhp
@@ -1,31 +1,36 @@
-
+
 
-
+
+
 
-
-Need Help
-/text/need_help.xhp
-
+  
+Need Help
+/text/shared/need_help.xhp
+  
 
+
 
+
+
 
 This help page 
needs further work for correctness and completion. Please help LibreOffice 
project to write the missing information. Join the LibreOffice 
community.
 
 
+
 
\ No newline at end of file
diff --git a/source/text/shared/optionen/BasicIDE.xhp 
b/source/text/shared/optionen/BasicIDE.xhp
index b156ab0..a4b4e91 100644
--- a/source/text/shared/optionen/BasicIDE.xhp
+++ b/source/text/shared/optionen/BasicIDE.xhp
@@ -1,4 +1,4 @@
-
+
 
 
 
 
-
-Open CL
-/text/shared/optionen/BasicIDE.xhp
-
+  
+Basic IDE Options
+/text/shared/optionen/BasicIDE.xhp
+  
 
+
 
 
 
 
-Basic IDE;setting options
-setting options;Basic IDE
+  Basic IDE options;Autocorrection
+  Basic IDE options;Autocompletion
+  Basic IDE options;Autoclose quotes
+  Basic IDE options;Basic UNO extended types
+  Basic IDE options;Autoclose parenthesis
+  Basic IDE

[Libreoffice-commits] core.git: helpcontent2

2015-08-25 Thread Olivier Hallot
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 567471e0b6b3d4fd5d4ed51445d091c0763fb845
Author: Olivier Hallot 
Date:   Sun Jul 26 17:39:23 2015 -0300

Updated core
Project: help  fff841e50d4e1b36453820b66f150d708ebfff2b

TDF#80588 Help page for Basic IDE Options

Help page for Basic IDE Option in Tools - LibreOffice - Basic IDE Options

Before merging this patch it is necessary to verify correctness of the help 
page contents.

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

diff --git a/helpcontent2 b/helpcontent2
index 67285d9..fff841e 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 67285d99b8c9373ba3fa992679353ee1a5bc4da9
+Subproject commit fff841e50d4e1b36453820b66f150d708ebfff2b
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Eike Rathke
 chart2/source/controller/dialogs/DataBrowser.cxx |   34 ---
 chart2/source/controller/dialogs/DataBrowser.hxx |2 
 chart2/source/inc/DiagramHelper.hxx  |1 
 chart2/source/tools/DiagramHelper.cxx|   49 +++
 4 files changed, 70 insertions(+), 16 deletions(-)

New commits:
commit ece62a1610fdffb9177a311c60abdbacf454e90d
Author: Eike Rathke 
Date:   Mon Aug 10 15:10:09 2015 +0200

tdf#92997 obtain a date/time edit format according to field value

Bloody workaround hack for the fact that Chart does not handle
category/x-axis times internally and is not able to pass its own axis
numberformat to its own databrowser editor.

(cherry picked from commit 711b34d590e659ed754f7c57b3b5eb12acfbbd78)

Conflicts:
chart2/source/controller/dialogs/DataBrowser.cxx

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

diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx 
b/chart2/source/controller/dialogs/DataBrowser.cxx
index c62285b..c462e4f 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -48,6 +48,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -667,12 +668,19 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 
nColumnId ) const
 aResult = aText;
 else if( aAny>>=fDouble )
 {
-sal_Int32 nLabelColor;
-bool bColorChanged = false;
-sal_Int32 nDateNumberFormat = 
DiagramHelper::getDateNumberFormat( Reference< util::XNumberFormatsSupplier >( 
m_xChartDoc, uno::UNO_QUERY) );
 if( ! ::rtl::math::isNan( fDouble ) && 
m_spNumberFormatterWrapper.get() )
+{
+// If a numberformat was available here we could directly
+// obtain the corresponding edit format in
+// getDateTimeInputNumberFormat() instead of doing the
+// guess work.
+sal_Int32 nNumberFormat = 
DiagramHelper::getDateTimeInputNumberFormat(
+Reference< util::XNumberFormatsSupplier >( 
m_xChartDoc, uno::UNO_QUERY), fDouble );
+sal_Int32 nLabelColor;
+bool bColorChanged = false;
 aResult = m_spNumberFormatterWrapper->getFormattedString(
-nDateNumberFormat, fDouble, nLabelColor, bColorChanged 
);
+nNumberFormat, fDouble, nLabelColor, bColorChanged );
+}
 }
 }
 else
@@ -1092,18 +1100,14 @@ sal_uInt32 DataBrowser::GetNumberFormatKey( sal_Int32 
nRow, sal_uInt16 nCol ) co
 return m_apDataBrowserModel->getNumberFormatKey( lcl_getColumnInData( nCol 
), lcl_getRowInData( nRow ));
 }
 
-bool DataBrowser::isDateString( const OUString& aInputString, double& 
fOutDateValue )
+bool DataBrowser::isDateTimeString( const OUString& aInputString, double& 
fOutDateTimeValue )
 {
 sal_uInt32 nNumberFormat=0;
 SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? 
m_spNumberFormatterWrapper->getSvNumberFormatter() : 0;
-if( !aInputString.isEmpty() &&  pSvNumberFormatter && 
pSvNumberFormatter->IsNumberFormat( aInputString, nNumberFormat, fOutDateValue 
) )
+if( !aInputString.isEmpty() &&  pSvNumberFormatter && 
pSvNumberFormatter->IsNumberFormat( aInputString, nNumberFormat, 
fOutDateTimeValue ) )
 {
-Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( 
m_xChartDoc, uno::UNO_QUERY );
-Reference< util::XNumberFormats > xNumberFormats;
-if( xNumberFormatsSupplier.is() )
- xNumberFormats = Reference< util::XNumberFormats >( 
xNumberFormatsSupplier->getNumberFormats() );
-if( DiagramHelper::isDateNumberFormat( nNumberFormat, xNumberFormats ) 
)
-return true;
+short nType = pSvNumberFormatter->GetType( nNumberFormat);
+return (nType & util::NumberFormat::DATE) || (nType & 
util::NumberFormat::TIME);
 }
 return false;
 }
@@ -1145,10 +1149,10 @@ bool DataBrowser::SaveModified()
 case DataBrowserModel::TEXTORDATE:
 {
 OUString aText( m_aTextEditField.GetText() );
-double fDateValue = 0.0;
+double fValue = 0.0;
 bChangeValid = false;
-if( isDateString( aText, fDateValue ) )
-bChangeValid = m_apDataBrowserModel->setCellAny( nCol, nRow, 
uno::makeAny( fDateValue ) );
+if( isDateTimeString( aText, fValue ) )
+bChangeValid = m_apDataBrowserModel->setCellAny( nCol, nRow, 
uno::makeAny( fValue ) );
 if(!bChangeValid)
 bChangeValid = m_apDataBrowserModel->setCellAny( nCol, nRow, 
uno::makeAny( aT

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

2015-08-25 Thread Eike Rathke
 sc/inc/dbdata.hxx  |5 +
 sc/source/core/tool/dbdata.cxx |   21 +
 sc/source/ui/docshell/dbdocfun.cxx |3 +++
 3 files changed, 29 insertions(+)

New commits:
commit 5aecce00ee5e9c60cdd8a5af47600a06eddf911d
Author: Eike Rathke 
Date:   Thu Jul 16 17:52:29 2015 +0200

Resolves: tdf#88402 remember sort "has headers" at anonymous database ranges

Change-Id: I4a126f40589fd401f3a63f74be5e86e3df947ef6
(cherry picked from commit 33255f974fc712b9e9e2965a350c65a2195a7ae6)
Reviewed-on: https://gerrit.libreoffice.org/17140
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index bb2684a..9ee1d7b 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -112,6 +112,10 @@ public:
 voidGetSortParam(ScSortParam& rSortParam) const;
 voidSetSortParam(const ScSortParam& rSortParam);
 
+/** Remember some more settings of ScSortParam, only to be called at
+anonymous DB ranges as it at least overwrites bHasHeader. */
+voidUpdateFromSortParam( const ScSortParam& rSortParam );
+
 SC_DLLPUBLIC void   GetQueryParam(ScQueryParam& rQueryParam) const;
 SC_DLLPUBLIC void   SetQueryParam(const ScQueryParam& rQueryParam);
 SC_DLLPUBLIC bool   GetAdvancedQuerySource(ScRange& rSource) const;
@@ -206,6 +210,7 @@ public:
 ScDBData* getByRange(const ScRange& rRange);
 void insert(ScDBData* p);
 bool empty() const;
+bool has( const ScDBData* p ) const;
 bool operator== (const AnonDBs& r) const;
 };
 
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index e96e5b8..a92075b 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -336,6 +336,11 @@ void ScDBData::SetSortParam( const ScSortParam& rSortParam 
)
 bByRow = rSortParam.bByRow;
 }
 
+void ScDBData::UpdateFromSortParam( const ScSortParam& rSortParam )
+{
+bHasHeader = rSortParam.bHasHeader;
+}
+
 void ScDBData::GetQueryParam( ScQueryParam& rQueryParam ) const
 {
 rQueryParam = *mpQueryParam;
@@ -645,6 +650,17 @@ public:
 }
 };
 
+class FindByPointer : public unary_function
+{
+const ScDBData* mpDBData;
+public:
+FindByPointer(const ScDBData* pDBData) : mpDBData(pDBData) {}
+bool operator() (const ScDBData& r) const
+{
+return &r == mpDBData;
+}
+};
+
 }
 
 ScDBCollection::NamedDBs::NamedDBs(ScDBCollection& rParent, ScDocument& rDoc) :
@@ -789,6 +805,11 @@ bool ScDBCollection::AnonDBs::empty() const
 return maDBs.empty();
 }
 
+bool ScDBCollection::AnonDBs::has( const ScDBData* p ) const
+{
+return find_if( maDBs.begin(), maDBs.end(), FindByPointer(p)) != 
maDBs.end();
+}
+
 bool ScDBCollection::AnonDBs::operator== (const AnonDBs& r) const
 {
 return maDBs == r.maDBs;
diff --git a/sc/source/ui/docshell/dbdocfun.cxx 
b/sc/source/ui/docshell/dbdocfun.cxx
index b2ab010..490e691 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -568,6 +568,9 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& 
rSortParam,
 }
 
 pDBData->SetSortParam(rSortParam);
+// Remember additional settings on anonymous database ranges.
+if (pDBData == rDoc.GetAnonymousDBData( nTab) || 
rDoc.GetDBCollection()->getAnonDBs().has( pDBData))
+pDBData->UpdateFromSortParam( rSortParam);
 
 if (nStartRow <= aLocalParam.nRow2)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Eike Rathke
 sc/source/core/tool/parclass.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit be28207b668d9f8752ea82ef669aa45876b9ed69
Author: Eike Rathke 
Date:   Tue Jul 21 16:09:34 2015 +0200

MATCH, HLOOKUP and VLOOKUP have a ReferenceOrForceArray parameter

tdf#91278 related

Change-Id: Iab4728b07649bcbb1beb372e68369f3762b13a5c
(cherry picked from commit 01eea7fe40c939311bf1920b6e8b4391a93c2e82)
Reviewed-on: https://gerrit.libreoffice.org/17265
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index a397e79..8fff963 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -114,7 +114,7 @@ const ScParameterClassification::RawData 
ScParameterClassification::pRawData[] =
 { ocGreaterEqual,{{ Array, Array   
  }, 0 }},
 { ocGrowth,  {{ Reference, Reference, Reference, Value 
  }, 0 }},
 { ocHarMean, {{ Reference  
  }, 1 }},
-{ ocHLookup, {{ Value, Reference, Value, Value 
  }, 0 }},
+{ ocHLookup, {{ Value, ReferenceOrForceArray, Value, Value 
  }, 0 }},
 { ocIRR, {{ Reference, Value   
  }, 0 }},
 { ocIndex,   {{ Reference, Value, Value, Value 
  }, 0 }},
 { ocIntercept,   {{ ForceArray, ForceArray 
  }, 0 }},
@@ -126,7 +126,7 @@ const ScParameterClassification::RawData 
ScParameterClassification::pRawData[] =
 { ocLess,{{ Array, Array   
  }, 0 }},
 { ocLessEqual,   {{ Array, Array   
  }, 0 }},
 { ocLookup,  {{ Value, ReferenceOrForceArray, 
ReferenceOrForceArray  }, 0 }},
-{ ocMatch,   {{ Value, Reference, Reference
  }, 0 }},
+{ ocMatch,   {{ Value, ReferenceOrForceArray, Value
  }, 0 }},
 { ocMatDet,  {{ ForceArray 
  }, 0 }},
 { ocMatInv,  {{ ForceArray 
  }, 0 }},
 { ocMatMult, {{ ForceArray, ForceArray 
  }, 0 }},
@@ -204,7 +204,7 @@ const ScParameterClassification::RawData 
ScParameterClassification::pRawData[] =
 { ocVarPA,   {{ Reference  
  }, 1 }},
 { ocVarP_MS, {{ Reference  
  }, 1 }},
 { ocVarS,{{ Reference  
  }, 1 }},
-{ ocVLookup, {{ Value, Reference, Value, Value 
  }, 0 }},
+{ ocVLookup, {{ Value, ReferenceOrForceArray, Value, Value 
  }, 0 }},
 { ocXor, {{ Reference  
  }, 1 }},
 { ocZTest,   {{ Reference, Value, Value
  }, 0 }},
 { ocZTest_MS,{{ Reference, Value, Value
  }, 0 }},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Tor Lillqvist
 sc/source/core/opencl/op_spreadsheet.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 32b35d9d8a21091b987d94fc2ad24d69e9d8a6f3
Author: Tor Lillqvist 
Date:   Tue Aug 25 18:25:47 2015 +0300

Return correct value from the OpenCL VLOOKUP implementation

The commit c3383aafa18ef9d03b04b2a4719e71fdfabc14eb was missing an !
operator in two places where it checks whether a cell is a numeric or
string one, resulting in it always using the string value, which for
NULL (the case I was looking at, only numeric cells in the array)
meant zero was returned.

As such I am not sure if it is entirely correct to do the check
whether a cell is a numeric or string value in the order the generated
OpenCL code does here (and all over the place perhaps). The
documentation in  says:

 * Single unit of vector reference consists of two physical arrays.
 *
 * If the whole data array consists of only numeric values, mpStringArray
 * will be NULL, and NaN values in the numeric array represent empty
 * cells.
 *
 * If the whole data array consists of only string values, mpNumericArray
 * will be NULL, and NULL values in the string array represent empty
 * cells.
 *
 * If the data array consists of numeric and string values, then both
 * mpNumericArray and mpStringArray will be non-NULL, and a string cell will
 * be represented by a non-NULL pointer value in the string array.  If the
 * string value is NULL, check the corresponding value in the numeric array.
 * If the value in the numeric array is NaN, it's an empty cell, otherwise
 * it's a numeric cell.

Note how that implies one should first check whether the value in the
string array is NULL or not, and only if it is NULL, look at the vale
in the numeric array. The code in the generated OpenCL VLOOKUP
implementation does it backwards. Scary. But probably equivalent for
the subset of cases we actually handle in OpenCL, which (I think) are
those where no string cells are involved.

More bug fixes for the OpenCL VLOOKUP will follow.

Change-Id: Id567c245a0700267584be6032320863a4a66df83

diff --git a/sc/source/core/opencl/op_spreadsheet.cxx 
b/sc/source/core/opencl/op_spreadsheet.cxx
index c005d2a..6ade850 100644
--- a/sc/source/core/opencl/op_spreadsheet.cxx
+++ b/sc/source/core/opencl/op_spreadsheet.cxx
@@ -174,7 +174,7 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream 
&ss,
 else
 {
 ss << "{\n";
-ss << "tmp = isNan(";
+ss << "tmp = !isNan(";
 vSubArguments[1+j]->GenNumDeclRef(ss);
 ss << "[rowNum])?";
 vSubArguments[1+j]->GenNumDeclRef(ss);
@@ -259,7 +259,7 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream 
&ss,
 }
 else
 {
-ss << "tmp = isNan(";
+ss << "tmp = !isNan(";
 vSubArguments[1+j]->GenNumDeclRef(ss);
 ss << "[rowNum])?";
 vSubArguments[1+j]->GenNumDeclRef(ss);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Deletion of vcl::Window's inside ToolBar

2015-08-25 Thread Maxim Monastirsky

Hi,

On Tue, Aug 25, 2015 at 5:08 PM, Caolán McNamara  
wrote:

i.e. what entity put the item into the toolbar is the same entity that
has to remove it and dispose it.

Just to add some specific code pointers:

The window items are added to the toolbar in 
ToolBarManager::CreateControllers, and removed in 
ToolBarManager::RemoveControllers. It also calls the dispose method of 
the (XToolbarController based) controller, which in turn calls 
disposeAndClear of that window. In case of the font name box, it's in 
SfxToolBoxControl::dispose.


Maxim

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


‘OUTPUT_DRAWMODE_CONTRAST’ defined but not used

2015-08-25 Thread Khaled Hosny
In may build I see this warning a lot:
In file included from cui/source/tabpages/textattr.cxx:37:0:
include/svx/dlgutil.hxx:37:28: warning: ‘OUTPUT_DRAWMODE_CONTRAST’ defined but 
not used [-Wunused-variable]
 static const DrawModeFlags OUTPUT_DRAWMODE_CONTRAST = 
DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | 
DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient;

I’m guessing it is caused by the static in the declaration since
OUTPUT_DRAWMODE_CONTRAST seems to be used somewhere.

Hmm, we have two declarations of OUTPUT_DRAWMODE_CONTRAST, the other one
in sd/source/ui/inc/ViewShell.hxx and a macro in
svx/source/dialog/dlgctrl.cxx, so I’m a bit lost…

Regards,
Khaled
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-08-25 Thread Caolán McNamara
 sw/qa/core/data/ww5/pass/crash-2.doc |binary
 sw/source/filter/ww8/ww8glsy.cxx |   10 --
 sw/source/filter/ww8/ww8par.cxx  |   27 ---
 sw/source/filter/ww8/ww8par.hxx  |8 
 4 files changed, 24 insertions(+), 21 deletions(-)

New commits:
commit 5da016f5e78f7f36136a8179e152aa14aee3d187
Author: Caolán McNamara 
Date:   Tue Aug 25 12:22:31 2015 +0100

Revert "disable test case pending index assert fix"

This reverts commit af9751a760e9007d0450adf2753d8a65be5f536c.

diff --git a/sw/qa/core/data/ww5/pass/crash-2.doc 
b/sw/qa/core/data/ww5/pass/crash-2.doc
new file mode 100644
index 000..23a1897
Binary files /dev/null and b/sw/qa/core/data/ww5/pass/crash-2.doc differ
commit d9edac5d58aa3c4f15cf4022a1faf776d3003e78
Author: Caolán McNamara 
Date:   Tue Aug 25 16:36:08 2015 +0100

behave like the native format filter for non-insert mode

just shove the unneeded pam into dead space

Change-Id: Id0a3d550cd9d54394888e6b2d62e21eaded24a7c

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 45f84d4..00318f2 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6153,6 +6153,10 @@ sal_uLong WW8Reader::Read(SwDoc &rDoc, const OUString& 
rBaseURL, SwPaM &rPaM, co
 {
 // Remove Frame and offsets from Frame Template
 Reader::ResetFrameFormats( rDoc );
+
+rPaM.GetBound().nContent.Assign(0, 0);
+rPaM.GetBound(false).nContent.Assign(0, 0);
+
 }
 try
 {
commit 3d992d77d8ae319b31dca808e8c08f439a1bc9c3
Author: Caolán McNamara 
Date:   Tue Aug 25 13:30:12 2015 +0100

we only need the PaM for its Point and only to create a uno cursor

so do that in the ctor and drop the arg from a bunch of places

Change-Id: Iaad71e9854b38d8632df057dfe9c96468d1d0098

diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 7a8d0f4..f125f69 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -210,8 +210,6 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool 
bSaveRelFile )
 if (xDocSh->DoInitNew(0))
 {
 SwDoc *pD =  static_cast((&xDocSh))->GetDoc();
-SwWW8ImplReader* pRdr = new 
SwWW8ImplReader(pGlossary->nVersion,
-xStg, &rStrm, *pD, rBlocks.GetBaseURL(), true, false);
 
 SwNodeIndex aIdx(
 *pD->GetNodes().GetEndOfContent().StartOfSectionNode(), 1);
@@ -223,11 +221,11 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool 
bSaveRelFile )
 SwPaM aPamo( aIdx );
 
aPamo.GetPoint()->nContent.Assign(aIdx.GetNode().GetContentNode(),
 0);
-pRdr->LoadDoc(aPamo,this);
-
+std::unique_ptr xRdr(new SwWW8ImplReader(
+pGlossary->nVersion, xStg, &rStrm, *pD, 
rBlocks.GetBaseURL(),
+true, false, *aPamo.GetPoint()));
+xRdr->LoadDoc(this);
 bRet = MakeEntries(pD, rBlocks, bSaveRelFile, aStrings, aData);
-
-delete pRdr;
 }
 xDocSh->DoClose();
 rBlocks.EndPutMuchBlockEntries();
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index d7eadb1..45f84d4 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4124,7 +4124,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP 
nTextLen, ManTypes nType)
 }
 
 SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage,
-SvStream* pSt, SwDoc& rD, const OUString& rBaseURL, bool bNewDoc, bool 
bSkipImages)
+SvStream* pSt, SwDoc& rD, const OUString& rBaseURL, bool bNewDoc, bool 
bSkipImages, SwPosition &rPos)
 : m_pDocShell(rD.GetDocShell())
 , m_pStg(pStorage)
 , m_pStrm(pSt)
@@ -4260,6 +4260,8 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, 
SotStorage* pStorage,
 {
 m_pStrm->SetEndian( SvStreamEndian::LITTLE );
 m_aApos.push_back(false);
+
+mpCrsr = m_rDoc.CreateUnoCrsr(rPos);
 }
 
 void SwWW8ImplReader::DeleteStk(SwFltControlStack* pStck)
@@ -4881,7 +4883,7 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const 
OUString& sCreatedFrom,
 return bRes;
 }
 
-sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition 
&rPos)
+sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
 {
 sal_uLong nErrRet = 0;
 
@@ -4917,7 +4919,6 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, 
const SwPosition &rPos)
 pDocShell->SetReadOnlyUI();
 }
 
-mpCrsr = m_rDoc.CreateUnoCrsr(rPos);
 m_pPaM = mpCrsr.get();
 
 m_pCtrlStck = new SwWW8FltControlStack( &m_rDoc, m_nFieldFlags, *this );
@@ -5595,7 +5596,7 @@ namespace
 }
 }
 
-sal_uLong SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary 
*pGloss)
+sal_u

Re: ‘OUTPUT_DRAWMODE_CONTRAST’ defined but not used

2015-08-25 Thread Stephan Bergmann

On 08/25/2015 05:30 PM, Khaled Hosny wrote:

In may build I see this warning a lot:
In file included from cui/source/tabpages/textattr.cxx:37:0:
include/svx/dlgutil.hxx:37:28: warning: ‘OUTPUT_DRAWMODE_CONTRAST’ defined but 
not used [-Wunused-variable]
  static const DrawModeFlags OUTPUT_DRAWMODE_CONTRAST = 
DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | 
DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient;

I’m guessing it is caused by the static in the declaration since
OUTPUT_DRAWMODE_CONTRAST seems to be used somewhere.


Compilers are free to not emit storage for that per-copilation-unit 
const variable (what an oxymoron), and most compilers are apparently 
smart enough to not emit a -Wunused-variable in such a case (or else the 
build should break for many developers, assuming developers routinely 
configure --enable-werror).  Yours just isn't---some dated GCC?

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


Re: ‘OUTPUT_DRAWMODE_CONTRAST’ defined but not used

2015-08-25 Thread Khaled Hosny
On Tue, Aug 25, 2015 at 05:54:32PM +0200, Stephan Bergmann wrote:
> On 08/25/2015 05:30 PM, Khaled Hosny wrote:
> >In may build I see this warning a lot:
> >In file included from cui/source/tabpages/textattr.cxx:37:0:
> >include/svx/dlgutil.hxx:37:28: warning: ‘OUTPUT_DRAWMODE_CONTRAST’ defined 
> >but not used [-Wunused-variable]
> >  static const DrawModeFlags OUTPUT_DRAWMODE_CONTRAST = 
> > DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | 
> > DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient;
> >
> >I’m guessing it is caused by the static in the declaration since
> >OUTPUT_DRAWMODE_CONTRAST seems to be used somewhere.
> 
> Compilers are free to not emit storage for that per-copilation-unit const
> variable (what an oxymoron), and most compilers are apparently smart enough
> to not emit a -Wunused-variable in such a case (or else the build should
> break for many developers, assuming developers routinely configure
> --enable-werror).  Yours just isn't

I wouldn’t be able to finish any build if I turned this on, I get even
more warnings about deprecated std::auto_ptr which seems to be used in
boost’s get_pointer.hpp.

> ---some dated GCC?

That is GCC 5.2.0, so I guess a rather too new one.

Regards,
Khaled
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: ‘OUTPUT_DRAWMODE_CONTRAST’ defined but not used

2015-08-25 Thread Maxim Monastirsky

Hi Khaled,

On Tue, Aug 25, 2015 at 6:30 PM, Khaled Hosny  
wrote:

In may build I see this warning a lot:
In file included from cui/source/tabpages/textattr.cxx:37:0:
include/svx/dlgutil.hxx:37:28: warning: 
‘OUTPUT_DRAWMODE_CONTRAST’ defined but not used 
[-Wunused-variable]
Please clarify: Do you get this with master or with 5-0? In case of 5-0 
I can confirm that I got the same thing the last time I tried to build 
it with --enable-werror (under Fedora 22, with the GCC ver. from the 
repos).


Maxim

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


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

2015-08-25 Thread Tor Lillqvist
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |2 +-
 sc/source/core/opencl/formulagroupcl.cxx |1 +
 sc/source/core/opencl/op_spreadsheet.cxx |2 +-
 sc/source/core/tool/calcconfig.cxx   |1 +
 4 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 7bb7539c0e34283baeaacf7e4ff0b19287afadc2
Author: Tor Lillqvist 
Date:   Tue Aug 25 18:33:45 2015 +0300

Add VLOOKUP to the set of opcodes that we trust the OpenCL implementation 
for

Change-Id: I937ec900044bbc6027ff8d4ae37f2f275dde974f

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index bb74d74..c3fa523 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1373,7 +1373,7 @@
 true, and a formula contains only these operators and
 functions, it might be calculated using OpenCL.
   
-  
+;-;*;/;RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSDIST;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;VAR;NORMDIST;CORREL;COVAR;PEARSON;SLOPE;SUMIFS
+  
+;-;*;/;RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSDIST;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;VAR;NORMDIST;VLOOKUP;CORREL;COVAR;PEARSON;SLOPE;SUMIFS
 
 
   
diff --git a/sc/source/core/tool/calcconfig.cxx 
b/sc/source/core/tool/calcconfig.cxx
index cc52ad7..868ddd1 100644
--- a/sc/source/core/tool/calcconfig.cxx
+++ b/sc/source/core/tool/calcconfig.cxx
@@ -67,6 +67,7 @@ void ScCalcConfig::setOpenCLConfigToDefault()
 maOpenCLSubsetOpCodes.insert(ocCount);
 maOpenCLSubsetOpCodes.insert(ocVar);
 maOpenCLSubsetOpCodes.insert(ocNormDist);
+maOpenCLSubsetOpCodes.insert(ocVLookup);
 maOpenCLSubsetOpCodes.insert(ocCorrel);
 maOpenCLSubsetOpCodes.insert(ocCovar);
 maOpenCLSubsetOpCodes.insert(ocPearson);
commit 41a6094095a0cd42f24eb996c7ec8c28ab9d6c1a
Author: Tor Lillqvist 
Date:   Tue Aug 25 19:33:36 2015 +0300

Produce the expected N/A error code in the OpenCL VLOOKUP implementation

Instead of a bare NaN.

Change-Id: I170c540478315eedd23f5851d54c30175d21ef96

diff --git a/sc/source/core/opencl/formulagroupcl.cxx 
b/sc/source/core/opencl/formulagroupcl.cxx
index 53834d7..b4882d9 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -40,6 +40,7 @@ static const char* publicFunc =
  "#define errIllegalFPOperation 503 // #NUM!\n"
  "#define errNoValue 519 // #VALUE!\n"
  "#define errDivisionByZero 532 // #DIV/0!\n"
+ "#define NOTAVAILABLE 0x7fff // #N/A\n"
  "\n"
  "double CreateDoubleError(ulong nErr)\n"
  "{\n"
diff --git a/sc/source/core/opencl/op_spreadsheet.cxx 
b/sc/source/core/opencl/op_spreadsheet.cxx
index 6ade850..d6853c4 100644
--- a/sc/source/core/opencl/op_spreadsheet.cxx
+++ b/sc/source/core/opencl/op_spreadsheet.cxx
@@ -35,7 +35,7 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream 
&ss,
 }
 ss << ")\n{\n";
 ss << "int gid0=get_global_id(0);\n";
-ss << "double tmp = NAN;\n";
+ss << "double tmp = CreateDoubleError(NOTAVAILABLE);\n";
 ss << "double intermediate = DBL_MAX;\n";
 ss << "int singleIndex = gid0;\n";
 ss << "int rowNum = -1;\n";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: ‘OUTPUT_DRAWMODE_CONTRAST’ defined but not used

2015-08-25 Thread Khaled Hosny
On Tue, Aug 25, 2015 at 07:28:26PM +0300, Maxim Monastirsky wrote:
> Hi Khaled,
> 
> On Tue, Aug 25, 2015 at 6:30 PM, Khaled Hosny  wrote:
> >In may build I see this warning a lot:
> >In file included from cui/source/tabpages/textattr.cxx:37:0:
> >include/svx/dlgutil.hxx:37:28: warning: ‘OUTPUT_DRAWMODE_CONTRAST’ defined
> >but not used [-Wunused-variable]
> Please clarify: Do you get this with master or with 5-0? In case of 5-0 I
> can confirm that I got the same thing the last time I tried to build it with
> --enable-werror (under Fedora 22, with the GCC ver. from the repos).

On master.

Regards,
Khaled
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-08-25 Thread Michael Meeks
 vcl/inc/opengl/watchdog.hxx|   31 +
 vcl/inc/opengl/zone.hxx|   31 ++---
 vcl/source/app/svmain.cxx  |4 +
 vcl/source/opengl/OpenGLHelper.cxx |  127 -
 vcl/workben/vcldemo.cxx|   69 +++-
 5 files changed, 236 insertions(+), 26 deletions(-)

New commits:
commit 74bc7cb59c1bc3f7acdb4d1492fe563ebcefee6c
Author: Michael Meeks 
Date:   Tue Aug 25 11:44:41 2015 +0100

tdf#93614 - detect hanging OpenGL drivers with a watchdog.

If an OpenGL zone takes >2s to make progress, disable OpenGL.
If an OpenGL zone takes >5s to make progress, abort the app.

Change-Id: I776c06a3f8ba460ff9842a9130c21f9ee2147eee
Reviewed-on: https://gerrit.libreoffice.org/17986
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/vcl/inc/opengl/watchdog.hxx b/vcl/inc/opengl/watchdog.hxx
new file mode 100644
index 000..b88c468
--- /dev/null
+++ b/vcl/inc/opengl/watchdog.hxx
@@ -0,0 +1,31 @@
+/* -*- 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_VCL_INC_OPENGL_WATCHDOG_H
+#define INCLUDED_VCL_INC_OPENGL_WATCHDOG_H
+
+#include 
+#include 
+#include 
+#include 
+
+class OpenGLWatchdogThread : private salhelper::Thread
+{
+OpenGLWatchdogThread();
+virtual void execute() SAL_OVERRIDE;
+public:
+using salhelper::Thread::acquire;
+using salhelper::Thread::release;
+static void start();
+static void stop();
+};
+
+#endif // INCLUDED_VCL_INC_OPENGL_WATCHDOG_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/zone.hxx b/vcl/inc/opengl/zone.hxx
index c251c4f..44265c5 100644
--- a/vcl/inc/opengl/zone.hxx
+++ b/vcl/inc/opengl/zone.hxx
@@ -7,28 +7,39 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_VCL_INC_OPENGL_GUARD_H
-#define INCLUDED_VCL_INC_OPENGL_GUARD_H
+#ifndef INCLUDED_VCL_INC_OPENGL_ZONE_H
+#define INCLUDED_VCL_INC_OPENGL_ZONE_H
 
 #include 
+#include 
+#include 
+
+class OpenGLZoneTest;
+class OpenGLWatchdogThread;
 
 /**
  * We want to be able to detect if a given crash came
  * from the OpenGL code, so use this helper to track that.
  */
-class OpenGLSalGraphicsImpl;
 class OpenGLZone {
-static int gnInOpenGLZone;
+friend class OpenGLZoneTest;
+friend class OpenGLWatchdogThread;
 friend class OpenGLSalGraphicsImpl;
-static void enter() { gnInOpenGLZone++; }
-static void leave() { gnInOpenGLZone--; }
+
+/// how many times have we entered a GL zone
+static volatile sal_uInt64 gnEnterCount;
+/// how many times have we left a new GL zone
+static volatile sal_uInt64 gnLeaveCount;
+
+static VCL_DLLPUBLIC void enter();
+static VCL_DLLPUBLIC void leave();
 public:
- OpenGLZone() { enter(); }
-~OpenGLZone() { leave(); }
-static bool isInZone() { return gnInOpenGLZone > 0; }
+ OpenGLZone() { gnEnterCount++; }
+~OpenGLZone() { gnLeaveCount++; }
+static bool isInZone() { return gnEnterCount != gnLeaveCount; }
 static void hardDisable();
 };
 
-#endif // INCLUDED_VCL_INC_OPENGL_PROGRAM_H
+#endif // INCLUDED_VCL_INC_OPENGL_ZONE_H
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 7b6c778..b5aca42 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -82,6 +82,7 @@
 #include "uno/current_context.hxx"
 
 #include "opengl/zone.hxx"
+#include "opengl/watchdog.hxx"
 
 #if OSL_DEBUG_LEVEL > 0
 #include 
@@ -189,7 +190,10 @@ int ImplSVMain()
   pSVData->mxAccessBridge.clear();
 }
 
+OpenGLWatchdogThread::stop();
+
 DeInitVCL();
+
 return nReturn;
 }
 
diff --git a/vcl/source/opengl/OpenGLHelper.cxx 
b/vcl/source/opengl/OpenGLHelper.cxx
index 49bff49..2e68bdc 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -26,6 +26,8 @@
 #include 
 
 #include "opengl/zone.hxx"
+#include "opengl/watchdog.hxx"
+#include 
 
 #if defined UNX && !defined MACOSX && !defined IOS && !defined ANDROID
 #include "opengl/x11/X11DeviceInfo.hxx"
@@ -446,11 +448,98 @@ bool OpenGLHelper::supportsVCLOpenGL()
 return true;
 }
 
-/// How many nested OpenGL code-paths are we inside ?
-int OpenGLZone::gnInOpenGLZone = 0;
+sal_uInt64 volatile OpenGLZone::gnEnterCount = 0;
+sal_uInt64 volatile OpenGLZone::gnLeaveCount = 0;
+
+void OpenGLZone::enter() { gnEnterCount++; }
+void OpenGLZone::leave() { gnLeaveCount++; }
+
+namespace {
+static volatile bool gbWatchdogFiring = false;
+static oslCondition gpWatchdogExit = NULL;
+static rtl::Reference gxWatchdog;
+}
+
+O

LibreOffice 5.0.1 RC2 available

2015-08-25 Thread Robinson Tryon
Dear Community,

The Document Foundation is pleased to announce the second release
candidate of LibreOffice 5.0.1. The upcoming 5.0.0 will be the first
bugfix release of our fresh 5.0 line. Please be aware that LibreOffice
5.0.1 RC2 has not been flagged as ready for production use yet,
however feel free to give it a try instead of 5.0.0.

A work-in-progress list of new features in LibreOffice 5.0 can be
found at https://wiki.documentfoundation.org/ReleaseNotes/5.0

The release is available for Windows, Linux and Mac OS X from our QA
builds download page at

  http://www.libreoffice.org/download/pre-releases/

Windows builds are also provided in 64bit version.

Should you find bugs, please report them to our Bugzilla:

  https://bugs.documentfoundation.org

A good way to assess the release candidate quality is to run some
specific manual tests on it, our TCM wiki page has more details:

 
http://wiki.documentfoundation.org/QA/Testing/Regression_Tests#Full_Regression_Test

For other ways to get involved with this exciting project - you can
e.g. contribute code:

  http://www.libreoffice.org/community/developers/

translate LibreOffice to your language:

  http://wiki.documentfoundation.org/LibreOffice_Localization_Guide

or help with funding our operations:

  http://donate.libreoffice.org/

A list of known issues and fixed bugs compared to 5.0.1 RC1 is
available from our wiki:

  http://wiki.documentfoundation.org/Releases/5.0.1/RC2

Let us close again with a BIG Thank You! to all of you having
contributed to the LibreOffice project - this release would not have
been possible without your help!

--R

-- 
Robinson Tryon
QA Engineer - The Document Foundation
LibreOffice Community Outreach Herald
qu...@libreoffice.org
802-379-9482 | IRC: colonelqubit on Freenode
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-08-25 Thread Tor Lillqvist
 sc/source/core/opencl/op_spreadsheet.cxx |   45 ---
 sc/source/core/opencl/op_spreadsheet.hxx |1 
 2 files changed, 6 insertions(+), 40 deletions(-)

New commits:
commit 162264450cb62177ea133829d081fecdb02136b5
Author: Tor Lillqvist 
Date:   Tue Aug 25 21:41:43 2015 +0300

Don't claim we support strings arguments in the OpenCL VLOOKUP

The string support certainly isn't complete or correct
anyway. Partially revert c3383aafa18ef9d03b04b2a4719e71fdfabc14eb.

Change-Id: Ica86f39daf864a1a62d92f8d8300d75d020c0ee0

diff --git a/sc/source/core/opencl/op_spreadsheet.cxx 
b/sc/source/core/opencl/op_spreadsheet.cxx
index d6853c4..c18b2ba 100644
--- a/sc/source/core/opencl/op_spreadsheet.cxx
+++ b/sc/source/core/opencl/op_spreadsheet.cxx
@@ -162,28 +162,9 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream 
&ss,
 ss << " == ";
 ss << j+1;
 ss << ")\n";
-if (!(vSubArguments[1+j]->IsMixedArgument()))
-{
-ss << "{\n";
-ss << "tmp = ";
-vSubArguments[1+j]->GenDeclRef(ss);
-ss << "[rowNum];\n";
-ss << "}\n";
-
-}
-else
-{
-ss << "{\n";
-ss << "tmp = !isNan(";
-vSubArguments[1+j]->GenNumDeclRef(ss);
-ss << "[rowNum])?";
-vSubArguments[1+j]->GenNumDeclRef(ss);
-ss << "[rowNum]:";
-vSubArguments[1+j]->GenStringDeclRef(ss);
-ss << "[rowNum];\n";
-ss << "}\n";
-
-}
+ss << "tmp = ";
+vSubArguments[1+j]->GenDeclRef(ss);
+ss << "[rowNum];\n";
 }
 ss << "return tmp;\n";
 ss << "}\n";
@@ -250,23 +231,9 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream 
&ss,
 ss << " == ";
 ss << j+1;
 ss << ")\n";
-///Add MixedArguments for string support in Vlookup.
-if (!(vSubArguments[1+j]->IsMixedArgument()))
-{
-ss << "tmp = ";
-vSubArguments[1+j]->GenDeclRef(ss);
-ss << "[rowNum];\n";
-}
-else
-{
-ss << "tmp = !isNan(";
-vSubArguments[1+j]->GenNumDeclRef(ss);
-ss << "[rowNum])?";
-vSubArguments[1+j]->GenNumDeclRef(ss);
-ss << "[rowNum]:";
-vSubArguments[1+j]->GenStringDeclRef(ss);
-ss << "[rowNum];\n";
-}
+ss << "tmp = ";
+vSubArguments[1+j]->GenDeclRef(ss);
+ss << "[rowNum];\n";
 }
 ss << "return tmp;\n";
 ss << "}\n";
diff --git a/sc/source/core/opencl/op_spreadsheet.hxx 
b/sc/source/core/opencl/op_spreadsheet.hxx
index e787bda..190ab1d 100644
--- a/sc/source/core/opencl/op_spreadsheet.hxx
+++ b/sc/source/core/opencl/op_spreadsheet.hxx
@@ -20,7 +20,6 @@ public:
 virtual void GenSlidingWindowFunction(std::stringstream &ss,
 const std::string &sSymName, SubArguments &vSubArguments) 
SAL_OVERRIDE;
 virtual std::string BinFuncName() const SAL_OVERRIDE { return "VLookup"; }
-virtual bool takeString() const SAL_OVERRIDE { return true; }
 };
 
 }}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Zolnai Tamás
 sw/source/core/layout/paintfrm.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4ffdf7fa5c2f1fbe16c010c2fef639eb0a0725b6
Author: Zolnai Tamás 
Date:   Sun Aug 23 19:15:14 2015 +0200

tdf#91969: Parts of paragraph border is missing

...when border is around more than one paragraph

Regression from:
16f637dab3c1b5f7ac9eacf2c57347800d3fdf09

Change-Id: Iea9455dd7cc3c301c3e2d5d7903c98d98e515595
(cherry picked from commit 8d933132ab01f0070225fae6cf704c9a1982e8f8)
Reviewed-on: https://gerrit.libreoffice.org/17996
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 7c395fb..ad7b6bd 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -476,13 +476,13 @@ static sal_uInt8 lcl_TryMergeLines(
 {
 double const fMergeGap(gProp.nSPixelSzW + gProp.nSHalfPixelSzW); // NOT 
static!
 // A is above/before B
-if( mergeA.second <= mergeB.second &&
+if( mergeA.second <= mergeB.first &&
 mergeA.second + fMergeGap >= mergeB.first )
 {
 return 1;
 }
 // B is above/before A
-else if( mergeB.second <= mergeA.second &&
+else if( mergeB.second <= mergeA.first &&
  mergeB.second + fMergeGap >= mergeA.first )
 {
 return 2;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Mark Hung
 sw/source/core/text/itrpaint.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f0a149fe1c3224cef17f15e574b0a818923b57f6
Author: Mark Hung 
Date:   Sat Aug 1 22:48:39 2015 +0800

Fix tdf#77514 CJK ruby text in RTL( vertical ) base line issue.

Change-Id: Id670e83db01efe6bcd5fb6bb374ab9cb92898f88
Reviewed-on: https://gerrit.libreoffice.org/17460
Tested-by: Jenkins 
Reviewed-by: Norbert Thiebaud 
(cherry picked from commit b14861e1dfb9f83d26d6032ae96b664845528f2a)
Reviewed-on: https://gerrit.libreoffice.org/17994
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 1a6c3d0..4608248 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -236,7 +236,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, 
SwSaveClip &rClip,
 // we calculate Y value for the whole line
 SwTextGridItem const*const pGrid(GetGridItem(GetTextFrm()->FindPageFrm()));
 const bool bAdjustBaseLine =
-GetLineInfo().HasSpecialAlign( GetTextFrm()->IsVertical() ) ||
+( !GetTextFrm()->IsVertical() || GetLineInfo().HasSpecialAlign( true ) 
) && (! GetTextFrm()->IsInFly()) &&
 ( 0 != pGrid );
 const SwTwips nLineBaseLine = GetInfo().GetPos().Y() + nTmpAscent;
 if ( ! bAdjustBaseLine )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Lucas Satabin license statement

2015-08-25 Thread Lucas Satabin

Hi all,

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


Regards
Lucas Satabin
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-08-25 Thread Eike Rathke
 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx |   29 +++
 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx  |   75 
 sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx |   71 +++
 sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx |   89 
+-
 sc/source/ui/inc/RandomNumberGeneratorDialog.hxx   |1 
 sc/source/ui/inc/SamplingDialog.hxx|1 
 sc/source/ui/inc/StatisticsInputOutputDialog.hxx   |1 
 sc/source/ui/inc/StatisticsTwoVariableDialog.hxx   |1 
 8 files changed, 259 insertions(+), 9 deletions(-)

New commits:
commit b2363e98af7b0281279617e43b8fec5b898b9120
Author: Eike Rathke 
Date:   Wed Aug 26 01:15:40 2015 +0200

implement Edit modify handler, rhbz#1255811 related

Same as in ScStatisticsInputOutputDialog.

Change-Id: I0e3eb06bc86cf77c405c54f312340c7b2551c1ec

diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx 
b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
index b39fb16..109fda9 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
@@ -31,7 +31,10 @@ ScStatisticsTwoVariableDialog::ScStatisticsTwoVariableDialog(
 ScAnyRefDlg ( pSfxBindings, pChildWindow, pParent, rID, 
rUIXMLDescription ),
 mViewData   ( pViewData ),
 mDocument   ( pViewData->GetDocument() ),
+mVariable1Range ( ScAddress::INITIALIZE_INVALID ),
+mVariable2Range ( ScAddress::INITIALIZE_INVALID ),
 mAddressDetails ( mDocument->GetAddressConvention(), 0, 0 ),
+mOutputAddress  ( ScAddress::INITIALIZE_INVALID ),
 mGroupedBy  ( BY_COLUMN ),
 mpActiveEdit( NULL ),
 mCurrentAddress ( pViewData->GetCurX(), pViewData->GetCurY(), 
pViewData->GetTabNo() ),
@@ -108,6 +111,11 @@ void ScStatisticsTwoVariableDialog::Init()
 mpOutputRangeEdit->SetLoseFocusHdl( aLink );
 mpOutputRangeButton->SetLoseFocusHdl( aLink );
 
+aLink = LINK( this, ScStatisticsTwoVariableDialog, RefInputModifyHandler);
+mpVariable1RangeEdit->SetModifyHdl( aLink);
+mpVariable2RangeEdit->SetModifyHdl( aLink);
+mpOutputRangeEdit->SetModifyHdl( aLink);
+
 mpOutputRangeEdit->GrabFocus();
 
 mpGroupByColumnsRadio->SetToggleHdl( LINK( this, 
ScStatisticsTwoVariableDialog, GroupByChanged ) );
@@ -187,11 +195,14 @@ void ScStatisticsTwoVariableDialog::SetReference( const 
ScRange& rReferenceRange
 sal_uInt16 nFormat = ( mOutputAddress.Tab() == 
mCurrentAddress.Tab() ) ? SCA_ABS : SCA_ABS_3D;
 aReferenceString = mOutputAddress.Format(nFormat, pDocument, 
pDocument->GetAddressConvention());
 mpOutputRangeEdit->SetRefString( aReferenceString );
-
-// Enable OK, Cancel if output range is set
-mpButtonOk->Enable(!mpOutputRangeEdit->GetText().isEmpty());
 }
 }
+
+// Enable OK if all ranges are set.
+if (mVariable1Range.IsValid() && mVariable2Range.IsValid() && 
mOutputAddress.IsValid())
+mpButtonOk->Enable();
+else
+mpButtonOk->Disable();
 }
 
 IMPL_LINK( ScStatisticsTwoVariableDialog, OkClicked, PushButton*, /*pButton*/ )
@@ -242,6 +253,78 @@ IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, 
GroupByChanged )
 return 0;
 }
 
+IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, RefInputModifyHandler )
+{
+if ( mpActiveEdit )
+{
+if ( mpActiveEdit == mpVariable1RangeEdit )
+{
+ScRangeList aRangeList;
+bool bValid = ParseWithNames( aRangeList, 
mpVariable1RangeEdit->GetText(), mDocument);
+const ScRange* pRange = (bValid && aRangeList.size() == 1) ? 
aRangeList[0] : nullptr;
+if (pRange)
+{
+mVariable1Range = *pRange;
+// Highlight the resulting range.
+mpVariable1RangeEdit->StartUpdateData();
+}
+else
+{
+mVariable1Range = ScRange( ScAddress::INITIALIZE_INVALID);
+}
+}
+else if ( mpActiveEdit == mpVariable2RangeEdit )
+{
+ScRangeList aRangeList;
+bool bValid = ParseWithNames( aRangeList, 
mpVariable2RangeEdit->GetText(), mDocument);
+const ScRange* pRange = (bValid && aRangeList.size() == 1) ? 
aRangeList[0] : nullptr;
+if (pRange)
+{
+mVariable2Range = *pRange;
+// Highlight the resulting range.
+mpVariable2RangeEdit->StartUpdateData();
+}
+else
+{
+mVariable2Range = ScRange( ScAddress::INITIALIZE_INVALID);
+}
+}
+else if ( mpActiveEdit == mpOutputRangeEdit )
+{
+ScRangeList aRangeList;
+bool bValid = ParseWithNames( aRangeList, 
mpOutputRangeEdit->GetText(), mDocument);
+  

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

2015-08-25 Thread Łukasz Hryniuk
 sc/qa/unit/ucalc_formula.cxx |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 8580f4428dbe368acea5d4adfea2cb7b399dfae4
Author: Łukasz Hryniuk 
Date:   Thu Aug 13 23:52:25 2015 +0200

tdf#89387 add some strings to FTEST test

Strings should be omitted by the algorithm, so such test cases are
important (were missed before).

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

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 3d60fdf..52ccb9a 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -5573,6 +5573,17 @@ void Test::testFuncFTEST()
 m_pDoc->SetValue(2, 2, 0, 13.0); // C3
 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0422, m_pDoc->GetValue(aPos), 10e-4);
 
+m_pDoc->SetString(0, 2, 0, "a"); // A3
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0334, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetString(2, 0, 0, "b"); // C1
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0261, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetString(5, 1, 0, "c"); // F2
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0219, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetString(4, 2, 0, "d"); // E3
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0161, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetString(3, 2, 0, "e"); // D3
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0110, m_pDoc->GetValue(aPos), 10e-4);
+
 m_pDoc->DeleteTab(0);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Łukasz Hryniuk
 sc/qa/unit/ucalc_formula.cxx |   17 +
 1 file changed, 17 insertions(+)

New commits:
commit 8e0d49e3b6f6e7146477569e635d2c30863c4cfc
Author: Łukasz Hryniuk 
Date:   Fri Aug 14 00:48:03 2015 +0200

tdf#89387 add some strings to CHITEST test

Any string in one of given matrices should result in IllegalParameter
error.

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

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 52ccb9a..90a267c 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -5658,6 +5658,23 @@ void Test::testFuncCHITEST()
 m_pDoc->SetValue(3, 2, 0, 3.0); // D3
 m_pDoc->SetValue(4, 2, 0, 1.0); // E3
 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of CHITEST failed", 
0.1117, m_pDoc->GetValue(aPos), 10e-4);
+
+// test with strings
+m_pDoc->SetString(4, 2, 0, "a"); // E3
+aVal = m_pDoc->GetString(aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("CHITEST should return Err:502 for matrices 
with strings",
+OUString("Err:502"), aVal);
+m_pDoc->SetString(1, 2, 0, "a"); // B3
+aVal = m_pDoc->GetString(aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("CHITEST should return Err:502 for matrices 
with strings",
+OUString("Err:502"), aVal);
+m_pDoc->SetValue(4, 2, 0, 1.0); // E3
+aVal = m_pDoc->GetString(aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("CHITEST should return Err:502 for matrices 
with strings",
+OUString("Err:502"), aVal);
+m_pDoc->SetValue(1, 2, 0, 2.0); // B3
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of CHITEST failed", 
0.1117, m_pDoc->GetValue(aPos), 10e-4);
+
 m_pDoc->SetValue(4, 1, 0, 5.0); // E2
 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of CHITEST failed", 
0.0215, m_pDoc->GetValue(aPos), 10e-4);
 m_pDoc->SetValue(1, 2, 0, 1.0); // B3
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Łukasz Hryniuk
 sc/qa/unit/ucalc.hxx |1 
 sc/qa/unit/ucalc_formula.cxx |   65 +++
 2 files changed, 66 insertions(+)

New commits:
commit 1a5b5750ed4157420bc0e0e9f384d3984dee9acd
Author: Łukasz Hryniuk 
Date:   Mon Aug 24 18:06:29 2015 +0200

tdf#89387 test for SUMX2PY2 function

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

diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 79d30a9..f10f838 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -187,6 +187,7 @@ public:
 void testFuncFTEST();
 void testFuncFTESTBug();
 void testFuncCHITEST();
+void testFuncSUMX2PY2();
 
 void testExternalRef();
 void testExternalRefFunctions();
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 90a267c..20b9e33 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -5729,5 +5729,70 @@ void Test::testFuncCHITEST()
 m_pDoc->DeleteTab(0);
 }
 
+void Test::testFuncSUMX2PY2()
+{
+sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on.
+
+m_pDoc->InsertTab(0, "SumX2PY2 Test");
+
+OUString aVal;
+ScAddress aPos(6,0,0);
+m_pDoc->SetString(aPos, "=SUMX2PY2(A1:C3;D1:F3)");
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 0.0, 
m_pDoc->GetValue(aPos));
+
+m_pDoc->SetValue(0, 0, 0, 1.0); // A1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 0.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(3, 0, 0, 2.0); // D1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 5.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(1, 0, 0, 2.0); // B1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 5.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(4, 0, 0, 0.0); // E1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 9.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(2, 0, 0, 3.0); // C1
+m_pDoc->SetValue(5, 0, 0, 3.0); // F1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 27.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(0, 1, 0, 10.0); // A2
+m_pDoc->SetValue(3, 1, 0, -10.0); // D2
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 227.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(2, 1, 0, -5.0); // C2
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 227.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(4, 1, 0, -5.0); // E2
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 277.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(2, 1, 0, 0.0); // C2
+m_pDoc->SetValue(5, 1, 0, 0.0); // F2
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 277.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(0, 2, 0, -8.0); // A3
+m_pDoc->SetValue(3, 2, 0, 8.0); // D3
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 405.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(1, 2, 0, 0.0); // B3
+m_pDoc->SetValue(4, 2, 0, 0.0); // E3
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 503.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(2, 2, 0, 1.0); // C3
+m_pDoc->SetValue(5, 2, 0, 1.0); // F3
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 505.0, 
m_pDoc->GetValue(aPos));
+
+// add some strings
+m_pDoc->SetString(4, 1, 0, "a"); // E2
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 455.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetString(1, 1, 0, "a"); // B2
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 455.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetString(0, 0, 0, "a"); // A1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 450.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetString(3, 0, 0, "a"); // D1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 450.0, 
m_pDoc->GetValue(aPos));
+
+m_pDoc->SetString(aPos, "=SUMX2PY2({1;2;3};{2;3;4})");
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of SUMX2PY2 failed", 43.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetString(aPos, "=SUMX2PY2({1;2;3};{2;3})");
+aVal = m_pDoc->GetString(aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("SUMX2PY2 should return #VALUE! for matrices 
with different sizes",
+OUString("#VALUE!"), aVal);
+m_pDoc->SetString(aPos, "=SUMX2PY2({1;2;3})");
+aVal = m_pDoc->GetString(aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("SUMX2PY2 needs two parameters",
+OUString("Err:511"), aVal);
+
+m_pDoc->DeleteTab(0);
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-25 Thread Łukasz Hryniuk
 sc/qa/unit/ucalc.hxx |1 
 sc/qa/unit/ucalc_formula.cxx |   83 +++
 2 files changed, 84 insertions(+)

New commits:
commit 4f0bb271c300253d1812c6cccf813eff442a02db
Author: Łukasz Hryniuk 
Date:   Tue Aug 25 18:39:47 2015 +0200

tdf#89387 test for LCM function

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

diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 1b93a83..237ebf3 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -189,6 +189,7 @@ public:
 void testFuncCHITEST();
 void testFuncSUMX2PY2();
 void testFuncGCD();
+void testFuncLCM();
 
 void testExternalRef();
 void testExternalRefFunctions();
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index da8fc5e..8a5d766 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -5877,4 +5877,87 @@ void Test::testFuncGCD()
 
 m_pDoc->DeleteTab(0);
 }
+
+void Test::testFuncLCM()
+{
+sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on.
+
+m_pDoc->InsertTab(0, "LCMTest");
+
+OUString aVal;
+ScAddress aPos(4,0,0);
+
+m_pDoc->SetString(aPos, "=LCM(A1)");
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 0.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(0, 0, 0, 10.0); // A1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 10.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(0, 0, 0, -2.0); // A1
+aVal = m_pDoc->GetString(aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("LCM should return Err:502 for values less 
then 0",
+OUString("Err:502"), aVal);
+m_pDoc->SetString(0, 0, 0, "a"); // A1
+aVal = m_pDoc->GetString(aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("LCM should return #VALUE! for a single 
string",
+OUString("#VALUE!"), aVal);
+
+m_pDoc->SetString(aPos, "=LCM(A1:B2)");
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of GCD for failed", 0.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(0, 1, 0, -12.0); // B1
+aVal = m_pDoc->GetString(aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("LCM should return Err:502 for a matrix with 
values less then 0",
+OUString("Err:502"), aVal);
+m_pDoc->SetValue(0, 0, 0, 15.0); // A1
+m_pDoc->SetValue(0, 1, 0, 0.0); // B1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 0.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(1, 0, 0, 5.0); // B1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 15.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(0, 1, 0, 10.0); // A2
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 30.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(1, 0, 0, 30.0); // B1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 30.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(0, 0, 0, 20.0); // A1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 60.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(1, 1, 0, 125.0); // B2
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 1500.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(1, 0, 0, 99.0); // B1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 49500.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(0, 1, 0, 37.0); // A2
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 1831500.0, 
m_pDoc->GetValue(aPos));
+
+// with floor
+m_pDoc->SetValue(1, 0, 0, 99.89); // B1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 1831500.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(1, 1, 0, 11.32); // B2
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 73260.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(0, 0, 0, 22.58); // A1
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 7326.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(0, 1, 0, 3.99); // A2
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 198.0, 
m_pDoc->GetValue(aPos));
+
+// inline array
+m_pDoc->SetString(aPos, "=LCM({3;6;9})");
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 18.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetString(aPos, "=LCM({150;0})");
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of LCM for failed", 0.0, 
m_pDoc->GetValue(aPos));
+m_pDoc->SetString(aPos, "=LCM({-3;6;9})");
+aVal = m_pDoc->GetString(aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("LCM should return Err:502 for a array with 
values less then 0",
+OUString("Err:502"), aVal);
+m_pDoc->SetString(aPos, "=LCM({\"a\";6;9})");
+aVal = m_pDoc->GetString(aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("LCM should return #VALUE! for a array with 
strings",
+OUString("#VALUE!"), aVal);
+
+m_pDoc->SetString(aPos, "=LCM(12;24;36;48;60)

  1   2   >