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

2016-08-28 Thread Mert Tumer
 android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java |   
13 --
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 5bdea25f681fb252967f99a22a38cce6be3c0b48
Author: Mert Tumer 
Date:   Wed Jul 27 20:37:19 2016 +0300

tdf#96771 - bug fix for owncloudfiles with white space characters

Change-Id: I373db55ed819ed5d2a574ba2590032ee628218f4
Reviewed-on: https://gerrit.libreoffice.org/27634
Reviewed-by: Michael Meeks 
Reviewed-by: jan iversen 
Tested-by: jan iversen 

diff --git 
a/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java 
b/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
index 13c3d6c..73b3b2c 100644
--- a/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
+++ b/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
@@ -2,7 +2,9 @@ package org.libreoffice.storage.owncloud;
 
 import java.io.File;
 import java.io.FileFilter;
+import java.io.UnsupportedEncodingException;
 import java.net.URI;
+import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -38,8 +40,15 @@ public class OwnCloudFile implements IFile {
 }
 
 @Override
-public URI getUri() {
-return URI.create(file.getRemotePath());
+public URI getUri(){
+
+try{
+return URI.create(URLEncoder.encode(file.getRemotePath(),"UTF-8"));
+}catch(UnsupportedEncodingException e){
+e.printStackTrace();
+}
+
+return null;
 }
 
 @Override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


LibreOffice's New Area Dialog Box crashes when compiled with Clang

2016-08-28 Thread Luke Benes
When you build LibreOffice with Clang 3.8-4.0, the area dialog box will cause 
an "Application Error" crash in Writer, Calc, and Impress.

Steps to reproduce:
1. Build with Clang 3.8-4.0
2. Insert Shape
3. Format -> Texbox and Shape -> Area

With Clang 3.8 r24 and 4.0 r27, LO will crash. I'm see thing on an AMD 
desktop with Ubuntu 14.4 and an Intel laptop with Ubuntu 16.04. When built with 
gcc, there is no crash.

Any ideas what's going on here?

Stephan,
Are you seeing this with your clang builds?


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


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

2016-08-28 Thread Caolán McNamara
 connectivity/source/drivers/calc/CConnection.cxx |   16 -
 connectivity/source/inc/calc/CConnection.hxx |   68 +--
 2 files changed, 77 insertions(+), 7 deletions(-)

New commits:
commit 45e01be1213f689ba5f1fa319e3dc48ea9c5
Author: Caolán McNamara 
Date:   Sat Aug 27 21:32:39 2016 +0100

Resolves: tdf#81883 dispose OCalcConnection's doc before shutdown

if noone else does it, then ensure the doc is disposed before
XDesktop it torn down

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

diff --git a/connectivity/source/drivers/calc/CConnection.cxx 
b/connectivity/source/drivers/calc/CConnection.cxx
index 3934fd4..a315bc6 100644
--- a/connectivity/source/drivers/calc/CConnection.cxx
+++ b/connectivity/source/drivers/calc/CConnection.cxx
@@ -31,7 +31,6 @@
 #include "calc/CPreparedStatement.hxx"
 #include "calc/CStatement.hxx"
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -164,7 +163,8 @@ Reference< XSpreadsheetDocument> const & 
OCalcConnection::acquireDoc()
 ::dbtools::throwGenericSQLException( sError, *this, aErrorDetails );
 }
 osl_atomic_increment(&m_nDocCount);
-m_pCloseListener.reset(new utl::CloseVeto(m_xDoc, true));
+m_xCloseVetoButTerminateListener.set(new CloseVetoButTerminateListener);
+m_xCloseVetoButTerminateListener->start(m_xDoc, xDesktop);
 return m_xDoc;
 }
 
@@ -172,7 +172,11 @@ void OCalcConnection::releaseDoc()
 {
 if ( osl_atomic_decrement(&m_nDocCount) == 0 )
 {
-m_pCloseListener.reset(); // dispose m_xDoc
+if (m_xCloseVetoButTerminateListener.is())
+{
+m_xCloseVetoButTerminateListener->stop();   // dispose m_xDoc
+m_xCloseVetoButTerminateListener.clear();
+}
 m_xDoc.clear();
 }
 }
@@ -182,7 +186,11 @@ void OCalcConnection::disposing()
 ::osl::MutexGuard aGuard(m_aMutex);
 
 m_nDocCount = 0;
-m_pCloseListener.reset(); // dispose m_xDoc
+if (m_xCloseVetoButTerminateListener.is())
+{
+m_xCloseVetoButTerminateListener->stop();   // dispose m_xDoc
+m_xCloseVetoButTerminateListener.clear();
+}
 m_xDoc.clear();
 
 OConnection::disposing();
diff --git a/connectivity/source/inc/calc/CConnection.hxx 
b/connectivity/source/inc/calc/CConnection.hxx
index 63b1d4a..a5e46b2 100644
--- a/connectivity/source/inc/calc/CConnection.hxx
+++ b/connectivity/source/inc/calc/CConnection.hxx
@@ -21,7 +21,10 @@
 #define INCLUDED_CONNECTIVITY_SOURCE_INC_CALC_CCONNECTION_HXX
 
 #include "file/FConnection.hxx"
+#include 
+#include 
 #include 
+#include 
 
 namespace com { namespace sun { namespace star {
 namespace sheet { class XSpreadsheetDocument; }
@@ -39,12 +42,71 @@ namespace connectivity
 {
 // the spreadsheet document:
 css::uno::Reference< css::sheet::XSpreadsheetDocument > m_xDoc;
-/// close listener that vetoes so nobody disposes m_xDoc
-::std::unique_ptr< ::utl::CloseVeto> m_pCloseListener;
 OUString m_sPassword;
 OUString m_aFileName;
 oslInterlockedCount m_nDocCount;
 
+class CloseVetoButTerminateListener : public 
cppu::WeakComponentImplHelper
+{
+private:
+/// close listener that vetoes so nobody else disposes m_xDoc
+std::unique_ptr m_pCloseListener;
+/// but also listen to XDesktop and if app is terminating 
anyway, dispose m_xDoc while
+/// its still possible to do so properly
+css::uno::Reference m_xDesktop;
+osl::Mutex m_aMutex;
+public:
+CloseVetoButTerminateListener()
+: 
cppu::WeakComponentImplHelper(m_aMutex)
+{
+}
+
+void start(const css::uno::Reference& 
rCloseable,
+   const css::uno::Reference& 
rDesktop)
+{
+m_xDesktop = rDesktop;
+m_xDesktop->addTerminateListener(this);
+m_pCloseListener.reset(new utl::CloseVeto(rCloseable, 
true));
+}
+
+void stop()
+{
+m_pCloseListener.reset();
+if (!m_xDesktop.is())
+return;
+m_xDesktop->removeTerminateListener(this);
+m_xDesktop.clear();
+}
+
+// XTerminateListener
+virtual void SAL_CALL queryTermination(const 
css::lang::EventObject& /*rEvent*/)
+throw(css::frame::TerminationVetoException, 
css::uno::RuntimeException, std::exception) override
+{
+}
+
+virtual void SAL_CALL notifyTermination(const 
cs

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

2016-08-28 Thread Jochen Nitschke
 cui/source/dialogs/screenshotannotationdlg.cxx |5 ++---
 vcl/source/window/layout.cxx   |9 +++--
 2 files changed, 5 insertions(+), 9 deletions(-)

New commits:
commit 0140d931e17a6392ead39a0250b2266fb6dfddf4
Author: Jochen Nitschke 
Date:   Sun Aug 28 11:45:28 2016 +0200

loplugin:defaultparams

Change-Id: I9e6b81855e421186af92e53c71f5ba9bd8005319
Reviewed-on: https://gerrit.libreoffice.org/28433
Reviewed-by: Jochen Nitschke 
Tested-by: Jochen Nitschke 

diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx 
b/cui/source/dialogs/screenshotannotationdlg.cxx
index e2a9b4c..6016cd0 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -206,7 +206,7 @@ ScreenshotAnnotationDlg_Impl::ScreenshotAnnotationDlg_Impl(
 if (mpText)
 {
 mpText->SetText("The quick brown fox jumps over the lazy dog :)");
-mpText->SetReadOnly(true);
+mpText->SetReadOnly();
 }
 
 // set click handler for save button
@@ -406,8 +406,7 @@ void ScreenshotAnnotationDlg_Impl::PaintControlDataEntry(
 // no transparency, draw without
 mpVirtualBufferDevice->DrawPolyLine(
 aPolygon,
-fLineWidth,
-basegfx::B2DLineJoin::Round);
+fLineWidth);
 }
 }
 }
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index bc548ec..56a2ac3 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -230,8 +230,7 @@ void VclContainer::Command(const CommandEvent& rCEvt)
 
 aMenu->InsertItem(
 nLocalID,
-pChild->GetText(),
-MenuItemBits::NONE);
+pChild->GetText());
 aMenu->SetHelpText(
 nLocalID,
 pChild->GetHelpText());
@@ -254,8 +253,7 @@ void VclContainer::Command(const CommandEvent& rCEvt)
 
 aMenu->InsertItem(
 nLocalID,
-"Screenshot",
-MenuItemBits::NONE);
+"Screenshot");
 aMenu->SetHelpText(
 nLocalID,
 "Go into interactive screenshot annotation mode");
@@ -263,8 +261,7 @@ void VclContainer::Command(const CommandEvent& rCEvt)
 nLocalID,
 "InteractiveScreenshotMode");
 aMenu->EnableItem(
-nLocalID,
-true);
+nLocalID);
 nScreenshotButtonID = nLocalID;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 9e/be53ffa5e53bd40917de9db539f63abb32a634

2016-08-28 Thread Caolán McNamara
 9e/be53ffa5e53bd40917de9db539f63abb32a634 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 2646e236ee0b330fe27e54770a7bfe69309a1eae
Author: Caolán McNamara 
Date:   Sun Aug 28 11:18:50 2016 +0100

Notes added by 'git notes add'

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


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 94/91ff38f520bda897c8425eb642bace41702682

2016-08-28 Thread Caolán McNamara
 94/91ff38f520bda897c8425eb642bace41702682 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f37829be436fe6d2c55c167d6f89c4026a38f28e
Author: Caolán McNamara 
Date:   Sun Aug 28 11:19:14 2016 +0100

Notes added by 'git notes add'

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


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

2016-08-28 Thread Giuseppe Castagno
 ucb/source/ucp/webdav-neon/webdavcontent.cxx |   42 +++
 ucb/source/ucp/webdav-neon/webdavcontent.hxx |3 +
 2 files changed, 40 insertions(+), 5 deletions(-)

New commits:
commit e0d0d87257d62ac61377a73909e17753f96e7aaa
Author: Giuseppe Castagno 
Date:   Sat Aug 27 12:29:21 2016 +0200

tdf#101094 (29) Fix for IIS 10.0 disabled OPTIONS method

When OPTIONS methods (or verb) is disabled (or denied) on a IIS 10.0
web server, error 404 (e.g. 'Not Found') is emitted, so we need to deal
with it.

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

diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 598a33f..411750d 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -35,7 +35,7 @@
 
 #include 
 #include 
-#include "osl/doublecheckedlocking.h"
+#include 
 #include 
 #include 
 #include 
@@ -58,9 +58,9 @@
 #include 
 #include 
 #include 
-#include "com/sun/star/ucb/InteractiveLockingLockedException.hpp"
-#include "com/sun/star/ucb/InteractiveLockingLockExpiredException.hpp"
-#include "com/sun/star/ucb/InteractiveLockingNotLockedException.hpp"
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -3925,8 +3925,17 @@ void Content::getResourceOptions(
 break;
 case SC_NOT_FOUND:
 {
+// Apparently on IIS 10.0, if you disabled OPTIONS 
method, this error is the one reported,
+// instead of SC_NOT_IMPLEMENTED or 
SC_METHOD_NOT_ALLOWED.
+// So check if this is an available resource, or a 
real 'Not Found' event.
+sal_uInt32 nLifeTime = m_nOptsCacheLifeNotFound;
+if( isResourceAvailable(xEnv, rResAccess ) )
+{
+nLifeTime = m_nOptsCacheLifeNotImpl;
+rDAVOptions.setResourceFound(); // means it 
exists, but it's not DAV
+}
 aStaticDAVOptionsCache.addDAVOptions( rDAVOptions,
-  
m_nOptsCacheLifeNotFound );
+  nLifeTime );
 SAL_WARN( "ucb.ucp.webdav", "OPTIONS - Resource 
not found for URL <" << m_xIdentifier->getContentIdentifier() << ">" );
 }
 break;
@@ -3977,4 +3986,27 @@ void Content::getResourceOptions(
 }
 
 
+//static
+bool Content::isResourceAvailable( const css::uno::Reference< 
css::ucb::XCommandEnvironment >& xEnv,
+  const std::unique_ptr< DAVResourceAccess > & 
rResAccess )
+{
+try
+{
+// To check for the physical URL resource availability, using a simple 
HEAD command
+// if HEAD is successfull, set element found.
+std::vector< OUString > aHeaderNames;
+DAVResource resource;
+rResAccess->HEAD( aHeaderNames, resource, xEnv );
+return true;
+}
+catch ( ... )
+{
+// some error... so set as not found
+// retry errors are taken care of
+// in rResAccess function method.
+return false;
+}
+}
+
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.hxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.hxx
index 55a25ae..d213440 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.hxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.hxx
@@ -328,6 +328,9 @@ public:
  DAVOptions& rDAVOptions )
 throw ( css::uno::Exception, std::exception );
 
+static bool isResourceAvailable( const css::uno::Reference< 
css::ucb::XCommandEnvironment >& xEnv,
+ const std::unique_ptr< DAVResourceAccess > & 
rResAccess);
+
 static void removeCachedPropertyNames( const OUString & rURL );
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 4 commits - cui/source libreofficekit/source vcl/unx xmerge/source

2016-08-28 Thread Caolán McNamara
 cui/source/tabpages/tpbitmap.cxx|6 +-
 libreofficekit/source/gtk/lokdocview.cxx|1 +
 vcl/unx/generic/printer/ppdparser.cxx   |1 +
 xmerge/source/bridge/java/XMergeBridge.java |5 -
 4 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 476e7aca0eb3910786a39670f5b8e08c4e60283f
Author: Caolán McNamara 
Date:   Sun Aug 28 11:13:07 2016 +0100

coverity#1326473 Resource leak on an exceptional path

Change-Id: I22edbc104164cfd598cfa52e89a112415e63b2c7

diff --git a/xmerge/source/bridge/java/XMergeBridge.java 
b/xmerge/source/bridge/java/XMergeBridge.java
index 0f04483..156bc5e 100644
--- a/xmerge/source/bridge/java/XMergeBridge.java
+++ b/xmerge/source/bridge/java/XMergeBridge.java
@@ -503,7 +503,10 @@ public class XMergeBridge {
 }
 finally{
 if (newxos != null){
-newxos.flush();
+try {
+newxos.flush();
+} catch (IOException e) {
+}
 newxos.close();
 }
 xis.close();
commit 3ad3365c4f7ba981024a2de7447faa5c73494c18
Author: Caolán McNamara 
Date:   Sun Aug 28 11:09:43 2016 +0100

coverity#1354270 Uninitialized scalar field

Change-Id: I770e02a6f7ef09c50cf93982dd88dfdb1a163bea

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index 3af5d00..694ea62 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -234,6 +234,7 @@ struct LOKDocViewPrivateImpl
 m_bInDragEndHandle(false),
 m_nViewId(0),
 m_nPartId(0),
+m_eDocumentType(LOK_DOCTYPE_OTHER),
 m_nTileSizeTwips(0),
 m_aVisibleArea({0, 0, 0, 0}),
 m_bVisibleAreaSet(false),
commit d17c9392f985a613f2575587e2f580868f20315b
Author: Caolán McNamara 
Date:   Sun Aug 28 11:07:43 2016 +0100

coverity#1371444 Uninitialized scalar field

Change-Id: I3a6c7c4aa688722a318271d5416313baf65db78e

diff --git a/vcl/unx/generic/printer/ppdparser.cxx 
b/vcl/unx/generic/printer/ppdparser.cxx
index e169b83..5f83ff7 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -588,6 +588,7 @@ const PPDParser* PPDParser::getParser( const OUString& 
rFile )
 
 PPDParser::PPDParser( const OUString& rFile ) :
 m_aFile( rFile ),
+m_bColorDevice( false ),
 m_bType42Capable( false ),
 m_nLanguageLevel( 0 ),
 m_aFileEncoding( RTL_TEXTENCODING_MS_1252 ),
commit fe828d3cb10ee7663236b5cc49588bfc07efa890
Author: Caolán McNamara 
Date:   Sun Aug 28 11:04:54 2016 +0100

coverity#1242829 Uninitialized scalar field

Change-Id: Icd847c620610b23e28daa58145bf333b7a9a10a3

diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 9776eda..31e0617 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -92,7 +92,11 @@ SvxBitmapTabPage::SvxBitmapTabPage( vcl::Window* pParent, 
const SfxItemSet& rInA
 
 m_aXFillAttr  ( rInAttrs.GetPool() ),
 m_rXFSet  ( m_aXFillAttr.GetItemSet() ),
-mpView(nullptr)
+mpView(nullptr),
+nFilledWidthPercent(0),
+nFilledHeightPercent(0),
+nZoomedWidthPercent(0),
+nZoomedHeightPercent(0)
 {
 get(m_pBitmapLB,"BITMAP");
 get(m_pBitmapStyleLB, "bitmapstyle");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-28 Thread Jochen Nitschke
 cui/source/dialogs/screenshotannotationdlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bf7a7d6d10d0a8e1c7771c8ae57123a91edb77d7
Author: Jochen Nitschke 
Date:   Sun Aug 28 13:34:15 2016 +0200

loplugin:implicitboolconversion

Change-Id: I6fa51f65e75ca84f746ff5d1c7dcf97a5225d2d2
Reviewed-on: https://gerrit.libreoffice.org/28435
Reviewed-by: Jochen Nitschke 
Tested-by: Jochen Nitschke 

diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx 
b/cui/source/dialogs/screenshotannotationdlg.cxx
index 6016cd0..44542ee 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -198,7 +198,7 @@ ScreenshotAnnotationDlg_Impl::ScreenshotAnnotationDlg_Impl(
 // avoid image scaling, this is needed for images smaller than the
 // minimal dialog size
 const WinBits aWinBits(mpPicture->GetStyle());
-mpPicture->SetStyle(aWinBits & (!WinBits(WB_SCALE)));
+mpPicture->SetStyle(aWinBits & ~WB_SCALE);
 }
 
 // set some test text at VclMultiLineEdit and make read-only - only
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-28 Thread Jochen Nitschke
 cui/source/dialogs/screenshotannotationdlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 854dfdc9446629a0721bab15fbe6c2dcdf689dac
Author: Jochen Nitschke 
Date:   Sun Aug 28 13:46:25 2016 +0200

loplugin:salbool

Change-Id: Icfc96f978a0fd73ceadbe3a4d57b9758e244ff2b
Reviewed-on: https://gerrit.libreoffice.org/28436
Reviewed-by: Jochen Nitschke 
Tested-by: Jochen Nitschke 

diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx 
b/cui/source/dialogs/screenshotannotationdlg.cxx
index 44542ee..84ccf364 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -291,7 +291,7 @@ IMPL_LINK_TYPED(ScreenshotAnnotationDlg_Impl, 
saveButtonHandler, Button*, pButto
 xFilePicker->appendFilter("*.png", "*.png");
 xFilePicker->setCurrentFilter("*.png");
 xFilePicker->setDefaultName(OStringToOUString(aDerivedFileName, 
RTL_TEXTENCODING_UTF8));
-xFilePicker->setMultiSelectionMode(sal_False);
+xFilePicker->setMultiSelectionMode(false);
 
 if (xFilePicker->execute() == ui::dialogs::ExecutableDialogResults::OK)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-28 Thread Henry Castro
 loleaflet/build/deps.js |7 +
 loleaflet/dist/leaflet.css  |   11 +
 loleaflet/src/control/Control.DocumentRepair.js |  141 
 3 files changed, 159 insertions(+)

New commits:
commit fa963528813c5aa11e3192af4bf2dfa97fd3de0b
Author: Henry Castro 
Date:   Sun Aug 28 08:35:00 2016 -0400

loleaflet: add L.Control.DocumentRepair

diff --git a/loleaflet/build/deps.js b/loleaflet/build/deps.js
index 1425ed1..cb83325 100644
--- a/loleaflet/build/deps.js
+++ b/loleaflet/build/deps.js
@@ -288,6 +288,13 @@ var deps = {
desc: 'Metric Input'
},
 
+   ControlDocumentRepair: {
+   src: ['control/Control.js',
+ 'control/Control.DocumentRepair.js'],
+   heading: 'Controls',
+   desc: 'Document Repair'
+   },
+
ControlContextmenu: {
src: ['control/Control.js',
  'control/Control.ContextMenu.js'],
diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css
index f4e8f4e..f3521a4 100644
--- a/loleaflet/dist/leaflet.css
+++ b/loleaflet/dist/leaflet.css
@@ -481,6 +481,17 @@ a.leaflet-control-buttons:hover:first-child {
 .leaflet-popup-content p {
margin: 18px 0;
}
+.leaflet-popup-content tr:hover {
+   background-color: #eee;
+   cursor: pointer;
+   }
+.leaflet-popup-content tbody {
+   display: block;
+   overflow-y: auto;
+   }
+.leaflet-popup-selected {
+   background-color: #eee;
+   }
 .leaflet-popup-tip-container {
margin: 0 auto;
width: 40px;
diff --git a/loleaflet/src/control/Control.DocumentRepair.js 
b/loleaflet/src/control/Control.DocumentRepair.js
new file mode 100644
index 000..98ed4a2
--- /dev/null
+++ b/loleaflet/src/control/Control.DocumentRepair.js
@@ -0,0 +1,141 @@
+/*
+ * L.Control.DocumentRepair.
+ */
+
+L.Control.DocumentRepair = L.Control.extend({
+   options: {
+   position: 'topright'
+   },
+
+   initialize: function (options) {
+   L.setOptions(this, options);
+   },
+
+   onAdd: function (map) {
+   this._initLayout();
+
+   return this._container;
+   },
+
+   _initLayout: function () {
+   this._container = L.DomUtil.create('div', 
'leaflet-control-layers');
+   this._container.style.visibility = 'hidden';
+
+   var closeButton = L.DomUtil.create('a', 
'leaflet-popup-close-button', this._container);
+   closeButton.href = '#close';
+   closeButton.innerHTML = '×';
+   L.DomEvent.on(closeButton, 'click', this._onCloseClick, this);
+
+   var wrapper = L.DomUtil.create('div', 
'leaflet-popup-content-wrapper', this._container);
+   var content = L.DomUtil.create('div', 'leaflet-popup-content', 
wrapper);
+   var labelTitle = document.createElement('span');
+   labelTitle.innerHTML = 'Repair Document';
+   content.appendChild(labelTitle);
+   content.appendChild(document.createElement('br'));
+   content.appendChild(document.createElement('br'));
+   var table = L.DomUtil.create('table', '', content);
+   var tbody = this._tbody = L.DomUtil.create('tbody', '', table);
+   var tr = L.DomUtil.create('tr', '', tbody);
+   var th = L.DomUtil.create('th', '', tr);
+   th.appendChild(document.createTextNode(_('Type')));
+   th = L.DomUtil.create('th', '', tr);
+   th.appendChild(document.createTextNode(_('Index')));
+   th = L.DomUtil.create('th', '', tr);
+   th.appendChild(document.createTextNode(_('Comment')));
+   th = L.DomUtil.create('th', '', tr);
+   th.appendChild(document.createTextNode(_('View ID')));
+   th = L.DomUtil.create('th', '', tr);
+   th.appendChild(document.createTextNode(_('Timestamp')));
+
+   var inputButton = document.createElement('input');
+   inputButton.type = 'button';
+   inputButton.value = _('Jump to state');
+   L.DomEvent.on(inputButton, 'click', this._onJumpClick, this);
+   content.appendChild(document.createElement('br'));
+   content.appendChild(document.createElement('br'));
+   content.appendChild(inputButton);
+   },
+
+   createAction: function (type, index, comment, viewId, dateTime) {
+   var row = L.DomUtil.create('tr', '', this._tbody);
+   var td = L.DomUtil.create('td', '', row);
+   td.appendChild(document.createTextNode(type));
+   td = L.DomUtil.create('td', '', row);
+   td.appendChild(document.createTextNode(index));
+   td = L.DomUtil.create('td', '', row);
+   td.appendChild(document.createTextNode(comment));
+  

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

2016-08-28 Thread Henry Castro
 loolwsd/PrisonerSession.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d36ff0afdab125e72fef23f27b7ed90397e57fb3
Author: Henry Castro 
Date:   Sun Aug 28 08:41:24 2016 -0400

loolwsd: avoid exception, commandName empty

diff --git a/loolwsd/PrisonerSession.cpp b/loolwsd/PrisonerSession.cpp
index 1dc9cbe..ba3c344 100644
--- a/loolwsd/PrisonerSession.cpp
+++ b/loolwsd/PrisonerSession.cpp
@@ -203,7 +203,7 @@ bool PrisonerSession::_handleInput(const char *buffer, int 
length)
 Poco::JSON::Parser parser;
 const auto result = parser.parse(stringJSON);
 const auto& object = result.extract();
-const std::string commandName = 
object->get("commandName").toString();
+const std::string commandName = object->has("commandName") ? 
object->get("commandName").toString() : "";
 if (commandName.find(".uno:CharFontName") != std::string::npos 
||
 commandName.find(".uno:StyleApply") != std::string::npos)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-28 Thread Henry Castro
 loolwsd/ChildSession.cpp |   22 +++---
 1 file changed, 19 insertions(+), 3 deletions(-)

New commits:
commit fa2a99459f2ce65a45585e70b0fc7de3fe708621
Author: Henry Castro 
Date:   Sun Aug 28 08:46:38 2016 -0400

loolwsd: add fake .uno:DocumentRepair

Avoid double round trip requesting command value pair
.uno.Redo, .uno:Undo

diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp
index c186887..b9a2f49 100644
--- a/loolwsd/ChildSession.cpp
+++ b/loolwsd/ChildSession.cpp
@@ -407,6 +407,8 @@ bool ChildSession::getStatus(const char* /*buffer*/, int 
/*length*/)
 
 bool ChildSession::getCommandValues(const char* /*buffer*/, int /*length*/, 
StringTokenizer& tokens)
 {
+bool success;
+char* pValues;
 std::string command;
 if (tokens.count() != 2 || !getTokenString(tokens[1], "command", command))
 {
@@ -419,9 +421,23 @@ bool ChildSession::getCommandValues(const char* 
/*buffer*/, int /*length*/, Stri
 if (_multiView)
 _loKitDocument->setView(_viewId);
 
-char* ptrValues = _loKitDocument->getCommandValues(command.c_str());
-bool success = sendTextFrame("commandvalues: " + std::string(ptrValues));
-std::free(ptrValues);
+if (command == ".uno:DocumentRepair")
+{
+char* pUndo;
+const std::string 
json("{\"commandName\":\".uno:DocumentRepair\",\"Redo\":%s,\"Undo\":%s}");
+pValues = _loKitDocument->getCommandValues(".uno:Redo");
+pUndo = _loKitDocument->getCommandValues(".uno:Undo");
+success = sendTextFrame("commandvalues: " + Poco::format(json, 
std::string(pValues), std::string(pUndo)));
+std::free(pValues);
+std::free(pUndo);
+}
+else
+{
+pValues = _loKitDocument->getCommandValues(command.c_str());
+success = sendTextFrame("commandvalues: " + std::string(pValues));
+std::free(pValues);
+}
+
 return success;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-28 Thread Henry Castro
 loleaflet/dist/images/document-properties.png |binary
 loleaflet/dist/toolbar.css|1 +
 loleaflet/dist/toolbar/toolbar.js |4 
 loleaflet/src/layer/tile/TileLayer.js |   18 +-
 4 files changed, 22 insertions(+), 1 deletion(-)

New commits:
commit ab780acd0a3b503ec6c4333b400fe9a2e9137d88
Author: Henry Castro 
Date:   Sun Aug 28 08:38:54 2016 -0400

loleaflet: add document repair toolbar item

diff --git a/loleaflet/dist/images/document-properties.png 
b/loleaflet/dist/images/document-properties.png
new file mode 100644
index 000..0eadfbf
Binary files /dev/null and b/loleaflet/dist/images/document-properties.png 
differ
diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css
index 13f7f5b..dfb9de3 100644
--- a/loleaflet/dist/toolbar.css
+++ b/loleaflet/dist/toolbar.css
@@ -268,6 +268,7 @@ button.leaflet-control-search-next
 .w2ui-icon.sortascending{ background: 
url('/loleaflet/dist/images/lc_sortascending.png') no-repeat center !important; 
}
 .w2ui-icon.sortdescending{ background: 
url('/loleaflet/dist/images/lc_sortdescending.png') no-repeat center 
!important; }
 .w2ui-icon.selected{ background: url('/loleaflet/dist/images/lc_ok.png') 
no-repeat center !important; }
+.w2ui-icon.repair{ background: 
url('/loleaflet/dist/images/document-properties.png') no-repeat center 
!important; }
 
 .inserttable-pop {
 z-index: 10;
diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index c12d533..8232486 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -103,6 +103,9 @@ function onClick(id, item, subItem) {
map.toggleCommandState(item.uno);
}
}
+   else if (id === 'repair') {
+   map._socket.sendMessage('commandvalues 
command=.uno:DocumentRepair');
+   }
else if (id === 'zoomin' && map.getZoom() < map.getMaxZoom()) {
map.zoomIn(1);
}
@@ -344,6 +347,7 @@ $(function () {
{type: 'break'},
{type: 'button',  id: 'undo',  img: 'undo', hint: 
_('Undo'), uno: 'Undo'},
{type: 'button',  id: 'redo',  img: 'redo', hint: 
_('Redo'), uno: 'Redo'},
+   {type: 'button',  id: 'repair', img: 'repair', hint: 
_('Document repair')},
{type: 'break'},
{type: 'html',   id: 'styles', html: ''},
{type: 'html',   id: 'fonts', html: ''},
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 6c1fe71..d449c74 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -382,7 +382,10 @@ L.TileLayer = L.GridLayer.extend({
 
_onCommandValuesMsg: function (textMsg) {
var obj = JSON.parse(textMsg.substring(textMsg.indexOf('{')));
-   if (obj.commandName === '.uno:CellCursor') {
+   if (obj.commandName == '.uno:DocumentRepair') {
+   this._onDocumentRepair(obj);
+   }
+   else if (obj.commandName === '.uno:CellCursor') {
this._onCellCursorMsg(obj.commandValues);
} else if 
(this._map.unoToolbarCommands.indexOf(obj.commandName) !== -1) {
this._toolbarCommandValues[obj.commandName] = 
obj.commandValues;
@@ -515,6 +518,19 @@ L.TileLayer = L.GridLayer.extend({
this._onUpdateCellCursor(horizontalDirection, 
verticalDirection);
},
 
+   _onDocumentRepair: function (textMsg) {
+   if (!this._docRepair) {
+   this._docRepair = L.control.documentRepair();
+   }
+
+   if (!this._docRepair.isVisible()) {
+   this._docRepair.addTo(this._map);
+   this._docRepair.fillActions(textMsg);
+   this._map.enable(false);
+   this._docRepair.show();
+   }
+   },
+
_onMousePointerMsg: function (textMsg) {
textMsg = textMsg.substring(14); // "mousepointer: "
textMsg = L.Cursor.getCustomCursor(textMsg) || textMsg;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-28 Thread Henry Castro
 loleaflet/src/control/Control.Menubar.js |2 +-
 loleaflet/src/control/Toolbar.js |6 --
 2 files changed, 1 insertion(+), 7 deletions(-)

New commits:
commit f87edc736713550f1c611f193cab4deb1fb13dd6
Author: Henry Castro 
Date:   Sun Aug 28 10:06:00 2016 -0400

loleaflet: update menu repair

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index d10cb5a..88aef52 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -318,7 +318,7 @@ L.Control.Menubar = L.Control.extend({
window.parent.postMessage('rev-history', '*');
}
} else if (id === 'repair') {
-   map.showRepairDialog();
+   map._socket.sendMessage('commandvalues 
command=.uno:DocumentRepair');
}
},
 
diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index bbe3d86..54a1d95 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -230,11 +230,5 @@ L.Map.include({
});
}
});
-   },
-
-   showRepairDialog: function() {
-   vex.open({
-   });
}
-
 });
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Line Spacing Calculations

2016-08-28 Thread Nate Bellowe
Thank you very much, I appreciate this piece of information!


From: Khaled Hosny 
Sent: Saturday, August 27, 2016 12:02:22 PM
To: Nate Bellowe
Cc: libreoffice@lists.freedesktop.org
Subject: Re: Line Spacing Calculations

On Fri, Aug 26, 2016 at 06:14:09PM +, Nate Bellowe wrote:
> - Word is using a different process than we are to calculate the
>   "leading" of a font. We don't parse the font files ourselves,
>   instead rely on libraries to get font sizing information, and
>   perhaps in the "world of font files" I am missing something, and
>   word is parsing the fonts directly and differently.

I have no insight on how Word might be calculating line spacing, but
this would be my first guess. Fonts has 3 different set of parameters
that can affect line height calculations and different applications can
use different parameters:
* sTypoAscender, sTypoDescender, and sTypoLineGap, from OS/2 table[1].
* usWinAscent and usWinDescent, also from OS/2 table.
* Ascender, Ascender and LineGap from hhea table[2].

Ideally applications should use the Typo set, falling back to the hhea
if OS/2 table is missing, but the reality is that many Windows
applications tend to abuse Win set for line spacing, and Mac
applications tend to prefer hhea one.

So for realistic comparison, you need to get the values of those three
sets of parameters and compare Word’s line spacing to them.

Regards,
Khaled

1. https://www.microsoft.com/typography/otspec/os2.htm
2. https://www.microsoft.com/typography/otspec/hhea.htm
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] online.git: Changes to 'private/Ashod/repairactions'

2016-08-28 Thread Ashod Nakashian
New branch 'private/Ashod/repairactions' available with the following commits:
commit 1d91953418f9b4ef8e92dfd6323489cd66132e12
Author: Ashod Nakashian 
Date:   Sun Aug 28 12:25:40 2016 -0400

loolwsd: unittest cleanups

Change-Id: Ic383915012ac1c254960d976cc89d3f7c1a2cb02

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


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

2016-08-28 Thread Maxim Monastirsky
 framework/source/uielement/resourcemenucontroller.cxx  |   30 +
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |2 
 2 files changed, 24 insertions(+), 8 deletions(-)

New commits:
commit 34dad6cf5d68c50746bb387debc89726fad2aa69
Author: Maxim Monastirsky 
Date:   Sun Aug 28 17:03:53 2016 +0300

Silence "non-nillable property without value" warnings

Change-Id: I8135dde19023754dac506334ed576daba68b9365

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 778638d..394b00d 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5704,6 +5704,7 @@
 
   
 
+0
   
   
 
@@ -5728,6 +5729,7 @@
 
   
 
+0
   
   
 
commit 6bf7d1d0f69097b267d348d8d264e9b669f423a0
Author: Maxim Monastirsky 
Date:   Sun Aug 28 20:55:55 2016 +0300

ResourceMenuController: Better error handling

This should stop crashes in framework::MenuBarManager::FillMenu
as seen in crashreport. Unfortunately no idea how to reproduce
those crashes other than corrupting the installation (e.g.
removing files).

Change-Id: Iaed8e888dd74c4c1bb5d6fd7996ecf80f4645b68

diff --git a/framework/source/uielement/resourcemenucontroller.cxx 
b/framework/source/uielement/resourcemenucontroller.cxx
index 47c3f1c..cfb2d83 100644
--- a/framework/source/uielement/resourcemenucontroller.cxx
+++ b/framework/source/uielement/resourcemenucontroller.cxx
@@ -159,14 +159,28 @@ void ResourceMenuController::updatePopupMenu()
 {}
 }
 
-if ( !m_xMenuContainer.is() )
+if ( !m_xMenuContainer.is() && m_xConfigManager.is() )
 {
 try
 {
-if ( m_xConfigManager.is() && m_xConfigManager->hasSettings( 
m_aMenuURL ) )
-m_xMenuContainer.set( m_xConfigManager->getSettings( 
m_aMenuURL, false ) );
-else if ( m_xModuleConfigManager.is() && 
m_xModuleConfigManager->hasSettings( m_aMenuURL ) )
-m_xMenuContainer.set( m_xModuleConfigManager->getSettings( 
m_aMenuURL, false ) );
+m_xMenuContainer.set( m_xConfigManager->getSettings( m_aMenuURL, 
false ) );
+}
+catch ( const css::container::NoSuchElementException& )
+{
+// Not an error - element may exist only in the module.
+}
+catch ( const css::lang::IllegalArgumentException& )
+{
+SAL_WARN( "fwk.uielement", "The given URL is not valid: " << 
m_aMenuURL );
+return;
+}
+}
+
+if ( !m_xMenuContainer.is() && m_xModuleConfigManager.is() )
+{
+try
+{
+m_xMenuContainer.set( m_xModuleConfigManager->getSettings( 
m_aMenuURL, false ) );
 }
 catch ( const css::container::NoSuchElementException& )
 {
@@ -180,6 +194,9 @@ void ResourceMenuController::updatePopupMenu()
 }
 }
 
+if ( !m_xMenuContainer.is() )
+return;
+
 // Clear previous content.
 if ( m_xMenuBarManager.is() )
 {
@@ -245,9 +262,6 @@ void ResourceMenuController::addVerbs( const 
css::uno::Sequence< css::embed::Ver
 
 void ResourceMenuController::fillToolbarData()
 {
-if ( !m_xMenuContainer.is() )
-return;
-
 VCLXMenu* pAwtMenu = VCLXMenu::GetImplementation( m_xPopupMenu );
 Menu* pVCLMenu = pAwtMenu->GetMenu();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/test

2016-08-28 Thread Ashod Nakashian
 loolwsd/test/helpers.hpp|   22 --
 loolwsd/test/httpwstest.cpp |   52 +---
 2 files changed, 41 insertions(+), 33 deletions(-)

New commits:
commit 03921a07696c0abbeada515340f769291e3cf95f
Author: Ashod Nakashian 
Date:   Sun Aug 28 12:25:40 2016 -0400

loolwsd: unittest cleanups

Change-Id: Ic383915012ac1c254960d976cc89d3f7c1a2cb02
Reviewed-on: https://gerrit.libreoffice.org/28440
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/test/helpers.hpp b/loolwsd/test/helpers.hpp
index fd7abef..75bd9d7 100644
--- a/loolwsd/test/helpers.hpp
+++ b/loolwsd/test/helpers.hpp
@@ -82,9 +82,9 @@ std::vector 
readDataFromFile(std::unique_ptr& file)
 }
 
 inline
-void getDocumentPathAndURL(const char* document, std::string& documentPath, 
std::string& documentURL)
+void getDocumentPathAndURL(const std::string& docFilename, std::string& 
documentPath, std::string& documentURL)
 {
-documentPath = Util::getTempFilePath(TDOC, document);
+documentPath = Util::getTempFilePath(TDOC, docFilename);
 documentURL = "lool/ws/file://" + 
Poco::Path(documentPath).makeAbsolute().toString();
 
 std::cerr << "Test file: " << documentPath << std::endl;
@@ -389,6 +389,24 @@ std::shared_ptr 
loadDocAndGetSocket(const Poco::URI& uri,
 }
 
 inline
+std::shared_ptr loadDocAndGetSocket(const std::string& 
docFilename, const Poco::URI& uri, const std::string& name = "", bool isView = 
false)
+{
+try
+{
+std::string documentPath, documentURL;
+getDocumentPathAndURL(docFilename, documentPath, documentURL);
+return loadDocAndGetSocket(uri, documentURL, name, isView);
+}
+catch (const Poco::Exception& exc)
+{
+CPPUNIT_FAIL(exc.displayText());
+}
+
+// Really couldn't reach here, but the compiler doesn't know any better.
+return nullptr;
+}
+
+inline
 void SocketProcessor(const std::string& name,
  const std::shared_ptr& socket,
  std::function handler,
diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp
index 97e391a..423e698 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -1438,11 +1438,9 @@ void HTTPWSTest::testLimitCursor( 
std::functionshutdown();
 std::cerr << "Reloading " << std::endl;
-socket = loadDocAndGetSocket(_uri, documentURL);
+socket = loadDocAndGetSocket(docFilename, _uri, testname);
 
 // Confirm that the text is in the comment and not doc body.
 // Click in the body.
@@ -1520,11 +1518,9 @@ void HTTPWSTest::testInsertAnnotationWriter()
 
 void HTTPWSTest::testEditAnnotationWriter()
 {
-std::string documentPath, documentURL;
-getDocumentPathAndURL("with_comment.odt", documentPath, documentURL);
-Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, 
documentURL);
-
-auto socket = loadDocAndGetSocket(_uri, documentURL);
+const auto testname = "editAnnotationWriter ";
+const std::string docFilename = "with_comment.odt";
+auto socket = loadDocAndGetSocket(docFilename, _uri, testname);
 
 // Click in the body.
 sendTextFrame(socket, "mouse type=buttondown x=1600 y=1600 count=1 
buttons=1 modifier=0");
@@ -1532,7 +1528,7 @@ void HTTPWSTest::testEditAnnotationWriter()
 // Read body text.
 sendTextFrame(socket, "uno .uno:SelectAll");
 sendTextFrame(socket, "gettextselection 
mimetype=text/plain;charset=utf-8");
-auto res = getResponseLine(socket, "textselectioncontent:", 
"insertAnnotationWriter ");
+auto res = getResponseLine(socket, "textselectioncontent:", testname);
 CPPUNIT_ASSERT_EQUAL(std::string("textselectioncontent: Hello world"), 
res);
 
 // Confirm that the comment is intact.
@@ -1540,20 +1536,20 @@ void HTTPWSTest::testEditAnnotationWriter()
 sendTextFrame(socket, "mouse type=buttonup x=13855 y=1893 count=1 
buttons=1 modifier=0");
 sendTextFrame(socket, "uno .uno:SelectAll");
 sendTextFrame(socket, "gettextselection 
mimetype=text/plain;charset=utf-8");
-res = getResponseLine(socket, "textselectioncontent:", 
"insertAnnotationWriter ");
+res = getResponseLine(socket, "textselectioncontent:", testname);
 CPPUNIT_ASSERT_EQUAL(std::string("textselectioncontent: blah blah xyz"), 
res);
 
 // Can we still edit the coment?
 sendTextFrame(socket, "paste mimetype=text/plain;charset=utf-8\nand now 
for something completely different");
 sendTextFrame(socket, "uno .uno:SelectAll");
 sendTextFrame(socket, "gettextselection 
mimetype=text/plain;charset=utf-8");
-res = getResponseLine(socket, "textselectioncontent:", 
"insertAnnotationWriter ");
+res = getResponseLine(socket, "textselectioncontent:", testname);
 CPPUNIT_ASSERT_EQUAL(std::string("textselectioncontent: and now for 
something completely different"), res);
 
 // Close and reopen the same document and test again.
 socket->shutdown();
 std::cer

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

2016-08-28 Thread Arnaud Versini
 basic/source/inc/expr.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a8c5edcea9f58a9295776c2a3f200111a5a749ab
Author: Arnaud Versini 
Date:   Sun Aug 28 15:16:15 2016 +0200

BASIC: Devirtualize SbiExprNode::~SbiExprNode and make SbiExprNode final

Change-Id: I95581265e2cc7befc00e67d42b6516d49c794680
Reviewed-on: https://gerrit.libreoffice.org/28438
Reviewed-by: Arnaud Versini 
Tested-by: Arnaud Versini 

diff --git a/basic/source/inc/expr.hxx b/basic/source/inc/expr.hxx
index 8f17e8b..748d6b2 100644
--- a/basic/source/inc/expr.hxx
+++ b/basic/source/inc/expr.hxx
@@ -87,7 +87,7 @@ enum RecursiveMode
 PREVENT_CALL
 };
 
-class SbiExprNode {  // operators (and operands)
+class SbiExprNode final {   // operators (and operands)
 friend class SbiExpression;
 friend class SbiConstExpression;
 union {
@@ -125,7 +125,7 @@ public:
 SbiExprNode( SbiExprNode*, SbiToken, SbiExprNode* );
 SbiExprNode( SbiExprNode*, sal_uInt16 );// #120061 TypeOf
 SbiExprNode( sal_uInt16 );  // new 
-virtual ~SbiExprNode();
+~SbiExprNode();
 
 bool IsValid()  { return !bError; }
 bool IsConstant()   // true: constant operand
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: schema/odf1.0 schema/odf1.1 schema/odf1.2 schema/odf1.3

2016-08-28 Thread Thorsten Behrens
 schema/odf1.0/OpenDocument-manifest-schema-v1.0-os.rng  |  111 
 schema/odf1.0/OpenDocument-schema-v1.0-os.rng   |17666 +++
 schema/odf1.0/OpenDocument-strict-schema-v1.0-os.rng|   61 
 schema/odf1.1/OpenDocument-manifest-schema-v1.1.rng |  111 
 schema/odf1.1/OpenDocument-schema-v1.1.rng  |17891 +++
 schema/odf1.1/OpenDocument-strict-schema-v1.1.rng   |   61 
 schema/odf1.2/OpenDocument-v1.2-os-dsig-schema.rng  |   84 
 schema/odf1.2/OpenDocument-v1.2-os-manifest-schema.rng  |  224 
 schema/odf1.2/OpenDocument-v1.2-os-metadata.owl |   86 
 schema/odf1.2/OpenDocument-v1.2-os-package-metadata.owl |   81 
 schema/odf1.2/OpenDocument-v1.2-os-schema.rng   |18127 
 schema/odf1.3/OpenDocument-dsig-schema-v1.3.rng |   77 
 schema/odf1.3/OpenDocument-manifest-schema-v1.3.rng |  217 
 schema/odf1.3/OpenDocument-schema-v1.3.rng  |18079 +++
 schema/odf1.3/OpenDocument-v1.3-metadata.owl|   78 
 schema/odf1.3/OpenDocument-v1.3-package-metadata.owl|   75 
 16 files changed, 73029 insertions(+)

New commits:
commit 70152506d968f407fad3a1cb6959c67f99bd59ce
Author: Thorsten Behrens 
Date:   Sun Aug 28 22:21:29 2016 +0200

add ODF schema files to core repo

Source: https://tools.oasis-open.org/version-control/svn/office/

Please no changes to those files, these are the official, blessed,
OASIS-approved standard schemas, in their respective version.

Change-Id: I8538495fe7d9ece0c4e3ad097460a5f41ee7a403

diff --git a/schema/odf1.0/OpenDocument-manifest-schema-v1.0-os.rng 
b/schema/odf1.0/OpenDocument-manifest-schema-v1.0-os.rng
new file mode 100644
index 000..97fe580
--- /dev/null
+++ b/schema/odf1.0/OpenDocument-manifest-schema-v1.0-os.rng
@@ -0,0 +1,111 @@
+
+
+
+http://relaxng.org/ns/structure/1.0";
+
+datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes";
+
+xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/schema/odf1.0/OpenDocument-schema-v1.0-os.rng 
b/schema/odf1.0/OpenDocument-schema-v1.0-os.rng
new file mode 100644
index 000..cf4ee51
--- /dev/null
+++ b/schema/odf1.0/OpenDocument-schema-v1.0-os.rng
@@ -0,0 +1,17666 @@
+
+
+
+http://relaxng.org/ns/structure/1.0";
+xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0";
+
+datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes";
+
+xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
+xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
+xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
+xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
+xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
+xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
+xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
+xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
+xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
+xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
+xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
+xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
+xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
+xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
+
+xmlns:dc="http://purl.org/dc/elements/1.1/";
+xmlns:xlink="http://www.w3.org/1999/xlink";
+xmlns:math="http://www.w3.org/1998/Math/MathML";
+xmlns:xforms="http://www.w3.org/2002/xforms";
+
+xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
+xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
+xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"
+>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

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

2016-08-28 Thread Caolán McNamara
 lotuswordpro/source/filter/lwpcolor.cxx |9 -
 lotuswordpro/source/filter/lwpcolor.hxx |1 -
 2 files changed, 10 deletions(-)

New commits:
commit 0b8d111086efd06ac1b1cc708ad57ff1a51b0c6e
Author: Caolán McNamara 
Date:   Sun Aug 28 21:32:13 2016 +0100

silence coverity#1371316 operator= is equal to default, so unnecessary

Change-Id: I9b301b6f661732ce4f6e9010324aa0a828736b50

diff --git a/lotuswordpro/source/filter/lwpcolor.cxx 
b/lotuswordpro/source/filter/lwpcolor.cxx
index bf76a5a..b475ed3 100644
--- a/lotuswordpro/source/filter/lwpcolor.cxx
+++ b/lotuswordpro/source/filter/lwpcolor.cxx
@@ -137,14 +137,5 @@ void LwpColor::ResolveRGB()
 m_nBlue = 0;
 }
 }
-LwpColor& LwpColor::operator = (const LwpColor& rOther)
-{
-m_nRed = rOther.m_nRed;
-m_nGreen = rOther.m_nGreen;
-m_nBlue = rOther.m_nBlue;
-m_nExtra = rOther.m_nExtra;
-
-return *this;
-}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpcolor.hxx 
b/lotuswordpro/source/filter/lwpcolor.hxx
index 1b07baf..61d7beb 100644
--- a/lotuswordpro/source/filter/lwpcolor.hxx
+++ b/lotuswordpro/source/filter/lwpcolor.hxx
@@ -79,7 +79,6 @@ public:
 sal_uInt16 GetBlue();
 bool IsValidColor();
 sal_uInt32 To24Color();
-LwpColor& operator = (const LwpColor& rOther);
 bool IsTransparent();
 private:
 sal_uInt16 m_nRed;  // When extra is AGLRGB_INDEX, m_nRed holds the
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 4 commits - loolwsd/FileServer.cpp loolwsd/LOOLWSD.cpp loolwsd/LOOLWSD.hpp loolwsd/loolwsd.spec.in loolwsd/loolwsd.xml.in loolwsd/Makefile.am loolwsd/Storage.cpp

2016-08-28 Thread Andras Timar
 loolwsd/FileServer.cpp  |2 +-
 loolwsd/LOOLWSD.cpp |   20 +---
 loolwsd/LOOLWSD.hpp |7 +++
 loolwsd/Makefile.am |2 ++
 loolwsd/Storage.cpp |2 +-
 loolwsd/loolwsd.spec.in |1 +
 loolwsd/loolwsd.xml.in  |1 +
 7 files changed, 26 insertions(+), 9 deletions(-)

New commits:
commit 274d68644d8adf20628e92c3d5e55f9687196adb
Author: Andras Timar 
Date:   Sun Aug 28 23:06:15 2016 +0200

loolwsd: handle HTTP HEAD request for /

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 9bf6916..9a38e9a 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -875,7 +875,7 @@ public:
 bool responded = false;
 try
 {
-if (request.getMethod() == HTTPRequest::HTTP_GET && 
request.getURI() == "/")
+if ((request.getMethod() == HTTPRequest::HTTP_GET || 
request.getMethod() == HTTPRequest::HTTP_HEAD) && request.getURI() == "/")
 {
 std::string mimeType = "text/plain";
 std::string responseString = "OK";
@@ -883,10 +883,13 @@ public:
 response.setContentType(mimeType);
 response.setChunkedTransferEncoding(false);
 std::ostream& ostr = response.send();
-ostr << responseString;
+if (request.getMethod() == HTTPRequest::HTTP_GET)
+{
+ostr << responseString;
+}
 responded = true;
 }
-if (request.getMethod() == HTTPRequest::HTTP_GET && 
request.getURI() == "/favicon.ico")
+else if (request.getMethod() == HTTPRequest::HTTP_GET && 
request.getURI() == "/favicon.ico")
 {
 std::string mimeType = "image/vnd.microsoft.icon";
 std::string faviconPath = 
Path(Application::instance().commandPath()).parent().toString() + "favicon.ico";
@@ -898,7 +901,7 @@ public:
 response.sendFile(faviconPath, mimeType);
 responded = true;
 }
-if (request.getMethod() == HTTPRequest::HTTP_GET && 
request.getURI() == "/hosting/discovery")
+else if (request.getMethod() == HTTPRequest::HTTP_GET && 
request.getURI() == "/hosting/discovery")
 {
 // http://server/hosting/discovery
 responded = handleGetWOPIDiscovery(request, response);
@@ -1200,7 +1203,6 @@ public:
 logger << Log::end;
 
 // Routing
-// FIXME: Some browsers (all?) hit for /favicon.ico. Create a nice 
favicon and add to routes
 Poco::URI requestUri(request.getURI());
 std::vector reqPathSegs;
 requestUri.getPathSegments(reqPathSegs);
commit 1403a7999a1405ba6adf9b9325b62e07c8119692
Author: Andras Timar 
Date:   Sun Aug 28 21:49:43 2016 +0200

loolwsd: add loolstress to rpm

diff --git a/loolwsd/loolwsd.spec.in b/loolwsd/loolwsd.spec.in
index f444cce..6cb7970 100644
--- a/loolwsd/loolwsd.spec.in
+++ b/loolwsd/loolwsd.spec.in
@@ -101,6 +101,7 @@ tar cf - . | (cd %{buildroot}/usr/share/loolwsd/loleaflet 
&& tar xf -)
 /usr/bin/loolmap
 /usr/bin/loolforkit
 /usr/bin/loolmount
+/usr/bin/loolstress
 /usr/bin/looltool
 /usr/share/loolwsd/discovery.xml
 /usr/share/loolwsd/favicon.ico
commit 05a7101789ed8e4d46e7738de1ef3f398edb642e
Author: Andras Timar 
Date:   Sun Aug 28 21:48:47 2016 +0200

loolwsd: add missing headers to dist

diff --git a/loolwsd/Makefile.am b/loolwsd/Makefile.am
index ef8c794..4a3ee81 100644
--- a/loolwsd/Makefile.am
+++ b/loolwsd/Makefile.am
@@ -106,6 +106,8 @@ noinst_HEADERS = Admin.hpp \
  Rectangle.hpp \
  Storage.hpp \
  TileCache.hpp \
+ TileDesc.hpp \
+ TraceFile.hpp \
  Unit.hpp \
  UnitHTTP.hpp \
  UserMessages.hpp \
commit b0619d387b88d439376852e06ccc49e41841a981
Author: Andras Timar 
Date:   Sun Aug 28 21:41:28 2016 +0200

loolwsd: add support of SSL termination

diff --git a/loolwsd/FileServer.cpp b/loolwsd/FileServer.cpp
index a18ee17..9cce160 100644
--- a/loolwsd/FileServer.cpp
+++ b/loolwsd/FileServer.cpp
@@ -209,7 +209,7 @@ void 
FileServerRequestHandler::preprocessFile(HTTPServerRequest& request, HTTPSe
 {
 HTMLForm form(request, request.stream());
 
-const auto host = (LOOLWSD::isSSLEnabled() ? "wss://" : "ws://") + 
(LOOLWSD::ServerName.empty() ? request.getHost() : LOOLWSD::ServerName);
+const auto host = ((LOOLWSD::isSSLEnabled() || LOOLWSD::isSSLTermination) 
? "wss://" : "ws://") + (LOOLWSD::ServerName.empty() ? request.getHost() : 
LOOLWSD::ServerName);
 const auto path = Poco::Path(LOOLWSD::FileServerRoot, 
getRequestPathname(request));
 Log::debug("Preprocessing file: " + path.toString());
 
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 3793624..9bf6916 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -804,7 +804,7 @@ private:

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - external_deps.lst libxml2/libxml2-c99.patch libxml2/libxml2-configure.patch libxml2/libxml2-long-path.patch libxml2/makefile.mk

2016-08-28 Thread Don Lewis
 external_deps.lst   |4 +--
 libxml2/libxml2-c99.patch   |   48 
 libxml2/libxml2-configure.patch |   12 +-
 libxml2/libxml2-long-path.patch |4 +--
 libxml2/makefile.mk |7 +++--
 5 files changed, 62 insertions(+), 13 deletions(-)

New commits:
commit a8ee4f315bbd286c6efcc271e4289c4abb220a77
Author: Don Lewis 
Date:   Sun Aug 28 20:42:46 2016 +

Upgrade bundled libxml2 from version 2.9.3 to version 2.9.4 to fix:

CVE-2016-1762
CVE-2016-1833
CVE-2016-1834
CVE-2016-1835
CVE-2016-1836
CVE-2016-1837
CVE-2016-1838
CVE-2016-1839
CVE-2016-1840
CVE-2016-3627
CVE-2016-3705
CVE-2016-4449
CVE-2016-4483
It is not known whether any of these affect OpenOffice.

Import a post-2.9.4 patch from the upstream git repo to fix a build
problem on systems with pre-C99 compilers.

diff --git a/external_deps.lst b/external_deps.lst
index 2c7e376..bfbaaf1 100644
--- a/external_deps.lst
+++ b/external_deps.lst
@@ -174,8 +174,8 @@ if ( true )
 URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
 
 if (SYSTEM_LIBXML != YES)
-MD5 = daece17e045f1c107610e137ab50c179
-name = libxml2-2.9.3.tar.gz
+MD5 = ae249165c173b1ff386ee8ad676815f5
+name = libxml2-2.9.4.tar.gz
 URL1 = http://xmlsoft.org/sources/$(name)
 URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
 
diff --git a/libxml2/libxml2-c99.patch b/libxml2/libxml2-c99.patch
new file mode 100644
index 000..7ce8f80
--- /dev/null
+++ b/libxml2/libxml2-c99.patch
@@ -0,0 +1,48 @@
+From d77e5fc4bcdb7da748c9cca116a601ae4df60d21 Mon Sep 17 00:00:00 2001
+From: Chun-wei Fan 
+Date: Tue, 31 May 2016 21:04:50 +0800
+Subject: relaxng.c, xmlschemas.c: Fix build on pre-C99 compilers
+
+Make sure that the variables are declared at the top of the block.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=767063
+ ---
+ relaxng.c| 3 ++-
+ xmlschemas.c | 2 +-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/relaxng.c b/relaxng.c
+index 56a3344..3d3e69c 100644
+diff -ur misc/libxml2-2.9.4/relaxng.c misc/build/libxml2-2.9.4/relaxng.c
+--- misc/libxml2-2.9.4/relaxng.c   2016-05-23 00:25:25.0 -0700
 misc/build/libxml2-2.9.4/relaxng.c 2016-08-28 00:37:26.017097000 -0700
+@@ -2088,6 +2088,7 @@
+  const xmlChar * arg2)
+ {
+ char msg[1000];
++xmlChar *result;
+ 
+ if (arg1 == NULL)
+ arg1 = BAD_CAST "";
+@@ -2215,7 +2216,7 @@
+ snprintf(msg, 1000, "Unknown error code %d\n", err);
+ }
+ msg[1000 - 1] = 0;
+-xmlChar *result = xmlCharStrdup(msg);
++result = xmlCharStrdup(msg);
+ return (xmlEscapeFormatString(&result));
+ }
+ 
+diff -ur misc/libxml2-2.9.4/xmlschemas.c misc/build/libxml2-2.9.4/xmlschemas.c
+--- misc/libxml2-2.9.4/xmlschemas.c2016-05-23 00:25:25.0 -0700
 misc/build/libxml2-2.9.4/xmlschemas.c  2016-08-28 00:37:26.025519000 
-0700
+@@ -3168,8 +3168,8 @@
+   "valid.");
+   }
+   if (expected) {
+-  msg = xmlStrcat(msg, BAD_CAST " Expected is '");
+   xmlChar *expectedEscaped = xmlCharStrdup(expected);
++  msg = xmlStrcat(msg, BAD_CAST " Expected is '");
+   msg = xmlStrcat(msg, xmlEscapeFormatString(&expectedEscaped));
+   FREE_AND_NULL(expectedEscaped);
+   msg = xmlStrcat(msg, BAD_CAST "'.\n");
diff --git a/libxml2/libxml2-configure.patch b/libxml2/libxml2-configure.patch
index 8d5437f..bc5bea2 100644
--- a/libxml2/libxml2-configure.patch
+++ b/libxml2/libxml2-configure.patch
@@ -1,6 +1,6 @@
-diff -ur misc/libxml2-2.9.3/include/libxml/xmlversion.h 
misc/build/libxml2-2.9.3/include/libxml/xmlversion.h
 misc/libxml2-2.9.3/include/libxml/xmlversion.h 2015-11-20 
01:49:39.0 -0800
-+++ misc/build/libxml2-2.9.3/include/libxml/xmlversion.h   2016-03-26 
09:46:21.124032000 -0700
+diff -ur misc/libxml2-2.9.4/include/libxml/xmlversion.h 
misc/build/libxml2-2.9.4/include/libxml/xmlversion.h
+--- misc/libxml2-2.9.4/include/libxml/xmlversion.h 2015-11-20 
01:49:39.0 -0800
 misc/build/libxml2-2.9.4/include/libxml/xmlversion.h   2016-03-26 
09:46:21.124032000 -0700
 @@ -273,7 +273,7 @@
   *
   * Whether iconv support is available
@@ -19,9 +19,9 @@ diff -ur misc/libxml2-2.9.3/include/libxml/xmlversion.h 
misc/build/libxml2-2.9.3
  #define LIBXML_DEBUG_ENABLED
  #endif
  
-diff -ur misc/libxml2-2.9.3/xml2-config.in 
misc/build/libxml2-2.9.3/xml2-config.in
 misc/libxml2-2.9.3/xml2-config.in  2015-05-06 05:04:36.0 -0700
-+++ misc/build/libxml2-2.9.3/xml2-config.in2016-03-26 10:00:17.756184000 
-0700
+diff -ur misc/libxml2-2.9.4/xml2-config.in 
misc/build/libxml2-2.9.4/xml2-config.in
+--- misc/libxml2-2.9.4/xml2-config.in  2015-05-06 05:04:36.0 -0700
 misc/build/libxml2-2.9.4/xml2-config.in2016-03-26 10:00:17.756184000 
-0700
 @@ -1,9 +1,14 @@
  #! /bin/sh
  
diff --git a/libxml2/libxml2-long-path.pat

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

2016-08-28 Thread Ashod Nakashian
 loleaflet/src/control/Control.DocumentRepair.js |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f3ca27e5129a024e9c1cf0e9092ef358eca02394
Author: Ashod Nakashian 
Date:   Sun Aug 28 14:41:34 2016 -0400

loleaflet: double-click on repair entry to jump to state

Change-Id: I19dc530df0e36b83b6e19922a1a32d495324c3a8
Reviewed-on: https://gerrit.libreoffice.org/28443
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loleaflet/src/control/Control.DocumentRepair.js 
b/loleaflet/src/control/Control.DocumentRepair.js
index 98ed4a2..36fbc53 100644
--- a/loleaflet/src/control/Control.DocumentRepair.js
+++ b/loleaflet/src/control/Control.DocumentRepair.js
@@ -69,6 +69,7 @@ L.Control.DocumentRepair = L.Control.extend({
td = L.DomUtil.create('td', '', row);
td.appendChild(document.createTextNode(dateTime));
L.DomEvent.on(row, 'click', this._onRowClick, this);
+   L.DomEvent.on(row, 'dblclick', this._onJumpClick, this);
},
 
fillAction: function (actions, type) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - fileaccess/inc fileaccess/Library_fileacc.mk fileaccess/Makefile fileaccess/Module_fileaccess.mk fileaccess/prj fileaccess/source fileaccess/util p

2016-08-28 Thread Damjan Jovanovic
 Repository.mk  |1 
 fileaccess/Library_fileacc.mk  |   57 +
 fileaccess/Makefile|   32 ++
 fileaccess/Module_fileaccess.mk|   30 +
 fileaccess/inc/fileaccess/dllapi.h |   36 
 fileaccess/prj/build.lst   |3 -
 fileaccess/prj/d.lst   |6 ---
 fileaccess/prj/makefile.mk |   44 +
 fileaccess/source/FileAccess.cxx   |6 ++-
 fileaccess/source/fileacc.component|   30 -
 fileaccess/util/fileacc.component  |   30 +
 postprocess/packcomponents/makefile.mk |2 -
 12 files changed, 236 insertions(+), 41 deletions(-)

New commits:
commit 9b3e00b30c23151aa1cdfc97b7ec935cbcb4d7e2
Author: Damjan Jovanovic 
Date:   Mon Aug 29 00:32:41 2016 +

Port main/fileaccess to gbuild.

Patch by: me

diff --git a/Repository.mk b/Repository.mk
index 0765379..fd3e491 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -61,6 +61,7 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
 svgio \
 editeng \
 file \
+fileacc \
 for \
 forui \
 fwe \
diff --git a/fileaccess/Library_fileacc.mk b/fileaccess/Library_fileacc.mk
new file mode 100644
index 000..4faadc9
--- /dev/null
+++ b/fileaccess/Library_fileacc.mk
@@ -0,0 +1,57 @@
+#**
+#  
+#  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
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**
+
+
+
+$(eval $(call gb_Library_Library,fileacc))
+
+$(eval $(call gb_Library_set_componentfile,fileacc,fileaccess/util/fileacc))
+
+$(eval $(call gb_Library_set_include,fileacc,\
+$$(INCLUDE) \
+-I$(SRCDIR)/fileaccess/inc \
+))
+
+$(eval $(call gb_Library_add_defs,fileacc,\
+   -DFILEACCESS_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_add_api,fileacc,\
+   offapi \
+   udkapi \
+))
+
+$(eval $(call gb_Library_add_linked_libs,fileacc,\
+   utl \
+   tl \
+   ucbhelper \
+   cppuhelper \
+   cppu \
+   sal \
+   $(gb_STDLIBS) \
+))
+
+
+$(eval $(call gb_Library_add_exception_objects,fileacc,\
+   fileaccess/source/FileAccess \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/fileaccess/Makefile b/fileaccess/Makefile
new file mode 100644
index 000..c1d144c
--- /dev/null
+++ b/fileaccess/Makefile
@@ -0,0 +1,32 @@
+#**
+#  
+#  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
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath 
$(firstword $(MAKEFILE_LIST/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/fileaccess/Module_fileaccess.mk b/fileaccess/Module_fileaccess.mk
new file mode 100644
index 000..34d7cd4
--- /dev/null
+++ b/fileaccess/Module_fileaccess.mk
@@ -0,0 +1,30 @@
+#**
+#  
+#  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

[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit cbc9410d3a683b0e7725c86c98412cb0ace358f6
Author: Olivier Hallot 
Date:   Sun Aug 21 12:35:47 2016 -0300

Updated core
Project: help  32e04637f0cdf7f44b17c83fb78f66752430ab41

tdf#80652 Help file for CMIS remote servers

Also
* User guide for using remote files
* Check-in, check-out
* Setting up a remote file service

Linguistics/typos and overall contents accuracy fixes welcome.

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

diff --git a/helpcontent2 b/helpcontent2
index c375894..32e0463 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit c375894037bb4da57fe7defc45b88d8c0c989dd8
+Subproject commit 32e04637f0cdf7f44b17c83fb78f66752430ab41
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-28 Thread Olivier Hallot
 AllLangHelp_shared.mk|2 
 source/text/shared/00/0002.xhp   |  238 ---
 source/text/shared/01/0102.xhp   |  214 -
 source/text/shared/guide/cmis-remote-files-setup.xhp |  215 +
 source/text/shared/guide/cmis-remote-files.xhp   |  135 ++
 source/text/shared/guide/doc_open.xhp|   20 +
 source/text/shared/guide/main.xhp|2 
 7 files changed, 632 insertions(+), 194 deletions(-)

New commits:
commit 32e04637f0cdf7f44b17c83fb78f66752430ab41
Author: Olivier Hallot 
Date:   Sun Aug 21 12:35:47 2016 -0300

tdf#80652 Help file for CMIS remote servers

Also
* User guide for using remote files
* Check-in, check-out
* Setting up a remote file service

Linguistics/typos and overall contents accuracy fixes welcome.

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

diff --git a/AllLangHelp_shared.mk b/AllLangHelp_shared.mk
index dfea564..64d1019 100644
--- a/AllLangHelp_shared.mk
+++ b/AllLangHelp_shared.mk
@@ -708,6 +708,8 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\
 helpcontent2/source/text/shared/guide/chart_insert \
 helpcontent2/source/text/shared/guide/chart_legend \
 helpcontent2/source/text/shared/guide/chart_title \
+helpcontent2/source/text/shared/guide/cmis-remote-files \
+helpcontent2/source/text/shared/guide/cmis-remote-files-setup \
 helpcontent2/source/text/shared/guide/collab \
 helpcontent2/source/text/shared/guide/configure_overview \
 helpcontent2/source/text/shared/guide/contextmenu \
diff --git a/source/text/shared/00/0002.xhp 
b/source/text/shared/00/0002.xhp
index 3b2b98b..0ee9c2e 100644
--- a/source/text/shared/00/0002.xhp
+++ b/source/text/shared/00/0002.xhp
@@ -1,7 +1,5 @@
 
-
-
-
+
 
-
+-->
 
-   
 
-
-Glossary of Internet Terms
-/text/shared/00/0002.xhp
-
+  
+Glossary of Internet Terms
+/text/shared/00/0002.xhp
+  
 
+
 
+
+
 
-Internet glossary
-common terms;Internet glossary
-glossaries;Internet terms
-terminology;Internet glossary
-mw changed "Internet...".Glossary of Internet Terms
-If you are a newcomer to the Internet, you will be confronted with 
unfamiliar terms: browser, bookmark, e-mail, homepage, search engine, and many 
others. To make your first steps easier, this glossary explains some of the 
more important terminology you may find in the Internet, intranet, mail and 
news.
+
+  Internet glossary
+  common terms;Internet glossary
+  glossaries;Internet terms
+  terminology;Internet glossary
+
+mw changed "Internet...".
+
+Glossary 
of Internet Terms
+If you are a 
newcomer to the Internet, you will be confronted with unfamiliar terms: 
browser, bookmark, e-mail, homepage, search engine, and many others. To make 
your first steps easier, this glossary explains some of the more important 
terminology you may find in the Internet, intranet, mail and news.
 
 
+
+
+
+CMIS
+The 
Content Management Interoperability Services (CMIS) standard defines a domain 
model and Web Services and Restful AtomPub bindings that will enable greater 
interoperability of Enterprise Content Management (ECM) systems. CMIS uses Web 
services and Web 2.0 interfaces to enable rich information to be shared across 
Internet protocols in vendor-neutral formats, among document systems, 
publishers and repositories, within one enterprise and between 
companies.
+
+
+
+
+WebDAV
+Short for Web-based Distributed Authoring and Versioning, an 
IETF standard set of platform-independent extensions to HTTP that allows users 
to collaboratively edit and manage files on remote Web servers. WebDAV features 
XML properties on metadata, locking - which prevents authors from overwriting 
each other's changes - namespace manipulation and remote file management. 
WebDav is sometimes referred to as DAV.
+
+
 
-Frames
-Frames are useful for designing the layout of HTML pages. 
$[officename] uses floating frames into which you can place objects such as 
graphics, movie files and sound. The context menu of a frame shows the options 
for restoring or editing frame contents. Some of these commands are also listed 
in Edit - Object when the frame is selected.
+
+Frames
+Frames are 
useful for designing the layout of HTML pages. 
$[officename] uses floating frames into which you can place objects such as 
graphics, movie files and sound. The context menu of a frame shows the options 
for restoring or editing frame contents. Some of these commands are also listed 
in Edit - Object when the frame is selected.
 
+
 
-FTP
-FTP stands for File Transfer Protocol and is the standard transfer 
protocol for files in the Internet. An FTP server is a program on a computer 
connected to the Internet which stores files to be transm

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

2016-08-28 Thread Pranav Kant
 loolwsd/FileServer.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 06b869bb63f1b70e96603cd40d2911cc4b687e45
Author: Pranav Kant 
Date:   Mon Aug 29 10:53:37 2016 +0530

loolwsd: -Werror,-Wpointer-bool-conversion

isSSLTermination() was added in b0619d387b88d439376852e06ccc49e41841a981

Change-Id: I63a702023b6a096154b510653bed885331e8e22d

diff --git a/loolwsd/FileServer.cpp b/loolwsd/FileServer.cpp
index 9cce160..d56824f 100644
--- a/loolwsd/FileServer.cpp
+++ b/loolwsd/FileServer.cpp
@@ -209,7 +209,7 @@ void 
FileServerRequestHandler::preprocessFile(HTTPServerRequest& request, HTTPSe
 {
 HTMLForm form(request, request.stream());
 
-const auto host = ((LOOLWSD::isSSLEnabled() || LOOLWSD::isSSLTermination) 
? "wss://" : "ws://") + (LOOLWSD::ServerName.empty() ? request.getHost() : 
LOOLWSD::ServerName);
+const auto host = ((LOOLWSD::isSSLEnabled() || 
LOOLWSD::isSSLTermination()) ? "wss://" : "ws://") + 
(LOOLWSD::ServerName.empty() ? request.getHost() : LOOLWSD::ServerName);
 const auto path = Poco::Path(LOOLWSD::FileServerRoot, 
getRequestPathname(request));
 Log::debug("Preprocessing file: " + path.toString());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-28 Thread Stephan Bergmann
 cui/source/dialogs/screenshotannotationdlg.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 31714a78eba0fc1cfa3c1a9e0456c2c7ee4edf77
Author: Stephan Bergmann 
Date:   Mon Aug 29 07:48:10 2016 +0200

loplugin:unreffun

Change-Id: If65f8ef5accad8d6317b07938ec97c7b129763b5

diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx 
b/cui/source/dialogs/screenshotannotationdlg.cxx
index 84ccf364..ccd003f 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -51,11 +51,6 @@ public:
 {
 }
 
-const vcl::Window& getControl() const
-{
-return mrControl;
-}
-
 const basegfx::B2IRange& getB2IRange() const
 {
 return maB2IRange;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-28 Thread Arnaud Versini
 basic/inc/sbprop.hxx  |2 +-
 basic/source/inc/sbjsmeth.hxx |2 +-
 basic/source/inc/sbjsmod.hxx  |2 +-
 basic/source/sbx/sbxbase.cxx  |2 +-
 include/basic/sbmeth.hxx  |2 +-
 include/basic/sbmod.hxx   |2 +-
 include/basic/sbstar.hxx  |2 +-
 include/basic/sbx.hxx |8 
 include/basic/sbxcore.hxx |4 +---
 include/basic/sbxmeth.hxx |2 +-
 include/basic/sbxobj.hxx  |2 +-
 include/basic/sbxprop.hxx |2 +-
 include/basic/sbxvar.hxx  |4 ++--
 13 files changed, 17 insertions(+), 19 deletions(-)

New commits:
commit 301279ea15f0310367598300f884062333628767
Author: Arnaud Versini 
Date:   Sun Aug 28 11:52:53 2016 +0200

BASIC : Remove useless SbxBase::GetCreator

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

diff --git a/basic/inc/sbprop.hxx b/basic/inc/sbprop.hxx
index fbeb138..2d44180 100644
--- a/basic/inc/sbprop.hxx
+++ b/basic/inc/sbprop.hxx
@@ -35,7 +35,7 @@ class BASIC_DLLPUBLIC SbProperty : public SbxProperty
 BASIC_DLLPRIVATE SbProperty( const OUString&, SbxDataType, SbModule* );
 virtual ~SbProperty();
 public:
-SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICPROP,1);
+SBX_DECL_PERSIST_NODATA(SBXID_BASICPROP,1);
 SbModule* GetModule() { return pMod; }
 };
 
diff --git a/basic/source/inc/sbjsmeth.hxx b/basic/source/inc/sbjsmeth.hxx
index ffd6c1e..c33f47d 100644
--- a/basic/source/inc/sbjsmeth.hxx
+++ b/basic/source/inc/sbjsmeth.hxx
@@ -33,7 +33,7 @@ public:
 SbJScriptMethod( const OUString&, SbxDataType, SbModule* );
 virtual ~SbJScriptMethod();
 
-SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_JSCRIPTMETH,2);
+SBX_DECL_PERSIST_NODATA(SBXID_JSCRIPTMETH,2);
 };
 
 
diff --git a/basic/source/inc/sbjsmod.hxx b/basic/source/inc/sbjsmod.hxx
index 9fa77e0..a29d570 100644
--- a/basic/source/inc/sbjsmod.hxx
+++ b/basic/source/inc/sbjsmod.hxx
@@ -31,7 +31,7 @@ class SbJScriptModule : public SbModule
 virtual bool LoadData( SvStream&, sal_uInt16 ) override;
 virtual bool StoreData( SvStream& ) const override;
 public:
-SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_JSCRIPTMOD,1);
+SBX_DECL_PERSIST_NODATA(SBXID_JSCRIPTMOD,1);
 SbJScriptModule( const OUString& );   // hand through
 };
 
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 7ff452d..c5e1162 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -243,7 +243,7 @@ bool SbxBase::Store( SvStream& rStrm )
 {
 if( ( nFlags & SbxFlagBits::DontStore ) == SbxFlagBits::NONE )
 {
-rStrm.WriteUInt32( GetCreator() )
+rStrm.WriteUInt32( SBXCR_SBX )
  .WriteUInt16( GetSbxId() )
  .WriteUInt16( static_cast(GetFlags()) )
  .WriteUInt16( GetVersion() );
diff --git a/include/basic/sbmeth.hxx b/include/basic/sbmeth.hxx
index 7919980..a49bcf2 100644
--- a/include/basic/sbmeth.hxx
+++ b/include/basic/sbmeth.hxx
@@ -51,7 +51,7 @@ class BASIC_DLLPUBLIC SbMethod : public SbxMethod
 virtual ~SbMethod();
 
 public:
-SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMETHOD,2);
+SBX_DECL_PERSIST_NODATA(SBXID_BASICMETHOD,2);
 virtual SbxInfo* GetInfo() override;
 SbxArray*  GetStatics();
 void   ClearStatics();
diff --git a/include/basic/sbmod.hxx b/include/basic/sbmod.hxx
index 03d6fb2..ca6f57f 100644
--- a/include/basic/sbmod.hxx
+++ b/include/basic/sbmod.hxx
@@ -94,7 +94,7 @@ protected:
 void handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rHint 
);
 virtual ~SbModule();
 public:
-SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMOD,2);
+SBX_DECL_PERSIST_NODATA(SBXID_BASICMOD,2);
 SbModule( const OUString&, bool bCompat = false );
 virtual voidSetParent( SbxObject* ) override;
 virtual voidClear() override;
diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx
index 47f21bc..3ec0693 100644
--- a/include/basic/sbstar.hxx
+++ b/include/basic/sbstar.hxx
@@ -85,7 +85,7 @@ protected:
 
 public:
 
-SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASIC,1);
+SBX_DECL_PERSIST_NODATA(SBXID_BASIC,1);
 
 StarBASIC( StarBASIC* pParent = nullptr, bool bIsDocBasic = false );
 
diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx
index 59b95aa..ac0f80b 100644
--- a/include/basic/sbx.hxx
+++ b/include/basic/sbx.hxx
@@ -133,7 +133,7 @@ protected:
 virtual bool StoreData( SvStream& ) const override;
 
 public:
-SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_ARRAY,1);
+SBX_DECL_PERSIST_NODATA(SBXID_ARRAY,1);
 SbxArray( SbxDataType=SbxVARIANT );
 SbxArray( const SbxArray& );
 SbxArray& operator=( const SbxArray& );
@@ -180,7 +180,7 @@ protected:
 virtual bool StoreData( SvStream& ) const override;
 virtual ~SbxDimArray();
 public:
-SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_DIMARRAY,1);

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

2016-08-28 Thread Mohammed Abdul Azeem
 include/xmloff/xmlimp.hxx  |2 
 include/xmloff/xmltkmap.hxx|   11 +--
 xmloff/source/core/xmltkmap.cxx|   95 +
 xmloff/source/style/GradientStyle.cxx  |4 -
 xmloff/source/style/HatchStyle.cxx |4 -
 xmloff/source/style/TransGradientStyle.cxx |4 -
 xmloff/source/token/tokens.txt |2 
 7 files changed, 62 insertions(+), 60 deletions(-)

New commits:
commit 41b3fd8ca54eff7e71c69bb0b60e63016f1ac8c2
Author: Mohammed Abdul Azeem 
Date:   Fri Aug 26 23:32:23 2016 +0530

Make SvXMLTokenMap compatible with FastTokens:

Added seperate map for fastToken and Token, to get
token using only fastToken. Default values are derived
for fastTokens from prefixKey and localName. Duplicate/
dummy tokens need to be overidden with different values.

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

diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index a1152c4..c673dfc 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -61,6 +61,8 @@
 #include 
 #include 
 
+#define NAMESPACE_TOKEN( prefixToken ) ( ( prefixToken + 1 ) << NMSP_SHIFT )
+
 const size_t NMSP_SHIFT = 16;
 const sal_Int32 TOKEN_MASK = 0x;
 const sal_Int32 NMSP_MASK = 0x;
diff --git a/include/xmloff/xmltkmap.hxx b/include/xmloff/xmltkmap.hxx
index c54d801..2953dac 100644
--- a/include/xmloff/xmltkmap.hxx
+++ b/include/xmloff/xmltkmap.hxx
@@ -28,7 +28,6 @@
 
 
 class SvXMLTokenMap_Impl;
-class SvXMLTokenMapEntry_Impl;
 
 #define XML_TOK_UNKNOWN 0xU
 #define XML_TOKEN_MAP_END { 0xU, xmloff::token::XML_TOKEN_INVALID, 0U, 0 }
@@ -41,19 +40,21 @@ struct SvXMLTokenMapEntry
 sal_Int32 nFastToken;
 
 SvXMLTokenMapEntry( sal_uInt16 nPrefix, xmloff::token::XMLTokenEnum eName,
-sal_uInt16 nTok = XML_TOK_UNKNOWN, sal_Int32 nFastTok 
= 0 ) :
+sal_uInt16 nTok, sal_Int32 nFastTok = 0 ) :
 nPrefixKey( nPrefix ),
 eLocalName( eName ),
 nToken( nTok ),
-nFastToken( nFastTok )
-{}
+nFastToken( ( nPrefixKey + 1 ) << 16 | eLocalName )
+{
+if ( nFastTok ) // alternative value for duplicate/dummy tokens
+nFastToken = nFastTok;
+}
 };
 
 class XMLOFF_DLLPUBLIC SvXMLTokenMap
 {
 private:
 std::unique_ptr  m_pImpl;
-sal_uInt16 Get( const SvXMLTokenMapEntry_Impl& rEntry ) const;
 
 public:
 
diff --git a/xmloff/source/core/xmltkmap.cxx b/xmloff/source/core/xmltkmap.cxx
index 6888b62..1aca389 100644
--- a/xmloff/source/core/xmltkmap.cxx
+++ b/xmloff/source/core/xmltkmap.cxx
@@ -21,52 +21,63 @@
 #include 
 #include 
 
-#include 
+#include 
+#include 
 
 using namespace ::xmloff::token;
 
-class SvXMLTokenMapEntry_Impl
+class SvXMLTokenMap_Impl
 {
-sal_uInt16  nPrefixKey;
-OUStringsLocalName;
-sal_uInt16  nToken;
-sal_Int32   nFastToken;
+private:
+struct PairHash
+{
+std::size_t operator()(const std::pair &pair) 
const
+{
+return static_cast( pair.first | 
pair.second.hashCode() );
+}
+};
+std::unordered_map< std::pair,
+sal_uInt16, PairHash> m_aPrefixAndNameToTokenMap;
+std::unordered_map< sal_Int32, sal_uInt16> m_aFastTokenToTokenMap;
 
 public:
+void insert( const SvXMLTokenMapEntry& rEntry );
+sal_uInt16 get( sal_uInt16 nKeyPrefix, const OUString& rLName ) const;
+sal_uInt16 get( sal_Int32 nFastTok ) const;
+};
 
-sal_uInt16 GetToken() const { return nToken; }
-
-SvXMLTokenMapEntry_Impl( sal_uInt16 nPrefix, const OUString& rLName,
- sal_uInt16 nTok = XML_TOK_UNKNOWN, sal_Int32 
nFastTok = 0 ) :
-nPrefixKey( nPrefix ),
-sLocalName( rLName  ),
-nToken( nTok ),
-nFastToken( nFastTok )
-{}
-
-explicit SvXMLTokenMapEntry_Impl( const SvXMLTokenMapEntry& rEntry ) :
-nPrefixKey( rEntry.nPrefixKey ),
-sLocalName( GetXMLToken( rEntry.eLocalName ) ),
-nToken( rEntry.nToken ),
-nFastToken( rEntry.nFastToken )
-{}
+void SvXMLTokenMap_Impl::insert( const SvXMLTokenMapEntry& rEntry )
+{
+m_aPrefixAndNameToTokenMap.insert( std::make_pair( std::make_pair( 
rEntry.nPrefixKey,
+   GetXMLToken( rEntry.eLocalName ) ), 
rEntry.nToken ) );
+if( rEntry.nFastToken )
+m_aFastTokenToTokenMap.insert( std::make_pair( rEntry.nFastToken, 
rEntry.nToken ) );
+}
 
-bool operator<( const SvXMLTokenMapEntry_Impl& r ) const
-{
-return nPrefixKey < r.nPrefixKey ||
-   ( nPrefixKey == r.nPrefixKey &&
- sLocalName < r.sLocalName);
-}
-};
+sal_uInt16 SvXMLTokenMap_Impl::get( sal_uInt16 nKeyPrefix, const OUString& 
rLName ) const
+{
+auto aIter( m_aPrefixAndNam