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

2017-03-10 Thread dennisroczek
 sw/source/core/layout/layact.cxx  |   23 ++-
 xmloff/source/transform/Oasis2OOo.cxx |   11 +--
 2 files changed, 15 insertions(+), 19 deletions(-)

New commits:
commit 8636e2462d9a8f7ed092246cc152030467d96515
Author: dennisroczek 
Date:   Fri Mar 10 18:57:55 2017 +

fix typo: savety --> safety

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

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 33d5334..26ae76b 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1579,7 +1579,7 @@ bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool 
bAddRect )
 if ( IsAgain() )
 return false;
 
-// for savety reasons:
+// for safety reasons:
 // check page number before formatting lowers.
 if ( pOldPage->GetPhyPageNum() > (pTab->FindPageFrame()->GetPhyPageNum() + 
1) )
 SetNextCycle( true );
@@ -1608,7 +1608,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage 
)
 
 while ( pContent && pPage->IsAnLower( pContent ) )
 {
-// If the Content didn't change, we can use a few shortcuts.
+// If the content didn't change, we can use a few shortcuts.
 const bool bFull = !pContent->IsValid() || pContent->IsCompletePaint() 
||
pContent->IsRetouche() || pContent->GetDrawObjs();
 if ( bFull )
@@ -1676,7 +1676,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage 
)
 if (  nCurNum < pPage->GetPhyPageNum() )
 m_nPreInvaPage = nCurNum;
 
-// If the Frame flowed backwards more than one page, we need to
+// If the frame flowed backwards more than one page, we need to
 // start over again from the beginning, so nothing gets left 
out.
 if ( !IsCalcLayout() && pPage->GetPhyPageNum() > nCurNum+1 )
 {
@@ -1688,7 +1688,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage 
)
 }
 }
 }
-// If the Frame moved forwards to the next page, we re-run through
+// If the frame moved forwards to the next page, we re-run through
 // the predecessor.
 // This way, we catch predecessors which are now responsible for
 // retouching, but the footers will be touched also.
@@ -1742,7 +1742,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage 
)
 m_pImp->GetShell()->AddPaintRect( pContent->Frame() );
 }
 
-// Do this if the Frame has been formatted before.
+// Do this if the frame has been formatted before.
 if ( pContent->IsTextFrame() && static_cast(pContent)->HasRepaint() &&
   IsPaint() )
 PaintContent( pContent, pPage, pContent->Frame(), 
pContent->Frame().Bottom());
@@ -1811,8 +1811,8 @@ void SwLayAction::FormatContent_( const SwContentFrame 
*pContent,
 }
 }
 
-/// Returns true if all Contents of the Fly have been processed completely.
-/// Returns false if processing has been interrupted prematurely.
+// Returns true if all Contents of the Fly have been processed completely.
+// Returns false if processing has been interrupted prematurely.
 bool SwLayAction::FormatFlyContent( const SwFlyFrame *pFly )
 {
 const SwContentFrame *pContent = pFly->ContainsContent();
@@ -1821,10 +1821,8 @@ bool SwLayAction::FormatFlyContent( const SwFlyFrame 
*pFly )
 {
 FormatContent_( pContent, pContent->FindPageFrame() );
 
-// format floating screen objects
-// at content text frame
-// pass correct page frame
-// to the object formatter.
+// format floating screen objects at content text frame
+// pass correct page frame to the object formatter.
 if ( pContent->IsTextFrame() &&
  !SwObjectFormatter::FormatObjsAtFrame(
 
*(const_cast(pContent)),
@@ -1851,7 +1849,7 @@ bool SwLayAction::FormatFlyContent( const SwFlyFrame 
*pFly )
 if ( !pFly->IsFlyInContentFrame() )
 {
 CheckIdleEnd();
-// OD 14.04.2003 #106346# - consider interrupt formatting.
+// consider interrupt formatting.
 if ( IsInterrupt() && !mbFormatContentOnInterrupt )
 return false;
 }
@@ -2191,7 +2189,6 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp 
*pI ) :
 // If there are accrued paints, it's best to simply invalidate
 // the whole window. Otherwise there would arise paint 
problems whose
 // solution would be disproportionally expensive.
-//fix(18176):
 SwViewShellImp *pViewImp = rSh.Imp();
 bool b

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

2017-03-10 Thread Zdeněk Crhonek
 basic/qa/cppunit/test_vba.cxx |2 
 basic/qa/vba_tests/cint.vb|  105 ++
 basic/qa/vba_tests/clng.vb|   97 ++
 3 files changed, 204 insertions(+)

New commits:
commit c0ed8e953745c65ea339b2498551894fbae70def
Author: Zdeněk Crhonek 
Date:   Fri Mar 10 21:27:07 2017 +0100

add VBA test CINT,CLNG functions tests

Change-Id: I69f0144006e4ed226e8b158c0cc9f60dda0a9184
Reviewed-on: https://gerrit.libreoffice.org/35060
Tested-by: Jenkins 
Reviewed-by: Zdenek Crhonek 

diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index 7bf804a..5899759 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -65,6 +65,8 @@ void VBATest::testMiscVBAFunctions()
 "cdbl.vb",
 "choose.vb",
 "cos.vb",
+"cint.vb",
+"clng.vb",
 #ifndef WIN32 // missing 64bit Currency marshalling.
 "win32compat.vb", // windows compatibility hooks.
 #endif
diff --git a/basic/qa/vba_tests/cint.vb b/basic/qa/vba_tests/cint.vb
new file mode 100644
index 000..cf6ac009
--- /dev/null
+++ b/basic/qa/vba_tests/cint.vb
@@ -0,0 +1,105 @@
+Option VBASupport 1
+Option Explicit
+Dim passCount As Integer
+Dim failCount As Integer
+Dim result As String
+
+Function doUnitTest() As String
+result = verify_testCInt()
+If failCount <> 0 And passCount > 0 Then
+doUnitTest = result
+Else
+doUnitTest = "OK"
+End If
+End Function
+
+
+
+Function verify_testCInt() As String
+
+passCount = 0
+failCount = 0
+
+result = "Test Results" & Chr$(10) & "" & Chr$(10)
+
+Dim testName As String
+Dim TestDateTime As Date
+Dim TestStr As String
+Dim nr1, nr2 As Integer   'variables for test
+testName = "Test CInt function"
+
+
+On Error GoTo errorHandler
+
+nr2 = -1
+nr1 = CInt(-1.1)
+TestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
+
+nr2 = -1
+nr1 = CInt(-1.1)
+TestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
+
+nr2 = -2
+nr1 = CInt(-1.9)
+TestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
+
+nr2 = 0
+nr1 = CInt(0.2)
+TestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
+
+REM In excel:
+REMIf the fraction is less than or equal to .5, the result will round down.
+REMIf the fraction is greater than .5, the result will round up.
+
+REMnr2 = 0
+REMnr1 = CInt(0.5)
+REMTestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
+
+REMnr2 = 2
+REMnr1 = CInt(1.5)
+REMTestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
+
+REMnr2 = 2
+REMnr1 = CInt(2.5)
+REMTestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
+
+nr2 = 11
+nr1 = CInt(10.51)
+TestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
+
+nr2 = 30207
+nr1 = CInt("&H75FF")
+TestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
+
+nr2 = 1876
+nr1 = CInt("&H754")
+TestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
+
+result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & 
"Tests failed: " & failCount & Chr$(10)
+verify_testCInt = result
+
+Exit Function
+errorHandler:
+TestLog_ASSERT (False), testName & ": hit error handler"
+End Function
+
+Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional 
testComment As String)
+
+If assertion = True Then
+passCount = passCount + 1
+Else
+Dim testMsg As String
+If Not IsMissing(testId) Then
+testMsg = testMsg + " : " + testId
+End If
+If Not IsMissing(testComment) And Not (testComment = "") Then
+testMsg = testMsg + " (" + testComment + ")"
+End If
+
+result = result & Chr$(10) & " Failed: " & testMsg
+failCount = failCount + 1
+End If
+
+End Sub
+
+
diff --git a/basic/qa/vba_tests/clng.vb b/basic/qa/vba_tests/clng.vb
new file mode 100644
index 000..32d81f6
--- /dev/null
+++ b/basic/qa/vba_tests/clng.vb
@@ -0,0 +1,97 @@
+Option VBASupport 1
+Option Explicit
+Dim passCount As Integer
+Dim failCount As Integer
+Dim result As String
+
+Function doUnitTest() As String
+result = verify_testCLng()
+If failCount <> 0 And passCount > 0 Then
+doUnitTest = result
+Else
+doUnitTest = "OK"
+End If
+End Function
+
+
+
+Function verify_testCLng() As String
+
+passCount = 0
+failCount = 0
+
+result = "Test Results" & Chr$(10) & "" & Chr$(10)
+
+Dim testName As String
+Dim TestDateTime As Date
+Dim TestStr As String
+Dim nr1, nr2 As Long   'variables for test
+testName = "Test CLng function"
+
+
+On Error GoTo errorHandler
+
+nr2 = -1
+nr1 = CLng(-1.1)
+TestLog_ASSERT nr1 = nr2, "the return CLng is: " & nr1
+
+nr2 = -1
+nr1 = CLng(-1.1)
+TestLog_ASSERT nr1 = nr2, "the return CLng is: " & nr1
+
+nr2 = -2
+nr1 = CLng(-1.9)
+TestLog_ASSERT nr1 = nr2, "the 

[Libreoffice-commits] core.git: 2 commits - accessibility/source basic/source comphelper/source compilerplugins/clang connectivity/source cpputools/source cui/source

2017-03-10 Thread Andrea Gelmini
 accessibility/source/extended/accessiblelistboxentry.cxx   |2 
 basic/source/sbx/sbxscan.cxx   |   81 
--
 comphelper/source/misc/backupfilehelper.cxx|   18 +-
 compilerplugins/clang/stringstatic.cxx |4 
 connectivity/source/drivers/evoab2/NResultSetMetaData.hxx  |2 
 connectivity/source/drivers/jdbc/Timestamp.cxx |2 
 connectivity/source/drivers/kab/KResultSetMetaData.hxx |2 
 connectivity/source/drivers/macab/MacabResultSetMetaData.hxx   |2 
 connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx |2 
 connectivity/source/drivers/postgresql/pq_statement.cxx|2 
 connectivity/source/inc/ado/ADatabaseMetaDataResultSetMetaData.hxx |2 
 cpputools/source/unoexe/unoexe.cxx |2 
 cui/source/tabpages/swpossizetabpage.cxx   |8 
 13 files changed, 62 insertions(+), 67 deletions(-)

New commits:
commit 0f0ebddb81a7c5b83bdf8d050bfe38dad26f0bfd
Author: Andrea Gelmini 
Date:   Fri Mar 10 18:55:12 2017 +0100

Fix typos

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

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx 
b/accessibility/source/extended/accessiblelistboxentry.cxx
index 2eb8f39..8f0b1ec 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -439,7 +439,7 @@ namespace accessibility
 {
 return getListBox()->GetEntryLongDescription( pEntry );
 }
-//want to cout the real column nubmer in the list box.
+//want to cout the real column number in the list box.
 sal_uInt16 iRealItemCount = 0;
 sal_uInt16 iCount = 0;
 sal_uInt16 iTotleItemCount = pEntry->ItemCount();
diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index 5c65dde..7e5c2db 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -1869,7 +1869,7 @@ namespace comphelper
 // ensure dir and file vectors
 fillDirFileInfo();
 
-// proccess all files in question recursively
+// process all files in question recursively
 if (!maDirs.empty() || !maFiles.empty())
 {
 bDidPush = tryPush_Files(
@@ -1911,7 +1911,7 @@ namespace comphelper
 // ensure dir and file vectors
 fillDirFileInfo();
 
-// proccess all files in question recursively
+// process all files in question recursively
 if (!maDirs.empty() || !maFiles.empty())
 {
 bPopPossible = isPopPossible_files(
@@ -1936,7 +1936,7 @@ namespace comphelper
 // ensure dir and file vectors
 fillDirFileInfo();
 
-// proccess all files in question recursively
+// process all files in question recursively
 if (!maDirs.empty() || !maFiles.empty())
 {
 bDidPop = tryPop_files(
@@ -2258,7 +2258,7 @@ namespace comphelper
 bool bDidPush(false);
 osl::Directory::createPath(rTargetURL);
 
-// proccess files
+// process files
 for (const auto& file : rFiles)
 {
 bDidPush |= tryPush_file(
@@ -2268,7 +2268,7 @@ namespace comphelper
 file.second);
 }
 
-// proccess dirs
+// process dirs
 for (const auto& dir : rDirs)
 {
 OUString aNewSourceURL(rSourceURL + "/" + dir);
@@ -2339,7 +2339,7 @@ namespace comphelper
 {
 bool bPopPossible(false);
 
-// proccess files
+// process files
 for (const auto& file : rFiles)
 {
 bPopPossible |= isPopPossible_file(
@@ -2349,7 +2349,7 @@ namespace comphelper
 file.second);
 }
 
-// proccess dirs
+// process dirs
 for (const auto& dir : rDirs)
 {
 OUString aNewSourceURL(rSourceURL + "/" + dir);
@@ -2406,7 +2406,7 @@ namespace comphelper
 {
 bool bDidPop(false);
 
-// proccess files
+// process files
 for (const auto& file : rFiles)
 {
 bDidPop |= tryPop_file(
@@ -2416,7 +2416,7 @@ namespace comphelper
 file.second);
 }
 
-// proccess dirs
+// process dirs
 for (const auto& dir : rDirs)
 {
 OUString aNewSourceURL(rSourceURL + "/" + dir);
diff --git a/compilerplugins/clang/stringstatic.cxx 
b/compilerplugins/clang/stringstatic.cxx
index d251ed8..e82d173 100644
--- a/compilerplugins/clang/stringstatic.cxx
+++ b/compi

[Libreoffice-commits] core.git: dbaccess/source editeng/source filter/source framework/inc framework/source

2017-03-10 Thread Andrea Gelmini
 dbaccess/source/ui/inc/sbagrid.hrc   |2 +-
 editeng/source/misc/hangulhanja.cxx  |2 +-
 filter/source/config/cache/typedetection.cxx |2 +-
 filter/source/flash/swfwriter2.cxx   |2 +-
 filter/source/msfilter/msdffimp.cxx  |2 +-
 framework/inc/dispatch/dispatchprovider.hxx  |2 +-
 framework/inc/dispatch/popupmenudispatcher.hxx   |2 +-
 framework/inc/helper/persistentwindowstate.hxx   |2 +-
 framework/inc/interaction/quietinteraction.hxx   |2 +-
 framework/inc/macros/xinterface.hxx  |6 +++---
 framework/inc/recording/dispatchrecordersupplier.hxx |2 +-
 framework/source/dispatch/dispatchprovider.cxx   |2 +-
 framework/source/interaction/quietinteraction.cxx|4 ++--
 framework/source/services/autorecovery.cxx   |4 ++--
 framework/source/services/desktop.cxx|6 +++---
 framework/source/services/frame.cxx  |2 +-
 16 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit fba66b325c493567126b23d481d75ee00dc9c30d
Author: Andrea Gelmini 
Date:   Fri Mar 10 18:58:02 2017 +0100

Fix typos

Change-Id: I19d30a1ef4236dbe0a0053dad67a5ba7b1586fc8
Reviewed-on: https://gerrit.libreoffice.org/35054
Tested-by: Jenkins 
Reviewed-by: Johnny_M 
Reviewed-by: Noel Grandin 

diff --git a/dbaccess/source/ui/inc/sbagrid.hrc 
b/dbaccess/source/ui/inc/sbagrid.hrc
index 4c4d3a0..72fcdc4 100644
--- a/dbaccess/source/ui/inc/sbagrid.hrc
+++ b/dbaccess/source/ui/inc/sbagrid.hrc
@@ -34,7 +34,7 @@
 
 // Spaltenbreite
 #define SBA_DEF_FLTCOLWIDTH (SBA_WHICHID_START + 146) // 
SbaColRowSizeItem
-// Feldtyp
+// FieldType
 #define SBA_DEF_FLTTYPE (SBA_WHICHID_START + 147) // 
DataFieldTypeItem
 // Feldlänge
 #define SBA_DEF_FLTLENGTH   (SBA_WHICHID_START + 148) // SfxUInt32Item
diff --git a/editeng/source/misc/hangulhanja.cxx 
b/editeng/source/misc/hangulhanja.cxx
index 53a45a4..54bdaea 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -78,7 +78,7 @@ namespace editeng
 
 // additions for Chinese simplified / traditional conversion
 HHC::ConversionType m_eConvType;// conversion type 
(Hangul/Hanja, simplified/traditional Chinese,...)
-LanguageTypem_nSourceLang;  // just a 'copy' of 
m_aSourceLocale in order in order to
+LanguageTypem_nSourceLang;  // just a 'copy' of 
m_aSourceLocale in order to
 // save the applications 
from always converting to this
 // type in their 
implementations
 LanguageTypem_nTargetLang;  // target language of new 
replacement text
diff --git a/filter/source/config/cache/typedetection.cxx 
b/filter/source/config/cache/typedetection.cxx
index 6e4ef61..42d3d69 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -1109,7 +1109,7 @@ OUString 
TypeDetection::impl_askUserForTypeAndFilterIfAllowed(utl::MediaDescript
 // type and return it. (BTW: We must update the media descriptor here 
...)
 // The user selected explicitly a filter ... but normaly we are 
interested on
 // a type here only. But we must be sure, that the selected filter is 
used
-// too and no ambigous filter registration disturb us .-)
+// too and no ambiguous filter registration disturb us .-)
 
 OUString sFilter = aRequest.getFilter();
 if (!impl_validateAndSetFilterOnDescriptor(rDescriptor, sFilter))
diff --git a/filter/source/flash/swfwriter2.cxx 
b/filter/source/flash/swfwriter2.cxx
index 185bd60..c9ee555 100644
--- a/filter/source/flash/swfwriter2.cxx
+++ b/filter/source/flash/swfwriter2.cxx
@@ -255,7 +255,7 @@ void Tag::writeRect( SvStream& rOut, const Rectangle& rRect 
)
 minY = rRect.Bottom();
 }
 
-// AS: Figure out the maximum nubmer of bits required to represent any of 
the
+// AS: Figure out the maximum number of bits required to represent any of 
the
 //  rectangle coordinates.  Since minX or minY could be negative, they 
could
 //  actually require more bits than maxX or maxY.
 // AS: Christian, can they be negative, or is that a wasted check?
diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index b3a9cd1..2393e28 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5978,7 +5978,7 @@ bool SvxMSDffManager::GetShapeGroupContainerData( 
SvStream& rSt,
 {
 sal_uInt8 nVer;sal_uInt16 nInst;sal_uInt16 nFbt;sal_uInt32 nLength;
 long nStartShapeGroupCont = rSt.Tell();
-// We are now in a shape group container (conditionally mulitple per page)
+// We are now in a shape group container (cond

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

2017-03-10 Thread Justin Luth
 dev/null |binary
 sw/qa/extras/ooxmlexport/data/headerfooter-link-to-prev.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx|   99 +++
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |   99 ---
 4 files changed, 99 insertions(+), 99 deletions(-)

New commits:
commit b4fdb46a75731b22eb85671af4773e5bc9208f85
Author: Justin Luth 
Date:   Fri Mar 10 11:09:21 2017 +0300

ooxmlimport: unit test for tdf#93640 is round-trippable

Since this test round-trips well, move it to ooxmlexport

Change-Id: I95038e27a5779687152cca2bd31fe5719cac65b6
Reviewed-on: https://gerrit.libreoffice.org/35034
Tested-by: Jenkins 
Reviewed-by: Justin Luth 

diff --git a/sw/qa/extras/ooxmlimport/data/headerfooter-link-to-prev.docx 
b/sw/qa/extras/ooxmlexport/data/headerfooter-link-to-prev.docx
similarity index 100%
rename from sw/qa/extras/ooxmlimport/data/headerfooter-link-to-prev.docx
rename to sw/qa/extras/ooxmlexport/data/headerfooter-link-to-prev.docx
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index a54d023..99b27441 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -88,6 +88,105 @@ 
DECLARE_OOXMLEXPORT_TEST(testTdf46940_dontEquallyDistributeColumns, "tdf46940_do
 CPPUNIT_ASSERT_EQUAL(true, getProperty(xTextSections->getByIndex(3), 
"DontBalanceTextColumns"));
 }
 
+// base class to supply a helper method for testHFLinkToPrev
+class testHFBase : public Test
+{
+protected:
+OUString
+getHFText(const uno::Reference& xPageStyle,
+  const OUString &sPropName)
+{
+auto xTextRange = getProperty< uno::Reference >(
+xPageStyle, sPropName);
+return xTextRange->getString();
+}
+};
+
+DECLARE_SW_EXPORT_TEST(testHFLinkToPrev, "headerfooter-link-to-prev.docx", 
nullptr, testHFBase)
+{
+uno::Reference xPageStyles = 
getStyles("PageStyles");
+
+// get a page cursor
+uno::Reference xModel(mxComponent, uno::UNO_QUERY);
+uno::Reference xTextViewCursorSupplier(
+xModel->getCurrentController(), uno::UNO_QUERY);
+uno::Reference xCursor(
+xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
+
+// get LO page style for page 1, corresponding to docx section 1 first page
+xCursor->jumpToFirstPage();
+OUString pageStyleName = getProperty(xCursor, "PageStyleName");
+uno::Reference xPageStyle(
+xPageStyles->getByName(pageStyleName), uno::UNO_QUERY);
+// check page 1 header & footer text
+CPPUNIT_ASSERT_EQUAL(getHFText(xPageStyle, "HeaderText"),
+OUString("First page header for all sections"));
+CPPUNIT_ASSERT_EQUAL(getHFText(xPageStyle, "FooterText"),
+OUString("First page footer for section 1 only"));
+
+// get LO page style for page 2, corresponding to docx section 1
+xCursor->jumpToPage(2);
+pageStyleName = getProperty(xCursor, "PageStyleName");
+xPageStyle.set( xPageStyles->getByName(pageStyleName), uno::UNO_QUERY );
+// check header & footer text
+CPPUNIT_ASSERT_EQUAL(getHFText(xPageStyle, "HeaderTextLeft"),
+OUString("Even page header for section 1 only"));
+CPPUNIT_ASSERT_EQUAL(getHFText(xPageStyle, "FooterTextLeft"),
+OUString("Even page footer for all sections"));
+CPPUNIT_ASSERT_EQUAL(getHFText(xPageStyle, "HeaderText"),
+OUString("Odd page header for all sections"));
+CPPUNIT_ASSERT_EQUAL(getHFText(xPageStyle, "FooterText"),
+OUString("Odd page footer for section 1 only"));
+
+// get LO page style for page 4, corresponding to docx section 2 first page
+xCursor->jumpToPage(4);
+pageStyleName = getProperty(xCursor, "PageStyleName");
+xPageStyle.set( xPageStyles->getByName(pageStyleName), uno::UNO_QUERY );
+// check header & footer text
+CPPUNIT_ASSERT_EQUAL(getHFText(xPageStyle, "HeaderText"),
+OUString("First page header for all sections"));
+CPPUNIT_ASSERT_EQUAL(getHFText(xPageStyle, "FooterText"),
+OUString("First page footer for sections 2 and 3 only"));
+
+// get LO page style for page 5, corresponding to docx section 2
+xCursor->jumpToPage(5);
+pageStyleName = getProperty(xCursor, "PageStyleName");
+xPageStyle.set( xPageStyles->getByName(pageStyleName), uno::UNO_QUERY );
+// check header & footer text
+CPPUNIT_ASSERT_EQUAL(getHFText(xPageStyle, "HeaderTextLeft"),
+OUString("Even page header for sections 2 and 3 only"));
+CPPUNIT_ASSERT_EQUAL(getHFText(xPageStyle, "FooterTextLeft"),
+OUString("Even page footer for all sections"));
+CPPUNIT_ASSERT_EQUAL(getHFText(xPageStyle, "HeaderText"),
+OUString("Odd page header for all sections"));
+CPPUNIT_ASSERT_EQUAL(getHFText(xPageStyle, "FooterText"),
+OUString("Odd page footer for sections 2 and 3 only"));
+
+// get LO page 

[Libreoffice-commits] core.git: download.lst

2017-03-10 Thread Khaled Hosny
 download.lst |   57 -
 1 file changed, 57 deletions(-)

New commits:
commit 423cc764291bc07acb9d4d2414151b08de232a0f
Author: Khaled Hosny 
Date:   Sat Mar 11 03:13:33 2017 +0200

If these *_MD5SUM are not used, why keep them?

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

diff --git a/download.lst b/download.lst
index ec11dfc..cd3116a 100644
--- a/download.lst
+++ b/download.lst
@@ -1,69 +1,51 @@
 export ABW_SHA256SUM := 
7a3d3415cf82ab9894f601d1b3057c4615060304d5279efdec6275e01b96a199
-export ABW_MD5SUM := 7a3815b506d064313ba309617b6f5a0b
 export ABW_TARBALL := libabw-0.1.1.tar.bz2
 export APACHE_COMMONS_LOGGING_SHA256SUM := 
49665da5a60d033e6dff40fe0a7f9173e886ae859ce6096c1afe34c48b677c81
-export APACHE_COMMONS_LOGGING_MD5SUM := ce977548f1cbf46918e93cd38ac35163
 export APACHE_COMMONS_LOGGING_TARBALL := commons-logging-1.2-src.tar.gz
 export APR_SHA256SUM := 
1af06e1720a58851d90694a984af18355b65bb0d047be03ec7d659c746d6dbdb
-export APR_MD5SUM := 98492e965963f852ab29f9e61b2ad700
 export APR_TARBALL := apr-1.5.2.tar.gz
 export APR_UTIL_SHA256SUM := 
976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19
-export APR_UTIL_MD5SUM := 866825c04da827c6e5f53daff5569f42
 export APR_UTIL_TARBALL := apr-util-1.5.4.tar.gz
 export BOOST_SHA256SUM := 
beae2529f759f6b3bf3f4969a19c2e9d6f0c503edcb2de4a61d1428519fcb3b0
-export BOOST_MD5SUM := 1c837ecd990bb022d07e7aab32b09847
 export BOOST_TARBALL := boost_1_63_0.tar.bz2
 export BREAKPAD_SHA256SUM := 
7060149be16a8789b0ccf596bdeaf63115f03f520acb508f72a14686fb311cb9
 export BREAKPAD_TARBALL := breakpad.zip
-export BREAKPAD_MD5SUM := 415ce291aa6f2ee1d5db7b62bf62ade8
 export BSH_SHA256SUM := 
9e93c73e23aff644b17dfff65674c14150e7f3b38b19635e622235e01c96
 export BSH_TARBALL := beeca87be45ec87d241ddd0e1bad80c1-bsh-2.0b6-src.zip
 export BZIP2_SHA256SUM := 
a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd
 export BZIP2_TARBALL := 00b516f4704d4a7cb50a1d97e6e8e15b-bzip2-1.0.6.tar.gz
 export CAIRO_SHA256SUM := 
d1f2d98ae9a4111564f6de4e013d639cf77155baf2556582295a0f00a9bc5e20
-export CAIRO_MD5SUM := 4ef0db2eacb271c74f8a3fd87822aa98
 export CAIRO_TARBALL := cairo-1.14.8.tar.xz
 export CDR_SHA256SUM := 
5160bbbfefe52bd4880840fad2b07a512813e37bfaf8ccac062fca238f230f4d
-export CDR_MD5SUM := e369f30b5b861ee0fc4f9e6cbad701fe
 export CDR_TARBALL := libcdr-0.1.3.tar.bz2
 export CLUCENE_SHA256SUM := 
ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab
 export CLUCENE_TARBALL := 
48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz
 export CMIS_SHA256SUM := 
6acbdf22ecdbaba37728729b75bfc085ee5a4b49a6024757cfb86ccd3da27b0e
-export CMIS_MD5SUM := 3270154f0f40d86fce849b161f914101
 export CMIS_TARBALL :=libcmis-0.5.1.tar.gz
 export COINMP_SHA256SUM := 
86c798780b9e1f5921fe4efe651a93cb420623b45aa1fdff57af8c37f116113f
-export COINMP_MD5SUM := 1cce53bf4b40ae29790d2c5c9f8b1129
 export COINMP_TARBALL := CoinMP-1.7.6.tgz
 export COLLADA2GLTF_SHA256SUM := 
b0adb8e71aef80751b999c9c055e419a625c4a05184e407aef2aee28752ad8cb
 export COLLADA2GLTF_TARBALL := 
4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2
 export CPPUNIT_SHA256SUM := 
3f47d246e3346f2ba4d7c9e882db3ad9ebd3fcbd2e8b732f946e0e3eeb9f429f
-export CPPUNIT_MD5SUM := d1c6bdd5a76c66d2c38331e2d287bc01
 export CPPUNIT_TARBALL := cppunit-1.13.2.tar.gz
 export CT2N_SHA256SUM := 
71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e6453f4d85de3
 export CT2N_TARBALL := 
1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt
 export CURL_SHA256SUM := 
a8984e8b20880b621f61a62d95ff3c0763a3152093a9f9ce4287cfd614add6ae
-export CURL_MD5SUM := 4e1ef056e117b4d25f4ec42ac609c0d4
 export CURL_TARBALL := curl-7.52.1.tar.gz
 export EBOOK_SHA256SUM := 
b710a57c633205b933015474d0ac0862253d1c52114d535dd09b20939a0d1850
-export EBOOK_MD5SUM := 6b48eda57914e6343efebc9381027b78
 export EBOOK_TARBALL := libe-book-0.1.2.tar.bz2
 export EPOXY_SHA256SUM := 
1d8668b0a259c709899e1c4bab62d756d9002d546ce4f59c9665e2fc5f001a64
-export EPOXY_MD5SUM := 96f6620a9b005a503e7b44b0b528287d
 export EPOXY_TARBALL := libepoxy-1.3.1.tar.bz2
 export EPM_SHA256SUM := 
b3fc4c5445de6c9a801504a3ea3efb2d4ea9d5a622c9427e716736e7713ddb91
 export EPM_TARBALL := 3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz
 export ETONYEK_SHA256SUM := 
032f53e8d7691e48a73ddbe74fa84c906ff6ff32a33e6ee2a935b6fdb6aecb78
-export ETONYEK_MD5SUM := 77ff46936dcc83670557274e7dd2aa33
 export ETONYEK_VERSION_MICRO := 6
 export ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.bz2
 export EXPAT_SHA256SUM := 
d9e50ff2d19b3538bd2127902a89987474e1a4db8e43a66a4d1a712ab9a504ff
-export EXPAT_MD5SUM := 2f47841c829facb346eb6e3fab5212e2
 export EXPAT_TARBALL := expat-2.2.0.tar.bz2
 export FIREBIRD_SHA256SUM := 
6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5

Re: A research study on abandoned code reviews

2017-03-10 Thread Jan Iversen
Hi

Copying our mailing list, to make the answer publicly available.

Sounds like an interesting topic, but looking at the one you asked me about it 
seems to me, you look at the abandoned ones only in a statistical sense, that 
will not do. I am actually curious, why do you look at abandoned patches, the 
right question (at least to me) is “why do some patches not get merged”, for 
LibreOffice the result is the same, but for other projects it is very different.

33697 was submitted and abandoned by myself, because it had some problems…you 
will see a lot of people submit patches, to get them tested on our build boxes, 
and if there is a problem they either submit a second patch set or (as in my 
case) abandon the patch and submit a new one.

I trust you are also aware that TDF (in contrary to most other foundations) 
actively monitor gerrit. Patches who are untouched for 4 weeks, get a “polite 
ping”, and 4 weeks later still untouched gets abandoned. This procedure gives a 
lot more abandoned patches compared to other projects.

If you speak generally you need to look more carefully at the reasons.

1) Submitter abandons patch. This is quite natural as described above.

2) People with committer status, typically submit a patch and forget it, so the 
system catches it and they typically abandon it, when they see the “polite 
ping”.

3) New people submit a patch (some without having compiled the code) receive a 
review and decide not to continue. This is only true for first time patches.

4) New people do a good job of making their patch work, but get review comments 
e.g. due to the user experience not being correct, and stop working

Again compared to other projects, we ensure that all patches get reviewed, so 
no patch is abandoned due to lack of review (something I see happening in 
another Foundation I work with).

Have fun with your study, and please share the outcome on our dev list, and I 
think it will be interesting reading.

rgds
jan I.


> On 10 Mar 2017, at 07:00, w...@zju.edu.cn wrote:
> 
> Dear jan, 
> 
> Sorry to bother you!
> 
> I am a Ph.D student in Zhejiang University, China. Currently, we are doing a 
> research study on identifying root causes of abandoned code reviews. As we 
> noticed, code reviews are abandoned for various reasons, e.g., build failed, 
> wrong branch, duplicate patch, and so on. 
> 
> Since you are an expert in libreoffice, and I'm writing to ask you the reason 
> why the following code review was abandoned 
> (https://gerrit.libreoffice.org/#/c/33697/ 
> ). Also, it would be great if you 
> can tell us some more reasons why a code review is abandoned:-) I would be 
> really grateful if you could reply me.
> 
> Please kindly advice.
> 
> Thank you very much for your help and happy holidays!
> 
> Yours sincerely,
> 
> Qingye Wang

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


Re: contributing to LibreOffice Online

2017-03-10 Thread Aditya Dewan
Hi,

Sorry to bother you again, i am facing some issues while building the core(
'autogen.sh' ran fine. It had some dependency issues, but i resolved them
and it ran fine.).
The build was taking a lot of time , so i left it running overnight.
The following error came up and the build failed.


[CXX] sfx2/source/appl/appbaslib.cxx
> [CXX] sfx2/source/appl/appcfg.cxx
> [CXX] sfx2/source/appl/appchild.cxx
> [CXX] sfx2/source/appl/appdata.cxx
> In file included from
> /media/dewan/Work/gsoc/core/sfx2/source/appl/app.cxx:65:0:
> /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
> specialization of ‘template struct o3tl::typed_flags’ in different
> namespace [-fpermissive]
>  template<> struct o3tl::typed_flags:
>  ^
> In file included from
> /media/dewan/Work/gsoc/core/include/vcl/bitmap.hxx:31:0,
>  from
> /media/dewan/Work/gsoc/core/include/vcl/bitmapex.hxx:24,
>  from /media/dewan/Work/gsoc/core/include/vcl/image.hxx:27,
>  from /media/dewan/Work/gsoc/core/include/sfx2/app.hxx:27,
>  from
> /media/dewan/Work/gsoc/core/sfx2/source/appl/app.cxx:22:
> /media/dewan/Work/gsoc/core/include/o3tl/typed_flags_set.hxx:50:29: error:
>   from definition of ‘template struct o3tl::typed_flags’
> [-fpermissive]
>  template struct typed_flags {};
>  ^
> In file included from
> /media/dewan/Work/gsoc/core/include/sfx2/dispatch.hxx:26:0,
>  from
> /media/dewan/Work/gsoc/core/sfx2/source/appl/appbas.cxx:60:
> /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
> specialization of ‘template struct o3tl::typed_flags’ in different
> namespace [-fpermissive]
>  template<> struct o3tl::typed_flags:
>  ^
> In file included from
> /media/dewan/Work/gsoc/core/include/basic/sbxdef.hxx:27:0,
>  from
> /media/dewan/Work/gsoc/core/include/basic/sbxfac.hxx:23,
>  from
> /media/dewan/Work/gsoc/core/sfx2/source/appl/appbas.cxx:32:
> /media/dewan/Work/gsoc/core/include/o3tl/typed_flags_set.hxx:50:29: error:
>   from definition of ‘template struct o3tl::typed_flags’
> [-fpermissive]
>  template struct typed_flags {};
>  ^
> In file included from
> /media/dewan/Work/gsoc/core/include/sfx2/childwin.hxx:33:0,
>  from
> /media/dewan/Work/gsoc/core/sfx2/source/inc/workwin.hxx:37,
>  from
> /media/dewan/Work/gsoc/core/sfx2/source/appl/appchild.cxx:26:
> /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
> specialization of ‘template struct o3tl::typed_flags’ in different
> namespace [-fpermissive]
>  template<> struct o3tl::typed_flags:
>  ^
> In file included from
> /media/dewan/Work/gsoc/core/include/tools/errinf.hxx:29:0,
>  from
> /media/dewan/Work/gsoc/core/include/tools/stream.hxx:26,
>  from /media/dewan/Work/gsoc/core/include/svl/eitem.hxx:25,
>  from
> /media/dewan/Work/gsoc/core/sfx2/source/appl/appchild.cxx:22:
> /media/dewan/Work/gsoc/core/include/o3tl/typed_flags_set.hxx:50:29: error:
>   from definition of ‘template struct o3tl::typed_flags’
> [-fpermissive]
>  template struct typed_flags {};
>  ^
> /media/dewan/Work/gsoc/core/solenv/gbuild/LinkTarget.mk:288: recipe for
> target
> '/media/dewan/Work/gsoc/core/workdir/CxxObject/sfx2/source/appl/appbas.o'
> failed
> make[1]: ***
> [/media/dewan/Work/gsoc/core/workdir/CxxObject/sfx2/source/appl/appbas.o]
> Error 1
> make[1]: *** Waiting for unfinished jobs
> In file included from
> /media/dewan/Work/gsoc/core/include/sfx2/dispatch.hxx:26:0,
>  from
> /media/dewan/Work/gsoc/core/sfx2/source/appl/appcfg.cxx:63:
> /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
> specialization of ‘template struct o3tl::typed_flags’ in different
> namespace [-fpermissive]
>  template<> struct o3tl::typed_flags:
>  ^
> In file included from
> /media/dewan/Work/gsoc/core/include/tools/resmgr.hxx:25:0,
>  from
> /media/dewan/Work/gsoc/core/include/vcl/builder.hxx:16,
>  from
> /media/dewan/Work/gsoc/core/include/vcl/syswin.hxx:25,
>  from
> /media/dewan/Work/gsoc/core/include/vcl/dialog.hxx:25,
>  from
> /media/dewan/Work/gsoc/core/include/vcl/btndlg.hxx:24,
>  from
> /media/dewan/Work/gsoc/core/include/vcl/msgbox.hxx:24,
>  from
> /media/dewan/Work/gsoc/core/sfx2/source/appl/appcfg.cxx:28:
> /media/dewan/Work/gsoc/core/include/o3tl/typed_flags_set.hxx:50:29: error:
>   from definition of ‘template struct o3tl::typed_flags’
> [-fpermissive]
>  template struct typed_flags {};
>  ^
> /media/dewan/Work/gsoc/core/solenv/gbuild/LinkTarget.mk:288: recipe for
> target
> '/media/dewan/Work/gsoc/core/workdir/CxxObject/sfx2/source/appl/appchild.

Re: DbGridControl's confusion of BrowseBox's column number vs. column ID

2017-03-10 Thread Lionel Elie Mamane
On Fri, Mar 10, 2017 at 01:52:36PM +0100, Stephan Bergmann wrote:
> svtools' BrowseBox class (include/svtools/brwbox.hxx; effectively a
> collection of BrowseColumn via the BrowseBox::pCols member) apparently
> distinguishes between a column's index/position/number (i.e., the
> BrowseColumn's position within the BrowseBox::pCols vector) and its ID
> (i.e., the BrowseColumn::_nId member, svtools/source/brwbox/datwin.hxx).

> Does anybody (Lionel?) known something about that DbGridControl code? Would
> this be a bug (if so, any idea how to reproduce it at the GUI?) or is it
> maybe an invariant of such a DbGridControl that it's columns' ID always
> match the columns' positions?

No, it is not an invariant. Consider

file fmgridcl.cxx function FmGridControl::InitColumnsByModels

for (i = 0; i < xColumns->getCount(); ++i)
{
...
AppendColumn(aName, (sal_uInt16)nWidth);
...
}
// now all columns are inserted with identical id and pos
...
for (i = 0; i < xColumns->getCount(); ++i)
{
Reference< css::beans::XPropertySet > xCol(
xColumns->getByIndex(i), css::uno::UNO_QUERY);
aHidden = xCol->getPropertyValue(FM_PROP_HIDDEN);
if (::comphelper::getBOOL(aHidden))
   HideColumn(GetColumnIdFromModelPos((sal_uInt16)i));
}

And HideColumn calls

DbGridControl::HideColumn(nId);
which calls
DbGridControl_base::HideColumn(nId);
that is
BrowseBox::RemoveColumn

which does

BrowserColumns::iterator it = pCols->begin();
::std::advance( it, nPos );
delete *it;
pCols->erase( it );

As soon as there is a hidden column, the position and id of the
columns after that one don't match anymore.

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


Re: must press enter/return thrice to force new paragraph (sometimes)

2017-03-10 Thread Terrence Enger
On Thu, 2017-03-09 at 18:13 +, Dwain Alford wrote:
> hello,

Hello, Dwain.

Thank you for taking the time to help us improve LibreOffice.
However, this list is more for coding-level discussions than for
problem reports.  For example, the programmer fixing a bug might come
here to ask, how do I change such-and-such to do such-and-such.

I suspect--emphasis on "suspect"--that you are seeing normal behaviour
of LibreOffice.  You can go to
 to ask how to accomplish
what you want to do.  If, then, you think that LibreOffice is behaving
wrongly, you can file a bug report at
.  For help filing a bug report,
you can send a message to .

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


[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp

2017-03-10 Thread Michael Meeks
 wsd/DocumentBroker.cpp |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 93d46fc469c5356e4bc1651c87072fe413c6e98a
Author: Michael Meeks 
Date:   Fri Mar 10 23:52:28 2017 +

Don't treat a session as non-editable when it is not (yet) loaded.

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 2f53f7b..6ddb463 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1129,7 +1129,6 @@ void DocumentBroker::destroyIfLastEditor(const 
std::string& id)
 for (const auto& it : _sessions)
 {
 if (it.second->getId() != id &&
-it.second->isLoaded() &&
 !it.second->isReadOnly())
 {
 // Found another editable.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - net/Socket.hpp wsd/DocumentBroker.cpp

2017-03-10 Thread Michael Meeks
 net/Socket.hpp |2 ++
 wsd/DocumentBroker.cpp |2 ++
 2 files changed, 4 insertions(+)

New commits:
commit 5cafa006dc138e84fbd877654e561d958a300ff7
Author: Michael Meeks 
Date:   Fri Mar 10 23:28:54 2017 +

Wakeup poll after queueing a new session.

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index e9df227..2f53f7b 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -717,6 +717,7 @@ size_t 
DocumentBroker::queueSession(std::shared_ptr& session)
 Util::assertIsLocked(_mutex);
 
 _newSessions.push_back(NewSession(session));
+_poll->wakeup();
 
 return _sessions.size() + _newSessions.size();
 }
commit 5763d8d9bb77cc516417ad0874ec6c22a29140e6
Author: Michael Meeks 
Date:   Fri Mar 10 23:28:34 2017 +

Improve debugging.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 0cd5c7c..88ef163 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -308,6 +308,8 @@ public:
 rc = ::poll(&_pollFds[0], size + 1, (timeout - now)/1000);
 }
 while (rc < 0 && errno == EINTR);
+LOG_TRC("Poll completed with " << rc << " live polls "
+<< ((rc==0) ? "timeout" : ""));
 
 // Fire the callback and remove dead fds.
 Poco::Timestamp newNow;
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 1369ba5..e9df227 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1318,6 +1318,7 @@ void DocumentBroker::dumpState()
 std::cerr << "  jailed uri: " << _uriJailed.toString() << "\n";
 std::cerr << "  doc key: " << _docKey << "\n";
 std::cerr << "  num sessions: " << getSessionsCount() << "\n";
+std::cerr << "  new sessions: " << _newSessions.size() << "\n";
 std::cerr << "  last editable?: " << _lastEditableSession << "\n";
 std::cerr << "  cursor " << _cursorPosX << ", " << _cursorPosY
   << "( " << _cursorWidth << "," << _cursorHeight << ")\n";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Collecting User Statistics

2017-03-10 Thread Heiko Tietze
Hi Jaskaran,

most of these information are submitted when you access a web site, unless you 
actively use countermeasures. Therefore we know the percentage of users who 
stick to XP, what their average screen resolution is, and where they come from.

Much more interesting is how LibreOffice is being used. That starts with 
sessions, e.g. how often people open a module, how long is it open in average 
etc. And we are very interested in the actual interaction, meaning how often is 
"Clone Formatting" used, for example. Those data have been gathered during the 
project renaissance [1] and it was the basis for the recent menu and toolbar 
changes [2]. The data clearly needs an update.

Additionally to the overall statistics it would be interesting to go more into 
the details. As an example we could make decisions based on what function is 
followed most by an undo. If we go ahead with this approach the data storage 
becomes interesting. Consider a large number of users that submit all their 
interactions...

TDF did a tender in 2015 [3] but there wasn't too much interest in doing the 
work. But it's still a topic. And AFAIK we have something implemented. Some 
interactions (or just the summary?) is stored when a command-line switch is 
set. But don't remember exactly.

I would really appreciate if you would work on this topic.

Cheers,
Heiko

[1] https://wiki.openoffice.org/wiki/Renaissance
[2] 
https://design.blog.documentfoundation.org/2016/01/22/way-down-in-the-libreoffice-menus/
[3] 
https://blog.documentfoundation.org/blog/2015/02/24/tender-to-develop-and-incorporate-usability-metrics-collection-for-libreoffice-201502-02/

On 03/09/2017 10:10 AM, Jaskaran Singh wrote:
> Hi,
> 
> Currently we collect user stats when someone downloads LO from our
> website. Now these may not be very useful since only very limited
> information is obtained by this method. Also, not everyone gets to
> participate in this because not everyone downloads LO. Some just get it
> preinstalled on their O.S while others get a copy through their friends.
> 
> I believe it's important for us to know about our users as deeply as
> possible so as to make informed choices. The information which we should
> be looking for is:
> 
> 1. Operating System, word size and kernel version
> 2. RAM and Cache amount
> 3. CPU and GPU specs
> 4. Opencl driver
> 5. Display specs
> 6. Country
> 7. Default Language
> 8. 
> 
> Now, obviously this is sensitive information and most users would
> disagree to share it. So we could introduce a way to anonymously share
> this data. We could enable client to use a proxy to share this OR enable
> this data to be sent over Tor (Onion Router). But again, most users
> wouldn't want that.
> 
> So I've found another way of doing this. Have a look at Rappor[1]. It
> introduces some random noise so that we are never sure of the data that
> client sends us. The statistics that we would get would be in terms of
> probability. For example, if a system has i3 processor, it will roll a
> dice to determine whether it should speak the truth or not. And by
> default we could have 80% (?) chance of speaking the truth. So if we get
> the data that user is running i3 processor, we are 80% sure that he/she
> is. And 20% chance that he/she is reporting wrong info. So aggregate
> that for a large number of users and we would get a rough trend.
> 
> We could also share this data in the forms of numbers and graphs(and
> other representations) on our website.
> 
> So this would work this way. Whenever someone installs or upgrades LO
> and starts LO for the first time, a dialog box appears asking for
> permission to share some data while also explaining how this would not
> compromise their privacy.
> 
> I'd like to know your views on this. And I'd like to implement this if
> none of you want to. I may apply for this as a project in GSoC. So
> please inform me if you can be a mentor for this project.
> 
> [1] https://www.chromium.org/developers/design-documents/rappor
> 
> Regards,
> Jaskaran Veer Singh
> 
> 
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
> 

-- 
Dr. Heiko Tietze
UX Designer
Tel. +49 (0)179/1268509



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


Re: Minutes of the Design Hangout: 2016-Mar-09

2017-03-10 Thread eszka
Heiko Tietze-2 wrote
>  * Should this be backported to make non-notebookbar modes accessible to
> all (Jay)
>+ https://bugs.documentfoundation.org/show_bug.cgi?id=103323
>+
> https://cgit.freedesktop.org/libreoffice/core/commit/?id=50468779725c9eaccae17e4e39a6651f12e49340
>+ it's a minor bug fix so it makes sense to add to 5.3.1 (Jay)
>+ is in master for some weeks, should be safe to push (Samuel)
>+ will have a look and approve it (Samuel)

Don't forget to backport also that commit:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=6d1e22a9b8c197673f43dcb00f3270dae812c8ae

Szymon



--
View this message in context: 
http://nabble.documentfoundation.org/Minutes-of-the-Design-Hangout-2016-Mar-09-tp4209795p4209893.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-03-10 Thread Zdeněk Crhonek
 basic/qa/cppunit/test_vba.cxx |1 
 basic/qa/vba_tests/cos.vb |   73 ++
 2 files changed, 74 insertions(+)

New commits:
commit 1577f01b29b4f0e1eadadda71a7b7b479043519a
Author: Zdeněk Crhonek 
Date:   Thu Mar 9 22:08:57 2017 +0100

add VBA COS function test case

Change-Id: I9014e068576d68613da6a70526dcb5b8e278e3f1
Reviewed-on: https://gerrit.libreoffice.org/35027
Tested-by: Jenkins 
Reviewed-by: Zdenek Crhonek 

diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index df33224..7bf804a 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -64,6 +64,7 @@ void VBATest::testMiscVBAFunctions()
 "cdate.vb",
 "cdbl.vb",
 "choose.vb",
+"cos.vb",
 #ifndef WIN32 // missing 64bit Currency marshalling.
 "win32compat.vb", // windows compatibility hooks.
 #endif
diff --git a/basic/qa/vba_tests/cos.vb b/basic/qa/vba_tests/cos.vb
new file mode 100644
index 000..18a6638
--- /dev/null
+++ b/basic/qa/vba_tests/cos.vb
@@ -0,0 +1,73 @@
+Option VBASupport 1
+Option Explicit
+Dim passCount As Integer
+Dim failCount As Integer
+Dim result As String
+
+Function doUnitTest() As String
+result = verify_testCOS()
+If failCount <> 0 And passCount > 0 Then
+doUnitTest = result
+Else
+doUnitTest = "OK"
+End If
+End Function
+
+
+
+Function verify_testCOS() As String
+
+passCount = 0
+failCount = 0
+
+result = "Test Results" & Chr$(10) & "" & Chr$(10)
+
+Dim testName As String
+Dim TestDateTime As Date
+Dim TestStr As String
+Dim nr1, nr2 As Double   'variables for test
+testName = "Test COS function"
+
+
+On Error GoTo errorHandler
+
+nr2 = -0.53283302098
+nr1 = Cos(23)
+TestLog_ASSERT Round(nr1, 14) = Round(nr2, 14), "the return COS is: " & nr1
+
+nr2 = 0.980066577841242
+nr1 = Cos(0.2)
+TestLog_ASSERT Round(nr1, 14) = Round(nr2, 14), "the return COS is: " & nr1
+
+nr2 = 0.487187675007006
+nr1 = Cos(200)
+TestLog_ASSERT Round(nr1, 14) = Round(nr2, 14), "the return COS is: " & nr1
+
+
+result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & 
"Tests failed: " & failCount & Chr$(10)
+verify_testCOS = result
+
+Exit Function
+errorHandler:
+TestLog_ASSERT (False), testName & ": hit error handler"
+End Function
+
+Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional 
testComment As String)
+
+If assertion = True Then
+passCount = passCount + 1
+Else
+Dim testMsg As String
+If Not IsMissing(testId) Then
+testMsg = testMsg + " : " + testId
+End If
+If Not IsMissing(testComment) And Not (testComment = "") Then
+testMsg = testMsg + " (" + testComment + ")"
+End If
+
+result = result & Chr$(10) & " Failed: " & testMsg
+failCount = failCount + 1
+End If
+
+End Sub
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/pivotcharts' - chart2/inc chart2/source offapi/com offapi/UnoApi_offapi.mk sc/source

2017-03-10 Thread Tomaž Vajngerl
 chart2/inc/ChartModel.hxx |5 +-
 chart2/source/inc/PopupRequest.hxx|2 -
 chart2/source/model/main/ChartModel.cxx   |2 -
 offapi/UnoApi_offapi.mk   |2 -
 offapi/com/sun/star/chart2/data/PopupRequest.idl  |   44 --
 offapi/com/sun/star/chart2/data/XDataReceiver.idl |2 -
 offapi/com/sun/star/chart2/data/XPopupRequest.idl |   42 -
 sc/source/ui/view/tabvwshb.cxx|3 +
 8 files changed, 8 insertions(+), 94 deletions(-)

New commits:
commit 7e1889dd8ce7329c48cbeffa5ac66ceebba5dcef
Author: Tomaž Vajngerl 
Date:   Fri Mar 10 19:50:37 2017 +0100

remove (X)PopupRequest as it appears we won't need it

XRequestCallback alone is good enough for pop-up request so we
don't need XPopupRequest and PopupRequest.

Change-Id: I4617cb3db0c90f629e27db0d1991196ce75acae4

diff --git a/chart2/inc/ChartModel.hxx b/chart2/inc/ChartModel.hxx
index d6123bd..e4c72f4 100644
--- a/chart2/inc/ChartModel.hxx
+++ b/chart2/inc/ChartModel.hxx
@@ -45,6 +45,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // public API
 #include 
@@ -143,7 +144,7 @@ private:
 css::awt::Size m_aVisualAreaSize;
 css::uno::Reference< css::frame::XModel >  m_xParent;
 css::uno::Reference< css::chart2::data::XRangeHighlighter > 
m_xRangeHighlighter;
-css::uno::Reference m_xPopupRequest;
+css::uno::Referencem_xPopupRequest;
 std::vector< GraphicObject >
m_aGraphicObjectVector;
 
 css::uno::Reference< css::chart2::data::XDataProvider >   m_xDataProvider;
@@ -383,7 +384,7 @@ public:
 virtual void SAL_CALL attachNumberFormatsSupplier( const 
css::uno::Reference<
 css::util::XNumberFormatsSupplier >& xSupplier ) override;
 virtual css::uno::Reference< css::chart2::data::XRangeHighlighter > 
SAL_CALL getRangeHighlighter() override;
-virtual css::uno::Reference< css::chart2::data::XPopupRequest > SAL_CALL 
getPopupRequest() override;
+virtual css::uno::Reference SAL_CALL 
getPopupRequest() override;
 
 //  XTitled 
 virtual css::uno::Reference< css::chart2::XTitle > SAL_CALL 
getTitleObject() override;
diff --git a/chart2/source/inc/PopupRequest.hxx 
b/chart2/source/inc/PopupRequest.hxx
index 61630f5..4c0097f 100644
--- a/chart2/source/inc/PopupRequest.hxx
+++ b/chart2/source/inc/PopupRequest.hxx
@@ -21,7 +21,7 @@ namespace chart
 namespace impl
 {
 
-typedef cppu::WeakComponentImplHelper 
PopupRequest_Base;
+typedef cppu::WeakComponentImplHelper 
PopupRequest_Base;
 
 }
 
diff --git a/chart2/source/model/main/ChartModel.cxx 
b/chart2/source/model/main/ChartModel.cxx
index b1faf4b..9e551be 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -921,7 +921,7 @@ Reference< chart2::data::XRangeHighlighter > SAL_CALL 
ChartModel::getRangeHighli
 return m_xRangeHighlighter;
 }
 
-Reference SAL_CALL ChartModel::getPopupRequest()
+Reference SAL_CALL ChartModel::getPopupRequest()
 {
 if (!m_xPopupRequest.is())
 m_xPopupRequest.set(new PopupRequest);
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 0146001..4e9b12b 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -666,7 +666,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/chart2/data,\
DataSequence \
DataSink \
DataSource \
-   PopupRequest \
RangeHighlighter \
RangeHighlightListener \
TabularDataProviderArguments \
@@ -2067,7 +2066,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/chart2/data,\
XLabeledDataSequence2 \
XNumericalDataSequence \
XPivotChartDataProvider \
-   XPopupRequest \
XRangeHighlighter \
XRangeXMLConversion \
XSheetDataProvider \
diff --git a/offapi/com/sun/star/chart2/data/PopupRequest.idl 
b/offapi/com/sun/star/chart2/data/PopupRequest.idl
deleted file mode 100644
index f83ccc0..000
--- a/offapi/com/sun/star/chart2/data/PopupRequest.idl
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#ifndef com_sun_star_chart2_data_PopupRequest_idl
-#define com_sun_star_chart2_data_PopupRequest_idl
-
-#include 
-
-module com
-{
-module sun
-{
-module star
-{
-module chart2
-{
-module data
-{
-
-/** @since LibreOffice 5.4
- */
-service PopupRequest
-{
-/**
- */
-interface XPopupRequest;
-};
-
-} ; // data
-} ; // chart2
-} ; // com
-} ; // sun
-} ; // star
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab

[Libreoffice-commits] online.git: 2 commits - net/Socket.hpp

2017-03-10 Thread Michael Meeks
 net/Socket.hpp |   53 ++---
 1 file changed, 18 insertions(+), 35 deletions(-)

New commits:
commit a9d5801c37079a5acdec183559dc1a3b8525d2da
Author: Michael Meeks 
Date:   Fri Mar 10 18:46:31 2017 +

Unwind releaseSocket complexity.

We only move sockets in response to input on the socket, which
must happen in the thread that we're processing that input on.
Ergo - no need for this complexity.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 488b6ec..0cd5c7c 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -313,17 +313,7 @@ public:
 Poco::Timestamp newNow;
 for (int i = static_cast(size) - 1; i >= 0; --i)
 {
-// First check if this is a removed socket.
-// Polling from multiple threads is fine, but not invoking 
handlePoll.
-auto it = std::find(_relSockets.begin(), _relSockets.end(), 
_pollSockets[i]);
-if (it != _relSockets.end())
-{
-LOG_DBG("Releasing socket #" << _pollFds[i].fd << " (of " <<
-_pollSockets.size() << ") from " << _name);
-_pollSockets.erase(_pollSockets.begin() + i);
-_relSockets.erase(it);
-}
-else if (_pollFds[i].revents)
+if (_pollFds[i].revents)
 {
 Socket::HandleResult res = Socket::HandleResult::SOCKET_CLOSED;
 try
@@ -425,16 +415,19 @@ public:
 void dumpState();
 
 /// Removes a socket from this poller.
+/// NB. this must be called from the socket poll that
+/// owns the socket.
 void releaseSocket(const std::shared_ptr& socket)
 {
-//assert(isCorrectThread());
-if (socket)
-{
-std::lock_guard lock(_mutex);
-LOG_TRC("Queuing to release socket #" << socket->getFD() << " from 
" << _name);
-_relSockets.emplace_back(socket);
-wakeup();
-}
+assert(socket);
+assert(isCorrectThread());
+assert(socket->isCorrectThread(true));
+auto it = std::find(_pollSockets.begin(), _pollSockets.end(), socket);
+assert(it != _pollSockets.end());
+
+LOG_TRC("Release socket #" << socket->getFD() << " from " << _name);
+
+_pollSockets.erase(it);
 }
 
 const std::string& name() const { return _name; }
@@ -444,19 +437,6 @@ private:
 /// Initialize the poll fds array with the right events
 void setupPollFds(Poco::Timestamp &timeout)
 {
-for (int i = static_cast(_relSockets.size()) - 1; i >= 0; --i)
-{
-auto it = std::find(_pollSockets.begin(), _pollSockets.end(), 
_relSockets[i]);
-if (it != _pollSockets.end())
-{
-LOG_DBG("Releasing socket #" << (*it)->getFD() << " (of " <<
-_pollSockets.size() << ") from " << _name);
-_pollSockets.erase(it);
-}
-}
-
-_relSockets.clear();
-
 const size_t size = _pollSockets.size();
 
 _pollFds.resize(size + 1); // + wakeup pipe
@@ -486,7 +466,6 @@ private:
 /// Protects _newSockets
 std::mutex _mutex;
 std::vector> _newSockets;
-std::vector> _relSockets;
 std::vector _newCallbacks;
 /// The fds to poll.
 std::vector _pollFds;
commit 027b8110ed1bdfddf40d553a362787ca6ef8bfe0
Author: Michael Meeks 
Date:   Fri Mar 10 18:46:16 2017 +

Allow isCorrectThread asserts to be hard, or off by default.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 87b8dea..488b6ec 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -187,10 +187,14 @@ public:
 #endif
 }
 
-virtual bool isCorrectThread()
+virtual bool isCorrectThread(bool hard = false)
 {
 #if ENABLE_DEBUG
-return !getenv("LOOL_CHECK_THREADS") || std::this_thread::get_id() == 
_owner;
+bool sameThread = std::this_thread::get_id() == _owner;
+if (hard)
+return sameThread;
+else
+return !getenv("LOOL_CHECK_THREADS") || sameThread;
 #else
 return true;
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Khaled Hosny
 vcl/source/gdi/CommonSalLayout.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3cee50476e422e3ed84169cdcbe6bd9883fc9316
Author: Khaled Hosny 
Date:   Fri Mar 10 16:53:08 2017 +0200

tdf#106466: Use graphite2 shaper first

We want to always prefer Graphite shaping when supported by the font,
which is also what HarfBuzz does by default.

Change-Id: I6670fc03b8e6b3d7e07e1b8e0062880524da1655
Reviewed-on: https://gerrit.libreoffice.org/35046
Tested-by: Jenkins 
Reviewed-by: Khaled Hosny 

diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index c61fea0..36a1931 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -583,7 +583,7 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
 // preference. The coretext_aat shaper is available only on macOS,
 // but there is no harm in always including it, HarfBuzz will
 // ignore unavailable shapers.
-const char* pHbShapers[] = { "coretext_aat", "graphite2", "ot", 
"fallback", nullptr };
+const char* pHbShapers[] = { "graphite2", "coretext_aat", "ot", 
"fallback", nullptr };
 hb_segment_properties_t aHbProps;
 hb_buffer_get_segment_properties(pHbBuffer, &aHbProps);
 hb_shape_plan_t* pHbPlan = hb_shape_plan_create_cached(pHbFace, 
&aHbProps, maFeatures.data(), maFeatures.size(), pHbShapers);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/pivotcharts' - chart2/source offapi/com offapi/UnoApi_offapi.mk sc/inc sc/source

2017-03-10 Thread Tomaž Vajngerl
 chart2/source/controller/drawinglayer/DrawViewWrapper.cxx   |7 
 chart2/source/controller/inc/ChartController.hxx|2 
 chart2/source/controller/main/ChartController_Window.cxx|   71 
 chart2/source/inc/PopupRequest.hxx  |7 
 chart2/source/view/main/ChartView.cxx   |   38 +---
 chart2/source/view/main/VLegend.cxx |   14 -
 offapi/UnoApi_offapi.mk |1 
 offapi/com/sun/star/chart2/data/PivotTableFieldEntry.idl|   43 +
 offapi/com/sun/star/chart2/data/XPivotChartDataProvider.idl |   16 +-
 sc/inc/PivotChartDataProvider.hxx   |   24 ++-
 sc/source/ui/inc/tabview.hxx|2 
 sc/source/ui/unoobj/PivotChartDataProvider.cxx  |   96 ++--
 sc/source/ui/view/tabview3.cxx  |   18 --
 sc/source/ui/view/tabvwshb.cxx  |   29 +++
 14 files changed, 259 insertions(+), 109 deletions(-)

New commits:
commit 0c9ff2b3dd8c3de2514b72eaf67bb9423cdf43f2
Author: Tomaž Vajngerl 
Date:   Fri Mar 10 19:18:14 2017 +0100

pivotcharts: show filter pop-up from charts on field button click

This adds the functionallity to show a filter pop-up (from calc)
when clicking on row / column / page field buttons.

Additionally to implement this it was needed to add a new struct
PivotTableFieldEntry, which transports the data for field buttons
from the data provider to chart. This was necessary as in addition
to the field name, it is needed to transport the dimension index.

Other changes are:
- some additional data provider fixes and clean-ups
- mouse click on field button (mouse button down / up)
- ignore other actions when detected a click is on a field button
- parameters for the PopupRequest callback
- parse parameters and execute the pop-up a the desired position

Change-Id: Id40ffccbce7aaaddb045eb1894d55bfe0427ee6d

diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx 
b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 50808b5..b66f63a 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -181,8 +181,13 @@ SdrObject* DrawViewWrapper::getHitObject( const Point& 
rPnt ) const
 
 if( pRet )
 {
-//ignore some special shapes
+// ignore some special shapes
 OUString aShapeName = pRet->GetName();
+
+// return right away if it is a field button
+if (aShapeName.startsWith("FieldButton"))
+return pRet;
+
 if( aShapeName.match("PlotAreaIncludingAxes") || 
aShapeName.match("PlotAreaExcludingAxes") )
 {
 pRet->SetMarkProtect( true );
diff --git a/chart2/source/controller/inc/ChartController.hxx 
b/chart2/source/controller/inc/ChartController.hxx
index 40b31bc..53defbe 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -496,6 +496,8 @@ private:
 void executeDispatch_ToggleGridHorizontal();
 void executeDispatch_ToggleGridVertical();
 
+void sendPopupRequest(OUString const & rCID, Rectangle aRectangle);
+
 void impl_ShapeControllerDispatch( const css::util::URL& rURL,
 const css::uno::Sequence< css::beans::PropertyValue >& rArgs );
 
diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index f32e0c2..e9917e9 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -45,18 +45,23 @@
 #include "LegendHelper.hxx"
 #include "servicenames_charttypes.hxx"
 #include "DrawCommandDispatch.hxx"
+#include "PopupRequest.hxx"
 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
+
 #include 
 #include 
+#include 
 
 #include 
 
@@ -551,7 +556,16 @@ void ChartController::execute_MouseButtonDown( const 
MouseEvent& rMEvt )
 if(!m_pChartWindow || !pDrawViewWrapper )
 return;
 
-Point   aMPos   = m_pChartWindow->PixelToLogic(rMEvt.GetPosPixel());
+Point aMPos = m_pChartWindow->PixelToLogic(rMEvt.GetPosPixel());
+
+// Check if button was clicked
+SdrObject* pObject = pDrawViewWrapper->getHitObject(aMPos);
+if (pObject)
+{
+OUString aCID = pObject->GetName();
+if (aCID.startsWith("FieldButton"))
+return; // Don't take any action if button was clicked
+}
 
 if ( MOUSE_LEFT == rMEvt.GetButtons() )
 {
@@ -715,7 +729,19 @@ void ChartController::execute_MouseButtonUp( const 
MouseEvent& rMEvt )
 if(!m_pChartWindow || !pDrawViewWrapper)
 return;
 
-Point   aMPos   = m_pChartWindow->PixelToLogic(rMEvt.GetPosPixel());
+Po

[Libreoffice-commits] online.git: net/Socket.hpp

2017-03-10 Thread Michael Meeks
 net/Socket.hpp |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit c30fb670d800d9f3ef9d6006af5308111320fd9a
Author: Michael Meeks 
Date:   Fri Mar 10 18:20:51 2017 +

Work on LOOL_CHECK_THREADS=1 a little.

The situation made more problematic since the std::thread is only
created in startThread - so getting ownership right before then in
Socket is problematic.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 9259d88..87b8dea 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -354,6 +354,11 @@ public:
 // Copy the new sockets over and clear.
 _pollSockets.insert(_pollSockets.end(),
 _newSockets.begin(), _newSockets.end());
+
+// Update thread ownership.
+for (auto &i : _newSockets)
+i->setThreadOwner(std::this_thread::get_id());
+
 _newSockets.clear();
 
 // Extract list of callbacks to process
@@ -395,6 +400,7 @@ public:
 if (newSocket)
 {
 std::lock_guard lock(_mutex);
+// Beware - _thread may not be created & started yet.
 newSocket->setThreadOwner(_thread.get_id());
 LOG_DBG("Inserting socket #" << newSocket->getFD() << " into " << 
_name);
 _newSockets.emplace_back(newSocket);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Michael Meeks
 net/Socket.hpp   |5 ++-
 net/WebSocketHandler.hpp |2 +
 wsd/DocumentBroker.cpp   |1 
 wsd/DocumentBroker.hpp   |1 
 wsd/LOOLWSD.cpp  |   64 ---
 5 files changed, 13 insertions(+), 60 deletions(-)

New commits:
commit 160446fd235c3d1bf25413fea18c72f1e3487cbe
Author: Michael Meeks 
Date:   Fri Mar 10 17:58:51 2017 +

Work on resurrecting dying DocumentBrokers if we can.

The hope is that they will close lingering session sockets at the
end and the client will re-connect.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index c5e5ece..9259d88 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -52,7 +52,9 @@ public:
 
 virtual ~Socket()
 {
-//TODO: Should we shutdown here or up to the client?
+// TODO: Should we shutdown here or up to the client?
+
+LOG_TRC("#" << getFD() << " close socket.");
 
 // Doesn't block on sockets; no error handling needed.
 close(_fd);
@@ -551,6 +553,7 @@ public:
 virtual void shutdown() override
 {
 _shutdownSignalled = true;
+LOG_TRC("#" << getFD() << ": shutdown signalled");
 }
 
 /// Perform the real shutdown.
diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp
index 5e987fb..7416586 100644
--- a/net/WebSocketHandler.hpp
+++ b/net/WebSocketHandler.hpp
@@ -97,6 +97,8 @@ public:
 if (socket == nullptr)
 return;
 
+LOG_TRC("#" << socket->getFD() << " shutdown websocket.");
+
 const size_t len = statusMessage.size();
 std::vector buf(2 + len);
 buf[0] = int)statusCode) >> 8) & 0xff);
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index f50d9a3..1369ba5 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -751,6 +751,7 @@ size_t 
DocumentBroker::addSession(std::shared_ptr& session)
 // document). It is safe to reset their values to their defaults whenever 
a new session is added.
 _lastEditableSession = false;
 _markToDestroy = false;
+_stop = false;
 
 const auto id = session->getId();
 if (!_sessions.emplace(id, session).second)
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 5594c70..b07b9b5 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -175,7 +175,6 @@ public:
 try
 {
 return _pid > 1 && _ws && kill(_pid, 0) == 0;
-// FIXME:!_ws->poll(Poco::Timespan(0), 
Poco::Net::Socket::SelectMode::SELECT_ERROR));
 }
 catch (const std::exception&)
 {
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 8d0a3a4e..7eafcdf 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1335,59 +1335,12 @@ static std::shared_ptr 
findOrCreateDocBroker(WebSocketHandler& w
 // Get the DocumentBroker from the Cache.
 LOG_DBG("Found DocumentBroker with docKey [" << docKey << "].");
 docBroker = it->second;
-if (docBroker->isMarkedToDestroy())
-{
-// Let the waiting happen in parallel to new requests.
-docBrokersLock.unlock();
-
-// If this document is going out, wait.
-LOG_DBG("Document [" << docKey << "] is marked to destroy, waiting 
to reload.");
-
-// FIXME: - easiest to send a fast message to the
-//  client to wait & retry in a bit ...
-
-#if 0 // loolnb
-bool timedOut = true;
-for (size_t i = 0; i < COMMAND_TIMEOUT_MS / POLL_TIMEOUT_MS; ++i)
-{
-
-// FIXME: blocks !
-
std::this_thread::sleep_for(std::chrono::milliseconds(POLL_TIMEOUT_MS));
-
-docBrokersLock.lock();
-it = DocBrokers.find(docKey);
-if (it == DocBrokers.end())
-{
-// went away successfully
-docBroker.reset();
-docBrokersLock.unlock();
-timedOut = false;
-break;
-}
-else if (it->second && !it->second->isMarkedToDestroy())
-{
-// was actually replaced by a real document
-docBroker = it->second;
-docBrokersLock.unlock();
-timedOut = false;
-break;
-}
 
-docBrokersLock.unlock();
-if (TerminationFlag)
-{
-LOG_ERR("Termination flag set. Not loading new session [" 
<< id << "]");
-return nullptr;
-}
-}
-
-if (timedOut)
-{
-// Still here, but marked to destroy. Proceed and hope to 
recover.
-LOG_ERR("Timed out while waiting for document to unload before 
loading.");
-}
-#endif
-}
+// Avoid notifying the client - either we catch and stop the
+ 

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

2017-03-10 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/addin/fods/besseli.fods | 1233 +
 sc/qa/unit/data/functions/addin/fods/besselj.fods | 1289 ++
 sc/qa/unit/data/functions/addin/fods/besselk.fods | 1275 ++---
 sc/qa/unit/data/functions/addin/fods/bessely.fods | 1267 +
 4 files changed, 2378 insertions(+), 2686 deletions(-)

New commits:
commit 7ae22f903e4d33867cd48088328cab627a3c43b8
Author: Zdeněk Crhonek 
Date:   Fri Mar 10 18:02:53 2017 +0100

bessel* functions tests roundsig(15->12)

roundsig( ,15) breaks some buildbots

Change-Id: I53715a698d20df78458056c3a90db8e88116e77c
Reviewed-on: https://gerrit.libreoffice.org/35049
Tested-by: Jenkins 
Reviewed-by: Zdenek Crhonek 

diff --git a/sc/qa/unit/data/functions/addin/fods/besseli.fods 
b/sc/qa/unit/data/functions/addin/fods/besseli.fods
index 24c301c..4af0c7f 100644
--- a/sc/qa/unit/data/functions/addin/fods/besseli.fods
+++ b/sc/qa/unit/data/functions/addin/fods/besseli.fods
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2017-01-02T19:55:59.875194457P0D1LibreOfficeDev/5.4.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/36de6c50684c8241969a2064d30aff41e0bc5d97
+ 
2017-01-02T19:55:59.875194457P0D1LibreOfficeDev/5.4.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/a5a6694128728c48c1a8482450a21ad49025c40c
  
   
0
0
-   22009
-   4261
+   64713
+   148642

 
  view1
@@ -32,7 +32,7 @@
   
   
2
-   155
+   326
0
0
0
@@ -41,7 +41,7 @@
0
0
0
-   0
+   313
0
120
60
@@ -118,7 +118,7 @@
true
1
true
-   rgH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpBNAAAEgBDT01QQVRfRFVQTEVYX01PREUPAER1cGxleE1vZGU6Ok9mZg==
+   rgH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkE0AElucHV0U2xvdDpUcmF5MQBEdXBsZXg6Tm9uZQAAEgBDT01QQVRfRFVQTEVYX01PREUPAER1cGxleE1vZGU6Ok9mZg==
false
0
   
@@ -141,820 +141,743 @@
  
  
   
-   
+   

   
   

   
-  
+  

 
Kč
   
-  
+  

-

 
Kč
-   
-  
-  
-   £
-   
-  
-  
-   -
-   £
-   
-   
-  
-  
-   £
-   
-  
-  
-   -
-   £
-   
-   
-  
-  
-   £
-   
-  
-  
-   
-   -
-   £
-   
-   
-  
-  
-   £
-   
- 

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

2017-03-10 Thread Eike Rathke
 sc/source/core/data/grouptokenconverter.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit ca1f051972946b24cb6658143fb0d0ac3587a988
Author: Eike Rathke 
Date:   Fri Mar 10 18:32:27 2017 +0100

Resolves: tdf#106459 3D reference can't be handled as vector reference

Change-Id: Icba12a6218086079a7d5538f7263bccb1f2ee1b0

diff --git a/sc/source/core/data/grouptokenconverter.cxx 
b/sc/source/core/data/grouptokenconverter.cxx
index 024a252..12751a1 100644
--- a/sc/source/core/data/grouptokenconverter.cxx
+++ b/sc/source/core/data/grouptokenconverter.cxx
@@ -169,6 +169,10 @@ bool ScGroupTokenConverter::convert( ScTokenArray& rCode, 
sc::FormulaLogger::Gro
 ScComplexRefData aRef = *p->GetDoubleRef();
 ScRange aAbs = aRef.toAbs(mrPos);
 
+// Multiple sheets not handled by vector/matrix.
+if (aRef.Ref1.Tab() != aRef.Ref2.Tab())
+return false;
+
 // Check for self reference.
 if (aRef.Ref1.IsRowRel())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Caolán McNamara
 vcl/source/filter/jpeg/JpegReader.cxx |4 +---
 vcl/source/filter/jpeg/JpegReader.hxx |1 -
 vcl/source/gdi/svmconverter.cxx   |   16 +++-
 3 files changed, 12 insertions(+), 9 deletions(-)

New commits:
commit d4c26cbcd89660be3af8df09ee24a8ba1c1172b4
Author: Caolán McNamara 
Date:   Fri Mar 10 17:31:19 2017 +

ofz: min action has to be >= 4

Change-Id: If03837dff5d7db6907f13c32ce05a74e4a0b7b55

diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index e4a00a1..6149f00 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -333,10 +333,10 @@ void ImplSkipActions(SvStream& rIStm, sal_uLong 
nSkipCount)
 sal_Int16 nType;
 for (sal_uLong i = 0UL; i < nSkipCount; ++i)
 {
-rIStm.ReadInt16( nType ).ReadInt32( nActionSize );
-if (!rIStm.good())
+rIStm.ReadInt16(nType).ReadInt32(nActionSize);
+if (!rIStm.good() || nActionSize < 4)
 break;
-rIStm.SeekRel( nActionSize - 4 );
+rIStm.SeekRel(nActionSize - 4);
 }
 }
 
@@ -1430,12 +1430,18 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& 
rIStm, GDIMetaFile& rMtf )
 {
 nUnicodeCommentActionNumber = i + 1;
 nUnicodeCommentStreamPos = rIStm.Tell() - 6;
-rIStm.SeekRel( nActionSize - 4 );
+if (nActionSize < 4)
+rIStm.SetError(SVSTREAM_FILEFORMAT_ERROR);
+else
+rIStm.SeekRel(nActionSize - 4);
 }
 break;
 
 default:
-rIStm.SeekRel( nActionSize - 4 );
+if (nActionSize < 4)
+rIStm.SetError(SVSTREAM_FILEFORMAT_ERROR);
+else
+rIStm.SeekRel(nActionSize - 4);
 break;
 }
 }
commit c3ee3f104bcca354d80ecc4d8a3dd67b5123e1a5
Author: Caolán McNamara 
Date:   Fri Mar 10 15:59:41 2017 +

mnFormerPos is unused

Change-Id: I147b68882d99b8712625178e5206ea7c0f5f7401

diff --git a/vcl/source/filter/jpeg/JpegReader.cxx 
b/vcl/source/filter/jpeg/JpegReader.cxx
index ad67332..86dda22 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -168,7 +168,6 @@ JPEGReader::JPEGReader( SvStream& rStream, void* 
/*pCallData*/, bool bSetLogSize
 mbSetLogSize ( bSetLogSize )
 {
 maUpperName = "SVIJPEG";
-mnFormerPos = mnLastPos;
 }
 
 JPEGReader::~JPEGReader()
@@ -301,11 +300,10 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
 }
 
 // Set status ( Pending has priority )
-if( mrStream.GetError() == ERRCODE_IO_PENDING )
+if (mrStream.GetError() == ERRCODE_IO_PENDING)
 {
 eReadState = JPEGREAD_NEED_MORE;
 mrStream.ResetError();
-mnFormerPos = mrStream.Tell();
 }
 else
 {
diff --git a/vcl/source/filter/jpeg/JpegReader.hxx 
b/vcl/source/filter/jpeg/JpegReader.hxx
index 3362519..3a20ad9 100644
--- a/vcl/source/filter/jpeg/JpegReader.hxx
+++ b/vcl/source/filter/jpeg/JpegReader.hxx
@@ -50,7 +50,6 @@ class JPEGReader : public GraphicReader
 Bitmap  maIncompleteAlpha;
 
 longmnLastPos;
-longmnFormerPos;
 longmnLastLines;
 boolmbSetLogSize;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: DbGridControl's confusion of BrowseBox's column number vs. column ID

2017-03-10 Thread Alexander Thurgood
Le 10/03/2017 à 16:01, Lionel Elie Mamane a écrit :


Hi all,

> 
> It starts to look like bugs will appear if you:
> 
> 1) Open a document with a form with a table control.
> 
> 2) Move a column (which may be possible only pogrammatically or after
>tdf#54021 is fixed)
> 
> 3) Try to copy the cell text (you'll copy from the wrong column)
> 

Perhaps the mailmerge and DatatoText functionalities might also expose
this "feature" too as they use, if I understand correctly, a DbGridCtrl
to populate data from the data source and then push that elsewhere ?



Alex

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


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - configure.ac

2017-03-10 Thread Jan-Marek Glogowski
 configure.ac |   32 ++--
 1 file changed, 18 insertions(+), 14 deletions(-)

New commits:
commit 5ebc0b40569f8b6eeb6241f2dc4a2ec69dabc035
Author: Jan-Marek Glogowski 
Date:   Wed Mar 8 12:00:03 2017 +0100

Fix build with latest Cygwin updates

Stop bash complaining about \0 bytes in input
(cherry picked from commit 8800292351dcf1f538c47ac6acf834ac2633ce6b)

Strip newlines from UCRT detecion using tr
(cherry picked from commit 37baabe6436037de604bfbc2702bfb0bc156c41b)

Just get rid of CR when parsing .bat output
(cherry picked from commit 019ea173701eae4b8c5ffd45bb0063fc0a688ce0)

Dropped "Remove stray CR from input"
(cherry picked from commit 9166569da389de44075b3d03413b353046a4)
as it was backported seperatly.

Reviewed-on: https://gerrit.libreoffice.org/35010
Tested-by: Jenkins 
Reviewed-by: Tor Lillqvist 
(cherry picked from commit 86bb733f6a9af9af253afe896e315b463e592dc7)

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

diff --git a/configure.ac b/configure.ac
index f928d5e..2f68ebe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3172,28 +3172,32 @@ dnl 
===
 dnl Windows specific tests and stuff
 dnl ===
 
-# Get a value from the 32-bit side of the Registry
-reg_get_value_32()
+reg_get_value()
 {
 # Return value: $regvalue
 unset regvalue
-_regvalue=`cat "/proc/registry32/$1" 2> /dev/null`
 
-if test $? -eq 0; then
-regvalue=$_regvalue
+local _regentry="/proc/registry${1}/${2}"
+if test -f "$_regentry"; then
+# Stop bash complaining about \0 bytes in input, as it can't handle 
them.
+# Registry keys read via /proc/registry* are always \0 terminated!
+local _regvalue=$(tr -d '\0' < "$_regentry")
+if test $? -eq 0; then
+regvalue=$_regvalue
+fi
 fi
 }
 
+# Get a value from the 32-bit side of the Registry
+reg_get_value_32()
+{
+reg_get_value "32" "$1"
+}
+
 # Get a value from the 64-bit side of the Registry
 reg_get_value_64()
 {
-# Return value: $regvalue
-unset regvalue
-_regvalue=`cat "/proc/registry64/$1" 2> /dev/null`
-
-if test $? -eq 0; then
-regvalue=$_regvalue
-fi
+reg_get_value "64" "$1"
 }
 
 if test "$_os" = "WINNT"; then
@@ -3325,7 +3329,7 @@ win_get_env_from_vsvars32bat()
 echo -e "@echo %$1%\r\n" >> $WRAPPERBATCHFILEPATH
 echo -e "@endlocal\r\n" >> $WRAPPERBATCHFILEPATH
 chmod +x $WRAPPERBATCHFILEPATH
-_win_get_env_from_vsvars32bat="`$WRAPPERBATCHFILEPATH | $SED -e s/^M^J//`"
+_win_get_env_from_vsvars32bat=$($WRAPPERBATCHFILEPATH | tr -d "\r")
 rm -f $WRAPPERBATCHFILEPATH
 echo $_win_get_env_from_vsvars32bat
 }
@@ -6805,7 +6809,7 @@ if test "$ENABLE_JAVA" != ""; then
 
 if test -z "$with_jdk_home"; then
 for ver in 1.8 1.7 1.6; do
-reg_get_value_$bitness 
"HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Development Kit/$ver/JavaHome"
+reg_get_value "$bitness" 
"HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Development Kit/$ver/JavaHome"
 if test -n "$regvalue"; then
 _jdk_home=$regvalue
 break
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - net/Socket.hpp wsd/DocumentBroker.cpp wsd/FileServer.cpp

2017-03-10 Thread Michael Meeks
 net/Socket.hpp |4 ++--
 wsd/DocumentBroker.cpp |2 +-
 wsd/FileServer.cpp |2 ++
 3 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 1065441e7cda8c5edfbf1249f4092753669756ea
Author: Michael Meeks 
Date:   Fri Mar 10 16:42:59 2017 +

Don't autosave if we're being stopped and happened to be overdue.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 37daacf..c5e5ece 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -415,7 +415,7 @@ public:
 /// Removes a socket from this poller.
 void releaseSocket(const std::shared_ptr& socket)
 {
-// assert(isCorrectThread());
+//assert(isCorrectThread());
 if (socket)
 {
 std::lock_guard lock(_mutex);
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index de6bac6..f50d9a3 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -250,7 +250,7 @@ void DocumentBroker::pollThread()
 
 _poll->poll(SocketPoll::DefaultPollTimeoutMs);
 
-if (!std::getenv("LOOL_NO_AUTOSAVE") &&
+if (!std::getenv("LOOL_NO_AUTOSAVE") && !_stop &&
 std::chrono::duration_cast
 (std::chrono::steady_clock::now() - last30SecCheckTime).count() >= 
30)
 {
commit 173ca5e3d695ebb6cd28234c7014ed62ac5c6e86
Author: Michael Meeks 
Date:   Fri Mar 10 16:42:48 2017 +

Quote ETag.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index c09ad53..37daacf 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -821,7 +821,7 @@ namespace HttpHelper
 response.set("User-Agent", HTTP_AGENT_STRING);
 // 60 * 60 * 24 * 128 (days) = 11059200
 response.set("Cache-Control", "max-age=11059200");
-response.set("ETag", LOOLWSD_VERSION_HASH);
+response.set("ETag", "\"" LOOLWSD_VERSION_HASH "\"");
 
 std::ostringstream oss;
 response.write(oss);
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 65b43d4..1de7813 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -300,6 +300,8 @@ void FileServerRequestHandler::preprocessFile(const 
HTTPRequest& request, Poco::
 << "Date: " << Poco::DateTimeFormatter::format(Poco::Timestamp(), 
Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
 << "Last-Modified: " << 
Poco::DateTimeFormatter::format(Poco::Timestamp(), 
Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
 << "User-Agent: LOOLWSD WOPI Agent\r\n"
+<< "Cache-Control:max-age=11059200\r\n"
+<< "ETag: \"" LOOLWSD_VERSION_HASH "\"\r\n"
 << "Content-Length: " << preprocess.size() << "\r\n"
 << "Content-Type: " << mimeType << "\r\n"
 << "\r\n"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Stephan Bergmann
 include/vcl/toolbox.hxx   |2 +-
 vcl/source/window/toolbox.cxx |   20 +++-
 2 files changed, 12 insertions(+), 10 deletions(-)

New commits:
commit 609b13037036dfbca952a018403950d7046a3027
Author: Stephan Bergmann 
Date:   Fri Mar 10 17:26:23 2017 +0100

Propagate integer type mismatch out of ToolBox::ImplFindItemPos

Change-Id: I6f0c06491cf3c09d97b637d7456debd1e3decbcd

diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 19730ec..52c3bc5 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -251,7 +251,7 @@ public:
 static SAL_DLLPRIVATE sal_uInt16 ImplTestLineSize( ToolBox* pThis, const 
Point& rPos );
 static SAL_DLLPRIVATE void ImplLineSizing( ToolBox* pThis, const Point& 
rPos, Rectangle& rRect, sal_uInt16 nLineMode );
 static SAL_DLLPRIVATE sal_uInt16 ImplFindItemPos( ToolBox* pBox, const 
Point& rPos );
-static SAL_DLLPRIVATE sal_uInt16 ImplFindItemPos( const ImplToolItem* 
pItem, const std::vector< ImplToolItem >& rList );
+static SAL_DLLPRIVATE std::vector::size_type 
ImplFindItemPos( const ImplToolItem* pItem, const std::vector< ImplToolItem >& 
rList );
 SAL_DLLPRIVATE void ImplDrawMenuButton(vcl::RenderContext& rRenderContext, 
bool bHighlight);
 SAL_DLLPRIVATE void ImplDrawButton(vcl::RenderContext& rRenderContext, 
const Rectangle &rRect, sal_uInt16 highlight, bool bChecked, bool bEnabled, 
bool bIsWindow);
 static SAL_DLLPRIVATE sal_uInt16 ImplCountLineBreaks( const ToolBox *pThis 
);
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 403c823..af83d66 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -47,6 +47,7 @@
 #endif
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -5336,16 +5337,15 @@ ImplToolItem* ToolBox::ImplGetFirstValidItem( 
sal_uInt16 nLine )
 return (it == mpData->m_aItems.end()) ? nullptr : &(*it);
 }
 
-sal_uInt16 ToolBox::ImplFindItemPos( const ImplToolItem* pItem, const 
std::vector< ImplToolItem >& rList )
+std::vector::size_type ToolBox::ImplFindItemPos( const 
ImplToolItem* pItem, const std::vector< ImplToolItem >& rList )
 {
 if( pItem )
 {
-sal_uInt16 nPos;
-for( nPos = 0; nPos < rList.size(); ++nPos )
+for( std::vector::size_type nPos = 0; nPos < 
rList.size(); ++nPos )
 if( &rList[ nPos ] == pItem )
 return nPos;
 }
-return TOOLBOX_ITEM_NOTFOUND;
+return std::numeric_limits::size_type>::max();
 }
 
 void ToolBox::ChangeHighlight( sal_uInt16 nPos )
@@ -5387,8 +5387,8 @@ void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, 
bool bNoGrabFocus )
 
 if( pItem )
 {
-sal_uInt16 aPos = ToolBox::ImplFindItemPos( pItem, mpData->m_aItems );
-if( aPos != TOOLBOX_ITEM_NOTFOUND)
+std::vector::size_type aPos = ToolBox::ImplFindItemPos( 
pItem, mpData->m_aItems );
+if( aPos != 
std::numeric_limits::size_type>::max())
 {
 // check for line breaks
 sal_uInt16 nLine = ImplGetItemLine( pItem );
@@ -5411,9 +5411,11 @@ void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, 
bool bNoGrabFocus )
 
 mnHighItemId = pItem->mnId;
 InvalidateItem(aPos);
+//TODO: std::vector::size_type -> sal_uInt16!
 
 if( mbSelection )
 mnCurPos = aPos;
+//TODO: std::vector::size_type -> sal_uInt16!
 ImplShowFocus();
 
 if( pItem->mpWindow )
@@ -5538,10 +5540,10 @@ bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool 
bNoCycle )
 
 if( pToolItem )
 {
-sal_uLong pos = ToolBox::ImplFindItemPos( pToolItem, mpData->m_aItems 
);
-sal_uLong nCount = mpData->m_aItems.size();
+std::vector::size_type pos = ToolBox::ImplFindItemPos( 
pToolItem, mpData->m_aItems );
+std::vector::size_type nCount = mpData->m_aItems.size();
 
-sal_uLong i=0;
+std::vector::size_type i=0;
 do
 {
 if( bUp )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] core.git: Fix Executable_pdfverify dependencies on Linux

2017-03-10 Thread Michael Stahl
On 07.03.2017 14:42, Stephan Bergmann wrote:
> On 03/05/2017 11:54 AM, Stephan Bergmann wrote:
>> commit f764d67da42caa71fd5e02146b1ca32680ae2f6e
>> Author: Stephan Bergmann 
>> Date:   Sun Mar 5 11:54:05 2017 +0100
>>
>> Fix Executable_pdfverify dependencies on Linux
>>
>> Change-Id: Idf5561baaa714834e8e763e379a79d084e21dc80
>>
>> diff --git a/xmlsecurity/Executable_pdfverify.mk 
>> b/xmlsecurity/Executable_pdfverify.mk
>> index 9a67a78..9364e39 100644
>> --- a/xmlsecurity/Executable_pdfverify.mk
>> +++ b/xmlsecurity/Executable_pdfverify.mk
>> @@ -34,4 +34,16 @@ $(eval $(call 
>> gb_Executable_add_exception_objects,pdfverify,\
>>  xmlsecurity/workben/pdfverify \
>>  ))
>>
>> +# Library_xmlsecurity links against Library_xsec_gpg (on certain OS), which
>> +# links against gpgmepp dynamic library from external project gpgmepp, which
>> +# (for non-SYSTEM_GPGMEPP) is delivered to instdir/program in
>> +# ExternalPackage_gpgme, and at least the Linux linker wants to see all
>> +# (recursively) linked libraries when linking an executable:
>> +ifneq ($(filter-out WNT MACOSX ANDROID IOS,$(OS)),)
>> +ifneq ($(SYSTEM_GPGMEPP),TRUE)
>> +$(call gb_Executable_get_target,pdfverify): \
>> +$(call gb_ExternalPackage_get_target,gpgme)
>> +endif
>> +endif
>> +
>>  # vim:set noet sw=4 ts=4:

k

[...]

> to run---didn't find any further cases of such missing dependencies.  So 
> either there really aren't any, or my /usr/lib64 happened to contain 
> enough libraries to erroneously and silently satisfy all the other demands.

i think this problem is better solved in gb_LinkTarget__use_gpgmepp like
commit ee9cb85e9adc03693141a106630a4f278b4e93ac.

probably that's how it works for other externals?


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


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

2017-03-10 Thread Michael Stahl
 RepositoryExternal.mk   |2 +-
 xmlsecurity/Executable_pdfverify.mk |   12 
 2 files changed, 1 insertion(+), 13 deletions(-)

New commits:
commit ee9cb85e9adc03693141a106630a4f278b4e93ac
Author: Michael Stahl 
Date:   Fri Mar 10 17:11:49 2017 +0100

gpgme: change gb_LinkTarget__use_gpgmepp to depend on package

This replaces f764d67da42caa71fd5e02146b1ca32680ae2f6e with a better
fix, no point in littering the makefiles with manual dependencies when
we can just avoid the problem in one place with a tiny performance cost.

Change-Id: Ic7e91ee4c99deb12a9544cf691c0995de6ae2bad

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 00cae64..284fe0a 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3427,7 +3427,7 @@ $(call gb_LinkTarget_set_include,$(1),\
 $(call gb_LinkTarget_add_libs,$(1),\
-L$(call gb_UnpackedTarball_get_dir,gpgme)/lang/cpp/src/.libs/ 
-lgpgmepp \
 )
-$(call gb_LinkTarget_use_external_project,$(1),gpgme,full)
+$(call gb_LinkTarget_use_package,$(1),gpgme)
 
 endef
 
diff --git a/xmlsecurity/Executable_pdfverify.mk 
b/xmlsecurity/Executable_pdfverify.mk
index 9364e39..9a67a78 100644
--- a/xmlsecurity/Executable_pdfverify.mk
+++ b/xmlsecurity/Executable_pdfverify.mk
@@ -34,16 +34,4 @@ $(eval $(call gb_Executable_add_exception_objects,pdfverify,\
 xmlsecurity/workben/pdfverify \
 ))
 
-# Library_xmlsecurity links against Library_xsec_gpg (on certain OS), which
-# links against gpgmepp dynamic library from external project gpgmepp, which
-# (for non-SYSTEM_GPGMEPP) is delivered to instdir/program in
-# ExternalPackage_gpgme, and at least the Linux linker wants to see all
-# (recursively) linked libraries when linking an executable:
-ifneq ($(filter-out WNT MACOSX ANDROID IOS,$(OS)),)
-ifneq ($(SYSTEM_GPGMEPP),TRUE)
-$(call gb_Executable_get_target,pdfverify): \
-$(call gb_ExternalPackage_get_target,gpgme)
-endif
-endif
-
 # vim:set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Caolán McNamara
 vcl/source/filter/jpeg/JpegReader.cxx |   19 ---
 1 file changed, 19 deletions(-)

New commits:
commit 14cdcd154e9621ffdc4e00af7bc84b56d76d6cd4
Author: Caolán McNamara 
Date:   Fri Mar 10 15:54:32 2017 +

min valid jpeg len is less than 512

our qa tests already include such, so this isn't right

Change-Id: I86fb02bf353fb5b228db915f04db6e36cfb40c51

diff --git a/vcl/source/filter/jpeg/JpegReader.cxx 
b/vcl/source/filter/jpeg/JpegReader.cxx
index 7490cb3..ad67332 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -30,7 +30,6 @@
 #include 
 #include 
 
-#define JPEG_MIN_READ 512
 #define BUFFER_SIZE  4096
 
 /*
@@ -275,24 +274,6 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
 {
 ReadState   eReadState;
 boolbRet = false;
-sal_uInt8   cDummy;
-
-// TODO: is it possible to get rid of this seek to the end?
-// check if the stream's end is already available
-mrStream.Seek( STREAM_SEEK_TO_END );
-mrStream.ReadUChar( cDummy );
-long nEndPosition = mrStream.Tell();
-
-// else check if at least JPEG_MIN_READ bytes can be read
-if( mrStream.GetError() == ERRCODE_IO_PENDING )
-{
-mrStream.ResetError();
-if( ( nEndPosition  - mnFormerPos ) < JPEG_MIN_READ )
-{
-mrStream.Seek( mnLastPos );
-return JPEGREAD_NEED_MORE;
-}
-}
 
 // seek back to the original position
 mrStream.Seek( mnLastPos );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - sal/textenc

2017-03-10 Thread Caolán McNamara
 sal/textenc/tcvtkr6.tab |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 791354f2baa565a5940d56a925406484dbd34f40
Author: Caolán McNamara 
Date:   Thu Mar 9 09:40:58 2017 +

ofz#770 JOHAB_73 table starts at 0xA not 0x2

the start value is out by one row

Change-Id: I77ed154358516ccd47a090cf7ed45bb609bc81a3
Reviewed-on: https://gerrit.libreoffice.org/34995
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 
(cherry picked from commit a99f52608f38fb6be309fdfa22c7f4c418031394)

diff --git a/sal/textenc/tcvtkr6.tab b/sal/textenc/tcvtkr6.tab
index 384c120..de68d62 100644
--- a/sal/textenc/tcvtkr6.tab
+++ b/sal/textenc/tcvtkr6.tab
@@ -1039,7 +1039,7 @@ static ImplUniToDBCSHighTab const aJOHABDBCSHighTab[256] =
 { 0x01, 0xFD, aImplUniToDBCSTab_JOHAB_70 }, /* 0x70 */
 { 0x04, 0xFF, aImplUniToDBCSTab_JOHAB_71 }, /* 0x71 */
 { 0x00, 0xFD, aImplUniToDBCSTab_JOHAB_72 }, /* 0x72 */
-{ 0x02, 0xFE, aImplUniToDBCSTab_JOHAB_73 }, /* 0x73 */
+{ 0x0A, 0xFE, aImplUniToDBCSTab_JOHAB_73 }, /* 0x73 */
 { 0x01, 0xF7, aImplUniToDBCSTab_JOHAB_74 }, /* 0x74 */
 { 0x01, 0xFC, aImplUniToDBCSTab_JOHAB_75 }, /* 0x75 */
 { 0x00, 0xFE, aImplUniToDBCSTab_JOHAB_76 }, /* 0x76 */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Stephan Bergmann
 vcl/headless/svpprn.cxx |2 +-
 vcl/unx/generic/print/genprnpsp.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 516bb69247c79ea0913856b9b053599f57ad90fb
Author: Stephan Bergmann 
Date:   Fri Mar 10 16:45:31 2017 +0100

The previous commit wasn't really thought through

Change-Id: I88e44e637e2ac93b4deed42a2d0f94b0a973c995

diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx
index 50a4432..0db8fd8 100644
--- a/vcl/headless/svpprn.cxx
+++ b/vcl/headless/svpprn.cxx
@@ -105,7 +105,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, 
JobData& rData )
  nPaperBin < pKey->countValues();
  nPaperBin++ );
 pJobSetup->SetPaperBin(
-(nPaperBin < 0 || nPaperBin >= pKey->countValues()
+(nPaperBin == pKey->countValues()
  || pValue == pKey->getDefaultValue())
 ? 0x : nPaperBin);
 }
diff --git a/vcl/unx/generic/print/genprnpsp.cxx 
b/vcl/unx/generic/print/genprnpsp.cxx
index 1790571..f8321b7 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -201,7 +201,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, 
JobData& rData )
  nPaperBin < pKey->countValues();
  nPaperBin++);
 pJobSetup->SetPaperBin(
-nPaperBin < 0 || nPaperBin >= pKey->countValues() ? 0 : nPaperBin);
+nPaperBin == pKey->countValues() ? 0 : nPaperBin);
 }
 
 // copy duplex
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Caolán McNamara
 vcl/source/filter/jpeg/JpegReader.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 3114d8a12eb14f27229ecaad6d810e2020b86441
Author: Caolán McNamara 
Date:   Fri Mar 10 15:31:28 2017 +

improve scoping

Change-Id: I2c7f607f05b07b7ec5453758910fdcb7f27ae697

diff --git a/vcl/source/filter/jpeg/JpegReader.cxx 
b/vcl/source/filter/jpeg/JpegReader.cxx
index 7cd9a22..7490cb3 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -273,8 +273,6 @@ Graphic JPEGReader::CreateIntermediateGraphic(long nLines)
 
 ReadState JPEGReader::Read( Graphic& rGraphic )
 {
-longnEndPosition;
-longnLines;
 ReadState   eReadState;
 boolbRet = false;
 sal_uInt8   cDummy;
@@ -283,7 +281,7 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
 // check if the stream's end is already available
 mrStream.Seek( STREAM_SEEK_TO_END );
 mrStream.ReadUChar( cDummy );
-nEndPosition = mrStream.Tell();
+long nEndPosition = mrStream.Tell();
 
 // else check if at least JPEG_MIN_READ bytes can be read
 if( mrStream.GetError() == ERRCODE_IO_PENDING )
@@ -300,6 +298,7 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
 mrStream.Seek( mnLastPos );
 
 // read the (partial) image
+long nLines;
 ReadJPEG( this, &mrStream, &nLines, GetPreviewSize() );
 
 if (!maBitmap.IsEmpty())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp wsd/FileServer.cpp wsd/LOOLWSD.cpp

2017-03-10 Thread Michael Meeks
 wsd/DocumentBroker.cpp |   11 ++-
 wsd/FileServer.cpp |2 --
 wsd/LOOLWSD.cpp|2 +-
 3 files changed, 11 insertions(+), 4 deletions(-)

New commits:
commit 3b370022c02944fb26cf5f445d49f0d13a65e4e8
Author: Michael Meeks 
Date:   Fri Mar 10 15:37:09 2017 +

Improve state dumping.

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index d2b563d..de6bac6 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1305,12 +1305,21 @@ void DocumentBroker::dumpState()
 {
 std::unique_lock lock(_mutex);
 
-std::cerr << " Broker: " << _filename << "\n";
+std::cerr << " Broker: " << _filename;
+if (_markToDestroy)
+std::cerr << " *** Marked to destroy ***\n";
+else
+std::cerr << " has live sessions\n";
+std::cerr << "  loaded?: " << _isLoaded << "\n";
+std::cerr << "  modified?: " << _isModified << "\n";
 std::cerr << "  jail id: " << _jailId << "\n";
 std::cerr << "  public uri: " << _uriPublic.toString() << "\n";
 std::cerr << "  jailed uri: " << _uriJailed.toString() << "\n";
 std::cerr << "  doc key: " << _docKey << "\n";
 std::cerr << "  num sessions: " << getSessionsCount() << "\n";
+std::cerr << "  last editable?: " << _lastEditableSession << "\n";
+std::cerr << "  cursor " << _cursorPosX << ", " << _cursorPosY
+  << "( " << _cursorWidth << "," << _cursorHeight << ")\n";
 
 _poll->dumpState();
 }
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index f1d35cf..65b43d4 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -34,8 +34,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 
 #include "Auth.hpp"
 #include "Common.hpp"
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 589d0b6..8d0a3a4e 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2259,7 +2259,7 @@ private:
 _clientSession = createNewClientSession(ws, _id, uriPublic, 
docBroker, isReadOnly);
 if (_clientSession)
 {
-// Transfer the socket to the DocumentBroker.
+// Transfer the client socket to the DocumentBroker.
 auto socket = _socket.lock();
 if (socket)
 {
___
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' - 18 commits - configure.ac editeng/source forms/source hwpfilter/source include/oox oox/source sal/textenc sc/source sd/qa solenv/gbui

2017-03-10 Thread Katarina Behrens
 configure.ac   |   32 -
 dev/null   |binary
 editeng/source/editeng/editdoc.hxx |   12 
 forms/source/component/ListBox.cxx |4 
 hwpfilter/source/hbox.cxx  |5 
 hwpfilter/source/hbox.h|   91 +--
 hwpfilter/source/hwpread.cxx   |   10 
 include/oox/export/drawingml.hxx   |9 
 oox/source/export/chartexport.cxx  |   11 
 oox/source/export/drawingml.cxx|   75 +-
 sal/textenc/tcvtkr6.tab|2 
 sc/source/core/data/column3.cxx|   69 ++
 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx |2 
 sc/source/ui/view/preview.cxx  |6 
 sd/qa/unit/export-tests-ooxml1.cxx |6 
 solenv/gbuild/platform/filter-showIncludes.awk |1 
 svl/source/numbers/zforscan.cxx|2 
 svl/source/numbers/zforscan.hxx|1 
 svx/source/svdraw/svdopath.cxx |2 
 sw/qa/extras/rtfimport/data/tdf104287.rtf  |   38 +
 sw/qa/extras/rtfimport/rtfimport.cxx   |8 
 sw/qa/extras/ww8export/data/tdf99120.doc   |binary
 sw/qa/extras/ww8export/ww8export2.cxx  |9 
 sw/qa/extras/ww8import/ww8import.cxx   |9 
 sw/source/core/doc/doccomp.cxx |   22 
 sw/source/filter/ww8/docxattributeoutput.cxx   |7 
 sw/source/filter/ww8/wrtw8sty.cxx  |1 
 vcl/CppunitTest_vcl_wmf_test.mk|1 
 vcl/Library_vcl.mk |1 
 vcl/inc/CommonSalLayout.hxx|1 
 vcl/source/gdi/CommonSalLayout.cxx |9 
 vcl/unx/gtk/a11y/atkaction.cxx |   11 
 vcl/unx/gtk/a11y/atkcomponent.cxx  |   11 
 vcl/unx/gtk/a11y/atkeditabletext.cxx   |   11 
 vcl/unx/gtk/a11y/atkhypertext.cxx  |   11 
 vcl/unx/gtk/a11y/atkimage.cxx  |   11 
 vcl/unx/gtk/a11y/atklistener.cxx   |   20 
 vcl/unx/gtk/a11y/atklistener.hxx   |2 
 vcl/unx/gtk/a11y/atkselection.cxx  |   11 
 vcl/unx/gtk/a11y/atktable.cxx  |   11 
 vcl/unx/gtk/a11y/atktext.cxx   |   44 +
 vcl/unx/gtk/a11y/atktextattributes.cxx |   11 
 vcl/unx/gtk/a11y/atkutil.cxx   |   25 
 vcl/unx/gtk/a11y/atkvalue.cxx  |   11 
 vcl/unx/gtk/a11y/atkwrapper.cxx|  266 
--
 vcl/unx/gtk/a11y/atkwrapper.hxx|   34 +
 vcl/win/gdi/gdiimpl.cxx|6 
 vcl/win/gdi/salnativewidgets-luna.cxx  |4 
 vcl/win/gdi/winlayout.cxx  |   31 -
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |   13 
 writerfilter/source/rtftok/rtfdocumentimpl.hxx |4 
 writerfilter/source/rtftok/rtfvalue.cxx|   52 +
 writerfilter/source/rtftok/rtfvalue.hxx|6 
 53 files changed, 633 insertions(+), 419 deletions(-)

New commits:
commit 440008aac0bbd7d466b837ba9046fcf277d35056
Author: Katarina Behrens 
Date:   Wed Mar 1 17:45:16 2017 +0100

tdf#95612: Print preview: page numbering starts with 1 (not 0)

unless otherwise specified. It was okay for 1st page & broken
everywhere else. Possibly resolves tdf#95206 as well ...

Change-Id: Ie69f770a28dd69f90d4f04ad4fa9e701fa2d56e2
Reviewed-on: https://gerrit.libreoffice.org/34759
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit c07ac0d92ad830762906586164bab466a0f05531)
Reviewed-on: https://gerrit.libreoffice.org/34946
(cherry picked from commit acd58ceaa1d792d0a16c270c56ff727321fb2aac)

diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 7099142..bf8115a 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -249,18 +249,18 @@ void ScPreview::CalcPages()
 while (nStart > static_cast(nPages.size()))
 nPages.push_back(0);
 while (nStart > static_cast(nFirstAttr.size()))
-nFirstAttr.push_back(0);
+

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

2017-03-10 Thread Katarina Behrens
 sc/source/ui/view/preview.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit acd58ceaa1d792d0a16c270c56ff727321fb2aac
Author: Katarina Behrens 
Date:   Wed Mar 1 17:45:16 2017 +0100

tdf#95612: Print preview: page numbering starts with 1 (not 0)

unless otherwise specified. It was okay for 1st page & broken
everywhere else. Possibly resolves tdf#95206 as well ...

Change-Id: Ie69f770a28dd69f90d4f04ad4fa9e701fa2d56e2
Reviewed-on: https://gerrit.libreoffice.org/34759
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit c07ac0d92ad830762906586164bab466a0f05531)
Reviewed-on: https://gerrit.libreoffice.org/34946

diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 7099142..bf8115a 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -249,18 +249,18 @@ void ScPreview::CalcPages()
 while (nStart > static_cast(nPages.size()))
 nPages.push_back(0);
 while (nStart > static_cast(nFirstAttr.size()))
-nFirstAttr.push_back(0);
+nFirstAttr.push_back(1);
 
 for (SCTAB i=nStart; i(nPages.size()))
 nPages.push_back(0);
 if ( i == static_cast(nFirstAttr.size()))
-nFirstAttr.push_back(0);
+nFirstAttr.push_back(1);
 if (!aOptions.GetAllSheets() && maSelectedTabs.count(i) == 0)
 {
 nPages[i] = 0;
-nFirstAttr[i] = 0;
+nFirstAttr[i] = 1;
 continue;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Tor Lillqvist
 solenv/gbuild/platform/filter-showIncludes.awk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 43af3605d7e3b372dcc61f9cbc2cabff09396ed5
Author: Tor Lillqvist 
Date:   Fri Mar 10 17:12:01 2017 +0200

Fix comment to match reality

Change-Id: I13eb327673af451cc81d4134ec8fedb33702c0ac

diff --git a/solenv/gbuild/platform/filter-showIncludes.awk 
b/solenv/gbuild/platform/filter-showIncludes.awk
index 6ec13e2..a05af58 100755
--- a/solenv/gbuild/platform/filter-showIncludes.awk
+++ b/solenv/gbuild/platform/filter-showIncludes.awk
@@ -54,9 +54,9 @@ BEGIN {
 }
 }
 } else {
-# because MSVC stupidly prints the include files on stderr, it's
+# because MSVC stupidly prints errors on stdout, it's
 # necessary to forward everything that isn't matched by the pattern
-# so users get to see compiler errors
+# so users get to see them.
 if (firstline) { # ignore the line that just prints name of sourcefile
 firstline = 0
 } else {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: DbGridControl's confusion of BrowseBox's column number vs. column ID

2017-03-10 Thread Lionel Elie Mamane
On Fri, Mar 10, 2017 at 01:52:36PM +0100, Stephan Bergmann wrote:

> svtools' BrowseBox class (include/svtools/brwbox.hxx; effectively a
> collection of BrowseColumn via the BrowseBox::pCols member) apparently
> distinguishes between a column's index/position/number (i.e., the
> BrowseColumn's position within the BrowseBox::pCols vector) and its ID
> (i.e., the BrowseColumn::_nId member, svtools/source/brwbox/datwin.hxx).

> Now, BrowseBox::GetColumnAtXPosPixel (svtools/source/brwbox/brwbox1.cxx)
> apparently always returned a column number,

> while DbGridControl::GetModelColumnPos (svx/source/fmcomp/gridctrl.cxx)
> apparently always expected a column ID as input,


> But there is two occurrences of code in svx/source/fmcomp/gridctrl.cxx that
> feeds the output of GetColumnAtXPosPixel as input into GetModelColumnPos,
> i.e., misinterprets a column number as a column ID. Meanwhile that code
> lives in DbGridControl::StartDrag,

> [...]
> > sal_uInt16 nColId = GetColumnAtXPosPixel(rPosPixel.X());
> > long   nRow = GetRowAtYPosPixel(rPosPixel.Y());
> > if (nColId != HandleColumnId && nRow >= 0)
> > {
> > if (GetDataWindow().IsMouseCaptured())
> > GetDataWindow().ReleaseMouse();
> > 
> > size_t Location = GetModelColumnPos( nColId );
> [...]

There are a few bugs around dragging columns that I know of, but they
don't look obviously directly caused by what you describe. Maybe in
combination with something else I'm not aware of. It is not known to
me that they appear only in the presence of hidden columns. One bug
that comes to mind is tdf#54021: dragging a column copies it instead
of moving it. But AFAIK this is a regression, so if this confusion was
"always" there... Maybe it was latent but exposed by another change.

> and DbGridControl::Command,
> 
> [...]
> > sal_uInt16 nColId = 
> > GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X());
> > long   nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
> > 
> > if (nColId == HandleColumnId)
> > {
> > executeRowContextMenu( nRow, rEvt.GetMousePosPixel() );
> > }
> > else if (canCopyCellText(nRow, nColId))
> > {
> > ScopedVclPtrInstance 
> > aContextMenu(SVX_RES(RID_SVXMNU_CELL));
> > aContextMenu->RemoveDisabledEntries(true, true);
> > switch (aContextMenu->Execute(this, 
> > rEvt.GetMousePosPixel()))
> > {
> > case SID_COPY:
> > copyCellText(nRow, nColId);
> [...]
> 
> where DbGridControl::copyCellText (svx/source/fmcomp/gridctrl.cxx) calls
> GetModelColumnPos,
> 
> > void DbGridControl::copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId)
> > {
> > DBG_ASSERT(canCopyCellText(_nRow, _nColId), 
> > "DbGridControl::copyCellText: invalid call!");
> > DbGridColumn* pColumn = m_aColumns[ GetModelColumnPos(_nColId) ];
> > SeekRow(_nRow);
> > OStringTransfer::CopyString( GetCurrentRowCellText( pColumn,m_xPaintRow 
> > ), this );
> > }

Look at DbGridControl::HideColumn:

DbGridControl_Base::RemoveColumn(nId);
 // don't use my own RemoveColumn, this would remove it from 
m_aColumns, too

I now realise there are *three* numbers linked to a column:

 - position in m_aColumns
 - position in pCols
 - stored (immutable?) id

See also the big comment in DbGridControl::ColumnMoved, where they are
called (I think in that order):

 - model pos
 - view pos
 - ID

It looks like ID and model pos could always be the same *initially*
but it looks like this is not the case when BrowseBox::SetColumnPos /
DbGridControl::ColumnMoved is called.


My reading now is that DbGridControl::copyCellText gets a "view pos"
and passes it to GetModelColumnPos which expects an id and returns a
"model pos".


It starts to look like bugs will appear if you:

1) Open a document with a form with a table control.

2) Move a column (which may be possible only pogrammatically or after
   tdf#54021 is fixed)

3) Try to copy the cell text (you'll copy from the wrong column)

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


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

2017-03-10 Thread Stephan Bergmann
 vcl/headless/svpprn.cxx |9 +
 vcl/unx/generic/print/genprnpsp.cxx |7 +++
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit d3b5bd4a07a619db6bee1c39c32280ac3c620532
Author: Stephan Bergmann 
Date:   Fri Mar 10 15:55:33 2017 +0100

loplugin:loopvartoosmall

Change-Id: I07c13c354df1d7f523b08a39f2ed3f008051f7aa

diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx
index ec5450a..50a4432 100644
--- a/vcl/headless/svpprn.cxx
+++ b/vcl/headless/svpprn.cxx
@@ -99,14 +99,15 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, 
JobData& rData )
 pValue  = rData.m_aContext.getValue( pKey );
 if( pKey && pValue )
 {
-sal_uInt16 nPaperBin;
+int nPaperBin;
 for( nPaperBin = 0;
  pValue != pKey->getValue( nPaperBin ) &&
  nPaperBin < pKey->countValues();
  nPaperBin++ );
-pJobSetup->SetPaperBin(nPaperBin);
-if( nPaperBin >= pKey->countValues() || pValue == 
pKey->getDefaultValue() )
-pJobSetup->SetPaperBin( 0x );
+pJobSetup->SetPaperBin(
+(nPaperBin < 0 || nPaperBin >= pKey->countValues()
+ || pValue == pKey->getDefaultValue())
+? 0x : nPaperBin);
 }
 
 // copy duplex
diff --git a/vcl/unx/generic/print/genprnpsp.cxx 
b/vcl/unx/generic/print/genprnpsp.cxx
index 7f6d70f..1790571 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -195,14 +195,13 @@ static void copyJobDataToJobSetup( ImplJobSetup* 
pJobSetup, JobData& rData )
 pValue  = rData.m_aContext.getValue( pKey );
 if( pKey && pValue )
 {
-sal_uInt16 nPaperBin;
+int nPaperBin;
 for( nPaperBin = 0;
  pValue != pKey->getValue( nPaperBin ) &&
  nPaperBin < pKey->countValues();
  nPaperBin++);
-pJobSetup->SetPaperBin(nPaperBin);
-if( pJobSetup->GetPaperBin() >= pKey->countValues() )
-pJobSetup->SetPaperBin( 0 );
+pJobSetup->SetPaperBin(
+nPaperBin < 0 || nPaperBin >= pKey->countValues() ? 0 : nPaperBin);
 }
 
 // copy duplex
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Caolán McNamara
 editeng/qa/unit/core-test.cxx |3 +++
 vcl/source/filter/jpeg/JpegReader.cxx |   13 +++--
 vcl/source/filter/jpeg/jpeg.h |   11 +++
 vcl/source/filter/jpeg/jpegc.cxx  |3 ++-
 4 files changed, 19 insertions(+), 11 deletions(-)

New commits:
commit d7685eb3f417e19a5e61f2fe550eb03d6848365d
Author: Caolán McNamara 
Date:   Fri Mar 10 14:53:47 2017 +

ensure SfxApplication exists for editeng test

Change-Id: I73814e38437f83f8aa7b87addc285e82f7357bea

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 23defaa..dea52f3 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -12,6 +12,7 @@
 #include 
 #include 
 
+#include "sfx2/app.hxx"
 #include "svl/itempool.hxx"
 #include "editeng/eerdll.hxx"
 #include "editeng/eerdll2.hxx"
@@ -80,6 +81,8 @@ void Test::setUp()
 test::BootstrapFixture::setUp();
 
 mpItemPool = new EditEngineItemPool(true);
+
+SfxApplication::GetOrCreate();
 }
 
 void Test::tearDown()
commit f596e5d461b6436cdb6ee9efa59807d99bb54135
Author: Caolán McNamara 
Date:   Fri Mar 10 14:04:59 2017 +

ofz#799 stop decompressing if the file is truncated

Change-Id: I4040ebbf7b21905b950f4af36012bc83aebaa320

diff --git a/vcl/source/filter/jpeg/JpegReader.cxx 
b/vcl/source/filter/jpeg/JpegReader.cxx
index cde54c4..7cd9a22 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -33,15 +33,6 @@
 #define JPEG_MIN_READ 512
 #define BUFFER_SIZE  4096
 
-/* Expanded data source object for stdio input */
-
-struct SourceManagerStruct {
-jpeg_source_mgr pub;/* public fields */
-SvStream*   stream; /* source stream */
-JOCTET* buffer; /* start of buffer */
-boolean start_of_file;  /* have we gotten any data yet? */
-};
-
 /*
  * Initialize source --- called by jpeg_read_header
  * before any data is actually read.
@@ -55,6 +46,7 @@ extern "C" void init_source (j_decompress_ptr cinfo)
  * This is correct behavior for reading a series of images from one source.
  */
 source->start_of_file = TRUE;
+source->no_data_available = FALSE;
 }
 
 long StreamRead( SvStream* pStream, void* pBuffer, long nBufferSize )
@@ -89,6 +81,7 @@ extern "C" boolean fill_input_buffer (j_decompress_ptr cinfo)
 
 if (!nbytes)
 {
+source->no_data_available = TRUE;
 if (source->start_of_file) /* Treat empty input file as fatal 
error */
 {
 ERREXIT(cinfo, JERR_INPUT_EMPTY);
@@ -158,7 +151,7 @@ void jpeg_svstream_src (j_decompress_ptr cinfo, void* input)
 (*cinfo->mem->alloc_small) (reinterpret_cast(cinfo), 
JPOOL_PERMANENT, BUFFER_SIZE * sizeof(JOCTET)));
 }
 
-source = reinterpret_cast(cinfo->src);
+source = reinterpret_cast(cinfo->src);
 source->pub.init_source = init_source;
 source->pub.fill_input_buffer = fill_input_buffer;
 source->pub.skip_input_data = skip_input_data;
diff --git a/vcl/source/filter/jpeg/jpeg.h b/vcl/source/filter/jpeg/jpeg.h
index 08caa47..1927663 100644
--- a/vcl/source/filter/jpeg/jpeg.h
+++ b/vcl/source/filter/jpeg/jpeg.h
@@ -34,6 +34,7 @@ namespace com { namespace sun { namespace star { namespace 
task {
 class JPEGReader;
 class JPEGWriter;
 class Size;
+class SvStream;
 
 void jpeg_svstream_src (j_decompress_ptr cinfo, void* infile);
 
@@ -49,6 +50,16 @@ voidReadJPEG( JPEGReader* pJPEGReader, void* 
pInputStream, long* pLines,
 
 longTransform( void* pInputStream, void* pOutputStream, long nAngle );
 
+/* Expanded data source object for stdio input */
+
+struct SourceManagerStruct {
+jpeg_source_mgr pub;/* public fields */
+SvStream*   stream; /* source stream */
+JOCTET* buffer; /* start of buffer */
+boolean start_of_file;  /* have we gotten any data yet? */
+boolean no_data_available;
+};
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index 8fc0ed8..a5f1edb 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -84,6 +84,7 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, 
long* pLines,
 
 jpeg_create_decompress( &cinfo );
 jpeg_svstream_src( &cinfo, pInputStream );
+SourceManagerStruct *source = 
reinterpret_cast(cinfo.src);
 jpeg_read_header( &cinfo, TRUE );
 
 cinfo.scale_num = 1;
@@ -190,7 +191,7 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, 
long* pLines,
 }
 }
 
-for (*pLines = 0; *pLines < nHeight; (*pLines)++)
+for (*pLines = 0; *pLines < nHeight && !source->no_data_available; 
(*pLines)++)
 {
 size_t yIndex = *pLines;
 
___
Libreoffice-commits maili

[Libreoffice-commits] online.git: net/WebSocketHandler.hpp

2017-03-10 Thread Michael Meeks
 net/WebSocketHandler.hpp |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 7a90430f85eb60a96def51fde15b324bc3a66431
Author: Michael Meeks 
Date:   Fri Mar 10 14:49:19 2017 +

Cleanup logging on single packet websocket messages more cleanly.

diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp
index b445ac7..5e987fb 100644
--- a/net/WebSocketHandler.hpp
+++ b/net/WebSocketHandler.hpp
@@ -118,6 +118,10 @@ public:
 
 // websocket fun !
 const size_t len = socket->_inBuffer.size();
+
+if (len == 0)
+return false; // avoid logging.
+
 LOG_TRC("Incoming WebSocket data of " << len << " bytes to socket #" 
<< socket->getFD());
 
 if (len < 2) // partial read
@@ -216,7 +220,7 @@ public:
 /// Implementation of the SocketHandlerInterface.
 virtual void handleIncomingMessage() override
 {
-while (handleOneIncomingMessage() && _inBuffer.size() > 0)
+while (handleOneIncomingMessage())
 ; // can have multiple msgs in one recv'd packet.
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: net/WebSocketHandler.hpp

2017-03-10 Thread Michael Meeks
 net/WebSocketHandler.hpp |   22 --
 1 file changed, 16 insertions(+), 6 deletions(-)

New commits:
commit 11f3a29cb2b5f5985d398ae4d7b3244d2467489f
Author: Michael Meeks 
Date:   Fri Mar 10 14:36:21 2017 +

WebSocket - several messages can appear in a single packet.

diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp
index 333b1be..b445ac7 100644
--- a/net/WebSocketHandler.hpp
+++ b/net/WebSocketHandler.hpp
@@ -110,18 +110,18 @@ public:
 }
 
 /// Implementation of the SocketHandlerInterface.
-virtual void handleIncomingMessage() override
+virtual bool handleOneIncomingMessage()
 {
 auto socket = _socket.lock();
 if (socket == nullptr)
-return;
+return false;
 
 // websocket fun !
 const size_t len = socket->_inBuffer.size();
 LOG_TRC("Incoming WebSocket data of " << len << " bytes to socket #" 
<< socket->getFD());
 
 if (len < 2) // partial read
-return;
+return false;
 
 unsigned char *p = reinterpret_cast(&socket->_inBuffer[0]);
 bool fin = p[0] & 0x80;
@@ -134,7 +134,7 @@ public:
 if (payloadLen == 126) // 2 byte length
 {
 if (len < 2 + 2)
-return;
+return false;
 
 payloadLen = (((unsigned)p[2]) << 8) | ((unsigned)p[3]);
 headerLen += 2;
@@ -142,7 +142,7 @@ public:
 else if (payloadLen == 127) // 8 byte length
 {
 if (len < 2 + 8)
-return;
+return false;
 
 payloadLen = uint64_t)p[9]) <<  0) + (((uint64_t)p[8]) <<  8) +
   (((uint64_t)p[7]) << 16) + (((uint64_t)p[6]) << 24) +
@@ -162,7 +162,7 @@ public:
 
 if (payloadLen + headerLen > len)
 { // partial read wait for more data.
-return;
+return false;
 }
 
 data = p + headerLen;
@@ -209,8 +209,18 @@ public:
 }
 
 _wsPayload.clear();
+
+return true;
 }
 
+/// Implementation of the SocketHandlerInterface.
+virtual void handleIncomingMessage() override
+{
+while (handleOneIncomingMessage() && _inBuffer.size() > 0)
+; // can have multiple msgs in one recv'd packet.
+}
+
+
 bool hasQueuedWrites() const override
 {
 LOG_TRC("WebSocket - asked for queued writes");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Andras Timar
 sc/source/ui/src/scfuncs.src |2 --
 1 file changed, 2 deletions(-)

New commits:
commit bed6a22318cf50f22c143708a24dc1638f677a5e
Author: Andras Timar 
Date:   Fri Mar 10 13:34:00 2017 +0100

remove empty strings, transex3 gave a warning

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

diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src
index 3f911cc..3eb299e 100644
--- a/sc/source/ui/src/scfuncs.src
+++ b/sc/source/ui/src/scfuncs.src
@@ -4842,8 +4842,6 @@ StringArray 
SC_OPCODE_RAWSUBTRACT+RID_SC_FUNC_DESCRIPTIONS_START
 < "Number from which following arguments are subtracted." ; >;
 < "subtrahend " ; >;
 < "Subtrahend 1, subtrahend 2, ... are numerical arguments subtracted 
from the minuend." ; >;
-< "" ; >;
-< "" ; >;
 };
 };
  // -=*# Resource for function ROUNDSIG #*=-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Bjoern Michaelsen
 editeng/source/editeng/eerdll.cxx   |   34 --
 editeng/source/editeng/eerdll2.hxx  |   16 +---
 editeng/source/editeng/impedit.hxx  |2 ++
 editeng/source/editeng/impedit2.cxx |4 +++-
 include/editeng/eerdll.hxx  |6 ++
 5 files changed, 48 insertions(+), 14 deletions(-)

New commits:
commit c54bb4a9f76a11561a7f4010382dbe46c0d2ef2a
Author: Bjoern Michaelsen 
Date:   Thu Mar 9 03:20:19 2017 +0100

tdf#99352: create editeng::SharedVclRessources

- instead of keeping vcl resources in a rtl::Static
- these are shared owned by all EditEngines
- they let go of them when disposed
- thus, this should prevent VclPtrs to leak beyond dispose()

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

diff --git a/editeng/source/editeng/eerdll.cxx 
b/editeng/source/editeng/eerdll.cxx
index 09b9909..a73d7eb 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -85,11 +85,8 @@ EditDLL& EditDLL::Get()
 }
 
 GlobalEditData::GlobalEditData() :
-ppDefItems(nullptr),
-mpVirDev(VclPtr::Create())
-{
-mpVirDev->SetMapMode(MapUnit::MapTwip);
-}
+ppDefItems(nullptr)
+{ }
 
 GlobalEditData::~GlobalEditData()
 {
@@ -197,11 +194,6 @@ uno::Reference< linguistic2::XLanguageGuessing > const & 
GlobalEditData::GetLang
 return xLanguageGuesser;
 }
 
-VclPtr GlobalEditData::GetStdVirtualDevice()
-{
-return mpVirDev;
-}
-
 EditResId::EditResId(sal_uInt16 nId)
 : ResId(nId, *EditDLL::GetResMgr())
 {
@@ -225,4 +217,26 @@ ResMgr* EditDLL::GetResMgr()
 return pResMgr;
 }
 
+
+editeng::SharedVclResources::SharedVclResources()
+: m_pVirDev(VclPtr::Create())
+{
+m_pVirDev->SetMapMode(MapUnit::MapTwip);
+}
+
+editeng::SharedVclResources::~SharedVclResources()
+{ m_pVirDev.disposeAndClear(); }
+
+VclPtr editeng::SharedVclResources::GetVirtualDevice()
+{ return m_pVirDev; }
+
+std::shared_ptr EditDLL::GetSharedVclResources()
+{
+SolarMutexGuard g;
+auto pLocked(pSharedVcl.lock());
+if(!pLocked)
+pSharedVcl = pLocked = 
std::shared_ptr(new editeng::SharedVclResources());
+return pLocked;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/editeng/eerdll2.hxx 
b/editeng/source/editeng/eerdll2.hxx
index 32c7c40..75bfb21 100644
--- a/editeng/source/editeng/eerdll2.hxx
+++ b/editeng/source/editeng/eerdll2.hxx
@@ -27,6 +27,19 @@
 class SfxPoolItem;
 class VirtualDevice;
 
+namespace editeng
+{
+class SharedVclResources
+{
+private:
+VclPtr m_pVirDev;
+public:
+SharedVclResources();
+~SharedVclResources();
+VclPtr GetVirtualDevice();
+};
+}
+
 class GlobalEditData
 {
 private:
@@ -34,7 +47,6 @@ private:
 std::vector*   ppDefItems;
 
 rtl::Reference xForbiddenCharsTable;
-VclPtr mpVirDev;
 
 public:
 GlobalEditData();
@@ -45,8 +57,6 @@ public:
 rtl::Reference const & 
GetForbiddenCharsTable();
 voidSetForbiddenCharsTable( 
rtl::Reference const & xForbiddenChars ) { 
xForbiddenCharsTable = xForbiddenChars; }
 css::uno::Reference< css::linguistic2::XLanguageGuessing > const & 
GetLanguageGuesser();
-
-VclPtr GetStdVirtualDevice();
 };
 
 #endif // INCLUDED_EDITENG_SOURCE_EDITENG_EERDLL2_HXX
diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index 106221f..e8d2cea 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -19,6 +19,7 @@
 #ifndef INCLUDED_EDITENG_SOURCE_EDITENG_IMPEDIT_HXX
 #define INCLUDED_EDITENG_SOURCE_EDITENG_IMPEDIT_HXX
 
+#include 
 #include 
 #include 
 #include 
@@ -397,6 +398,7 @@ class ImpEditEngine : public SfxListener
 typedef EditEngine::ViewsType ViewsType;
 
 private:
+std::shared_ptr pSharedVCL;
 
 
 // Data ...
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index 3338111..506477f 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -84,6 +84,7 @@ static sal_uInt16 lcl_CalcExtraSpace( ParaPortion*, const 
SvxLineSpacingItem& rL
 }
 
 ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) :
+pSharedVCL(EditDLL::Get().GetSharedVclResources()),
 aPaperSize( 0x7FFF, 0x7FFF ),
 aMinAutoPaperSize( 0x0, 0x0 ),
 aMaxAutoPaperSize( 0x7FFF, 0x7FFF ),
@@ -175,6 +176,7 @@ void ImpEditEngine::Dispose()
 EndListening(*pApp);
 pVirtDev.disposeAndClear();
 mpOwnDev.disposeAndClear();
+pSharedVCL.reset();
 }
 
 ImpEditEngine::~ImpEditEngine()
@@ -204,7 +206,7 @@ void ImpEditEngine::SetRefDevice( OutputDevice* pRef )
 if (pRef)
 pRefDev = pRef;
 else
-pRefDev = EditDLL::Get().GetGlobalData()->GetStdVirtualDevice();
+ 

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

2017-03-10 Thread Bjoern Michaelsen
 editeng/CppunitTest_editeng_core.mk |1 +
 editeng/Library_editeng.mk  |1 +
 editeng/source/editeng/impedit.hxx  |1 +
 editeng/source/editeng/impedit2.cxx |   15 +--
 editeng/source/editeng/impedit5.cxx |3 +++
 5 files changed, 19 insertions(+), 2 deletions(-)

New commits:
commit 1a044b25c279236d9f67847ec6ad426d8c5aac13
Author: Bjoern Michaelsen 
Date:   Thu Mar 9 00:35:42 2017 +0100

tdf#99352: dispose EditEngines when SfxApp dies

In an ideal world, by the time we reach DeInitVCL() there should be
neither non-null VclPtr nor EditEngine instances around. This fixes the
former for those VclPtrs owned by EditEngines, by disposing them when
SfxApplication is dying. The goal is -- for now -- to not have any
non-null VclPtrs around by DeInitVCL(), so we can e.g. assert() on that
to pick up regressions.

Should we one day have all EditEngines accounted for with proper smart
pointers that get torn down before DeInitVCL(), the Dispose() introduced
here might be removed again.

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

diff --git a/editeng/CppunitTest_editeng_core.mk 
b/editeng/CppunitTest_editeng_core.mk
index 00d2b80..c7a9610 100644
--- a/editeng/CppunitTest_editeng_core.mk
+++ b/editeng/CppunitTest_editeng_core.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_CppunitTest_use_libraries,editeng_core, \
 salhelper \
 sax \
 sot \
+sfx \
 svl \
 svt \
 test \
diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk
index c6c2fa0..88ba855 100644
--- a/editeng/Library_editeng.mk
+++ b/editeng/Library_editeng.mk
@@ -136,6 +136,7 @@ $(eval $(call gb_Library_use_libraries,editeng,\
 vcl \
 svl \
 sot \
+sfx \
 utl \
 tl \
 comphelper \
diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index 5a6ba26..106221f 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -1031,6 +1031,7 @@ public:
 mark (apostrophe) or not (default is on) */
 voidSetReplaceLeadingSingleQuotationMark( bool bReplace ) { 
mbReplaceLeadingSingleQuotationMark = bReplace; }
 boolIsReplaceLeadingSingleQuotationMark() const { return 
mbReplaceLeadingSingleQuotationMark; }
+void Dispose();
 };
 
 inline EPaM ImpEditEngine::CreateEPaM( const EditPaM& rPaM )
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index 1341ec7..3338111 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -163,6 +164,17 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, 
SfxItemPool* pItemPool ) :
 bCallParaInsertedOrDeleted = true;
 
 aEditDoc.SetModifyHdl( LINK( this, ImpEditEngine, DocModified ) );
+StartListening(*SfxGetpApp());
+}
+
+void ImpEditEngine::Dispose()
+{
+SolarMutexGuard g;
+auto pApp = SfxApplication::Get();
+if(pApp)
+EndListening(*pApp);
+pVirtDev.disposeAndClear();
+mpOwnDev.disposeAndClear();
 }
 
 ImpEditEngine::~ImpEditEngine()
@@ -177,8 +189,7 @@ ImpEditEngine::~ImpEditEngine()
 bDowning = true;
 SetUpdateMode( false );
 
-mpOwnDev.disposeAndClear();
-pVirtDev.disposeAndClear();
+Dispose();
 delete pEmptyItemSet;
 delete pUndoManager;
 delete pTextRanger;
diff --git a/editeng/source/editeng/impedit5.cxx 
b/editeng/source/editeng/impedit5.cxx
index edf94a0..fca0358 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 void ImpEditEngine::SetStyleSheetPool( SfxStyleSheetPool* pSPool )
 {
@@ -173,6 +174,8 @@ void ImpEditEngine::Notify( SfxBroadcaster& rBC, const 
SfxHint& rHint )
 }
 }
 }
+if(dynamic_cast(&rBC) != nullptr && rHint.GetId() 
== SfxHintId::Dying)
+Dispose();
 }
 
 EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const 
SfxItemSet& rSet )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Eike Rathke
 svl/source/numbers/zformat.cxx  |   10 --
 svl/source/numbers/zforscan.cxx |   23 +--
 2 files changed, 21 insertions(+), 12 deletions(-)

New commits:
commit fe73eff36718b6d99d0cf92d750c457872cc4dcc
Author: Eike Rathke 
Date:   Fri Mar 10 13:53:45 2017 +0100

guard against a (theoretical?) endless loop of blanks only

Change-Id: I68d6cca1b359aa8fba42663bddb1107c31102415

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 91c36d4..4bd1a9e 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2838,8 +2838,10 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber,
 bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC);
 if ( !bHideFraction &&  sDenominatorFormat.getLength() > 0 )
 {
+// Guard against a (theoretical?) endless loop of blanks only.
+sal_Int32 n = sDiv.getLength();
 sal_Int32 nDenominatorLen = sDenominatorFormat.getLength();
-while ( sDiv[0] == ' ' ) // left align denominator
+while ( n-- > 0 && sDiv[0] == ' ' ) // left align denominator
 {
 if (sDiv.getLength() <= nDenominatorLen)
 sDiv.append(" ");
commit c407fff205a270e02fe07885805b7250e71c28f8
Author: Eike Rathke 
Date:   Fri Mar 10 13:48:24 2017 +0100

prevent string access out of bounds

Though only the closing 0-character and the following check excludes that,
dbgutil asserts.

Change-Id: Ife1299042a60f6f058c4cf58b406d1cc022786a7

diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 7dbbb99..5644c2b 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -814,18 +814,21 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& 
rStr,
 switch (cToken)
 {
 case '/': // AM/PM, A/P
-cNext = rStr[nPos];
-if ( cNext == 'P' || cNext == 'p' )
+if (nPos < rStr.getLength())
 {
-sal_Int32 nLen = sSymbol.getLength();
-if ( 1 <= nLen &&
- (sSymbol[0] == 'A' || sSymbol[0] == 'a') &&
- (nLen == 1 ||
-  (nLen == 2 && (sSymbol[1] == 'M' || sSymbol[1] 
== 'm')
-   && (rStr[nPos + 1] == 'M' || rStr[nPos + 1] == 
'm'
+cNext = rStr[nPos];
+if ( cNext == 'P' || cNext == 'p' )
 {
-sSymbol += OUStringLiteral1(cToken);
-bDontStop = true;
+sal_Int32 nLen = sSymbol.getLength();
+if ( 1 <= nLen &&
+(sSymbol[0] == 'A' || sSymbol[0] == 'a') &&
+(nLen == 1 ||
+ (nLen == 2 && (sSymbol[1] == 'M' || 
sSymbol[1] == 'm')
+  && (rStr[nPos + 1] == 'M' || rStr[nPos + 
1] == 'm'
+{
+sSymbol += OUStringLiteral1(cToken);
+bDontStop = true;
+}
 }
 }
 break;
commit 77a8cf7eaf638276030d1c5be8705f5603f071a9
Author: Eike Rathke 
Date:   Fri Mar 10 13:38:28 2017 +0100

string access out of bounds

Change-Id: I4f6e6e8e77cdabe593bca5719b6ef38aeecc5da7

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 1de8ffc..91c36d4 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2838,9 +2838,13 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber,
 bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC);
 if ( !bHideFraction &&  sDenominatorFormat.getLength() > 0 )
 {
+sal_Int32 nDenominatorLen = sDenominatorFormat.getLength();
 while ( sDiv[0] == ' ' ) // left align denominator
 {
-sDiv.insert( sDenominatorFormat.getLength(), " " );
+if (sDiv.getLength() <= nDenominatorLen)
+sDiv.append(" ");
+else
+sDiv.insert( nDenominatorLen, " " );
 sDiv.remove( 0, 1 );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Caolán McNamara
 vcl/source/filter/wmf/enhwmf.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit f50a3995c7b1ba31d68decfab4b2baf4f4df27df
Author: Caolán McNamara 
Date:   Fri Mar 10 12:56:31 2017 +

ofz#797 truncate broken polygon to amount read

to avoid super slow polygon math

Change-Id: I30ef0afe96d9863df27ef7a4e7f7e8e7af36f8c1

diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 2674df3..6249b41 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -515,7 +515,11 @@ tools::Polygon EnhWMFReader::ReadPolygon(sal_uInt32 
nStartIndex, sal_uInt32 nPoi
 T nX, nY;
 *pWMF >> nX >> nY;
 if (!pWMF->good())
+{
+SAL_WARN("vcl.emf", "short read on polygon, truncating");
+aPolygon.SetSize(i);
 break;
+}
 aPolygon[ i ] = Point( nX, nY );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


DbGridControl's confusion of BrowseBox's column number vs. column ID

2017-03-10 Thread Stephan Bergmann
svtools' BrowseBox class (include/svtools/brwbox.hxx; effectively a 
collection of BrowseColumn via the BrowseBox::pCols member) apparently 
distinguishes between a column's index/position/number (i.e., the 
BrowseColumn's position within the BrowseBox::pCols vector) and its ID 
(i.e., the BrowseColumn::_nId member, svtools/source/brwbox/datwin.hxx).


Columns are inserted into a BrowseBox with (both in 
svtools/source/brwbox/brwbox1.cxx:) BrowseBox::InsertHandleColumn 
(inserting a "handle" column at position 0 with ID 0) and 
BrowseBox::InsertDataColumn (inserting a "data" column with a given 
nItemId somewhere in the collection).


Historically both column numbers and column IDs have been represented 
with unsigned 16-bit integers (both sal_uInt16, by now), which doesn't 
necessarily help in avoiding confusion between the two concepts.  (And 
indeed e.g. BROWSER_INVALIDID = SAL_MAX_UNIT16 appears to be used to 
represent both "no column ID", BrowseBox::GetColumnId, 
svtools/source/brwbox/brwbox2.cxx, and "no column number", 
BrowseBox::GetColumnAtXPosPixel, svtools/source/brwbox/brwbox1.cxx).


Now, BrowseBox::GetColumnAtXPosPixel (svtools/source/brwbox/brwbox1.cxx) 
apparently always returned a column number (from 
 
"initial import"),



USHORT BrowseBox::GetColumnAtXPosPixel( long nX, BOOL ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);

// accumulate the withds of the visible columns
long nColX = 0;
USHORT nCol;
for ( nCol = 0; nCol < USHORT(pCols->Count()); ++nCol )
{
BrowserColumn *pCol = pCols->GetObject(nCol);
if ( pCol->IsFrozen() || nCol >= nFirstCol )
nColX += pCol->Width();

if ( nColX > nX )
return nCol;
}

return BROWSER_INVALIDID;
}


while DbGridControl::GetModelColumnPos (svx/source/fmcomp/gridctrl.cxx) 
apparently always expected a column ID as input (from 
 
"initial import"),



sal_uInt16 DbGridControl::GetModelColumnPos( sal_uInt16 nId ) const
{
for (sal_uInt16 i=0; iGetId() == nId)
return i;

return -1;
}


But there is two occurrences of code in svx/source/fmcomp/gridctrl.cxx 
that feeds the output of GetColumnAtXPosPixel as input into 
GetModelColumnPos, i.e., misinterprets a column number as a column ID. 
Meanwhile that code lives in DbGridControl::StartDrag,


[...]

sal_uInt16 nColId = GetColumnAtXPosPixel(rPosPixel.X());
long   nRow = GetRowAtYPosPixel(rPosPixel.Y());
if (nColId != HandleColumnId && nRow >= 0)
{
if (GetDataWindow().IsMouseCaptured())
GetDataWindow().ReleaseMouse();

size_t Location = GetModelColumnPos( nColId );

[...]

and DbGridControl::Command,

[...]

sal_uInt16 nColId = 
GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X());
long   nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());

if (nColId == HandleColumnId)
{
executeRowContextMenu( nRow, rEvt.GetMousePosPixel() );
}
else if (canCopyCellText(nRow, nColId))
{
ScopedVclPtrInstance 
aContextMenu(SVX_RES(RID_SVXMNU_CELL));
aContextMenu->RemoveDisabledEntries(true, true);
switch (aContextMenu->Execute(this, rEvt.GetMousePosPixel()))
{
case SID_COPY:
copyCellText(nRow, nColId);

[...]

where DbGridControl::copyCellText (svx/source/fmcomp/gridctrl.cxx) calls 
GetModelColumnPos,



void DbGridControl::copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId)
{
DBG_ASSERT(canCopyCellText(_nRow, _nColId), "DbGridControl::copyCellText: 
invalid call!");
DbGridColumn* pColumn = m_aColumns[ GetModelColumnPos(_nColId) ];
SeekRow(_nRow);
OStringTransfer::CopyString( GetCurrentRowCellText( pColumn,m_xPaintRow ), 
this );
}


Does anybody (Linoel?) known something about that DbGridControl code? 
Would this be a bug (if so, any idea how to reproduce it at the GUI?) or 
is it maybe an invariant of such a DbGridControl that it's columns' ID 
always match the columns' positions?

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


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

2017-03-10 Thread Caolán McNamara
 hwpfilter/source/hbox.cxx|5 --
 hwpfilter/source/hbox.h  |   91 ---
 hwpfilter/source/hwpread.cxx |   10 ++--
 3 files changed, 49 insertions(+), 57 deletions(-)

New commits:
commit dcda65506e0a5c8526cfd7bbd0e3d4721507871f
Author: Caolán McNamara 
Date:   Fri Mar 10 10:35:43 2017 +

ofz#798 oom

(cherry picked from commit 75f118da50b217956ee7a735e921524d0c2935ff)

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

diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx
index da9e206..04d5497 100644
--- a/hwpfilter/source/hbox.cxx
+++ b/hwpfilter/source/hbox.cxx
@@ -77,18 +77,13 @@ hchar_string HBox::GetString()
 // skip block
 SkipData::SkipData(hchar hch)
 : HBox(hch)
-, data_block_len(0)
-, dummy(0)
-, data_block(nullptr)
 {
 }
 
 SkipData::~SkipData()
 {
-delete[]data_block;
 }
 
-
 // FieldCode [5]
 FieldCode::FieldCode()
 : HBox(CH_FIELD)
diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h
index 3832c76..a9aa2b4 100644
--- a/hwpfilter/source/hbox.h
+++ b/hwpfilter/source/hbox.h
@@ -1,21 +1,21 @@
 /* -*- 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 .
- */
+* 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_HWPFILTER_SOURCE_HBOX_H
 #define INCLUDED_HWPFILTER_SOURCE_HBOX_H
@@ -32,53 +32,50 @@
 #include "hpara.h"
 
 /**
- * The HBox class is the base class for all date classes in hwp document.
- * For example, there are special character, table, image, etc.
- * It has one character. The ascii code value of special characters are 
smaller than 32. General character is greater than 32.
- *
- * @short Base class for characters
- */
+* The HBox class is the base class for all date classes in hwp document.
+* For example, there are special character, table, image, etc.
+* It has one character. The ascii code value of special characters are smaller 
than 32. General character is greater than 32.
+*
+* @short Base class for characters
+*/
 struct HBox
 {
-public:
-hchar hh;
+public:
+hchar hh;
 
 /**
- * Construct a HBox object with parameter hch.
- * @param hch 16bit character being able to have Korean character.
- */
-explicit HBox( hchar hch );
-virtual ~HBox();
+* Construct a HBox object with parameter hch.
+* @param hch 16bit character being able to have Korean character.
+*/
+explicit HBox( hchar hch );
+virtual ~HBox();
 /**
- * @returns The Size of HBox object
- */
-int   WSize();
+* @returns The Size of HBox object
+*/
+int   WSize();
 /**
- * Read properties from HIODevice object like stream, file, memory.
- *
- * @param hwpf HWPFile Object having all information for a hwp file.
- * @returns True if reading from stream is successful.
- */
-virtual bool Read(HWPFile &hwpf);
+* Read properties from HIODevice object like stream, file, memory.
+*
+* @param hwpf HWPFile Object having all information for a hwp file.
+* @returns True if reading from stream is successful.
+*/
+virtual bool Read(HWPFile &hwpf);
 
-virtual hchar_string GetString();
-private:
-static int boxCount;
+virtual hchar_string GetString();
+private:
+static int boxCount;
 };
 
 /**
- * @short C

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

2017-03-10 Thread Tamás Zolnai
 configmgr/source/winreg.cxx |   22 ++
 1 file changed, 22 insertions(+)

New commits:
commit c095f036d4e0c61831178384e5a27a87c86363cb
Author: Tamás Zolnai 
Date:   Wed Mar 8 13:57:58 2017 +0100

tdf#106283: Registry settings are not read properly on Windows

Read also a type value from registry so user can specify
a type for a property of an extensible group.

Reviewed-on: https://gerrit.libreoffice.org/34961
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 145accd9a5b55070959d40c9314d870dffa5e4bc)

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

diff --git a/configmgr/source/winreg.cxx b/configmgr/source/winreg.cxx
index c2e709b..ef7e212 100644
--- a/configmgr/source/winreg.cxx
+++ b/configmgr/source/winreg.cxx
@@ -66,6 +66,18 @@ namespace {
 // 
 // 
 // 
+//
+// Third example (property of an extensible group -> needs type):
+// 
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Jobs\Jobs\org.openoffice.Office.Jobs:Job['UpdateCheck']\Arguments\AutoCheckEnabled]
+// "Value"="false"
+// "Final"=dword:0001
+// "Type"="xs:boolean"
+// becomes the following in configuration:
+// 
+// 
+// false
+// 
+// 
 
 void dumpWindowsRegistryKey(HKEY hKey, OUString const & aKeyName, TempFile 
&aFileHandle)
 {
@@ -108,6 +120,7 @@ void dumpWindowsRegistryKey(HKEY hKey, OUString const & 
aKeyName, TempFile &aFil
 
 bool bFinal = false;
 OUString aValue;
+OUString aType;
 
 for(DWORD i = 0; i < nValues; ++i)
 {
@@ -117,9 +130,12 @@ void dumpWindowsRegistryKey(HKEY hKey, OUString const & 
aKeyName, TempFile &aFil
 RegEnumValueW(hCurKey, i, pValueName, &nValueNameLen, nullptr, 
nullptr, reinterpret_cast(pValue), &nValueLen);
 const wchar_t wsValue[] = L"Value";
 const wchar_t wsFinal[] = L"Final";
+const wchar_t wsType[] = L"Type";
 
 if(!wcscmp(pValueName, wsValue))
 aValue = OUString(pValue);
+if(!wcscmp(pValueName, wsType))
+aType = OUString(pValue);
 if(!wcscmp(pValueName, wsFinal) && 
*reinterpret_cast(pValue) == 1)
 bFinal = true;
 }
@@ -169,6 +185,12 @@ void dumpWindowsRegistryKey(HKEY hKey, OUString const & 
aKeyName, TempFile &aFil
 writeData(aFileHandle, "");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Justin Luth
 dev/null |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx|8 
 sw/qa/extras/ooxmlimport/data/tdf103931.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |9 +
 4 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 3a9e87d14eb4bf9415dd96c77cbec75c03e9682c
Author: Justin Luth 
Date:   Thu Mar 9 17:29:34 2017 +0300

ooxmlexport: move tdf103931 unit test to ooxmlimport

Visually, this unit test round-trips terribly.
During round-tripping, the 3 columns (related to textsections)
in the very first section get transferred into the pagedesc. Thus the
first section is "lost". For some unknown reason, another section
is added later on. So, cummulatively, the section count remained
the same, but whatever fixes these two situations will also affect
the section count.

However, it should work fine as an import only test.  There ARE
three sections in MSWord after all.

Change-Id: I1973977f5c5a45189896b10cacd757600e7684db
Reviewed-on: https://gerrit.libreoffice.org/35012
Tested-by: Jenkins 
Reviewed-by: Justin Luth 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 3ab81d2..a54d023 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -241,14 +241,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106001_2, 
"tdf106001-2.odt")
 assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:rPr/w:w","val","600");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTdf103931, "tdf103931.docx")
-{
-uno::Reference 
xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
-uno::Reference 
xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
-// This was 2, the last (empty) section of the document was lost on import.
-CPPUNIT_ASSERT_EQUAL(static_cast(3), xTextSections->getCount());
-}
-
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103931.docx 
b/sw/qa/extras/ooxmlimport/data/tdf103931.docx
similarity index 100%
rename from sw/qa/extras/ooxmlexport/data/tdf103931.docx
rename to sw/qa/extras/ooxmlimport/data/tdf103931.docx
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 28edf90..bb012fc 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -131,6 +131,15 @@ DECLARE_SW_IMPORT_TEST(testMathMalformedXml, 
"math-malformed_xml.docx", nullptr,
 CPPUNIT_ASSERT(!mxComponent.is());
 }
 
+DECLARE_OOXMLIMPORT_TEST(testTdf103931, "tdf103931.docx")
+{
+uno::Reference 
xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference 
xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+// This was 2, the last (empty) section of the document was lost on import.
+// (import test only: Columns/Sections do not round-trip well)
+CPPUNIT_ASSERT_EQUAL(static_cast(3), xTextSections->getCount());
+}
+
 DECLARE_OOXMLIMPORT_TEST(testTdf103975_notPageBreakB, 
"tdf103975_notPageBreakB.docx")
 {
 // turn on View Formatting Marks to see these documents.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: net/Socket.hpp

2017-03-10 Thread Michael Meeks
 net/Socket.hpp |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 34d9d52207166fb6ef05bc8b205844164d40c5f5
Author: Michael Meeks 
Date:   Fri Mar 10 12:11:46 2017 +

Avoid assert failure and zero size socket buffer in product build.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 98a2978..c09ad53 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -207,6 +207,7 @@ protected:
 void init()
 {
 setNoDelay();
+_sendBufferSize = DefaultSendBufferSize;
 #if ENABLE_DEBUG
 _owner = std::this_thread::get_id();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Pranav Kant
 Makefile.am |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit eb9c0fa619e0d565dfcb9c16f7167eab67bdb30d
Author: Pranav Kant 
Date:   Fri Mar 10 17:29:10 2017 +0530

Do not create tags file for loleaflet

Change-Id: I0a2103bc4550d6deacddd1bfc07a23a3cf317d07

diff --git a/Makefile.am b/Makefile.am
index 1ed2f25..11272b7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,7 +40,7 @@ endif
 
 loolwsd_fuzzer_CPPFLAGS = -DKIT_IN_PROCESS=1 -DFUZZER=1 
-DTDOC=\"$(abs_top_srcdir)/test/data\" $(AM_CPPFLAGS)
 
-AM_ETAGSFLAGS = --c++-kinds=+p --fields=+iaS --extra=+q -R --totals=yes *
+AM_ETAGSFLAGS = --c++-kinds=+p --fields=+iaS --extra=+q -R --totals=yes 
--exclude=loleaflet *
 AM_CTAGSFLAGS = $(AM_ETAGSFLAGS)
 
 shared_sources = common/FileUtil.cpp \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Caolán McNamara
 vcl/source/gdi/dibtools.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 3d21afb8aac5da0139d85498607d40c748b6db53
Author: Caolán McNamara 
Date:   Fri Mar 10 11:56:00 2017 +

ofz#787 avoid bmp oom

Change-Id: Id5d1a1b8dd6d4e78bef9d09ab68d1e7daf7e1bd5

diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 4fa6cc6..534a50d 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -530,8 +530,9 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, 
BitmapWriteAccess& r
 rHeader.nSizeImage = rIStm.remainingSize();
 }
 
-std::unique_ptr pBuffer(
-new sal_uInt8[rHeader.nSizeImage]);
+if (rHeader.nSizeImage > rIStm.remainingSize())
+return false;
+std::unique_ptr pBuffer(new 
sal_uInt8[rHeader.nSizeImage]);
 if (rIStm.ReadBytes(pBuffer.get(), rHeader.nSizeImage)
 != rHeader.nSizeImage)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Caolán McNamara
 vcl/source/gdi/gfxlink.cxx |   14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 89914fee18f9cc5354e21073f97c8121db7df85f
Author: Caolán McNamara 
Date:   Fri Mar 10 11:51:17 2017 +

ofz#786 avoid svm oom

Change-Id: Ib4920d6537437fe060c453f249fa7f8da230bfc7

diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index 4fdd0e1..abe94b0 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -213,14 +213,13 @@ SvStream& ReadGfxLink( SvStream& rIStream, GfxLink& 
rGfxLink)
 {
 SizeaSize;
 MapMode aMapMode;
-sal_uInt32  nSize;
-sal_uInt32  nUserId;
-sal_uInt16  nType;
 boolbMapAndSizeValid( false );
 std::unique_ptr  pCompat(new VersionCompat( rIStream, 
StreamMode::READ ));
 
 // Version 1
-rIStream.ReadUInt16( nType ).ReadUInt32( nSize ).ReadUInt32( nUserId );
+sal_uInt16 nType(0);
+sal_uInt32 nSize(0), nUserId(0);
+rIStream.ReadUInt16(nType).ReadUInt32(nSize).ReadUInt32(nUserId);
 
 if( pCompat->GetVersion() >= 2 )
 {
@@ -231,6 +230,13 @@ SvStream& ReadGfxLink( SvStream& rIStream, GfxLink& 
rGfxLink)
 
 pCompat.reset(); // destructor writes stuff into the header
 
+auto nRemainingData = rIStream.remainingSize();
+if (nSize > nRemainingData)
+{
+SAL_WARN("vcl", "graphic link stream is smaller than requested size");
+nSize = nRemainingData;
+}
+
 std::unique_ptr pBuf(new sal_uInt8[ nSize ]);
 rIStream.ReadBytes( pBuf.get(), nSize );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Caolán McNamara
 vcl/source/filter/ixbm/xbmread.cxx |   28 
 1 file changed, 8 insertions(+), 20 deletions(-)

New commits:
commit d82ea7bdd638fc9fd116238f0eb2179c3cdf9733
Author: Caolán McNamara 
Date:   Fri Mar 10 11:45:11 2017 +

ofz#782 oom in xbm

Change-Id: I72e187203843803e7a4e76346d484f22a5cc8823

diff --git a/vcl/source/filter/ixbm/xbmread.cxx 
b/vcl/source/filter/ixbm/xbmread.cxx
index 4a4c358..38475fd 100644
--- a/vcl/source/filter/ixbm/xbmread.cxx
+++ b/vcl/source/filter/ixbm/xbmread.cxx
@@ -50,7 +50,7 @@ class XBMReader : public GraphicReader
 
 voidInitTable();
 OString FindTokenLine( SvStream* pInStm, const char* pTok1, const 
char* pTok2 );
-longParseDefine( const sal_Char* pDefine );
+int ParseDefine( const sal_Char* pDefine );
 boolParseData( SvStream* pInStm, const OString& aLastLine, 
XBMFormat eFormat );
 
 public:
@@ -145,9 +145,9 @@ OString XBMReader::FindTokenLine( SvStream* pInStm, const 
char* pTok1,
 return aRet;
 }
 
-long XBMReader::ParseDefine( const sal_Char* pDefine )
+int XBMReader::ParseDefine( const sal_Char* pDefine )
 {
-longnRet = 0;
+sal_Int32 nRet = 0;
 const char* pTmp = pDefine;
 unsigned char   cTmp;
 
@@ -170,23 +170,11 @@ long XBMReader::ParseDefine( const sal_Char* pDefine )
 if( ( pTmp[0] == '0' ) && ( ( pTmp[1] == 'X' ) || ( pTmp[1] == 'x' ) ) )
 {
 pTmp += 2;
-cTmp = *pTmp++;
-
-while ( pHexTable[ cTmp ] != -1 )
-{
-nRet = ( nRet << 4 ) + pHexTable[ cTmp ];
-cTmp = *pTmp++;
-}
+nRet = OString(pTmp, strlen(pTmp)).toInt32(16);
 }
-// read decimal
-else
+else // read decimal
 {
-cTmp = *pTmp++;
-while( ( cTmp >= '0' ) && ( cTmp <= '9' ) )
-{
-nRet = nRet * 10 + ( cTmp - '0' );
-cTmp = *pTmp++;
-}
+nRet = OString(pTmp, strlen(pTmp)).toInt32();
 }
 
 return nRet;
@@ -286,7 +274,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
 if ( bStatus )
 {
 int nValue;
-if ( ( nValue = (int) ParseDefine( aLine.getStr() ) ) > 0 )
+if ( ( nValue = ParseDefine( aLine.getStr() ) ) > 0 )
 {
 nWidth = nValue;
 aLine = FindTokenLine( &rIStm, "#define", "_height" );
@@ -304,7 +292,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
 
 if ( bStatus )
 {
-if ( ( nValue = (int) ParseDefine( aLine.getStr() ) ) > 0 )
+if ( ( nValue = ParseDefine( aLine.getStr() ) ) > 0 )
 {
 nHeight = nValue;
 aLine = FindTokenLine( &rIStm, "static", "_bits" );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: net/Socket.hpp

2017-03-10 Thread Michael Meeks
 net/Socket.hpp |4 
 1 file changed, 4 insertions(+)

New commits:
commit f4f083e6fe502f684e2ff888fbbba8da0d291134
Author: Michael Meeks 
Date:   Fri Mar 10 11:35:17 2017 +

Cache JS etc. on the client side for 128 days.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 583d580..98a2978 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -818,6 +818,10 @@ namespace HttpHelper
 
 response.setContentLength(st.st_size);
 response.set("User-Agent", HTTP_AGENT_STRING);
+// 60 * 60 * 24 * 128 (days) = 11059200
+response.set("Cache-Control", "max-age=11059200");
+response.set("ETag", LOOLWSD_VERSION_HASH);
+
 std::ostringstream oss;
 response.write(oss);
 const std::string header = oss.str();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Tor Lillqvist
 shell/inc/spsupp/COMRefCounted.hpp  |1 -
 shell/inc/spsupp/spsuppClassFactory.hpp |1 -
 2 files changed, 2 deletions(-)

New commits:
commit d5bdc859b4fefbc9d708e9a24dcb5bc59ee5199f
Author: Tor Lillqvist 
Date:   Fri Mar 10 13:23:53 2017 +0200

Cosmetics

Change-Id: Icbe4491b45a8fcf7f5cc005c9394e660efc0691b

diff --git a/shell/inc/spsupp/COMRefCounted.hpp 
b/shell/inc/spsupp/COMRefCounted.hpp
index 1a60ed3..075923d 100644
--- a/shell/inc/spsupp/COMRefCounted.hpp
+++ b/shell/inc/spsupp/COMRefCounted.hpp
@@ -34,7 +34,6 @@ public:
 }
 
 private:
-
 long m_nRef = 1; // Created referenced
 };
 
diff --git a/shell/inc/spsupp/spsuppClassFactory.hpp 
b/shell/inc/spsupp/spsuppClassFactory.hpp
index 9bb879f..9d93791 100644
--- a/shell/inc/spsupp/spsuppClassFactory.hpp
+++ b/shell/inc/spsupp/spsuppClassFactory.hpp
@@ -40,7 +40,6 @@ public:
 static long GetLockCount() { return m_nLockCount; }
 
 private:
-
 static long m_nObjCount;
 static long m_nLockCount;
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Miklos Vajna
 xmlsecurity/Library_xsec_fw.mk |1 
 xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx |  111 -
 xmlsecurity/source/framework/xmlencryptiontemplateimpl.hxx |   92 --
 3 files changed, 204 deletions(-)

New commits:
commit 90d88b6e465b82e318eadf6897b54180fb5154e0
Author: Miklos Vajna 
Date:   Fri Mar 10 09:15:27 2017 +0100

xmlsecurity: remove unused XMLEncryptionTemplateImpl

Not needed since commit 0649622956431e0a1955cb80d1175025401ab5e5
(loplugin:unusedmethods, 2017-02-21).

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

diff --git a/xmlsecurity/Library_xsec_fw.mk b/xmlsecurity/Library_xsec_fw.mk
index b8ebdb2..b6fa2dc 100644
--- a/xmlsecurity/Library_xsec_fw.mk
+++ b/xmlsecurity/Library_xsec_fw.mk
@@ -39,7 +39,6 @@ $(eval $(call gb_Library_add_exception_objects,xsec_fw,\
xmlsecurity/source/framework/signaturecreatorimpl \
xmlsecurity/source/framework/signatureengine \
xmlsecurity/source/framework/signatureverifierimpl \
-   xmlsecurity/source/framework/xmlencryptiontemplateimpl \
xmlsecurity/source/framework/xmlsignaturetemplateimpl \
 ))
 
diff --git a/xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx 
b/xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx
deleted file mode 100644
index 09201d9..000
--- a/xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include 
-#include 
-#include "xmlencryptiontemplateimpl.hxx"
-
-using namespace ::com::sun::star::uno ;
-using ::com::sun::star::lang::XMultiServiceFactory ;
-using ::com::sun::star::lang::XSingleServiceFactory ;
-
-using ::com::sun::star::xml::wrapper::XXMLElementWrapper ;
-using ::com::sun::star::xml::crypto::XXMLEncryptionTemplate ;
-
-XMLEncryptionTemplateImpl::XMLEncryptionTemplateImpl()
-: m_xTemplate( nullptr ),
-  m_xTarget( nullptr ),
-  m_nStatus ( css::xml::crypto::SecurityOperationStatus_UNKNOWN ) {
-}
-
-XMLEncryptionTemplateImpl::~XMLEncryptionTemplateImpl() {
-}
-
-/* XXMLEncryptionTemplate */
-void SAL_CALL XMLEncryptionTemplateImpl::setTemplate( const Reference< 
XXMLElementWrapper >& aTemplate )
-{
-m_xTemplate = aTemplate ;
-}
-
-/* XXMLEncryptionTemplate */
-Reference< XXMLElementWrapper > SAL_CALL 
XMLEncryptionTemplateImpl::getTemplate()
-{
-return m_xTemplate ;
-}
-
-/* XXMLEncryptionTemplate */
-void SAL_CALL XMLEncryptionTemplateImpl::setTarget( const Reference< 
XXMLElementWrapper >& aTarget ) {
-m_xTarget = aTarget ;
-}
-
-/* XXMLEncryptionTemplate */
-Reference< XXMLElementWrapper > SAL_CALL XMLEncryptionTemplateImpl::getTarget()
-{
-return m_xTarget ;
-}
-
-void SAL_CALL XMLEncryptionTemplateImpl::setStatus(
-css::xml::crypto::SecurityOperationStatus status )
-{
-m_nStatus = status;
-}
-
-css::xml::crypto::SecurityOperationStatus SAL_CALL 
XMLEncryptionTemplateImpl::getStatus(  )
-{
-return m_nStatus;
-}
-
-/* XServiceInfo */
-OUString SAL_CALL XMLEncryptionTemplateImpl::getImplementationName() {
-return impl_getImplementationName() ;
-}
-
-/* XServiceInfo */
-sal_Bool SAL_CALL XMLEncryptionTemplateImpl::supportsService( const OUString& 
serviceName) {
-Sequence< OUString > seqServiceNames = getSupportedServiceNames() ;
-const OUString* pArray = seqServiceNames.getConstArray() ;
-for( sal_Int32 i = 0 ; i < seqServiceNames.getLength() ; i ++ ) {
-if( *( pArray + i ) == serviceName )
-return true ;
-}
-return false ;
-}
-
-/* XServiceInfo */
-Sequence< OUString > SAL_CALL 
XMLEncryptionTemplateImpl::getSupportedServiceNames() {
-return impl_getSupportedServiceNames() ;
-}
-
-//Helper for XServiceInfo
-Sequence< OUString > 
XMLEncryptionTemplateImpl::impl_getSupportedServiceNames() {
-::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
-Sequence seqServiceNames { 
"com.sun.star.xml.crypto.XMLEncryptionTemplate" };
-   

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

2017-03-10 Thread Pranav Kant
 loleaflet/src/map/handler/Map.WOPI.js |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit ffd00d8824fbae2012f5af4bf59879fda460ba64
Author: Pranav Kant 
Date:   Fri Mar 10 16:34:58 2017 +0530

loleaflet: Allow keeping document always active via PostMessage

To instruct the loleaflet iframe to not dim the document, it needs to
send the message in following format :

{
 MessageId: 'Set_Settings',
 SendTime: 1329014075000,
 Values: {
AlwaysActive: true
 }
}

Similarly, set AlwaysActive to false to active dimming the screen again.

Change-Id: Icb5d615268e4da2c3ed2f22df8c0f3e52f370a70

diff --git a/loleaflet/src/map/handler/Map.WOPI.js 
b/loleaflet/src/map/handler/Map.WOPI.js
index 38e0a5b..110c0ad 100644
--- a/loleaflet/src/map/handler/Map.WOPI.js
+++ b/loleaflet/src/map/handler/Map.WOPI.js
@@ -98,7 +98,13 @@ L.Map.WOPI = L.Handler.extend({
}
 
var msg = JSON.parse(e.data);
-   if (msg.MessageId === 'Get_Views') {
+   if (msg.MessageId === 'Set_Settings') {
+   if (msg.Values) {
+   var alwaysActive = msg.Values.AlwaysActive;
+   this._map.options.alwaysActive = !!alwaysActive;
+   }
+   }
+   else if (msg.MessageId === 'Get_Views') {
var getMembersRespVal = [];
for (var viewInfoIdx in this._map._viewInfo) {
getMembersRespVal.push({
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Repository.mk shell/CustomTarget_spsupp_idl.mk shell/CustomTarget_x64.mk shell/inc shell/Library_spsupp.mk shell/Library_spsupp_x64.mk shell/Module_shell.mk shell/sourc

2017-03-10 Thread Mike Kaganski
 Repository.mk|2 
 shell/CustomTarget_spsupp_idl.mk |   31 +
 shell/CustomTarget_x64.mk|8 
 shell/Library_spsupp.mk  |   47 ++
 shell/Library_spsupp_x64.mk  |   50 ++
 shell/Module_shell.mk|4 
 shell/WinResTarget_spsupp.mk |   22 +
 shell/inc/spsupp/COMOpenDocuments.hpp|  215 +++
 shell/inc/spsupp/COMRefCounted.hpp   |   43 ++
 shell/inc/spsupp/registrar.hpp   |   26 +
 shell/inc/spsupp/spsuppClassFactory.hpp  |   50 ++
 shell/inc/spsupp/spsuppServ.hpp  |   20 +
 shell/source/win32/spsupp/COMOpenDocuments.cxx   |  448 +++
 shell/source/win32/spsupp/registrar.cxx  |  173 
 shell/source/win32/spsupp/res/spsupp.rc  |1 
 shell/source/win32/spsupp/spsupp.def |7 
 shell/source/win32/spsupp/spsupp.idl |  147 +++
 shell/source/win32/spsupp/spsuppClassFactory.cxx |   83 
 shell/source/win32/spsupp/spsuppServ.cxx |  140 +++
 19 files changed, 1516 insertions(+), 1 deletion(-)

New commits:
commit 3de2e8a32bead23229b263f21d4dff13dc695e4d
Author: Mike Kaganski 
Date:   Sat Oct 8 23:38:05 2016 +1000

tdf#103058: Implement OpenDocuments ActiveX control

Change-Id: I97489090476cd884a122a4b36d3ac62ca86fd886
Reviewed-on: https://gerrit.libreoffice.org/29608
Tested-by: Jenkins 
Reviewed-by: Tor Lillqvist 

diff --git a/Repository.mk b/Repository.mk
index b626223..ec73404 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -659,6 +659,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,activexbina
 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,activex, \
$(if $(DISABLE_ACTIVEX),,\
so_activex \
+   spsupp \
) \
 ))
 
@@ -666,6 +667,7 @@ ifneq ($(BUILD_X64),)
 $(eval $(call 
gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,activexwin64, \
$(if $(DISABLE_ACTIVEX),,\
so_activex_x64 \
+   spsupp_x64 \
) \
 ))
 endif
diff --git a/shell/CustomTarget_spsupp_idl.mk b/shell/CustomTarget_spsupp_idl.mk
new file mode 100644
index 000..89f83cb
--- /dev/null
+++ b/shell/CustomTarget_spsupp_idl.mk
@@ -0,0 +1,31 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,shell/source/win32/spsupp/idl))
+
+spsupp_IDLDIR := $(call 
gb_CustomTarget_get_workdir,shell/source/win32/spsupp/idl)
+
+$(call gb_CustomTarget_get_target,shell/source/win32/spsupp/idl) : \
+   $(spsupp_IDLDIR)/spsupp.tlb
+
+$(spsupp_IDLDIR)/spsupp.tlb : \
+   $(SRCDIR)/shell/source/win32/spsupp/spsupp.idl \
+   | $(spsupp_IDLDIR)/.dir
+   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),IDL,1)
+   $(call gb_Helper_abbreviate_dirs, \
+   midl.exe \
+   -tlb $@ \
+   -h $(spsupp_IDLDIR)/spsupp_h.h \
+   -iid $(spsupp_IDLDIR)/spsupp_i.c \
+   $(INCLUDE) \
+   $(SOLARINC) \
+   -Oicf \
+   $<)
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/shell/CustomTarget_x64.mk b/shell/CustomTarget_x64.mk
index 79dcde8..42dd36c 100644
--- a/shell/CustomTarget_x64.mk
+++ b/shell/CustomTarget_x64.mk
@@ -44,6 +44,12 @@ SHELL_PROPERTYHDL_FILES := \
 SHELL_XMLPARSER_FILES := \
all/xml_parser
 
+SHELL_SPSUPP_FILES := \
+win32/spsupp/COMOpenDocuments \
+win32/spsupp/registrar \
+win32/spsupp/spsuppClassFactory \
+win32/spsupp/spsuppServ
+
 SHELL_HEADERS := \
win32/ooofilereader/autostyletag \
win32/ooofilereader/dummytag \
@@ -58,7 +64,7 @@ SHELL_HEADERS := \
win32/zipfile/zipexcptn
 
 $(call gb_CustomTarget_get_target,shell/source) : \
-   $(foreach source,$(SHELL_SHLXTHANDLER_COMMON_FILES) 
$(SHELL_SHLXTHDL_FILES) $(SHELL_OOOFILT_FILES) $(SHELL_PROPERTYHDL_FILES) 
$(SHELL_XMLPARSER_FILES),\
+   $(foreach source,$(SHELL_SHLXTHANDLER_COMMON_FILES) 
$(SHELL_SHLXTHDL_FILES) $(SHELL_OOOFILT_FILES) $(SHELL_PROPERTYHDL_FILES) 
$(SHELL_XMLPARSER_FILES) $(SHELL_SPSUPP_FILES),\
$(call gb_CustomTarget_get_workdir,shell/source)/$(source).cxx) 
\
$(foreach header,$(SHELL_HEADERS),\
$(call gb_CustomTarget_get_workdir,shell/source)/$(header).hxx)
diff --git a/shell/Library_spsupp.mk b/shell/Library_spsupp.mk
new file mode 100644
index 000..fd9bdba
--- /dev/null
+++ b/shell/Library_spsupp.mk
@@ -0,0 +1,47 @@
+# -*- Mode: makefile-gmake; tab-width: 4; i

[Libreoffice-commits] online.git: net/Socket.hpp net/WebSocketHandler.hpp

2017-03-10 Thread Michael Meeks
 net/Socket.hpp   |   67 ++-
 net/WebSocketHandler.hpp |4 ++
 2 files changed, 53 insertions(+), 18 deletions(-)

New commits:
commit a5a227e9a3327bee423df9de6c3faae112aaa4bd
Author: Michael Meeks 
Date:   Fri Mar 10 09:55:28 2017 +

Re-work socket buffer options, sizing and setting.

Only set nodelay and small socket buffers on WebSockets.
Avoid writing more data than can be absorbed by our socket buffer.
It is fine to set socket buffer sizes after bind/accept.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 7b3199b..583d580 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -40,10 +40,14 @@
 class Socket
 {
 public:
+static const int DefaultSendBufferSize = 16 * 1024;
+static const int MaximumSendBufferSize = 128 * 1024;
+
 Socket() :
-_fd(socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0))
+_fd(socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0)),
+_sendBufferSize(DefaultSendBufferSize)
 {
-setNoDelay();
+init();
 }
 
 virtual ~Socket()
@@ -82,23 +86,39 @@ public:
 (char *) &val, sizeof(val));
 }
 
-/// Sets the send buffer in size bytes.
-/// Must be called before accept or connect.
+/// Sets the kernel socket send buffer in size bytes.
 /// Note: TCP will allocate twice this size for admin purposes,
 /// so a subsequent call to getSendBufferSize will return
 /// the larger (actual) buffer size, if this succeeds.
 /// Note: the upper limit is set via /proc/sys/net/core/wmem_max,
 /// and there is an unconfigurable lower limit as well.
 /// Returns true on success only.
-bool setSendBufferSize(const int size)
+bool setSocketBufferSize(const int size)
 {
-constexpr unsigned int len = sizeof(size);
-const int rc = ::setsockopt(_fd, SOL_SOCKET, SO_SNDBUF, &size, len);
-return (rc == 0);
+int rc = ::setsockopt(_fd, SOL_SOCKET, SO_SNDBUF, &size, sizeof(size));
+
+_sendBufferSize = getSocketBufferSize();
+if (rc != 0 || _sendBufferSize < 0 )
+{
+LOG_ERR("Error getting socket buffer size " << errno);
+_sendBufferSize = DefaultSendBufferSize;
+return false;
+}
+else
+{
+if (_sendBufferSize > MaximumSendBufferSize * 2)
+{
+LOG_TRC("Clamped send buffer size to " << 
MaximumSendBufferSize << " from " << _sendBufferSize);
+_sendBufferSize = MaximumSendBufferSize;
+}
+else
+LOG_TRC("Set socket buffer size to " << _sendBufferSize);
+return true;
+}
 }
 
 /// Gets the actual send buffer size in bytes, -1 for failure.
-int getSendBufferSize() const
+int getSocketBufferSize() const
 {
 int size;
 unsigned int len = sizeof(size);
@@ -106,10 +126,15 @@ public:
 return (rc == 0 ? size : -1);
 }
 
+/// Gets our fast cache of the socket buffer size
+int getSendBufferSize() const
+{
+return _sendBufferSize;
+}
+
 /// Sets the receive buffer size in bytes.
-/// Must be called before accept or connect.
 /// Note: TCP will allocate twice this size for admin purposes,
-/// so a subsequent call to getSendBufferSize will return
+/// so a subsequent call to getReceieveBufferSize will return
 /// the larger (actual) buffer size, if this succeeds.
 /// Note: the upper limit is set via /proc/sys/net/core/rmem_max,
 /// and there is an unconfigurable lower limit as well.
@@ -185,8 +210,8 @@ protected:
 #if ENABLE_DEBUG
 _owner = std::this_thread::get_id();
 
-const int oldSize = getSendBufferSize();
-setSendBufferSize(0);
+const int oldSize = getSocketBufferSize();
+setSocketBufferSize(0);
 LOG_TRC("Socket #" << _fd << " buffer size: " << getSendBufferSize() 
<< " (was " << oldSize << ")");
 #endif
 
@@ -194,6 +219,7 @@ protected:
 
 private:
 const int _fd;
+int _sendBufferSize;
 // always enabled to avoid ABI change in debug mode ...
 std::thread::id _owner;
 };
@@ -699,7 +725,9 @@ protected:
 ssize_t len;
 do
 {
-len = writeData(&_outBuffer[0], _outBuffer.size());
+// Writing more than we can absorb in the kernel causes SSL 
wasteage.
+len = writeData(&_outBuffer[0], 
std::min((int)_outBuffer.size(),
+ getSendBufferSize()));
 
 auto& log = Log::logger();
 if (log.trace() && len > 0) {
@@ -781,9 +809,12 @@ namespace HttpHelper
 return;
 }
 
-const int socketBufferSize = 16 * 1024;
-if (st.st_size >= socketBufferSize)
-socket->setSendBufferSize(socketBufferSize);
+int bufferSize = std::min(st.st_size, 
(off_t)

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

2017-03-10 Thread Caolán McNamara
 hwpfilter/source/hbox.cxx|3 ---
 hwpfilter/source/hbox.h  |7 ++-
 hwpfilter/source/hwpread.cxx |   10 +-
 3 files changed, 7 insertions(+), 13 deletions(-)

New commits:
commit 75f118da50b217956ee7a735e921524d0c2935ff
Author: Caolán McNamara 
Date:   Fri Mar 10 10:35:43 2017 +

ofz#798 oom

Change-Id: I6fa8dd999af7e00d6236a1ead5f8bb519f2d128d

diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx
index 4977e6d..fcf1026 100644
--- a/hwpfilter/source/hbox.cxx
+++ b/hwpfilter/source/hbox.cxx
@@ -77,9 +77,6 @@ hchar_string HBox::GetString()
 // skip block
 SkipData::SkipData(hchar hch)
 : HBox(hch)
-, data_block_len(0)
-, dummy(0)
-, data_block(nullptr)
 {
 }
 
diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h
index 979d8a0..15c97c6 100644
--- a/hwpfilter/source/hbox.h
+++ b/hwpfilter/source/hbox.h
@@ -68,18 +68,15 @@ struct HBox
 };
 
 /**
- * @short Class for saving data to be skipped.
+ * @short Class for skipping data.
  */
 struct SkipData: public HBox
 {
-uint data_block_len;
-hchar dummy;
-std::unique_ptr data_block;
-
 explicit SkipData(hchar);
 virtual ~SkipData() override;
 virtual bool Read(HWPFile &hwpf) override;
 };
+
 struct DateCode;
 struct FieldCode : public HBox
 {
diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index 2cc6d31..eb27376 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -45,19 +45,19 @@ bool HBox::Read(HWPFile & )
 
 bool SkipData::Read(HWPFile & hwpf)
 {
+uint data_block_len;
 hwpf.Read4b(&data_block_len, 1);
+
+hchar dummy;
 hwpf.Read2b(&dummy, 1);
 
 if (!(IS_SP_SKIP_BLOCK(hh) && (hh == dummy))){
 return hwpf.SetState(HWP_InvalidFileFormat);
- }
-
-data_block.reset(new char[data_block_len]);
+}
 
-return hwpf.Read1b(data_block.get(), data_block_len);
+return hwpf.SkipBlock(data_block_len);
 }
 
-
 // Field code(5)
 bool FieldCode::Read(HWPFile & hwpf)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Caolán McNamara
 lotuswordpro/source/filter/lwpgrfobj.cxx  |8 
 lotuswordpro/source/filter/lwpobjstrm.cxx |6 ++
 lotuswordpro/source/filter/lwpobjstrm.hxx |1 +
 sfx2/source/control/request.cxx   |8 
 4 files changed, 19 insertions(+), 4 deletions(-)

New commits:
commit 1353ebe535732022aef4377030d86ad7153c3144
Author: Caolán McNamara 
Date:   Fri Mar 10 10:21:41 2017 +

ofz#801 avoid oom

Change-Id: Id3167d1eb3f058543ab7596008012d51b3d242b7

diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx 
b/lotuswordpro/source/filter/lwpgrfobj.cxx
index 04d4616..cf5cc995 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -113,6 +113,14 @@ void LwpGraphicObject::Read()
 unsigned char *pServerContext = nullptr;
 if (nServerContextSize > 0)
 {
+sal_uInt16 nMaxPossibleSize = m_pObjStrm->remainingSize();
+
+if (nServerContextSize > nMaxPossibleSize)
+{
+SAL_WARN("lwp", "stream too short for claimed no of records");
+nServerContextSize = nMaxPossibleSize;
+}
+
 pServerContext = new unsigned char[nServerContextSize];
 m_pObjStrm->QuickRead(pServerContext, 
static_cast(nServerContextSize));
 if (nServerContextSize > 44)
diff --git a/lotuswordpro/source/filter/lwpobjstrm.cxx 
b/lotuswordpro/source/filter/lwpobjstrm.cxx
index 8a28c9f..072edf7 100644
--- a/lotuswordpro/source/filter/lwpobjstrm.cxx
+++ b/lotuswordpro/source/filter/lwpobjstrm.cxx
@@ -155,6 +155,12 @@ void LwpObjectStream::ReleaseBuffer()
 }
 }
 }
+
+sal_uInt16 LwpObjectStream::remainingSize() const
+{
+return m_nBufSize - m_nReadPos;
+}
+
 /**
  * @descr  read len bytes from object stream to buffer
  */
diff --git a/lotuswordpro/source/filter/lwpobjstrm.hxx 
b/lotuswordpro/source/filter/lwpobjstrm.hxx
index 918659d..83062ee 100644
--- a/lotuswordpro/source/filter/lwpobjstrm.hxx
+++ b/lotuswordpro/source/filter/lwpobjstrm.hxx
@@ -85,6 +85,7 @@ private:
 LwpSvStream* m_pStrm;
 bool m_bCompressed;
 public:
+sal_uInt16 remainingSize() const;
 sal_uInt16 QuickRead(void* buf, sal_uInt16 len);
 sal_uInt16 GetPos() { return m_nReadPos; }
 void SeekRel(sal_uInt16 pos);
commit c299011abeb50a9fccb420d6b1e8e82924efc329
Author: Caolán McNamara 
Date:   Fri Mar 10 09:07:17 2017 +

shuffle this around a little

Change-Id: Ibf23114885c49163d50b3249db8788770fe74352

diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index a7785cf..489d9f3 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -69,6 +69,7 @@ struct SfxRequest_Impl: public SfxListener
 SfxViewFrame*   pViewFrame;
 
 css::uno::Reference< css::frame::XDispatchRecorder > xRecorder;
+css::uno::Reference< uno::XComponentContext > xContext;
 
 explicit SfxRequest_Impl( SfxRequest *pOwner )
 : pAnti( pOwner)
@@ -83,8 +84,9 @@ struct SfxRequest_Impl: public SfxListener
 , nCallMode( SfxCallMode::SYNCHRON )
 , bAllowRecording( false )
 , pViewFrame(nullptr)
-{}
-
+, xContext(comphelper::getProcessComponentContext())
+{
+}
 
 voidSetPool( SfxItemPool *pNewPool );
 virtual voidNotify( SfxBroadcaster &rBC, const SfxHint &rHint ) 
override;
@@ -349,8 +351,6 @@ void SfxRequest_Impl::Record
 }
 }
 
-uno::Reference< uno::XComponentContext > xContext = 
::comphelper::getProcessComponentContext();
-
 uno::Reference< util::XURLTransformer > xTransform = 
util::URLTransformer::create( xContext );
 
 css::util::URL aURL;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: contributing to LibreOffice Online

2017-03-10 Thread Aditya Dewan
ohh, i got it.

Currently i am updating my repo. The internet speed is pretty bad here, so
it'll take some more time, will build 'core' and 'online' after that.
I will keep you updated about it.

Thanks,

On Fri, Mar 10, 2017 at 2:55 PM, Pranav Kant  wrote:

> More precisely, you seem to be missing this[1]
>
>
> [1] https://gerrit.libreoffice.org/gitweb?p=core.git;a=commit;h=
> e5b98fd9c29fe427c4babe368c17d8c609b5325e
>
> On Fri, Mar 10, 2017 at 2:38 PM, Pranav Kant  wrote:
>
>> Hey,
>>
>> It seems that master was unstable at some point in the past when you
>> pulled. Please pull again and compile. See [1] for details
>>
>>
>> [1] http://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MAS
>> TER&brief-log=1489070564.20308
>>
>> On Fri, Mar 10, 2017 at 11:10 AM, Aditya Dewan 
>> wrote:
>>
>>> Hi,
>>>
>>> Sorry to bother you again, i am facing some issues while building the
>>> core( 'autogen.sh' ran fine. It had some dependency issues, but i resolved
>>> them and it ran fine.).
>>> The build was taking a lot of time , so i left it running overnight.
>>> The following error came up and the build failed.
>>>
>>>
>>> [CXX] sfx2/source/appl/appbaslib.cxx
 [CXX] sfx2/source/appl/appcfg.cxx
 [CXX] sfx2/source/appl/appchild.cxx
 [CXX] sfx2/source/appl/appdata.cxx
 In file included from /media/dewan/Work/gsoc/core/sf
 x2/source/appl/app.cxx:65:0:
 /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
 specialization of ‘template struct o3tl::typed_flags’ in different
 namespace [-fpermissive]
  template<> struct o3tl::typed_flags:
  ^
 In file included from /media/dewan/Work/gsoc/core/in
 clude/vcl/bitmap.hxx:31:0,
  from /media/dewan/Work/gsoc/core/in
 clude/vcl/bitmapex.hxx:24,
  from /media/dewan/Work/gsoc/core/in
 clude/vcl/image.hxx:27,
  from /media/dewan/Work/gsoc/core/in
 clude/sfx2/app.hxx:27,
  from /media/dewan/Work/gsoc/core/sf
 x2/source/appl/app.cxx:22:
 /media/dewan/Work/gsoc/core/include/o3tl/typed_flags_set.hxx:50:29:
 error:   from definition of ‘template struct o3tl::typed_flags’
 [-fpermissive]
  template struct typed_flags {};
  ^
 In file included from /media/dewan/Work/gsoc/core/in
 clude/sfx2/dispatch.hxx:26:0,
  from /media/dewan/Work/gsoc/core/sf
 x2/source/appl/appbas.cxx:60:
 /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
 specialization of ‘template struct o3tl::typed_flags’ in different
 namespace [-fpermissive]
  template<> struct o3tl::typed_flags:
  ^
 In file included from /media/dewan/Work/gsoc/core/in
 clude/basic/sbxdef.hxx:27:0,
  from /media/dewan/Work/gsoc/core/in
 clude/basic/sbxfac.hxx:23,
  from /media/dewan/Work/gsoc/core/sf
 x2/source/appl/appbas.cxx:32:
 /media/dewan/Work/gsoc/core/include/o3tl/typed_flags_set.hxx:50:29:
 error:   from definition of ‘template struct o3tl::typed_flags’
 [-fpermissive]
  template struct typed_flags {};
  ^
 In file included from /media/dewan/Work/gsoc/core/in
 clude/sfx2/childwin.hxx:33:0,
  from /media/dewan/Work/gsoc/core/sf
 x2/source/inc/workwin.hxx:37,
  from /media/dewan/Work/gsoc/core/sf
 x2/source/appl/appchild.cxx:26:
 /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
 specialization of ‘template struct o3tl::typed_flags’ in different
 namespace [-fpermissive]
  template<> struct o3tl::typed_flags:
  ^
 In file included from /media/dewan/Work/gsoc/core/in
 clude/tools/errinf.hxx:29:0,
  from /media/dewan/Work/gsoc/core/in
 clude/tools/stream.hxx:26,
  from /media/dewan/Work/gsoc/core/in
 clude/svl/eitem.hxx:25,
  from /media/dewan/Work/gsoc/core/sf
 x2/source/appl/appchild.cxx:22:
 /media/dewan/Work/gsoc/core/include/o3tl/typed_flags_set.hxx:50:29:
 error:   from definition of ‘template struct o3tl::typed_flags’
 [-fpermissive]
  template struct typed_flags {};
  ^
 /media/dewan/Work/gsoc/core/solenv/gbuild/LinkTarget.mk:288: recipe
 for target 
 '/media/dewan/Work/gsoc/core/workdir/CxxObject/sfx2/source/appl/appbas.o'
 failed
 make[1]: *** [/media/dewan/Work/gsoc/core/w
 orkdir/CxxObject/sfx2/source/appl/appbas.o] Error 1
 make[1]: *** Waiting for unfinished jobs
 In file included from /media/dewan/Work/gsoc/core/in
 clude/sfx2/dispatch.hxx:26:0,
  from /media/dewan/Work/gsoc/core/sf
 x2/source/appl/appcfg.cxx:63:
 /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
 specializ

[Libreoffice-commits] online.git: net/SslSocket.hpp

2017-03-10 Thread Miklos Vajna
 net/SslSocket.hpp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2f07eb9a7ded3cd75fd25fea741eade13cb44b0a
Author: Miklos Vajna 
Date:   Fri Mar 10 11:11:58 2017 +0100

Fix remaining -Werror,-Winconsistent-missing-override warnings

The last ones introduced by the non-blocking merge.

Change-Id: I0b9264428669cdd2b8f6eac911c336c6b0e8de99

diff --git a/net/SslSocket.hpp b/net/SslSocket.hpp
index ac96973..1253b9f 100644
--- a/net/SslSocket.hpp
+++ b/net/SslSocket.hpp
@@ -100,14 +100,14 @@ public:
 StreamSocket::writeOutgoingData();
 }
 
-virtual int readData(char* buf, int len)
+virtual int readData(char* buf, int len) override
 {
 assert(isCorrectThread());
 
 return handleSslState(SSL_read(_ssl, buf, len));
 }
 
-virtual int writeData(const char* buf, const int len)
+virtual int writeData(const char* buf, const int len) override
 {
 assert(isCorrectThread());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: net/WebSocketHandler.hpp

2017-03-10 Thread Miklos Vajna
 net/WebSocketHandler.hpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 400c580800799894f9ee195eba50f9c37be8377c
Author: Miklos Vajna 
Date:   Fri Mar 10 11:06:43 2017 +0100

net: fix -Werror,-Wconstant-conversion

Change-Id: If2bbad6d3909c7d6df9eed5edf260609d64db3a8

diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp
index 5331005..27536a5 100644
--- a/net/WebSocketHandler.hpp
+++ b/net/WebSocketHandler.hpp
@@ -250,7 +250,7 @@ public:
 {
 const std::string nextmessage = "nextmessage: size=" + 
std::to_string(len);
 const unsigned char size = (nextmessage.size() & 0xff);
-out.push_back(fin | WSOpCode::Text);
+out.push_back(static_cast(fin | WSOpCode::Text));
 out.push_back(size);
 out.insert(out.end(), nextmessage.data(), nextmessage.data() + 
size);
 socket->writeOutgoingData();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Miklos Vajna
 net/Socket.hpp  |2 +-
 wsd/LOOLWSD.cpp |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 33cbe908c5d8b82e181fd73d59de4672ccad540e
Author: Miklos Vajna 
Date:   Fri Mar 10 10:54:08 2017 +0100

net: fix -Werror,-Winconsistent-missing-override

Change-Id: Ia8c1f0233e0b65f5fae01272b4f31638aceac9ee

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 7c48bfc..7b3199b 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -521,7 +521,7 @@ public:
 }
 
 /// Just trigger the async shutdown.
-virtual void shutdown()
+virtual void shutdown() override
 {
 _shutdownSignalled = true;
 }
commit 2e2381b5b3fc33c4bd680136c7210694ce58119c
Author: Miklos Vajna 
Date:   Fri Mar 10 10:53:40 2017 +0100

wsd: fix -Werror,-Winconsistent-missing-override

Change-Id: I0f009aea715e93c90683f333c96a04088d103964

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 4608c5a..589d0b6 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1628,7 +1628,7 @@ private:
 }
 
 /// Prisoner websocket fun ... (for now)
-virtual void handleMessage(bool /*fin*/, WSOpCode /* code */, 
std::vector &data)
+virtual void handleMessage(bool /*fin*/, WSOpCode /* code */, 
std::vector &data) override
 {
 if (UnitWSD::get().filterChildMessage(data))
 return;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 242 commits - common/Common.hpp common/FileUtil.cpp common/IoUtil.cpp common/Log.cpp common/MessageQueue.cpp common/Protocol.cpp common/Session.cpp common/Session.hpp

2017-03-10 Thread Jan Holesovsky
 .gitignore   |2 
 Makefile.am  |   46 
 common/Common.hpp|3 
 common/FileUtil.cpp  |3 
 common/IoUtil.cpp|3 
 common/Log.cpp   |2 
 common/MessageQueue.cpp  |2 
 common/Protocol.cpp  |3 
 common/Session.cpp   |   91 -
 common/Session.hpp   |   20 
 common/SigUtil.cpp   |   90 -
 common/SigUtil.hpp   |   20 
 common/SpookyV2.cpp  |2 
 common/Unit.cpp  |3 
 common/UnitHTTP.cpp  |4 
 common/Util.cpp  |3 
 common/Util.hpp  |3 
 kit/ChildSession.cpp |5 
 kit/DummyLibreOfficeKit.cpp  |2 
 kit/Kit.cpp  |   12 
 net/ServerSocket.hpp |  113 +
 net/Socket.cpp   |  144 +
 net/Socket.hpp   |  823 +
 net/Ssl.cpp  |  276 +++
 net/Ssl.hpp  |   83 
 net/SslSocket.hpp|  264 +++
 net/WebSocketHandler.hpp |  359 
 net/clientnb.cpp |  281 +++
 net/loolnb.cpp   |  265 +++
 test/Makefile.am |7 
 test/UnitAdmin.cpp   |4 
 test/UnitFonts.cpp   |2 
 test/UnitFuzz.cpp|2 
 test/UnitMinSocketBufferSize.cpp |4 
 test/UnitOOB.cpp |2 
 test/UnitPrefork.cpp |2 
 test/UnitStorage.cpp |4 
 test/UnitTileCache.cpp   |4 
 test/UnitTimeout.cpp |4 
 test/helpers.hpp |8 
 test/httpcrashtest.cpp   |5 
 test/httpwserror.cpp |2 
 test/httpwstest.cpp  |   84 
 test/test.cpp|2 
 tools/KitClient.cpp  |2 
 tools/Stress.cpp |2 
 tools/Tool.cpp   |2 
 tools/map.cpp|2 
 tools/mount.cpp  |2 
 wsd/Admin.cpp|3 
 wsd/AdminModel.cpp   |3 
 wsd/Auth.cpp |3 
 wsd/ClientSession.cpp|   57 
 wsd/ClientSession.hpp|7 
 wsd/DocumentBroker.cpp   |  351 +++-
 wsd/DocumentBroker.hpp   |  140 +
 wsd/FileServer.cpp   |   91 -
 wsd/FileServer.hpp   |   35 
 wsd/LOOLWSD.cpp  | 3401 ---
 wsd/LOOLWSD.hpp  |   13 
 wsd/LOOLWebSocket.hpp|2 
 wsd/SenderQueue.cpp  |  159 -
 wsd/SenderQueue.hpp  |  113 -
 wsd/Storage.cpp  |3 
 wsd/TileCache.cpp|3 
 65 files changed, 5123 insertions(+), 2334 deletions(-)

New commits:
commit 4ba2325c81cafe342d19f186b55a91e248124ddc
Author: Jan Holesovsky 
Date:   Fri Mar 10 10:44:06 2017 +0100

Move Replay.hpp to headers.

Change-Id: Id65e81ce2b8a9b77d910524a00d9f42164365ab2

diff --git a/Makefile.am b/Makefile.am
index 4992917..1ed2f25 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,8 +54,7 @@ shared_sources = common/FileUtil.cpp \
  common/Unit.cpp \
  common/UnitHTTP.cpp \
  common/Util.cpp \
- net/Socket.cpp \
- tools/Replay.hpp
+ net/Socket.cpp
 if ENABLE_SSL
 shared_sources += net/Ssl.cpp
 endif
@@ -163,7 +162,8 @@ shared_headers = common/Common.hpp \
  common/security.h \
  common/SpookyV2.h \
  net/Socket.hpp \
- net/WebSocketHandler.hpp
+ net/WebSocketHandler.hpp \
+ tools/Replay.hpp
 if ENABLE_SSL
 shared_headers += net/Ssl.hpp \
   net/SslSocket.hpp
commit 5677eb30b704cce6f3987d17ed712e956a31859a
Author: Ashod Nakashian 
Date:   Thu Mar 9 23:50:36 2017 -0500

nb: fix saving when last client disconnects

When the last client session is disconnected
docBroker must first issue a save and wait
until the kit processes the save and sends
back notfication. Since said notification
goes to the ChildSession (which is the last)
and said ChildSession is the one that signals
to docBroker to persist the doc to the Storage,
we need to keep all components alive and kicking
during this final saving.

As such, when the last session is to be removed
from docBroker, we instead issue an autosave and
continue everything as normal. When the save
notification even arrives and ChildSession signals
docBroker to persist the doc, we check if we were
destroying and in that even remove that last session
and stop the polling thread.

The docBroker instance itself will get cleaned up
in due time.

Change-Id: Ie84e784284e1ec12b0b201d6bf75170b31f66147

diff --git a/wsd/Documen

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

2017-03-10 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/addin/fods/besseli.fods|  683 ++---
 sc/qa/unit/data/functions/addin/fods/besselj.fods|  662 ++---
 sc/qa/unit/data/functions/addin/fods/besselk.fods|  722 +++---
 sc/qa/unit/data/functions/addin/fods/bessely.fods|  730 +++---
 sc/qa/unit/data/functions/addin/fods/erf.fods| 2257 +--
 sc/qa/unit/data/functions/addin/fods/erfc.fods   | 2200 +-
 sc/qa/unit/data/functions/addin/fods/imargument.fods |  860 +++
 sc/qa/unit/data/functions/addin/fods/imcos.fods  |  152 -
 sc/qa/unit/data/functions/addin/fods/imcosh.fods |  830 +++---
 sc/qa/unit/data/functions/addin/fods/imcot.fods  |  190 -
 sc/qa/unit/data/functions/addin/fods/imcsc.fods  |  176 -
 sc/qa/unit/data/functions/addin/fods/imcsch.fods | 1024 
 sc/qa/unit/data/functions/addin/fods/imdiv.fods  |  839 +++
 sc/qa/unit/data/functions/addin/fods/imexp.fods  |  976 
 sc/qa/unit/data/functions/addin/fods/imln.fods   |  974 
 sc/qa/unit/data/functions/addin/fods/imlog10.fods|  976 
 sc/qa/unit/data/functions/addin/fods/imlog2.fods |  978 
 sc/qa/unit/data/functions/addin/fods/impower.fods|  978 
 sc/qa/unit/data/functions/addin/fods/improduct.fods  |  875 +++
 sc/qa/unit/data/functions/addin/fods/imsec.fods  |  970 
 sc/qa/unit/data/functions/addin/fods/imsech.fods |  970 
 sc/qa/unit/data/functions/addin/fods/imsin.fods  |  970 
 sc/qa/unit/data/functions/addin/fods/imsinh.fods |  254 +-
 sc/qa/unit/data/functions/addin/fods/imsqrt.fods |  868 +++
 sc/qa/unit/data/functions/addin/fods/imsub.fods  |  884 +++
 sc/qa/unit/data/functions/addin/fods/imsum.fods  |  872 +++
 sc/qa/unit/data/functions/addin/fods/imtan.fods  |  868 +++
 27 files changed, 12281 insertions(+), 11457 deletions(-)

New commits:
commit 3d8bf853f10755ecacd88b46886af4564923f80d
Author: Zdeněk Crhonek 
Date:   Fri Mar 3 16:30:03 2017 +0100

tests of ADDIN functions / replace ROUND with ROUNDSIG

Change-Id: I5d9ffc56d0fd17a337c08ac0be97ccf92c2f2e35
Reviewed-on: https://gerrit.libreoffice.org/34871
Tested-by: Jenkins 
Reviewed-by: Zdenek Crhonek 

diff --git a/sc/qa/unit/data/functions/addin/fods/besseli.fods 
b/sc/qa/unit/data/functions/addin/fods/besseli.fods
index a0b0b8c..24c301c 100644
--- a/sc/qa/unit/data/functions/addin/fods/besseli.fods
+++ b/sc/qa/unit/data/functions/addin/fods/besseli.fods
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2017-01-02T19:55:59.875194457P0D1LibreOfficeDev/5.4.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/63ddc8dc4ae1f3c3ee2f860c34886688b0ed2d57
+ 
2017-01-02T19:55:59.875194457P0D1LibreOfficeDev/5.4.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/36de6c50684c8241969a2064d30aff41e0bc5d97
  
   
0
0
-   64713
-   148642
+   22009
+   4261

 
  view1
@@ -32,7 +32,7 @@
   
   
2
-   326
+   155
0
0
0
@@ -41,7 +41,7 @@
0
0
0
-   309
+   0
0
120
60
@@ -49,7 +49,7 @@
false

[Libreoffice-commits] online.git: loleaflet/main.js loleaflet/src

2017-03-10 Thread Pranav Kant
 loleaflet/main.js|5 -
 loleaflet/src/map/Map.js |2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 48977108be4f299e3dd43e7af58c7a9ab10ccbfb
Author: Pranav Kant 
Date:   Fri Mar 10 14:58:47 2017 +0530

loleaflet: Allow not inactivating the screen

Change-Id: Iad6233e2855b9260732ce4449668c0fab1cd3804

diff --git a/loleaflet/main.js b/loleaflet/main.js
index 7822577..4f32fce 100644
--- a/loleaflet/main.js
+++ b/loleaflet/main.js
@@ -72,6 +72,8 @@ var timestamp = getParameterByName('timestamp');
 var closebutton = getParameterByName('closebutton');
 // Shows revision history file menu option
 var revHistoryEnabled = getParameterByName('revisionhistory');
+// Should the document go inactive or not
+var alwaysActive = getParameterByName('alwaysactive');
 // Loleaflet Debug mode
 var debugMode = getParameterByName('debug');
 if (wopiSrc === '' && filePath === '') {
@@ -107,7 +109,8 @@ var map = L.map('map', {
 timestamp: timestamp,
 documentContainer: 'document-container',
 debug: debugMode,
-   wopi: isWopi
+   wopi: isWopi,
+   alwaysActive: alwaysActive
 });
 // toolbar.js (loaded in 

Re: I will like to report a bug on libreoffice 5.3.0.3

2017-03-10 Thread Heiko Tietze
Hi M. Alpizar,

you wrote to the developers mailing list, that's not how bugs are filed. Have a 
look at https://wiki.documentfoundation.org/QA/BugReport how to report 
properly. And please keep in mind that "awful difficult to manipulate" is 
nothing someone else can follow.

Cheers,
Heiko

On 03/10/2017 12:36 AM, M. Alpizar wrote:
> I will like to report a bug on libreoffice 5.3.0.3
> 
> 1.  Writer document with header and footers options used. When
> importing or pasting an image. The image is not get aliened and awful
> difficult to manipulate.
> 
> 
> Thanks
> 
> Keep working.
> 
> 
> 
> ___ LibreOffice mailing
> list LibreOffice@lists.freedesktop.org 
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
> 

-- 
Dr. Heiko Tietze
UX Designer
Tel. +49 (0)179/1268509



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


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

2017-03-10 Thread Vitaliy Anderson
 sc/source/ui/cctrl/checklistmenu.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b0240bf12a94e71d1e2ebe3922afc1a3de5cd933
Author: Vitaliy Anderson 
Date:   Thu Mar 9 23:18:09 2017 -0800

tdf#106047 Fix case-insensitive search in autofilter

Change-Id: I67899789b0a51a3a04c2085cbab8c0ed62903413
Reviewed-on: https://gerrit.libreoffice.org/35030
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 9d39ad3..3879d79 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1209,7 +1209,7 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, TriStateHdl, 
Button*, void)
 IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl, Edit&, void)
 {
 OUString aSearchText = maEdSearch->GetText();
-aSearchText = aSearchText.toAsciiLowerCase();
+aSearchText = ScGlobal::pCharClass->lowercase( aSearchText );
 bool bSearchTextEmpty = aSearchText.isEmpty();
 size_t n = maMembers.size();
 size_t nSelCount = 0;
@@ -1228,10 +1228,10 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl, 
Edit&, void)
 if ( !bSearchTextEmpty )
 {
 if ( !bIsDate )
-bPartialMatch = ( aLabelDisp.toAsciiLowerCase().indexOf( 
aSearchText ) != -1 );
+bPartialMatch = ( ScGlobal::pCharClass->lowercase( aLabelDisp 
).indexOf( aSearchText ) != -1 );
 else if ( maMembers[i].meDatePartType == ScCheckListMember::DAY ) 
// Match with both numerical and text version of month
-bPartialMatch = bPartialMatch || ( OUString( 
maMembers[i].maRealName + maMembers[i].maDateParts[1] )
-   
.toAsciiLowerCase().indexOf( aSearchText ) != -1 );
+bPartialMatch = bPartialMatch || ( 
ScGlobal::pCharClass->lowercase( OUString( maMembers[i].maRealName + 
maMembers[i].maDateParts[1] ) )
+   .indexOf( aSearchText ) != 
-1 );
 else
 continue;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: contributing to LibreOffice Online

2017-03-10 Thread Pranav Kant
More precisely, you seem to be missing this[1]


[1]
https://gerrit.libreoffice.org/gitweb?p=core.git;a=commit;h=e5b98fd9c29fe427c4babe368c17d8c609b5325e

On Fri, Mar 10, 2017 at 2:38 PM, Pranav Kant  wrote:

> Hey,
>
> It seems that master was unstable at some point in the past when you
> pulled. Please pull again and compile. See [1] for details
>
>
> [1] http://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=
> MASTER&brief-log=1489070564.20308
>
> On Fri, Mar 10, 2017 at 11:10 AM, Aditya Dewan 
> wrote:
>
>> Hi,
>>
>> Sorry to bother you again, i am facing some issues while building the
>> core( 'autogen.sh' ran fine. It had some dependency issues, but i resolved
>> them and it ran fine.).
>> The build was taking a lot of time , so i left it running overnight.
>> The following error came up and the build failed.
>>
>>
>> [CXX] sfx2/source/appl/appbaslib.cxx
>>> [CXX] sfx2/source/appl/appcfg.cxx
>>> [CXX] sfx2/source/appl/appchild.cxx
>>> [CXX] sfx2/source/appl/appdata.cxx
>>> In file included from /media/dewan/Work/gsoc/core/sf
>>> x2/source/appl/app.cxx:65:0:
>>> /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
>>> specialization of ‘template struct o3tl::typed_flags’ in different
>>> namespace [-fpermissive]
>>>  template<> struct o3tl::typed_flags:
>>>  ^
>>> In file included from /media/dewan/Work/gsoc/core/in
>>> clude/vcl/bitmap.hxx:31:0,
>>>  from /media/dewan/Work/gsoc/core/in
>>> clude/vcl/bitmapex.hxx:24,
>>>  from /media/dewan/Work/gsoc/core/in
>>> clude/vcl/image.hxx:27,
>>>  from /media/dewan/Work/gsoc/core/in
>>> clude/sfx2/app.hxx:27,
>>>  from /media/dewan/Work/gsoc/core/sf
>>> x2/source/appl/app.cxx:22:
>>> /media/dewan/Work/gsoc/core/include/o3tl/typed_flags_set.hxx:50:29:
>>> error:   from definition of ‘template struct o3tl::typed_flags’
>>> [-fpermissive]
>>>  template struct typed_flags {};
>>>  ^
>>> In file included from /media/dewan/Work/gsoc/core/in
>>> clude/sfx2/dispatch.hxx:26:0,
>>>  from /media/dewan/Work/gsoc/core/sf
>>> x2/source/appl/appbas.cxx:60:
>>> /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
>>> specialization of ‘template struct o3tl::typed_flags’ in different
>>> namespace [-fpermissive]
>>>  template<> struct o3tl::typed_flags:
>>>  ^
>>> In file included from /media/dewan/Work/gsoc/core/in
>>> clude/basic/sbxdef.hxx:27:0,
>>>  from /media/dewan/Work/gsoc/core/in
>>> clude/basic/sbxfac.hxx:23,
>>>  from /media/dewan/Work/gsoc/core/sf
>>> x2/source/appl/appbas.cxx:32:
>>> /media/dewan/Work/gsoc/core/include/o3tl/typed_flags_set.hxx:50:29:
>>> error:   from definition of ‘template struct o3tl::typed_flags’
>>> [-fpermissive]
>>>  template struct typed_flags {};
>>>  ^
>>> In file included from /media/dewan/Work/gsoc/core/in
>>> clude/sfx2/childwin.hxx:33:0,
>>>  from /media/dewan/Work/gsoc/core/sf
>>> x2/source/inc/workwin.hxx:37,
>>>  from /media/dewan/Work/gsoc/core/sf
>>> x2/source/appl/appchild.cxx:26:
>>> /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
>>> specialization of ‘template struct o3tl::typed_flags’ in different
>>> namespace [-fpermissive]
>>>  template<> struct o3tl::typed_flags:
>>>  ^
>>> In file included from /media/dewan/Work/gsoc/core/in
>>> clude/tools/errinf.hxx:29:0,
>>>  from /media/dewan/Work/gsoc/core/in
>>> clude/tools/stream.hxx:26,
>>>  from /media/dewan/Work/gsoc/core/in
>>> clude/svl/eitem.hxx:25,
>>>  from /media/dewan/Work/gsoc/core/sf
>>> x2/source/appl/appchild.cxx:22:
>>> /media/dewan/Work/gsoc/core/include/o3tl/typed_flags_set.hxx:50:29:
>>> error:   from definition of ‘template struct o3tl::typed_flags’
>>> [-fpermissive]
>>>  template struct typed_flags {};
>>>  ^
>>> /media/dewan/Work/gsoc/core/solenv/gbuild/LinkTarget.mk:288: recipe for
>>> target 
>>> '/media/dewan/Work/gsoc/core/workdir/CxxObject/sfx2/source/appl/appbas.o'
>>> failed
>>> make[1]: *** [/media/dewan/Work/gsoc/core/w
>>> orkdir/CxxObject/sfx2/source/appl/appbas.o] Error 1
>>> make[1]: *** Waiting for unfinished jobs
>>> In file included from /media/dewan/Work/gsoc/core/in
>>> clude/sfx2/dispatch.hxx:26:0,
>>>  from /media/dewan/Work/gsoc/core/sf
>>> x2/source/appl/appcfg.cxx:63:
>>> /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
>>> specialization of ‘template struct o3tl::typed_flags’ in different
>>> namespace [-fpermissive]
>>>  template<> struct o3tl::typed_flags:
>>>  ^
>>> In file included from /media/dewan/Work/gsoc/core/in
>>> clude/tools/resmgr.hxx:25:0,
>>>  from /media/dewan/Work/gsoc/core/in
>>> clude/vcl/builder.hxx:16,
>>>  from /media/dewan/

Re: contributing to LibreOffice Online

2017-03-10 Thread Pranav Kant
Hey,

It seems that master was unstable at some point in the past when you
pulled. Please pull again and compile. See [1] for details


[1]
http://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER&brief-log=1489070564.20308

On Fri, Mar 10, 2017 at 11:10 AM, Aditya Dewan 
wrote:

> Hi,
>
> Sorry to bother you again, i am facing some issues while building the
> core( 'autogen.sh' ran fine. It had some dependency issues, but i resolved
> them and it ran fine.).
> The build was taking a lot of time , so i left it running overnight.
> The following error came up and the build failed.
>
>
> [CXX] sfx2/source/appl/appbaslib.cxx
>> [CXX] sfx2/source/appl/appcfg.cxx
>> [CXX] sfx2/source/appl/appchild.cxx
>> [CXX] sfx2/source/appl/appdata.cxx
>> In file included from /media/dewan/Work/gsoc/core/
>> sfx2/source/appl/app.cxx:65:0:
>> /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
>> specialization of ‘template struct o3tl::typed_flags’ in different
>> namespace [-fpermissive]
>>  template<> struct o3tl::typed_flags:
>>  ^
>> In file included from /media/dewan/Work/gsoc/core/
>> include/vcl/bitmap.hxx:31:0,
>>  from /media/dewan/Work/gsoc/core/
>> include/vcl/bitmapex.hxx:24,
>>  from /media/dewan/Work/gsoc/core/
>> include/vcl/image.hxx:27,
>>  from /media/dewan/Work/gsoc/core/
>> include/sfx2/app.hxx:27,
>>  from /media/dewan/Work/gsoc/core/
>> sfx2/source/appl/app.cxx:22:
>> /media/dewan/Work/gsoc/core/include/o3tl/typed_flags_set.hxx:50:29:
>> error:   from definition of ‘template struct o3tl::typed_flags’
>> [-fpermissive]
>>  template struct typed_flags {};
>>  ^
>> In file included from /media/dewan/Work/gsoc/core/
>> include/sfx2/dispatch.hxx:26:0,
>>  from /media/dewan/Work/gsoc/core/
>> sfx2/source/appl/appbas.cxx:60:
>> /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
>> specialization of ‘template struct o3tl::typed_flags’ in different
>> namespace [-fpermissive]
>>  template<> struct o3tl::typed_flags:
>>  ^
>> In file included from /media/dewan/Work/gsoc/core/
>> include/basic/sbxdef.hxx:27:0,
>>  from /media/dewan/Work/gsoc/core/
>> include/basic/sbxfac.hxx:23,
>>  from /media/dewan/Work/gsoc/core/
>> sfx2/source/appl/appbas.cxx:32:
>> /media/dewan/Work/gsoc/core/include/o3tl/typed_flags_set.hxx:50:29:
>> error:   from definition of ‘template struct o3tl::typed_flags’
>> [-fpermissive]
>>  template struct typed_flags {};
>>  ^
>> In file included from /media/dewan/Work/gsoc/core/
>> include/sfx2/childwin.hxx:33:0,
>>  from /media/dewan/Work/gsoc/core/
>> sfx2/source/inc/workwin.hxx:37,
>>  from /media/dewan/Work/gsoc/core/
>> sfx2/source/appl/appchild.cxx:26:
>> /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
>> specialization of ‘template struct o3tl::typed_flags’ in different
>> namespace [-fpermissive]
>>  template<> struct o3tl::typed_flags:
>>  ^
>> In file included from /media/dewan/Work/gsoc/core/
>> include/tools/errinf.hxx:29:0,
>>  from /media/dewan/Work/gsoc/core/
>> include/tools/stream.hxx:26,
>>  from /media/dewan/Work/gsoc/core/
>> include/svl/eitem.hxx:25,
>>  from /media/dewan/Work/gsoc/core/
>> sfx2/source/appl/appchild.cxx:22:
>> /media/dewan/Work/gsoc/core/include/o3tl/typed_flags_set.hxx:50:29:
>> error:   from definition of ‘template struct o3tl::typed_flags’
>> [-fpermissive]
>>  template struct typed_flags {};
>>  ^
>> /media/dewan/Work/gsoc/core/solenv/gbuild/LinkTarget.mk:288: recipe for
>> target 
>> '/media/dewan/Work/gsoc/core/workdir/CxxObject/sfx2/source/appl/appbas.o'
>> failed
>> make[1]: *** 
>> [/media/dewan/Work/gsoc/core/workdir/CxxObject/sfx2/source/appl/appbas.o]
>> Error 1
>> make[1]: *** Waiting for unfinished jobs
>> In file included from /media/dewan/Work/gsoc/core/
>> include/sfx2/dispatch.hxx:26:0,
>>  from /media/dewan/Work/gsoc/core/
>> sfx2/source/appl/appcfg.cxx:63:
>> /media/dewan/Work/gsoc/core/include/sfx2/bindings.hxx:67:25: error:
>> specialization of ‘template struct o3tl::typed_flags’ in different
>> namespace [-fpermissive]
>>  template<> struct o3tl::typed_flags:
>>  ^
>> In file included from /media/dewan/Work/gsoc/core/
>> include/tools/resmgr.hxx:25:0,
>>  from /media/dewan/Work/gsoc/core/
>> include/vcl/builder.hxx:16,
>>  from /media/dewan/Work/gsoc/core/
>> include/vcl/syswin.hxx:25,
>>  from /media/dewan/Work/gsoc/core/
>> include/vcl/dialog.hxx:25,
>>  from /media/dewan/Work/gsoc/core/
>> include/vcl/btndlg.hxx:24,
>>  from /media/dewan/Work/gsoc/core/
>> include/vcl/msgbox.hxx:24,
>>  from /me

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

2017-03-10 Thread Takeshi Abe
 starmath/inc/parse.hxx|2 +-
 starmath/source/parse.cxx |   12 +---
 2 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit 657a791349f8cd5b1aa271ac7c75ce5b5b2a859f
Author: Takeshi Abe 
Date:   Fri Mar 10 10:37:11 2017 +0900

starmath: Return SmGlyphSpecialNode from DoGlyphSpecial()

instead of pushing it to the stack. This spares some pops.

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

diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index 6804b1a..5393b3c 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -89,7 +89,7 @@ class SmParser
 voidDoStack();
 voidDoMatrix();
 voidDoSpecial();
-voidDoGlyphSpecial();
+SmGlyphSpecialNode *DoGlyphSpecial();
 // end of grammar
 
 voidError(SmParseError Error);
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index cf1dcc8..a0f43c2 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1124,9 +1124,7 @@ void SmParser::DoProduct()
 //Let the glyph node know it's a binary operation
 m_aCurToken.eType = TBOPER;
 m_aCurToken.nGroup = TG::Product;
-
-DoGlyphSpecial();
-pOper = popOrZero(m_aNodeStack);
+pOper = DoGlyphSpecial();
 break;
 
 case TOVERBRACE :
@@ -1660,8 +1658,7 @@ void SmParser::DoUnOper()
 //Let the glyph know what it is...
 m_aCurToken.eType = TUOPER;
 m_aCurToken.nGroup = TG::UnOper;
-DoGlyphSpecial();
-pOper = popOrZero(m_aNodeStack);
+pOper = DoGlyphSpecial();
 break;
 
 case TPLUS :
@@ -2253,10 +2250,11 @@ void SmParser::DoSpecial()
 NextToken();
 }
 
-void SmParser::DoGlyphSpecial()
+SmGlyphSpecialNode *SmParser::DoGlyphSpecial()
 {
-
m_aNodeStack.push_front(o3tl::make_unique(m_aCurToken));
+auto pNode = o3tl::make_unique(m_aCurToken);
 NextToken();
+return pNode.release();
 }
 
 void SmParser::Error(SmParseError eError)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Caolán McNamara
 include/vcl/bitmapaccess.hxx |2 --
 sw/qa/extras/ww8import/ww8import.cxx |1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 0ae45758d1f4235f98c98f22e027ab3298e21b86
Author: Caolán McNamara 
Date:   Fri Mar 10 08:58:13 2017 +

coverity#1402149 Unchecked dynamic_cast

Change-Id: I73fa2c6d3658e10728492c9766acef1eaadc5ca1

diff --git a/sw/qa/extras/ww8import/ww8import.cxx 
b/sw/qa/extras/ww8import/ww8import.cxx
index 4ec5ca0..c50ab96 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -83,6 +83,7 @@ DECLARE_WW8IMPORT_TEST( testTdf105570, "tdf105570.doc" )
   * Table 3 has { 0, 1, 1 }
   /
 SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
 SwDoc*   pDoc = pTextDoc->GetDocShell()->GetDoc();
 SwWrtShell*  pWrtShell= pDoc->GetDocShell()->GetWrtShell();
 SwShellCursor*   pShellCursor = pWrtShell->getShellCursor( false );
commit 34e9e77bf38b9ea7569f6a051505ac92eb4ae825
Author: Caolán McNamara 
Date:   Fri Mar 10 08:56:40 2017 +

coverity#1402152 Uninitialized pointer field

forgot to remove this unused member

Change-Id: I596d9f95284d1e27c2ca86e4c1ee75fc38cb7fce

diff --git a/include/vcl/bitmapaccess.hxx b/include/vcl/bitmapaccess.hxx
index 50eb37c..0623b74 100644
--- a/include/vcl/bitmapaccess.hxx
+++ b/include/vcl/bitmapaccess.hxx
@@ -108,8 +108,6 @@ private:
 BitmapReadAccess(const BitmapReadAccess&) = delete;
 BitmapReadAccess& operator=(const BitmapReadAccess&) = delete;
 
-private:
-Scanline*   mpScanBuf;
 protected:
 FncGetPixel mFncGetPixel;
 FncSetPixel mFncSetPixel;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Stephan Bergmann
 configure.ac |   16 +++-
 1 file changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 594c7a3f2f34d763b2b31b42fff6d0bae6663481
Author: Stephan Bergmann 
Date:   Thu Mar 9 18:15:51 2017 +0100

Clean up, using printf instead of echo

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

diff --git a/configure.ac b/configure.ac
index dd945c9..c4d1eda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3309,17 +3309,15 @@ win_get_env_from_vsvars32bat()
 if test $vcnum = "150"; then
   # Also seems to be located in another directory under the same name: 
vsvars32.bat
   # 
https://github.com/bazelbuild/bazel/blob/master/src/main/native/build_windows_jni.sh#L56-L57
-  echo -e "@call \"`cygpath -w 
$VC_PRODUCT_DIR`/../Common7/Tools/VsDevCmd.bat\" /no_logo\r\n" >> 
$WRAPPERBATCHFILEPATH
+  printf '@call "%s/../Common7/Tools/VsDevCmd.bat" /no_logo\r\n' 
"$(cygpath -w $VC_PRODUCT_DIR)" > $WRAPPERBATCHFILEPATH
 else
-  echo -e "@call \"`cygpath -w 
$VC_PRODUCT_DIR`/../Common7/Tools/vsvars32.bat\"\r\n" >> $WRAPPERBATCHFILEPATH
+  printf '@call "%s/../Common7/Tools/vsvars32.bat"\r\n' "$(cygpath -w 
$VC_PRODUCT_DIR)" > $WRAPPERBATCHFILEPATH
 fi
-echo -e "@setlocal\r\n" >> $WRAPPERBATCHFILEPATH
-echo -e "@echo %$1%\r\n" >> $WRAPPERBATCHFILEPATH
-echo -e "@endlocal\r\n" >> $WRAPPERBATCHFILEPATH
+printf '@setlocal\r\n@echo %%%s%%\r\n@endlocal\r\n' "$1" >> 
$WRAPPERBATCHFILEPATH
 chmod +x $WRAPPERBATCHFILEPATH
-_win_get_env_from_vsvars32bat=$($WRAPPERBATCHFILEPATH | tr -d "\r")
+_win_get_env_from_vsvars32bat=$("$WRAPPERBATCHFILEPATH" | tr -d '\r')
 rm -f $WRAPPERBATCHFILEPATH
-echo $_win_get_env_from_vsvars32bat
+printf '%s' "$_win_get_env_from_vsvars32bat"
 }
 
 find_ucrt()
@@ -3343,9 +3341,9 @@ find_ucrt()
   ide_env_file="${ide_env_dir}/vsvars32.bat"
 fi
 if test -f "$ide_env_file"; then
-PathFormat "`win_get_env_from_vsvars32bat "UniversalCRTSdkDir"`"
+PathFormat "$(win_get_env_from_vsvars32bat UniversalCRTSdkDir)"
 UCRTSDKDIR=$formatted_path
-UCRTVERSION=`win_get_env_from_vsvars32bat "UCRTVersion"`
+UCRTVERSION=$(win_get_env_from_vsvars32bat UCRTVersion)
 else
   AC_MSG_ERROR([No UCRT found])
 fi
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Lionel Elie Mamane
 forms/source/component/ListBox.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 23b8a097090ad544c596e644cf477feb360c9469
Author: Lionel Elie Mamane 
Date:   Thu Mar 9 19:44:38 2017 +0100

tdf#106462 old value and new value were swapped

in

commit 66ccfcd2908445b8194c364c89778056374b02af
Author: Jochen Nitschke 
Date:   Fri Oct 21 09:36:10 2016 +0200

remove use of tryPropertyValue Any specialisation

Change-Id: I3180cf5b9e63a3da9257b03ba02967a2d5402ec3
Reviewed-by: Stephan Bergmann 

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

diff --git a/forms/source/component/ListBox.cxx 
b/forms/source/component/ListBox.cxx
index 00e1e7a..d5599d5 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -421,8 +421,8 @@ namespace frm
 Any _rCurrentValue = getCurrentSingleValue();
 if (_rCurrentValue != _rValue)
 {
-_rOldValue = _rValue;
-_rConvertedValue = _rCurrentValue;
+_rOldValue = _rCurrentValue;
+_rConvertedValue = _rValue;
 bModified = true;
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Pranav Kant
 loleaflet/src/layer/tile/TileLayer.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6c333b154ae414347af5c8875f5c9c207a1f6380
Author: Pranav Kant 
Date:   Fri Mar 10 14:17:25 2017 +0530

Typo

Change-Id: Iba85f017321806649ab4723a88873894c1b349f3

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 901e753..7c0d282 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -220,7 +220,7 @@ L.TileLayer = L.GridLayer.extend({
reject: {
name: _('Reject'),
callback: function (key, options) {
-   that.onChangeReject.call(that, 
options.$tigger.get(0).annotation._data.id);
+   that.onChangeReject.call(that, 
options.$trigger.get(0).annotation._data.id);
}
}
},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-10 Thread Stephan Bergmann
 cui/source/options/treeopt.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 040d455cae75d961f01b39afe0bfb4b031345c5c
Author: Stephan Bergmann 
Date:   Fri Mar 10 09:37:41 2017 +0100

cid#1402150: Try to silence false positive report

Change-Id: Ied2b1a8b0eb0aa9e7e48d1445677c8536f6388c8

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 1831df9..7d7b261 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1994,13 +1994,13 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
 for ( auto const & i: pModule->m_aNodeList )
 {
 OUString sNodeId = i->m_sId;
-for ( VectorOfNodes::size_type j = 0; j < aNodeList.size(); ++j )
+for ( auto j = aNodeList.begin(); j != aNodeList.end(); ++j )
 {
-OptionsNode* pNode = aNodeList[j];
+OptionsNode* pNode = *j;
 if ( pNode->m_sId == sNodeId )
 {
 aOutNodeList.push_back( pNode );
-aNodeList.erase( aNodeList.begin() + j );
+aNodeList.erase( j );
 break;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits