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

2017-09-12 Thread Noel Grandin
 sc/inc/attarray.hxx  |   15 +-
 sc/source/core/data/attarray.cxx |  220 +++
 sc/source/core/data/dociter.cxx  |2 
 sc/source/core/data/document.cxx |4 
 sc/source/core/data/fillinfo.cxx |2 
 sc/source/filter/excel/xistyle.cxx   |   10 -
 sc/source/filter/oox/sheetdatabuffer.cxx |4 
 sc/source/filter/oox/stylesbuffer.cxx|6 
 8 files changed, 132 insertions(+), 131 deletions(-)

New commits:
commit cd779b5f4e457678bd306ee2c873aac7f0e058c4
Author: Noel Grandin 
Date:   Tue Sep 12 15:56:21 2017 +0200

rename ScAttrEntry.nRow to nEndRow

since it's the last row that the pattern applies to

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

diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx
index e6767a32a8dd..aa5d8ad91e61 100644
--- a/sc/inc/attarray.hxx
+++ b/sc/inc/attarray.hxx
@@ -75,9 +75,10 @@ struct ScMergePatternState
 mbValidPatternId(true), mnPatternId(0) {}
 };
 
+// we store an array of these where the pattern applies to all rows up till 
nEndRow
 struct ScAttrEntry
 {
-SCROW   nRow;
+SCROW   nEndRow;
 const ScPatternAttr*pPattern;
 };
 
@@ -267,7 +268,7 @@ inline const ScPatternAttr* ScAttrIterator::Next( SCROW& 
rTop, SCROW& rBottom )
 if ( nPos < pArray->nCount && nRow <= nEndRow )
 {
 rTop = nRow;
-rBottom = std::min( pArray->pData[nPos].nRow, nEndRow );
+rBottom = std::min( pArray->pData[nPos].nEndRow, nEndRow );
 pRet = pArray->pData[nPos].pPattern;
 nRow = rBottom + 1;
 ++nPos;
@@ -289,13 +290,13 @@ inline const ScPatternAttr* ScAttrIterator::Resync( SCROW 
nRowP, SCROW& rTop, SC
 // starting right there. Assume that Next() was called so nPos already
 // advanced. Another high chance is that the change extended a previous or
 // next pattern. In all these cases we don't need to search.
-if (3 <= nPos && nPos <= pArray->nCount && pArray->pData[nPos-3].nRow < 
nRowP &&
-nRowP <= pArray->pData[nPos-2].nRow)
+if (3 <= nPos && nPos <= pArray->nCount && pArray->pData[nPos-3].nEndRow < 
nRowP &&
+nRowP <= pArray->pData[nPos-2].nEndRow)
 nPos -= 2;
-else if (2 <= nPos && nPos <= pArray->nCount && pArray->pData[nPos-2].nRow 
< nRowP &&
-nRowP <= pArray->pData[nPos-1].nRow)
+else if (2 <= nPos && nPos <= pArray->nCount && 
pArray->pData[nPos-2].nEndRow < nRowP &&
+nRowP <= pArray->pData[nPos-1].nEndRow)
 --nPos;
-else if (pArray->nCount > 0 && nRowP <= pArray->pData[0].nRow)
+else if (pArray->nCount > 0 && nRowP <= pArray->pData[0].nEndRow)
 nPos = 0;
 else
 pArray->Search( nRowP, nPos );
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 5b1dab939ffc..8596b7481f58 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -70,15 +70,15 @@ ScAttrArray::ScAttrArray( SCCOL nNewCol, SCTAB nNewTab, 
ScDocument* pDoc, ScAttr
 pData.reset( new ScAttrEntry[nCount] );
 for ( size_t nIdx = 0; nIdx < nCount; ++nIdx )
 {
-pData[nIdx].nRow = pDefaultColAttrArray->pData[nIdx].nRow;
+pData[nIdx].nEndRow = 
pDefaultColAttrArray->pData[nIdx].nEndRow;
 ScPatternAttr aNewPattern( 
*(pDefaultColAttrArray->pData[nIdx].pPattern) );
 pData[nIdx].pPattern = static_cast( 
&pDocument->GetPool()->Put( aNewPattern ) );
 bNumFormatChanged = false;
 if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
  pData[nIdx].pPattern->GetItemSet(), 
pDocument->GetDefPattern()->GetItemSet() ) )
 {
-aAdrStart.SetRow( nIdx ? pData[nIdx-1].nRow+1 : 0 );
-aAdrEnd.SetRow( pData[nIdx].nRow );
+aAdrStart.SetRow( nIdx ? pData[nIdx-1].nEndRow+1 : 0 );
+aAdrEnd.SetRow( pData[nIdx].nEndRow );
 pDocument->InvalidateTextWidth( &aAdrStart, &aAdrEnd, 
bNumFormatChanged );
 }
 }
@@ -125,7 +125,7 @@ void ScAttrArray::SetDefaultIfNotInit( SCSIZE nNeeded )
 
 SCSIZE nNewLimit = ( SC_ATTRARRAY_DELTA > nNeeded ) ? SC_ATTRARRAY_DELTA : 
nNeeded;
 pData.reset( new ScAttrEntry[nNewLimit] );
-pData[0].nRow = MAXROW;
+pData[0].nEndRow = MAXROW;
 pData[0].pPattern = pDocument->GetDefPattern(); // no put
 nCount = 1;
 nLimit = nNewLimit;
@@ -147,8 +147,8 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern )
 if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
 pPattern->GetItemSet(), pOldPattern->GetItemSet() ) )
 {
-aAdrStart.Se

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

2017-09-12 Thread Jan Holesovsky
 sw/inc/shellio.hxx   |4 +-
 sw/qa/extras/txtexport/txtexport.cxx |   63 +++
 sw/source/filter/ascii/ascatr.cxx|4 +-
 sw/source/filter/writer/writer.cxx   |2 -
 4 files changed, 69 insertions(+), 4 deletions(-)

New commits:
commit 3563220f048da5e0e893b8ac7faf5e8f14889fa5
Author: Jan Holesovsky 
Date:   Tue Sep 12 13:29:46 2017 +0200

tdf#112191: Unit test.

This was the hard part of the fix :-)

Change-Id: Iae335c9d41d9b3420472b5d02113e2b42ab825da
Reviewed-on: https://gerrit.libreoffice.org/42203
Tested-by: Jenkins 
Reviewed-by: Jan Holesovsky 

diff --git a/sw/qa/extras/txtexport/txtexport.cxx 
b/sw/qa/extras/txtexport/txtexport.cxx
index b9cd02bdf0b5..59e64d215872 100644
--- a/sw/qa/extras/txtexport/txtexport.cxx
+++ b/sw/qa/extras/txtexport/txtexport.cxx
@@ -11,8 +11,41 @@
 
 #include 
 #include 
+
+#include 
+#include 
 #include 
 
+class TxtImportTest : public SwModelTestBase
+{
+public:
+TxtImportTest() :
+SwModelTestBase("/sw/qa/extras/txtexport/data/", "Text")
+{}
+
+// Export & assert part of the document (defined by SwPaM).
+void assertExportedRange(const OString& aExpected, SwPaM& rPaM)
+{
+WriterRef rAsciiWriter;
+GetASCWriter(aEmptyOUStr, OUString(), rAsciiWriter);
+CPPUNIT_ASSERT(rAsciiWriter.is());
+
+// no start char
+rAsciiWriter->bUCS2_WithStartChar = false;
+
+SvMemoryStream aMemoryStream;
+
+SwWriter aWriter(aMemoryStream, rPaM);
+ErrCode nError = aWriter.Write(rAsciiWriter);
+CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, nError);
+
+const char* pData = static_cast(aMemoryStream.GetData());
+OString aResult(pData, aMemoryStream.GetSize());
+
+CPPUNIT_ASSERT_EQUAL(aExpected, aResult);
+}
+};
+
 class TxtExportTest : public SwModelTestBase
 {
 public:
@@ -36,6 +69,7 @@ protected:
 }
 };
 
+#define DECLARE_TXTIMPORT_TEST(TestName, filename) 
DECLARE_SW_EXPORT_TEST(TestName, filename, nullptr, TxtImportTest)
 #define DECLARE_TXTEXPORT_TEST(TestName, filename) 
DECLARE_SW_EXPORT_TEST(TestName, filename, nullptr, TxtExportTest)
 
 DECLARE_TXTEXPORT_TEST(testBullets, "bullets.odt")
@@ -71,6 +105,35 @@ DECLARE_TXTEXPORT_TEST(testBullets, "bullets.odt")
 CPPUNIT_ASSERT_EQUAL(aExpected, aData);
 }
 
+DECLARE_TXTIMPORT_TEST(testTdf112191, "bullets.odt")
+{
+SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+CPPUNIT_ASSERT(pDoc);
+
+// just the 5th paragraph - no bullet
+uno::Reference xPara(getParagraph(5));
+SwUnoInternalPaM aPaM(*pDoc);
+bool bSuccess = sw::XTextRangeToSwPaM(aPaM, xPara);
+CPPUNIT_ASSERT(bSuccess);
+
+assertExportedRange(OString("First bullet"), aPaM);
+
+// but when we extend to the next paragraph - now there are bullets
+xPara = getParagraph(6);
+SwUnoInternalPaM aPaM2(*pDoc);
+bSuccess = sw::XTextRangeToSwPaM(aPaM2, xPara);
+CPPUNIT_ASSERT(bSuccess);
+
+OUString aString = OStringToOUString(
+"\xe2\x80\xa2 First bullet" SAL_NEWLINE_STRING
+"\xe2\x80\xa2 Second bullet", RTL_TEXTENCODING_UTF8);
+
+SwPaM aPaM3(*aPaM2.GetMark(), *aPaM.GetPoint());
+assertExportedRange(OUStringToOString(aString, 
osl_getThreadTextEncoding()), aPaM3);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 9ead87264328beead1c7e878c2aee03e03af
Author: Jan Holesovsky 
Date:   Tue Sep 12 13:28:32 2017 +0200

tdf#112191: Don't export bullets when only one paragraph is selected.

Change-Id: Ibea54f857e78a850ea05643743884ae2157dae57
Reviewed-on: https://gerrit.libreoffice.org/42202
Tested-by: Jenkins 
Reviewed-by: Jan Holesovsky 

diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 1ebc33e4e0a8..92544413bdfa 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -370,7 +370,6 @@ class SW_DLLPUBLIC Writer
 
 protected:
 
-SwPaM* pOrigPam;// Last Pam that has to be processed.
 const OUString* pOrigFileName;
 
 void ResetWriter();
@@ -390,6 +389,7 @@ protected:
 
 public:
 SwDoc* pDoc;
+SwPaM* pOrigPam;// Last Pam that has to be processed.
 SwPaM* pCurPam;
 bool bWriteAll : 1;
 bool bShowProgress : 1;
@@ -544,7 +544,7 @@ namespace SwReaderWriter
 }
 
 void GetRTFWriter( const OUString&, const OUString&, WriterRef& );
-void GetASCWriter( const OUString&, const OUString&, WriterRef& );
+SW_DLLPUBLIC void GetASCWriter(const OUString&, const OUString&, WriterRef&);
 void GetHTMLWriter( const OUString&, const OUString&, WriterRef& );
 void GetXMLWriter( const OUString&, const OUString&, WriterRef& );
 
diff --git a/sw/source/filter/ascii/ascatr.cxx 
b/sw/source/filter/ascii/ascatr.cxx
index 1a3f416ea91f..77b57e4f01dd 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/fi

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

2017-09-12 Thread Stephan Bergmann
 svtools/source/svrtf/svparser.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 8e0fb74dc01927b60d8b868548ef8fe1d7a80ce3
Author: Stephan Bergmann 
Date:   Wed Sep 13 08:35:35 2017 +0200

Revert "svtools: HTML import: don't put lone surrogates in OUString"

This reverts commit fc670f637d4271246691904fd649358ce2e7be59, which is no 
longer
needed after 08e78607ec6bc820c52ab3df1a5d3738e049b90d "Make reading UTF-8
strict".  The bug doc fdo67610-1.doc (aka
) now opens 
fine
without hitting the assert in OUString::toUtf8.

diff --git a/svtools/source/svrtf/svparser.cxx 
b/svtools/source/svrtf/svparser.cxx
index cef258f04dd2..541aa5276c2d 100644
--- a/svtools/source/svrtf/svparser.cxx
+++ b/svtools/source/svrtf/svparser.cxx
@@ -423,8 +423,7 @@ sal_uInt32 SvParser::GetNextChar()
 while( 0 == nChars  && !bErr );
 }
 
-// Note: ImplConvertUtf8ToUnicode() may produce a surrogate!
-if (!rtl::isUnicodeCodePoint(c) || rtl::isHighSurrogate(c) || 
rtl::isLowSurrogate(c))
+if ( ! rtl::isUnicodeCodePoint( c ) )
 c = '?' ;
 
 if( bErr )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sal/qa sal/textenc

2017-09-12 Thread Stephan Bergmann
 sal/qa/rtl/textenc/rtl_textcvt.cxx |  332 +
 sal/textenc/tcvtutf8.cxx   |   73 +---
 2 files changed, 352 insertions(+), 53 deletions(-)

New commits:
commit 08e78607ec6bc820c52ab3df1a5d3738e049b90d
Author: Stephan Bergmann 
Date:   Wed Sep 13 08:28:32 2017 +0200

Make reading UTF-8 strict

Consider non-shortest forms, surrogates, and representations of values 
larger
than 0x10 (which can even cover five or six bytes, for historical 
reasons)
as "invalid" (they used to be considered as "undefined" instead).

This is in response to fc670f637d4271246691904fd649358ce2e7be59 "svtools: 
HTML
import: don't put lone surrogates in OUString" (which can now be reverted 
again
in a follow-up commit).  My fear would have been that some places in the 
code
rely on the original, relaxed handling, but at least 'make check' still
succeeded for me.

Change-Id: I017e6c04ed3c577c3694b417167f853987a1d1ce

diff --git a/sal/qa/rtl/textenc/rtl_textcvt.cxx 
b/sal/qa/rtl/textenc/rtl_textcvt.cxx
index d698bc22cd74..3c36852bebfc 100644
--- a/sal/qa/rtl/textenc/rtl_textcvt.cxx
+++ b/sal/qa/rtl/textenc/rtl_textcvt.cxx
@@ -453,6 +453,8 @@ public:
 
 void testComplexCut();
 
+void testInvalidUtf8();
+
 void testSRCBUFFERTOSMALL();
 
 void testMime();
@@ -465,6 +467,7 @@ public:
 CPPUNIT_TEST(testSingleByte);
 CPPUNIT_TEST(testComplex);
 CPPUNIT_TEST(testComplexCut);
+CPPUNIT_TEST(testInvalidUtf8);
 CPPUNIT_TEST(testSRCBUFFERTOSMALL);
 CPPUNIT_TEST(testMime);
 CPPUNIT_TEST(testWindows);
@@ -2330,35 +2333,6 @@ void Test::testComplex() {
   true,
   false,
   RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
-{ RTL_TEXTENCODING_UTF8,
-  RTL_CONSTASCII_STRINGPARAM(
-  "\xC0\x80\xE0\x80\x81\xF0\x80\x80\x82\xF8\x80\x80\x80\x83"
-  "\xFC\x80\x80\x80\x80\x84"),
-  { 0x,0x0001,0x0002,0x0003,0x0004 },
-  5,
-  false,
-  true,
-  false,
-  false,
-  RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
-{ RTL_TEXTENCODING_UTF8,
-  RTL_CONSTASCII_STRINGPARAM("\xED\xA1\x89\xED\xB4\x93"),
-  { 0xD849,0xDD13 },
-  2,
-  false,
-  true,
-  false,
-  false,
-  RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
-{ RTL_TEXTENCODING_UTF8,
-  RTL_CONSTASCII_STRINGPARAM("\xED\xA1\x89\x41"),
-  { 0xD849,0x0041 },
-  2,
-  false,
-  true,
-  false,
-  false,
-  RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
 
 // Test Java UTF-8:
 
@@ -2664,6 +2638,306 @@ void Test::testComplexCut() {
 #endif
 }
 
+void Test::testInvalidUtf8() {
+// UTF-8, invalid bytes:
+{
+auto const converter = rtl_createTextToUnicodeConverter(
+RTL_TEXTENCODING_UTF8);
+CPPUNIT_ASSERT(converter != nullptr);
+sal_Unicode buf[TEST_STRING_SIZE];
+sal_uInt32 info;
+sal_Size converted;
+auto const size = rtl_convertTextToUnicode(
+converter, nullptr, RTL_CONSTASCII_STRINGPARAM("\x80\xBF\xFE\xFF"),
+buf, TEST_STRING_SIZE,
+(RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
+ | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
+ | RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT
+ | RTL_TEXTTOUNICODE_FLAGS_FLUSH),
+&info, &converted);
+CPPUNIT_ASSERT_EQUAL(sal_Size(4), size);
+CPPUNIT_ASSERT_EQUAL(
+OUString(u"\uFFFD\uFFFD\uFFFD\uFFFD"),
+OUString(buf, sal_Int32(size)));
+CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info);
+CPPUNIT_ASSERT_EQUAL(sal_Size(4), converted);
+rtl_destroyTextToUnicodeConverter(converter);
+}
+// UTF-8, non-shortest two-byte sequence:
+{
+auto const converter = rtl_createTextToUnicodeConverter(
+RTL_TEXTENCODING_UTF8);
+CPPUNIT_ASSERT(converter != nullptr);
+sal_Unicode buf[TEST_STRING_SIZE];
+sal_uInt32 info;
+sal_Size converted;
+auto const size = rtl_convertTextToUnicode(
+converter, nullptr, RTL_CONSTASCII_STRINGPARAM("\xC0\x80"),
+buf, TEST_STRING_SIZE,
+(RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
+ | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
+ | RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT
+ | RTL_TEXTTOUNICODE_FLAGS_FLUSH),
+&info, &converted);
+CPPUNIT_ASSERT_EQUAL(sal_Size(1), size);
+CPPUNIT_ASSERT_EQUAL(
+OUString(u"\uFFFD"), OUString(buf, sal_Int32(size)));
+CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info);
+CPPUNIT_ASSERT_EQUAL(sal_Size(2), converted)

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

2017-09-12 Thread Tor Lillqvist
 vcl/win/app/salinst.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit caf9e56a81d28bdb8d447bc9d3538bbd9969ff73
Author: Tor Lillqvist 
Date:   Tue Aug 29 10:24:16 2017 +0300

Change assertion failure to SAL_WARN

I hit it multiple times and have no interest in figuring out
why. Or time.

Change-Id: I3f22c8b62fdcf987b760ac16bfe8a21a8870d33e
Reviewed-on: https://gerrit.libreoffice.org/42212
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index 09532902af00..97a5b6c55ad4 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -722,7 +722,7 @@ LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM 
wParam, LPARAM lParam, i
 // PM_QS_POSTMESSAGE is needed, so we don't process the 
SendMessage from DoYield!
 while ( PeekMessageW(&aMsg, nullptr, SAL_MSG_TIMER_CALLBACK,
  SAL_MSG_TIMER_CALLBACK, PM_REMOVE | 
PM_NOYIELD | PM_QS_POSTMESSAGE) )
-assert(! "Multiple timer messages in queue" );
+SAL_WARN("vcl", "Multiple timer messages in queue");
 GetSalData()->mbOnIdleRunScheduler = false;
 EmitTimerCallback();
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Justin Luth
 sw/qa/extras/ww8export/data/tdf75539_relativeWidth.doc |binary
 sw/qa/extras/ww8export/ww8export.cxx   |   11 +++
 sw/source/filter/ww8/ww8graf2.cxx  |2 +-
 3 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit ffc3358515799057e72379b76a1165c6ea5a9bd1
Author: Justin Luth 
Date:   Tue Sep 5 13:06:27 2017 -0400

tdf#75539 ww8import: fix horizontalLine percentage

The formula previously divided by 1000, which was a common
dxaGoal width from MSO2003 (based on round-trip testing).
But for the bug document, that formuala didn't work.

An "assert (false)" with "make check" indicates that only
unit test n757118.doc contains a percentage-derived width,
and that test also has dxaGoal == 1000. So, my pool of
test documents is pretty small, but it seems logical that
this is a better formula since it fixes an obviously
bad example, and explains why it "worked before".

Change-Id: I7bf666e88e7e59e06bbfa3c0961fa8eabbc80310
Reviewed-on: https://gerrit.libreoffice.org/41957
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 

diff --git a/sw/qa/extras/ww8export/data/tdf75539_relativeWidth.doc 
b/sw/qa/extras/ww8export/data/tdf75539_relativeWidth.doc
new file mode 100644
index ..ac811a8f3599
Binary files /dev/null and 
b/sw/qa/extras/ww8export/data/tdf75539_relativeWidth.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export.cxx 
b/sw/qa/extras/ww8export/ww8export.cxx
index 131c8e85b329..38f41d83bf49 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -261,6 +261,17 @@ xray ThisComponent.DrawPage.getByIndex(0).BoundRect
 CPPUNIT_ASSERT( abs( boundRect2.Width - boundRect4.Width ) < 5 );
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf75539_relativeWidth, 
"tdf75539_relativeWidth.doc")
+{
+//divide everything by 10 to give a margin of error for rounding etc.
+sal_Int32 pageWidth = parseDump("/root/page[1]/body/infos/bounds", 
"width").toInt32()/10;
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Page width", sal_Int32(9354/10), pageWidth);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("100% width line", pageWidth,   
parseDump("/root/page[1]/body/txt[2]/Special", "nWidth").toInt32()/10);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("50% width line", pageWidth/2,  
parseDump("/root/page[1]/body/txt[4]/Special", "nWidth").toInt32()/10);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("25% width line", pageWidth/4,  
parseDump("/root/page[1]/body/txt[6]/Special", "nWidth").toInt32()/10);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("10% width line", pageWidth/10, 
parseDump("/root/page[1]/body/txt[8]/Special", "nWidth").toInt32()/10);
+}
+
 DECLARE_WW8EXPORT_TEST(testN757905, "n757905.doc")
 {
 // The problem was that the paragraph had only a single fly
diff --git a/sw/source/filter/ww8/ww8graf2.cxx 
b/sw/source/filter/ww8/ww8graf2.cxx
index df199a69f87a..0ab278d9dbb4 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -580,7 +580,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj const 
* pTextObj,
 aPic.mx = msword_cast(
 m_aSectionManager.GetPageWidth() -
 m_aSectionManager.GetPageRight() -
-m_aSectionManager.GetPageLeft()) * relativeWidth / 
1000;
+m_aSectionManager.GetPageLeft()) * relativeWidth / 
aPic.dxaGoal;
 aPD = WW8PicDesc( aPic );
 // This SetSnapRect() call adjusts the size of the
 // object itself, no idea why it's this call (or even
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Some more features

2017-09-12 Thread kingtravel
Hi all, 

I just pushed another patch: 

 * Calc, Writer and Impress tables now can have dotted and dashed 
borders. 

-- 
Cedric 





--
Sent from: http://nabble.documentfoundation.org/Dev-f1639786.html
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Temporary files written to predetermined location during build

2017-09-12 Thread Rene Engelhard
[ revisiting this thread since after all those unrelated replies it diesd. ]

Hi

On Wed, Aug 09, 2017 at 02:35:40PM +0200, Michael Stahl wrote:
> On 09.08.2017 14:27, Paul Menzel wrote:
> >> Building LibreOffice 5.4.0.3 with one user, and then building it with 
> >> another
> >> user shows that it tries to write to the same paths in the temporary 
> >> directory,
> >> which of course fails.
> >>
> >> ```
> >> […]
> >> 
> >> ... languages de_en-US ...
> >> ... analyzing files ...
> >> ... analyzing files with flag FILELIST ...
> >> filelist
> >> /dev/shm/bee-root/libreoffice/libreoffice-5.4.0.3-0/build/workdir/Package/xmlsec.filelist
> >> is empty
> >> ... analyzing files with flag SCPZIP_REPLACE ...
> >> ... analyzing all directories for this product ...
> >> ... analyzing links ...
> >> ... analyzing unix links ...
> >> ... creating profiles ...
> >> fatal: Not a git repository (or any parent up to mount point /dev)
> >> Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
> >> ERROR: Failure in installer.pm
> >> ERROR: ERROR: Cannot open file
> >> /tmp/LibreOffice//profiles/de_en-US/gid_Brand_Profile_Bootstrap_Ini/bootstraprc
> >> for writing at
> >> /dev/shm/bee-root/libreoffice/libreoffice-5.4.0.3-0/source/solenv/bin/modules/installer/files.pm
> >> line 85.
> 
> that definitely looks like a bug, it should create that inside some
> random subdirectory...

Yes, especially as /tmp/ is (also) a security-related bug
(possible symlink attack)..

See also http://bugs.debian.org/875415 which I just received...

Regards,

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


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 33ead25229d308f98fa171412f2937ca0ba976e9
Author: Olivier Hallot 
Date:   Tue Sep 12 14:48:18 2017 -0300

Updated core
Project: help  42fbc7890755b7f6322be2fc2c7bc934d3c07b1e

TDF#97745 Add support custom search in helponline

Added some language support for the helponline global search

Each custom search engine of google has a unique token, which
configuration is handled by CSE owner.

The CSE attempt to seach in helponline in the page language. If a page
is already indexed, it shows what it has. If not, pages indexed from the
*.libreoffice.org domain and wiki.tdf.org are shown.

The CSE prevents display of indexed pages of other suites.

Change-Id: I133e1a7af867c2380ccb1f20c483af63337a58b9
Reviewed-on: https://gerrit.libreoffice.org/42218
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 6005c5c31ca8..42fbc7890755 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6005c5c31ca8e9f9107c5c0e35858d27e4a55490
+Subproject commit 42fbc7890755b7f6322be2fc2c7bc934d3c07b1e
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: help3xsl/localized.xsl help3xsl/online_transform.xsl

2017-09-12 Thread Olivier Hallot
 help3xsl/localized.xsl|   12 +---
 help3xsl/online_transform.xsl |   59 ++
 2 files changed, 34 insertions(+), 37 deletions(-)

New commits:
commit 42fbc7890755b7f6322be2fc2c7bc934d3c07b1e
Author: Olivier Hallot 
Date:   Tue Sep 12 14:48:18 2017 -0300

TDF#97745 Add support custom search in helponline

Added some language support for the helponline global search

Each custom search engine of google has a unique token, which
configuration is handled by CSE owner.

The CSE attempt to seach in helponline in the page language. If a page
is already indexed, it shows what it has. If not, pages indexed from the
*.libreoffice.org domain and wiki.tdf.org are shown.

The CSE prevents display of indexed pages of other suites.

Change-Id: I133e1a7af867c2380ccb1f20c483af63337a58b9
Reviewed-on: https://gerrit.libreoffice.org/42218
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/help3xsl/localized.xsl b/help3xsl/localized.xsl
index e44fa016c..999ca2d3e 100644
--- a/help3xsl/localized.xsl
+++ b/help3xsl/localized.xsl
@@ -159,10 +159,14 @@ Stylesheet map language-dependent parameters and 
translation
 
 
 
-123456
-123456
-123456
-1234567890
+var cx = 
'010161382024564278136:stzujqtpnve';
+var cx = 
'010161382024564278136:cdcn_oz4txg';
+var cx = 
'010161382024564278136:mimp7dbi-eq';
+var cx = 
'010161382024564278136:xdxa9y906g0';
+var cx = 
'010161382024564278136:7wxg-zakzmu';
+var cx = 
'010161382024564278136:1x2uk8j-rbw';
+var cx = 
'010161382024564278136:1x2uk8j-rbw';
+var cx = 
'010161382024564278136:stzujqtpnve';
 
 
 
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index eebaced56..f3ddebee4 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -238,8 +238,9 @@
 
 

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

2017-09-12 Thread Eike Rathke
 external/icu/UnpackedTarball_icu.mk|1 +
 external/icu/icu4c-59-icu13329-xlocale.patch.1 |   14 ++
 2 files changed, 15 insertions(+)

New commits:
commit 274b2aee3bf65f139292d08a46d86f90d5ac8acb
Author: Eike Rathke 
Date:   Tue Sep 12 22:14:07 2017 +0200

Do not include non-standardized xlocale.h, include locale.h instead

"The file and this data structure is not standardized.  Don't rely on it.  
It
can go away without warning."

...

And since glibc 2.26 it's gone.

https://ssl.icu-project.org/trac/ticket/13329

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

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 1ba15a448c75..7fa891f07d6d 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-59-werror-undef.patch.1 \
external/icu/icu4c-59-werror-shadow.patch.1 \
external/icu/icu4c-iOS.patch.1 \
+   external/icu/icu4c-59-icu13329-xlocale.patch.1 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/icu4c-59-icu13329-xlocale.patch.1 
b/external/icu/icu4c-59-icu13329-xlocale.patch.1
new file mode 100644
index ..f57ec61e3ca6
--- /dev/null
+++ b/external/icu/icu4c-59-icu13329-xlocale.patch.1
@@ -0,0 +1,14 @@
+# xlocale.h is gone with glibc 2.26 and should never had been included.
+# https://ssl.icu-project.org/trac/ticket/13329
+diff -ur icu.org/source/i18n/digitlst.cpp icu/source/i18n/digitlst.cpp
+--- icu.org/source/i18n/digitlst.cpp   2017-01-20 01:20:31.0 +0100
 icu/source/i18n/digitlst.cpp   2017-09-12 22:03:15.019034749 +0200
+@@ -64,7 +64,7 @@
+ # if U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CYGWIN
+ #   include 
+ # else
+-#   include 
++#   include 
+ # endif
+ #endif
+ 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Jan Holesovsky
 cui/source/dialogs/screenshotannotationdlg.cxx |6 +++---
 l10ntools/source/xmlparse.cxx  |   16 
 2 files changed, 15 insertions(+), 7 deletions(-)

New commits:
commit a0f51dc3a480715a868aa024f6d17d6f2e78d0bf
Author: Jan Holesovsky 
Date:   Wed Dec 21 17:29:30 2016 +0100

Use "en-US" as the default for XHP's xml-lang attribute.

Change-Id: I765e1cc25ac79d2cebf54f7a247a200647c984da
Reviewed-on: https://gerrit.libreoffice.org/32296
Tested-by: Jenkins 
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx 
b/cui/source/dialogs/screenshotannotationdlg.cxx
index 6f3da22abc6a..caf3c98fc31d 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -54,7 +54,7 @@ namespace
 
 OUString lcl_AltDescr()
 {
-OUString aTempl = OUString(""
+OUString aTempl = OUString(""
" " //FIXME real dialog title or something
   "");
 aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("alt_id") );
@@ -79,7 +79,7 @@ namespace
 
 OUString lcl_ParagraphWithImage( const OUString& rScreenshotId, const 
Size& rSize )
 {
-OUString aTempl = OUString( "%2"
+OUString aTempl = OUString( "%2"
 ""  SAL_NEWLINE_STRING );
 aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("par_id") );
 aTempl = aTempl.replaceFirst( "%2", lcl_Image(rScreenshotId, rSize) );
@@ -90,7 +90,7 @@ namespace
 OUString lcl_Bookmark( const OUString& rWidgetId )
 {
 OUString aTempl = "" SAL_NEWLINE_STRING
-  "" SAL_NEWLINE_STRING;
+  "" SAL_NEWLINE_STRING;
 aTempl = aTempl.replaceFirst( "%1", rWidgetId );
 aTempl = aTempl.replaceFirst( "%2", rWidgetId );
 aTempl = aTempl.replaceFirst( "%3", lcl_genRandom("bm_id") );
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index 809aa62fd8a8..16f6ced20ec8 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -330,7 +330,7 @@ void XMLFile::Extract()
 
 void XMLFile::InsertL10NElement( XMLElement* pElement )
 {
-OString sId, sLanguage("");
+OString sId, sLanguage("en-US");
 LangHashMap* pElem;
 
 if( pElement->GetAttributeList() != nullptr )
@@ -445,7 +445,8 @@ void XMLFile::SearchL10NElements( XMLChildNode *pCur )
 bool bInsert = true;
 XMLElement *pElement = static_cast(pCur);
 const OString sName(pElement->GetName().toAsciiLowerCase());
-OString sLanguage, sTmpStrVal;
+OString sLanguage("en-US");
+OString sTmpStrVal;
 if ( pElement->GetAttributeList())
 {
 for ( size_t j = 0 , cnt = 
pElement->GetAttributeList()->size(); j < cnt && bInsert; ++j )
@@ -603,11 +604,18 @@ void XMLElement::ChangeLanguageTag( const OString &rValue 
)
 SetLanguageId(rValue);
 if ( m_pAttributes )
 {
+bool bWasSet = false;
 for (size_t i = 0; i < m_pAttributes->size(); ++i)
 {
-if ( (*m_pAttributes)[ i ]->GetName() == "xml-lang" )
+if ((*m_pAttributes)[ i ]->GetName() == XML_LANG)
+{
 (*m_pAttributes)[ i ]->setValue(rValue);
+bWasSet = true;
+}
 }
+
+if (!bWasSet)
+AddAttribute(XML_LANG, rValue);
 }
 XMLChildNodeList* pCList = GetChildList();
 
@@ -681,7 +689,7 @@ void XMLElement::Print(XMLNode *pCur, OStringBuffer& 
rBuffer, bool bRootelement
 for ( size_t j = 0; j < 
pElement->GetAttributeList()->size(); j++ )
 {
 const OString aAttrName( 
(*pElement->GetAttributeList())[ j ]->GetName() );
-if( !aAttrName.equalsIgnoreAsciiCase( 
"xml-lang" ) )
+if (!aAttrName.equalsIgnoreAsciiCase(XML_LANG))
 {
 rBuffer.append(
 " " + aAttrName + "=\"" +
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Julien Nabet
 sc/source/ui/inc/TableFillingAndNavigationTools.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1aaa0fa8218a8bd13b191999080c9a95939667f0
Author: Julien Nabet 
Date:   Tue Sep 12 23:00:53 2017 +0200

Replace list by vector in TableFillingAndNavigationTools (sc)

Change-Id: I6d9426c66b0952a3eac7d418a187ec4e3759eea6
Reviewed-on: https://gerrit.libreoffice.org/42221
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx 
b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
index b1d7a54d9a32..085b626c1d0e 100644
--- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
+++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
@@ -19,7 +19,7 @@
 #include "docfunc.hxx"
 #include "formulacell.hxx"
 
-#include 
+#include 
 
 class FormulaTemplate
 {
@@ -55,7 +55,7 @@ public:
 class AddressWalker
 {
 public:
-std::list mAddressStack;
+std::vector mAddressStack;
 
 ScAddress mCurrentAddress;
 ScAddress mMinimumAddress;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Julien Nabet
 sw/source/filter/ww8/docxattributeoutput.cxx |   24 
 sw/source/filter/ww8/docxattributeoutput.hxx |   10 +-
 2 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit fe2a72e84e07a11b5308e53ae0f0ba607096660a
Author: Julien Nabet 
Date:   Tue Sep 12 22:37:56 2017 +0200

Replace some lists by vectors in docxattributeoutput (sw/ww8)

Change-Id: I43ad46f95538477ad5d9fae330f1e01892cc41fb
Reviewed-on: https://gerrit.libreoffice.org/42220
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 365db5e55728..796cf7d56763 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -454,7 +454,7 @@ void DocxAttributeOutput::EndParagraph( 
ww8::WW8TableNodeInfoInner::Pointer_t pT
 comphelper::FlagRestorationGuard 
aStartedParaSdtGuard(m_bStartedParaSdt, false);
 
 assert(!m_pPostponedCustomShape);
-m_pPostponedCustomShape.reset(new std::list);
+m_pPostponedCustomShape.reset(new std::vector);
 for (size_t nIndex = 0; nIndex < m_aFramesOfParagraph.size(); ++nIndex)
 {
 m_bParagraphFrameOpen = true;
@@ -1726,16 +1726,16 @@ void DocxAttributeOutput::StartRunProperties()
 InitCollectedRunProperties();
 
 assert( !m_pPostponedGraphic );
-m_pPostponedGraphic.reset(new std::list);
+m_pPostponedGraphic.reset(new std::vector);
 
 assert( !m_pPostponedDiagrams );
-m_pPostponedDiagrams.reset(new std::list);
+m_pPostponedDiagrams.reset(new std::vector);
 
 assert(!m_pPostponedDMLDrawings);
-m_pPostponedDMLDrawings.reset(new std::list);
+m_pPostponedDMLDrawings.reset(new std::vector);
 
 assert( !m_pPostponedOLEs );
-m_pPostponedOLEs.reset(new std::list);
+m_pPostponedOLEs.reset(new std::vector);
 }
 
 void DocxAttributeOutput::InitCollectedRunProperties()
@@ -2087,7 +2087,7 @@ void DocxAttributeOutput::GetSdtEndBefore(const 
SdrObject* pSdrObj)
 
 void DocxAttributeOutput::WritePostponedGraphic()
 {
-for( std::list< PostponedGraphic >::const_iterator it = 
m_pPostponedGraphic->begin();
+for( std::vector< PostponedGraphic >::const_iterator it = 
m_pPostponedGraphic->begin();
  it != m_pPostponedGraphic->end();
  ++it )
 FlyFrameGraphic( it->grfNode, it->size, it->mOLEFrameFormat, 
it->mOLENode, it->pSdrObj );
@@ -2096,7 +2096,7 @@ void DocxAttributeOutput::WritePostponedGraphic()
 
 void DocxAttributeOutput::WritePostponedDiagram()
 {
-for( std::list< PostponedDiagram >::const_iterator it = 
m_pPostponedDiagrams->begin();
+for( std::vector< PostponedDiagram >::const_iterator it = 
m_pPostponedDiagrams->begin();
  it != m_pPostponedDiagrams->end();
  ++it )
 m_rExport.SdrExporter().writeDiagram( it->object, *(it->frame), 
m_anchorId++ );
@@ -4911,7 +4911,7 @@ void DocxAttributeOutput::WritePostponedOLE()
 if( !m_pPostponedOLEs )
 return;
 
-for( std::list< PostponedOLE >::iterator it = m_pPostponedOLEs->begin();
+for( std::vector< PostponedOLE >::iterator it = m_pPostponedOLEs->begin();
  it != m_pPostponedOLEs->end();
  ++it )
 {
@@ -5019,7 +5019,7 @@ void DocxAttributeOutput::WritePostponedCustomShape()
 return;
 
 bool bStartedParaSdt = m_bStartedParaSdt;
-for( std::list< PostponedDrawing >::iterator it = 
m_pPostponedCustomShape->begin();
+for( std::vector< PostponedDrawing >::iterator it = 
m_pPostponedCustomShape->begin();
  it != m_pPostponedCustomShape->end();
  ++it )
 {
@@ -5038,11 +5038,11 @@ void DocxAttributeOutput::WritePostponedDMLDrawing()
 return;
 
 // Clear the list early, this method may be called recursively.
-std::unique_ptr< std::list > 
pPostponedDMLDrawings(m_pPostponedDMLDrawings.release());
-std::unique_ptr< std::list > 
pPostponedOLEs(m_pPostponedOLEs.release());
+std::unique_ptr< std::vector > 
pPostponedDMLDrawings(m_pPostponedDMLDrawings.release());
+std::unique_ptr< std::vector > 
pPostponedOLEs(m_pPostponedOLEs.release());
 
 bool bStartedParaSdt = m_bStartedParaSdt;
-for( std::list< PostponedDrawing >::iterator it = 
pPostponedDMLDrawings->begin();
+for( std::vector< PostponedDrawing >::iterator it = 
pPostponedDMLDrawings->begin();
  it != pPostponedDMLDrawings->end();
  ++it )
 {
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx 
b/sw/source/filter/ww8/docxattributeoutput.hxx
index 53c05ea2f65c..d06486403a07 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -843,14 +843,14 @@ private:
 SwOLENode* mOLENode;
 const SdrObject* pSdrObj;
 };
-std::unique_ptr< std::list > m_pPostponedGraphic;
+std::unique_ptr< std::vector > m_pPostponedGraphic;
 struct PostponedDiagram

[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-5.3-24'

2017-09-12 Thread Andras Timar
Tag 'cp-5.3-24' created by Andras Timar  at 
2017-09-12 20:51 +

cp-5.3-24

Changes since cp-5.3-23-79:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: Changes to 'refs/tags/cp-5.3-24'

2017-09-12 Thread Christian Lohmaier
Tag 'cp-5.3-24' created by Andras Timar  at 
2017-09-12 20:51 +

cp-5.3-24

Changes since cp-5.3-10:
Christian Lohmaier (1):
  update translations for 5.3.3 rc2

---
 source/am/cui/source/options.po|8 
 source/am/cui/source/tabpages.po   |8 
 source/am/cui/uiconfig/ui.po   |8 
 source/am/fpicker/source/office.po |   10 
 source/am/officecfg/registry/data/org/openoffice/Office.po |6 
 source/am/sc/source/ui/src.po  |8 
 source/am/sfx2/source/dialog.po|   12 
 source/am/svtools/source/dialogs.po|8 
 source/am/svtools/source/misc.po   |8 
 source/am/svx/source/stbctrls.po   |8 
 source/am/svx/uiconfig/ui.po   |   10 
 source/bg/sc/uiconfig/scalc/ui.po  |   20 
 source/bg/sfx2/source/dialog.po|   12 
 source/bg/svx/source/dialog.po |   30 
 source/bg/svx/source/form.po   |   10 
 source/bg/svx/source/stbctrls.po   |8 
 source/bg/svx/source/tbxctrls.po   |6 
 source/bg/svx/uiconfig/ui.po   |  289 
 source/bg/sw/source/ui/utlui.po|   21 
 source/bg/sw/source/uibase/utlui.po|6 
 source/bg/sw/uiconfig/swriter/ui.po|5 
 source/br/cui/uiconfig/ui.po   |   70 -
 source/br/extensions/source/bibliography.po|   12 
 source/br/extensions/source/propctrlr.po   |  152 ++--
 source/br/sc/source/ui/src.po  |   12 
 source/ca/helpcontent2/source/text/scalc/00.po |   20 
 source/ca/helpcontent2/source/text/scalc/01.po |8 
 source/ca/helpcontent2/source/text/scalc/guide.po  |   10 
 source/ca/helpcontent2/source/text/shared/01.po|6 
 source/ca/helpcontent2/source/text/shared/guide.po |5 
 source/ca/helpcontent2/source/text/shared/optionen.po  |8 
 source/ca/helpcontent2/source/text/simpress/guide.po   |   10 
 source/ca/helpcontent2/source/text/swriter/01.po   |   13 
 source/ca/helpcontent2/source/text/swriter/guide.po|   25 
 source/ca/officecfg/registry/data/org/openoffice/Office/UI.po  |8 
 source/ca/sc/uiconfig/scalc/ui.po  |6 
 source/ca/svx/uiconfig/ui.po   |   12 
 source/cy/cui/uiconfig/ui.po   |8 
 source/cy/sfx2/source/dialog.po|   12 
 source/cy/sfx2/uiconfig/ui.po  |   15 
 source/cy/svtools/source/dialogs.po|8 
 source/cy/svtools/source/misc.po   |8 
 source/cy/svx/source/stbctrls.po   |   10 
 source/cy/svx/uiconfig/ui.po   |   10 
 source/da/cui/uiconfig/ui.po   |8 
 source/da/helpcontent2/source/text/scalc/01.po |   12 
 source/da/sfx2/source/dialog.po|   14 
 source/da/sfx2/uiconfig/ui.po  |   17 
 source/da/svtools/source/dialogs.po|   10 
 source/da/svtools/source/java.po   |   12 
 source/da/svtools/source/misc.po   |   10 
 source/da/svx/source/stbctrls.po   |8 
 source/da/svx/uiconfig/ui.po   |   12 
 source/de/editeng/source/items.po  |   10 
 source/de/formula/source/core/resource.po  |8 
 source/de/helpcontent2/source/auxiliary.po |6 
 source/de/helpcontent2/source/text/sbasic/shared/01.po |   10 
 source/de/helpcontent2/source/text/scalc.po|6 
 source/de/helpcontent2/source/text/scalc/00.po |6 
 source/de/helpcontent2/source/text/scalc/01.po |  100 +-
 source/de/helpcontent2/source/text/scalc/guide.po  |   34 
 source/de/helpcontent2/source/text/schart/01.po|6 
 source/de/helpcontent2/source/text/shared/00.po|   10 
 source/de/helpcontent2/source/text/shared/01.po|   12 
 source/de/helpcontent2/source/text/shared/explorer/database.po |8 
 source/de/helpcontent2/source/text/shared/guide.po |   16 
 source/de/helpcontent2/source/text/shared/optionen.po

[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-5.3-24'

2017-09-12 Thread Andras Timar
Tag 'cp-5.3-24' created by Andras Timar  at 
2017-09-12 20:51 +

cp-5.3-24

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


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

2017-09-12 Thread Andras Timar
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 180dec34838389b17ed9d0d3d17fd19a6e5a9c71
Author: Andras Timar 
Date:   Tue Sep 12 22:50:34 2017 +0200

Bump version to 5.3-24

Change-Id: Ia5370a4cbb5d9aaf07f7cc0095f59792ef3b26c6

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


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/cp-5.3-24'

2017-09-12 Thread Olivier R
Tag 'cp-5.3-24' created by Andras Timar  at 
2017-09-12 20:51 +

cp-5.3-24

Changes since cp-5.3-10:
Olivier R (1):
  tdf#107558 French spelling dictionary (6.0.3) and thesaurus

---
 fr_FR/README_fr.txt   |4 
 fr_FR/description.xml |2 
 fr_FR/fr.aff  |17751 ++--
 fr_FR/fr.dic  |155369 
+-
 fr_FR/package-description.txt |2 
 fr_FR/thes_fr.dat |  206 
 6 files changed, 88495 insertions(+), 84839 deletions(-)
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Szymon Kłos
 compilerplugins/clang/badstatics.cxx |1 
 sw/inc/dbmgr.hxx |4 +--
 sw/source/uibase/app/apphdl.cxx  |8 +-
 sw/source/uibase/dbui/dbmgr.cxx  |   46 +--
 4 files changed, 43 insertions(+), 16 deletions(-)

New commits:
commit e2cfcd56ca8f3de4480ee85712cff3182999635c
Author: Szymon Kłos 
Date:   Fri Sep 8 10:57:55 2017 +0200

tdf#108572 remove connections only for current shell

Also remove connections to temp files.

Change-Id: Ie5c09eb365d1246e053dc52884c72687ac226f3c
Reviewed-on: https://gerrit.libreoffice.org/42095
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/42208
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/compilerplugins/clang/badstatics.cxx 
b/compilerplugins/clang/badstatics.cxx
index f10200a93c2f..e551d6be5c5b 100644
--- a/compilerplugins/clang/badstatics.cxx
+++ b/compilerplugins/clang/badstatics.cxx
@@ -197,6 +197,7 @@ public:
 // ScAddInAsync* keys if that set is not empty at exit
 || name == "g_aWindowList"
 //vcl/unx/gtk/a11y/atkutil.cxx, asserted empty at exit
+|| name == "m_aUncommitedRegistrations" // 
sw/source/uibase/dbui/dbmgr.cxx
 || (loplugin::DeclCheck(pVarDecl).Var("aAllListeners")
 .Class("ScAddInListener").GlobalNamespace()) // not owning
) // these variables appear unproblematic
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index d4797b303e23..b80f051a4d55 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -259,7 +259,7 @@ friend class SwConnectionDisposedListener_Impl;
 OUString m_sEmbeddedName;
 
 /// Store last registrations to revoke or commit
-static std::vector m_aUncommitedRegistrations;
+static std::vector> 
m_aUncommitedRegistrations;
 
 /// The document that owns this manager.
 SwDoc* m_pDoc;
@@ -486,7 +486,7 @@ public:
 void RevokeLastRegistrations();
 
 /// Accept not commited registrations
-static void CommitLastRegistrations();
+void CommitLastRegistrations();
 };
 
 #endif
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 0b029e6e5a04..619c202a6039 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -489,7 +489,13 @@ void SwMailMergeWizardExecutor::ExecutionFinished()
 if (xMMConfig)
 xMMConfig->Commit();
 
-SwDBManager::CommitLastRegistrations();
+SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
+if (pDoc)
+{
+SwDBManager* pDbManager = pDoc->GetDBManager();
+if (pDbManager)
+pDbManager->CommitLastRegistrations();
+}
 
 // release/destroy asynchronously
 Application::PostUserEvent( LINK( this, SwMailMergeWizardExecutor, 
DestroyDialogHdl ) );
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 410fb02e6ade..b959a5d7b5f5 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -165,7 +165,7 @@ void lcl_emitEvent(sal_uInt16 nEventId, sal_Int32 nStrId, 
SfxObjectShell* pDocSh
 
 }
 
-std::vector SwDBManager::m_aUncommitedRegistrations;
+std::vector> 
SwDBManager::m_aUncommitedRegistrations;
 
 enum class SwDBNextRecord { NEXT, FIRST };
 static bool lcl_ToNextRecord( SwDSParam* pParam, const SwDBNextRecord action = 
SwDBNextRecord::NEXT );
@@ -811,7 +811,9 @@ SwDBManager::SwDBManager(SwDoc* pDoc)
 
 SwDBManager::~SwDBManager()
 {
-// copy required, m_DataSourceParams can be modifed while disposing 
components
+RevokeLastRegistrations();
+
+// copy required, m_DataSourceParams can be modified while disposing 
components
 std::vector> aCopiedConnections;
 for (auto & pParam : m_DataSourceParams)
 {
@@ -2627,7 +2629,7 @@ OUString 
SwDBManager::LoadAndRegisterDataSource(SwDocShell* pDocShell)
 }
 sFind = LoadAndRegisterDataSource( type, aURLAny, DBCONN_FLAT == type 
? &aSettings : nullptr, aURI, nullptr, nullptr, pDocShell );
 
-m_aUncommitedRegistrations.push_back(sFind);
+m_aUncommitedRegistrations.push_back(std::pair(pDocShell, sFind));
 }
 return sFind;
 }
@@ -2884,6 +2886,10 @@ void 
SwDBManager::LoadAndRegisterEmbeddedDataSource(const SwDBData& rData, const
 
 uno::Reference 
xDataSource(xDatabaseContext->getByName(aURL), uno::UNO_QUERY);
 xDatabaseContext->registerObject( sDataSource, xDataSource );
+
+// temp file - don't remember connection
+if (rData.sDataSource.isEmpty())
+m_aUncommitedRegistrations.push_back(std::pair(nullptr, sDataSource));
 }
 
 void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
@@ -3208,24 +3214,38 @@ void SwDBManager::RevokeLastRegistrations()
 {
 if (m_aUncommitedRegistrations.size())
 {
-SwView* pView = m_pDoc->GetDocShell()->GetView();
-std::shared_ptr xConfigItem = 
pView-

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

2017-09-12 Thread Muhammet Kara
 cui/source/customize/cfg.cxx  |7 
 cui/source/inc/cfg.hxx|1 
 cui/uiconfig/ui/menuassignpage.ui |  965 +-
 3 files changed, 450 insertions(+), 523 deletions(-)

New commits:
commit e970395c692a5c315914ddf5b43cf01e590345ff
Author: Muhammet Kara 
Date:   Mon Sep 11 15:42:30 2017 +0300

tdf#112241: Improve column width behaviour in Customize dialog

Also:
 * Remove unnecessary frame "contents"
 * Remove unnecessary alignment
 * Remove extra column from the left grid (grid4)
 * Move all into a new grid for better sizing

Change-Id: I4d805a800ca6e487bf788cd9401e5f77303ddd1d
Reviewed-on: https://gerrit.libreoffice.org/42186
Tested-by: Jenkins 
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 0afb97ec10ec..fa415d43f6f7 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1158,7 +1158,6 @@ SvxConfigPage::SvxConfigPage(vcl::Window *pParent, const 
SfxItemSet& rSet)
 get(m_pTopLevelListBox, "toplevellist");
 get(m_pPlusBtn, "plusbtn");
 get(m_pMinusBtn, "minusbtn");
-get(m_pContents, "contents");
 get(m_pMoveUpButton, "up");
 get(m_pMoveDownButton, "down");
 get(m_pSaveInListBox, "savein");
@@ -1173,7 +1172,10 @@ SvxConfigPage::SvxConfigPage(vcl::Window *pParent, const 
SfxItemSet& rSet)
 m_pEntries->set_height_request(aSize.Height());
 m_pEntries->set_width_request(aSize.Width());
 m_pFunctions->set_height_request(aSize.Height());
-m_pFunctions->set_width_request(aSize.Width());
+//TODO: Add SvxMenuEntriesListBox into the glade catalog, and use it on the
+//  .ui file to get rid of the extra VCLContainer, and all these manual
+//  sizing and widget creation tricks.
+m_pFunctions->set_width_request(aSize.Width() * 1.4);
 
 // Make the middle buttons bigger
 m_pAddCommandButton->set_height_request( 
m_pAddCommandButton->GetOptimalSize().Height() * 1.5 );
@@ -1203,7 +1205,6 @@ void SvxConfigPage::dispose()
 m_pMinusBtn.clear();
 m_pSearchEdit.clear();
 m_pCommandCategoryListBox.clear();
-m_pContents.clear();
 m_pEntries.clear();
 m_pFunctions.clear();
 m_pAddCommandButton.clear();
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 3185750ffd7a..9e6de15e9e91 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -399,7 +399,6 @@ protected:
 // Used to add and remove toolbars/menus
 VclPtr m_pPlusBtn;
 VclPtr m_pMinusBtn;
-VclPtr   m_pContents;
 VclPtr   m_pEntries;
 VclPtr  m_pContentsListBox;
 
diff --git a/cui/uiconfig/ui/menuassignpage.ui 
b/cui/uiconfig/ui/menuassignpage.ui
index 4dc7ad6ae5e2..9b1da649f7d6 100644
--- a/cui/uiconfig/ui/menuassignpage.ui
+++ b/cui/uiconfig/ui/menuassignpage.ui
@@ -32,571 +32,499 @@
 vertical
 6
 
-  
+  
 True
 False
 True
 True
-0
-none
+6
+6
 
-  
+  
 True
 False
+start
+center
+5
+_Search
+True
+searchEntry
+  
+  
+0
+0
+  
+
+
+  
+True
+False
+start
+center
+5
+Categor_y
+True
+commandcategorylist
+  
+  
+0
+1
+  
+
+
+  
+True
+False
+start
+start
+_Function
+True
+functions:border
+  
+  
+0
+2
+  
+
+
+  
+True
+False
+start
+start
+Description
+  
+  
+0
+3
+  
+
+
+  
+True
+True
+5
+Type to search
+  
+  
+1
+0
+  
+
+
+  
+True
+True
+5
+True
+  
+  
+1
+1
+  
+
+
+  
+True
+True
 True
 True
-6
-12
+
+  
+
+  
+  
+1
+2
+  
+
+
+  
+True
+True
+in
+
+  
+True
+True
+Local help is not installed.
+False
+False
+False
+  

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

2017-09-12 Thread Caolán McNamara
 include/svx/dialcontrol.hxx   |2 --
 svx/source/dialog/dialcontrol.cxx |   19 +--
 2 files changed, 1 insertion(+), 20 deletions(-)

New commits:
commit 9659efe3f695aeeffc4cae427b80020fd2d96796
Author: Caolán McNamara 
Date:   Tue Sep 12 16:06:28 2017 +0100

listening to modify is sufficient to get all changes

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

diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx
index c12f3c97652b..dd485efb50a1 100644
--- a/include/svx/dialcontrol.hxx
+++ b/include/svx/dialcontrol.hxx
@@ -156,9 +156,7 @@ private:
 voidInvalidateControl();
 
 DECL_LINK( LinkedFieldModifyHdl, Edit&, void );
-DECL_LINK( LinkedFieldFocusHdl, Control&, void );
 void LinkedFieldModifyHdl();
-DECL_LINK(SpinFieldHdl, SpinField&, void);
 };
 
 /** Wrapper for usage of a DialControl in item connections. */
diff --git a/svx/source/dialog/dialcontrol.cxx 
b/svx/source/dialog/dialcontrol.cxx
index c13faa7110f3..d1fa4671cdb4 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -394,11 +394,6 @@ void DialControl::SetLinkedField( NumericField* pField, 
sal_Int32 nDecimalPlaces
 {
 NumericField& rField = *mpImpl->mpLinkField;
 rField.SetModifyHdl( Link() );
-rField.SetUpHdl( Link() );
-rField.SetDownHdl( Link() );
-rField.SetFirstHdl( Link() );
-rField.SetLastHdl( Link() );
-rField.SetLoseFocusHdl( Link() );
 }
 // remember the new linked field
 mpImpl->mpLinkField = pField;
@@ -407,25 +402,13 @@ void DialControl::SetLinkedField( NumericField* pField, 
sal_Int32 nDecimalPlaces
 {
 NumericField& rField = *mpImpl->mpLinkField;
 rField.SetModifyHdl( LINK( this, DialControl, LinkedFieldModifyHdl ) );
-rField.SetUpHdl( LINK(this, DialControl, SpinFieldHdl) );
-rField.SetDownHdl( LINK(this, DialControl, SpinFieldHdl) );
-rField.SetFirstHdl( LINK(this, DialControl, SpinFieldHdl) );
-rField.SetLastHdl( LINK(this, DialControl, SpinFieldHdl) );
-rField.SetLoseFocusHdl( LINK( this, DialControl, LinkedFieldFocusHdl ) 
);
 }
 }
+
 IMPL_LINK_NOARG( DialControl, LinkedFieldModifyHdl, Edit&, void )
 {
 LinkedFieldModifyHdl();
 }
-IMPL_LINK_NOARG( DialControl, LinkedFieldFocusHdl, Control&, void )
-{
-LinkedFieldModifyHdl();
-}
-IMPL_LINK_NOARG(DialControl, SpinFieldHdl, SpinField&, void)
-{
-LinkedFieldModifyHdl();
-}
 
 void DialControl::LinkedFieldModifyHdl()
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Szymon Kłos
 dev/null  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx |   14 --
 sw/source/core/edit/edfcol.cxx|   15 +--
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   10 +-
 4 files changed, 6 insertions(+), 33 deletions(-)

New commits:
commit 348bc3c6a8142ed605e260ae930d76e6cec7f656
Author: Szymon Kłos 
Date:   Mon Sep 11 10:53:47 2017 +0200

tdf#112304 Revert "Watermark: not visible if page background was set"

This reverts commit 39c08074a286855dd014ce1c30b8f7ef95b10242.
Fixed by: I69517efb7d82acd719d6a27a09ba61554dbf1ec9

Change-Id: Icd45b3f55292670ff7338a367eba212453a0687e
Reviewed-on: https://gerrit.libreoffice.org/42155
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/42165
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sw/qa/extras/ooxmlexport/data/watermark-layer.docx 
b/sw/qa/extras/ooxmlexport/data/watermark-layer.docx
deleted file mode 100755
index 9428686c1bad..
Binary files a/sw/qa/extras/ooxmlexport/data/watermark-layer.docx and /dev/null 
differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 55f6e3ab3481..55f74de73635 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -28,10 +28,8 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
-#include 
 
 class Test : public SwModelTestBase
 {
@@ -558,18 +556,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf109184, "tdf109184.docx")
 CPPUNIT_ASSERT_EQUAL(static_cast(0xff), 
getProperty(xCell3, "BackColor"));
 }
 
-DECLARE_OOXMLEXPORT_TEST(testWatermarkLayer, "watermark-layer.docx")
-{
-// Watermark was not visible if page background was set.
-
-SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
-SdrPage* pPage = 
pTextDoc->GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
-SdrObject* pObject = pPage->GetObj(0);
-
-CPPUNIT_ASSERT(pObject);
-CPPUNIT_ASSERT_EQUAL(static_cast(1), pObject->GetLayer());
-}
-
 DECLARE_OOXMLEXPORT_TEST(tdf112169, "tdf112169.odt")
 {
 // LO crashed while export because of chararacter background color handling
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 1dadb1bdb8f4..06a33461430f 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -59,7 +59,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #define WATERMARK_NAME "PowerPlusWaterMarkObject"
 
@@ -348,8 +347,7 @@ SfxWatermarkItem SwEditShell::GetWatermark()
 void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark,
 const uno::Reference& xModel,
 const uno::Reference& 
xPageStyle,
-const uno::Reference& xHeaderText,
-sal_Int16 nLayer)
+const uno::Reference& xHeaderText)
 {
 uno::Reference xMultiServiceFactory(xModel, 
uno::UNO_QUERY);
 OUString aShapeServiceName = "com.sun.star.drawing.CustomShape";
@@ -471,7 +469,6 @@ void lcl_placeWatermarkInHeader(const SfxWatermarkItem& 
rWatermark,
 xPropertySet->setPropertyValue("Transformation", 
uno::makeAny(aMatrix));
 xPropertySet->setPropertyValue(UNO_NAME_HORI_ORIENT, 
uno::makeAny(static_cast(text::HoriOrientation::CENTER)));
 xPropertySet->setPropertyValue(UNO_NAME_VERT_ORIENT, 
uno::makeAny(static_cast(text::VertOrientation::CENTER)));
-xPropertySet->setPropertyValue(UNO_NAME_MISC_OBJ_LAYERID, 
uno::makeAny(nLayer));
 
 uno::Reference xTextRange(xShape, uno::UNO_QUERY);
 xTextRange->setString(rWatermark.GetText());
@@ -517,8 +514,6 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& 
rWatermark)
 uno::Reference 
xStyleFamilies(xStyleFamiliesSupplier->getStyleFamilies(), uno::UNO_QUERY);
 uno::Reference 
xStyleFamily(xStyleFamilies->getByName("PageStyles"), uno::UNO_QUERY);
 
-sal_Int16 nHeavenId = 
GetDoc()->getIDocumentDrawModelAccess().GetHeavenId();
-
 std::set aUsedPageStyles = lcl_getUsedPageStyles(this);
 for (const OUString& rPageStyleName : aUsedPageStyles)
 {
@@ -544,16 +539,16 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& 
rWatermark)
 uno::Reference xHeaderTextRight;
 
 xPageStyle->getPropertyValue(UNO_NAME_HEADER_TEXT) >>= xHeaderText;
-lcl_placeWatermarkInHeader(rWatermark, xModel, xPageStyle, 
xHeaderText, nHeavenId);
+lcl_placeWatermarkInHeader(rWatermark, xModel, xPageStyle, 
xHeaderText);
 
 xPageStyle->getPropertyValue(UNO_NAME_HEADER_TEXT_FIRST) >>= 
xHeaderTextFirst;
-lcl_placeWatermarkInHeader(rWatermark, xModel, xPageStyle, 
xHeaderTextFirst, nHeavenId);
+lcl_placeWatermarkInHeader(rWatermark, xModel, xPageStyle, 
xHeaderTextFirst);

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

2017-09-12 Thread Tamás Zolnai
 sc/inc/dpobject.hxx|2 
 sc/qa/unit/data/xls/pivottable_bool_field_filter.xls   |binary
 sc/qa/unit/data/xls/pivottable_date_field_filter.xls   |binary
 sc/qa/unit/data/xls/pivottable_double_field_filter.xls |binary
 sc/qa/unit/data/xls/pivottable_rowcolpage_field_filter.xls |binary
 sc/qa/unit/data/xls/pivottable_string_field_filter.xls |binary
 sc/qa/unit/subsequent_export-test.cxx  |  353 +
 sc/source/core/data/dpobject.cxx   |   18 
 sc/source/filter/excel/xepivot.cxx |   32 -
 sc/source/filter/excel/xipivot.cxx |   99 +++
 sc/source/filter/excel/xlpivot.cxx |   20 
 sc/source/filter/inc/xepivot.hxx   |   12 
 sc/source/filter/inc/xipivot.hxx   |6 
 sc/source/filter/inc/xlpivot.hxx   |9 
 14 files changed, 501 insertions(+), 50 deletions(-)

New commits:
commit 35f65ee050ee206e76f20e1a811177bc73972fa6
Author: Tamás Zolnai 
Date:   Sun Sep 10 14:16:09 2017 +0200

tdf#112278: Pivot table: filtering of non-string fields is not exported to 
XLS

It is needed to use the right string representation of field value.
During export this representation is available directly, next to
the actual value. During import we can use the number format attached
to the corresponding pivot field.

Reviewed-on: https://gerrit.libreoffice.org/42069
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 
(cherry picked from commit 7c429ddca63c09a2b656715292968000bfe86a1a)

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

diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 2f144c5c7786..8e4a5f6be3f6 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -179,6 +179,8 @@ public:
Rectangle& rPosRect, sal_uInt16& 
rOrient, long& rDimPos );
 boolIsFilterButton( const ScAddress& rPos );
 
+OUStringGetFormattedString( const OUString& rDimName, const 
double fValue );
+
 double GetPivotData(
 const OUString& rDataFieldName,
 std::vector& rFilters);
diff --git a/sc/qa/unit/data/xls/pivottable_bool_field_filter.xls 
b/sc/qa/unit/data/xls/pivottable_bool_field_filter.xls
new file mode 100755
index ..27bd838397ad
Binary files /dev/null and 
b/sc/qa/unit/data/xls/pivottable_bool_field_filter.xls differ
diff --git a/sc/qa/unit/data/xls/pivottable_date_field_filter.xls 
b/sc/qa/unit/data/xls/pivottable_date_field_filter.xls
new file mode 100755
index ..b579cf875570
Binary files /dev/null and 
b/sc/qa/unit/data/xls/pivottable_date_field_filter.xls differ
diff --git a/sc/qa/unit/data/xls/pivottable_double_field_filter.xls 
b/sc/qa/unit/data/xls/pivottable_double_field_filter.xls
new file mode 100755
index ..fe9988562042
Binary files /dev/null and 
b/sc/qa/unit/data/xls/pivottable_double_field_filter.xls differ
diff --git a/sc/qa/unit/data/xls/pivottable_rowcolpage_field_filter.xls 
b/sc/qa/unit/data/xls/pivottable_rowcolpage_field_filter.xls
new file mode 100755
index ..771b785c37ed
Binary files /dev/null and 
b/sc/qa/unit/data/xls/pivottable_rowcolpage_field_filter.xls differ
diff --git a/sc/qa/unit/data/xls/pivottable_string_field_filter.xls 
b/sc/qa/unit/data/xls/pivottable_string_field_filter.xls
new file mode 100755
index ..a4f730336cdd
Binary files /dev/null and 
b/sc/qa/unit/data/xls/pivottable_string_field_filter.xls differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 91e9a742ce42..2e0ecc0f1cd5 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -199,6 +199,11 @@ public:
 void testHiddenRepeatedRowsODS();
 void testHyperlinkTargetFrameODS();
 void testTdf112106();
+void testPivotTableDoubleFieldFilter();
+void testPivotTableStringFieldFilter();
+void testPivotTableDateFieldFilter();
+void testPivotTableBoolFieldFilter();
+void testPivotTableRowColPageFieldFilter();
 
 CPPUNIT_TEST_SUITE(ScExportTest);
 CPPUNIT_TEST(test);
@@ -298,6 +303,12 @@ public:
 CPPUNIT_TEST(testHyperlinkTargetFrameODS);
 
 CPPUNIT_TEST(testTdf112106);
+CPPUNIT_TEST(testPivotTableDoubleFieldFilter);
+CPPUNIT_TEST(testPivotTableStringFieldFilter);
+CPPUNIT_TEST(testPivotTableDateFieldFilter);
+CPPUNIT_TEST(testPivotTableBoolFieldFilter);
+CPPUNIT_TEST(testPivotTableRowColPageFieldFilter);
+
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -4251,6 +4262,348 @@ void ScExportTest::testTdf112106()
 xDocSh->DoClose();
 }
 
+void ScExportTest::testPivotTableDoubleFieldFilter()
+{
+ScDocShellRef xDocSh = loadDo

[Libreoffice-commits] core.git: writerperfect/Library_wpftwriter.mk writerperfect/qa writerperfect/source

2017-09-12 Thread Miklos Vajna
 writerperfect/Library_wpftwriter.mk|2 
 writerperfect/qa/unit/EPUBExportTest.cxx   |   11 +++
 writerperfect/qa/unit/data/writer/epubexport/list.fodt |   24 +++
 writerperfect/source/writer/exp/XMLTextListContext.cxx |   36 +++
 writerperfect/source/writer/exp/XMLTextListContext.hxx |   34 +++
 writerperfect/source/writer/exp/XMLTextListItemContext.cxx |   40 +
 writerperfect/source/writer/exp/XMLTextListItemContext.hxx |   34 +++
 writerperfect/source/writer/exp/xmltext.cxx|3 
 8 files changed, 184 insertions(+)

New commits:
commit c49fb2ffaf988b0f9a4480eba5960cc2de16797f
Author: Miklos Vajna 
Date:   Tue Sep 12 17:21:53 2017 +0200

EPUB export: handle list content

Minimal effort to not loose content, no actual list formatting yet.

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

diff --git a/writerperfect/Library_wpftwriter.mk 
b/writerperfect/Library_wpftwriter.mk
index 94ad9a868796..d3d2cc9a209b 100644
--- a/writerperfect/Library_wpftwriter.mk
+++ b/writerperfect/Library_wpftwriter.mk
@@ -79,6 +79,8 @@ $(eval $(call gb_Library_add_exception_objects,wpftwriter,\
writerperfect/source/writer/exp/XMLBase64ImportContext \
writerperfect/source/writer/exp/XMLSectionContext \
writerperfect/source/writer/exp/XMLTextFrameContext \
+   writerperfect/source/writer/exp/XMLTextListContext \
+   writerperfect/source/writer/exp/XMLTextListItemContext \
writerperfect/source/writer/exp/txtparai \
writerperfect/source/writer/exp/txtstyli \
writerperfect/source/writer/exp/xmlfmt \
diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx 
b/writerperfect/qa/unit/EPUBExportTest.cxx
index 706536c9423a..12f3c9d65f66 100644
--- a/writerperfect/qa/unit/EPUBExportTest.cxx
+++ b/writerperfect/qa/unit/EPUBExportTest.cxx
@@ -66,6 +66,7 @@ public:
 void testEscape();
 void testParaCharProps();
 void testSection();
+void testList();
 
 CPPUNIT_TEST_SUITE(EPUBExportTest);
 CPPUNIT_TEST(testOutlineLevel);
@@ -83,6 +84,7 @@ public:
 CPPUNIT_TEST(testEscape);
 CPPUNIT_TEST(testParaCharProps);
 CPPUNIT_TEST(testSection);
+CPPUNIT_TEST(testList);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -373,6 +375,15 @@ void EPUBExportTest::testSection()
 assertXPathContent(mpXmlDoc, "//xhtml:p[2]/xhtml:span", "In section.");
 }
 
+void EPUBExportTest::testList()
+{
+createDoc("list.fodt", {});
+
+mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
+// This was "C", i.e. in-list content was ignored.
+assertXPathContent(mpXmlDoc, "//xhtml:p[2]/xhtml:span", "B");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(EPUBExportTest);
 
 }
diff --git a/writerperfect/qa/unit/data/writer/epubexport/list.fodt 
b/writerperfect/qa/unit/data/writer/epubexport/list.fodt
new file mode 100644
index ..399ce78b2247
--- /dev/null
+++ b/writerperfect/qa/unit/data/writer/epubexport/list.fodt
@@ -0,0 +1,24 @@
+
+
+  
+
+
+  
+
+  
+
+  
+
+  
+  
+
+  A
+  
+
+  B
+
+  
+  C
+
+  
+
diff --git a/writerperfect/source/writer/exp/XMLTextListContext.cxx 
b/writerperfect/source/writer/exp/XMLTextListContext.cxx
new file mode 100644
index ..edfd7371b15e
--- /dev/null
+++ b/writerperfect/source/writer/exp/XMLTextListContext.cxx
@@ -0,0 +1,36 @@
+/* -*- 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/.
+ */
+
+#include "XMLTextListContext.hxx"
+
+#include "XMLTextListItemContext.hxx"
+
+using namespace com::sun::star;
+
+namespace writerperfect
+{
+namespace exp
+{
+
+XMLTextListContext::XMLTextListContext(XMLImport &rImport)
+: XMLImportContext(rImport)
+{
+}
+
+XMLImportContext *XMLTextListContext::CreateChildContext(const OUString 
&rName, const css::uno::Reference &/*xAttribs*/)
+{
+if (rName == "text:list-item")
+return new XMLTextListItemContext(mrImport);
+return nullptr;
+}
+
+} // namespace exp
+} // namespace writerperfect
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/exp/XMLTextListContext.hxx 
b/writerperfect/source/writer/exp/XMLTextListContext.hxx
new file mode 100644
index ..533257228fbb
--- /dev/null
+++ b/writerperfect/source/writer/exp/XMLTextListContext.hxx
@@ -0,0 +1,34 @@
+/* -*- 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 i

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

2017-09-12 Thread Mike Kaganski
 sw/qa/extras/ww8import/data/tdf112346.doc   |binary
 sw/qa/extras/ww8import/ww8import.cxx|8 ++
 sw/source/filter/ww8/ww8par.cxx |  103 +---
 sw/source/filter/ww8/ww8par.hxx |1 
 sw/source/filter/ww8/ww8par6.cxx|   14 ---
 writerfilter/source/dmapper/PropertyMap.cxx |   11 ++
 6 files changed, 97 insertions(+), 40 deletions(-)

New commits:
commit 21f73d47e949ef2732b778bd1ebe123473edf231
Author: Mike Kaganski 
Date:   Tue Sep 12 13:54:26 2017 +0300

tdf#112346: take Word no-wrap limit into account also for ww8

This also makes ww8 floating-table conversion decision heuristics
somewhat closer to OOXML code.

Change-Id: I29ca2ebabd1758ad98e02aaf560cf2f44daec3a8
Reviewed-on: https://gerrit.libreoffice.org/42196
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/42216
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/sw/qa/extras/ww8import/data/tdf112346.doc 
b/sw/qa/extras/ww8import/data/tdf112346.doc
new file mode 100644
index ..af0cca219acf
Binary files /dev/null and b/sw/qa/extras/ww8import/data/tdf112346.doc differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx 
b/sw/qa/extras/ww8import/ww8import.cxx
index 751006a4a553..eb45c8172e36 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -88,6 +88,14 @@ DECLARE_WW8IMPORT_TEST(testTdf106799, "tdf106799.doc")
 }
 }
 
+DECLARE_WW8IMPORT_TEST(testTdf112346, "tdf112346.doc")
+{
+uno::Reference xDrawPageSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xDrawPage = 
xDrawPageSupplier->getDrawPage();
+// This was 1, multi-page table was imported as a floating one.
+CPPUNIT_ASSERT_EQUAL(static_cast(0), xDrawPage->getCount());
+}
+
 // tests should only be added to ww8IMPORT *if* they fail round-tripping in 
ww8EXPORT
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 88f4f4f3d22c..45c22d149874 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -91,6 +91,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -2592,6 +2593,83 @@ void SwWW8ImplReader::EndSpecial()
 OSL_ENSURE(!m_nInTable, "unclosed table!");
 }
 
+bool SwWW8ImplReader::FloatingTableConversion(WW8PLCFx_Cp_FKP* pPap)
+{
+// This is ww8 version of the code deciding if the table needs to be
+// in a floating frame.
+// For OOXML code, see SectionPropertyMap::FloatingTableConversion in
+// writerfilter/source/dmapper/PropertyMap.cxx
+// The two should do ~same, so if you make changes here, please check
+// that the other is in sync.
+
+// Note that this is just a list of heuristics till sw core can have a
+// table that is floating and can span over multiple pages at the same
+// time.
+
+bool bResult = true;
+
+const sal_uInt8 *pRes = pPap->HasSprm(NS_sprm::LN_TDefTable);
+if (nullptr != pRes)
+{
+bResult = false;
+WW8TabBandDesc aDesc;
+aDesc.ReadDef(false, pRes);
+int nTextAreaWidth = m_aSectionManager.GetTextAreaWidth();
+int nTableWidth = aDesc.nCenter[aDesc.nWwCols] - aDesc.nCenter[0];
+
+// It seems Word has a limit here, so that in case the table width is 
quite
+// close to the text area width, then it won't perform a wrapping, 
even in
+// case the content (e.g. an empty paragraph) would fit. The magic 
constant
+// here represents this limit.
+const int nMagicNumber = 469;
+
+// If the table is wider than the text area, then don't create a fly
+// for the table: no wrapping will be performed anyway, but multi-page
+// tables will be broken.
+if ((nTableWidth + nMagicNumber) < nTextAreaWidth)
+bResult = true;
+
+// If there are columns, do create a fly, as the flow of the columns
+// would otherwise restrict the table.
+if (!bResult && (m_aSectionManager.CurrentSectionColCount() >= 2))
+bResult = true;
+}
+
+if (bResult)
+{
+WW8PLCFxSave1 aSave;
+pPap->Save(aSave);
+if (SearchTableEnd(pPap))
+{
+// Table is considered to be imported into a fly frame and we
+// know where the end of the table is.
+bool bIsUnicode;
+WW8_FC nFc = m_pSBase->WW8Cp2Fc(pPap->Where(), &bIsUnicode);
+sal_uInt64 nPos = m_pStrm->Tell();
+m_pStrm->Seek(nFc);
+sal_uInt16 nUChar = 0;
+if (bIsUnicode)
+m_pStrm->ReadUInt16(nUChar);
+else
+{
+sal_uInt8 nChar = 0;
+m_pStrm->ReadUChar(nChar);
+nUChar = nChar;
+}
+m_pStrm->Seek(nPos);
+if (nUChar == 0xc)
+// The pap after t

Re: odf2xhtml (and other xslt filters) - tabs or spaces?

2017-09-12 Thread Jan Holesovsky
Hi Samuel,

Samuel Mehrbrodt píše v St 06. 09. 2017 v 14:16 +:

> Miklos suggested to convert all to 4 spaces instead as we do in C++
> code.The downside is that converting to spaces touches almost all
> lines,
> while this touches only a few.
> 
> Are there any opinions on this?

I'd agree with Miklos.  It's true that git blame is less useful then,
but we are doing large cleanups all over the place anyway, so I don't
think a larger diff is a huge problem.

But about the filter in general - please, what are the features that
the xhtml export filter can do that our 'normal' html filter cannot?

I wonder, rather than debugging / writing xslt, wouldn't it be better
to extend our html export so that it can generate xhtml if asked to (we
already fulfill many of the requirements there anyway - seems to me),
and kill the xslt filter? ;-)

All the best,
Kendy
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/borderline3' - drawinglayer/source include/drawinglayer include/svx svx/source sw/source

2017-09-12 Thread Armin Le Grand
 drawinglayer/source/primitive2d/borderlineprimitive2d.cxx  |  112 ++
 include/drawinglayer/primitive2d/borderlineprimitive2d.hxx |7 
 include/svx/framelink.hxx  |   59 ---
 svx/source/dialog/framelink.cxx|   88 ++--
 svx/source/dialog/framelinkarray.cxx   |  114 --
 svx/source/table/viewcontactoftableobj.cxx |   22 -
 sw/source/core/layout/paintfrm.cxx |  235 +
 7 files changed, 292 insertions(+), 345 deletions(-)

New commits:
commit 1679a909e383c689cc4af9b699baf0d5a165c281
Author: Armin Le Grand 
Date:   Tue Sep 12 17:28:54 2017 +0200

borderline: merge redefined, mirrored Styles

Redefined merge of BorderlinePrimitives, removed old Writer
stuff for it. Also added support for handling Styles mirrored
for extension calculations

Change-Id: Icee5540573c294d3e6c1b98c55e6dda67a82cc16

diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx 
b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
index 9421ed8b249b..5fc3b57fbbda 100644
--- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
@@ -144,7 +144,7 @@ namespace drawinglayer
 
 for(const auto& candidate : maBorderLines)
 {
-const double 
fWidth(candidate.getAdaptedWidth(mfSmallestAllowedDiscreteGapDistance) * 0.5);
+const double 
fWidth(candidate.getAdaptedWidth(mfSmallestAllowedDiscreteGapDistance));
 
 if(!candidate.isGap())
 {
@@ -369,6 +369,116 @@ namespace drawinglayer
 // provide unique ID
 ImplPrimitive2DIDBlock(BorderLinePrimitive2D, 
PRIMITIVE2D_ID_BORDERLINEPRIMITIVE2D)
 
+Primitive2DReference tryMergeBorderLinePrimitive2D(
+const Primitive2DReference& rCandidateA,
+const Primitive2DReference& rCandidateB)
+{
+// try to cast to BorderLinePrimitive2D
+const primitive2d::BorderLinePrimitive2D* pCandidateA = 
dynamic_cast< const primitive2d::BorderLinePrimitive2D* >(rCandidateA.get());
+const primitive2d::BorderLinePrimitive2D* pCandidateB = 
dynamic_cast< const primitive2d::BorderLinePrimitive2D* >(rCandidateB.get());
+
+// we need a comparable BorderLinePrimitive2D
+if(nullptr == pCandidateA || nullptr == pCandidateB)
+{
+return Primitive2DReference();
+}
+
+// start of candidate has to match end of this
+if(!pCandidateA->getEnd().equal(pCandidateB->getStart()))
+{
+return Primitive2DReference();
+}
+
+// candidate A needs a length
+if(pCandidateA->getStart().equal(pCandidateA->getEnd()))
+{
+return Primitive2DReference();
+}
+
+// candidate B needs a length
+if(pCandidateB->getStart().equal(pCandidateB->getEnd()))
+{
+return Primitive2DReference();
+}
+
+// StrokeAttribute has to be equal
+if(!(pCandidateA->getStrokeAttribute() == 
pCandidateB->getStrokeAttribute()))
+{
+return Primitive2DReference();
+}
+
+// direction has to be equal -> cross product == 0.0
+const basegfx::B2DVector aVT(pCandidateA->getEnd() - 
pCandidateA->getStart());
+const basegfx::B2DVector aVC(pCandidateB->getEnd() - 
pCandidateB->getStart());
+if(!rtl::math::approxEqual(0.0, aVC.cross(aVT)))
+{
+return Primitive2DReference();
+}
+
+// number BorderLines has to be equal
+const size_t count(pCandidateA->getBorderLines().size());
+if(count != pCandidateB->getBorderLines().size())
+{
+return Primitive2DReference();
+}
+
+for(size_t a(0); a < count; a++)
+{
+const BorderLine& rBT(pCandidateA->getBorderLines()[a]);
+const BorderLine& rBC(pCandidateB->getBorderLines()[a]);
+
+// LineAttribute has to be the same
+if(!(rBC.getLineAttribute() == rBT.getLineAttribute()))
+{
+return Primitive2DReference();
+}
+
+// isGap has to be the same
+if(rBC.isGap() != rBT.isGap())
+{
+return Primitive2DReference();
+}
+
+if(!rBT.isGap())
+{
+// when not gap, the line extends have at least reach to 
the center ( > 0.0),
+// else there is a extend usage. When > 0.0 they just 
overlap, no problem
+if(rBT.getEndLeft() >= 0.0
+  

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

2017-09-12 Thread Miklos Vajna
 filter/source/config/fragments/filters/EPUB.xcu   |2 
 writerperfect/Library_wpftwriter.mk   |1 
 writerperfect/source/writer/EPUBExportUIComponent.cxx |   83 ++
 writerperfect/source/writer/EPUBExportUIComponent.hxx |   61 +
 writerperfect/source/writer/wpftwriter.component  |4 
 5 files changed, 150 insertions(+), 1 deletion(-)

New commits:
commit e6746a005419235d20074d696a1f8fadbda0a003
Author: Miklos Vajna 
Date:   Tue Sep 12 14:07:07 2017 +0200

EPUB export: initial UI component

EPUBExportUIComponent::execute() still needs to launch an actual dialog,
but otherwise it has enough functionality that only tweaking
maFilterData is necessary in the UNO component to pass custom filter
options to the exporter.

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

diff --git a/filter/source/config/fragments/filters/EPUB.xcu 
b/filter/source/config/fragments/filters/EPUB.xcu
index 49d8020b0d39..8ec0da9cdd37 100644
--- a/filter/source/config/fragments/filters/EPUB.xcu
+++ b/filter/source/config/fragments/filters/EPUB.xcu
@@ -17,7 +17,7 @@
 -->
 
 EXPORT ALIEN 
3RDPARTYFILTER
-
+com.sun.star.comp.Writer.EPUBExportUIComponent
 com.sun.star.comp.Writer.EPUBExportFilter
 EPUB
 
diff --git a/writerperfect/Library_wpftwriter.mk 
b/writerperfect/Library_wpftwriter.mk
index 826ffe600e12..94ad9a868796 100644
--- a/writerperfect/Library_wpftwriter.mk
+++ b/writerperfect/Library_wpftwriter.mk
@@ -69,6 +69,7 @@ $(eval $(call gb_Library_add_exception_objects,wpftwriter,\
writerperfect/source/writer/AbiWordImportFilter \
writerperfect/source/writer/EBookImportFilter \
writerperfect/source/writer/EPUBExportFilter \
+   writerperfect/source/writer/EPUBExportUIComponent \
writerperfect/source/writer/EPUBPackage \
writerperfect/source/writer/MSWorksImportFilter \
writerperfect/source/writer/MWAWImportFilter \
diff --git a/writerperfect/source/writer/EPUBExportUIComponent.cxx 
b/writerperfect/source/writer/EPUBExportUIComponent.cxx
new file mode 100644
index ..40ecea56262d
--- /dev/null
+++ b/writerperfect/source/writer/EPUBExportUIComponent.cxx
@@ -0,0 +1,83 @@
+/* -*- 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/.
+ */
+
+#include "EPUBExportUIComponent.hxx"
+
+#include 
+
+#include 
+#include 
+
+using namespace com::sun::star;
+
+namespace writerperfect
+{
+
+EPUBExportUIComponent::EPUBExportUIComponent(const 
uno::Reference &/*xContext*/)
+{
+}
+
+uno::Sequence EPUBExportUIComponent::getPropertyValues()
+{
+maMediaDescriptor["FilterData"] <<= 
maFilterData.getAsConstPropertyValueList();
+return maMediaDescriptor.getAsConstPropertyValueList();
+}
+
+void EPUBExportUIComponent::setPropertyValues(const 
uno::Sequence &rProperties)
+{
+maMediaDescriptor.clear();
+maMediaDescriptor << rProperties;
+auto it = maMediaDescriptor.find("FilterData");
+if (it != maMediaDescriptor.end())
+{
+uno::Sequence aFilterData;
+if (it->second >>= aFilterData)
+{
+maFilterData.clear();
+maFilterData << aFilterData;
+}
+}
+}
+
+OUString EPUBExportUIComponent::getImplementationName()
+{
+return OUString("com.sun.star.comp.Writer.EPUBExportUIComponent");
+}
+
+sal_Bool EPUBExportUIComponent::supportsService(const OUString &rServiceName)
+{
+return cppu::supportsService(this, rServiceName);
+}
+
+uno::Sequence EPUBExportUIComponent::getSupportedServiceNames()
+{
+uno::Sequence aRet =
+{
+OUString("com.sun.star.ui.dialogs.FilterOptionsDialog")
+};
+return aRet;
+}
+
+void EPUBExportUIComponent::setTitle(const OUString &/*rTitle*/)
+{
+}
+
+sal_Int16 EPUBExportUIComponent::execute()
+{
+return ui::dialogs::ExecutableDialogResults::OK;
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface *SAL_CALL 
com_sun_star_comp_Writer_EPUBExportUIComponent_get_implementation(uno::XComponentContext
 *pCtx, uno::Sequence const &)
+{
+return cppu::acquire(new EPUBExportUIComponent(pCtx));
+}
+
+} // namespace writerperfect
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/EPUBExportUIComponent.hxx 
b/writerperfect/source/writer/EPUBExportUIComponent.hxx
new file mode 100644
index ..f20adfd2d997
--- /dev/null
+++ b/writerperfect/source/writer/EPUBExportUIComponent.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is

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

2017-09-12 Thread Caolán McNamara
 vcl/unx/generic/printer/ppdparser.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit eed72e853d8800917ffd5cdc151e7103c49c9dac
Author: Caolán McNamara 
Date:   Tue Sep 12 16:14:14 2017 +0100

no CPDParser under Android

Change-Id: I3cf6df721f89493a527a0b65b24354d3e6135c68

diff --git a/vcl/unx/generic/printer/ppdparser.cxx 
b/vcl/unx/generic/printer/ppdparser.cxx
index 26315920ac2d..4efe108f5e9b 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -50,6 +50,9 @@
 #include 
 #endif
 
+#include 
+#include 
+
 namespace psp
 {
 class PPDTranslator
@@ -575,7 +578,9 @@ const PPDParser* PPDParser::getParser( const OUString& 
rFile )
 #endif
 } else if ( rMgr.getType() == PrinterInfoManager::Type::CPD )
 {
+#if ENABLE_DBUS && ENABLE_GIO
 pNewParser = 
const_cast(static_cast(rMgr).createCPDParser( aFile ));
+#endif
 }
 }
 if( pNewParser )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Eike Rathke
 i18nlangtag/qa/cppunit/test_languagetag.cxx|   51 +
 i18nlangtag/source/languagetag/languagetag.cxx |   34 
 2 files changed, 84 insertions(+), 1 deletion(-)

New commits:
commit 4f2a06379dde3839a71a52e81c2ca09aaa9a41c9
Author: Eike Rathke 
Date:   Tue Sep 12 16:57:20 2017 +0200

Unit tests for 'es_ES_u_co_trad' and 'es_ES_tradnl', tdf#83190

Change-Id: Iac2b892f3b3e4146101a99d1febb6110c83e56ed

diff --git a/i18nlangtag/qa/cppunit/test_languagetag.cxx 
b/i18nlangtag/qa/cppunit/test_languagetag.cxx
index e9ef5739fabd..fba1550c23a4 100644
--- a/i18nlangtag/qa/cppunit/test_languagetag.cxx
+++ b/i18nlangtag/qa/cppunit/test_languagetag.cxx
@@ -436,6 +436,57 @@ void TestLanguageTag::testAllTags()
 CPPUNIT_ASSERT_EQUAL( OUString("en"), en_GB_oxendict_Fallbacks[4]);
 }
 
+// 'es-ES-u-co-trad' is a valid (and known) Extension U tag
+{
+OUString s_es_ES_u_co_trad( "es-ES-u-co-trad" );
+LanguageTag es_ES_u_co_trad( s_es_ES_u_co_trad );
+lang::Locale aLocale = es_ES_u_co_trad.getLocale();
+CPPUNIT_ASSERT_EQUAL( s_es_ES_u_co_trad, es_ES_u_co_trad.getBcp47() );
+CPPUNIT_ASSERT_EQUAL( OUString("qlt"), aLocale.Language );
+CPPUNIT_ASSERT_EQUAL( OUString("ES"), aLocale.Country );
+CPPUNIT_ASSERT_EQUAL( s_es_ES_u_co_trad, aLocale.Variant );
+CPPUNIT_ASSERT_EQUAL( LANGUAGE_SPANISH_DATED, 
es_ES_u_co_trad.getLanguageType() );
+CPPUNIT_ASSERT( es_ES_u_co_trad.isValidBcp47() );
+CPPUNIT_ASSERT( !es_ES_u_co_trad.isIsoLocale() );
+CPPUNIT_ASSERT( !es_ES_u_co_trad.isIsoODF() );
+CPPUNIT_ASSERT_EQUAL( OUString("es"), 
es_ES_u_co_trad.getLanguageAndScript() );
+CPPUNIT_ASSERT_EQUAL( OUString("u-co-trad"), 
es_ES_u_co_trad.getVariants() );
+::std::vector< OUString > es_ES_u_co_trad_Fallbacks( 
es_ES_u_co_trad.getFallbackStrings( true));
+CPPUNIT_ASSERT_EQUAL( static_cast(4), 
es_ES_u_co_trad_Fallbacks.size() );
+CPPUNIT_ASSERT_EQUAL( OUString("es-ES-u-co-trad"), 
es_ES_u_co_trad_Fallbacks[0]);
+CPPUNIT_ASSERT_EQUAL( OUString("es-u-co-trad"), 
es_ES_u_co_trad_Fallbacks[1]);
+CPPUNIT_ASSERT_EQUAL( OUString("es-ES"), es_ES_u_co_trad_Fallbacks[2]);
+CPPUNIT_ASSERT_EQUAL( OUString("es"), es_ES_u_co_trad_Fallbacks[3]);
+// Map to broken MS.
+CPPUNIT_ASSERT_EQUAL( OUString("es-ES_tradnl"), 
es_ES_u_co_trad.getBcp47MS() );
+}
+
+// 'es-ES_tradnl' (broken MS) maps to 'es-ES-u-co-trad'
+{
+OUString s_es_ES_u_co_trad( "es-ES-u-co-trad" );
+OUString s_es_ES_tradnl( "es-ES_tradnl" );
+LanguageTag es_ES_tradnl( s_es_ES_tradnl );
+lang::Locale aLocale = es_ES_tradnl.getLocale();
+CPPUNIT_ASSERT_EQUAL( s_es_ES_u_co_trad, es_ES_tradnl.getBcp47() );
+CPPUNIT_ASSERT_EQUAL( OUString("qlt"), aLocale.Language );
+CPPUNIT_ASSERT_EQUAL( OUString("ES"), aLocale.Country );
+CPPUNIT_ASSERT_EQUAL( s_es_ES_u_co_trad, aLocale.Variant );
+CPPUNIT_ASSERT_EQUAL( LANGUAGE_SPANISH_DATED, 
es_ES_tradnl.getLanguageType() );
+CPPUNIT_ASSERT( es_ES_tradnl.isValidBcp47() );
+CPPUNIT_ASSERT( !es_ES_tradnl.isIsoLocale() );
+CPPUNIT_ASSERT( !es_ES_tradnl.isIsoODF() );
+CPPUNIT_ASSERT_EQUAL( OUString("es"), 
es_ES_tradnl.getLanguageAndScript() );
+CPPUNIT_ASSERT_EQUAL( OUString("u-co-trad"), 
es_ES_tradnl.getVariants() );
+::std::vector< OUString > es_ES_tradnl_Fallbacks( 
es_ES_tradnl.getFallbackStrings( true));
+CPPUNIT_ASSERT_EQUAL( static_cast(4), 
es_ES_tradnl_Fallbacks.size() );
+CPPUNIT_ASSERT_EQUAL( OUString("es-ES-u-co-trad"), 
es_ES_tradnl_Fallbacks[0]);
+CPPUNIT_ASSERT_EQUAL( OUString("es-u-co-trad"), 
es_ES_tradnl_Fallbacks[1]);
+CPPUNIT_ASSERT_EQUAL( OUString("es-ES"), es_ES_tradnl_Fallbacks[2]);
+CPPUNIT_ASSERT_EQUAL( OUString("es"), es_ES_tradnl_Fallbacks[3]);
+// Map back to broken MS.
+CPPUNIT_ASSERT_EQUAL( s_es_ES_tradnl, es_ES_tradnl.getBcp47MS() );
+}
+
 // 'zh-yue-HK' uses redundant 'zh-yue' and should be preferred 'yue-HK'
 #if 0
 /* XXX Disabled because liblangtag in lt_tag_canonicalize() after replacing
commit 82ee2ad282c3548e7ce6e745c8aee0db8b9b2201
Author: Eike Rathke 
Date:   Tue Sep 12 16:56:00 2017 +0200

Handle 'es-ES_tradnl' and 'es-ES-u-co-trad' as known, tdf#83190 follow-up

LanguageTagImpl::simpleExtract() needs to handle them because for known tags
mpImplLangtag is not used to extract language, country, region; which for 
the
malformed 'es-ES_tradnl' wouldn't work anyway.

Change-Id: I1efcf32e90e513d5af4624c7ae15848d1fe951a7

diff --git a/i18nlangtag/source/languagetag/languagetag.cxx 
b/i18nlangtag/source/languagetag/languagetag.cxx
index 684364ff1c81..c57514cbd977 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@

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

2017-09-12 Thread Caolán McNamara
 cui/source/options/optgdlg.cxx |   24 
 cui/source/options/optgdlg.hxx |2 --
 2 files changed, 26 deletions(-)

New commits:
commit 98034b25ee3a2d4b1a98a48c22b21ef2f7ec8b23
Author: Caolán McNamara 
Date:   Tue Sep 12 15:50:47 2017 +0100

down/up/focus/first/last handler not needed now

Change-Id: Ie8cb8e1bfb32669c2b4487f02d107b08c60b2399

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 9592e852b633..bba98cf6540c 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -288,12 +288,6 @@ OfaMiscTabPage::OfaMiscTabPage(vcl::Window* pParent, const 
SfxItemSet& rSet)
 m_aStrDateInfo = m_pToYearFT->GetText();
 m_pYearValueField->SetUseThousandSep(false);
 m_pYearValueField->SetModifyHdl( LINK( this, OfaMiscTabPage, TwoFigureHdl 
) );
-Link aLink = LINK( this, OfaMiscTabPage, 
TwoFigureConfigHdl );
-m_pYearValueField->SetDownHdl( aLink );
-m_pYearValueField->SetUpHdl( aLink );
-m_pYearValueField->SetLoseFocusHdl( LINK( this, OfaMiscTabPage, 
TwoFigureConfigFocusHdl ) );
-m_pYearValueField->SetFirstHdl( aLink );
-TwoFigureConfigHdl(*m_pYearValueField);
 
 SetExchangeSupport();
 }
@@ -389,14 +383,9 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
 
 const SfxPoolItem* pItem = nullptr;
 if ( SfxItemState::SET == rSet->GetItemState( SID_ATTR_YEAR2000, false, 
&pItem ) )
-{
 m_pYearValueField->SetValue( static_cast(pItem)->GetValue() );
-TwoFigureConfigHdl(*m_pYearValueField);
-}
 else
-{
 m_pYearFrame->Enable(false);
-}
 
 
m_pCollectUsageInfo->Check(officecfg::Office::Common::Misc::CollectUsageInformation::get());
 
m_pCollectUsageInfo->Enable(!officecfg::Office::Common::Misc::CollectUsageInformation::isReadOnly());
@@ -418,19 +407,6 @@ IMPL_LINK_NOARG( OfaMiscTabPage, TwoFigureHdl, Edit&, void 
)
 m_pToYearFT->SetText( aOutput );
 }
 
-IMPL_LINK( OfaMiscTabPage, TwoFigureConfigFocusHdl, Control&, rControl, void )
-{
-TwoFigureConfigHdl(static_cast(rControl));
-}
-IMPL_LINK( OfaMiscTabPage, TwoFigureConfigHdl, SpinField&, rEd, void )
-{
-sal_Int64 nNum = m_pYearValueField->GetValue();
-OUString aOutput(OUString::number(nNum));
-m_pYearValueField->SetText(aOutput);
-m_pYearValueField->SetSelection( Selection( 0, aOutput.getLength() ) );
-TwoFigureHdl( static_cast(rEd) );
-}
-
 class CanvasSettings
 {
 public:
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 7a7dd59accf9..d0255c31793c 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -59,8 +59,6 @@ private:
 VclPtr m_pCollectUsageInfo;
 
 DECL_LINK( TwoFigureHdl, Edit&, void );
-DECL_LINK( TwoFigureConfigHdl, SpinField&, void );
-DECL_LINK( TwoFigureConfigFocusHdl, Control&, void );
 protected:
 virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet ) override;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Caolán McNamara
 cui/source/options/optgdlg.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit c8aedac356326745c69d6a458b23ca45ab25f28a
Author: Caolán McNamara 
Date:   Tue Sep 12 15:44:28 2017 +0100

disable thousand separator for this year spinfield

and then the manual removal of ,|. is unnecessary

Change-Id: I40d96beb895f815bb7aad9c0f36c3722b614f9a2

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index a9b74a538b33..9592e852b633 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -286,6 +286,7 @@ OfaMiscTabPage::OfaMiscTabPage(vcl::Window* pParent, const 
SfxItemSet& rSet)
 }
 
 m_aStrDateInfo = m_pToYearFT->GetText();
+m_pYearValueField->SetUseThousandSep(false);
 m_pYearValueField->SetModifyHdl( LINK( this, OfaMiscTabPage, TwoFigureHdl 
) );
 Link aLink = LINK( this, OfaMiscTabPage, 
TwoFigureConfigHdl );
 m_pYearValueField->SetDownHdl( aLink );
@@ -406,10 +407,6 @@ IMPL_LINK_NOARG( OfaMiscTabPage, TwoFigureHdl, Edit&, void 
)
 {
 OUString aOutput( m_aStrDateInfo );
 OUString aStr( m_pYearValueField->GetText() );
-OUString sSep( SvtSysLocale().GetLocaleData().getNumThousandSep() );
-sal_Int32 nIndex = 0;
-while ((nIndex = aStr.indexOf( sSep, nIndex)) != -1)
-aStr = aStr.replaceAt( nIndex, sSep.getLength(), "");
 sal_Int32 nNum = aStr.toInt32();
 if ( aStr.getLength() != 4 || nNum < m_pYearValueField->GetMin() || nNum > 
m_pYearValueField->GetMax() )
 aOutput += "";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - officecfg/registry

2017-09-12 Thread Yousuf Philips
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bb5a864f3b4aba6e5fb0ec5cc2617d94ab4d9c23
Author: Yousuf Philips 
Date:   Wed Sep 6 14:51:20 2017 +0400

tdf#95489 fix internal name for quotation character style

fix for a mistake in 9ab228fdd6efe9a7873e3de1bb2357531a79feac

Change-Id: I5b02bcea1ff82d615e0f991654968c8079c52303
Reviewed-on: https://gerrit.libreoffice.org/41986
Tested-by: Jenkins 
Reviewed-by: Aron Budea 

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 00cd8e237494..6f8043e58aab 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -2830,7 +2830,7 @@
   1
 
   
-  
+  
 
   ~Quotations
 
@@ -2860,7 +2860,7 @@
   ~Strong Emphasis
 
   
-  
+  
 
   Qu~otation
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Tamás Zolnai
 sc/qa/unit/data/xls/pivottable_page_field_filter.xls |binary
 sc/qa/unit/subsequent_export-test.cxx|   95 +++
 sc/source/filter/excel/xipivot.cxx   |   71 --
 sc/source/filter/inc/xipivot.hxx |4 
 4 files changed, 141 insertions(+), 29 deletions(-)

New commits:
commit 55a43f30a54816e13eb6704a8ec5952a63b01a64
Author: Tamás Zolnai 
Date:   Tue Sep 12 13:36:14 2017 +0200

tdf#112348: Pivot table: page field filtering is not imported from XLS

Change-Id: I3477cd17f679bdfefb9340656999630380713d3f
Reviewed-on: https://gerrit.libreoffice.org/42201
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 

diff --git a/sc/qa/unit/data/xls/pivottable_page_field_filter.xls 
b/sc/qa/unit/data/xls/pivottable_page_field_filter.xls
new file mode 100755
index ..4f8a3b8ab650
Binary files /dev/null and 
b/sc/qa/unit/data/xls/pivottable_page_field_filter.xls differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index afe46cdd2947..054f026d 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -217,6 +217,7 @@ public:
 void testPivotTableBoolFieldFilter();
 void testPivotTableRowColPageFieldFilter();
 void testPivotTableEmptyItem();
+void testPivotTablePageFieldFilter();
 
 CPPUNIT_TEST_SUITE(ScExportTest);
 CPPUNIT_TEST(test);
@@ -328,6 +329,7 @@ public:
 CPPUNIT_TEST(testPivotTableBoolFieldFilter);
 CPPUNIT_TEST(testPivotTableRowColPageFieldFilter);
 CPPUNIT_TEST(testPivotTableEmptyItem);
+CPPUNIT_TEST(testPivotTablePageFieldFilter);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -4738,6 +4740,99 @@ void ScExportTest::testPivotTableEmptyItem()
 xDocSh->DoClose();
 }
 
+void ScExportTest::testPivotTablePageFieldFilter()
+{
+ScDocShellRef xDocSh = loadDoc("pivottable_page_field_filter.", 
FORMAT_XLS);
+CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
+ScDocument& rDoc = xDocSh->GetDocument();
+ScDPCollection* pDPs = rDoc.GetDPCollection();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pDPs->GetCount());
+
+// Reload and check filtering of row dimensions
+xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLS);
+CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
+ScDocument& rLoadedDoc = xDocSh->GetDocument();
+pDPs = rLoadedDoc.GetDPCollection();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pDPs->GetCount());
+const ScDPObject* pDPObj = &(*pDPs)[0];
+CPPUNIT_ASSERT(pDPObj);
+ScDPSaveData* pSaveData = pDPObj->GetSaveData();
+CPPUNIT_ASSERT(pSaveData);
+
+// Only one item is selected (an empty item)
+{
+ScDPSaveDimension* pSaveDim = 
pSaveData->GetExistingDimensionByName("Product");
+CPPUNIT_ASSERT(pSaveDim);
+const ScDPSaveDimension::MemberList& rMembers = pSaveDim->GetMembers();
+CPPUNIT_ASSERT_EQUAL(size_t(3), rMembers.size());
+ScDPSaveMember* pMember = pSaveDim->GetExistingMemberByName("Banana");
+CPPUNIT_ASSERT(pMember);
+CPPUNIT_ASSERT(pMember->HasIsVisible() && !pMember->GetIsVisible());
+pMember = pSaveDim->GetExistingMemberByName("Carrots");
+CPPUNIT_ASSERT(pMember);
+CPPUNIT_ASSERT(pMember->HasIsVisible() && !pMember->GetIsVisible());
+pMember = pSaveDim->GetExistingMemberByName("");
+CPPUNIT_ASSERT(pMember);
+CPPUNIT_ASSERT(pMember->HasIsVisible() && pMember->GetIsVisible());
+}
+
+// More items are selected, but not all
+{
+ScDPSaveDimension* pSaveDim = 
pSaveData->GetExistingDimensionByName("Category");
+CPPUNIT_ASSERT(pSaveDim);
+
+const ScDPSaveDimension::MemberList& rMembers = pSaveDim->GetMembers();
+CPPUNIT_ASSERT_EQUAL(size_t(3), rMembers.size());
+ScDPSaveMember* pMember = 
pSaveDim->GetExistingMemberByName("Vegetables");
+CPPUNIT_ASSERT(pMember);
+CPPUNIT_ASSERT(pMember->HasIsVisible() && !pMember->GetIsVisible());
+pMember = pSaveDim->GetExistingMemberByName("Fruit");
+CPPUNIT_ASSERT(pMember);
+CPPUNIT_ASSERT(pMember->HasIsVisible() && pMember->GetIsVisible());
+pMember = pSaveDim->GetExistingMemberByName("");
+CPPUNIT_ASSERT(pMember);
+CPPUNIT_ASSERT(pMember->HasIsVisible() && pMember->GetIsVisible());
+}
+
+// All items are selected
+{
+ScDPSaveDimension* pSaveDim = 
pSaveData->GetExistingDimensionByName("Order ID");
+CPPUNIT_ASSERT(pSaveDim);
+
+const ScDPSaveDimension::MemberList& rMembers = pSaveDim->GetMembers();
+CPPUNIT_ASSERT_EQUAL(size_t(3), rMembers.size());
+ScDPSaveMember* pMember = pSaveDim->GetExistingMemberByName("1");
+CPPUNIT_ASSERT(pMember);
+CPPUNIT_ASSERT(pMember->HasIsVisible() && pMember->GetIsVisible());
+pMember = pSaveDim->GetExistingMemberByName("2");
+CPPUNIT_ASSERT(pMember);
+ 

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

2017-09-12 Thread Szymon Kłos
 package/source/xstor/xstorage.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5ffa11a77369637f4f8698bbe0402fe1395e46b7
Author: Szymon Kłos 
Date:   Wed Sep 6 10:54:50 2017 +0200

tdf#108572 let remove storage element

void OStorage_Impl::RemoveElement( SotElement_Impl* pElement )
expects that m_pAntiImpl will be nullptr, if not throws an exception.
This caused that in case of deleting embedded database used for
mail merge it wasn't fully removed and it was impossible to import
the same datasource second time.

Change-Id: I0310fde2ad819c96474a857f37ee42d052fad266
Reviewed-on: https://gerrit.libreoffice.org/42028
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/42043
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/package/source/xstor/xstorage.cxx 
b/package/source/xstor/xstorage.cxx
index 68f47a89db85..d0c470e55ebf 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -3046,6 +3046,8 @@ void SAL_CALL OStorage::removeElement( const OUString& 
aElementName )
 if ( !pElement )
 throw container::NoSuchElementException( THROW_WHERE ); //???
 
+if ( pElement->m_pStorage )
+pElement->m_pStorage->m_pAntiImpl = nullptr;
 m_pImpl->RemoveElement( pElement );
 
 m_pImpl->m_bIsModified = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Szymon Kłos
 sw/source/filter/ww8/wrtw8esh.cxx |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 60ba6063a2a9063ba1bd39ceb322d613d2129628
Author: Szymon Kłos 
Date:   Thu Sep 7 13:48:01 2017 +0200

tdf#112247 correct the size only for Watermark

Change-Id: I770cd36d5f8bca0f2fa97b7ad4afaaf539bf5f1f
Reviewed-on: https://gerrit.libreoffice.org/42052
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 91d909ac8ec53ea135401babe8227f9c41b779b8)
Reviewed-on: https://gerrit.libreoffice.org/42058
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sw/source/filter/ww8/wrtw8esh.cxx 
b/sw/source/filter/ww8/wrtw8esh.cxx
index a570f9e47a15..54f82b2071a7 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -692,12 +692,15 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
 {
 aRect = pObj->GetLogicRect();
 
-// We have to export original size with padding
-const SfxItemSet& rSet = pObj->GetMergedItemSet();
-long nHeight = aRect.GetHeight();
-if (const SdrMetricItem* pItem = static_cast(rSet.GetItem(SDRATTR_TEXT_UPPERDIST)))
-nHeight += pItem->GetValue();
-aRect.SetSize(Size(aRect.GetWidth(), nHeight));
+// We have to export Watermark original size with padding
+if (pObj->GetName().match("PowerPlusWaterMarkObject"))
+{
+const SfxItemSet& rSet = pObj->GetMergedItemSet();
+long nHeight = aRect.GetHeight();
+if (const SdrMetricItem* pItem = static_cast(rSet.GetItem(SDRATTR_TEXT_UPPERDIST)))
+nHeight += pItem->GetValue();
+aRect.SetSize(Size(aRect.GetWidth(), nHeight));
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Stephan Bergmann
 vcl/unx/generic/printer/ppdparser.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1ded401b3f8597153420f5691eaa3d4f082e179e
Author: Stephan Bergmann 
Date:   Tue Sep 12 15:03:58 2017 +0200

loplugin:unnecessaryparen

Change-Id: I6fe1690b6f66e31753da993a256b7586478ef4f1

diff --git a/vcl/unx/generic/printer/ppdparser.cxx 
b/vcl/unx/generic/printer/ppdparser.cxx
index 3f9a0d131677..26315920ac2d 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -642,7 +642,7 @@ PPDParser::PPDParser( const OUString& rFile, 
std::vector keys) :
 aBuf.append( PWG_TO_POINTS(pPWGMedia -> length) );
 if ( pPaperDimensionValue )
 pPaperDimensionValue->m_aValue = aBuf.makeStringAndClear();
-if ((aValueName).equals(pKey -> getDefaultValue() -> 
m_aOption)) {
+if (aValueName.equals(pKey -> getDefaultValue() -> m_aOption)) 
{
 pImageableAreas -> m_pDefaultValue = pImageableAreaValue;
 pPaperDimensions -> m_pDefaultValue = pPaperDimensionValue;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Christian Lohmaier
 check.php |   74 +++---
 1 file changed, 37 insertions(+), 37 deletions(-)

New commits:
commit 8449883a119bc3bfba91af93d517bd58f3c40a0d
Author: Christian Lohmaier 
Date:   Tue Sep 12 15:03:04 2017 +0200

use https URLs

diff --git a/check.php b/check.php
index f8cfb16..bbc69c5 100644
--- a/check.php
+++ b/check.php
@@ -65,43 +65,43 @@ function get_update_info($agent=null) {
 
 # Localization of the URLs
 $localize_map = array(
-'http://www.libreoffice.org/download/' => array(
-'cs' => 'http://cs.libreoffice.org/stahnout/',
-'da' => 'http://da.libreoffice.org/hent-libreoffice/',
-'de' => 'http://de.libreoffice.org/download/',
-'eo' => 'http://eo.libreoffice.org/elsxuti/',
-'es' => 'http://es.libreoffice.org/descarga/',
-'fi' => 'http://fi.libreoffice.org/lataa/',
-'fr' => 'http://fr.libreoffice.org/telecharger/',
-'ga' => 'http://ga.libreoffice.org/iosluchtu/',
-'gd' => 'http://gd.libreoffice.org/faigh-e/',
-'hu' => 'http://hu.libreoffice.org/letoeltes/',
-'it' => 'http://it.libreoffice.org/download/',
-'ja' => 'http://ja.libreoffice.org/download/',
-'lt' => 'http://lt.libreoffice.org/parsisiuntimas/',
-'nl' => 'http://nl.libreoffice.org/download/',
-'pt' => 'http://pt.libreoffice.org/transferir-e-instalar/',
-'pt-br' => 
'http://pt-br.libreoffice.org/baixe-ja-o-libreoffice-em-portugues-do-brasil/',
-'sl' => 'http://sl.libreoffice.org/prenosi/',
-'zh-tw' => 'http://zh-tw.libreoffice.org/download/',
+'https://www.libreoffice.org/download/' => array(
+'cs' => 'https://cs.libreoffice.org/stahnout/',
+'da' => 'https://da.libreoffice.org/hent-libreoffice/',
+'de' => 'https://de.libreoffice.org/download/',
+'eo' => 'https://eo.libreoffice.org/elsxuti/',
+'es' => 'https://es.libreoffice.org/descarga/',
+'fi' => 'https://fi.libreoffice.org/lataa/',
+'fr' => 'https://fr.libreoffice.org/telecharger/',
+'ga' => 'https://ga.libreoffice.org/iosluchtu/',
+'gd' => 'https://gd.libreoffice.org/faigh-e/',
+'hu' => 'https://hu.libreoffice.org/letoeltes/',
+'it' => 'https://it.libreoffice.org/download/',
+'ja' => 'https://ja.libreoffice.org/download/',
+'lt' => 'https://lt.libreoffice.org/parsisiuntimas/',
+'nl' => 'https://nl.libreoffice.org/download/',
+'pt' => 'https://pt.libreoffice.org/transferir-e-instalar/',
+'pt-br' => 
'https://pt-br.libreoffice.org/baixe-ja-o-libreoffice-em-portugues-do-brasil/',
+'sl' => 'https://sl.libreoffice.org/prenosi/',
+'zh-tw' => 'https://zh-tw.libreoffice.org/download/',
 ),
-'http://www.libreoffice.org/download/pre-releases/' => array(
-'da' => 'http://da.libreoffice.org/hent-libreoffice/test/',
-'de' => 'http://de.libreoffice.org/download/testversionen/',
-'es' => 'http://es.libreoffice.org/descarga/pre-lanzamientos/',
-'fi' => 'http://fi.libreoffice.org/lataa/testiversioita/',
-'fr' => 'http://fr.libreoffice.org/telecharger/pre-versions/',
-'ga' => 'http://ga.libreoffice.org/iosluchtu/reamhleagan/',
-'gd' => 'http://gd.libreoffice.org/faigh-e/deuchainn-lann/',
-'hu' => 'http://hu.libreoffice.org/letoeltes/el-zetes-kiadasok/',
-'it' => 'http://it.libreoffice.org/download/pre-release/',
-'ja' => 'http://ja.libreoffice.org/download/pre-releases/',
-'lt' => 
'http://lt.libreoffice.org/parsisiuntimas/testuojamosios-versijos/',
-'nl' => 'http://nl.libreoffice.org/download/pre-releases/',
-'pt' => 'http://pt.libreoffice.org/pre-lancamentos/',
-'pt-br' => 
'http://pt-br.libreoffice.org/baixe-ja-o-libreoffice-em-portugues-do-brasil/prelancamento/',
-'sl' => 'http://sl.libreoffice.org/prenosi/prenosi-poskusnih-gradenj/',
-'zh-tw' => 'http://zh-tw.libreoffice.org/download/pre-releases/',
+'https://www.libreoffice.org/download/pre-releases/' => array(
+'da' => 'https://da.libreoffice.org/hent-libreoffice/test/',
+'de' => 'https://de.libreoffice.org/download/testversionen/',
+'es' => 'https://es.libreoffice.org/descarga/pre-lanzamientos/',
+'fi' => 'https://fi.libreoffice.org/lataa/testiversioita/',
+'fr' => 'https://fr.libreoffice.org/telecharger/pre-versions/',
+'ga' => 'https://ga.libreoffice.org/iosluchtu/reamhleagan/',
+'gd' => 'https://gd.libreoffice.org/faigh-e/deuchainn-lann/',
+'hu' => 'https://hu.libreoffice.org/letoeltes/el-zetes-kiadasok/',
+'it' => 'https://it.libreoffice.org/download/pre-release/',
+'ja' => 'https://ja.libreoffice.org/download/pre-releases/',
+'lt' => 
'https://lt.libreoffice.org/parsisiuntimas/testuojamosios-versijos/',
+'nl' => 'https://nl.libreoffice.org/download/pre-releases/',
+

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

2017-09-12 Thread Christian Lohmaier
 check.php |   34 ++
 1 file changed, 26 insertions(+), 8 deletions(-)

New commits:
commit 344f1181ec3c627f73d612fae36056eb9c5e77e9
Author: Christian Lohmaier 
Date:   Tue Sep 12 15:00:29 2017 +0200

enable update for 5.3.6 and 5.4.1

diff --git a/check.php b/check.php
index bbb6a88..f8cfb16 100644
--- a/check.php
+++ b/check.php
@@ -482,6 +482,24 @@ $build_hash_to_version = array(
 # 5.3.4
 '1b1606c6e1203cdc3fd5ffbc16e74ecea300241a' => '5.3.4.1',
 'f82d347ccc0be322489bf7da61d7e4ad13fe2ff3' => '5.3.4.2', # Final
+# 5.3.5
+'020db1aa8142e57290f8a21e4df31185392d0e38' => '5.3.5.1',
+'50d9bf2b0a79cdb85a3814b592608037a682059d' => '5.3.5.2', # Final
+# 5.3.6
+'686f202eff87ef707079aeb7f485847613344eb7' => '5.3.6.1', # Final, to fix 
translation issues in 5.3.5
+
+##
+# 5.4.0 versions
+'0b9f9bef65bb21ebb6a64aafad448f7f62dc824a' => '5.4.0.0.a1', # alpha1
+'8672113ead4e403c55e31b1d9a3d1e0f3b299577' => '5.4.0.0.b1', # beta1
+'3cc1cdd8ee50f144e5514da51800a08119754d8f' => '5.4.0.0.b2', # beta2
+'962a9c4e2f56d1dbdd354b1becda28edd471f4f2' => '5.4.0.1', # rc1
+'2b906d450a44f2bbe506dcd22c51b3fa11dc65fd' => '5.4.0.2', # rc2
+'92c2794a7c181ba4c1c5053618179937228ed1fb' => '5.4.0.3', # rc3
+'7556cbc6811c9d992f4064ab9287069087d7f62c' => '5.4.0.3', # hotfix1, Final
+# 5.4.1
+'a5be49f0c45fe24a575c7f41559aa8fc79a781a2' => '5.4.1.1',
+'ea7cb86e6eeb2bf3a5af73a8fac570321527' => '5.4.1.2', # Final
 );
 
 # Descriptions of the target versions
@@ -494,17 +512,17 @@ $build_hash_to_version = array(
 #   where '' and '' will be substitued with the right value
 #   NOTE: '&' in the URL has to be escaped as &
 $update_map = array(
-'stable' => array('gitid'   => 
'f82d347ccc0be322489bf7da61d7e4ad13fe2ff3',
-  'id'  => 'LibreOffice 5.3.4',
-  'version' => '5.3.4',
+'stable' => array('gitid'   => 
'686f202eff87ef707079aeb7f485847613344eb7',
+  'id'  => 'LibreOffice 5.3.6',
+  'version' => '5.3.6',
   'update_type' => 'text/html',
-  'update_src'  => 
'https://www.libreoffice.org/download/download/?type=&lang=&version=5.3.4',
+  'update_src'  => 
'https://www.libreoffice.org/download/download/?type=&lang=&version=5.3.6',
   'substitute'  => true ),
-'latest' => array('gitid'   => 
'f82d347ccc0be322489bf7da61d7e4ad13fe2ff3',
-  'id'  => 'LibreOffice 5.3.4',
-  'version' => '5.3.4',
+'latest' => array('gitid'   => 
'ea7cb86e6eeb2bf3a5af73a8fac570321527',
+  'id'  => 'LibreOffice 5.4.1',
+  'version' => '5.4.1',
   'update_type' => 'text/html',
-  'update_src'  => 
'https://www.libreoffice.org/download/download/?type=&lang=&version=5.3.4',
+  'update_src'  => 
'https://www.libreoffice.org/download/download/?type=&lang=&version=5.4.1',
   'substitute'  => true ),
 );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Szymon Kłos
 sw/inc/dbmgr.hxx|9 +
 sw/source/uibase/app/apphdl.cxx |8 
 sw/source/uibase/dbui/dbmgr.cxx |   28 
 3 files changed, 45 insertions(+)

New commits:
commit cba9bce6936c31aa836763a4dd147ac3db2013bc
Author: Szymon Kłos 
Date:   Tue Sep 5 17:24:05 2017 +0200

tdf#108572 revoke connection if mail-merge is cancelled

Change-Id: Idca4969af8043f7dbc54f4a63b99e92155ef1585
Reviewed-on: https://gerrit.libreoffice.org/41949
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
(cherry picked from commit ba368643e6a0c5ac7a7b7ea8d72899d60b2a8331)
Reviewed-on: https://gerrit.libreoffice.org/42044
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 09a077200454..d4797b303e23 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -258,6 +258,9 @@ friend class SwConnectionDisposedListener_Impl;
 /// Name of the embedded database that's included in the current document.
 OUString m_sEmbeddedName;
 
+/// Store last registrations to revoke or commit
+static std::vector m_aUncommitedRegistrations;
+
 /// The document that owns this manager.
 SwDoc* m_pDoc;
 
@@ -478,6 +481,12 @@ public:
 SwDoc* getDoc() const;
 /// Stop reacting to removed database registrations.
 void releaseRevokeListener();
+
+/// Revoke not commited registrations in case of mail merge cancel
+void RevokeLastRegistrations();
+
+/// Accept not commited registrations
+static void CommitLastRegistrations();
 };
 
 #endif
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 5abd1de7c9fa..0b029e6e5a04 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -489,6 +489,8 @@ void SwMailMergeWizardExecutor::ExecutionFinished()
 if (xMMConfig)
 xMMConfig->Commit();
 
+SwDBManager::CommitLastRegistrations();
+
 // release/destroy asynchronously
 Application::PostUserEvent( LINK( this, SwMailMergeWizardExecutor, 
DestroyDialogHdl ) );
 }
@@ -661,6 +663,12 @@ IMPL_LINK_NOARG(SwMailMergeWizardExecutor, CancelHdl, 
void*, void)
 xMMConfig->Commit();
 }
 
+// Revoke created connections
+SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
+SwDBManager* pDbManager = pDoc->GetDBManager();
+if (pDbManager)
+pDbManager->RevokeLastRegistrations();
+
 m_pWizard.disposeAndClear();
 release();
 }
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 876f4c22166a..410fb02e6ade 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -165,6 +165,8 @@ void lcl_emitEvent(sal_uInt16 nEventId, sal_Int32 nStrId, 
SfxObjectShell* pDocSh
 
 }
 
+std::vector SwDBManager::m_aUncommitedRegistrations;
+
 enum class SwDBNextRecord { NEXT, FIRST };
 static bool lcl_ToNextRecord( SwDSParam* pParam, const SwDBNextRecord action = 
SwDBNextRecord::NEXT );
 
@@ -2624,6 +2626,8 @@ OUString 
SwDBManager::LoadAndRegisterDataSource(SwDocShell* pDocShell)
 aSettings.set( uno::Reference < beans::XPropertySet >( 
xSettingsDlg, uno::UNO_QUERY_THROW ) );
 }
 sFind = LoadAndRegisterDataSource( type, aURLAny, DBCONN_FLAT == type 
? &aSettings : nullptr, aURI, nullptr, nullptr, pDocShell );
+
+m_aUncommitedRegistrations.push_back(sFind);
 }
 return sFind;
 }
@@ -3200,4 +3204,28 @@ std::shared_ptr 
SwDBManager::PerformMailMerge(SwView* pVi
 return xConfigItem;
 }
 
+void SwDBManager::RevokeLastRegistrations()
+{
+if (m_aUncommitedRegistrations.size())
+{
+SwView* pView = m_pDoc->GetDocShell()->GetView();
+std::shared_ptr xConfigItem = 
pView->GetMailMergeConfigItem();
+if (xConfigItem)
+{
+xConfigItem->DisposeResultSet();
+xConfigItem->DocumentReloaded();
+}
+
+for (const OUString& rName : m_aUncommitedRegistrations)
+RevokeDataSource(rName);
+
+m_aUncommitedRegistrations.clear();
+}
+}
+
+void SwDBManager::CommitLastRegistrations()
+{
+m_aUncommitedRegistrations.clear();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Tamás Zolnai
 sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt |binary
 sw/qa/extras/odfexport/odfexport.cxx |6 ++
 sw/qa/extras/ooxmlexport/data/tdf112169.odt  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx|5 +
 sw/source/core/unocore/unostyle.cxx  |7 ++-
 sw/source/filter/ww8/ww8atr.cxx  |4 +++-
 6 files changed, 20 insertions(+), 2 deletions(-)

New commits:
commit e3312f41fb70f91e31878e2bb9ccbfbf7e917eea
Author: Tamás Zolnai 
Date:   Sun Sep 3 14:56:48 2017 +0200

tdf#112169: Crash while saving character background color to DOCX

Reviewed-on: https://gerrit.libreoffice.org/41857
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 
(cherry picked from commit 242688f3b4fc7228637837e0f4fec3da71ac2710)

Reviewed-on: https://gerrit.libreoffice.org/41867
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit 9b3e2486d8e96b6fdd844fbdb5fa59c7782e82ee)

Change-Id: Iff12b9587b639166caef86f895fb841e83596817

diff --git a/sw/qa/extras/ooxmlexport/data/tdf112169.odt 
b/sw/qa/extras/ooxmlexport/data/tdf112169.odt
new file mode 100755
index ..51bb97f2e1e8
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf112169.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 629aa01a9cb6..55f6e3ab3481 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -570,6 +570,11 @@ DECLARE_OOXMLEXPORT_TEST(testWatermarkLayer, 
"watermark-layer.docx")
 CPPUNIT_ASSERT_EQUAL(static_cast(1), pObject->GetLayer());
 }
 
+DECLARE_OOXMLEXPORT_TEST(tdf112169, "tdf112169.odt")
+{
+// LO crashed while export because of chararacter background color handling
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 1e0b84710215..3f01f95fc36d 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -5172,8 +5172,10 @@ void AttributeOutputBase::CharBackgroundBase( const 
SvxBrushItem& rBrush )
 bool bHasShadingMarker = false;
 
 // Check shading marker
+const SfxPoolItem* pItem = GetExport().HasItem(RES_CHRATR_GRABBAG);
+if( pItem )
 {
-const SfxGrabBagItem& aGrabBag = static_cast< const SfxGrabBagItem& >( 
GetExport().GetItem( RES_CHRATR_GRABBAG ) );
+const SfxGrabBagItem aGrabBag = static_cast< const SfxGrabBagItem& 
>(*pItem);
 const std::map& rMap = aGrabBag.GetGrabBag();
 auto aIterator = rMap.find("CharShadingMarker");
 if( aIterator != rMap.end() )
commit 267b46d4c6052152f2e7023e26bb21670869743c
Author: Justin Luth 
Date:   Thu Aug 24 15:48:29 2017 -0400

tdf#111891 unostyle: use default handler for non-page style

LO 5.1 commit 664197d95becd516c3dac25a50439078ba61e051
introduced a handler for RES_TEXT_VERT_ADJUST to handle
page styles, but that meant that the default handler
was no longer called for frames (the only other item
currently using RES_TEXT_VERT_ADJUST).

Change-Id: I33827160fe64dc4cc2107afc26f7ac2e698007e1
Reviewed-on: https://gerrit.libreoffice.org/41538
Tested-by: Justin Luth 
Reviewed-by: Justin Luth 
(cherry picked from commit 10dc371d31f003ac3ed9b89ca1db95d36603603f)
Reviewed-on: https://gerrit.libreoffice.org/41910
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 461aa995d75f031209711feda9d785d915c42dd2)
Reviewed-on: https://gerrit.libreoffice.org/42082
(cherry picked from commit db7a015c86248bd2a3d090240f9360f84b3bec8c)

diff --git a/sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt 
b/sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt
new file mode 100644
index ..8fcf98a6272b
Binary files /dev/null and 
b/sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index a5f456f4807f..b4c728b3302d 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -758,6 +758,12 @@ DECLARE_ODFEXPORT_TEST(testTextFrameVertAdjust, 
"textframe-vertadjust.odt")
 CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, 
getProperty(xFrame, "TextVerticalAdjust"));
 }
 
+DECLARE_ODFEXPORT_TEST(testTdf111891_frameVertStyle, 
"tdf111891_frameVertStyle.odt")
+{
+uno::Reference xFrame(getShape(1), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, 
getProperty(xFrame, "TextVerticalAdjust"));
+}
+
 DECLARE_ODFEXPORT_TEST(testShapeRelsize, "shape-relsize.odt")
 {
 uno::Reference xShape = getShape(1);
diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index ad6dd78b687e..db6fc57152c3 100644
-

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

2017-09-12 Thread Dennis Francis
 vcl/opengl/salbmp.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit de55aa0f639a451aae05ec515cfa58d4bbdd8816
Author: Dennis Francis 
Date:   Tue Sep 12 15:47:58 2017 +0530

tdf#108299: Limit the width and height of opengl bitmap to...

GL_MAX_TEXTURE_SIZE in OpenGLSalBitmap::Create()

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

diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index 01072929beb2..4eb1f2714cd8 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -124,6 +124,20 @@ bool OpenGLSalBitmap::Create( const OpenGLTexture& rTex, 
long nX, long nY, long
 VCL_GL_INFO( "OpenGLSalBitmap::Create from FBO: ["
   << nX << ", " << nY << "] " << nWidth << "x" << nHeight );
 
+GLint nMaxTextureSize;
+glGetIntegerv( GL_MAX_TEXTURE_SIZE, &nMaxTextureSize );
+if ( nWidth > nMaxTextureSize )
+{
+nWidth = nMaxTextureSize;
+VCL_GL_INFO( "Width limited to " << nMaxTextureSize );
+}
+
+if ( nHeight > nMaxTextureSize )
+{
+nHeight = nMaxTextureSize;
+VCL_GL_INFO( "Height limited to " << nMaxTextureSize );
+}
+
 mnWidth = nWidth;
 mnHeight = nHeight;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Mike Kaganski
 sw/qa/extras/ww8import/data/tdf112346.doc   |binary
 sw/qa/extras/ww8import/ww8import.cxx|8 ++
 sw/source/filter/ww8/ww8par.cxx |  103 +---
 sw/source/filter/ww8/ww8par.hxx |1 
 sw/source/filter/ww8/ww8par6.cxx|   15 
 writerfilter/source/dmapper/PropertyMap.cxx |   11 ++
 6 files changed, 97 insertions(+), 41 deletions(-)

New commits:
commit a952d1f59f4f84380b82f1eb9e550b8f69c4be5d
Author: Mike Kaganski 
Date:   Tue Sep 12 13:54:26 2017 +0300

tdf#112346: take Word no-wrap limit into account also for ww8

This also makes ww8 floating-table conversion decision heuristics
somewhat closer to OOXML code.

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

diff --git a/sw/qa/extras/ww8import/data/tdf112346.doc 
b/sw/qa/extras/ww8import/data/tdf112346.doc
new file mode 100644
index ..af0cca219acf
Binary files /dev/null and b/sw/qa/extras/ww8import/data/tdf112346.doc differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx 
b/sw/qa/extras/ww8import/ww8import.cxx
index 5ea85cc7360b..907fe47ebcff 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -131,6 +131,14 @@ DECLARE_WW8IMPORT_TEST(testTdf106799, "tdf106799.doc")
 }
 }
 
+DECLARE_WW8IMPORT_TEST(testTdf112346, "tdf112346.doc")
+{
+uno::Reference xDrawPageSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xDrawPage = 
xDrawPageSupplier->getDrawPage();
+// This was 1, multi-page table was imported as a floating one.
+CPPUNIT_ASSERT_EQUAL(static_cast(0), xDrawPage->getCount());
+}
+
 // tests should only be added to ww8IMPORT *if* they fail round-tripping in 
ww8EXPORT
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index a135234ee669..196e8c7fcad8 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -93,6 +93,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -2501,6 +2502,83 @@ void SwWW8ImplReader::EndSpecial()
 OSL_ENSURE(!m_nInTable, "unclosed table!");
 }
 
+bool SwWW8ImplReader::FloatingTableConversion(WW8PLCFx_Cp_FKP* pPap)
+{
+// This is ww8 version of the code deciding if the table needs to be
+// in a floating frame.
+// For OOXML code, see SectionPropertyMap::FloatingTableConversion in
+// writerfilter/source/dmapper/PropertyMap.cxx
+// The two should do ~same, so if you make changes here, please check
+// that the other is in sync.
+
+// Note that this is just a list of heuristics till sw core can have a
+// table that is floating and can span over multiple pages at the same
+// time.
+
+bool bResult = true;
+
+SprmResult aRes = pPap->HasSprm(NS_sprm::sprmTDefTable);
+if (nullptr != aRes.pSprm)
+{
+bResult = false;
+WW8TabBandDesc aDesc;
+aDesc.ReadDef(false, aRes.pSprm);
+int nTextAreaWidth = m_aSectionManager.GetTextAreaWidth();
+int nTableWidth = aDesc.nCenter[aDesc.nWwCols] - aDesc.nCenter[0];
+
+// It seems Word has a limit here, so that in case the table width is 
quite
+// close to the text area width, then it won't perform a wrapping, 
even in
+// case the content (e.g. an empty paragraph) would fit. The magic 
constant
+// here represents this limit.
+const int nMagicNumber = 469;
+
+// If the table is wider than the text area, then don't create a fly
+// for the table: no wrapping will be performed anyway, but multi-page
+// tables will be broken.
+if ((nTableWidth + nMagicNumber) < nTextAreaWidth)
+bResult = true;
+
+// If there are columns, do create a fly, as the flow of the columns
+// would otherwise restrict the table.
+if (!bResult && (m_aSectionManager.CurrentSectionColCount() >= 2))
+bResult = true;
+}
+
+if (bResult)
+{
+WW8PLCFxSave1 aSave;
+pPap->Save(aSave);
+if (SearchTableEnd(pPap))
+{
+// Table is considered to be imported into a fly frame and we
+// know where the end of the table is.
+bool bIsUnicode;
+WW8_FC nFc = m_xSBase->WW8Cp2Fc(pPap->Where(), &bIsUnicode);
+sal_uInt64 nPos = m_pStrm->Tell();
+m_pStrm->Seek(nFc);
+sal_uInt16 nUChar = 0;
+if (bIsUnicode)
+m_pStrm->ReadUInt16(nUChar);
+else
+{
+sal_uInt8 nChar = 0;
+m_pStrm->ReadUChar(nChar);
+nUChar = nChar;
+}
+m_pStrm->Seek(nPos);
+if (nUChar == 0xc)
+// The pap after the table starts with a page break, so
+// there will be no wrapping around the float-table

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

2017-09-12 Thread Caolán McNamara
 vcl/unx/generic/printer/ppdparser.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 83748e50026bff56aaa1c2f7bfb0b1557344d72c
Author: Caolán McNamara 
Date:   Tue Sep 12 13:15:52 2017 +0100

CUPS_VERSION_MAJOR is not defined

on arm

Change-Id: Ibeca07800d02f5f69046c7bdee57143c78c03aad

diff --git a/vcl/unx/generic/printer/ppdparser.cxx 
b/vcl/unx/generic/printer/ppdparser.cxx
index 97551db1983b..3f9a0d131677 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -619,6 +619,7 @@ PPDParser::PPDParser( const OUString& rFile, 
std::vector keys) :
 if ( pKey ) {
 PPDKey* pImageableAreas = new PPDKey("ImageableArea");
 PPDKey* pPaperDimensions = new PPDKey("PaperDimension");
+#if defined(CUPS_VERSION_MAJOR)
 #if (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 7) || CUPS_VERSION_MAJOR 
> 1
 for (int i = 0; i < pKey->countValues(); i++) {
 const PPDValue* pValue = pKey -> getValue(i);
@@ -648,6 +649,7 @@ PPDParser::PPDParser( const OUString& rFile, 
std::vector keys) :
 }
 }
 #endif // HAVE_CUPS_API_1_7
+#endif
 insertKey("ImageableArea", pImageableAreas);
 insertKey("PaperDimension", pPaperDimensions);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Justin Luth
 sw/source/core/layout/paintfrm.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 181d107b41b1b1ab9c03dc43fea7513e894ce404
Author: Justin Luth 
Date:   Wed Aug 30 18:08:15 2017 -0400

tdf#104602: don't re-draw page background when bOnlyTextBackground

In 2014 Writer gained support for Paragraph and PageStyle DrawingLayer
FillAttributes, it changed some behaviour with PaintBackground,
so that compat setting BACKGROUND_PARA_OVER_DRAWINGS now overwrote
the entire "hell" layer as the page background was re-applied.

Only DOCX uses this 2012 compatibility setting.

Change-Id: I69517efb7d82acd719d6a27a09ba61554dbf1ec9
Reviewed-on: https://gerrit.libreoffice.org/41744
Reviewed-by: Justin Luth 
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/42166
Tested-by: Miklos Vajna 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index db06709f5969..0572d4cf5b7a 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6557,7 +6557,7 @@ void SwFrame::PaintBackground( const SwRect &rRect, const 
SwPageFrame *pPage,
 if( IsTextFrame() || IsSctFrame() )
 aPaintRect = UnionFrame( true );
 
-if ( aPaintRect.IsOver( rRect ) )
+if ( (!bOnlyTextBackground || IsTextFrame()) && aPaintRect.IsOver( rRect ) 
)
 {
 if ( bBack || bPageFrame || !bLowerMode )
 {
@@ -6653,7 +6653,6 @@ void SwFrame::PaintBackground( const SwRect &rRect, const 
SwPageFrame *pPage,
 // background transparency have to be considered
 // Set missing 5th parameter to the default value 
GRFNUM_NO
 // - see declaration in /core/inc/frmtool.hxx.
-if (IsTextFrame() || !bOnlyTextBackground)
 ::DrawGraphic(
 pItem,
 pOut,
@@ -6698,7 +6697,7 @@ void SwFrame::PaintBackground( const SwRect &rRect, const 
SwPageFrame *pPage,
 if ( ( pFrame->IsLayoutFrame() && bLowerBorder ) ||
  aFrameRect.IsOver( aRect ) )
 pFrame->PaintBackground( aRect, pPage, rTmpAttrs, bLowMode,
-   bLowerBorder );
+   bLowerBorder, bOnlyTextBackground );
 if ( bLowerBorder )
 pFrame->PaintBorder( aBorderRect, pPage, rTmpAttrs );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Timer asserts on Windows when opening any bigger document.

2017-09-12 Thread Zolnai Tamás
Hi,

On master I experience that the code always asserts when I try to open any
document which takes a bigger amount of time on Windows.
The assertion comes from the timer code:
https://opengrok.libreoffice.org/xref/core/vcl/win/app/salinst.cxx#725

Is there any idea why this asserts? Can this assert be disabled? I guess
this assert was added recently and code does not respect the idea behind
that assert.

Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-09-12 Thread jan Iversen
 configure.ac |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 6534fa1c2af838162453bf83a874af53e4e1a567
Author: jan Iversen 
Date:   Mon Sep 11 09:03:46 2017 +0200

iOS, add flag for bitcode (64bit)

flag for bitcode needed for compiling some of
the xml stuff.

Change-Id: I0b696279180916757a1996fcc689e69326d22ddb

diff --git a/configure.ac b/configure.ac
index 6828b0ec6e2c..edfc281ebfb0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2952,7 +2952,7 @@ if test $_os = iOS; then
 versionmin=-mios-simulator-version-min=9.3
 if test "$host_cpu" = "arm64"; then
 XCODE_ARCHS=x86_64
-BITNESS_OVERRIDE=64
+BITNESS=-fembed-bitcode
 else
 XCODE_ARCHS=i386
 fi
@@ -2961,7 +2961,7 @@ if test $_os = iOS; then
 versionmin=-miphoneos-version-min=9.3
 if test "$host_cpu" = "arm64"; then
 XCODE_ARCHS=arm64
-BITNESS_OVERRIDE=64
+BITNESS=-fembed-bitcode
 else
 XCODE_ARCHS=arm
 fi
@@ -2998,8 +2998,8 @@ if test $_os = iOS; then
 XCODE_CLANG_CXX_LIBRARY=libc++
 stdlib="-stdlib=$XCODE_CLANG_CXX_LIBRARY"
 
-CC="`xcrun -find clang` -arch $XCODE_ARCHS -fvisibility=hidden -isysroot 
$sysroot $lto $versionmin"
-CXX="`xcrun -find clang++` -arch $XCODE_ARCHS -fvisibility=hidden $stdlib 
-isysroot $sysroot $lto $versionmin"
+CC="`xcrun -find clang` -arch $XCODE_ARCHS -fvisibility=hidden $BITNESS 
-isysroot $sysroot $lto $versionmin"
+CXX="`xcrun -find clang++` -arch $XCODE_ARCHS -fvisibility=hidden $stdlib 
$BITNESS -isysroot $sysroot $lto $versionmin"
 
 INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
 AR=`xcrun -find ar`
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Stephan Bergmann
 configure.ac |   67 +--
 1 file changed, 38 insertions(+), 29 deletions(-)

New commits:
commit 01554ccd201cdbccbe3bb76812ef51ece0f8d777
Author: Stephan Bergmann 
Date:   Tue Sep 12 12:43:56 2017 +0200

Make detection of Clang CL driver mode more robust

...so that that mode can be requested via either 'clang-cl' or 'clang
--driver-mode=cl' (where the latter will be needed for
--enable-compiler-plugins on Windows).  The patch assumes that Clang uses 
the
CL driver mode iff running on Windows.

Moves the SHOWINCLUDES_PREFIX check around so that the code dropping 
-FIIntrin.h
from CC can be shared (new CC_PLAIN variable).

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

diff --git a/configure.ac b/configure.ac
index 4cd1700088d5..6828b0ec6e2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3352,7 +3352,6 @@ find_msvc()
 }
 
 SOLARINC=
-SHOWINCLUDES_PREFIX=
 MSBUILD_PATH=
 DEVENV=
 if test "$_os" = "WINNT"; then
@@ -3576,31 +3575,6 @@ if test "$_os" = "WINNT"; then
 AC_MSG_ERROR([Visual C++ not found after all, huh])
 fi
 
-dnl We need to guess the prefix of the -showIncludes output, it can be
-dnl localized
-AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
-echo "#include " > conftest.c
-dnl Filter out -FIIntrin.h when CC points at clang-cl.exe and needs to
-dnl explicitly state that argument:
-my_CC=
-for i in $CC; do
-case $i in
--FIIntrin.h)
-;;
-*)
-my_CC="$my_CC $i"
-;;
-esac
-done
-SHOWINCLUDES_PREFIX=`$my_CC $CFLAGS -c -showIncludes conftest.c 
2>/dev/null | \
-grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
-rm -f conftest.c conftest.obj
-if test -z "$SHOWINCLUDES_PREFIX"; then
-AC_MSG_ERROR([cannot determine the -showIncludes prefix])
-else
-AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
-fi
-
 # Check for 64-bit (cross-)compiler to use to build the 64-bit
 # version of the Explorer extension (and maybe other small
 # bits, too) needed when installing a 32-bit LibreOffice on a
@@ -3652,7 +3626,6 @@ AC_SUBST(DEVENV)
 PathFormat "$MSPDB_PATH"
 MSPDB_PATH="$formatted_path"
 AC_SUBST(MSVC_CXX)
-AC_SUBST(SHOWINCLUDES_PREFIX)
 
 #
 # unowinreg.dll
@@ -3672,10 +3645,29 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
  COM_IS_CLANG=TRUE],
 [AC_MSG_RESULT([no])])
 
+CC_PLAIN=$CC
 if test "$COM_IS_CLANG" = TRUE; then
 AC_MSG_CHECKING([the Clang version])
-clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | 
${CC%-cl.exe*} -E -P -`
-CLANG_FULL_VERSION=`echo __clang_version__ | ${CC%-cl.exe*} -E -P -`
+if test "$_os" = WINNT; then
+dnl In which case, assume clang-cl:
+my_args="/EP /TC"
+dnl Filter out -FIIntrin.h, which needs to be explicitly stated for
+dnl clang-cl:
+CC_PLAIN=
+for i in $CC; do
+case $i in
+-FIIntrin.h)
+;;
+*)
+CC_PLAIN="$CC_PLAIN $i"
+;;
+esac
+done
+else
+my_args="-E -P"
+fi
+clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | 
$CC_PLAIN $my_args -`
+CLANG_FULL_VERSION=`echo __clang_version__ | $CC_PLAIN $my_args -`
 CLANGVER=`echo $clang_version | $AWK -F. '{ print \$1*1+\$2*100+\$3 }'`
 AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER])
 AC_DEFINE_UNQUOTED(CLANG_VERSION,$CLANGVER)
@@ -3683,6 +3675,23 @@ if test "$COM_IS_CLANG" = TRUE; then
 fi
 AC_SUBST(COM_IS_CLANG)
 
+SHOWINCLUDES_PREFIX=
+if test "$_os" = WINNT; then
+dnl We need to guess the prefix of the -showIncludes output, it can be
+dnl localized
+AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
+echo "#include " > conftest.c
+SHOWINCLUDES_PREFIX=`$CC_PLAIN $CFLAGS -c -showIncludes conftest.c 
2>/dev/null | \
+grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
+rm -f conftest.c conftest.obj
+if test -z "$SHOWINCLUDES_PREFIX"; then
+AC_MSG_ERROR([cannot determine the -showIncludes prefix])
+else
+AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
+fi
+fi
+AC_SUBST(SHOWINCLUDES_PREFIX)
+
 #
 # prefix C with ccache if needed
 #
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Fridrich Štrba
 external/rhino/rhino1_5R5.patch |8 
 1 file changed, 8 deletions(-)

New commits:
commit 57adce8b88073b813aacb668629968f29b7d706a
Author: Fridrich Å trba 
Date:   Mon Sep 4 20:59:02 2017 +0200

This hunk breaks jdk9 build

Change-Id: I80b6619a95ccac43a06ffd9b1b64dc1115510d90

diff --git a/external/rhino/rhino1_5R5.patch b/external/rhino/rhino1_5R5.patch
index e44872e3df8f..40fc6cc9427b 100644
--- a/external/rhino/rhino1_5R5.patch
+++ b/external/rhino/rhino1_5R5.patch
@@ -185,14 +185,6 @@

  

-@@ -68,6 +54,7 @@
-includes="org/**/*.java"
-deprecation="on"
-debug="${debug}">
-+  
- 
- 
-   
 --- misc/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/debugger/Main.java
2004-03-25 21:54:34.0 +0100
 +++ 
misc/build/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/debugger/Main.java   
   2009-01-17 20:44:22.0 +0100
 @@ -470,15 +470,21 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: reportbuilder/java

2017-09-12 Thread Fridrich Štrba
 
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java
 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 398eccd6e833875b08f3414cfcf6820cdf07dcbf
Author: Fridrich Å trba 
Date:   Tue Sep 12 13:35:44 2017 +0200

This really does not need to be utf-8 character

Change-Id: I75e3973ed3fe2489233cdce127a29ff19f604903

diff --git 
a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java
 
b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java
index d20927f8eb27..6a1bd00736ee 100644
--- 
a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java
+++ 
b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java
@@ -263,7 +263,7 @@ public class FormatValueUtility
 final SectionLayoutController slc = findGroupOrDetail(ref);
 if (slc == null)
 {
-// {Page, Report} × {Header, Footer} have no usable iteration 
count
+// {Page, Report} x {Header, Footer} have no usable iteration count
 // err on the side of showing them rather than not showing them
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Fridrich Štrba
 configure.ac |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 047b4c14ada038204a1e1280742960db00a5d1f2
Author: Fridrich Å trba 
Date:   Tue Sep 12 10:32:26 2017 +0200

Detect libjawt automatically on java9 too

Change-Id: Ie8eb53a915682b7a188b1af4b2d435eb0cc9ff81

diff --git a/configure.ac b/configure.ac
index f616afef856e..4cd1700088d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7000,7 +7000,12 @@ then
 my_java_arch=$host_cpu
 ;;
 esac
-JAWTLIB="-L$JAVA_HOME/jre/lib/$my_java_arch -ljawt"
+# This is where JDK9 puts the library
+if test -e "$JAVA_HOME/lib/libjawt.so"; then
+JAWTLIB="-L$JAVA_HOME/lib/ -ljawt"
+else
+JAWTLIB="-L$JAVA_HOME/jre/lib/$my_java_arch -ljawt"
+fi
 AS_IF([test "$JAVA_ARCH" != ""], [AC_DEFINE_UNQUOTED([JAVA_ARCH], 
["$JAVA_ARCH"])])
 fi
 AC_MSG_RESULT([$JAWTLIB])
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Armin Le Grand
 drawinglayer/source/primitive2d/textprimitive2d.cxx  |9 +
 include/drawinglayer/primitive2d/textprimitive2d.hxx |   17 ++---
 2 files changed, 15 insertions(+), 11 deletions(-)

New commits:
commit 41c704a8d6ca225e0ba0b1deb730c2bead66da25
Author: Armin Le Grand 
Date:   Tue Sep 12 10:30:01 2017 +0200

tdf#111853 Added TextFillColor to operator==

TextFillColor was added to TextSimplePortionPrimitive2D, but not added to
TextSimplePortionPrimitive2D::operator==, so when this changed it was not
detected. Added this.
Also added was bFilled and nWidthToFill, all defaulted. This is not 
accessible
for TextDecoratedPortionPrimitive2D and seems to be some special solution
just for one special case in DrawPortionInfo, only used from 
Outliner::DrawingTab,
so I am not sure if that change to the central TextSimplePortionPrimitive2D 
is
good and should stay

Change-Id: Ief8da74a8b66281e47c4c8a47131125e30b90e7d
Reviewed-on: https://gerrit.libreoffice.org/42188
Reviewed-by: Armin Le Grand 
Tested-by: Armin Le Grand 

diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx 
b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index 0cf27bbba440..3dc00a9e1a99 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -225,7 +225,7 @@ namespace drawinglayer
 const basegfx::BColor& rFontColor,
 bool bFilled,
 long nWidthToFill,
-const Color& rFillColor)
+const Color& rTextFillColor)
 :   BufferedDecompositionPrimitive2D(),
 maTextTransform(rNewTransform),
 maText(rText),
@@ -235,10 +235,10 @@ namespace drawinglayer
 maFontAttribute(rFontAttribute),
 maLocale(rLocale),
 maFontColor(rFontColor),
-maB2DRange(),
 mbFilled(bFilled),
 mnWidthToFill(nWidthToFill),
-maTextFillColor(rFillColor)
+maTextFillColor(rTextFillColor),
+maB2DRange()
 {
 #if OSL_DEBUG_LEVEL > 0
 const sal_Int32 aStringLength(getText().getLength());
@@ -269,7 +269,8 @@ namespace drawinglayer
 && LocalesAreEqual(getLocale(), rCompare.getLocale())
 && getFontColor() == rCompare.getFontColor()
 && mbFilled == rCompare.mbFilled
-&& mnWidthToFill == rCompare.mnWidthToFill);
+&& mnWidthToFill == rCompare.mnWidthToFill
+&& maTextFillColor == rCompare.maTextFillColor);
 }
 
 return false;
diff --git a/include/drawinglayer/primitive2d/textprimitive2d.hxx 
b/include/drawinglayer/primitive2d/textprimitive2d.hxx
index 6b6b8381c563..2eb208f271ce 100644
--- a/include/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -93,7 +93,7 @@ namespace drawinglayer
 
 @param nWidthToFill
 
-@param rFillColor
+@param rTextFillColor
 Text background color (has nothing to do with bFilled and 
nWidthToFill)
 
  */
@@ -119,20 +119,23 @@ namespace drawinglayer
 attribute::FontAttributemaFontAttribute;
 
 /// The Locale for the text
-css::lang::Locale  maLocale;
+css::lang::Locale   maLocale;
 
 /// font color
 basegfx::BColor maFontColor;
 
+// Whether to fill a given width with the text
+boolmbFilled;
 
-/// #i96669# internal: add simple range buffering for this 
primitive
-basegfx::B2DRange   maB2DRange;
-boolmbFilled;   // 
Whether to fill a given width with the text
-longmnWidthToFill;  // the 
width to fill
+// the width to fill
+longmnWidthToFill;
 
 /// The fill color of the text
 Color   maTextFillColor;
 
+/// #i96669# internal: add simple range buffering for this 
primitive
+basegfx::B2DRange   maB2DRange;
+
 protected:
 /// local decomposition.
 virtual void create2DDecomposition(Primitive2DContainer& 
rContainer, const geometry::ViewInformation2D& rViewInformation) const override;
@@ -150,7 +153,7 @@ namespace drawinglayer
 const basegfx::BColor& rFontColor,
 bool bFilled = false,
 long nWidthToFill = 0,
-const Color& rFillColor = COL_TRANSPARENT );
+const Color& rTextFillColor = COL_TRANSPARENT );
 
 /// helpers
   

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

2017-09-12 Thread Noel Grandin
 svgio/source/svgreader/svgdocumenthandler.cxx  |2 -
 svgio/source/svgreader/svggradientnode.cxx |5 +---
 svl/source/filepicker/pickerhistory.cxx|2 -
 svl/source/items/IndexedStyleSheets.cxx|4 +--
 svl/source/items/itemprop.cxx  |2 -
 svl/source/misc/ownlist.cxx|2 -
 svl/source/passwordcontainer/passwordcontainer.cxx |2 -
 svl/source/undo/undo.cxx   |4 +--
 svtools/source/contnr/fileview.cxx |4 +--
 svtools/source/control/collatorres.cxx |   24 ++---
 svtools/source/control/indexentryres.cxx   |   20 -
 svtools/source/dialogs/addresstemplate.cxx |2 -
 svtools/source/dialogs/insdlg.cxx  |2 -
 svtools/source/misc/dialogcontrolling.cxx  |2 -
 svtools/source/misc/langtab.cxx|4 +--
 svtools/source/svhtml/parhtml.cxx  |2 -
 svtools/source/table/tablecontrol_impl.cxx |4 +--
 svtools/source/uno/treecontrolpeer.cxx |2 -
 svtools/source/uno/unoimap.cxx |2 -
 19 files changed, 45 insertions(+), 46 deletions(-)

New commits:
commit 48b200a0a2aa70a7dfc0aad8a4964690ae11d42e
Author: Noel Grandin 
Date:   Tue Sep 12 12:00:35 2017 +0200

clang-tidy modernize-use-emplace in svgio..svtools

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

diff --git a/svgio/source/svgreader/svgdocumenthandler.cxx 
b/svgio/source/svgreader/svgdocumenthandler.cxx
index 208eb90c1634..1ce1e3b55ffd 100644
--- a/svgio/source/svgreader/svgdocumenthandler.cxx
+++ b/svgio/source/svgreader/svgdocumenthandler.cxx
@@ -350,7 +350,7 @@ namespace svgio
 {
 // if it is a Css style, allow reading text 
between the start and end tag (see
 // SvgDocHdl::characters for details)
-maCssContents.push_back(OUString());
+maCssContents.emplace_back();
 }
 break;
 }
diff --git a/svgio/source/svgreader/svggradientnode.cxx 
b/svgio/source/svgreader/svggradientnode.cxx
index 675a648393d0..81617c8814dc 100644
--- a/svgio/source/svgreader/svggradientnode.cxx
+++ b/svgio/source/svgreader/svggradientnode.cxx
@@ -289,11 +289,10 @@ namespace svgio
 fOffset = 1.0;
 }
 
-aVector.push_back(
-drawinglayer::primitive2d::SvgGradientEntry(
+aVector.emplace_back(
 fOffset,
 pStyle->getStopColor(),
-pStyle->getStopOpacity().solve(*this)));
+pStyle->getStopOpacity().solve(*this));
 }
 else
 {
diff --git a/svl/source/filepicker/pickerhistory.cxx 
b/svl/source/filepicker/pickerhistory.cxx
index c4c4b03008e9..525ac66940a8 100644
--- a/svl/source/filepicker/pickerhistory.cxx
+++ b/svl/source/filepicker/pickerhistory.cxx
@@ -56,7 +56,7 @@ namespace svt
 _rHistory.end());
 
 // then push_back the picker
-_rHistory.push_back( css::uno::WeakReference< XInterface >( 
_rxPicker ) );
+_rHistory.emplace_back( _rxPicker );
 }
 }
 
diff --git a/svl/source/items/IndexedStyleSheets.cxx 
b/svl/source/items/IndexedStyleSheets.cxx
index b327315b8a2c..b74cffb2a2c9 100644
--- a/svl/source/items/IndexedStyleSheets.cxx
+++ b/svl/source/items/IndexedStyleSheets.cxx
@@ -49,7 +49,7 @@ namespace svl {
 IndexedStyleSheets::IndexedStyleSheets()
 {
 for (size_t i = 0; i < NUMBER_OF_FAMILIES; i++) {
-mStyleSheetPositionsByFamily.push_back(std::vector());
+mStyleSheetPositionsByFamily.emplace_back();
 }
 ;}
 
@@ -69,7 +69,7 @@ IndexedStyleSheets::Reindex()
 mPositionsByName.clear();
 mStyleSheetPositionsByFamily.clear();
 for (size_t i = 0; i < NUMBER_OF_FAMILIES; i++) {
-mStyleSheetPositionsByFamily.push_back(std::vector());
+mStyleSheetPositionsByFamily.emplace_back();
 }
 
 unsigned i = 0;
diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx
index 46dd51b8084d..276ccc797497 100644
--- a/svl/source/items/itemprop.cxx
+++ b/svl/source/items/itemprop.cxx
@@ -157,7 +157,7 @@ PropertyEntryVector_t 
SfxItemPropertyMap::getPropertyEntries() const
 while( aIt != m_pImpl->end() )
 {
 const SfxItemPropertySimpleEntry* pEntry = &(*aIt).second;
-aRet.push_back( SfxItemPropertyNamedEntry( (*aIt).first, * pEntry ) );
+aR

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

2017-09-12 Thread Caolán McNamara
 svx/source/tbxctrls/layctrl.cxx |2 --
 vcl/unx/gtk3/gtk3gtkframe.cxx   |3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 7b1fbcb0e0e1f29814c646dbe283fa0eabed099a
Author: Caolán McNamara 
Date:   Tue Sep 12 12:15:18 2017 +0100

Resolves: tdf#106163 MouseMove/MouseLeave from crossing not mirrored in rtl

but we do mirror the event for normal mousemove, this looks like the real
bug here

Change-Id: I178d53f5f40dbd075984019e25e6d7665b6cdf87

diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 88948143a321..ef22cab1e8e9 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -160,8 +160,6 @@ void TableWindow::dispose()
 void TableWindow::MouseMove( const MouseEvent& rMEvt )
 {
 SfxPopupWindow::MouseMove( rMEvt );
-if (IsInCleanUp())
-return;
 Point aPos = rMEvt.GetPosPixel();
 Point aMousePos( aPos );
 
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index c9c0eb50c7c9..11d6c8cffed8 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -2887,6 +2887,9 @@ gboolean GtkSalFrame::signalCrossing( GtkWidget*, 
GdkEventCrossing* pEvent, gpoi
 aEvent.mnCode   = GetMouseModCode( pEvent->state );
 aEvent.mnButton = 0;
 
+if (AllSettings::GetLayoutRTL())
+aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX;
+
 pThis->CallCallbackExc( (pEvent->type == GDK_ENTER_NOTIFY) ? 
SalEvent::MouseMove : SalEvent::MouseLeave, &aEvent );
 
 return true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Caolán McNamara
 svx/source/tbxctrls/layctrl.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 65b756f6058697ccb787506c3cc32e1e818bcc37
Author: Caolán McNamara 
Date:   Tue Sep 12 12:12:19 2017 +0100

Resolves: tdf#106163 safe fix for wrong final row/col selection in rtl

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

diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index ef22cab1e8e9..88948143a321 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -160,6 +160,8 @@ void TableWindow::dispose()
 void TableWindow::MouseMove( const MouseEvent& rMEvt )
 {
 SfxPopupWindow::MouseMove( rMEvt );
+if (IsInCleanUp())
+return;
 Point aPos = rMEvt.GetPosPixel();
 Point aMousePos( aPos );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Caolán McNamara
 vcl/inc/unx/cpdmgr.hxx |   12 ++--
 vcl/unx/generic/printer/cpdmgr.cxx |   52 -
 2 files changed, 55 insertions(+), 9 deletions(-)

New commits:
commit a1ece2d00d5c484a4aba6d7281895005e70126a9
Author: Caolán McNamara 
Date:   Tue Sep 12 11:53:34 2017 +0100

stub things to build without dbus or gio

Change-Id: Ibdcf33a6f0a688b322aedd531e8dfbf107e9e755

diff --git a/vcl/inc/unx/cpdmgr.hxx b/vcl/inc/unx/cpdmgr.hxx
index 48fb02ab3a2a..de8aab4547ce 100644
--- a/vcl/inc/unx/cpdmgr.hxx
+++ b/vcl/inc/unx/cpdmgr.hxx
@@ -34,6 +34,9 @@
 #define FRONTEND_INTERFACE 
"/usr/share/dbus-1/interfaces/org.openprinting.Frontend.xml"
 #define BACKEND_INTERFACE 
"/usr/share/dbus-1/interfaces/org.openprinting.Backend.xml"
 
+typedef struct _GDBusProxy GDBusProxy;
+typedef struct _GDBusConnection GDBusConnection;
+
 namespace psp
 {
 
@@ -75,6 +78,9 @@ class CPDManager : public PrinterInfoManager
 // Function called when CPDManager is destroyed
 virtual ~CPDManager() override;
 
+virtual void initialize() override;
+
+#if ENABLE_DBUS && ENABLE_GIO
 static void onNameAcquired(GDBusConnection *connection, const char* name, 
void* user_data);
 static void onNameLost (GDBusConnection *, const char *name, void*);
 static void printerAdded (GDBusConnection *connection,
@@ -92,18 +98,18 @@ class CPDManager : public PrinterInfoManager
 GVariant*parameters,
 gpointeruser_data);
 
-virtual void initialize() override;
-
 static void getOptionsFromDocumentSetup( const JobData& rJob, bool 
bBanner, const OString& rJobName, int& rNumOptions, GVariant **arr );
-
+#endif
 
 public:
+#if ENABLE_DBUS && ENABLE_GIO
 // Functions involved in initialization
 GDBusProxy * getProxy( std::string target );
 void addBackend( std::pair< std::string, GDBusProxy * > pair );
 void addTempBackend( std::pair< std::string, gchar* > pair );
 std::vector> getTempBackends();
 void addNewPrinter( const OUString&, const OUString&, CPDPrinter * );
+#endif
 
 // Create CPDManager
 static CPDManager* tryLoadCPD();
diff --git a/vcl/unx/generic/printer/cpdmgr.cxx 
b/vcl/unx/generic/printer/cpdmgr.cxx
index 9ba7456c1a9a..60a050bd7471 100644
--- a/vcl/unx/generic/printer/cpdmgr.cxx
+++ b/vcl/unx/generic/printer/cpdmgr.cxx
@@ -34,6 +34,7 @@
 using namespace psp;
 using namespace osl;
 
+#if ENABLE_DBUS && ENABLE_GIO
 // Function to execute when name is acquired on the bus
 void CPDManager::onNameAcquired (GDBusConnection *connection,
  const gchar *,
@@ -233,6 +234,7 @@ void CPDManager::addNewPrinter(const OUString& 
aPrinterName, const OUString& aUn
 aPrinter.m_bModified = false;
 m_aPrinters[ aUniqueName ] = aPrinter;
 }
+#endif
 
 /*
  *  CPDManager class
@@ -271,14 +273,17 @@ CPDManager* CPDManager::tryLoadCPD()
 CPDManager::CPDManager() :
 PrinterInfoManager( PrinterInfoManager::Type::CPD )
 {
+#if ENABLE_DBUS && ENABLE_GIO
 // Get Destinations number and pointers
 GError *error = nullptr;
 m_pConnection = g_bus_get_sync (G_BUS_TYPE_SESSION, nullptr, &error);
 g_assert_no_error (error);
+#endif
 }
 
 CPDManager::~CPDManager()
 {
+#if ENABLE_DBUS && ENABLE_GIO
 g_dbus_connection_emit_signal (m_pConnection,
nullptr,
"/org/libreoffice/PrintDialog",
@@ -303,12 +308,14 @@ CPDManager::~CPDManager()
 {
 free(dest_it->second);
 }
+#endif
 }
 
 
 const PPDParser* CPDManager::createCPDParser( const OUString& rPrinter )
 {
 const PPDParser* pNewParser = nullptr;
+#if ENABLE_DBUS && ENABLE_GIO
 OUString aPrinter;
 
 if( rPrinter.startsWith("CPD:") )
@@ -464,7 +471,9 @@ const PPDParser* CPDManager::createCPDParser( const 
OUString& rPrinter )
 rInfo.m_pParser = pNewParser;
 rInfo.m_aContext.setParser( pNewParser );
 }
-
+#else
+(void)rPrinter;
+#endif
 return pNewParser;
 }
 
@@ -473,6 +482,7 @@ void CPDManager::initialize()
 {
 // get normal printers, clear printer list
 PrinterInfoManager::initialize();
+#if ENABLE_DBUS && ENABLE_GIO
 g_bus_own_name_on_connection (m_pConnection,
   "org.libreoffice.print-dialog",
   G_BUS_NAME_OWNER_FLAGS_NONE,
@@ -520,10 +530,12 @@ void CPDManager::initialize()
 m_aPrinters.erase( aRemovePrinters.front() );
 aRemovePrinters.pop_front();
 }
+#endif
 }
 
 void CPDManager::setupJobContextData( JobData& rData )
 {
+#if ENABLE_DBUS && ENABLE_GIO
 std::unordered_map::iterator dest_it 
=
 m_aCPDDestMap.find( rData.m_aPrinterName );
 
@@ -558,10 +570,14 @@ void CPDManager::setupJobContextData( JobData& rData )
 
 rData.m_pParser = p_it->second.m_aInfo.m_pParser;
 rData.m_aContext= p_it->second.m_aInfo.m_aContext;
+#else
+(void)rData;

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

2017-09-12 Thread Dennis Francis
 sc/source/ui/app/transobj.cxx |   11 +--
 sc/source/ui/inc/transobj.hxx |1 -
 2 files changed, 1 insertion(+), 11 deletions(-)

New commits:
commit 8a70142223049f98a9c6f91130ecdc87a2a9becf
Author: Dennis Francis 
Date:   Tue Sep 12 11:33:14 2017 +0200

Revert "tdf#108299: Limit the size of bitmap created for clipboard..."

This reverts commit 157d1a774086d7344d443005442682f2ca3c01a9.

Fix for the root cause coming up soon.

Change-Id: Ia66432c8b1ed3f2063a3a091976812e2a479ab12
Reviewed-on: https://gerrit.libreoffice.org/42191
Tested-by: Jenkins 
Reviewed-by: Dennis Francis 

diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 9f80b62a19f1..d24e83b7382b 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -33,7 +33,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include "transobj.hxx"
 #include "patattr.hxx"
@@ -65,7 +64,6 @@
 #include "cellsuno.hxx"
 #include "stringutil.hxx"
 #include "formulaiter.hxx"
-#include "tabvwsh.hxx"
 #include 
 
 using namespace com::sun::star;
@@ -176,8 +174,6 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const 
TransferableObjectDesc
 aBlock = ScRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
 nVisibleTab = nTab1;// valid table as default
 
-aMaxBitMapSize = 
ScTabViewShell::GetActiveViewShell()->GetViewFrame()->GetWindow().GetSizePixel();
-
 tools::Rectangle aMMRect = pDoc->GetMMRect( nCol1,nRow1, nCol2,nRow2, 
nTab1 );
 aObjDesc.maSize = aMMRect.GetSize();
 PrepareOLE( aObjDesc );
@@ -358,13 +354,8 @@ bool ScTransferObj::GetData( const 
datatransfer::DataFlavor& rFlavor, const OUSt
 tools::Rectangle aMMRect = pDoc->GetMMRect( aBlock.aStart.Col(), 
aBlock.aStart.Row(),
  aBlock.aEnd.Col(), 
aBlock.aEnd.Row(),
  aBlock.aStart.Tab() );
-
 ScopedVclPtrInstance< VirtualDevice > pVirtDev;
-Size aSize = pVirtDev->LogicToPixel( aMMRect.GetSize(), 
MapUnit::Map100thMM );
-// Limit the width and height to screen area in pixel scale
-aSize.Width() = std::min( aMaxBitMapSize.Width(), aSize.Width() );
-aSize.Height() = std::min( aMaxBitMapSize.Height(), aSize.Height() 
);
-pVirtDev->SetOutputSizePixel( aSize );
+pVirtDev->SetOutputSizePixel( pVirtDev->LogicToPixel( 
aMMRect.GetSize(), MapUnit::Map100thMM ) );
 
 PaintToDev( pVirtDev, pDoc, 1.0, aBlock );
 
diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx
index f40de060d413..b897a727937e 100644
--- a/sc/source/ui/inc/transobj.hxx
+++ b/sc/source/ui/inc/transobj.hxx
@@ -42,7 +42,6 @@ class ScTransferObj : public TransferableHelper
 private:
 ScDocument* pDoc;
 ScRange aBlock;
-SizeaMaxBitMapSize;
 SCROW   nNonFiltered;   // non-filtered rows
 TransferableObjectDescriptoraObjDesc;
 SfxObjectShellRef   aDocShellRef;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Tor Lillqvist
 sc/inc/document.hxx  |   10 +--
 sc/source/core/data/documen2.cxx |   26 
 sc/source/core/data/documen5.cxx |   42 ++---
 sc/source/core/data/documen8.cxx |   42 ++---
 sc/source/core/data/documen9.cxx |  122 +++
 sc/source/core/data/document.cxx |   26 
 6 files changed, 134 insertions(+), 134 deletions(-)

New commits:
commit 3ce229678a338b06f6d826a4c79cb80d79b51956
Author: Tor Lillqvist 
Date:   Tue Sep 12 12:35:04 2017 +0300

Prefix one more member of ScDocument: pDrawLayer

Change-Id: I8b2fdca8a58db6c6633d7708ed42ca218799c53b

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index c9a68c40a74e..d9c7a42970ae 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -323,7 +323,7 @@ private:
 SfxObjectShell* mpShell;
 VclPtr  mpPrinter;
 VclPtr mpVirtualDevice_100th_mm;
-ScDrawLayer*pDrawLayer; // SdrModel
+ScDrawLayer*mpDrawLayer;// SdrModel
 rtl::Reference pColorList;
 ScValidationDataList* pValidationList;  // validity
 SvNumberFormatterIndexTable*pFormatExchangeList;// for application 
of number formats
@@ -933,8 +933,8 @@ public:
 
 SfxBindings*GetViewBindings();
 SfxObjectShell* GetDocumentShell() const{ return 
mpShell; }
-SC_DLLPUBLIC ScDrawLayer*   GetDrawLayer() { return pDrawLayer;  }
-SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return pDrawLayer;  
}
+SC_DLLPUBLIC ScDrawLayer*   GetDrawLayer() { return mpDrawLayer;  }
+SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return mpDrawLayer; 
 }
 SfxBroadcaster* GetDrawBroadcaster();   // to avoid 
header
 voidBeginDrawUndo();
 
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 8f2200d24df7..d6b7a03d14c0 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -141,7 +141,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, 
SfxObjectShell* pDocShell ) :
 mpShell( pDocShell ),
 mpPrinter( nullptr ),
 mpVirtualDevice_100th_mm( nullptr ),
-pDrawLayer( nullptr ),
+mpDrawLayer( nullptr ),
 pValidationList( nullptr ),
 pFormatExchangeList( nullptr ),
 pRangeName(nullptr),
@@ -628,7 +628,7 @@ bool ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, 
SCROW& rEndRow,
 if (ValidTab(nTab) && nTab < static_cast(maTabs.size()) && 
maTabs[nTab])
 {
 bool bAny = maTabs[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes );
-if (pDrawLayer)
+if (mpDrawLayer)
 {
 ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab);
 if (DrawGetPrintArea( aDrawRange, true, true ))
@@ -652,7 +652,7 @@ bool ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW 
nStartRow, SCROW nEndRow,
 if (ValidTab(nTab) && nTab < static_cast(maTabs.size()) && 
maTabs[nTab])
 {
 bool bAny = maTabs[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol 
);
-if (pDrawLayer)
+if (mpDrawLayer)
 {
 ScRange aDrawRange(0,nStartRow,nTab, MAXCOL,nEndRow,nTab);
 if (DrawGetPrintArea( aDrawRange, true, false ))
@@ -674,7 +674,7 @@ bool ScDocument::GetPrintAreaVer( SCTAB nTab, SCCOL 
nStartCol, SCCOL nEndCol,
 if (ValidTab(nTab) && nTab < static_cast(maTabs.size()) && 
maTabs[nTab])
 {
 bool bAny = maTabs[nTab]->GetPrintAreaVer( nStartCol, nEndCol, 
rEndRow, bNotes );
-if (pDrawLayer)
+if (mpDrawLayer)
 {
 ScRange aDrawRange(nStartCol,0,nTab, nEndCol,MAXROW,nTab);
 if (DrawGetPrintArea( aDrawRange, false, true ))
@@ -695,7 +695,7 @@ bool ScDocument::GetDataStart( SCTAB nTab, SCCOL& 
rStartCol, SCROW& rStartRow )
 if (ValidTab(nTab) && nTab < static_cast(maTabs.size()) && 
maTabs[nTab])
 {
 bool bAny = maTabs[nTab]->GetDataStart( rStartCol, rStartRow );
-if (pDrawLayer)
+if (mpDrawLayer)
 {
 ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab);
 if (DrawGetPrintArea( aDrawRange, true, true ))
@@ -810,8 +810,8 @@ bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, 
ScProgress* pProgress )
 sc::SetFormulaDirtyContext aFormulaDirtyCxt;
 SetAllFormulasDirty(aFormulaDirtyCxt);
 
-if (pDrawLayer)
-pDrawLayer->ScMovePage( static_cast(nOldPos), 
static_cast(nNewPos) );
+if (mpDrawLayer)
+mpDrawLayer->ScMovePage( static_cast(nOldPos), 
static_cast(nNewPos) );
 
 bValid = true;
 }
@@ -940,9 +940,9 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, 
const ScMarkData* pOnlyM
 sc::SetFormulaDirtyContext aFormulaDirtyCxt;
 SetAllFormulasDirty(aFormulaDirtyCxt);
 
-if (pDrawLayer

[Libreoffice-commits] core.git: android/source configure.ac solenv/gbuild

2017-09-12 Thread Christian Lohmaier
 android/source/gradle.properties   |1 +
 configure.ac   |   11 ---
 solenv/gbuild/platform/com_GCC_defs.mk |4 +++-
 3 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 3de5cd341d861faeadabec16ff675d764f8df4b6
Author: Christian Lohmaier 
Date:   Thu Sep 7 18:27:12 2017 +0200

android: tune symbols for lldb & we actually target 14 as minSDK

-glldb might be placebo switch like -ggdb2, but at last it won't hurt
:-)
increase java heap size for gradle to allow inprocess dex as well as
actually processing the huge files.
furthermore fix platform level in configure to match the minSDK value
from build.gradle

Change-Id: I57d7d4c67bc3e5ed8bfed1e592b85211b5b8905a
Reviewed-on: https://gerrit.libreoffice.org/42162
Reviewed-by: Christian Lohmaier 
Tested-by: Jenkins 

diff --git a/android/source/gradle.properties b/android/source/gradle.properties
new file mode 100644
index ..899c9f99f396
--- /dev/null
+++ b/android/source/gradle.properties
@@ -0,0 +1 @@
+org.gradle.jvmargs=-Xmx2048m
diff --git a/configure.ac b/configure.ac
index f053df0192c7..f616afef856e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -474,18 +474,15 @@ if test -n "$with_android_ndk"; then
 fi
 fi
 
-ANDROID_API_LEVEL=15
+ANDROID_API_LEVEL=14
 if test $host_cpu = arm; then
 android_gnu_prefix=arm-linux-androideabi
 elif test $host_cpu = aarch64; then
 android_gnu_prefix=aarch64-linux-android
 
ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR="${with_android_ndk_toolchain_version}/"
-ANDROID_API_LEVEL=L
+ANDROID_API_LEVEL=21
 elif test $host_cpu = mips; then
 android_gnu_prefix=mipsel-linux-android
-elif test $ANDROID_NDK_VERSION = r8; then
-# The prefix used for the x86 tool-chain changed between NDK r8 and r8b
-android_gnu_prefix=i686-android-linux
 else
 android_gnu_prefix=i686-linux-android
 fi
@@ -850,7 +847,7 @@ linux-android*)
 ;;
 esac
 
-if echo "$host_os" | grep -q linux-android ; then
+if test "$_os" = "Android" ; then
 if test -z "$with_android_sdk"; then
 AC_MSG_ERROR([the --with-android-sdk option is mandatory, unless it is 
available at external/android-sdk-linux/.])
 fi
@@ -11883,7 +11880,7 @@ else
 fi
 AC_SUBST(OOO_VENDOR)
 
-if echo "$host_os" | grep -q linux-android ; then
+if test "$_os" = "Android" ; then
 ANDROID_PACKAGE_NAME=
 AC_MSG_CHECKING([for Android package name])
 if test -z "$with_android_package_name" -o "$with_android_package_name" = 
"no"; then
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index 793e5d34f656..3cecb8286311 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -165,8 +165,10 @@ gb_PrecompiledHeader_EXCEPTIONFLAGS := 
$(gb_LinkTarget_EXCEPTIONFLAGS)
 # optimization level
 gb_COMPILERNOOPTFLAGS := -O0 -fstrict-aliasing -fstrict-overflow
 
+ifeq ($(OS),ANDROID)
+gb_DEBUGINFO_FLAGS=-glldb
 # Clang does not know -ggdb2 or some other options
-ifeq ($(HAVE_GCC_GGDB2),TRUE)
+else ifeq ($(HAVE_GCC_GGDB2),TRUE)
 gb_DEBUGINFO_FLAGS=-ggdb2
 else
 gb_DEBUGINFO_FLAGS=-g2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Noel Grandin
 include/vcl/keycod.hxx   |7 ++-
 include/vcl/keycodes.hxx |   11 +--
 include/vcl/vclenum.hxx  |   17 -
 3 files changed, 15 insertions(+), 20 deletions(-)

New commits:
commit 8c1140e6230d14604f17030e22986e338510174c
Author: Noel Grandin 
Date:   Tue Sep 12 10:32:31 2017 +0200

move the key related types to keycod.hxx

so we have all the related definitions in the same header file

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

diff --git a/include/vcl/keycod.hxx b/include/vcl/keycod.hxx
index 06843738eee1..405fbd5cd936 100644
--- a/include/vcl/keycod.hxx
+++ b/include/vcl/keycod.hxx
@@ -23,10 +23,15 @@
 #include 
 #include 
 #include 
-#include 
 
 namespace vcl { class Window; }
 
+enum class KeyFuncType : sal_Int32 { DONTKNOW, NEW, OPEN, SAVE,
+   SAVEAS, PRINT, CLOSE, QUIT,
+   CUT, COPY, PASTE, UNDO,
+   REDO, DELETE, REPEAT, FIND,
+   FINDBACKWARD, PROPERTIES, FRONT };
+
 namespace vcl
 {
 
diff --git a/include/vcl/keycodes.hxx b/include/vcl/keycodes.hxx
index cc7d51ec30b8..8e31c4fe1f2b 100644
--- a/include/vcl/keycodes.hxx
+++ b/include/vcl/keycodes.hxx
@@ -20,12 +20,19 @@
 #ifndef INCLUDED_VCL_KEYCODES_HXX
 #define INCLUDED_VCL_KEYCODES_HXX
 
-#include 
-#undef DELETE
 #include 
 #include 
 #include 
 
+#define KEY_CODE_MASK   ((sal_uInt16)0x0FFF)
+
+// Modifier keys
+#define KEY_SHIFT   ((sal_uInt16)0x1000)
+#define KEY_MOD1((sal_uInt16)0x2000)
+#define KEY_MOD2((sal_uInt16)0x4000)
+#define KEY_MOD3((sal_uInt16)0x8000)
+#define KEY_MODIFIERS_MASK  ((sal_uInt16)0xF000)
+
 // Key groups
 #define KEYGROUP_NUM((sal_uInt16)css::awt::KeyGroup::NUM)
 #define KEYGROUP_ALPHA  ((sal_uInt16)css::awt::KeyGroup::ALPHA)
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index 02c49e2c87d7..e31c7cc70e50 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -25,12 +25,6 @@
 
 enum class TimeFieldFormat : sal_Int32 { F_NONE, F_SEC, F_SEC_CS };
 
-enum class KeyFuncType : sal_Int32 { DONTKNOW, NEW, OPEN, SAVE,
-   SAVEAS, PRINT, CLOSE, QUIT,
-   CUT, COPY, PASTE, UNDO,
-   REDO, DELETE, REPEAT, FIND,
-   FINDBACKWARD, PROPERTIES, FRONT };
-
 enum class MenuItemType { DONTKNOW, STRING, IMAGE, STRINGIMAGE, SEPARATOR };
 
 enum class MenuItemBits : sal_Int16
@@ -124,17 +118,6 @@ namespace o3tl
 template<> struct typed_flags : 
is_typed_flags {};
 }
 
-#define KEY_CODE_MASK   ((sal_uInt16)0x0FFF)
-
-// Modifier keys
-#define KEY_SHIFT   ((sal_uInt16)0x1000)
-#define KEY_MOD1((sal_uInt16)0x2000)
-#define KEY_MOD2((sal_uInt16)0x4000)
-#define KEY_MOD3((sal_uInt16)0x8000)
-#define KEY_MODIFIERS_MASK  ((sal_uInt16)0xF000)
-
-
-
 enum class ExtTimeFieldFormat
 {
 Short24H, Long24H
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread andreas kainz
 sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui |  122 +--
 sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui|  118 +-
 2 files changed, 216 insertions(+), 24 deletions(-)

New commits:
commit 6e820db2290783031f4d0877eaa39c2951bb909e
Author: andreas kainz 
Date:   Mon Sep 11 00:22:30 2017 +0200

update notebookbar_groupedbar writer with style menu

Change-Id: I408b9c8276afb38db464b3d2c0bdf4386ad75028
Reviewed-on: https://gerrit.libreoffice.org/42148
Tested-by: Jenkins 
Reviewed-by: Yousuf Philips 

diff --git a/sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui 
b/sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui
index d03f31bda2dd..4adf4b0339d8 100644
--- a/sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui
@@ -3,7 +3,6 @@
 
   
   
-  
   
 True
 False
@@ -3260,24 +3259,59 @@
   
 
 
+  
+True
+False
+.uno:StyleApply?Style:string=Subtitle&FamilyName:string=ParagraphStyles
+  
+
+
   
 True
 False
-.uno:StyleApply?Style:string=Heading%201&FamilyName:string=ParagraphStyles
+.uno:StyleApply?Style:string=Heading 
1&FamilyName:string=ParagraphStyles
   
 
 
   
 True
 False
-.uno:StyleApply?Style:string=Heading%202&FamilyName:string=ParagraphStyles
+.uno:StyleApply?Style:string=Heading 
2&FamilyName:string=ParagraphStyles
   
 
 
   
 True
 False
-.uno:StyleApply?Style:string=Heading%203&FamilyName:string=ParagraphStyles
+.uno:StyleApply?Style:string=Heading 
3&FamilyName:string=ParagraphStyles
+  
+
+
+  
+True
+False
+.uno:StyleApply?Style:string=Heading 
4&FamilyName:string=ParagraphStyles
+  
+
+
+  
+True
+False
+.uno:StyleApply?Style:string=Text 
body&FamilyName:string=ParagraphStyles
+  
+
+
+  
+True
+False
+.uno:StyleApply?Style:string=Quotations&FamilyName:string=ParagraphStyles
+  
+
+
+  
+True
+False
+.uno:StyleApply?Style:string=Preformatted 
Text&FamilyName:string=ParagraphStyles
   
 
 
@@ -3287,24 +3321,39 @@
   
 
 
-  
+  
 True
 False
-.uno:StyleApply?Style:string=Default%20Style&FamilyName:string=CharacterStyles
+.uno:StyleApply?Style:string=Default 
Style&FamilyName:string=CharacterStyles
   
 
 
-  
+  
 True
 False
 .uno:StyleApply?Style:string=Emphasis&FamilyName:string=CharacterStyles
   
 
 
-  
+  
+True
+False
+.uno:StyleApply?Style:string=Strong 
Emphasis&FamilyName:string=CharacterStyles
+  
+
+
+  
+True
+False
+.uno:StyleApply?Style:string=Quotation&FamilyName:string=CharacterStyles
+Quotation
+  
+
+
+  
 True
 False
-.uno:StyleApply?Style:string=Strong%20Emphasis&FamilyName:string=CharacterStyles
+.uno:StyleApply?Style:string=Source 
Text&FamilyName:string=CharacterStyles
   
 
 
@@ -3314,6 +3363,33 @@
   
 
 
+  
+True
+False
+.uno:StyleApply?Style:string=List 
1&FamilyName:string=NumberingStyles
+  
+
+
+  
+True
+False
+.uno:StyleApply?Style:string=Numbering 
1&FamilyName:string=NumberingStyles
+  
+
+
+  
+True
+False
+.uno:StyleApply?Style:string=Numbering 
4&FamilyName:string=NumberingStyles
+  
+
+
+  
+True
+False
+  
+
+
   
 True
 False
@@ -3334,6 +3410,26 @@
 .uno:StyleNewByExample
   
 
+
+  
+True
+False
+.uno:LoadStyles
+  
+
+
+  
+True
+False
+  
+
+
+  
+True
+False
+.uno:DesignerDialog
+  
+
   
   
 True
@@ -4127,7 +4223,7 @@
 False
 
   
-_Styles
+St_yles
 True
 True
 False
@@ -5181,7 +5277,7 @@
 False
 
   
-_Styles
+St_yles
 True
 True
 False
@@ -7697,7 +7793,7 @@
 False
 
 

[Libreoffice-commits] core.git: Changes to 'feature/tscp3'

2017-09-12 Thread Tomaž Vajngerl
New branch 'feature/tscp3' available with the following commits:
commit 5d9f7c3ece5f9c3bd9eb69b2e82e50bed89673c8
Author: Tomaž Vajngerl 
Date:   Tue Sep 12 11:29:14 2017 +0200

TSCP: Make IP Part section of the dialog functional

Change-Id: Ibb4d9ee103b135ec2a258aed538d9f899e70fe69

commit e4fe53443e712705ce876d8b99d04f26422bb0b0
Author: Tomaž Vajngerl 
Date:   Mon Sep 11 23:52:18 2017 +0200

TSCP: Add IP Part Numbers to BAF Policy and update the Dialog

Change-Id: I1d67b9449752d351b7dd154d664801bc9d2bb32c

commit 1d9e9b191016bb4560c633d85578f5f548a1215b
Author: Tomaž Vajngerl 
Date:   Mon Sep 11 14:48:42 2017 +0200

TSCP: Advanced document classification dialog

Change-Id: I4a29e3955d5fab702f14239e4435c65b10d3d234

commit 62ff8bf66399a6e97578ed948efc131084a14469
Author: Tomaž Vajngerl 
Date:   Mon Sep 11 14:39:31 2017 +0200

TSCP: prepare toolbar for the document level classification dialog

Change-Id: I421696f11c5c61174c3e1b82544878e18c998c43

commit 3dda414ff2f44ff970f4d41cf810a892458c89fb
Author: Tomaž Vajngerl 
Date:   Mon Sep 11 14:30:42 2017 +0200

TSCP: Classification Text Editor based on EditEngine

Change-Id: I70f4999fe3a787b866ee1f8959cf1eb225b81f07

commit 56005dd26d0112b2dc7dc3b045d52f50ab6a0fd8
Author: Tomaž Vajngerl 
Date:   Mon Sep 11 14:24:48 2017 +0200

TSCP: Extend the BAF policy with marking and IP parts

Change-Id: I0a30cd4eb31aefc778f4d14547a8c50c375217c3

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


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

2017-09-12 Thread Caolán McNamara
 vcl/unx/generic/printer/cpdmgr.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 778555bcbd8c9385144321c9256a29cc6294c43d
Author: Caolán McNamara 
Date:   Tue Sep 12 09:56:30 2017 +0100

unnecessary this

Change-Id: Ic5e325e12fb7270e448dd0d32e046b766e029d8e

diff --git a/vcl/unx/generic/printer/cpdmgr.cxx 
b/vcl/unx/generic/printer/cpdmgr.cxx
index 1cd48e626351..9ba7456c1a9a 100644
--- a/vcl/unx/generic/printer/cpdmgr.cxx
+++ b/vcl/unx/generic/printer/cpdmgr.cxx
@@ -168,23 +168,23 @@ void CPDManager::printerRemoved (GDBusConnection *,
 }
 
 GDBusProxy * CPDManager::getProxy(std::string target) {
-std::unordered_map::const_iterator it = this -> 
m_pBackends.find(target);
-if (it == this -> m_pBackends.end()) {
+std::unordered_map::const_iterator it = 
m_pBackends.find(target);
+if (it == m_pBackends.end()) {
 return nullptr;
 }
 return it -> second;
 }
 
 void CPDManager::addBackend(std::pair pair) {
-this -> m_pBackends.insert(pair);
+m_pBackends.insert(pair);
 }
 
 void CPDManager::addTempBackend(std::pair pair) {
-this -> m_tBackends.push_back(pair);
+m_tBackends.push_back(pair);
 }
 
 std::vector> CPDManager::getTempBackends() {
-return this -> m_tBackends;
+return m_tBackends;
 }
 
 void CPDManager::addNewPrinter(const OUString& aPrinterName, const OUString& 
aUniqueName, CPDPrinter *pDest) {
@@ -292,7 +292,7 @@ CPDManager::~CPDManager()
 g_dbus_connection_close_sync (m_pConnection,
   nullptr,
   nullptr);
-std::unordered_map::iterator it = this -> 
m_pBackends.begin();
+std::unordered_map::iterator it = 
m_pBackends.begin();
 for(; it != m_pBackends.end(); ++it)
 {
 g_object_unref(it->second);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Yash Srivastav
 vcl/Library_vcl.mk |1 
 vcl/inc/printerinfomanager.hxx |2 
 vcl/inc/unx/cpdmgr.hxx |   86 +
 vcl/unx/generic/printer/cpdmgr.cxx |  387 +
 vcl/unx/generic/printer/printerinfomanager.cxx |5 
 5 files changed, 479 insertions(+), 2 deletions(-)

New commits:
commit d2335e83c3e798cc72a9cf3b3e31eeefe4b5a39c
Author: Yash Srivastav 
Date:   Tue Jun 20 05:57:38 2017 +0530

WIP: Implement Basic Common Printing Backend

Can list printers and basic printing set up.

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

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 1a2105877de5..c1ce6db40665 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -554,6 +554,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/unx/generic/window/screensaverinhibitor \
 $(if $(filter TRUE,$(ENABLE_CUPS)),\
 vcl/unx/generic/printer/cupsmgr \
+vcl/unx/generic/printer/cpdmgr \
 vcl/unx/generic/printer/printerinfomanager \
, \
 vcl/null/printerinfomanager \
diff --git a/vcl/inc/printerinfomanager.hxx b/vcl/inc/printerinfomanager.hxx
index 7a3e1c7a0e1b..3fe420150cea 100644
--- a/vcl/inc/printerinfomanager.hxx
+++ b/vcl/inc/printerinfomanager.hxx
@@ -63,7 +63,7 @@ struct PrinterInfo : JobData
 class VCL_DLLPUBLIC PrinterInfoManager
 {
 public:
-enum class Type { Default = 0, CUPS = 1 };
+enum class Type { Default = 0, CUPS = 1, CPD = 2 };
 
 struct SystemPrintQueue
 {
diff --git a/vcl/inc/unx/cpdmgr.hxx b/vcl/inc/unx/cpdmgr.hxx
new file mode 100644
index ..d60f098435fb
--- /dev/null
+++ b/vcl/inc/unx/cpdmgr.hxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_INC_UNX_CPDMGR_HXX
+#define INCLUDED_VCL_INC_UNX_CPDMGR_HXX
+
+#include 
+#include 
+
+#if ENABLE_DBUS && ENABLE_GIO
+#include 
+#endif
+
+#include "printerinfomanager.hxx"
+#include "cupsmgr.hxx"
+
+namespace psp
+{
+
+struct CPDPrinter
+{
+std::string name;
+std::string info;
+std::string location;
+std::string make_and_model;
+std::string printer_state;
+bool is_accepting_jobs;
+GDBusProxy* backend;
+};
+
+class CPDManager : public PrinterInfoManager
+{
+#if ENABLE_DBUS && ENABLE_GIO
+GDBusConnection * m_pConnection = nullptr;
+bool m_aPrintersChanged = true;
+std::unordered_map< std::string, GDBusProxy * > m_pBackends;
+std::unordered_map< FILE*, OString, FPtrHash > m_aSpoolFiles;
+std::unordered_map< OUString, CPDPrinter *, OUStringHash > m_aCPDDestMap;
+#endif
+CPDManager();
+virtual void initialize() override;
+
+public:
+GDBusProxy * getProxy( std::string target );
+void addBackend( std::pair< std::string, GDBusProxy * > pair );
+void addDestination( std::pair< OUString, CPDPrinter * > pair );
+static CPDManager* tryLoadCPD();
+virtual ~CPDManager() override;
+virtual void setupJobContextData( JobData& rData ) override;
+/// check if the printer configuration has changed
+virtual bool checkPrintersChanged( bool bWait ) override;
+// members for administration
+// disable for CUPS
+virtual bool addPrinter( const OUString& rPrinterName, const OUString& 
rDriverName ) override;
+virtual bool removePrinter( const OUString& rPrinterName, bool bCheckOnly 
) override;
+virtual bool writePrinterConfig() override;
+virtual bool setDefaultPrinter( const OUString& rPrinterName ) override;
+
+virtual FILE* startSpool( const OUString& rPrinterName, bool bQuickCommand 
) override;
+virtual bool endSpool( const OUString& rPrinterName, const OUString& 
rJobTitle, FILE* pFile, const JobData& rDocumentJobData, bool bBanner, const 
OUString& rFaxNumber ) override;
+
+
+};
+
+} // namespace psp
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+
diff --git a/vcl/unx/generic/printer/cpdmgr.cxx 
b/vcl/unx/generic

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

2017-09-12 Thread Yash Srivastav
 include/vcl/ppdparser.hxx |3 
 vcl/inc/unx/cpdmgr.hxx|   78 +++-
 vcl/unx/generic/printer/cpdmgr.cxx|  654 ++
 vcl/unx/generic/printer/ppdparser.cxx |  124 ++
 4 files changed, 698 insertions(+), 161 deletions(-)

New commits:
commit 7fbf98d99737ac916cc2dc374f3139e2ea81e47b
Author: Yash Srivastav 
Date:   Thu Jul 27 08:11:34 2017 +0530

Add Common Printing Dialog Functionality

Summary:
These set of commits add support for the Common Printing
Dialog Backends being developed as part of GSoC'17.

All backends exist as dbus-services which can be queried
for printers, their options, etc.

Test Plan:
Firstly, without adding any CPD backend, LO printing should
work as it works now with graceful fallback to CUPS.

Next, we need to install a backend. The backend providing
CUPS interface is at g...@github.com:NilanjanaLodh/PrintDialog_Backend.git
See README.md for installation instructions.

After this, run LO and existing CUPS Printers should show up.
Also printing does send a job to cups which can be seen at:
http://localhost:631/jobs?which_jobs=completed

Due to LO shutdown not being handled properly currently, the
backend might need to be killed via `pkill print_backend_cups`

Future Plans:
* Fix shutdown actions.

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

diff --git a/include/vcl/ppdparser.hxx b/include/vcl/ppdparser.hxx
index 9212516fc8e5..ecbda153af79 100644
--- a/include/vcl/ppdparser.hxx
+++ b/include/vcl/ppdparser.hxx
@@ -60,6 +60,7 @@ struct VCL_DLLPUBLIC PPDValue
 class VCL_DLLPUBLIC PPDKey
 {
 friend class PPDParser;
+friend class CPDManager;
 
 typedef std::unordered_map< OUString, PPDValue, OUStringHash > hash_type;
 typedef std::vector< PPDValue* > value_type;
@@ -120,6 +121,7 @@ class VCL_DLLPUBLIC PPDParser
 {
 friend class PPDContext;
 friend class CUPSManager;
+friend class CPDManager;
 friend class PPDCache;
 
 typedef std::unordered_map< OUString, PPDKey*, OUStringHash > hash_type;
@@ -174,6 +176,7 @@ private:
 PPDTranslator*  m_pTranslator;
 
 PPDParser( const OUString& rFile );
+PPDParser( const OUString& rFile, std::vector keys );
 ~PPDParser();
 
 void parseOrderDependency(const OString& rLine);
diff --git a/vcl/inc/unx/cpdmgr.hxx b/vcl/inc/unx/cpdmgr.hxx
index d60f098435fb..48fb02ab3a2a 100644
--- a/vcl/inc/unx/cpdmgr.hxx
+++ b/vcl/inc/unx/cpdmgr.hxx
@@ -30,52 +30,100 @@
 #include "printerinfomanager.hxx"
 #include "cupsmgr.hxx"
 
+#define BACKEND_DIR "/usr/share/print-backends"
+#define FRONTEND_INTERFACE 
"/usr/share/dbus-1/interfaces/org.openprinting.Frontend.xml"
+#define BACKEND_INTERFACE 
"/usr/share/dbus-1/interfaces/org.openprinting.Backend.xml"
+
 namespace psp
 {
 
+class PPDParser;
+
 struct CPDPrinter
 {
-std::string name;
-std::string info;
-std::string location;
-std::string make_and_model;
-std::string printer_state;
+const char* id;
+const char* name;
+const char* info;
+const char* location;
+const char* make_and_model;
+const char* printer_state;
+const char* backend_name;
 bool is_accepting_jobs;
 GDBusProxy* backend;
 };
 
+struct CPDPrinterOption
+{
+OUString name;
+OUString default_value;
+int num_supported_values;
+std::vector supported_values;
+};
+
 class CPDManager : public PrinterInfoManager
 {
 #if ENABLE_DBUS && ENABLE_GIO
 GDBusConnection * m_pConnection = nullptr;
 bool m_aPrintersChanged = true;
+std::vector> m_tBackends;
 std::unordered_map< std::string, GDBusProxy * > m_pBackends;
 std::unordered_map< FILE*, OString, FPtrHash > m_aSpoolFiles;
 std::unordered_map< OUString, CPDPrinter *, OUStringHash > m_aCPDDestMap;
+std::unordered_map< OUString, PPDContext, OUStringHash > 
m_aDefaultContexts;
 #endif
 CPDManager();
+// Function called when CPDManager is destroyed
+virtual ~CPDManager() override;
+
+static void onNameAcquired(GDBusConnection *connection, const char* name, 
void* user_data);
+static void onNameLost (GDBusConnection *, const char *name, void*);
+static void printerAdded (GDBusConnection *connection,
+  const gchar *sender_name,
+  const gchar *object_path,
+  const gchar *interface_name,
+  const gchar *signal_name,
+  GVariant*parameters,
+  gpointeruser_data);
+static void printerRemoved (GDBusConnection *connection,
+const gchar *sender_name,
+  

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

2017-09-12 Thread Caolán McNamara
 sw/inc/dbmgr.hxx|2 +-
 sw/source/uibase/dbui/dbmgr.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d317c4e0507c9251060b3ceb399378472d354613
Author: Caolán McNamara 
Date:   Tue Sep 12 09:36:00 2017 +0100

coverity#1417678 Uncaught exception

Change-Id: I99b479d8fd8d8e9d075f4a9da01c60d9c38cb472

diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 0d27b355253d..b0da6613add0 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -285,7 +285,7 @@ class SW_DLLPUBLIC SwDBManager
 
 public:
 SwDBManager(SwDoc* pDoc);
-~SwDBManager();
+~SwDBManager() COVERITY_NOEXCEPT_FALSE;
 
 enum DBConnURITypes {
 DBCONN_UNKNOWN = 0,
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 0004fbd9e456..3737f9e0432c 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -802,7 +802,7 @@ SwDBManager::SwDBManager(SwDoc* pDoc)
 {
 }
 
-SwDBManager::~SwDBManager()
+SwDBManager::~SwDBManager() COVERITY_NOEXCEPT_FALSE
 {
 RevokeLastRegistrations();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 82/7782b060326fd43080d610dd43025f9dc71d90

2017-09-12 Thread Caolán McNamara
 82/7782b060326fd43080d610dd43025f9dc71d90 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 331070b594d7e5d54cc887090dece14b6431ae5e
Author: Caolán McNamara 
Date:   Tue Sep 12 09:49:36 2017 +0100

Notes added by 'git notes add'

diff --git a/82/7782b060326fd43080d610dd43025f9dc71d90 
b/82/7782b060326fd43080d610dd43025f9dc71d90
new file mode 100644
index ..8e5c182e7789
--- /dev/null
+++ b/82/7782b060326fd43080d610dd43025f9dc71d90
@@ -0,0 +1 @@
+ignore: aoo
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 97/e67306667c2004167fcd2ae6c556788d427f9d

2017-09-12 Thread Caolán McNamara
 97/e67306667c2004167fcd2ae6c556788d427f9d |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8ce432122dc37b605d216262dbf58554355ca500
Author: Caolán McNamara 
Date:   Tue Sep 12 09:48:32 2017 +0100

Notes added by 'git notes add'

diff --git a/97/e67306667c2004167fcd2ae6c556788d427f9d 
b/97/e67306667c2004167fcd2ae6c556788d427f9d
new file mode 100644
index ..8e5c182e7789
--- /dev/null
+++ b/97/e67306667c2004167fcd2ae6c556788d427f9d
@@ -0,0 +1 @@
+ignore: aoo
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 51/f6562584399090e5ca99225ec833f052b21a22

2017-09-12 Thread Caolán McNamara
 51/f6562584399090e5ca99225ec833f052b21a22 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 67684a010ec30cf725698919f820cf4031660b48
Author: Caolán McNamara 
Date:   Tue Sep 12 09:44:45 2017 +0100

Notes added by 'git notes add'

diff --git a/51/f6562584399090e5ca99225ec833f052b21a22 
b/51/f6562584399090e5ca99225ec833f052b21a22
new file mode 100644
index ..8e5c182e7789
--- /dev/null
+++ b/51/f6562584399090e5ca99225ec833f052b21a22
@@ -0,0 +1 @@
+ignore: aoo
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 1f/a45cc518c2fa3fe739b50cf2b2162dbe13e63a

2017-09-12 Thread Caolán McNamara
 1f/a45cc518c2fa3fe739b50cf2b2162dbe13e63a |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 855951bac289ecc5724434ea50d0f3cff7ec12b0
Author: Caolán McNamara 
Date:   Tue Sep 12 09:45:08 2017 +0100

Notes added by 'git notes add'

diff --git a/1f/a45cc518c2fa3fe739b50cf2b2162dbe13e63a 
b/1f/a45cc518c2fa3fe739b50cf2b2162dbe13e63a
new file mode 100644
index ..8e5c182e7789
--- /dev/null
+++ b/1f/a45cc518c2fa3fe739b50cf2b2162dbe13e63a
@@ -0,0 +1 @@
+ignore: aoo
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 58/896ff07594a890a75680f1c7ee0841dd823208

2017-09-12 Thread Caolán McNamara
 58/896ff07594a890a75680f1c7ee0841dd823208 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c4e0425e0eb9caf3484cb439cc85a7b6a61afd9a
Author: Caolán McNamara 
Date:   Tue Sep 12 09:44:25 2017 +0100

Notes added by 'git notes add'

diff --git a/58/896ff07594a890a75680f1c7ee0841dd823208 
b/58/896ff07594a890a75680f1c7ee0841dd823208
new file mode 100644
index ..8e5c182e7789
--- /dev/null
+++ b/58/896ff07594a890a75680f1c7ee0841dd823208
@@ -0,0 +1 @@
+ignore: aoo
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Tor Lillqvist
 sc/source/core/data/documen2.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 1638d484ff0bd0937eb42ea89f05b80d2a3dcf5d
Author: Tor Lillqvist 
Date:   Tue Sep 12 11:38:42 2017 +0300

Bin noise comment

Change-Id: I03fc61a36c6815705e496d9cbccda20cd999d6c0

diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index c54564ddd918..7aeed4215411 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -333,8 +333,6 @@ IMPL_LINK_NOARG(ScDocument, TrackTimeHdl, Timer *, void)
 TrackFormulas();
 mpShell->Broadcast( SfxHint( SfxHintId::ScDataChanged ) );
 
-//  modified...
-
 if (!mpShell->IsModified())
 {
 mpShell->SetModified();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Tamás Zolnai
 sc/inc/dpsave.hxx |4 +-
 sc/qa/unit/data/xls/pivottable_empty_item.xls |binary
 sc/qa/unit/subsequent_export-test.cxx |   39 ++
 sc/source/filter/excel/xipivot.cxx|8 -
 4 files changed, 48 insertions(+), 3 deletions(-)

New commits:
commit d44c7ffda598d4d4e8a3963133735a771ba3fe30
Author: Tamás Zolnai 
Date:   Tue Sep 12 00:30:37 2017 +0200

tdf#112337: Pivot table: empty / blank item is not imported from XLS

Change-Id: I7ed9e5cacdf6df80b2f100d040cbbeda33b085d3
Reviewed-on: https://gerrit.libreoffice.org/42181
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 

diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index 2fa247c76802..6564b9b34f30 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -327,11 +327,11 @@ public:
 bool GetRowGrand() const
 { return bool(nRowGrandMode); }
 
-void SetIgnoreEmptyRows( bool bSet );
+SC_DLLPUBLIC void SetIgnoreEmptyRows( bool bSet );
 bool GetIgnoreEmptyRows() const
 { return bool(nIgnoreEmptyMode); }
 
-void SetRepeatIfEmpty( bool bSet );
+SC_DLLPUBLIC void SetRepeatIfEmpty( bool bSet );
 bool GetRepeatIfEmpty() const
 { return bool(nRepeatEmptyMode); }
 
diff --git a/sc/qa/unit/data/xls/pivottable_empty_item.xls 
b/sc/qa/unit/data/xls/pivottable_empty_item.xls
new file mode 100755
index ..c340c06a9f9d
Binary files /dev/null and b/sc/qa/unit/data/xls/pivottable_empty_item.xls 
differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 537043c7b0c2..afe46cdd2947 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -216,6 +216,7 @@ public:
 void testPivotTableDateFieldFilter();
 void testPivotTableBoolFieldFilter();
 void testPivotTableRowColPageFieldFilter();
+void testPivotTableEmptyItem();
 
 CPPUNIT_TEST_SUITE(ScExportTest);
 CPPUNIT_TEST(test);
@@ -326,6 +327,7 @@ public:
 CPPUNIT_TEST(testPivotTableDateFieldFilter);
 CPPUNIT_TEST(testPivotTableBoolFieldFilter);
 CPPUNIT_TEST(testPivotTableRowColPageFieldFilter);
+CPPUNIT_TEST(testPivotTableEmptyItem);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -4699,6 +4701,43 @@ void ScExportTest::testPivotTableRowColPageFieldFilter()
 xDocSh->DoClose();
 }
 
+void ScExportTest::testPivotTableEmptyItem()
+{
+ScDocShellRef xDocSh = loadDoc("pivottable_empty_item.", FORMAT_XLS);
+CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
+ScDocument& rDoc = xDocSh->GetDocument();
+ScDPCollection* pDPs = rDoc.GetDPCollection();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pDPs->GetCount());
+
+// Reload and check filtering of row dimensions
+xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLS);
+CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
+ScDocument& rLoadedDoc = xDocSh->GetDocument();
+pDPs = rLoadedDoc.GetDPCollection();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pDPs->GetCount());
+const ScDPObject* pDPObj = &(*pDPs)[0];
+CPPUNIT_ASSERT(pDPObj);
+ScDPSaveData* pSaveData = pDPObj->GetSaveData();
+CPPUNIT_ASSERT(pSaveData);
+
+ScDPSaveDimension* pSaveDim = 
pSaveData->GetExistingDimensionByName("Category");
+CPPUNIT_ASSERT(pSaveDim);
+
+const ScDPSaveDimension::MemberList& rMembers = pSaveDim->GetMembers();
+CPPUNIT_ASSERT_EQUAL(size_t(3), rMembers.size());
+ScDPSaveMember* pMember = pSaveDim->GetExistingMemberByName("Fruit");
+CPPUNIT_ASSERT(pMember);
+CPPUNIT_ASSERT(pMember->HasIsVisible() && pMember->GetIsVisible());
+pMember = pSaveDim->GetExistingMemberByName("Vegetables");
+CPPUNIT_ASSERT(pMember);
+CPPUNIT_ASSERT(pMember->HasIsVisible() && !pMember->GetIsVisible());
+pMember = pSaveDim->GetExistingMemberByName("");
+CPPUNIT_ASSERT(pMember);
+CPPUNIT_ASSERT(pMember->HasIsVisible() && !pMember->GetIsVisible());
+
+xDocSh->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/filter/excel/xipivot.cxx 
b/sc/source/filter/excel/xipivot.cxx
index d045eccb4041..ae68e9fe016c 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -920,7 +920,11 @@ void XclImpPTItem::ConvertItem( ScDPSaveDimension& 
rSaveDim, ScDPObject* pObj, c
 {
 sItemName = pObj->GetFormattedString(rSaveDim.GetName(), 
rRoot.GetDoubleFromDateTime(*pCacheItem->GetDateTime()));
 }
-else // EXC_PCITEM_EMPTY || EXC_PCITEM_INVALID
+else if (pCacheItem->GetType() == EXC_PCITEM_EMPTY)
+{
+// sItemName is an empty string
+}
+else // EXC_PCITEM_INVALID
 return;
 
 // Find member and set properties
@@ -1392,6 +1396,8 @@ void XclImpPivotTable::Convert()
 aSaveData.SetColumnGrand( ::get_flag( maPTInfo.mnFlags, 
EXC_SXVIEW_COLGRAND ) );
 aSaveData.SetFilterButton( false );
 aSaveData.SetDrillDown

[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - d7/5eb34a7154f1e8aaaddf1cbc57b8fe60860d12

2017-09-12 Thread Caolán McNamara
 d7/5eb34a7154f1e8aaaddf1cbc57b8fe60860d12 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 9be4c4a4030f73cae7a0b0319b412b7f01fc63eb
Author: Caolán McNamara 
Date:   Tue Sep 12 09:37:40 2017 +0100

Notes added by 'git notes add'

diff --git a/d7/5eb34a7154f1e8aaaddf1cbc57b8fe60860d12 
b/d7/5eb34a7154f1e8aaaddf1cbc57b8fe60860d12
new file mode 100644
index ..8e5c182e7789
--- /dev/null
+++ b/d7/5eb34a7154f1e8aaaddf1cbc57b8fe60860d12
@@ -0,0 +1 @@
+ignore: aoo
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - sw/qa sw/source

2017-09-12 Thread Vasily Melenchuk
 sw/qa/extras/ooxmlexport/data/tdf103090.odt  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx|   22 +++
 sw/source/filter/ww8/docxattributeoutput.cxx |   30 ++-
 sw/source/filter/ww8/docxattributeoutput.hxx |6 ++---
 sw/source/filter/ww8/wrtw8nds.cxx|3 +-
 5 files changed, 39 insertions(+), 22 deletions(-)

New commits:
commit 68da8658dd29b7b4016f69982a81ab4b8bb3ca18
Author: Vasily Melenchuk 
Date:   Tue Sep 5 21:30:06 2017 +0300

tdf#103090 replace spaces by underscore in bookmark names for DOCX.

Bookmarks containing spaces are incorrectly interpreted by MS Word,
so spaces are replaced in bookmark names and bookmark references
in fields.

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf103090.odt 
b/sw/qa/extras/ooxmlexport/data/tdf103090.odt
new file mode 100644
index ..d264f255abb7
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf103090.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index 62af2714b9d7..4f2f878a249c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -1202,6 +1202,28 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104162, "tdf104162.docx")
 CPPUNIT_ASSERT(xTextFields->hasElements());
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf103090, "tdf103090.odt")
+{
+xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+if (!pXmlDoc)
+return;
+
+// Get bookmark name
+OUString bookmarkName = getXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:bookmarkStart", "name");
+
+// Ensure that name has no spaces
+CPPUNIT_ASSERT(bookmarkName.indexOf(" ") < 0);
+
+// Get PAGEREF field
+OUString fieldName = getXPathContent(pXmlDoc, 
"/w:document/w:body/w:p/w:r[2]/w:instrText");
+
+// Ensure that PAGEREF field refers exactly our bookmark
+OUString expectedFieldName(" PAGEREF ");
+expectedFieldName += bookmarkName;
+expectedFieldName += " \\h ";
+CPPUNIT_ASSERT_EQUAL(expectedFieldName, fieldName);
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index af9d6fd49d04..d37e9989a0e0 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1361,14 +1361,13 @@ void DocxAttributeOutput::EndRun()
 void DocxAttributeOutput::DoWriteBookmarks()
 {
 // Write the start bookmarks
-for ( std::vector< OString >::const_iterator it = 
m_rBookmarksStart.begin(), end = m_rBookmarksStart.end();
-  it != end; ++it )
+for ( const auto & it : m_rBookmarksStart )
 {
-const OString& rName = *it;
+OString rName = OUStringToOString( BookmarkToWord( it ), 
RTL_TEXTENCODING_UTF8 ).getStr();
 
 // Output the bookmark
 const sal_Int32 nId = m_nNextBookmarkId++;
-m_rOpenedBookmarksIds[rName] = nId;
+m_rOpenedBookmarksIds[it] = nId;
 m_pSerializer->singleElementNS( XML_w, XML_bookmarkStart,
 FSNS( XML_w, XML_id ), OString::number( nId ).getStr(  ),
 FSNS( XML_w, XML_name ), rName.getStr(),
@@ -1378,20 +1377,17 @@ void DocxAttributeOutput::DoWriteBookmarks()
 m_rBookmarksStart.clear();
 
 // export the end bookmarks
-for ( std::vector< OString >::const_iterator it = m_rBookmarksEnd.begin(), 
end = m_rBookmarksEnd.end();
-  it != end; ++it )
+for ( const auto & it : m_rBookmarksEnd )
 {
-const OString& rName = *it;
-
 // Get the id of the bookmark
-std::map< OString, sal_Int32 >::iterator pPos = 
m_rOpenedBookmarksIds.find( rName );
-if ( pPos != m_rOpenedBookmarksIds.end(  ) )
+auto pPos = m_rOpenedBookmarksIds.find(it);
+if ( pPos != m_rOpenedBookmarksIds.end() )
 {
 const sal_Int32 nId = ( *pPos ).second;
 m_pSerializer->singleElementNS( XML_w, XML_bookmarkEnd,
-FSNS( XML_w, XML_id ), OString::number( nId ).getStr(  ),
+FSNS( XML_w, XML_id ), OString::number( nId ).getStr(),
 FSEND );
-m_rOpenedBookmarksIds.erase( rName );
+m_rOpenedBookmarksIds.erase( it );
 }
 }
 m_rBookmarksEnd.clear();
@@ -6779,17 +6775,15 @@ void DocxAttributeOutput::WriteFormData_Impl( const 
::sw::mark::IFieldmark& rFie
 void DocxAttributeOutput::WriteBookmarks_Impl( std::vector< OUString >& 
rStarts,
 std::vector< OUString >& rEnds )
 {
-for ( std::vector< OUString >::const_iterator it = rStarts.begin(), end = 
rStarts.end(); it != end; ++it )
+for ( const auto & it : rStarts )
 {
-OString rName = OUStringToOString( *it, RTL_TEXTENCODING_UTF8 
).getStr( );
- 

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

2017-09-12 Thread Noel Grandin
 sd/qa/unit/tiledrendering/tiledrendering.cxx|2 
 sd/source/core/drawdoc3.cxx |2 
 sd/source/core/stlpool.cxx  |   28 ++--
 sd/source/filter/eppt/eppt.cxx  |2 
 sd/source/filter/eppt/epptso.cxx|6 -
 sd/source/ui/dlg/assclass.cxx   |2 
 sd/source/ui/framework/configuration/ResourceFactoryManager.cxx |2 
 sd/source/ui/func/fuinsfil.cxx  |2 
 sd/source/ui/presenter/CanvasUpdateRequester.cxx|2 
 sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx|2 
 sd/source/ui/slideshow/slideshowimpl.cxx|   50 +++-
 sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx   |3 
 sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx  |8 -
 sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx|2 
 sd/source/ui/slidesorter/controller/SlsClipboard.cxx|8 -
 sd/source/ui/unoidl/DrawController.cxx  |   60 
--
 sd/source/ui/view/DocumentRenderer.cxx  |8 -
 sd/source/ui/view/Outliner.cxx  |2 
 sd/source/ui/view/ViewShellManager.cxx  |2 
 sd/source/ui/view/WindowUpdater.cxx |2 
 sd/source/ui/view/drviews2.cxx  |2 
 sdext/source/minimizer/configurationaccess.cxx  |4 
 sdext/source/minimizer/optimizerdialogcontrols.cxx  |4 
 sdext/source/pdfimport/sax/saxattrlist.cxx  |2 
 sdext/source/presenter/PresenterAccessibility.cxx   |3 
 sdext/source/presenter/PresenterTextView.cxx|4 
 sdext/source/presenter/PresenterTheme.cxx   |   12 +-
 27 files changed, 101 insertions(+), 125 deletions(-)

New commits:
commit a185ea4ec12898574d52ebdf4a1017005745df7d
Author: Noel Grandin 
Date:   Tue Sep 12 09:45:17 2017 +0200

clang-tidy modernize-use-emplace in sd

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

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 7f85c8892d9e..c72b42a5ac5b 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -285,7 +285,7 @@ void SdTiledRenderingTest::callbackImpl(int nType, const 
char* pPayload)
 boost::property_tree::read_json(aStream, aTree);
 for (boost::property_tree::ptree::value_type& rValue : 
aTree.get_child("searchResultSelection"))
 {
-
m_aSearchResultSelection.push_back(rValue.second.get("rectangles").c_str());
+
m_aSearchResultSelection.emplace_back(rValue.second.get("rectangles").c_str());
 
m_aSearchResultPart.push_back(std::atoi(rValue.second.get("part").c_str()));
 }
 }
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index f1bdd1f78260..a2f9352fb40d 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -1595,7 +1595,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
 pMySheet->GetItemSet().ClearItem();  // Delete all
 pMySheet->GetItemSet().Put(pHisSheet->GetItemSet());
 
-aCreatedStyles.push_back( SdStyleSheetRef( 
static_cast< SdStyleSheet* >( pMySheet ) ) );
+aCreatedStyles.emplace_back( static_cast< 
SdStyleSheet* >( pMySheet ) );
 }
 
 StyleReplaceData aReplData;
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 6397dc1f5fd6..d2dcd481d1c6 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -680,7 +680,7 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& 
rSourcePool, SfxStyleFamily
 // Also set parent relation for copied style sheets
 OUString aParent( xSheet->GetParent() );
 if( !aParent.isEmpty() )
-aNewStyles.push_back( std::pair< rtl::Reference< 
SfxStyleSheetBase >, OUString >( xNewSheet, aParent ) );
+aNewStyles.emplace_back( xNewSheet, aParent );
 
 if( !bAddToList )
 {
@@ -689,14 +689,14 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& 
rSourcePool, SfxStyleFamily
 }
 xNewSheet->GetItemSet().Put( xSheet->GetItemSet() );
 
-rCreatedSheets.push_back( SdStyleSheetRef( static_cast< 
SdStyleSheet* >( xNewSheet.get() ) ) );
-aRenamedList.push_back( std::pair< OUString, OUString >( 
xSheet->GetName(), aName ) );
+rCreatedShe

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

2017-09-12 Thread Caolán McNamara
 reportdesign/source/ui/inspection/GeometryHandler.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e609ac1e5ffe1a6882551660256d9625b630d346
Author: Caolán McNamara 
Date:   Tue Sep 12 09:31:40 2017 +0100

coverity#1078469 silence Unchecked return value

Change-Id: I5c7c6328deb1c71f3a1214a4847ea97ef853c0d5

diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx 
b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 9d6ddce537ae..e1cb88d609b1 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1892,11 +1892,11 @@ bool GeometryHandler::impl_isDefaultFunction_nothrow( 
const uno::Reference< repo
 utl::TextSearch aTextSearch( aSearchOptions);
 sal_Int32 start = 0;
 sal_Int32 end = sFormula.getLength();
-if ( aTextSearch.SearchForward(sFormula,&start,&end) && start == 0 
&& end == sFormula.getLength()) // default function found
+if (aTextSearch.SearchForward(sFormula, &start, &end) && start == 
0 && end == sFormula.getLength()) // default function found
 {
 aSearchOptions.searchString = 
"\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]";
 utl::TextSearch aDataSearch( aSearchOptions);
-aDataSearch.SearchForward(sFormula,&start,&end );
+(void)aDataSearch.SearchForward(sFormula, &start, &end);
 ++start;
 _rDataField = sFormula.copy(start,end-start-1);
 _rsDefaultFunctionName = aIter->m_sName;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Tor Lillqvist
 sc/source/core/data/formulacell.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a2fd57ea3ee6c9365efc8b4d99ff543009d02245
Author: Tor Lillqvist 
Date:   Tue Sep 12 11:22:14 2017 +0300

Revert "Make two slightly mysterious static local variables thread_local"

There still is at least one tinderbox Mac with an obsolete Xcode.

This reverts commit 2652ce62f2ed4259e95578bc24af52fc48f197d5.

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 22ef81ca2495..82c5f970e911 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2658,8 +2658,8 @@ sc::MatrixEdge ScFormulaCell::GetMatrixEdge( ScAddress& 
rOrgPos ) const
 case ScMatrixMode::Formula :
 case ScMatrixMode::Reference :
 {
-static thread_local SCCOL nC;
-static thread_local SCROW nR;
+static SCCOL nC;
+static SCROW nR;
 ScAddress aOrg;
 if ( !GetMatrixOrigin( aOrg ) )
 return sc::MatrixEdge::Nothing;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: net/Socket.hpp wsd/Auth.hpp wsd/LOOLWSD.cpp wsd/Storage.hpp

2017-09-12 Thread Miklos Vajna
 net/Socket.hpp  |1 +
 wsd/Auth.hpp|1 +
 wsd/LOOLWSD.cpp |6 +++---
 wsd/Storage.hpp |2 ++
 4 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit bcb5b744b8cc56ca7d8e82b2db23146823546902
Author: Miklos Vajna 
Date:   Tue Sep 12 10:03:26 2017 +0200

net, wsd: fix -Werror,-Wdelete-non-virtual-dtor warnings

Two problem types:

- non-final class has virtual functions but no virtual dtor -> mark the
  class final
- abstract class has no virtual dtor -> add a virtual dtor

Change-Id: Iae208b65c774e6da7a3dda5e725fe07d4d589e4f

diff --git a/net/Socket.hpp b/net/Socket.hpp
index f3cf623c..3442fdb1 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -659,6 +659,7 @@ class StreamSocket;
 class SocketHandlerInterface
 {
 public:
+virtual ~SocketHandlerInterface() {}
 /// Called when the socket is newly created to
 /// set the socket associated with this ResponseClient.
 /// Will be called exactly once.
diff --git a/wsd/Auth.hpp b/wsd/Auth.hpp
index 98c0a2ce..96bcb86b 100644
--- a/wsd/Auth.hpp
+++ b/wsd/Auth.hpp
@@ -57,6 +57,7 @@ public:
 class AuthBase
 {
 public:
+virtual ~AuthBase() {}
 /// Called to acquire an access token.
 virtual const std::string getAccessToken() = 0;
 
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index dc389dcf..c2a452c7 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2280,7 +2280,7 @@ private:
 
 std::map 
ClientRequestDispatcher::StaticFileContentCache;
 
-class PlainSocketFactory : public SocketFactory
+class PlainSocketFactory final : public SocketFactory
 {
 std::shared_ptr create(const int physicalFd) override
 {
@@ -2299,7 +2299,7 @@ class PlainSocketFactory : public SocketFactory
 };
 
 #if ENABLE_SSL
-class SslSocketFactory : public SocketFactory
+class SslSocketFactory final : public SocketFactory
 {
 std::shared_ptr create(const int physicalFd) override
 {
@@ -2313,7 +2313,7 @@ class SslSocketFactory : public SocketFactory
 };
 #endif
 
-class PrisonerSocketFactory : public SocketFactory
+class PrisonerSocketFactory final : public SocketFactory
 {
 std::shared_ptr create(const int fd) override
 {
diff --git a/wsd/Storage.hpp b/wsd/Storage.hpp
index 2c619581..389c228d 100644
--- a/wsd/Storage.hpp
+++ b/wsd/Storage.hpp
@@ -83,6 +83,8 @@ public:
 LOG_DBG("Storage ctor: " << uri.toString());
 }
 
+virtual ~StorageBase() {}
+
 const std::string getUri() const { return _uri.toString(); }
 
 /// Returns the root path to the jailed file.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Stephan Bergmann
 sw/source/core/edit/edfcol.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit e5b307ba6707c5a45c6c974657e593fca458d6c6
Author: Stephan Bergmann 
Date:   Tue Sep 12 09:59:32 2017 +0200

-Werror,-Wunused-private-field

Change-Id: Ia0469a9bb87db261584733561282ab127416a9a3

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 8394a7a8abcc..d23828d35fa5 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -676,7 +676,6 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& 
rWatermark)
 class SwUndoParagraphSigning : public SwUndo
 {
 private:
-sal_uLong m_nNodeIndex;
 SwDoc* m_pDoc;
 uno::Reference m_xField;
 uno::Reference m_xParent;
@@ -697,7 +696,6 @@ SwUndoParagraphSigning::SwUndoParagraphSigning(const 
SwPosition& rPos,
const 
uno::Reference& xField,
const 
uno::Reference& xParent)
   : SwUndo(SwUndoId::PARA_SIGN_ADD, rPos.GetDoc()),
-m_nNodeIndex(rPos.nNode.GetIndex()),
 m_pDoc(rPos.GetDoc()),
 m_xField(xField),
 m_xParent(xParent)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Tor Lillqvist
 sc/source/core/data/formulacell.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2652ce62f2ed4259e95578bc24af52fc48f197d5
Author: Tor Lillqvist 
Date:   Wed Aug 16 12:43:37 2017 +0300

Make two slightly mysterious static local variables thread_local

IRC discussion about them:

tml_: erAck: any idea why in ScFormulaCell::GetMatrixEdge those nC and
nR are static?

tml_: seems to have been since initial import in 2000 (then in a
different file, and of type USHORT)

tml_: let's assume it is just random insanity

tml_: hmm, no, making them non-static actually breaks a unit test. wow

erAck: tml_: they are reused when the call is for the same matrix
origin as the last one to not have to recalculate the same thing

tml_: erAck: ah ok

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

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 82c5f970e911..22ef81ca2495 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2658,8 +2658,8 @@ sc::MatrixEdge ScFormulaCell::GetMatrixEdge( ScAddress& 
rOrgPos ) const
 case ScMatrixMode::Formula :
 case ScMatrixMode::Reference :
 {
-static SCCOL nC;
-static SCROW nR;
+static thread_local SCCOL nC;
+static thread_local SCROW nR;
 ScAddress aOrg;
 if ( !GetMatrixOrigin( aOrg ) )
 return sc::MatrixEdge::Nothing;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-12 Thread Noel Grandin
 sc/qa/unit/mark_test.cxx |  350 +--
 sc/qa/unit/subsequent_filters-test.cxx   |   34 -
 sc/qa/unit/ucalc.cxx |4 
 sc/qa/unit/ucalc_formula.cxx |4 
 sc/source/core/data/bcaslot.cxx  |4 
 sc/source/core/data/cellvalues.cxx   |2 
 sc/source/core/data/column.cxx   |4 
 sc/source/core/data/column2.cxx  |4 
 sc/source/core/data/column4.cxx  |6 
 sc/source/core/data/document.cxx |4 
 sc/source/core/data/dpcache.cxx  |2 
 sc/source/core/data/dpfilteredcache.cxx  |4 
 sc/source/core/data/dpobject.cxx |4 
 sc/source/core/data/dpoutput.cxx |2 
 sc/source/core/data/dpoutputgeometry.cxx |6 
 sc/source/core/data/dptabdat.cxx |2 
 sc/source/core/data/dptabres.cxx |6 
 sc/source/core/data/dptabsrc.cxx |4 
 sc/source/core/data/markdata.cxx |4 
 sc/source/core/data/sortparam.cxx|2 
 sc/source/core/data/table4.cxx   |4 
 sc/source/core/data/validat.cxx  |5 
 sc/source/core/opencl/formulagroupcl.cxx |6 
 sc/source/core/tool/addincol.cxx |   10 
 sc/source/core/tool/chartlock.cxx|4 
 sc/source/core/tool/compiler.cxx |2 
 sc/source/core/tool/editdataarray.cxx|2 
 sc/source/core/tool/interpr8.cxx |6 
 sc/source/core/tool/queryentry.cxx   |2 
 sc/source/core/tool/rangelst.cxx |8 
 sc/source/core/tool/reftokenhelper.cxx   |2 
 sc/source/core/tool/scmatrix.cxx |2 
 sc/source/core/tool/simplerangelist.cxx  |2 
 sc/source/core/tool/userlist.cxx |4 
 sc/source/filter/dif/difimp.cxx  |2 
 sc/source/filter/excel/exctools.cxx  |2 
 sc/source/filter/excel/namebuff.cxx  |2 
 sc/source/filter/excel/tokstack.cxx  |8 
 sc/source/filter/excel/xedbdata.cxx  |2 
 sc/source/filter/excel/xelink.cxx|6 
 sc/source/filter/excel/xepivot.cxx   |4 
 sc/source/filter/excel/xepivotxml.cxx|8 
 sc/source/filter/excel/xestring.cxx  |2 
 sc/source/filter/excel/xestyle.cxx   |4 
 sc/source/filter/excel/xichart.cxx   |2 
 sc/source/filter/excel/xicontent.cxx |2 
 sc/source/filter/excel/xiescher.cxx  |2 
 sc/source/filter/excel/xipivot.cxx   |2 
 sc/source/filter/excel/xistream.cxx  |2 
 sc/source/filter/excel/xistring.cxx  |2 
 sc/source/filter/excel/xistyle.cxx   |4 
 sc/source/filter/ftools/fapihelper.cxx   |2 
 sc/source/filter/html/htmlexp2.cxx   |4 
 sc/source/filter/oox/condformatbuffer.cxx|6 
 sc/source/filter/oox/excelvbaproject.cxx |2 
 sc/source/filter/oox/formulabase.cxx |4 
 sc/source/filter/oox/formulabuffer.cxx   |7 
 sc/source/filter/oox/formulaparser.cxx   |2 
 sc/source/filter/oox/pivottablebuffer.cxx|4 
 sc/source/filter/oox/sheetdatabuffer.cxx |8 
 sc/source/filter/oox/workbookfragment.cxx|2 
 sc/source/filter/orcus/interface.cxx |2 
 sc/source/filter/xml/pivotsource.cxx |8 
 sc/source/filter/xml/sheetdata.cxx   |   16 
 sc/source/filter/xml/xmlannoi.cxx|2 
 sc/source/filter/xml/xmlexprt.cxx|   62 +--
 sc/source/filter/xml/xmlfilti.cxx|2 
 sc/source/filter/xml/xmlstyli.cxx|2 
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |8 
 sc/source/ui/app/scmod.cxx   |2 
 sc/source/ui/cctrl/checklistmenu.cxx |2 
 sc/source/ui/dataprovider/dataprovider.cxx   |4 
 sc/source/ui/dbgui/PivotLayoutTreeListData.cxx   |2 
 sc/source/ui/dbgui/csvgrid.cxx   |8 
 sc/source/ui/dbgui/dbnamdlg.cxx  |5 
 sc/source/ui/docshell/autostyl.cxx   |2 
 sc/source/ui/docshell/externalrefmgr.cxx |6 
 sc/source/ui/miscdlgs/anyrefdg.cxx   |4 
 sc/source/ui/miscdlgs/datafdlg.cxx   |4 
 sc/source/ui/undo/undostyl.cxx   |2 
 sc/source/ui/un

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

2017-09-12 Thread Miklos Vajna
 vcl/qa/cppunit/pdfexport/data/tdf108963.odp |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx  |   55 
 vcl/source/gdi/pdfwriter_impl.cxx   |   12 +-
 3 files changed, 66 insertions(+), 1 deletion(-)

New commits:
commit da705eff910f512623a689aaf28604270fb8f1c4
Author: Miklos Vajna 
Date:   Mon Sep 11 22:38:49 2017 +0200

tdf#108963 PDF export of editeng text highlight: handle rotated text

The highlight rectangle was not rotated, handle it similar to
PDFWriterImpl::drawStrikeoutChar().

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

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf108963.odp 
b/vcl/qa/cppunit/pdfexport/data/tdf108963.odp
new file mode 100644
index ..246c0c72ae8f
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf108963.odp differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index f00f21afff55..fecdee085f31 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -66,6 +66,7 @@ public:
 void testTdf107089();
 void testTdf99680();
 void testTdf99680_2();
+void testTdf108963();
 #endif
 
 CPPUNIT_TEST_SUITE(PdfExportTest);
@@ -83,6 +84,7 @@ public:
 CPPUNIT_TEST(testTdf107089);
 CPPUNIT_TEST(testTdf99680);
 CPPUNIT_TEST(testTdf99680_2);
+CPPUNIT_TEST(testTdf108963);
 #endif
 CPPUNIT_TEST_SUITE_END();
 };
@@ -674,6 +676,59 @@ void PdfExportTest::testTdf99680_2()
 }
 }
 
+void PdfExportTest::testTdf108963()
+{
+// Import the bugdoc and export as PDF.
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf108963.odp";
+mxComponent = loadFromDesktop(aURL);
+CPPUNIT_ASSERT(mxComponent.is());
+
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+utl::TempFile aTempFile;
+aTempFile.EnableKillingFile();
+utl::MediaDescriptor aMediaDescriptor;
+aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+xStorable->storeToURL(aTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
+
+// Parse the export result with pdfium.
+SvFileStream aFile(aTempFile.GetURL(), StreamMode::READ);
+SvMemoryStream aMemory;
+aMemory.WriteStream(aFile);
+mpPdfDocument = FPDF_LoadMemDocument(aMemory.GetData(), aMemory.GetSize(), 
/*password=*/nullptr);
+CPPUNIT_ASSERT(mpPdfDocument);
+
+// The document has one page.
+CPPUNIT_ASSERT_EQUAL(1, FPDF_GetPageCount(mpPdfDocument));
+mpPdfPage = FPDF_LoadPage(mpPdfDocument, /*page_index=*/0);
+CPPUNIT_ASSERT(mpPdfPage);
+
+// Make sure there is a filled rectangle inside.
+int nPageObjectCount = FPDFPage_CountObject(mpPdfPage);
+int nYellowPathCount = 0;
+for (int i = 0; i < nPageObjectCount; ++i)
+{
+FPDF_PAGEOBJECT pPdfPageObject = FPDFPage_GetObject(mpPdfPage, i);
+if (FPDFPageObj_GetType(pPdfPageObject) != FPDF_PAGEOBJ_PATH)
+continue;
+
+unsigned int nRed = 0, nGreen = 0, nBlue = 0, nAlpha = 0;
+FPDFPath_GetFillColor(pPdfPageObject, &nRed, &nGreen, &nBlue, &nAlpha);
+if (RGB_COLORDATA(nRed, nGreen, nBlue) == COL_YELLOW)
+{
+++nYellowPathCount;
+float fLeft = 0, fBottom = 0, fRight = 0, fTop = 0;
+FPDFPageObj_GetBounds(pPdfPageObject, &fLeft, &fBottom, &fRight, 
&fTop);
+int nWidth = fRight - fLeft;
+int nHeight = fTop - fBottom;
+// This was 37 and 20, i.e. the bounding rectangle was much smaller
+// as the highlight polygon wasn't rotated.
+CPPUNIT_ASSERT_EQUAL(42, nWidth);
+CPPUNIT_ASSERT_EQUAL(39, nHeight);
+}
+}
+
+CPPUNIT_ASSERT_EQUAL(1, nYellowPathCount);
+}
 #endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION(PdfExportTest);
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 9e3db7068a25..d10671e50cb2 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6807,7 +6807,17 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, 
const OUString& rText, bool
 
aRectangle.SetSize(m_pReferenceDevice->PixelToLogic(Size(rLayout.GetTextWidth(),
 0)));
 // This includes ascent / descent.
 aRectangle.setHeight(aRefDevFontMetric.GetLineHeight());
-drawRectangle(aRectangle);
+
+LogicalFontInstance* pFontInstance = 
m_pReferenceDevice->mpFontInstance;
+if (pFontInstance->mnOrientation)
+{
+// Adapt rectangle for rotated text.
+tools::Polygon aPolygon(aRectangle);
+
aPolygon.Rotate(m_pReferenceDevice->PixelToLogic(rLayout.GetDrawPosition()), 
pFontInstance->mnOrientation);
+drawPolygon(aPolygon);
+}
+else
+drawRectangle(aRectangle);
 
   

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

2017-09-12 Thread Noel Grandin
 include/unotools/itemholderbase.hxx|   14 ---
 svl/source/config/itemholder2.cxx  |   22 +++
 svl/source/config/itemholder2.hxx  |2 -
 svtools/source/config/itemholder2.cxx  |   33 +
 svtools/source/config/itemholder2.hxx  |2 -
 unotools/source/config/itemholder1.cxx |   62 +
 unotools/source/config/itemholder1.hxx |2 -
 7 files changed, 55 insertions(+), 82 deletions(-)

New commits:
commit 7281f4a73ec3679798a6271ab5a0ad839f278e37
Author: Noel Grandin 
Date:   Mon Sep 11 17:13:03 2017 +0200

use std::unique_ptr in TItemInfo

and inline the TItems typedef

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

diff --git a/include/unotools/itemholderbase.hxx 
b/include/unotools/itemholderbase.hxx
index 13a11f7e5789..9cb50417c163 100644
--- a/include/unotools/itemholderbase.hxx
+++ b/include/unotools/itemholderbase.hxx
@@ -20,6 +20,7 @@
 #ifndef INCLUDED_UNOTOOLS_ITEMHOLDERBASE_HXX
 #define INCLUDED_UNOTOOLS_ITEMHOLDERBASE_HXX
 
+#include 
 #include 
 #include 
 
@@ -80,17 +81,20 @@ enum class EItem
 struct TItemInfo
 {
 TItemInfo()
-: pItem(nullptr)
-, eItem(EItem::UserOptions)
+: eItem(EItem::UserOptions)
 {
 }
 
-utl::detail::Options * pItem;
+TItemInfo(TItemInfo&& other)
+: pItem(std::move(other.pItem))
+, eItem(other.eItem)
+{
+}
+
+std::unique_ptr pItem;
 EItem eItem;
 };
 
-typedef ::std::vector< TItemInfo > TItems;
-
 #endif // INCLUDED_UNOTOOLS_ITEMHOLDERBASE_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/config/itemholder2.cxx 
b/svl/source/config/itemholder2.cxx
index 1511b47082a3..b809eba57b1d 100644
--- a/svl/source/config/itemholder2.cxx
+++ b/svl/source/config/itemholder2.cxx
@@ -79,12 +79,8 @@ void ItemHolder2::impl_addItem(EItem eItem)
 {
 ::osl::ResettableMutexGuard aLock(m_aLock);
 
-TItems::const_iterator pIt;
-for (  pIt  = m_lItems.begin();
-   pIt != m_lItems.end()  ;
- ++pIt)
+for ( auto const & rInfo : m_lItems )
 {
-const TItemInfo& rInfo = *pIt;
 if (rInfo.eItem == eItem)
 return;
 }
@@ -93,24 +89,18 @@ void ItemHolder2::impl_addItem(EItem eItem)
 aNewItem.eItem = eItem;
 impl_newItem(aNewItem);
 if (aNewItem.pItem)
-m_lItems.push_back(aNewItem);
+m_lItems.emplace_back(std::move(aNewItem));
 }
 
 void ItemHolder2::impl_releaseAllItems()
 {
-TItems items;
+std::vector< TItemInfo > items;
 {
 ::osl::MutexGuard aLock(m_aLock);
 items.swap(m_lItems);
 }
 
-TItems::iterator pIt;
-for (  pIt  = items.begin();
-   pIt != items.end()  ;
- ++pIt)
-{
-delete pIt->pItem;
-}
+// items will be freed when the block exits
 }
 
 void ItemHolder2::impl_newItem(TItemInfo& rItem)
@@ -118,11 +108,11 @@ void ItemHolder2::impl_newItem(TItemInfo& rItem)
 switch(rItem.eItem)
 {
 case EItem::CJKOptions :
-rItem.pItem = new SvtCJKOptions();
+rItem.pItem.reset( new SvtCJKOptions() );
 break;
 
 case EItem::CTLOptions :
-rItem.pItem = new SvtCTLOptions();
+rItem.pItem.reset( new SvtCTLOptions() );
 break;
 
 default:
diff --git a/svl/source/config/itemholder2.hxx 
b/svl/source/config/itemholder2.hxx
index 3246cc37b4dd..27d9f182ff03 100644
--- a/svl/source/config/itemholder2.hxx
+++ b/svl/source/config/itemholder2.hxx
@@ -30,7 +30,7 @@ class ItemHolder2 : private ItemHolderMutexBase
 // member
 private:
 
-TItems m_lItems;
+std::vector m_lItems;
 
 // c++ interface
 public:
diff --git a/svtools/source/config/itemholder2.cxx 
b/svtools/source/config/itemholder2.cxx
index 5989157f5e8b..2512715caab8 100644
--- a/svtools/source/config/itemholder2.cxx
+++ b/svtools/source/config/itemholder2.cxx
@@ -91,12 +91,8 @@ void ItemHolder2::impl_addItem(EItem eItem)
 {
 ::osl::ResettableMutexGuard aLock(m_aLock);
 
-TItems::const_iterator pIt;
-for (  pIt  = m_lItems.begin();
-   pIt != m_lItems.end()  ;
- ++pIt)
+for ( auto const & rInfo : m_lItems )
 {
-const TItemInfo& rInfo = *pIt;
 if (rInfo.eItem == eItem)
 return;
 }
@@ -105,26 +101,19 @@ void ItemHolder2::impl_addItem(EItem eItem)
 aNewItem.eItem = eItem;
 impl_newItem(aNewItem);
 if (aNewItem.pItem)
-m_lItems.push_back(aNewItem);
+m_lItems.emplace_back(std::move(aNewItem));
 }
 
 
 void ItemHolder2::impl_releaseAllItems()
 {
-TItems items;
+std::vector items;
 {
 ::osl::ResettableMutexGuard aLock(m_aLock);
 items.swap(m_lItems);
 }
 
-TItems::iterator