[Libreoffice-commits] core.git: Branch 'feature/fixes36' - 2 commits - desktop/source include/opencl opencl/source

2016-10-21 Thread Tomaž Vajngerl
 desktop/source/app/opencl.cxx|3 +--
 include/opencl/openclwrapper.hxx |5 -
 opencl/source/openclwrapper.cxx  |   21 +
 3 files changed, 22 insertions(+), 7 deletions(-)

New commits:
commit 56ba1e97b3609c6156b0ca2183fe6f8d4fd5abb7
Author: Tomaž Vajngerl 
Date:   Tue Oct 18 23:53:44 2016 +0200

tdf#103395 opencl: don't initialize OpenCL when disabled

If SAL_DISABLE_OPENCL is set we don't want to do any kind of
OpenCL initialization. Put an extra guard in fillOpenCLInfo
(and similar methods in opencl package) to prevent that.

Put the check if OpenCL can be used into one place which checks
SAL_DISABLE_OPENCL and UseOpenCL in configuration.

Change-Id: Icc216d4299d3a7942843117ab9b9411de8075b11

diff --git a/desktop/source/app/opencl.cxx b/desktop/source/app/opencl.cxx
index 13161f3..791b7a9 100644
--- a/desktop/source/app/opencl.cxx
+++ b/desktop/source/app/opencl.cxx
@@ -117,8 +117,7 @@ bool testOpenCLCompute(const Reference< XDesktop2 > 
&xDesktop, const OUString &r
 
 void Desktop::CheckOpenCLCompute(const Reference< XDesktop2 > &xDesktop)
 {
-if (getenv("SAL_DISABLE_OPENCL") ||
-!officecfg::Office::Common::Misc::UseOpenCL::get())
+if (!opencl::canUseOpenCL())
 return;
 
 SAL_INFO("opencl", "Initiating test of OpenCL device");
diff --git a/include/opencl/openclwrapper.hxx b/include/opencl/openclwrapper.hxx
index dae1192..5c8141e 100644
--- a/include/opencl/openclwrapper.hxx
+++ b/include/opencl/openclwrapper.hxx
@@ -26,7 +26,8 @@
 
 #include 
 
-namespace opencl {
+namespace opencl
+{
 
 struct KernelEnv
 {
@@ -55,6 +56,8 @@ struct OPENCL_DLLPUBLIC GPUEnv
 extern OPENCL_DLLPUBLIC GPUEnv gpuEnv;
 extern OPENCL_DLLPUBLIC sal_uInt64 kernelFailures;
 
+OPENCL_DLLPUBLIC bool canUseOpenCL();
+
 OPENCL_DLLPUBLIC bool generatBinFromKernelSource( cl_program program, const 
char * clFileName );
 OPENCL_DLLPUBLIC bool buildProgramFromBinary(const char* buildOption, GPUEnv* 
gpuEnv, const char* filename, int idx);
 OPENCL_DLLPUBLIC void setKernelEnv( KernelEnv *envInfo );
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx
index d8d16c3..981816c 100644
--- a/opencl/source/openclwrapper.cxx
+++ b/opencl/source/openclwrapper.cxx
@@ -32,6 +32,8 @@
 
 #include 
 
+#include 
+
 #ifdef _WIN32
 #include 
 #include 
@@ -64,7 +66,8 @@ namespace opencl {
 GPUEnv gpuEnv;
 sal_uInt64 kernelFailures = 0;
 
-namespace {
+namespace
+{
 
 bool bIsInited = false;
 
@@ -648,7 +651,9 @@ bool createPlatformInfo(cl_platform_id nPlatformId, 
OpenCLPlatformInfo& rPlatfor
 const std::vector& fillOpenCLInfo()
 {
 static std::vector aPlatforms;
-if(!aPlatforms.empty())
+
+// return early if we already initialized or can't use OpenCL
+if (!aPlatforms.empty() || !canUseOpenCL())
 return aPlatforms;
 
 int status = clewInit(OPENCL_DLL_NAME);
@@ -731,9 +736,16 @@ void findDeviceInfoFromDeviceId(cl_device_id aDeviceId, 
size_t& rDeviceId, size_
 
 }
 
+bool canUseOpenCL()
+{
+if (getenv("SAL_DISABLE_OPENCL") || 
!officecfg::Office::Common::Misc::UseOpenCL::get())
+return false;
+return true;
+}
+
 bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool 
bForceEvaluation, OUString& rOutSelectedDeviceVersionIDString)
 {
-if(fillOpenCLInfo().empty() || getenv("SAL_DISABLE_OPENCL"))
+if (!canUseOpenCL() || fillOpenCLInfo().empty())
 return false;
 
 cl_device_id pDeviceId = nullptr;
@@ -839,6 +851,9 @@ bool switchOpenCLDevice(const OUString* pDevice, bool 
bAutoSelect, bool bForceEv
 
 void getOpenCLDeviceInfo(size_t& rDeviceId, size_t& rPlatformId)
 {
+if (!canUseOpenCL())
+return;
+
 int status = clewInit(OPENCL_DLL_NAME);
 if (status < 0)
 return;
commit 63cc91290114c64a42505846919f54fb4ee01361
Author: Tomaž Vajngerl 
Date:   Sat Oct 22 00:15:19 2016 +0200

Revert "opencl: make sure we don't initialize OpenCL when disabled"

This reverts commit c10d35e7b9135b98479b6188c2765dc661ba1e65.

diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx
index abd5407..d8d16c3 100644
--- a/opencl/source/openclwrapper.cxx
+++ b/opencl/source/openclwrapper.cxx
@@ -648,9 +648,7 @@ bool createPlatformInfo(cl_platform_id nPlatformId, 
OpenCLPlatformInfo& rPlatfor
 const std::vector& fillOpenCLInfo()
 {
 static std::vector aPlatforms;
-
-// return early if we already initialized or SAL_DISABLE_OPENCL is set
-if (!aPlatforms.empty() || getenv("SAL_DISABLE_OPENCL"))
+if(!aPlatforms.empty())
 return aPlatforms;
 
 int status = clewInit(OPENCL_DLL_NAME);
@@ -735,7 +733,7 @@ void findDeviceInfoFromDeviceId(cl_device_id aDeviceId, 
size_t& rDeviceId, size_
 
 bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool 
bForceEvaluation, OUString& rOutSelectedDeviceVersionIDString)
 {
-if (getenv("SAL_DISABLE_OPENCL") || fillOpenCLInfo().empty())
+if(fill

[Libreoffice-commits] core.git: Branch 'feature/new-vcl-scheduler' - 44 commits - avmedia/source basctl/source chart2/source comphelper/source cui/source dbaccess/source desktop/qa desktop/source draw

2016-10-21 Thread Jan-Marek Glogowski
Rebased ref, commits from common ancestor:
commit 52efc31544e68a0176426284f5131170fee34168
Author: Jan-Marek Glogowski 
Date:   Fri Oct 21 12:58:19 2016 +0200

KDE4 clang-lo:staticmethods

Change-Id: I4899a30f97f8433fd4d20b7d65cb3fbb6a06103f

diff --git a/vcl/unx/kde4/KDEXLib.hxx b/vcl/unx/kde4/KDEXLib.hxx
index 5bcc6b1..e97b20f 100644
--- a/vcl/unx/kde4/KDEXLib.hxx
+++ b/vcl/unx/kde4/KDEXLib.hxx
@@ -62,11 +62,11 @@ class KDEXLib : public QObject, public SalXLib
 
 private Q_SLOTS:
 void socketNotifierActivated( int fd );
-void timeoutActivated();
+static void timeoutActivated();
 void userEventActivated();
 void startTimeoutTimer();
 void startUserEventTimer();
-bool processYield( bool bWait, bool bHandleAllCurrentEvents );
+static bool processYield( bool bWait, bool bHandleAllCurrentEvents );
 Q_SIGNALS:
 void startTimeoutTimerSignal();
 void startUserEventTimerSignal();
commit 62cd68fe53811ac862d99a98ddd13e4fb1b6ec7f
Author: Jan-Marek Glogowski 
Date:   Fri Oct 14 16:05:58 2016 +0200

Correctly handle nested task processing calls

If ProcessTaskScheduling is called to process tasks while inside
Invoke(), the assumptions about the list pointers in the parent
call will be void.

There would be two possible solutions:
  1. Nested calls are forbidden to change the list, except for
 adding tasks.
  2. The parent call must be informed of the changes and update
 the pointers.

Since we want to be able to remove processed tasks in nested calls,
we go with option 2, which has a slight overhead but won't exhaust
memory, because it can't release processed tasks.

Change-Id: I7a3910a9a4677988dff1d5a7648a67d66fb41056

diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 27c4cfc..02ffdc1 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -318,6 +318,7 @@ struct ImplSVData
 ImplSchedulerData*  mpFirstSchedulerData = nullptr; // list of all 
running tasks
 ImplSchedulerData*  mpFreeSchedulerData = nullptr;  // list of all 
deleted tasks for reuse
 boolmbNeedsReschedule = false;  // was the list of 
tasks changed?
+boolmbTaskRemoved = false;  // was a task 
removed
 sal_uInt64  mnTimerPeriod = 0;  // current timer 
period / sleep time
 sal_uInt64  mnLastUpdate = 0;   // last scheduler 
time
 SalTimer*   mpSalTimer = nullptr;   // interface to 
sal event loop/timers
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 6bcfa43..9abfe75 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -177,6 +177,7 @@ bool Scheduler::ProcessTaskScheduling( IdleRunPolicy 
eIdleRunPolicy )
 ImplSchedulerData *pPrevMostUrgent = nullptr;
 ImplSchedulerData *pMostUrgent = nullptr;
 sal_uInt64 nMinPeriod = InfiniteTimeoutMs;
+bool   bIsNestedCall = false;
 
 DBG_TESTSOLARMUTEX();
 
@@ -194,7 +195,10 @@ bool Scheduler::ProcessTaskScheduling( IdleRunPolicy 
eIdleRunPolicy )
 
 // Skip invoked task
 if ( pSchedulerData->mbInScheduler )
+{
+bIsNestedCall = true;
 goto next_entry;
+}
 
 // Can this task be removed from scheduling?
 if ( !pSchedulerData->mpScheduler )
@@ -207,6 +211,7 @@ bool Scheduler::ProcessTaskScheduling( IdleRunPolicy 
eIdleRunPolicy )
 pSchedulerData->mpNext = pSVData->mpFreeSchedulerData;
 pSVData->mpFreeSchedulerData = pSchedulerData;
 pSchedulerData = pNextSchedulerData;
+pSVData->mbTaskRemoved = true;
 continue;
 }
 
@@ -233,6 +238,10 @@ next_entry:
 
 assert( !pSchedulerData );
 
+// We just have to handle removed tasks for nested calls
+if ( !bIsNestedCall )
+pSVData->mbTaskRemoved = false;
+
 if ( pMostUrgent )
 {
 assert( pPrevMostUrgent != pMostUrgent );
@@ -246,6 +255,14 @@ next_entry:
 SAL_INFO_IF( !pMostUrgent->mpScheduler, "vcl.schedule", 
tools::Time::GetSystemTicks()
  << " " << static_cast( pMostUrgent ) <<  "  
tag-rm" );
 
+// If there were some tasks removed, our list pointers may be invalid,
+// except pMostUrgent, which is protected by mbInScheduler
+if ( pSVData->mbTaskRemoved )
+{
+nMinPeriod = ImmediateTimeoutMs;
+pPrevSchedulerData = pMostUrgent;
+}
+
 // do some simple round-robin scheduling
 // nothing to do, if we're already the last element
 if ( pMostUrgent->mpScheduler )
@@ -255,6 +272,19 @@ next_entry:
 
 if ( pMostUrgent->mpNext )
 {
+// see ^
+if ( pSVData->mbTaskRemoved )
+{
+pP

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-0' - 2 commits - loleaflet/dist loleaflet/src

2016-10-21 Thread Andras Timar
 loleaflet/dist/l10n/uno/af.json  |2 +-
 loleaflet/dist/l10n/uno/am.json  |2 +-
 loleaflet/dist/l10n/uno/an.json  |2 +-
 loleaflet/dist/l10n/uno/ar.json  |2 +-
 loleaflet/dist/l10n/uno/as.json  |2 +-
 loleaflet/dist/l10n/uno/ast.json |2 +-
 loleaflet/dist/l10n/uno/be.json  |2 +-
 loleaflet/dist/l10n/uno/bg.json  |2 +-
 loleaflet/dist/l10n/uno/bn-IN.json   |2 +-
 loleaflet/dist/l10n/uno/bn.json  |2 +-
 loleaflet/dist/l10n/uno/bo.json  |2 +-
 loleaflet/dist/l10n/uno/br.json  |2 +-
 loleaflet/dist/l10n/uno/brx.json |2 +-
 loleaflet/dist/l10n/uno/bs.json  |2 +-
 loleaflet/dist/l10n/uno/ca-valencia.json |2 +-
 loleaflet/dist/l10n/uno/ca.json  |2 +-
 loleaflet/dist/l10n/uno/cs.json  |2 +-
 loleaflet/dist/l10n/uno/cy.json  |2 +-
 loleaflet/dist/l10n/uno/da.json  |2 +-
 loleaflet/dist/l10n/uno/de.json  |2 +-
 loleaflet/dist/l10n/uno/dgo.json |2 +-
 loleaflet/dist/l10n/uno/dz.json  |2 +-
 loleaflet/dist/l10n/uno/el.json  |2 +-
 loleaflet/dist/l10n/uno/en-GB.json   |2 +-
 loleaflet/dist/l10n/uno/en-ZA.json   |2 +-
 loleaflet/dist/l10n/uno/eo.json  |2 +-
 loleaflet/dist/l10n/uno/es.json  |2 +-
 loleaflet/dist/l10n/uno/et.json  |2 +-
 loleaflet/dist/l10n/uno/eu.json  |2 +-
 loleaflet/dist/l10n/uno/fa.json  |2 +-
 loleaflet/dist/l10n/uno/fi.json  |2 +-
 loleaflet/dist/l10n/uno/fr.json  |2 +-
 loleaflet/dist/l10n/uno/ga.json  |2 +-
 loleaflet/dist/l10n/uno/gd.json  |2 +-
 loleaflet/dist/l10n/uno/gl.json  |2 +-
 loleaflet/dist/l10n/uno/gu.json  |2 +-
 loleaflet/dist/l10n/uno/gug.json |2 +-
 loleaflet/dist/l10n/uno/he.json  |2 +-
 loleaflet/dist/l10n/uno/hi.json  |2 +-
 loleaflet/dist/l10n/uno/hr.json  |2 +-
 loleaflet/dist/l10n/uno/hu.json  |2 +-
 loleaflet/dist/l10n/uno/id.json  |2 +-
 loleaflet/dist/l10n/uno/is.json  |2 +-
 loleaflet/dist/l10n/uno/it.json  |2 +-
 loleaflet/dist/l10n/uno/ja.json  |2 +-
 loleaflet/dist/l10n/uno/ka.json  |2 +-
 loleaflet/dist/l10n/uno/kk.json  |2 +-
 loleaflet/dist/l10n/uno/km.json  |2 +-
 loleaflet/dist/l10n/uno/kmr-Latn.json|2 +-
 loleaflet/dist/l10n/uno/kn.json  |2 +-
 loleaflet/dist/l10n/uno/ko.json  |2 +-
 loleaflet/dist/l10n/uno/kok.json |2 +-
 loleaflet/dist/l10n/uno/ks.json  |2 +-
 loleaflet/dist/l10n/uno/lb.json  |2 +-
 loleaflet/dist/l10n/uno/lo.json  |2 +-
 loleaflet/dist/l10n/uno/lt.json  |2 +-
 loleaflet/dist/l10n/uno/lv.json  |2 +-
 loleaflet/dist/l10n/uno/mai.json |2 +-
 loleaflet/dist/l10n/uno/mk.json  |2 +-
 loleaflet/dist/l10n/uno/ml.json  |2 +-
 loleaflet/dist/l10n/uno/mn.json  |2 +-
 loleaflet/dist/l10n/uno/mni.json |2 +-
 loleaflet/dist/l10n/uno/mr.json  |2 +-
 loleaflet/dist/l10n/uno/my.json  |2 +-
 loleaflet/dist/l10n/uno/nb.json  |2 +-
 loleaflet/dist/l10n/uno/ne.json  |2 +-
 loleaflet/dist/l10n/uno/nl.json  |2 +-
 loleaflet/dist/l10n/uno/nn.json  |2 +-
 loleaflet/dist/l10n/uno/nr.json  |2 +-
 loleaflet/dist/l10n/uno/nso.json |2 +-
 loleaflet/dist/l10n/uno/oc.json  |2 +-
 loleaflet/dist/l10n/uno/om.json  |2 +-
 loleaflet/dist/l10n/uno/or.json  |2 +-
 loleaflet/dist/l10n/uno/pa-IN.json   |2 +-
 loleaflet/dist/l10n/uno/pl.json  |2 +-
 loleaflet/dist/l10n/uno/pt-BR.json   |2 +-
 loleaflet/dist/l10n/uno/pt.json  |2 +-
 loleaflet/dist/l10n/uno/ro.json  |2 +-
 loleaflet/dist/l10n/uno/ru.json  |2 +-
 loleaflet/dist/l10n/uno/rw.json  |2 +-
 loleaflet/dist/l10n/uno/sa-IN.json   |2 +-
 loleaflet/dist/l10n/uno/sat.json |2 +-
 loleaflet/dist/l10n/uno/sd.json  |2 +-
 loleaflet/dist/l10n/uno/si.json  |2 +-
 loleaflet/dist/l10n/uno/sid.json |2 +-
 loleaflet/dist/l10n/uno/sk.json  |2 +-
 loleaflet/dist/l10n/uno/sl.json  |2 +-
 loleaflet/dist/l10n/uno/sq.json  |2 +-
 loleaflet/dist/l10n/uno/sr-Latn.json |2 +-
 loleaflet/dist

[Libreoffice-commits] core.git: helpcontent2

2016-10-21 Thread Fabio Bioccetti
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fdd96da1253092317dff68cbc6fb11a7e71834c1
Author: Fabio Bioccetti 
Date:   Fri Oct 21 12:35:55 2016 -0200

Updated core
Project: help  f6f7781565812712d41180f312289ad65c46ff78

tdf#97745 Help pages in browser (WIP)

Work in progress:
Search index
Javascript xhp server

patch2: rename jj.js to help.js
updated index.html accordingly

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

diff --git a/helpcontent2 b/helpcontent2
index 599f664..f6f7781 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 599f664d48f995c461e06daf2295c1f9921fbcb8
+Subproject commit f6f7781565812712d41180f312289ad65c46ff78
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: help3xsl/default.css help3xsl/help.js help3xsl/index.html help3xsl/jquery-3.1.1.min.js help3xsl/online_transform.xsl

2016-10-21 Thread Fabio Bioccetti
 help3xsl/default.css  |   60 +--
 help3xsl/help.js  |   80 ++
 help3xsl/index.html   |   43 ++
 help3xsl/jquery-3.1.1.min.js  |4 ++
 help3xsl/online_transform.xsl |2 -
 5 files changed, 161 insertions(+), 28 deletions(-)

New commits:
commit f6f7781565812712d41180f312289ad65c46ff78
Author: Fabio Bioccetti 
Date:   Fri Oct 21 12:35:55 2016 -0200

tdf#97745 Help pages in browser (WIP)

Work in progress:
Search index
Javascript xhp server

patch2: rename jj.js to help.js
updated index.html accordingly

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

diff --git a/help3xsl/default.css b/help3xsl/default.css
index e4ba6d5..7065f0f 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -109,15 +109,67 @@ h4, h5, h6
 .hotlink
 { color:blue;}
 
-.infopage
-{ color:green;
+.infopage {
+color:green;
 font-size:16pt;
 font-weight:bold;
 }
+
 .topmenu{
-color:yellow;
-background-color:cyan;
+color: green;
+background-color: white;
 font-size:16pt;
 font-weight:bold;
 }
+.indexlink{font-size: 10pt; margin-top: 2px; margin-bottom: 2px;}
+
+#DisplayArea{
+position: fixed;
+bottom: 5px;
+right: 5px; 
+overflow:auto; 
+width: 70%;
+height: 90%;
+}
+
+#BottomLeft {
+position: fixed;
+bottom: 5px;
+left: 5px; 
+overflow:auto; 
+width: 30%;
+height: 90%;
+}
+
+#TopRight {
+position: fixed;
+top: 5px;
+right: 5px;
+}
+
+#TopLeft {
+position: fixed;
+top: 5px;
+left: 5px;
+}
+
+#centerdiv {
+position: fixed;
+top: 25%;
+left:25%;
+}
+
+.tintro {
+   color: white;
+background-color: green;
+font-family: Arial;
+font-weight: bold;
+font-size: 24pt; 
+border: 1px solid black; 
+padding-bottom: 6px; 
+margin-bottom: 6px;
+}
+.embedded {
+background-color:yellow;
+}
 
diff --git a/help3xsl/help.js b/help3xsl/help.js
new file mode 100644
index 000..fb77cbc
--- /dev/null
+++ b/help3xsl/help.js
@@ -0,0 +1,80 @@
+function loadXMLDoc(filename, response)
+{
+if (window.ActiveXObject)
+  {
+  xhttp = new ActiveXObject("Msxml2.XMLHTTP");
+  }
+else
+  {
+  xhttp = new XMLHttpRequest();
+  }
+xhttp.open("GET", filename, false);
+try {xhttp.responseType = "msxml-document"} catch(err) {} // Helping IE11
+xhttp.send("");
+if (response == 1){return xhttp.responseXML;}
+return xhttp.responseText;
+}
+
+
+function displayResult(file, moduleName, language, system)
+{
+var xml = loadXMLDoc(file, 1);
+var xsl = loadXMLDoc('/online_transform.xsl', 1);
+var xsltProcessor;
+var resultDocument;
+var bookmarkHTML;
+var urlVars = getUrlVars(file);
+  var module = urlVars["DbPAR"];
+  var language = urlVars["Language"];
+  var system = urlVars["System"];
+  var usedb = urlVars["UseDB"];
+  document.getElementById("DisplayArea").innerHTML= null; 
+  document.getElementById("BottomLeft").innerHTML= null; 
+// code for IE
+if (window.ActiveXObject || xhttp.responseType == "msxml-document")
+  {
+  ex = xml.transformNode(xsl);
+  document.getElementById("DisplayArea").innerHTML = ex;
+  }
+// code for Chrome, Firefox, Opera, etc.
+else if (document.implementation && document.implementation.createDocument)
+  {
+xsltProcessor = new XSLTProcessor();
+
+if (module){xsltProcessor.setParameter(null, "appl", module);}
+if (language){xsltProcessor.setParameter(null, "Language", language);}
+if (system){xsltProcessor.setParameter(null, "System", system);}
+
+$(document).on('click', '#BottomLeft a', function(e) {
+  e.preventDefault();
+  var xml = loadXMLDoc($(this).attr('href'), 1);
+  var resultDocument = xsltProcessor.transformToFragment(xml,  document);
+  $("#DisplayArea").html($(resultDocument).find('#DisplayArea').html());
+  return false;
+});
+
+xsltProcessor.importStylesheet(xsl);
+resultDocument = xsltProcessor.transformToFragment(xml,  document);
+$("#DisplayArea").html($(resultDocument).find('#DisplayArea').html());
+// Handle bookmar panel
+$("#BottomLeft").load('/bookmark_'+moduleName+'.html');
+  }
+}
+
+$(document).ready(function() {
+  $('#search-bar').keyup(function() {
+$("#BottomLeft ul li" ).show();
+if($(this).val()) {
+  $("#BottomLeft ul a:not(:contains('" + $(this).val() + "'))" 
).parent().hide();
+}
+  });
+});
+
+//http://papermashup.com/read-url-get-variables-withjavascript/
+
+function getUrlVars(file) {
+var vars = {};
+var parts = file.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) 
{vars[key] = value;});
+//var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, 
function(m,key,value) {vars[key] = value;});
+return vars;
+}
diff --git a/help3xsl/index.html b/help3xsl/index.html
index 88ff64a..f326003 100644
--- a/help3xsl/index.html
+++ b/help3xsl/index.html
@@ -1,3

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

2016-10-21 Thread Samuel Mehrbrodt
 sd/uiconfig/simpress/ui/customanimationspanelhorizontal.ui |2 +-
 sd/uiconfig/simpress/ui/customanimationtimingtab.ui|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3169401417ba694ae044fc6f023ae839a0a5a338
Author: Samuel Mehrbrodt 
Date:   Fri Oct 21 20:05:01 2016 +

Fix grammar

Change-Id: Ib13522ece9ce8fe42d1c966975674abb3e6921d4
Reviewed-on: https://gerrit.libreoffice.org/30155
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/sd/uiconfig/simpress/ui/customanimationspanelhorizontal.ui 
b/sd/uiconfig/simpress/ui/customanimationspanelhorizontal.ui
index dd9819b..3baac1f 100644
--- a/sd/uiconfig/simpress/ui/customanimationspanelhorizontal.ui
+++ b/sd/uiconfig/simpress/ui/customanimationspanelhorizontal.ui
@@ -249,7 +249,7 @@
 True
 False
 True
-Select the 
speed of Animation.
+Select the 
speed of the Animation.
 True
   
   
diff --git a/sd/uiconfig/simpress/ui/customanimationtimingtab.ui 
b/sd/uiconfig/simpress/ui/customanimationtimingtab.ui
index b130b15..4b2c298 100644
--- a/sd/uiconfig/simpress/ui/customanimationtimingtab.ui
+++ b/sd/uiconfig/simpress/ui/customanimationtimingtab.ui
@@ -108,7 +108,7 @@
 True
 False
 True
-Select the speed 
of Animation.
+Select the speed 
of the Animation.
 True
 adjustment1
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: extras/source officecfg/registry sd/uiconfig

2016-10-21 Thread giacco
 extras/source/glade/libreoffice-catalog.xml.in |6 +++---
 officecfg/registry/schema/org/openoffice/Office/Impress.xcs|8 
 officecfg/registry/schema/org/openoffice/Office/UI/Effects.xcs |4 ++--
 sd/uiconfig/simpress/ui/customanimationspanel.ui   |6 +++---
 sd/uiconfig/simpress/ui/customanimationspanelhorizontal.ui |4 ++--
 sd/uiconfig/simpress/ui/customanimationtimingtab.ui|2 +-
 6 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 184e0d10902ee6dc32ab82aec25bcb8e2d1596a5
Author: giacco 
Date:   Fri Oct 21 19:39:48 2016 +0200

tdf#95387 UI: "Custom Animation" probably should be called just "Animation"

modified some .ui

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

diff --git a/extras/source/glade/libreoffice-catalog.xml.in 
b/extras/source/glade/libreoffice-catalog.xml.in
index 3dc6c1b..b19f135 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -550,8 +550,8 @@
 
-
 
-
 
 
 
-  Indicates whether a selected effect in the custom animation 
create dialog should be previewed.
-  Automatic preview for new custom animation
+  Indicates whether a selected effect in the animation create 
dialog should be previewed.
+  Automatic preview for new animation
 
 true
   
@@ -511,8 +511,8 @@
 
 
 
-  Indicates whether changes in the custom animation panel should 
be previewed.
-  Automatic preview for custom animation panel
+  Indicates whether changes in the animation panel should be 
previewed.
+  Automatic preview for animation panel
 
 true
   
diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Effects.xcs 
b/officecfg/registry/schema/org/openoffice/Office/UI/Effects.xcs
index 0104a9d..d57104e 100644
--- a/officecfg/registry/schema/org/openoffice/Office/UI/Effects.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/UI/Effects.xcs
@@ -64,7 +64,7 @@
 
 
   
-Maps a custom animation effect node to an effect category.
+Maps an animation effect node to an effect category.
   
   
 
@@ -116,7 +116,7 @@
 
 
   
-Contains user interface presets for custom animation 
effects."
+Contains user interface presets for animation effects."
   
   
 
diff --git a/sd/uiconfig/simpress/ui/customanimationspanel.ui 
b/sd/uiconfig/simpress/ui/customanimationspanel.ui
index 8f73654..9e1c536 100644
--- a/sd/uiconfig/simpress/ui/customanimationspanel.ui
+++ b/sd/uiconfig/simpress/ui/customanimationspanel.ui
@@ -61,7 +61,7 @@
 True
 True
 
-  
+  
 
   
   
@@ -442,7 +442,7 @@
 
   
 False
-Custom Animation 
Deck
+Animation Deck
 True
 box1
   
@@ -455,7 +455,7 @@
 
   
 False
-Custom Animation 
List
+Animation List
 True
 custom_animation_list
   
diff --git a/sd/uiconfig/simpress/ui/customanimationspanelhorizontal.ui 
b/sd/uiconfig/simpress/ui/customanimationspanelhorizontal.ui
index c469f76..dd9819b 100644
--- a/sd/uiconfig/simpress/ui/customanimationspanelhorizontal.ui
+++ b/sd/uiconfig/simpress/ui/customanimationspanelhorizontal.ui
@@ -28,7 +28,7 @@
 True
 immediate
 
-  
+  
 
   
   
@@ -249,7 +249,7 @@
 True
 False
 True
-Select the 
speed of Custom Animation.
+Select the 
speed of Animation.
 True
   
   
diff --git a/sd/uiconfig/simpress/ui/customanimationtimingtab.ui 
b/sd/uiconfig/simpress/ui/customanimationtimingtab.ui
index 67ddd3d..b130b15 100644
--- a/sd/uiconfig/simpress/ui/customanimationtimingtab.ui
+++ b/sd/uiconfig/simpress/ui/customanimationtimingtab.ui
@@ -108,7 +108,7 @@
 True
 False
 True
-Select the speed 
of Custom Animation.
+Select the speed 
of Animation.
 True
 adjustment1
   
___
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' - ae/698a63b640b708a41022fdc39ef8ec7c76d3cd

2016-10-21 Thread Caolán McNamara
 ae/698a63b640b708a41022fdc39ef8ec7c76d3cd |1 +
 1 file changed, 1 insertion(+)

New commits:
commit d3d30d73dcd26fb14859414d6a49bfc0b5ff2e88
Author: Caolán McNamara 
Date:   Fri Oct 21 20:36:11 2016 +0100

Notes added by 'git notes add'

diff --git a/ae/698a63b640b708a41022fdc39ef8ec7c76d3cd 
b/ae/698a63b640b708a41022fdc39ef8ec7c76d3cd
new file mode 100644
index 000..422ec7b
--- /dev/null
+++ b/ae/698a63b640b708a41022fdc39ef8ec7c76d3cd
@@ -0,0 +1 @@
+prefer: 568e1b979451e29483d06dabebef7ac17b416841
___
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' - ff/2631c08ee4ab17d99836c5d1b83c65123a601a

2016-10-21 Thread Caolán McNamara
 ff/2631c08ee4ab17d99836c5d1b83c65123a601a |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7da4847ff46391f1ff03ef30f515da84cad70eb8
Author: Caolán McNamara 
Date:   Fri Oct 21 20:32:31 2016 +0100

Notes added by 'git notes add'

diff --git a/ff/2631c08ee4ab17d99836c5d1b83c65123a601a 
b/ff/2631c08ee4ab17d99836c5d1b83c65123a601a
new file mode 100644
index 000..89b933f
--- /dev/null
+++ b/ff/2631c08ee4ab17d99836c5d1b83c65123a601a
@@ -0,0 +1 @@
+prefer: 2ba4a4bf6384cd57664d316dd479bddfa38760d6
___
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' - e4/4ff6cc12f316d1fa0218649126ecc3f7e1bae0

2016-10-21 Thread Caolán McNamara
 e4/4ff6cc12f316d1fa0218649126ecc3f7e1bae0 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit a53b85fa600bef05d13801714f4aab345fda627a
Author: Caolán McNamara 
Date:   Fri Oct 21 20:31:53 2016 +0100

Notes added by 'git notes add'

diff --git a/e4/4ff6cc12f316d1fa0218649126ecc3f7e1bae0 
b/e4/4ff6cc12f316d1fa0218649126ecc3f7e1bae0
new file mode 100644
index 000..bd62183
--- /dev/null
+++ b/e4/4ff6cc12f316d1fa0218649126ecc3f7e1bae0
@@ -0,0 +1 @@
+prefer: 6dcb3d4ef46312729bb6f16c473b433474863f68
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-21 Thread Caolán McNamara
 sw/source/core/layout/colfrm.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit e1dea8100b345b15705cad366d1bcc9516bb15e9
Author: Caolán McNamara 
Date:   Fri Oct 21 20:29:25 2016 +0100

Resolves: tdf#103359 undo of insert of multi column frame crashes

this pattern has been seen before in #i32968#, so fix the same way

Change-Id: I72ac628ee507abf23c38defede33058b34e17857

diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index 137bce2..3bb7524 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -31,6 +31,7 @@
 #include "ftnfrm.hxx"
 #include 
 #include 
+#include 
 
 SwColumnFrame::SwColumnFrame( SwFrameFormat *pFormat, SwFrame* pSib ):
 SwFootnoteBossFrame( pFormat, pSib )
@@ -152,9 +153,12 @@ static bool lcl_AddColumns( SwLayoutFrame *pCont, 
sal_uInt16 nCount )
 else
 {
 bRet = true;
+// tdf#103359, like #i32968# Inserting columns in the section causes 
MakeFrameFormat to put
+// nCount objects of type SwUndoFrameFormat on the undo stack. We 
don't want them.
+::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
 for ( sal_uInt16 i = 0; i < nCount; ++i )
 {
-SwFrameFormat *pFormat = pDoc->MakeFrameFormat( aEmptyOUStr, 
pDoc->GetDfltFrameFormat());
+SwFrameFormat *pFormat = pDoc->MakeFrameFormat(aEmptyOUStr, 
pDoc->GetDfltFrameFormat());
 SwColumnFrame *pTmp = new SwColumnFrame( pFormat, pCont );
 pTmp->SetMaxFootnoteHeight( nMax );
 pTmp->Paste( pCont );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Fabio Biocchetti license statement

2016-10-21 Thread Fabio Biocchetti
All of my past & future contributions to LibreOffice may be licensed 
under the MPLv2/LGPLv3+ dual license.

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


testing commonsallayout branch

2016-10-21 Thread Milos Sramek
Hi,


I've changed subject, since the discussion went in a different direction.

Meanwhile I've discovered, that one can run OSX in a virtual machine :).
That fits to my environment well.

I've tested a few random files with a few random version on Linux, Mac
and Windows. The results:
http://bender.dam.fmph.uniba.sk/~milos/roundtrip/odttest-mac-win/rslt-web.ods

Brief explanantion:
grade 0: pixel level identical
grade 1: some differences, probably not visible
...
Grade meaning is explained in a comment

> is a link to pdf:
column LND: side by side
column THE: overlay
column HLPE: vertically aligned lines
column FDE: vertically and horizontally aligned

first sheet: print test: printed by tested version (name in header) and
in reference version (LO43 on Linux) and compared
second sheet: roundtrip test: saved to odt and printed by the reference
version. No differences here

Which versions should I test? The engines can be specified by
environment variable - I can test that too.

Is there a way how to install multiple versions in parallel on MAC? I
can install only production and development one.

best
Milos


On 2016-10-18 18:36, Khaled Hosny wrote:
> On Tue, Oct 18, 2016 at 09:06:42AM +0200, Milos Sramek wrote:
>> Dear Khaled,
>>
>> do you think that extensive comparison of rendering of numerous
>> documents with and without the new layout engine makes sense?
>> If yes, I can run my tests in such a way to see if there are any
>> differences.
> This would be extremely helpful, and more so if it can run on Windows or
> Mac.
>
>> My test documents use latin script except for a few ones in Chinese. So,
>> if you happen to have sume documents in Arabic I can add them to my test
>> set.
> I’ve a random collection of documents somewhere, I’ll clean it up and
> send it to you.
>
> Regards,
> Khaled
>
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice


-- 
email & jabber: sramek.mi...@gmail.com

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


Re: Aleksander Machniak license statement

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

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

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

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

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

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


Re: Gian Domenico license statement

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

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

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

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

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

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


Re: Sudarshan K license statement.

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

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

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

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

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

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


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

2016-10-21 Thread Marco A . G . Pinto
 extras/source/autocorr/lang/pt/DocumentList.xml |   38 
 1 file changed, 38 insertions(+)

New commits:
commit 0e93a8053442e3fecc90cf7602f724ac05d4dbb1
Author: Marco A.G.Pinto 
Date:   Fri Oct 21 17:55:42 2016 +

Added 38 words to autocorrect pt_PT.

Change-Id: I501c9a08cabfa0075fc472b5141052379e634e86
Reviewed-on: https://gerrit.libreoffice.org/30152
Reviewed-by: jan iversen 
Tested-by: jan iversen 

diff --git a/extras/source/autocorr/lang/pt/DocumentList.xml 
b/extras/source/autocorr/lang/pt/DocumentList.xml
index 7fdf676..458aae7 100644
--- a/extras/source/autocorr/lang/pt/DocumentList.xml
+++ b/extras/source/autocorr/lang/pt/DocumentList.xml
@@ -3167,4 +3167,42 @@
   
   
   
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-21 Thread Khaled Hosny
 vcl/inc/win/salgdi.h  |2 +
 vcl/win/gdi/winlayout.cxx |   88 --
 2 files changed, 87 insertions(+), 3 deletions(-)

New commits:
commit 36bafd3d4ad7fa75649eeab0c9cd1b3d6f53d8e8
Author: Khaled Hosny 
Date:   Fri Oct 21 03:01:43 2016 +0200

tdf#103365: Try to fix Windows OpenGL rendering

Essentially an adapted copy of WinLayout::DrawText(). Avoiding code
duplication would have been nicer, but it is going to be too complicated
and the other copy is going away soonish anyway.

Change-Id: I7db4008a0db3d01d71d106e06fe413658f9bf42d
Reviewed-on: https://gerrit.libreoffice.org/30123
Reviewed-by: akash 
Reviewed-by: Khaled Hosny 
Tested-by: Khaled Hosny 

diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 9837a06..d694cf6 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -357,6 +357,8 @@ private:
 // get kernign pairs of the current font
 sal_uLong   GetKernPairs();
 
+voidDrawTextLayout(const CommonSalLayout&, HDC);
+
 public:
 static sal_uLongGetTable( const char pTagName[5], const unsigned 
char*&, void*&, IDWriteFontFace*& );
 // public SalGraphics methods, the interface to the independent vcl part
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 8c16b9d..476248e 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -4004,10 +4004,8 @@ LogicalFontInstance* WinFontFace::CreateFontInstance( 
FontSelectPattern& rFSD )
 return pFontInstance;
 }
 
-void WinSalGraphics::DrawSalLayout(const CommonSalLayout& rLayout)
+void WinSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout, HDC hDC)
 {
-HDC hDC = getHDC();
-
 if (getenv("SAL_DWRITE_COMMON_LAYOUT"))
 {
 Point aPos(0, 0);
@@ -4032,4 +4030,88 @@ void WinSalGraphics::DrawSalLayout(const 
CommonSalLayout& rLayout)
 }
 }
 
+void WinSalGraphics::DrawSalLayout(const CommonSalLayout& rLayout)
+{
+HDC hDC = getHDC();
+bool bUseOpenGL = OpenGLHelper::isVCLOpenGLEnabled() && !mbPrinter;
+if (!bUseOpenGL)
+{
+// no OpenGL, just classic rendering
+DrawTextLayout(rLayout, hDC);
+}
+else
+{
+// We have to render the text to a hidden texture, and draw it.
+//
+// Note that Windows GDI does not really support the alpha correctly
+// when drawing - ie. it draws nothing to the alpha channel when
+// rendering the text, even the antialiasing is done as 'real' pixels,
+// not alpha...
+//
+// Luckily, this does not really limit us:
+//
+// To blend properly, we draw the texture, but then use it as an alpha
+// channel for solid color (that will define the text color).  This
+// destroys the subpixel antialiasing - turns it into 'classic'
+// antialiasing - but that is the best we can do, because the subpixel
+// antialiasing needs to know what is in the background: When the
+// background is white, or white-ish, it does the subpixel, but when
+// there is a color, it just darkens the color (and does this even
+// when part of the character is on a colored background, and part on
+// white).  It has to work this way, the results would look strange
+// otherwise.
+//
+// For the GL rendering to work even with the subpixel antialiasing,
+// we would need to get the current texture from the screen, let GDI
+// draw the text to it (so that it can decide well where to use the
+// subpixel and where not), and draw the result - but in that case we
+// don't need alpha anyway.
+//
+// TODO: check the performance of this 2nd approach at some stage and
+// switch to that if it performs well.
+
+Rectangle aRect;
+rLayout.GetBoundRect(*this, aRect);
+
+WinOpenGLSalGraphicsImpl *pImpl = 
dynamic_cast(mpImpl.get());
+
+if (pImpl)
+{
+pImpl->PreDraw();
+
+OpenGLCompatibleDC aDC(*this, aRect.Left(), aRect.Top(), 
aRect.GetWidth(), aRect.GetHeight());
+
+// we are making changes to the DC, make sure we got a new one
+assert(aDC.getCompatibleHDC() != hDC);
+
+RECT aWinRect = { aRect.Left(), aRect.Top(), aRect.Left() + 
aRect.GetWidth(), aRect.Top() + aRect.GetHeight() };
+::FillRect(aDC.getCompatibleHDC(), &aWinRect, 
static_cast(::GetStockObject(WHITE_BRUSH)));
+
+// setup the hidden DC with black color and white background, we 
will
+// use the result of the text drawing later as a mask only
+HFONT hOrigFont = ::SelectFont(aDC.getCompatibleHDC(), 
static_cast(::GetCurrentObject(hDC, OBJ_FONT)));
+
+::SetTextColor(aDC.getCompatibleHDC(), RGB(0, 0, 0));
+::SetBkColor(aDC.getCompatibleHDC(), RGB(255, 255, 255));
+
+  

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

2016-10-21 Thread Pranav Kant
 loleaflet/src/control/Control.ContextMenu.js |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit ba23ab2927da87f9e24514156056d87d25c4c922
Author: Pranav Kant 
Date:   Fri Oct 21 21:10:09 2016 +0530

loleaflet: Expose some context menu item for comments

Change-Id: I242755c67f904ffbaaac63db24d735a9bfaa6bca

diff --git a/loleaflet/src/control/Control.ContextMenu.js 
b/loleaflet/src/control/Control.ContextMenu.js
index c0a5722..60c4a32 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -32,7 +32,8 @@ L.Control.ContextMenu = L.Control.extend({
   'TableDeleteMenu',
   'DeleteRows', 'DeleteColumns', 'DeleteTable',
   'MergeCells', 'SetOptimalColumnWidth', 
'SetOptimalRowWidth',
-  'UpdateCurIndex','RemoveTableOf'],
+  'UpdateCurIndex','RemoveTableOf',
+  'ReplyComment', 'DeleteComment', 
'DeleteAuthor', 'DeleteAllNotes'],
 
spreadsheet: ['MergeCells', 'SplitCells',
  'InsertAnnotation', 
'EditAnnotation', 'DeleteNote', 'ShowNote', 'HideNote'],
@@ -120,6 +121,13 @@ L.Control.ContextMenu = L.Control.extend({
 
itemName = item.text.replace('~', '');
itemName = itemName.replace('°', '°'); // 
bccu#1813 double encoding in cp-5.0 branch only
+   if (commandName === 'DeleteAuthor') {
+   // In some versions of libreoffice, 
context menu callback returns 'Delete All Comments by $1'
+   // while in some it returns the actual 
username replacing $1.
+   // Also, the translations in LO core 
are for 'Delete All Comments by This Author'
+   // Lets use the later for simplicity 
and to leverage the core translations in online
+   itemName = 
itemName.replace(itemName.substring('Delete All Comments by '.length), 'This 
Author');
+   }
contextMenu[item.command] = {
name: _(itemName)
};
___
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' - sw/source

2016-10-21 Thread Pranav Kant
 sw/source/uibase/shells/annotsh.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 0633846d86bd23256e811c35678006bd5d90deb8
Author: Pranav Kant 
Date:   Fri Oct 21 23:20:36 2016 +0530

sw: Comment deletion by author - use active comment if no args

In case there are no arguments provided to .uno:DeleteAuthor lets
use the author of the active comment window.

Change-Id: I761824f3d9bf90584a99be1015a52d5ddae7edde

diff --git a/sw/source/uibase/shells/annotsh.cxx 
b/sw/source/uibase/shells/annotsh.cxx
index a8e7d50..7dbfa4db 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -1123,6 +1123,8 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
 const SfxStringItem* pItem = rReq.GetArg(nSlot);
 if ( pItem )
 pPostItMgr->Delete( pItem->GetValue() );
+else if ( pPostItMgr->HasActiveSidebarWin() )
+pPostItMgr->Delete( 
pPostItMgr->GetActiveSidebarWin()->GetAuthor() );
 break;
 }
 case FN_HIDE_NOTE:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-21 Thread Giuseppe Castagno
 ucb/source/ucp/webdav-neon/DAVException.hxx  |5 +
 ucb/source/ucp/webdav-neon/webdavcontent.cxx |   74 +--
 ucb/source/ucp/webdav-neon/webdavcontent.hxx |4 +
 3 files changed, 77 insertions(+), 6 deletions(-)

New commits:
commit 59d6d5579528a66e55b75987d2d959968db485a8
Author: Giuseppe Castagno 
Date:   Fri Oct 14 17:13:20 2016 +0200

tdf#102499 (9): Fix eXo Platform WebDAV on 'Save Remote File'

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

diff --git a/ucb/source/ucp/webdav-neon/DAVException.hxx 
b/ucb/source/ucp/webdav-neon/DAVException.hxx
index a7e57ca..c6f50a2 100644
--- a/ucb/source/ucp/webdav-neon/DAVException.hxx
+++ b/ucb/source/ucp/webdav-neon/DAVException.hxx
@@ -104,6 +104,11 @@ const sal_uInt16 SC_INSUFFICIENT_STORAGE = 507;
 // unofficial status codes only used internally by LO
 // used to cache the connection time out event
 const sal_uInt16 USC_CONNECTION_TIMED_OUT= 908;
+// name resolution failed
+const sal_uInt16 USC_LOOKUP_FAILED   = 909;
+const sal_uInt16 USC_AUTH_FAILED = 910;
+const sal_uInt16 USC_AUTHPROXY_FAILED= 911;
+
 
 
 class DAVException : public std::exception
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 00ccdb9..96b86f7 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -3856,7 +3856,7 @@ Content::ResourceType Content::getResourceType(
 }
 else
 {
-getResourceOptions( xEnv, aDAVOptions, rResAccess );
+getResourceOptions( xEnv, aDAVOptions, rResAccess, 
networkAccessAllowed );
 
 // at least class one is needed
 if( aDAVOptions.isClass1() )
@@ -4035,7 +4035,8 @@ Content::ResourceType Content::getResourceType(
 void Content::getResourceOptions(
 const css::uno::Reference< css::ucb::XCommandEnvironment 
>& xEnv,
 DAVOptions& rDAVOptions,
-const std::unique_ptr< DAVResourceAccess > & rResAccess )
+const std::unique_ptr< DAVResourceAccess > & rResAccess,
+bool * networkAccessAllowed )
 throw ( css::uno::Exception, std::exception )
 {
 OUString aRedirURL;
@@ -4095,8 +4096,25 @@ void Content::getResourceOptions(
 // used only internally, so the text doesn't really 
matter..
 aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
   
m_nOptsCacheLifeNotFound );
-cancelCommandExecution( e, xEnv );
-// unreachable
+if ( networkAccessAllowed != nullptr )
+{
+*networkAccessAllowed = *networkAccessAllowed
+&& shouldAccessNetworkAfterException(e);
+}
+}
+break;
+case DAVException::DAV_HTTP_LOOKUP:
+{
+SAL_WARN( "ucb.ucp.webdav", "OPTIONS - DAVException: 
DAV_HTTP_LOOKUP for URL <" << m_xIdentifier->getContentIdentifier() << ">" );
+aDAVOptions.setHttpResponseStatusCode( USC_LOOKUP_FAILED );
+// used only internally, so the text doesn't really 
matter..
+aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+  
m_nOptsCacheLifeNotFound );
+if ( networkAccessAllowed != nullptr )
+{
+*networkAccessAllowed = *networkAccessAllowed
+&& shouldAccessNetworkAfterException(e);
+}
 }
 break;
 case DAVException::DAV_HTTP_AUTH:
@@ -4107,6 +4125,29 @@ void Content::getResourceOptions(
 //   she cancelled the credentials request.
 //   this is not actually an error, it means only that for 
current user this is a standard web,
 //   though possibly DAV enabled
+aDAVOptions.setHttpResponseStatusCode( USC_AUTH_FAILED );
+// used only internally, so the text doesn't really 
matter..
+aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+  
m_nOptsCacheLifeNotFound );
+if ( networkAccessAllowed != nullptr )
+{
+*networkAccessAllowed = *networkAccessAllowed
+&& shouldAccessNetworkAfterException(e);
+}
+}
+break;
+case DAVException::DAV_HTTP_AUTHPROXY:
+{
+  

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

2016-10-21 Thread Giuseppe Castagno
 ucb/source/ucp/webdav-neon/webdavcontent.cxx |   24 
 1 file changed, 24 insertions(+)

New commits:
commit bb27b2ff87e534b6f4fb9583271db29d6bbae8b6
Author: Giuseppe Castagno 
Date:   Fri Oct 21 15:53:53 2016 +0200

tdf#102499 (8): Return empty property when not present.

Change-Id: If5afa4f33ac5b5dfec123960c2e9660183576256
Reviewed-on: https://gerrit.libreoffice.org/30142
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 53d27a7..00ccdb9 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -1745,6 +1745,30 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
  m_bCollection ) );
 }
 
+// Add a default for the properties requested but not found.
+// Determine still missing properties, add a default.
+// Some client function doesn't expect a void uno::Any,
+// but instead wants some sort of default.
+std::vector< OUString > aMissingProps;
+if ( !xProps->containsAllNames(
+rProperties, aMissingProps ) )
+{
+//
+for ( std::vector< rtl::OUString >::const_iterator it = 
aMissingProps.begin();
+  it != aMissingProps.end(); ++it )
+{
+// For the time being only a couple of properties need to be added
+if ( (*it) == "DateModified"  || (*it) == "DateCreated" )
+{
+util::DateTime aDate;
+xProps->addProperty(
+(*it),
+uno::makeAny( aDate ),
+true );
+}
+}
+}
+
 sal_Int32 nCount = rProperties.getLength();
 for ( sal_Int32 n = 0; n < nCount; ++n )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - setup_native/source solenv/bin

2016-10-21 Thread Ariel Constenla-Haile
 setup_native/source/win32/customactions/shellextensions/registerextensions.cxx 
|2 
 setup_native/source/win32/nsis/downloadtemplate.nsi
|   94 +++---
 solenv/bin/modules/installer/download.pm   
|  136 --
 solenv/bin/modules/installer/globals.pm
|3 
 solenv/bin/modules/installer/simplepackage.pm  
|3 
 5 files changed, 48 insertions(+), 190 deletions(-)

New commits:
commit ff2631c08ee4ab17d99836c5d1b83c65123a601a
Author: Ariel Constenla-Haile 
Date:   Fri Oct 21 14:30:14 2016 +

i127100 - Build Windows installer with NSIS >= 3.0

diff --git a/setup_native/source/win32/nsis/downloadtemplate.nsi 
b/setup_native/source/win32/nsis/downloadtemplate.nsi
index d755dfb..79d4d7a 100644
--- a/setup_native/source/win32/nsis/downloadtemplate.nsi
+++ b/setup_native/source/win32/nsis/downloadtemplate.nsi
@@ -3,6 +3,9 @@
 !define PRODUCT_PUBLISHER "PUBLISHERPLACEHOLDER"
 !define PRODUCT_WEB_SITE "WEBSITEPLACEHOLDER"
 
+; Enable Unicode
+Unicode true
+
 ; SetCompressor lzma
 SetCompressor zlib
 
@@ -212,59 +215,44 @@ FunctionEnd
 !insertmacro MUI_PAGE_DIRECTORY
 !insertmacro MUI_PAGE_INSTFILES
 
-#231#!macro MUI_LANGUAGE_PACK LANGUAGE
-#231#  !verbose push
-#231#  !verbose ${MUI_VERBOSE}
-#231#  !insertmacro MUI_INSERT
-#231#  LoadLanguageFile "NSISPATHPLACEHOLDER\${LANGUAGE}_pack.nlf"
-#231#  ;Set default language file for MUI and backup user setting
-#231#  !ifdef LANGFILE_DEFAULT
-#231#!define MUI_LANGFILE_DEFAULT_TEMP "${LANGFILE_DEFAULT}"
-#231#!undef LANGFILE_DEFAULT
-#231#  !endif
-#231#  !define LANGFILE_DEFAULT "${NSISDIR}\Contrib\Language files\English.nsh"
-#231#  ;Include language file
-#231#  !insertmacro LANGFILE_INCLUDE "NSISPATHPLACEHOLDER\${LANGUAGE}_pack.nsh"
-#231#  ;Restore user setting for default language file
-#231#  !undef LANGFILE_DEFAULT
-#231#  !ifdef MUI_LANGFILE_DEFAULT_TEMP
-#231#!define LANGFILE_DEFAULT "${MUI_LANGFILE_DEFAULT}"
-#231#  !endif
-#231#  ;Add language to list of languages for selection dialog  
-#231#  !ifndef MUI_LANGDLL_LANGUAGES
-#231#   !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' 
'${LANG_${LANGUAGE}}' "
-#231#!define MUI_LANGDLL_LANGUAGES_CP "'${LANGFILE_${LANGUAGE}_NAME}' 
'${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' "
-#231#  !else
-#231#!ifdef MUI_LANGDLL_LANGUAGES_TEMP
-#231#  !undef MUI_LANGDLL_LANGUAGES_TEMP
-#231#!endif
-#231#!define MUI_LANGDLL_LANGUAGES_TEMP "${MUI_LANGDLL_LANGUAGES}"
-#231#!undef MUI_LANGDLL_LANGUAGES
-#231#  !ifdef MUI_LANGDLL_LANGUAGES_CP_TEMP
-#231#  !undef MUI_LANGDLL_LANGUAGES_CP_TEMP
-#231#!endif
-#231#!define MUI_LANGDLL_LANGUAGES_CP_TEMP "${MUI_LANGDLL_LANGUAGES_CP}"
-#231#!undef MUI_LANGDLL_LANGUAGES_CP
-#231#!define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' 
'${LANG_${LANGUAGE}}' ${MUI_LANGDLL_LANGUAGES_TEMP}"
-#231#!define MUI_LANGDLL_LANGUAGES_CP "'${LANGFILE_${LANGUAGE}_NAME}' 
'${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' ${MUI_LANGDLL_LANGUAGES_CP_TEMP}"
-#231#  !endif
-#231#  !verbose pop
-#231#!macroend
-
-#204#!macro MUI_LANGUAGE_PACK LANGUAGE
-#204#  !verbose push
-#204#  !verbose ${MUI_VERBOSE}
-#204#  !include "NSISPATHPLACEHOLDER\${LANGUAGE}_pack.nsh"
-#204#  !verbose pop
-#204#!macroend
-
-#204#!macro MUI_LANGUAGEFILE_PACK_BEGIN LANGUAGE
-#204#  !ifndef MUI_INSERT
-#204#!define MUI_INSERT
-#204#!insertmacro MUI_INSERT
-#204#  !endif
-#204#  LoadLanguageFile "NSISPATHPLACEHOLDER\${LANGUAGE}_pack.nlf"
-#204#!macroend
+!macro MUI_LANGUAGE_PACK LANGUAGE
+  !verbose push
+  !verbose ${MUI_VERBOSE}
+  !insertmacro MUI_INSERT
+  LoadLanguageFile "NSISPATHPLACEHOLDER\${LANGUAGE}_pack.nlf"
+  ;Set default language file for MUI and backup user setting
+  !ifdef LANGFILE_DEFAULT
+!define MUI_LANGFILE_DEFAULT_TEMP "${LANGFILE_DEFAULT}"
+!undef LANGFILE_DEFAULT
+  !endif
+  !define LANGFILE_DEFAULT "${NSISDIR}\Contrib\Language files\English.nsh"
+  ;Include language file
+  !insertmacro LANGFILE_INCLUDE "NSISPATHPLACEHOLDER\${LANGUAGE}_pack.nsh"
+  ;Restore user setting for default language file
+  !undef LANGFILE_DEFAULT
+  !ifdef MUI_LANGFILE_DEFAULT_TEMP
+!define LANGFILE_DEFAULT "${MUI_LANGFILE_DEFAULT}"
+  !endif
+  ;Add language to list of languages for selection dialog  
+  !ifndef MUI_LANGDLL_LANGUAGES
+   !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' 
'${LANG_${LANGUAGE}}' "
+!define MUI_LANGDLL_LANGUAGES_CP "'${LANGFILE_${LANGUAGE}_NAME}' 
'${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' "
+  !else
+!ifdef MUI_LANGDLL_LANGUAGES_TEMP
+  !undef MUI_LANGDLL_LANGUAGES_TEMP
+!endif
+!define MUI_LANGDLL_LANGUAGES_TEMP "${MUI_LANGDLL_LANGUAGES}"
+!undef MUI_LANGDLL_LANGUAGES
+   !ifdef MUI_LANGDLL_LANGUAGES_CP_TEMP
+  !undef MUI_LANGDLL_LANGUAGES_CP_TEMP
+!endif
+!define MUI_LANGDLL_LANGUAGES_CP_TEMP "${MU

[Libreoffice-commits] online.git: 3 commits - loolwsd/LOOLWSD.cpp loolwsd/test loolwsd/Unit.cpp

2016-10-21 Thread Michael Meeks
 loolwsd/LOOLWSD.cpp  |7 ++-
 loolwsd/Unit.cpp |3 ++-
 loolwsd/test/Makefile.am |6 ++
 3 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 715b5c0101b76126db1216d4095310c05494b976
Author: Michael Meeks 
Date:   Fri Oct 21 12:30:35 2016 +0100

Visible user error on unit test timeout.

diff --git a/loolwsd/Unit.cpp b/loolwsd/Unit.cpp
index 5eb7fb6..e07999c 100644
--- a/loolwsd/Unit.cpp
+++ b/loolwsd/Unit.cpp
@@ -7,6 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
 #include "Unit.hpp"
 #include "config.h"
 
@@ -164,7 +165,7 @@ void UnitBase::exitTest(TestResult result)
 
 void UnitBase::timeout()
 {
-Log::error("Timed out waiting for unit test to complete");
+std::cerr << "Timed out waiting for unit test to complete" << std::endl;
 exitTest(TestResult::TEST_TIMED_OUT);
 }
 
commit ae04deada8df952b07b902c5cf4d54fd3aeab10a
Author: Michael Meeks 
Date:   Fri Oct 21 12:30:02 2016 +0100

Restore ability to inject prisoner requests.

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index df9cf2e..12e6438 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1155,6 +1155,11 @@ public:
 request, response))
 return;
 
+handlePrisonerRequest(request, response);
+}
+
+static void handlePrisonerRequest(HTTPServerRequest& request, 
HTTPServerResponse& response)
+{
 Log::trace("Child connection with URI [" + request.getURI() + "].");
 assert(request.serverAddress().port() == MasterPortNumber);
 assert(request.getURI().find(NEW_CHILD_URI) == 0);
@@ -2004,7 +2009,7 @@ void UnitWSD::testHandleRequest(TestRequest type, 
UnitHTTPServerRequest& request
 ClientRequestHandler::handleClientRequest(request, response);
 break;
 case TestRequest::TEST_REQ_PRISONER:
-// No longer used. Only bridges WSD with child.
+PrisonerRequestHandler::handlePrisonerRequest(request, response);
 break;
 default:
 assert(false);
commit 15d090a0b09c7ded2356d2384b005dd56a782cd9
Author: Michael Meeks 
Date:   Fri Oct 21 12:29:18 2016 +0100

Define TDOC globally.

diff --git a/loolwsd/test/Makefile.am b/loolwsd/test/Makefile.am
index 70c073a..b11b0e2 100644
--- a/loolwsd/test/Makefile.am
+++ b/loolwsd/test/Makefile.am
@@ -9,7 +9,7 @@ check_PROGRAMS = test
 
 noinst_PROGRAMS = test unittest
 
-AM_CXXFLAGS = $(CPPUNIT_CFLAGS)
+AM_CXXFLAGS = $(CPPUNIT_CFLAGS) -DTDOC=\"$(top_srcdir)/test/data\"
 
 noinst_LTLIBRARIES = \
 unit-timeout.la unit-prefork.la \
@@ -37,7 +37,7 @@ wsd_sources = \
 ../Unit.cpp \
 ../Util.cpp
 
-test_CPPFLAGS = -DTDOC=\"$(abs_top_srcdir)/test/data\" -I$(top_srcdir) 
-DBUILDING_TESTS
+test_CPPFLAGS = -I$(top_srcdir) -DBUILDING_TESTS
 test_SOURCES = TileCacheTests.cpp integration-http-server.cpp \
httpwstest.cpp httpcrashtest.cpp httpwserror.cpp test.cpp 
$(wsd_sources)
 test_LDADD = $(CPPUNIT_LIBS)
@@ -50,13 +50,11 @@ unittest_LDADD = $(CPPUNIT_LIBS)
 unit_fuzz_la_SOURCES = UnitFuzz.cpp
 unit_admin_la_SOURCES = UnitAdmin.cpp
 unit_admin_la_LIBADD = $(CPPUNIT_LIBS)
-unit_admin_la_CPPFLAGS = -DTDOC=\"$(top_srcdir)/test/data\"
 unit_fonts_la_SOURCES = UnitFonts.cpp
 unit_timeout_la_SOURCES = UnitTimeout.cpp
 unit_prefork_la_SOURCES = UnitPrefork.cpp
 unit_storage_la_SOURCES = UnitStorage.cpp
 unit_tilecache_la_SOURCES = UnitTileCache.cpp
-unit_tilecache_la_CPPFLAGS = -DTDOC=\"$(top_srcdir)/test/data\"
 
 if HAVE_LO_PATH
 SYSTEM_STAMP = @SYSTEMPLATE_PATH@/system_stamp
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-21 Thread Miklos Vajna
 xmlsecurity/inc/pdfio/pdfdocument.hxx|6 
 xmlsecurity/source/pdfio/pdfdocument.cxx |   42 ++-
 xmlsecurity/source/pdfio/pdfverify.cxx   |   35 -
 3 files changed, 80 insertions(+), 3 deletions(-)

New commits:
commit 5819448023377b81ac785dc31ccf8333562ee51f
Author: Miklos Vajna 
Date:   Fri Oct 21 16:00:58 2016 +0200

xmlsecurity: implement removal of a signature in pdfverify

It's not exactly clear how one should guess what was file end before
signing, for now assume the followings:

- the file ended with a %%EOF, an optional \r, and a \n
- the number of incremental updates is the same as the number of
  signatures

When the later is not the case, don't attempt to remove the signature.

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

diff --git a/xmlsecurity/inc/pdfio/pdfdocument.hxx 
b/xmlsecurity/inc/pdfio/pdfdocument.hxx
index 816904f..b02bf93 100644
--- a/xmlsecurity/inc/pdfio/pdfdocument.hxx
+++ b/xmlsecurity/inc/pdfio/pdfdocument.hxx
@@ -46,6 +46,8 @@ class XMLSECURITY_DLLPUBLIC PDFDocument
 std::vector m_aXRef;
 /// List of xref offsets we know.
 std::vector m_aStartXRefs;
+/// List of EOF offsets we know.
+std::vector m_aEOFs;
 PDFTrailerElement* m_pTrailer;
 /// All editing takes place in this buffer, if it happens.
 SvMemoryStream m_aEditBuffer;
@@ -65,6 +67,8 @@ public:
 size_t GetObjectOffset(size_t nIndex) const;
 const std::vector< std::unique_ptr >& GetElements();
 std::vector GetPages();
+/// Remember the end location of an EOF token.
+void PushBackEOF(size_t nOffset);
 
 bool Read(SvStream& rStream);
 /// Sign the read document with xCertificate in the edit buffer.
@@ -74,6 +78,8 @@ public:
 std::vector GetSignatureWidgets();
 /// Return value is about if we can determine a result, rInformation is 
about the actual result.
 static bool ValidateSignature(SvStream& rStream, PDFObjectElement* 
pSignature, SignatureInformation& rInformation);
+/// Remove the nth signature from read document in the edit buffer.
+bool RemoveSignature(size_t nPosition);
 };
 
 } // namespace pdfio
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx 
b/xmlsecurity/source/pdfio/pdfdocument.cxx
index 479bc1c..6543734 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -48,9 +48,11 @@ class PDFObjectElement;
 /// A one-liner comment.
 class PDFCommentElement : public PDFElement
 {
+PDFDocument& m_rDoc;
 OString m_aComment;
 
 public:
+PDFCommentElement(PDFDocument& rDoc);
 bool Read(SvStream& rStream) override;
 };
 
@@ -233,6 +235,30 @@ PDFDocument::PDFDocument()
 {
 }
 
+bool PDFDocument::RemoveSignature(size_t nPosition)
+{
+std::vector aSignatures = GetSignatureWidgets();
+if (nPosition >= aSignatures.size())
+{
+SAL_WARN("xmlsecurity.pdfio", "PDFDocument::RemoveSignature: invalid 
nPosition");
+return false;
+}
+
+if (aSignatures.size() != m_aEOFs.size() - 1)
+{
+SAL_WARN("xmlsecurity.pdfio", "PDFDocument::RemoveSignature: no 1:1 
mapping between signatures and incremental updates");
+return false;
+}
+
+// The EOF offset is the end of the original file, without the signature at
+// nPosition.
+m_aEditBuffer.Seek(m_aEOFs[nPosition]);
+// Drop all bytes after the current position.
+m_aEditBuffer.SetStreamSize(m_aEditBuffer.Tell() + 1);
+
+return m_aEditBuffer.good();
+}
+
 bool PDFDocument::Sign(const uno::Reference& 
xCertificate, const OUString& rDescription)
 {
 m_aEditBuffer.WriteCharPtr("\n");
@@ -530,7 +556,7 @@ bool PDFDocument::Read(SvStream& rStream)
 {
 case '%':
 {
-m_aElements.push_back(std::unique_ptr(new 
PDFCommentElement()));
+m_aElements.push_back(std::unique_ptr(new 
PDFCommentElement(*this)));
 rStream.SeekRel(-1);
 if (!m_aElements.back()->Read(rStream))
 return false;
@@ -927,6 +953,11 @@ std::vector PDFDocument::GetPages()
 return aRet;
 }
 
+void PDFDocument::PushBackEOF(size_t nOffset)
+{
+m_aEOFs.push_back(nOffset);
+}
+
 std::vector PDFDocument::GetSignatureWidgets()
 {
 std::vector aRet;
@@ -1288,6 +1319,11 @@ bool PDFDocument::ValidateSignature(SvStream& rStream, 
PDFObjectElement* pSignat
 #endif
 }
 
+PDFCommentElement::PDFCommentElement(PDFDocument& rDoc)
+: m_rDoc(rDoc)
+{
+}
+
 bool PDFCommentElement::Read(SvStream& rStream)
 {
 // Read from (including) the % char till (excluding) the end of the line.
@@ -1299,6 +1335,10 @@ bool PDFCommentElement::Read(SvStream& rStream)
 if (ch == 0x0a)
 {
 m_aComment = aBuf.makeStringAndClear();
+
+if (m_aComment.startsWith("%%EOF"))
+   

[Libreoffice-commits] core.git: extensions/source fpicker/source

2016-10-21 Thread Stephan Bergmann
 extensions/source/ole/oleobjw.cxx |8 
 fpicker/source/win32/filepicker/asyncrequests.hxx |2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 98d9bb5eb266ff4f897adbe4d0c0a49ff9b4c7bb
Author: Stephan Bergmann 
Date:   Fri Oct 21 18:14:18 2016 +0200

Adapt Windows-only code to deletion of the "Any-to-Any" specializatios

...upcoming with  "Delete the 
'Any-
to-Any' template specializations for LIBO_INTERNAL_ONLY"

Change-Id: If070825d88ffa7bb49e645b3bfeae9dfa387f000

diff --git a/extensions/source/ole/oleobjw.cxx 
b/extensions/source/ole/oleobjw.cxx
index 25112dd..272491c 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -1386,14 +1386,14 @@ uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( 
const OUString& aName, con
 {
 PropertyPutArgument arg;
 anyArg >>= arg;
-anyArg <<= arg.Value;
+anyArg = arg.Value;
 }
 // named argument
 if (anyArg.getValueType() == 
cppu::UnoType::get())
 {
 NamedArgument aNamedArgument;
 anyArg >>= aNamedArgument;
-anyArg <<= aNamedArgument.Value;
+anyArg = aNamedArgument.Value;
 }
 
 if ( nInd < aParams.getLength() && anyArg.getValueTypeClass() 
!= TypeClass_VOID )
@@ -1858,14 +1858,14 @@ Any  
IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
 {
 PropertyPutArgument arg;
 anyArg >>= arg;
-anyArg <<= arg.Value;
+anyArg = arg.Value;
 }
 // named argument
 if (anyArg.getValueType() == cppu::UnoType::get())
 {
 NamedArgument aNamedArgument;
 anyArg >>= aNamedArgument;
-anyArg <<= aNamedArgument.Value;
+anyArg = aNamedArgument.Value;
 }
 // out param
 if (paramFlags & PARAMFLAG_FOUT &&
diff --git a/fpicker/source/win32/filepicker/asyncrequests.hxx 
b/fpicker/source/win32/filepicker/asyncrequests.hxx
index 50f0a56..2b62ba7 100644
--- a/fpicker/source/win32/filepicker/asyncrequests.hxx
+++ b/fpicker/source/win32/filepicker/asyncrequests.hxx
@@ -83,7 +83,7 @@ class Request
 void setArgument(const OUString& sName ,
  const TArgumentType&   aValue)
 {
-m_lArguments[sName] <<= aValue;
+m_lArguments[sName] = css::uno::toAny(aValue);
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-21 Thread Stephan Bergmann
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 429e4dc671f03e0c4d50e8f8aa055f4aaca761da
Author: Stephan Bergmann 
Date:   Fri Oct 21 18:00:03 2016 +0200

Avoid further crash with empty Chart document

following up on 8b5f8c26f007c8e67bc46b1b09340cae660d0b8b "Avoid crash with 
empty
Chart document", when you then close the Writer doc (discarding the 
changes), it
crashes in a chart::sidebar::ChartSidebarModifyListener::disposing call 
whose
mpParent (that was a ChartElementsPanel) is already destroyed.  The problem 
is
that the ChartElementsPanel ctor creates an mxListener pointing to this, 
then
calls Initialize, which calls xBroadcaster->addModifyListener(mxListener) 
and
then, during updateData, throws a RuntimeException when xDiagram is null in
getChartType, causing the ChartElementsPanel object to immediately be 
destroyed,
but the listener still registered.  This apparently needs fixing 
independently
of the immediate problem.  (The immediate problem is a regression introduced
with d7748842e96536daeb0c638c6f8d01d99b9a3e08 "hide grid and axes options in
chart elements if not supported, tdf#94297".)

Change-Id: I2fe4f2a59600664f6210456c65e033f9453f4cc9

diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx 
b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 11e9956..c037fea 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -391,6 +391,9 @@ css::uno::Reference 
getChartType(const css::uno::Refere
 {
 css::uno::Reference xChartDoc(xModel, 
css::uno::UNO_QUERY_THROW);
 css::uno::Reference xDiagram = 
xChartDoc->getFirstDiagram();
+if (!xDiagram.is()) {
+return css::uno::Reference();
+}
 
 css::uno::Reference 
xCooSysContainer( xDiagram, css::uno::UNO_QUERY_THROW );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-21 Thread Caolán McNamara
 filter/source/msfilter/mscodec.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e2fa592c770222344fccb0e39db3d500fc7690b5
Author: Caolán McNamara 
Date:   Fri Oct 21 16:53:33 2016 +0100

clang plugin for push_back after using sized constructor

the warning is bogus for this ctor, but the clang plugin
is still active in gerrit at the moment.

Change-Id: Ia55260491988a12a48e49dc4962733261d13e2a1

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


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

2016-10-21 Thread Tomaž Vajngerl
 include/opencl/openclwrapper.hxx |1 
 opencl/source/openclwrapper.cxx  |   81 +++
 2 files changed, 49 insertions(+), 33 deletions(-)

New commits:
commit aac6388b44a55d33222f31e42b5b1e090912792d
Author: Tomaž Vajngerl 
Date:   Thu Oct 13 12:55:57 2016 +0200

tdf#103204 opencl: initialize command queue on demand

Change-Id: Ie3da1d6ec91e951b1ffc15abf376c7af57789e47
Reviewed-on: https://gerrit.libreoffice.org/29802
Reviewed-by: Tomaž Vajngerl 
Tested-by: Tomaž Vajngerl 
(cherry picked from commit 4eea4af8924e3b1bb00c22cf1f9d21fc4dec6e83)
Reviewed-on: https://gerrit.libreoffice.org/29995
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 
Reviewed-by: Tor Lillqvist 
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/include/opencl/openclwrapper.hxx b/include/opencl/openclwrapper.hxx
index dae1192..233412f 100644
--- a/include/opencl/openclwrapper.hxx
+++ b/include/opencl/openclwrapper.hxx
@@ -42,6 +42,7 @@ struct OPENCL_DLLPUBLIC GPUEnv
 cl_context mpContext;
 cl_device_id mpDevID;
 cl_command_queue mpCmdQueue[OPENCL_CMDQUEUE_SIZE];
+bool mbCommandQueueInitialized;
 cl_program mpArryPrograms[MAX_CLFILE_NUM]; //one program object maps one 
kernel source file
 int mnIsUserCreated; // 1: created , 0:no create and needed to create by 
opencl wrapper
 int mnCmdQueuePos;
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx
index d8d16c3..5d40a54 100644
--- a/opencl/source/openclwrapper.cxx
+++ b/opencl/source/openclwrapper.cxx
@@ -103,8 +103,54 @@ OString getCacheFolder()
 
 }
 
+bool initializeCommandQueue(GPUEnv& aGpuEnv)
+{
+OpenCLZone zone;
+
+cl_int nState;
+cl_command_queue command_queue[OPENCL_CMDQUEUE_SIZE];
+
+for (int i = 0; i < OPENCL_CMDQUEUE_SIZE; ++i)
+{
+command_queue[i] = clCreateCommandQueue(aGpuEnv.mpContext, 
aGpuEnv.mpDevID, 0, &nState);
+if (nState != CL_SUCCESS)
+SAL_WARN("opencl", "clCreateCommandQueue failed: " << 
errorString(nState));
+
+if (command_queue[i] == nullptr || nState != CL_SUCCESS)
+{
+// Release all command queues created so far.
+for (int j = 0; j <= i; ++j)
+{
+if (command_queue[j])
+{
+clReleaseCommandQueue(command_queue[j]);
+command_queue[j] = nullptr;
+}
+}
+
+clReleaseContext(aGpuEnv.mpContext);
+SAL_WARN("opencl", "failed to set/switch opencl device");
+return false;
+}
+
+SAL_INFO("opencl", "Created command queue " << command_queue[i] << " 
for context " << aGpuEnv.mpContext);
+}
+
+for (int i = 0; i < OPENCL_CMDQUEUE_SIZE; ++i)
+{
+aGpuEnv.mpCmdQueue[i] = command_queue[i];
+}
+aGpuEnv.mbCommandQueueInitialized = true;
+return true;
+}
+
 void setKernelEnv( KernelEnv *envInfo )
 {
+if (!gpuEnv.mbCommandQueueInitialized)
+{
+initializeCommandQueue(gpuEnv);
+}
+
 envInfo->mpkContext = gpuEnv.mpContext;
 envInfo->mpkProgram = gpuEnv.mpArryPrograms[0];
 
@@ -265,8 +311,7 @@ bool initOpenCLAttr( OpenCLEnv * env )
 
 gpuEnv.mnIsUserCreated = 1;
 
-for (int i = 0; i < OPENCL_CMDQUEUE_SIZE; ++i)
-gpuEnv.mpCmdQueue[i] = env->mpOclCmdQueue[i];
+gpuEnv.mbCommandQueueInitialized = false;
 
 gpuEnv.mnCmdQueuePos = 0; // default to 0.
 
@@ -765,7 +810,6 @@ bool switchOpenCLDevice(const OUString* pDevice, bool 
bAutoSelect, bool bForceEv
 
 cl_context context;
 cl_platform_id platformId;
-cl_command_queue command_queue[OPENCL_CMDQUEUE_SIZE];
 
 {
 OpenCLZone zone;
@@ -790,33 +834,6 @@ bool switchOpenCLDevice(const OUString* pDevice, bool 
bAutoSelect, bool bForceEv
 }
 SAL_INFO("opencl", "Created context " << context << " for platform " 
<< platformId << ", device " << pDeviceId);
 
-for (int i = 0; i < OPENCL_CMDQUEUE_SIZE; ++i)
-{
-command_queue[i] = clCreateCommandQueue(
-context, pDeviceId, 0, &nState);
-if (nState != CL_SUCCESS)
-SAL_WARN("opencl", "clCreateCommandQueue failed: " << 
errorString(nState));
-
-if (command_queue[i] == nullptr || nState != CL_SUCCESS)
-{
-// Release all command queues created so far.
-for (int j = 0; j <= i; ++j)
-{
-if (command_queue[j])
-{
-clReleaseCommandQueue(command_queue[j]);
-command_queue[j] = nullptr;
-}
-}
-
-clReleaseContext(context);
-SAL_WARN("opencl", "failed to set/switch opencl device");
-return false;
-}
-
-SAL_INFO("opencl", "Created command queue " << comman

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

2016-10-21 Thread Caolán McNamara
 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 7f6f5519079e3508ac1302aa5907cfc6098c525e
Author: Caolán McNamara 
Date:   Fri Oct 21 16:31:09 2016 +0100

Resolves: tdf#103320 pressed buttons appear as hover buttons in toolbar

since...

commit 3498ed37527b7af795f00dc6a55c11e65a313186
Author: Caolán McNamara 
Date:   Tue Oct 18 13:08:47 2016 +0100

Resolves: tdf#100251 gtk3 toolbar separators are white in Adwaita

so remove setting the parent of the toolbar again, colors remain good
cause we ended up using gtk_render_background+gtk_render_frame for
the new-style code path anyway

Change-Id: Idd01537acbd92d6b41e0ff7fa2306b8c49f23ad3

diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx 
b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 8d6c2d0..fc2bb82 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -2941,7 +2941,6 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, 
GtkWidget *pWindow )
 mpLinkButtonStyle = createStyleContext(set_object_name, 
GtkControlPart::LinkButton);
 
 GtkWidget* pToolbar = gtk_toolbar_new();
-gtk_container_add(GTK_CONTAINER(gDumbContainer), pToolbar);
 mpToolbarStyle = gtk_widget_get_style_context(pToolbar);
 gtk_style_context_add_class(mpToolbarStyle, 
GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
 gtk_style_context_add_class(mpToolbarStyle, GTK_STYLE_CLASS_TOOLBAR);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-21 Thread Caolán McNamara
 vcl/inc/unx/gtk/gtkdata.hxx   |2 +
 vcl/inc/unx/gtk/gtkframe.hxx  |7 +++
 vcl/unx/gtk3/gtk3gtkdata.cxx  |4 ++
 vcl/unx/gtk3/gtk3gtkframe.cxx |   75 +-
 4 files changed, 58 insertions(+), 30 deletions(-)

New commits:
commit 28fe78604ca46319ae596d04ddca206e6b2672a7
Author: Caolán McNamara 
Date:   Fri Oct 21 14:14:10 2016 +0100

catch and rethrow later uno exceptions within glib signals

after g_main_context_iteration when its safe to do so again

otherwise if something happens inside the glib signal
callback and the exception skips the code waiting
for the callback to return, subsequent attempts to
show the native gtk3 error dialog will fail

Change-Id: I271c09f8f1f00c0eca76191fcb63ddf56c10060f

diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index f5e1e03..ffb0fb7 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -97,6 +97,7 @@ class GtkData : public SalGenericData
 GSource* m_pUserEvent;
 osl::Mutex   m_aDispatchMutex;
 oslCondition m_aDispatchCondition;
+css::uno::Any m_aException;
 bool blockIdleTimeout;
 
 public:
@@ -120,6 +121,7 @@ public:
 
 inline GtkSalDisplay *GetGtkDisplay() const;
 bool BlockIdleTimeout() const { return blockIdleTimeout; }
+void setException(const css::uno::Any& rException) { m_aException = 
rException; }
 };
 
 class GtkSalFrame;
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 0cdff6c..40ae9e2 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -539,6 +539,13 @@ public:
 sal_uIntPtr GetNativeWindowHandle(GtkWidget *pWidget);
 virtual sal_uIntPtr GetNativeWindowHandle() override;
 
+//Call the usual SalFrame Callback, but catch uno exceptionss and delegate
+//to GtkData to rethrow them after the gsignal is processed when its safe
+//to do so again in our own code after the g_main_context_iteration call
+//which triggers the gsignals.
+longCallCallbackExc(SalEvent nEvent, const void* 
pEvent) const;
+
+
 static void KeyCodeToGdkKey(const vcl::KeyCode& rKeyCode,
 guint* pGdkKeyCode, GdkModifierType *pGdkModifiers);
 
diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx
index 17cad89f..70f9249 100644
--- a/vcl/unx/gtk3/gtk3gtkdata.cxx
+++ b/vcl/unx/gtk3/gtk3gtkdata.cxx
@@ -51,6 +51,8 @@
 #  include 
 #endif
 
+#include 
+
 using namespace vcl_sal;
 
 /***
@@ -478,6 +480,8 @@ SalYieldResult GtkData::Yield( bool bWait, bool 
bHandleAllCurrentEvents )
 if( wasOneEvent )
 bWasEvent = true;
 }
+if (m_aException.hasValue())
+::cppu::throwException(m_aException);
 }
 else if( bWait )
 {
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 9fc972da..e5ddb07 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -453,7 +454,7 @@ void GtkSalFrame::doKeyCallback( guint state,
 
 if( bDown )
 {
-bool bHandled = CallCallback( SalEvent::KeyInput, &aEvent );
+bool bHandled = CallCallbackExc( SalEvent::KeyInput, &aEvent );
 // #i46889# copy AlternateKeyCode handling from generic plugin
 if( ! bHandled )
 {
@@ -463,16 +464,16 @@ void GtkSalFrame::doKeyCallback( guint state,
 aEvent.mnCode = aAlternate.nKeyCode;
 if( aAlternate.nCharCode )
 aEvent.mnCharCode = aAlternate.nCharCode;
-CallCallback( SalEvent::KeyInput, &aEvent );
+CallCallbackExc( SalEvent::KeyInput, &aEvent );
 }
 }
 if( bSendRelease && ! aDel.isDeleted() )
 {
-CallCallback( SalEvent::KeyUp, &aEvent );
+CallCallbackExc( SalEvent::KeyUp, &aEvent );
 }
 }
 else
-CallCallback( SalEvent::KeyUp, &aEvent );
+CallCallbackExc( SalEvent::KeyUp, &aEvent );
 }
 
 GtkSalFrame::GtkSalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle )
@@ -2611,7 +2612,7 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, 
GdkEventButton* pEvent, gpointer
 
 if (!aDel.isDeleted())
 {
-pThis->CallCallback( nEventType, &aEvent );
+pThis->CallCallbackExc( nEventType, &aEvent );
 }
 
 return true;
@@ -2651,7 +2652,7 @@ gboolean GtkSalFrame::signalScroll(GtkWidget*, 
GdkEventScroll* pEvent, gpointer
 if (aEvent.mnScrollLines == 0)
 aEvent.mnScrollLines = 1;
 
-pThis->CallCallback(SalEvent::WheelMouse, &aEvent);
+pThis->CallCallbackExc(SalEvent::WheelMouse, &aEvent);
 }
 
 if

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

2016-10-21 Thread Stephan Bergmann
 chart2/source/controller/main/ChartController.cxx |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 3a0c25d65f7c034eace5dd0aee7d36e24277bfa7
Author: Stephan Bergmann 
Date:   Fri Oct 21 17:10:25 2016 +0200

Only call getChartType when the return value is actually used

Change-Id: I687ef0ce7013bce08caa25e1e6035507b814e20a

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index ce70a16..c79a917 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -311,8 +311,6 @@ OUString ChartController::GetContextName()
 return OUString("Chart");
 
 ObjectType eObjectID = ObjectIdentifier::getObjectType(aCID);
-
-css::uno::Reference xChartType = 
getChartType(css::uno::Reference(getModel(), 
uno::UNO_QUERY));
 switch (eObjectID)
 {
 case OBJECTTYPE_DATA_SERIES:
@@ -327,9 +325,12 @@ OUString ChartController::GetContextName()
 case OBJECTTYPE_GRID:
 return OUString("Grid");
 case OBJECTTYPE_DIAGRAM:
-if (xChartType.is() && xChartType->getChartType() == 
"com.sun.star.chart2.PieChartType")
-return OUString("ChartElements");
-break;
+{
+css::uno::Reference xChartType = 
getChartType(css::uno::Reference(getModel(), 
uno::UNO_QUERY));
+if (xChartType.is() && xChartType->getChartType() == 
"com.sun.star.chart2.PieChartType")
+return OUString("ChartElements");
+break;
+}
 case OBJECTTYPE_DATA_CURVE:
 case OBJECTTYPE_DATA_AVERAGE_LINE:
 return OUString("Trendline");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: minutes of ESC call ...

2016-10-21 Thread Caolán McNamara
On Thu, 2016-10-20 at 15:58 +0100, Michael Meeks wrote:
> 
> * Crashtest update (Caolan)
> + tragic lack of Caolan.

I've a small leak in my roof. As is par for the course, the roofer
showed up for his 9am appointment at 3pm :-)

+ 2 import failures, 0 export failures
+ 34 coverity defects, move assignment warnings are a pain,
      but made a little more progress
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 3 commits - desktop/qa sfx2/source

2016-10-21 Thread Miklos Vajna
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   83 +++-
 sfx2/source/control/bindings.cxx|4 -
 2 files changed, 11 insertions(+), 76 deletions(-)

New commits:
commit 1e6c89bf752ff93efa1b782564257767d0165cc7
Author: Miklos Vajna 
Date:   Thu Oct 20 08:14:07 2016 +0200

CppunitTest_desktop_lib: fix valgrind errors

With this, 'make -sr CppunitTest_desktop_lib
CPPUNIT_TEST_NAME="DesktopLOKTest::testPaintPartTile
DesktopLOKTest::testWriterCommentInsertCursor" VALGRIND=memcheck'
finishes with 'ERROR SUMMARY: 0 errors from 0 contexts'.

The problem is that in sw/sc/sd code it's enough to make sure that the
on-stack ViewCallback instances are destroyed after the loaded
component, but in desktop/ code also the emit-callbacks-on-idle code is
under test, so we need to make sure first the LOK document wrapper is
destroyed, and only after that the ViewCallback instances are destroyed.

Change-Id: Ie8361233461d00fd252da929fb912a1a0b835c30
Reviewed-on: https://gerrit.libreoffice.org/30072
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 
(cherry picked from commit ef7ab996d8e4479b1944f7eaf506a506647a90dd)

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 2dc83d9..03f3262 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -1307,16 +1307,17 @@ void DesktopLOKTest::testPaintPartTile()
 {
 // Load an impress doc of 2 slides.
 comphelper::LibreOfficeKit::setActive();
-LibLODocument_Impl* pDocument = loadDoc("2slides.odp");
-pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
 ViewCallback aView1;
+ViewCallback aView2;
+std::unique_ptr xDocument(loadDoc("2slides.odp"));
+LibLODocument_Impl* pDocument = xDocument.get();
+pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
 pDocument->m_pDocumentClass->registerCallback(pDocument, 
&ViewCallback::callback, &aView1);
 int nView1 = pDocument->m_pDocumentClass->getView(pDocument);
 
 // Create a second view.
 pDocument->m_pDocumentClass->createView(pDocument);
 pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
-ViewCallback aView2;
 pDocument->m_pDocumentClass->registerCallback(pDocument, 
&ViewCallback::callback, &aView2);
 
 // Go to the second slide in the second view.
@@ -1344,7 +1345,6 @@ void DesktopLOKTest::testPaintPartTile()
 CPPUNIT_ASSERT(aView1.m_bTilesInvalidated);
 
 Scheduler::ProcessEventsToIdle();
-mxComponent->dispose();
 mxComponent.clear();
 comphelper::LibreOfficeKit::setActive(false);
 }
@@ -1353,13 +1353,14 @@ void DesktopLOKTest::testWriterCommentInsertCursor()
 {
 // Load a document and type a character into the body text of the second 
view.
 comphelper::LibreOfficeKit::setActive();
-LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
-pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
 ViewCallback aView1;
+ViewCallback aView2;
+std::unique_ptr xDocument(loadDoc("blank_text.odt"));
+LibLODocument_Impl* pDocument = xDocument.get();
+pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
 pDocument->m_pDocumentClass->registerCallback(pDocument, 
&ViewCallback::callback, &aView1);
 pDocument->m_pDocumentClass->createView(pDocument);
 pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
-ViewCallback aView2;
 pDocument->m_pDocumentClass->registerCallback(pDocument, 
&ViewCallback::callback, &aView2);
 pDocument->m_pDocumentClass->postKeyEvent(pDocument, 
LOK_KEYEVENT_KEYINPUT, 'x', 0);
 pDocument->m_pDocumentClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYUP, 
'x', 0);
@@ -1384,7 +1385,6 @@ void DesktopLOKTest::testWriterCommentInsertCursor()
 CPPUNIT_ASSERT(aView1.m_aOwnCursor.IsEmpty());
 
 Scheduler::ProcessEventsToIdle();
-mxComponent->dispose();
 mxComponent.clear();
 comphelper::LibreOfficeKit::setActive(false);
 }
commit 77caedfd01e4e38dd30ac1270433ae6ae1d5a53d
Author: Miklos Vajna 
Date:   Wed Oct 19 15:17:14 2016 +0200

Revert "CppunitTest_desktop_lib: add ModifiedStatus callback testcase"

This reverts commit cdf08b3aa74bb32ea18b583a9c0c41b91d7819ac. It breaks
'make -sr CppunitTest_desktop_lib
CPPUNIT_TEST_NAME="DesktopLOKTest::testPaintPartTile
DesktopLOKTest::testWriterCommentInsertCursor" VALGRIND=memcheck' (it is
terminated by SIGSEGV), and also it's the reason why sometimes the
lo_ubsan buildbot fails, see e.g.
.

This has to be re-introduced once I find a way to process all binding
updates at once without side-effects.

Conflicts:
desktop/qa/desktop_lib/test_desktop_lib.cxx
sfx2/source/control/bindings.cxx


Re: Merging feature/commonsallayout branch

2016-10-21 Thread Khaled Hosny
On Fri, Oct 21, 2016 at 06:40:08AM -0700, V Stuart Foote wrote:
> On Windows 8.1 & 10 builds (32-bit master TB62) and the Alpha1 build,
> HARFBUZZ unified text is having some issues with OpenGL rendering.  With
> default GPU rendering it is doing pretty well.
> 
> See  tdf#103365 - Text isn't showing in the new commonsallayout if OpenGL is
> on   

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

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


Re: dark themes

2016-10-21 Thread Caolán McNamara
On Wed, 2016-10-19 at 12:26 +0200, Tomaž Vajngerl wrote:
> For now I would switch to breeze dark theme as it is the only dark
> theme we have.

FWIW, I pushed something to do this, seems to work ok for me anyway.

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


Re: Merging feature/commonsallayout branch

2016-10-21 Thread V Stuart Foote
On Windows 8.1 & 10 builds (32-bit master TB62) and the Alpha1 build,
HARFBUZZ unified text is having some issues with OpenGL rendering.  With
default GPU rendering it is doing pretty well.

See  tdf#103365 - Text isn't showing in the new commonsallayout if OpenGL is
on   



--
View this message in context: 
http://nabble.documentfoundation.org/Merging-feature-commonsallayout-branch-tp4197400p4197843.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


Minutes of the Design Hangout: 2016-Oct-21

2016-10-21 Thread Heiko Tietze
Present: 
+ Heiko, Yousuf, Cor, Kendy, Tomaz

Organization

 * Annual report discussed 
   + (find details in the pad)

Tickets

 * Update website link
   + https://bugs.documentfoundation.org/show_bug.cgi?id=96159
 -> done meanwhile by buovjaga

 * Edit>Paste/Toolbar behave like ctrl+V (Steve/Heiko)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=99673
 + Implementation is a mess (kendy)
 + Users do not use menu/toolbar when in dialogs (Jay, Cor)
 + wrong approach to mess with the usual clipboard operations (Heiko)
 -> ticket is closed and will kept as resolved

 * UI request for 'Merge Cells' control in 'Format - Cells' window (Jay)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=101835
 + Arguments to WONTFIX in the bugtracker (Heiko)
 + Weak argument, workflow is needed (Jay)
 -> keep ticket alive and discuss in bugzilla




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


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

2016-10-21 Thread Armin Le Grand
 comphelper/source/misc/backupfilehelper.cxx |  160 +--
 include/comphelper/backupfilehelper.hxx |   13 ++
 svx/source/dialog/SafeModeDialog.cxx|   34 +
 svx/source/dialog/SafeModeDialog.hxx|2 
 svx/uiconfig/ui/safemodedialog.ui   |  162 
 5 files changed, 267 insertions(+), 104 deletions(-)

New commits:
commit d1b3a33d995ff28fd3fd05c66f4358f522edc126
Author: Armin Le Grand 
Date:   Thu Oct 20 13:30:40 2016 +0200

profilesafe: Added more specific options

For Extensions there is the possibility to not only
decide enable/disable state for User ones, but also
to deinstall user or all extensions, added these
options to the dialog and the functionality.
Also unified customization name schema to have just
one source of strings to avoid errors in the future.
Small fix in tryPop_extensionInfo

Change-Id: I39acbe9a052ffd4cb78b496f24e5b583136c565a
Reviewed-on: https://gerrit.libreoffice.org/30100
Tested-by: Jenkins 
Reviewed-by: Armin Le Grand 

diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index e654c33..d8780d9 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -677,7 +677,9 @@ namespace
 }
 
 public:
-void createUsingExtensionRegistryEntriesFromXML(const OUString& 
rUserConfigWorkURL)
+void createUsingExtensionRegistryEntriesFromXML(
+const OUString& rUserConfigWorkURL,
+bool bUser)
 {
 // This is looked up for 'user' in the user|shared|bundled 
deployed Extensions,
 // only the user ones seem to be able to be de/activated. The ones 
for user are in
@@ -686,13 +688,15 @@ namespace
 // in safe mode by deleting the uno_packages directory and the 
shared|bundled
 // ones by deleting the extensions directory.
 const OUString 
aRegPath("/registry/com.sun.star.comp.deployment.bundle.PackageRegistryBackend/backenddb.xml");
-const OUString aUnoPackagReg(rUserConfigWorkURL + 
"/uno_packages/cache" + aRegPath);
+const OUString aExtensionsReg(rUserConfigWorkURL + 
"/extensions/shared" + aRegPath);
+const OUString aUnoPackageReg(rUserConfigWorkURL + 
"/uno_packages/cache" + aRegPath);
+const OUString aPath(bUser ? aUnoPackageReg : aExtensionsReg);
 
-if (fileExists(aUnoPackagReg))
+if (fileExists(aPath))
 {
 uno::Reference< uno::XComponentContext > xContext = 
::comphelper::getProcessComponentContext();
 uno::Reference< xml::dom::XDocumentBuilder > 
xBuilder(xml::dom::DocumentBuilder::create(xContext));
-uno::Reference< xml::dom::XDocument > aDocument = 
xBuilder->parseURI(aUnoPackagReg);
+uno::Reference< xml::dom::XDocument > aDocument = 
xBuilder->parseURI(aPath);
 
 if (aDocument.is())
 {
@@ -1907,20 +1911,6 @@ namespace comphelper
 return bPopPossible;
 }
 
-bool BackupFileHelper::isPopPossibleExtensionInfo()
-{
-bool bPopPossible(false);
-
-if (mbActive && mbExtensions)
-{
-const OUString aPackURL(getPackURL());
-
-bPopPossible = isPopPossible_extensionInfo(aPackURL);
-}
-
-return bPopPossible;
-}
-
 bool BackupFileHelper::tryPop()
 {
 bool bDidPop(false);
@@ -1952,6 +1942,20 @@ namespace comphelper
 return bDidPop;
 }
 
+bool BackupFileHelper::isPopPossibleExtensionInfo()
+{
+bool bPopPossible(false);
+
+if (mbActive && mbExtensions)
+{
+const OUString aPackURL(getPackURL());
+
+bPopPossible = isPopPossible_extensionInfo(aPackURL);
+}
+
+return bPopPossible;
+}
+
 bool BackupFileHelper::tryPopExtensionInfo()
 {
 bool bDidPop(false);
@@ -1979,7 +1983,7 @@ namespace comphelper
 // extensions are not loaded from XExtensionManager
 class ExtensionInfo aExtensionInfo;
 
-
aExtensionInfo.createUsingExtensionRegistryEntriesFromXML(maUserConfigWorkURL);
+
aExtensionInfo.createUsingExtensionRegistryEntriesFromXML(maUserConfigWorkURL, 
true);
 
 return aExtensionInfo.areThereEnabledExtensions();
 }
@@ -1993,7 +1997,7 @@ namespace comphelper
 const ExtensionInfoEntryVector aToBeEnabled{};
 ExtensionInfoEntryVector aToBeDisabled;
 
-
aCurrentExtensionInfo.createUsingExtensionRegistryEntriesFromXML(maUserConfigWorkURL);
+
aCurrentExtensionInfo.createUsingExtensionRegistryEntriesFromXML(maUserConfigWorkURL,
 true);
 
 const ExtensionInfoEntryVector& rCurrentVector = 
aCurrentExtensionInfo.getExtensionInfoEntryVector();
 
@@ -2008,29 +2012,109 @@ namespace comphelper
 ExtensionInfo::chan

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

2016-10-21 Thread Stephan Bergmann
 chart2/source/controller/main/ChartController.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c5feb9ad79c9c830ca824e29277ff41c5cc24e7d
Author: Stephan Bergmann 
Date:   Fri Oct 21 15:30:55 2016 +0200

Minor improvement of previous commit

Change-Id: I1ab0d8756be5f8bf60c6bac3e9217db71e8e05a3

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index a4a6417..ce70a16 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -278,7 +278,7 @@ css::uno::Reference getChartType(
 const css::uno::Reference& xChartDoc)
 {
 Reference  xDiagram = xChartDoc->getFirstDiagram();
-if (xDiagram == nullptr) {
+if (!xDiagram.is()) {
 return css::uno::Reference();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

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

New commits:
commit 834abca71b4899a3ef115df30f68ad2202019247
Author: Miklos Vajna 
Date:   Fri Oct 21 14:33:36 2016 +0200

xmlsecurity PDF export: fix missing /Prev key in the trailer dictionary

"In addition, the added trailer dictionary shall contain a Prev entry
giving the location of the previous cross-reference section."
(ISO-32000-1, section 7.5.6). Add it, even if it seems Adobe Acrobat can
live with not writing it.

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

diff --git a/xmlsecurity/inc/pdfio/pdfdocument.hxx 
b/xmlsecurity/inc/pdfio/pdfdocument.hxx
index bb132a6..816904f 100644
--- a/xmlsecurity/inc/pdfio/pdfdocument.hxx
+++ b/xmlsecurity/inc/pdfio/pdfdocument.hxx
@@ -44,6 +44,8 @@ class XMLSECURITY_DLLPUBLIC PDFDocument
 std::vector< std::unique_ptr > m_aElements;
 // List of object offsets we know.
 std::vector m_aXRef;
+/// List of xref offsets we know.
+std::vector m_aStartXRefs;
 PDFTrailerElement* m_pTrailer;
 /// All editing takes place in this buffer, if it happens.
 SvMemoryStream m_aEditBuffer;
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx 
b/xmlsecurity/source/pdfio/pdfdocument.cxx
index d36c9aa..479bc1c 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -414,6 +414,14 @@ bool PDFDocument::Sign(const 
uno::Reference& xCertificat
 }
 m_aEditBuffer.WriteCharPtr("> ]\n");
 }
+
+if (!m_aStartXRefs.empty())
+{
+// Write location of the previous cross-reference section.
+m_aEditBuffer.WriteCharPtr("/Prev ");
+m_aEditBuffer.WriteUInt32AsString(m_aStartXRefs.back());
+}
+
 m_aEditBuffer.WriteCharPtr(">>\n");
 
 // Write startxref.
@@ -510,6 +518,8 @@ bool PDFDocument::Read(SvStream& rStream)
 // Then we can tokenize the stream.
 rStream.Seek(0);
 bool bInXRef = false;
+// The next number will be an xref offset.
+bool bInStartXRef = false;
 while (true)
 {
 rStream.ReadChar(ch);
@@ -584,10 +594,16 @@ bool PDFDocument::Read(SvStream& rStream)
 if (isdigit(ch) || ch == '-')
 {
 // Numbering object: an integer or a real.
-m_aElements.push_back(std::unique_ptr(new 
PDFNumberElement()));
+PDFNumberElement* pNumberElement = new PDFNumberElement();
+
m_aElements.push_back(std::unique_ptr(pNumberElement));
 rStream.SeekRel(-1);
-if (!m_aElements.back()->Read(rStream))
+if (!pNumberElement->Read(rStream))
 return false;
+if (bInStartXRef)
+{
+bInStartXRef = false;
+m_aStartXRefs.push_back(pNumberElement->GetValue());
+}
 }
 else if (isalpha(ch))
 {
@@ -688,6 +704,7 @@ bool PDFDocument::Read(SvStream& rStream)
 }
 else if (aKeyword == "startxref")
 {
+bInStartXRef = true;
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dev-tools.git: clang/find-unprefixed-members.cxx

2016-10-21 Thread Miklos Vajna
 clang/find-unprefixed-members.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit c2be00ee85d2abdf3fbe4bba0eba741f1d636d75
Author: Miklos Vajna 
Date:   Fri Oct 21 15:11:30 2016 +0200

clang: skip empty names in find-unprefixed-members

WW8Fib in core.git has this:

sal_uInt8 :2;

It makes little sense to try to rename '' to 'm_'.

diff --git a/clang/find-unprefixed-members.cxx 
b/clang/find-unprefixed-members.cxx
index 11049dc..605b1b0 100644
--- a/clang/find-unprefixed-members.cxx
+++ b/clang/find-unprefixed-members.cxx
@@ -72,6 +72,9 @@ public:
 /// Checks if a non-static member has an expected name
 bool checkNonStatic(const std::string& rName) const
 {
+if (rName.empty())
+return true;
+
 if (m_bPoco)
 return rName.find("_") == 0;
 else
@@ -81,6 +84,9 @@ public:
 /// Checks if a static member has an expected name
 bool checkStatic(const std::string& rName) const
 {
+if (rName.empty())
+return true;
+
 if (m_bPoco)
 return !rName.empty() && rName[0] >= 'A' && rName[0] <= 'Z';
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-21 Thread Stephan Bergmann
 chart2/source/controller/main/ChartController.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 8b5f8c26f007c8e67bc46b1b09340cae660d0b8b
Author: Stephan Bergmann 
Date:   Fri Oct 21 15:02:59 2016 +0200

Avoid crash with empty Chart document

In a fresh Writer document, "Insert - Object - OLE Object... - Create new -
LibreOffice 5.3 Chart - OK", then left-clicking into the empty Chart are, 
caused
an unhandled (or rather, handled by desktop's FatalError) RuntimeException 
since
749a0845500d69f99bf1901bab82361f67b5e4f6 "don't show area and line panel in 
pie
chart Chart selection, tdf#94320".

Change-Id: I7ff53a84e4b06b20409d09e6010bac80e5a7c4b2

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index 1e2de86..a4a6417 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -278,6 +278,9 @@ css::uno::Reference getChartType(
 const css::uno::Reference& xChartDoc)
 {
 Reference  xDiagram = xChartDoc->getFirstDiagram();
+if (xDiagram == nullptr) {
+return css::uno::Reference();
+}
 
 Reference< chart2::XCoordinateSystemContainer > xCooSysContainer( 
xDiagram, uno::UNO_QUERY_THROW );
 
___
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

2016-10-21 Thread Noel Grandin
 editeng/source/accessibility/AccessibleImageBullet.cxx |2 -
 editeng/source/editeng/editobj.cxx |   14 +
 editeng/source/items/bulitem.cxx   |   12 +--
 editeng/source/items/frmitems.cxx  |8 ---
 editeng/source/rtf/svxrtf.cxx  |   18 +++--
 include/editeng/AccessibleImageBullet.hxx  |2 -
 include/editeng/brushitem.hxx  |2 -
 include/editeng/bulletitem.hxx |8 ---
 include/editeng/editobj.hxx|3 --
 include/editeng/svxrtf.hxx |5 
 10 files changed, 14 insertions(+), 60 deletions(-)

New commits:
commit 861a322c662eb48b8da21c9d3ad1fa1f2f961391
Author: Noel Grandin 
Date:   Fri Oct 21 14:14:39 2016 +0200

loplugin:expandablemethodds in include/editeng

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

diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx 
b/editeng/source/accessibility/AccessibleImageBullet.cxx
index f595104..466a339 100644
--- a/editeng/source/accessibility/AccessibleImageBullet.cxx
+++ b/editeng/source/accessibility/AccessibleImageBullet.cxx
@@ -265,7 +265,7 @@ namespace accessibility
   
GetViewForwarder() );
 
 // offset from shape/cell
-Point aOffset = GetEEOffset();
+Point aOffset = maEEOffset;
 
 return awt::Rectangle( aScreenRect.Left() + aOffset.X(),
aScreenRect.Top() + aOffset.Y(),
diff --git a/editeng/source/editeng/editobj.cxx 
b/editeng/source/editeng/editobj.cxx
index 9ae54ef..33939f5f6 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -379,7 +379,7 @@ void EditTextObject::Store( SvStream& rOStream ) const
 sal_uInt32 nStructSz = 0;
 rOStream.WriteUInt32( nStructSz );
 
-StoreData( rOStream );
+mpImpl->StoreData(rOStream);
 
 sal_uInt64 const nEndPos = rOStream.Tell();
 nStructSz = nEndPos - nStartPos - sizeof( nWhich ) - sizeof( nStructSz );
@@ -410,7 +410,7 @@ EditTextObject* EditTextObject::Create( SvStream& rIStream )
 return nullptr;
 
 EditTextObject* pTxtObj = new EditTextObject(nullptr);
-pTxtObj->CreateData(rIStream);
+pTxtObj->mpImpl->CreateData(rIStream);
 
 // Make sure that the stream is left at the correct place.
 std::size_t nFullSz = sizeof( nWhich ) + sizeof( nStructSz ) + nStructSz;
@@ -418,16 +418,6 @@ EditTextObject* EditTextObject::Create( SvStream& rIStream 
)
 return pTxtObj;
 }
 
-void EditTextObject::StoreData( SvStream& rStrm ) const
-{
-mpImpl->StoreData(rStrm);
-}
-
-void EditTextObject::CreateData( SvStream& rStrm )
-{
-mpImpl->CreateData(rStrm);
-}
-
 EditTextObject* EditTextObject::Clone() const
 {
 return new EditTextObject(*this);
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index 5e2b919..1283f32 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -221,13 +221,13 @@ void SvxBulletItem::CopyValidProperties( const 
SvxBulletItem& rCopyFrom )
 _aFont.SetFamily( aNewFont.GetFamilyType() );
 _aFont.SetStyleName( aNewFont.GetStyleName() );
 _aFont.SetColor( aNewFont.GetColor() );
-SetSymbol( rCopyFrom.GetSymbol() );
+SetSymbol( rCopyFrom.cSymbol );
 SetGraphicObject( rCopyFrom.GetGraphicObject() );
-SetScale( rCopyFrom.GetScale() );
-SetStart( rCopyFrom.GetStart() );
-SetStyle( rCopyFrom.GetStyle() );
-SetPrevText( rCopyFrom.GetPrevText() );
-SetFollowText( rCopyFrom.GetFollowText() );
+SetScale( rCopyFrom.nScale );
+SetStart( rCopyFrom.nStart );
+SetStyle( rCopyFrom.nStyle );
+aPrevText = rCopyFrom.aPrevText;
+aFollowText = rCopyFrom.aFollowText;
 SetFont( _aFont );
 }
 
diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index 98e17c9..7a51ddc 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3655,7 +3655,7 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
 if (!(rVal >>= nVal))
 return false;
 
-SetShadingValue( nVal );
+nShadingValue = nVal;
 }
 break;
 }
@@ -3979,12 +3979,6 @@ void SvxBrushItem::SetGraphicFilter( const OUString& 
rNew )
 }
 
 
-void SvxBrushItem::SetShadingValue( const sal_Int32 nNew )
-{
-nShadingValue = nNew;
-}
-
-
 SvxGraphicPosition SvxBrushItem::WallpaperStyle2GraphicPos( WallpaperStyle 
eStyle )
 {
 SvxGraphicPosition eResult;
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 8c40e4b..c88070c 100644
--- a/editen

[Libreoffice-commits] translations.git: source/sl

2016-10-21 Thread Andras Timar
 source/sl/avmedia/source/framework.po |4 
 source/sl/basctl/source/basicide.po   |   19 
 source/sl/chart2/source/controller/dialogs.po |2 
 source/sl/chart2/uiconfig/ui.po   |6 
 source/sl/cui/source/customize.po |2 
 source/sl/cui/source/dialogs.po   |   11 
 source/sl/cui/source/options.po   |  166 +-
 source/sl/cui/source/tabpages.po  |8 
 source/sl/cui/uiconfig/ui.po  |  165 --
 source/sl/dbaccess/source/ui/querydesign.po   |   17 
 source/sl/dbaccess/source/ui/tabledesign.po   |7 
 source/sl/extensions/source/bibliography.po   |   17 
 source/sl/extensions/source/propctrlr.po  |  535 
 source/sl/filter/source/config/fragments/filters.po   |4 
 source/sl/helpcontent2/source/text/scalc/01.po|7 
 source/sl/helpcontent2/source/text/shared.po  |   30 
 source/sl/helpcontent2/source/text/shared/01.po   |   13 
 source/sl/helpcontent2/source/text/shared/guide.po|4 
 source/sl/helpcontent2/source/text/simpress/00.po |5 
 source/sl/helpcontent2/source/text/simpress/01.po |  178 --
 source/sl/helpcontent2/source/text/simpress/guide.po  |   50 
 source/sl/helpcontent2/source/text/swriter/01.po  |   38 
 source/sl/officecfg/registry/data/org/openoffice/Office/UI.po |  226 +--
 source/sl/reportdesign/source/ui/inspection.po|  124 -
 source/sl/sc/source/ui/navipi.po  |  118 -
 source/sl/sc/source/ui/src.po |   40 
 source/sl/sc/uiconfig/scalc/ui.po |  167 ++
 source/sl/sd/source/ui/animations.po  |   40 
 source/sl/sd/source/ui/app.po |   11 
 source/sl/sd/uiconfig/simpress/ui.po  |   90 +
 source/sl/sfx2/source/control.po  |   10 
 source/sl/sfx2/source/dialog.po   |  176 +-
 source/sl/sfx2/source/view.po |   12 
 source/sl/sfx2/uiconfig/ui.po |   34 
 source/sl/svx/source/form.po  |  122 +
 source/sl/svx/source/stbctrls.po  |   11 
 source/sl/svx/uiconfig/ui.po  |  188 ++
 source/sl/sw/source/ui/dialog.po  |   18 
 source/sl/sw/source/ui/index.po   |   18 
 source/sl/sw/source/ui/misc.po|   58 
 source/sl/sw/source/ui/sidebar.po |   12 
 source/sl/sw/source/uibase/ribbar.po  |   54 
 source/sl/sw/source/uibase/utlui.po   |  226 ---
 source/sl/sw/uiconfig/swriter/ui.po   |  632 --
 source/sl/swext/mediawiki/help.po |4 
 45 files changed, 1947 insertions(+), 1732 deletions(-)

New commits:
commit bf84e0b330fa1c21e1abd44968a3ea652e64bb36
Author: Andras Timar 
Date:   Fri Oct 21 14:51:40 2016 +0200

Updated Slovenian translation

Change-Id: I7574326882c6173a18e2067b2f908998a59f71e2

diff --git a/source/sl/avmedia/source/framework.po 
b/source/sl/avmedia/source/framework.po
index 35a7597..198fac7 100644
--- a/source/sl/avmedia/source/framework.po
+++ b/source/sl/avmedia/source/framework.po
@@ -3,14 +3,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: LibreOffice 4.0\n"
 "Report-Msgid-Bugs-To: 
https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n";
-"POT-Creation-Date: 2016-09-13 10:24+0200\n"
+"POT-Creation-Date: 2016-10-19 10:39+0200\n"
 "PO-Revision-Date: 2016-10-08 23:21+0200\n"
 "Last-Translator: Martin Srebotnjak \n"
 "Language-Team: sl.libreoffice.org\n"
-"Language: sl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: sl\n"
 "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || 
n%100==4 ? 2 : 3);\n"
 "X-Generator: Virtaal 0.7.1\n"
 "X-Accelerator-Marker: ~\n"
diff --git a/source/sl/basctl/source/basicide.po 
b/source/sl/basctl/source/basicide.po
index 4d1ae6d..0d10afe 100644
--- a/source/sl/basctl/source/basicide.po
+++ b/source/sl/basctl/source/basicide.po
@@ -3,7 +3,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: LibreOffice 5.3\n"
 "Report-Msgid-Bugs-To: 
https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n";
-"POT-Creation-Date: 2016-10-07 21:51+0200\n"
+"POT-Creation-Date: 2016-10-19 10:38+0200\n"
 "PO-Revision-Date: 2016-09-13 22:05+0200\n"
 "Las

[Libreoffice-commits] core.git: translations

2016-10-21 Thread Andras Timar
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 965a008d66035069249b1f218f1663f5f9fcf5dd
Author: Andras Timar 
Date:   Fri Oct 21 14:51:40 2016 +0200

Updated core
Project: translations  bf84e0b330fa1c21e1abd44968a3ea652e64bb36

Updated Slovenian translation

Change-Id: I7574326882c6173a18e2067b2f908998a59f71e2

diff --git a/translations b/translations
index 35a31ff..bf84e0b 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 35a31ff71279807598c4ee4cd84d831e2c3270dd
+Subproject commit bf84e0b330fa1c21e1abd44968a3ea652e64bb36
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk xmlsecurity/Module_xmlsecurity.mk xmlsecurity/qa

2016-10-21 Thread Miklos Vajna
 xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk |   55 ++
 xmlsecurity/Module_xmlsecurity.mk |1 
 xmlsecurity/qa/unit/pdfsigning/data/cert8.db  |binary
 xmlsecurity/qa/unit/pdfsigning/data/key3.db   |binary
 xmlsecurity/qa/unit/pdfsigning/data/no.pdf|binary
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |  111 ++
 6 files changed, 167 insertions(+)

New commits:
commit 8aab6cbba07106c97f0457c7a3c9df8f20367d20
Author: Miklos Vajna 
Date:   Fri Oct 21 11:48:47 2016 +0200

xmlsecurity: add PDF sign unit-test

If the NSS binary files ever need re-generating, it's just a copy from a
fresh Firefox user profile, after importing
'example-xmlsecurity-Alice.cert.p12', as produced by
'./create-certs.sh'.

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

diff --git a/xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk 
b/xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk
new file mode 100644
index 000..be4828e
--- /dev/null
+++ b/xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk
@@ -0,0 +1,55 @@
+# -*- 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_CppunitTest_CppunitTest,xmlsecurity_pdfsigning))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,xmlsecurity_pdfsigning, \
+   xmlsecurity/qa/unit/pdfsigning/pdfsigning \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,xmlsecurity_pdfsigning, \
+   comphelper \
+   cppuhelper \
+   cppu \
+   sal \
+   sax \
+   sfx \
+   test \
+   tl \
+   unotest \
+   utl \
+   xmlsecurity \
+   $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,xmlsecurity_pdfsigning,\
+boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_set_include,xmlsecurity_pdfsigning,\
+   -I$(SRCDIR)/xmlsecurity/inc \
+   $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,xmlsecurity_pdfsigning))
+
+$(eval $(call gb_CppunitTest_use_ure,xmlsecurity_pdfsigning))
+$(eval $(call gb_CppunitTest_use_vcl,xmlsecurity_pdfsigning))
+
+$(eval $(call gb_CppunitTest_use_rdb,xmlsecurity_pdfsigning,services))
+
+$(eval $(call gb_CppunitTest_use_configuration,xmlsecurity_pdfsigning))
+
+ifeq ($(ENABLE_PDFIMPORT),TRUE)
+$(eval $(call gb_CppunitTest_use_executable,xmlsecurity_pdfsigning,xpdfimport))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/xmlsecurity/Module_xmlsecurity.mk 
b/xmlsecurity/Module_xmlsecurity.mk
index 04d1087..6fdc86e 100644
--- a/xmlsecurity/Module_xmlsecurity.mk
+++ b/xmlsecurity/Module_xmlsecurity.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_Module_add_targets,xmlsecurity,\
 
 $(eval $(call gb_Module_add_slowcheck_targets,xmlsecurity,\
 CppunitTest_xmlsecurity_signing \
+CppunitTest_xmlsecurity_pdfsigning \
 ))
 
 $(eval $(call gb_Module_add_l10n_targets,xmlsecurity,\
diff --git a/xmlsecurity/qa/unit/pdfsigning/data/cert8.db 
b/xmlsecurity/qa/unit/pdfsigning/data/cert8.db
new file mode 100644
index 000..8354fd3
Binary files /dev/null and b/xmlsecurity/qa/unit/pdfsigning/data/cert8.db differ
diff --git a/xmlsecurity/qa/unit/pdfsigning/data/key3.db 
b/xmlsecurity/qa/unit/pdfsigning/data/key3.db
new file mode 100644
index 000..8ab32c2
Binary files /dev/null and b/xmlsecurity/qa/unit/pdfsigning/data/key3.db differ
diff --git a/xmlsecurity/qa/unit/pdfsigning/data/no.pdf 
b/xmlsecurity/qa/unit/pdfsigning/data/no.pdf
new file mode 100644
index 000..5d55242
Binary files /dev/null and b/xmlsecurity/qa/unit/pdfsigning/data/no.pdf differ
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
new file mode 100644
index 000..91a72b1
--- /dev/null
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -0,0 +1,111 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+using namespace com::sun::star;
+
+namespace
+{
+const char* DATA_DIRECTORY = "/xmlsecurity/qa/unit/pdfsigning/data/";
+}
+
+/// Testsuite for the PDF signing feature.
+class PDFSigningTest : public test::BootstrapFixture
+{
+uno::Reference mxComponentContext;
+
+public:
+PDFSign

[Libreoffice-commits] core.git: Branch 'feature/new-vcl-scheduler' - 59 commits - avmedia/source basctl/source basic/source canvas/source chart2/source comphelper/source compilerplugins/clang cui/sour

2016-10-21 Thread Jan-Marek Glogowski
Rebased ref, commits from common ancestor:
commit e2a874693d39b8d9ee4fcefb46736a624b71af3c
Author: Jan-Marek Glogowski 
Date:   Fri Oct 21 12:58:19 2016 +0200

KDE4 clang-lo:staticmethods

Change-Id: I4899a30f97f8433fd4d20b7d65cb3fbb6a06103f

diff --git a/vcl/unx/kde4/KDEXLib.hxx b/vcl/unx/kde4/KDEXLib.hxx
index 5bcc6b1..e97b20f 100644
--- a/vcl/unx/kde4/KDEXLib.hxx
+++ b/vcl/unx/kde4/KDEXLib.hxx
@@ -62,11 +62,11 @@ class KDEXLib : public QObject, public SalXLib
 
 private Q_SLOTS:
 void socketNotifierActivated( int fd );
-void timeoutActivated();
+static void timeoutActivated();
 void userEventActivated();
 void startTimeoutTimer();
 void startUserEventTimer();
-bool processYield( bool bWait, bool bHandleAllCurrentEvents );
+static bool processYield( bool bWait, bool bHandleAllCurrentEvents );
 Q_SIGNALS:
 void startTimeoutTimerSignal();
 void startUserEventTimerSignal();
commit 0924c77c7fb1cd98b0b4124ff8cd2a5896c7adb8
Author: Jan-Marek Glogowski 
Date:   Fri Oct 14 16:05:58 2016 +0200

Correctly handle nested task processing calls

If ProcessTaskScheduling is called to process tasks while inside
Invoke(), the assumptions about the list pointers in the parent
call will be void.

There would be two possible solutions:
  1. Nested calls are forbidden to change the list, except for
 adding tasks.
  2. The parent call must be informed of the changes and update
 the pointers.

Since we want to be able to remove processed tasks in nested calls,
we go with option 2, which has a slight overhead but won't exhaust
memory, because it can't release processed tasks.

Change-Id: I7a3910a9a4677988dff1d5a7648a67d66fb41056

diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 27c4cfc..02ffdc1 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -318,6 +318,7 @@ struct ImplSVData
 ImplSchedulerData*  mpFirstSchedulerData = nullptr; // list of all 
running tasks
 ImplSchedulerData*  mpFreeSchedulerData = nullptr;  // list of all 
deleted tasks for reuse
 boolmbNeedsReschedule = false;  // was the list of 
tasks changed?
+boolmbTaskRemoved = false;  // was a task 
removed
 sal_uInt64  mnTimerPeriod = 0;  // current timer 
period / sleep time
 sal_uInt64  mnLastUpdate = 0;   // last scheduler 
time
 SalTimer*   mpSalTimer = nullptr;   // interface to 
sal event loop/timers
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 6bcfa43..9abfe75 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -177,6 +177,7 @@ bool Scheduler::ProcessTaskScheduling( IdleRunPolicy 
eIdleRunPolicy )
 ImplSchedulerData *pPrevMostUrgent = nullptr;
 ImplSchedulerData *pMostUrgent = nullptr;
 sal_uInt64 nMinPeriod = InfiniteTimeoutMs;
+bool   bIsNestedCall = false;
 
 DBG_TESTSOLARMUTEX();
 
@@ -194,7 +195,10 @@ bool Scheduler::ProcessTaskScheduling( IdleRunPolicy 
eIdleRunPolicy )
 
 // Skip invoked task
 if ( pSchedulerData->mbInScheduler )
+{
+bIsNestedCall = true;
 goto next_entry;
+}
 
 // Can this task be removed from scheduling?
 if ( !pSchedulerData->mpScheduler )
@@ -207,6 +211,7 @@ bool Scheduler::ProcessTaskScheduling( IdleRunPolicy 
eIdleRunPolicy )
 pSchedulerData->mpNext = pSVData->mpFreeSchedulerData;
 pSVData->mpFreeSchedulerData = pSchedulerData;
 pSchedulerData = pNextSchedulerData;
+pSVData->mbTaskRemoved = true;
 continue;
 }
 
@@ -233,6 +238,10 @@ next_entry:
 
 assert( !pSchedulerData );
 
+// We just have to handle removed tasks for nested calls
+if ( !bIsNestedCall )
+pSVData->mbTaskRemoved = false;
+
 if ( pMostUrgent )
 {
 assert( pPrevMostUrgent != pMostUrgent );
@@ -246,6 +255,14 @@ next_entry:
 SAL_INFO_IF( !pMostUrgent->mpScheduler, "vcl.schedule", 
tools::Time::GetSystemTicks()
  << " " << static_cast( pMostUrgent ) <<  "  
tag-rm" );
 
+// If there were some tasks removed, our list pointers may be invalid,
+// except pMostUrgent, which is protected by mbInScheduler
+if ( pSVData->mbTaskRemoved )
+{
+nMinPeriod = ImmediateTimeoutMs;
+pPrevSchedulerData = pMostUrgent;
+}
+
 // do some simple round-robin scheduling
 // nothing to do, if we're already the last element
 if ( pMostUrgent->mpScheduler )
@@ -255,6 +272,19 @@ next_entry:
 
 if ( pMostUrgent->mpNext )
 {
+// see ^
+if ( pSVData->mbTaskRemoved )
+{
+pP

[Libreoffice-commits] core.git: 4 commits - filter/source include/filter include/formula include/oox include/sfx2 oox/source sc/source sfx2/source

2016-10-21 Thread Noel Grandin
 filter/source/msfilter/msoleexp.cxx   |2 +-
 filter/source/msfilter/svdfppt.cxx|2 +-
 include/filter/msfilter/msoleexp.hxx  |1 -
 include/filter/msfilter/mstoolbar.hxx |3 +--
 include/filter/msfilter/svdfppt.hxx   |3 +--
 include/formula/tokenarray.hxx|6 +++---
 include/oox/dump/dumperbase.hxx   |4 
 include/oox/helper/propertyset.hxx|4 
 include/sfx2/basedlgs.hxx |1 -
 include/sfx2/frame.hxx|2 --
 include/sfx2/objsh.hxx|1 -
 include/sfx2/recentdocsview.hxx   |2 --
 include/sfx2/templatelocalview.hxx|3 ---
 include/sfx2/viewfrm.hxx  |5 -
 include/sfx2/viewsh.hxx   |1 -
 oox/source/dump/dumperbase.cxx|   16 +++-
 oox/source/helper/propertyset.cxx |2 +-
 sc/source/core/data/formulacell.cxx   |4 ++--
 sfx2/source/control/recentdocsview.cxx|2 +-
 sfx2/source/control/templatelocalview.cxx |4 ++--
 sfx2/source/dialog/basedlgs.cxx   |7 +--
 sfx2/source/doc/objmisc.cxx   |8 +---
 sfx2/source/view/frame.cxx|7 +--
 sfx2/source/view/frame2.cxx   |2 +-
 sfx2/source/view/viewfrm.cxx  |   23 ---
 sfx2/source/view/viewprn.cxx  |7 +--
 26 files changed, 25 insertions(+), 97 deletions(-)

New commits:
commit 7999da76a66eab687cfe152dc63cf93a2a8b0cd8
Author: Noel Grandin 
Date:   Fri Oct 21 13:22:25 2016 +0200

loplugin:expandablemethodds in include/filter

Change-Id: I92f0e19845e921701eb139e19493effa47908b39

diff --git a/filter/source/msfilter/msoleexp.cxx 
b/filter/source/msfilter/msoleexp.cxx
index 0e0fd26..7f8ca54 100644
--- a/filter/source/msfilter/msoleexp.cxx
+++ b/filter/source/msfilter/msoleexp.cxx
@@ -171,7 +171,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( 
svt::EmbeddedObjectRef& rObj, SotSt
 aOwnGlobalName = aGlbNm;
 
 // flags for checking if conversion is wanted at all 
(SaveOptions?!)
-if( GetFlags() & pArr->nFlag )
+if( nConvertFlags & pArr->nFlag )
 {
 pExpFilter = 
SfxFilterMatcher().GetFilter4FilterName(OUString::createFromAscii(pArr->pFilterNm));
 break;
diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 479c374..2f57c2b 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -351,7 +351,7 @@ void PptNotesAtom::Clear()
 nFlags = 0;
 }
 
-void PptColorSchemeAtom::Clear()
+PptColorSchemeAtom::PptColorSchemeAtom()
 {
 memset(&aData[0], 0, 32);
 }
diff --git a/include/filter/msfilter/msoleexp.hxx 
b/include/filter/msfilter/msoleexp.hxx
index 445e86d..6043bae 100644
--- a/include/filter/msfilter/msoleexp.hxx
+++ b/include/filter/msfilter/msoleexp.hxx
@@ -45,7 +45,6 @@ class MSFILTER_DLLPUBLIC SvxMSExportOLEObjects
 sal_uInt32 nConvertFlags;
 public:
 SvxMSExportOLEObjects( sal_uInt32 nCnvrtFlgs ) : nConvertFlags(nCnvrtFlgs) 
{}
-sal_uInt32 GetFlags() const { return nConvertFlags; }
 
 void ExportOLEObject( svt::EmbeddedObjectRef& rObj, SotStorage& rDestStg );
 void ExportOLEObject( const css::uno::Reference < 
css::embed::XEmbeddedObject>& rObj, SotStorage& rDestStg );
diff --git a/include/filter/msfilter/mstoolbar.hxx 
b/include/filter/msfilter/mstoolbar.hxx
index 3495a05..0f35c5c 100644
--- a/include/filter/msfilter/mstoolbar.hxx
+++ b/include/filter/msfilter/mstoolbar.hxx
@@ -98,12 +98,11 @@ public:
 Indent( bool binit = false )
 {
 if ( binit )
-init();
+TBBase::nIndent = 0;
 else
 TBBase::nIndent = TBBase::nIndent + 2;
 }
 ~Indent() { TBBase::nIndent = TBBase::nIndent - 2; }
-static void init() { TBBase::nIndent = 0; }
 };
 
 
diff --git a/include/filter/msfilter/svdfppt.hxx 
b/include/filter/msfilter/svdfppt.hxx
index edab0cb..22ab642 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -270,8 +270,7 @@ struct PptColorSchemeAtom
 sal_uInt8   aData[32];
 
 public:
-PptColorSchemeAtom () { Clear(); }
-voidClear();
+PptColorSchemeAtom();
 Color   GetColor( sal_uInt16 nNum ) const;
 
 friend SvStream& ReadPptColorSchemeAtom(SvStream& rIn, PptColorSchemeAtom& 
rAtom);
commit cd0e227a326f0571f157dde8678a253bcf172204
Author: Noel Grandin 
Date:   Fri Oct 21 12:51:41 2016 +0200

rename RECALCMODE_EMASK to ScRecalcMode::EMask

much neater this way

Change-Id: I0af38f8bc0d7be4f2f1be9899dd8739493cf66d5

diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index cdb4e34..65b12a9 100644

[Libreoffice-commits] core.git: compilerplugins/clang

2016-10-21 Thread Tor Lillqvist
 compilerplugins/clang/badvectorinit.cxx   |  213 --
 compilerplugins/clang/store/badvectorinit.cxx |  213 ++
 2 files changed, 213 insertions(+), 213 deletions(-)

New commits:
commit 3be8c4c2bb919d69a2812c76edbaeaa41d149edb
Author: Tor Lillqvist 
Date:   Fri Oct 21 14:15:42 2016 +0300

The badvectorinit plug-in probably can be retired

Let's hope it only catches false positives now.

noelgrandin agrees.

Change-Id: Ibd8310c31897aa6835bd6aaf90a49b5cd8f92948

diff --git a/compilerplugins/clang/badvectorinit.cxx 
b/compilerplugins/clang/store/badvectorinit.cxx
similarity index 100%
rename from compilerplugins/clang/badvectorinit.cxx
rename to compilerplugins/clang/store/badvectorinit.cxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-0' - 3 commits - loleaflet/dist loleaflet/src loolwsd/MasterProcessSession.cpp

2016-10-21 Thread Pranav Kant
 loleaflet/dist/toolbar/toolbar.js |   13 -
 loleaflet/src/layer/tile/TileLayer.js |   47 +-
 loolwsd/MasterProcessSession.cpp  |7 +
 3 files changed, 65 insertions(+), 2 deletions(-)

New commits:
commit e9bcd9a25df78b2ce6d24aa03940e358f282e26c
Author: Pranav Kant 
Date:   Fri Oct 21 15:32:38 2016 +0530

Click to jump to user cursor

Change-Id: If46abca58a1b401c1accc30192cb9c163b14005b

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index 44ba7b0..54eaf65 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -1331,8 +1331,19 @@ map.on('statusindicator', function (e) {
}
 });
 
+function onUseritemClicked(e) {
+   var viewId = parseInt(e.currentTarget.id.replace('user-', ''));
+   if (map._docLayer) {
+   if (map.getDocType() === 'spreadsheet') {
+   map._docLayer.goToCellCursor(viewId);
+   } else if (map.getDocType() === 'text') {
+   map._docLayer.goToCursor(viewId);
+   }
+   }
+}
+
 function getUserItem(viewId, userName) {
-   var html = '' +
+   var html = '' +
  '' + userName + '' +
   '' +
'';
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 1f3d7f8..fb0017c 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -910,6 +910,18 @@ L.TileLayer = L.GridLayer.extend({
}
},
 
+   goToCursor: function() {
+   if (this._isCursorVisible && 
!this._map.getBounds().contains(this._visibleCursor)) {
+   var cursorPos = this._visibleCursor.getNorthWest();
+   var center = this._map.project(cursorPos);
+   center = 
center.subtract(this._map.getSize().divideBy(2));
+   center.x = Math.round(center.x < 0 ? 0 : center.x);
+   center.y = Math.round(center.y < 0 ? 0 : center.y);
+
+   this._map.fire('scrollto', {x: center.x, y: center.y});
+   }
+   },
+
// Update dragged graphics selection resize.
_onGraphicEdit: function (e) {
if (!e.handle) { return; }
@@ -1041,6 +1053,39 @@ L.TileLayer = L.GridLayer.extend({
}
},
 
+   goToCellCursor: function() {
+   // TODO: Lots of common code with onUpdateCellCursor. Factor out
+   var mapBounds = this._map.getBounds();
+   if (this._cellCursor && 
!this._isEmptyRectangle(this._cellCursor) && 
!mapBounds.contains(this._cellCursor)) {
+   var scrollX = 0;
+   var scrollY = 0;
+
+   var spacingX = Math.abs(this._cellCursor.getEast() - 
this._cellCursor.getWest()) / 4.0;
+   var spacingY = Math.abs((this._cellCursor.getSouth() - 
this._cellCursor.getNorth())) / 4.0;
+   if (this._cellCursor.getWest() < mapBounds.getWest()) {
+   scrollX = this._cellCursor.getWest() - 
mapBounds.getWest() - spacingX;
+   } else if (this._cellCursor.getEast() > 
mapBounds.getEast()) {
+   scrollX = this._cellCursor.getEast() - 
mapBounds.getEast() + spacingX;
+   }
+   if (this._cellCursor.getNorth() > mapBounds.getNorth()) 
{
+   scrollY = this._cellCursor.getNorth() - 
mapBounds.getNorth() + spacingY;
+   } else if (this._cellCursor.getSouth() < 
mapBounds.getSouth()) {
+   scrollY = this._cellCursor.getSouth() - 
mapBounds.getSouth() - spacingY;
+   }
+
+   if (scrollX !== 0 || scrollY !== 0) {
+   var newCenter = mapBounds.getCenter();
+   newCenter.lng += scrollX;
+   newCenter.lat += scrollY;
+   var center = this._map.project(newCenter);
+   center = 
center.subtract(this._map.getSize().divideBy(2));
+   center.x = Math.round(center.x < 0 ? 0 : 
center.x);
+   center.y = Math.round(center.y < 0 ? 0 : 
center.y);
+   this._map.fire('scrollto', {x: center.x, y: 
center.y});
+   }
+   }
+   },
+
// Update text selection handlers.
_onUpdateTextSelection: function () {
var startMarker, endMarker;
commit 2a2055e4079be208d0f73d22ed8ef6de52353f76
Author: Pranav Kant 
Date:   Fri Oct 21 14:53:21 2016 +0530

loolwsd: Inform about editlock here too

This was accidentally removed in
0a9a94dacd7b12228fda7ff5690fdeb8c9425ac

[Libreoffice-commits] core.git: officecfg/registry sd/uiconfig sd/UIConfig_simpress.mk

2016-10-21 Thread Yousuf Philips
 officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu |   11 
 sd/UIConfig_simpress.mk  |1 
 sd/uiconfig/simpress/ui/notebookbar_groups.ui| 1892 
++
 3 files changed, 1904 insertions(+)

New commits:
commit 24b4487e50a1af604713d9609ab12fe7cf26949b
Author: Yousuf Philips 
Date:   Thu Oct 20 20:24:58 2016 +0400

tdf#103170 Heikobar: Add it to Impress

Change-Id: I6563ca2dd736c879c42ab93a509040909f74f884
Reviewed-on: https://gerrit.libreoffice.org/30113
Reviewed-by: Yousuf Philips 
Tested-by: Yousuf Philips 

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu
index 36ff663..d2306ba 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu
@@ -87,6 +87,17 @@
 false
   
 
+
+  
+Contextual groups
+  
+  
+notebookbar_groups.ui
+  
+  
+true
+  
+
   
 
   
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk
index 160d3a3..a2930ac 100644
--- a/sd/UIConfig_simpress.mk
+++ b/sd/UIConfig_simpress.mk
@@ -122,6 +122,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
sd/uiconfig/simpress/ui/masterlayoutdlg \
sd/uiconfig/simpress/ui/navigatorpanel \
sd/uiconfig/simpress/ui/notebookbar \
+   sd/uiconfig/simpress/ui/notebookbar_groups \
sd/uiconfig/simpress/ui/optimpressgeneralpage \
sd/uiconfig/simpress/ui/photoalbum \
sd/uiconfig/simpress/ui/presentationdialog \
diff --git a/sd/uiconfig/simpress/ui/notebookbar_groups.ui 
b/sd/uiconfig/simpress/ui/notebookbar_groups.ui
new file mode 100644
index 000..3f16177
--- /dev/null
+++ b/sd/uiconfig/simpress/ui/notebookbar_groups.ui
@@ -0,0 +1,1892 @@
+
+
+
+  
+  
+  
+  
+True
+False
+cmd/sc_bold.png
+  
+  
+True
+False
+cmd/lc_defaultbullet.png
+  
+  
+True
+False
+cmd/sc_centerpara.png
+  
+  
+True
+False
+cmd/sc_insertobjectchart.png
+  
+  
+True
+False
+cmd/sc_grow.png
+  
+  
+True
+False
+cmd/sc_italic.png
+  
+  
+True
+False
+cmd/lc_assignlayout.png
+  
+  
+True
+False
+
+  
+True
+False
+Blank
+True
+  
+
+
+  
+True
+False
+Title Slide
+True
+  
+
+
+  
+True
+False
+Title, Text
+True
+  
+
+
+  
+True
+False
+Title, Content
+True
+  
+
+
+  
+True
+False
+Centered Text
+True
+  
+
+  
+  
+True
+False
+cmd/sc_leftpara.png
+  
+  
+True
+False
+cmd/sc_inserthyperlink.png
+  
+  
+True
+False
+
+  
+True
+False
+.uno:HyperlinkDialog
+Hyperlink
+  
+
+
+  
+True
+False
+  
+
+
+  
+True
+False
+.uno:InsertFootnote
+Footnote
+True
+  
+
+
+  
+True
+False
+.uno:InsertEndnote
+Endnote
+True
+  
+
+
+  
+True
+False
+  
+
+
+  
+True
+False
+.uno:InsertBookmark
+Bookmark
+True
+  
+
+
+  
+True
+False
+.uno:InsertReferenceField
+Cross-Reference
+  
+
+  
+  
+True
+False
+cmd/lc_slidemasterpage.png
+  
+  
+True
+False
+
+  
+True
+False
+.uno:InsertRowsBefore
+Master 1
+True
+  
+
+
+  
+True
+False
+.uno:InsertRowsAfter
+Master 2
+True
+  
+
+  
+  
+True
+False
+cmd/lc_adddirect.png
+24
+  
+  
+True
+False
+cmd/lc_defaultnumbering.png
+  
+  
+True
+False
+cmd/lc_open.png
+24
+  
+  
+True
+False
+cmd/lc_designerdialog.png
+  
+  
+True
+False
+cmd/32/paste.png
+24
+  
+  
+True
+False
+cmd/lc_exportdirecttopdf.png
+24
+  
+  
+True
+False
+cmd/lc_print.png
+24
+  
+  
+True
+False
+cmd/lc_redo.png
+24
+  
+  
+True
+False
+cmd/sc_rightpara.png
+  
+  
+True
+False
+cmd/32/save.png
+32
+3
+  
+  
+True
+False
+cmd/sc_shrink.png
+  
+  
+True
+False
+cmd/lc_presentation.png
+  
+  
+True
+False
+
+  
+True
+False
+Default
+True
+  
+
+
+  
+True
+False
+No Fill
+True
+  
+
+
+

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

2016-10-21 Thread Yousuf Philips
 sc/res/xml/styles.xml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c18e169ce817f940bede186166540913cb564b4c
Author: Yousuf Philips 
Date:   Thu Oct 20 17:34:20 2016 +0400

tdf#90937 Adjust Note cell style border width and color

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

diff --git a/sc/res/xml/styles.xml b/sc/res/xml/styles.xml
index d8e114a..38878f7 100644
--- a/sc/res/xml/styles.xml
+++ b/sc/res/xml/styles.xml
@@ -12,7 +12,7 @@
 
 
 
-
+
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-21 Thread Yousuf Philips
 cui/uiconfig/ui/colorpage.ui |   75 ---
 1 file changed, 49 insertions(+), 26 deletions(-)

New commits:
commit ac374ebf05196c928aac56b6b0b19a2f670503ca
Author: Yousuf Philips 
Date:   Thu Oct 20 02:25:32 2016 +0400

tdf#103223 custom palette label and a11y improvements

In the color section of the Area fill tab, i've added a custom palette
label above the add and delete buttons, moved the palette label and
control on the same line and improved the accessibility of various
controls by adding tooltips and associating labels.

Change-Id: I4a8c9963fd23312190ba343dbb1a0db587b13d1e
Reviewed-on: https://gerrit.libreoffice.org/29894
Reviewed-by: Yousuf Philips 
Tested-by: Yousuf Philips 

diff --git a/cui/uiconfig/ui/colorpage.ui b/cui/uiconfig/ui/colorpage.ui
index dd908c5..c75cdeb 100644
--- a/cui/uiconfig/ui/colorpage.ui
+++ b/cui/uiconfig/ui/colorpage.ui
@@ -49,15 +49,17 @@
   
 True
 False
-vertical
 3
 
   
 True
 False
+center
 0
 0
 Palette 
:
+True
+paletteselector
   
   
 False
@@ -88,6 +90,7 @@
   
 True
 False
+6
 vertical
 3
 
@@ -96,6 +99,8 @@
 False
 0
 Recent 
Colors
+True
+recentcolorset
   
   
 False
@@ -105,11 +110,11 @@
 
 
   
-True
-False
-True
-True
-  
+True
+False
+True
+True
+  
   
 False
 True
@@ -128,6 +133,7 @@
   
 True
 False
+6
 3
 True
 
@@ -140,7 +146,7 @@
   
   
 0
-0
+1
 1
 1
   
@@ -156,7 +162,7 @@
   
   
 0
-1
+2
 1
 1
   
@@ -172,7 +178,7 @@
   
   
 1
-1
+2
 1
 1
   
@@ -186,11 +192,26 @@
   
   
 1
-0
+1
 1
 1
   
 
+
+  
+True
+False
+3
+0
+Custom 
Palette
+  
+  
+0
+0
+2
+1
+  
+
   
   
 0
@@ -207,11 +228,11 @@
 vertical
 
   
-True
-False
-True
-True
-  
+True
+False
+True
+True
+  
   
 False
 False
@@ -365,10 +386,10 @@
 
 
   
-6
-True
-True
-  
+6
+True
+True
+  
   
 1
 3
@@ -632,6 +653,7 @@
 True
 True
 •
+Blue
 adjustment2

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

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

New commits:
commit 1473ce030314027c01c98f513407ed0897328585
Author: Caolán McNamara 
Date:   Thu Oct 20 16:07:11 2016 +0100

implement CryptoAPI RC4+SHA1 encryption scheme for xls import

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

Change-Id: I91c0e1d1d95fbd1c68966650e7ac7d23276bcbe3

diff --git a/filter/source/msfilter/mscodec.cxx 
b/filter/source/msfilter/mscodec.cxx
index 20a1f4a..ffbbd09 100644
--- a/filter/source/msfilter/mscodec.cxx
+++ b/filter/source/msfilter/mscodec.cxx
@@ -245,30 +245,36 @@ void MSCodec_Xor95::Skip( std::size_t nBytes )
 mnOffset = (mnOffset + nBytes) & 0x0F;
 }
 
-MSCodec97::MSCodec97(rtlCipher hCipher)
-: m_hCipher(hCipher)
+MSCodec97::MSCodec97(size_t nHashLen)
+: m_nHashLen(nHashLen)
+, m_hCipher(rtl_cipher_create(rtl_Cipher_AlgorithmARCFOUR, 
rtl_Cipher_ModeStream))
+, m_aDigestValue(nHashLen, 0)
 {
+assert(m_hCipher != nullptr);
+(void)memset (m_pDocId, 0, sizeof(m_pDocId));
 }
 
 MSCodec_Std97::MSCodec_Std97()
-: MSCodec97(rtl_cipher_create(rtl_Cipher_AlgorithmARCFOUR, 
rtl_Cipher_ModeStream))
+: MSCodec97(RTL_DIGEST_LENGTH_MD5)
 {
-assert(m_hCipher != nullptr);
 m_hDigest = rtl_digest_create(rtl_Digest_AlgorithmMD5);
 assert(m_hDigest != nullptr);
-(void)memset (m_pDigestValue, 0, sizeof(m_pDigestValue));
-(void)memset (m_pDocId, 0, sizeof(m_pDocId));
+}
+
+MSCodec_CryptoAPI::MSCodec_CryptoAPI()
+: MSCodec97(RTL_DIGEST_LENGTH_SHA1)
+{
 }
 
 MSCodec97::~MSCodec97()
 {
+(void)memset(m_aDigestValue.data(), 0, m_aDigestValue.size());
+(void)memset(m_pDocId, 0, sizeof(m_pDocId));
 rtl_cipher_destroy(m_hCipher);
 }
 
 MSCodec_Std97::~MSCodec_Std97()
 {
-(void)memset (m_pDigestValue, 0, sizeof(m_pDigestValue));
-(void)memset (m_pDocId, 0, sizeof(m_pDocId));
 rtl_digest_destroy(m_hDigest);
 }
 
@@ -286,7 +292,7 @@ static inline void lcl_PrintDigest(const sal_uInt8* 
/*pDigest*/, const char* /*m
 }
 #endif
 
-bool MSCodec_Std97::InitCodec( const uno::Sequence< beans::NamedValue >& aData 
)
+bool MSCodec97::InitCodec( const uno::Sequence< beans::NamedValue >& aData )
 {
 #if DEBUG_MSO_ENCRYPTION_STD97
 fprintf(stdout, "MSCodec_Std97::InitCodec: --begin\n");fflush(stdout);
@@ -295,16 +301,17 @@ bool MSCodec_Std97::InitCodec( const uno::Sequence< 
beans::NamedValue >& aData )
 
 ::comphelper::SequenceAsHashMap aHashData( aData );
 uno::Sequence< sal_Int8 > aKey = 
aHashData.getUnpackedValueOrDefault("STD97EncryptionKey", uno::Sequence< 
sal_Int8 >() );
-
-if ( aKey.getLength() == RTL_DIGEST_LENGTH_MD5 )
+const size_t nKeyLen = aKey.getLength();
+if (nKeyLen == m_nHashLen)
 {
-(void)memcpy( m_pDigestValue, aKey.getConstArray(), 
RTL_DIGEST_LENGTH_MD5 );
+assert(m_aDigestValue.size() == m_nHashLen);
+(void)memcpy(m_aDigestValue.data(), aKey.getConstArray(), m_nHashLen);
 uno::Sequence< sal_Int8 > aUniqueID = 
aHashData.getUnpackedValueOrDefault("STD97UniqueID", uno::Sequence< sal_Int8 
>() );
 if ( aUniqueID.getLength() == 16 )
 {
 (void)memcpy( m_pDocId, aUniqueID.getConstArray(), 16 );
 bResult = true;
-lcl_PrintDigest(m_pDigestValue, "digest value");
+lcl_PrintDigest(m_aDigestValue.data(), "digest value");
 lcl_PrintDigest(m_pDocId, "DocId value");
 }
 else
@@ -316,10 +323,11 @@ bool MSCodec_Std97::InitCodec( const uno::Sequence< 
beans::NamedValue >& aData )
 return bResult;
 }
 
-uno::Sequence< beans::NamedValue > MSCodec_Std97::GetEncryptionData()
+uno::Sequence< beans::NamedValue > MSCodec97::GetEncryptionData()
 {
 ::comphelper::SequenceAsHashMap aHashData;
-aHashData[ OUString( "STD97EncryptionKey" ) ] <<= uno::Sequence< sal_Int8 
>( reinterpret_cast(m_pDigestValue), RTL_DIGEST_LENGTH_MD5 );
+assert(m_aDigestValue.size() == m_nHashLen);
+aHashData[ OUString( "STD97EncryptionKey" ) ] <<= uno::Sequence< sal_Int8 
>( reinterpret_cast(m_aDigestValue.data()), m_nHashLen );
 aHashData[ OUString( "STD97UniqueID" ) ] <<= uno::Sequence< sal_Int8 >( 
reinterpret_cast(m_pDocId), 16 );
 
 return aHashData.getAsConstNamedVal

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

2016-10-21 Thread Noel Grandin
 basic/source/classes/sb.cxx|7 +++
 basic/source/classes/sbintern.cxx  |2 +-
 basic/source/inc/sbintern.hxx  |2 +-
 basic/source/sbx/sbxvalue.cxx  |7 +--
 canvas/source/tools/propertysethelper.cxx  |2 +-
 comphelper/source/misc/accessiblecontexthelper.cxx |4 ++--
 include/basic/sbstar.hxx   |1 -
 include/basic/sbxvar.hxx   |1 -
 include/canvas/propertysethelper.hxx   |4 
 include/comphelper/accessiblecontexthelper.hxx |2 --
 10 files changed, 9 insertions(+), 23 deletions(-)

New commits:
commit 5a5731cd0587553f21b2cee2a99db9f527396406
Author: Noel Grandin 
Date:   Fri Oct 21 08:35:29 2016 +0200

loplugin:expandablemethodds in include/basic..comphelper

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

diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index d541d44..e34daa0 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1420,7 +1420,7 @@ SbMethod* StarBASIC::GetActiveMethod( sal_uInt16 nLevel )
 
 SbModule* StarBASIC::GetActiveModule()
 {
-if( GetSbData()->pInst && !IsCompilerError() )
+if( GetSbData()->pInst && !GetSbData()->bCompilerError )
 {
 return GetSbData()->pInst->GetActiveModule();
 }
@@ -1471,7 +1471,6 @@ sal_uInt16 StarBASIC::GetCol2() { return 
GetSbData()->nCol2; }
 // Specific to error handler
 SbError StarBASIC::GetErrorCode()   { return GetSbData()->nCode; }
 const OUString& StarBASIC::GetErrorText() { return GetSbData()->aErrMsg; }
-bool StarBASIC::IsCompilerError()   { return GetSbData()->bCompiler; }
 
 // From 1996-03-29:
 // The mapping between the old and the new error codes take place by searching
@@ -1667,7 +1666,7 @@ bool StarBASIC::CError( SbError code, const OUString& 
rMsg,
 code = (SbError)*new StringErrorInfo( code, rMsg );
 }
 SetErrorData( code, l, c1, c2 );
-GetSbData()->bCompiler = true;
+GetSbData()->bCompilerError = true;
 bool bRet;
 if( GetSbData()->aErrHdl.IsSet() )
 {
@@ -1677,7 +1676,7 @@ bool StarBASIC::CError( SbError code, const OUString& 
rMsg,
 {
 bRet = ErrorHdl();
 }
-GetSbData()->bCompiler = false; // only true for error handler
+GetSbData()->bCompilerError = false; // only true for error handler
 return bRet;
 }
 
diff --git a/basic/source/classes/sbintern.cxx 
b/basic/source/classes/sbintern.cxx
index 26b0216..20cbf6f 100644
--- a/basic/source/classes/sbintern.cxx
+++ b/basic/source/classes/sbintern.cxx
@@ -49,7 +49,7 @@ SbiGlobals::SbiGlobals()
 nCode = 0;
 nLine = 0;
 nCol1 = nCol2 = 0;
-bCompiler = false;
+bCompilerError = false;
 bGlobalInitErr = false;
 bRunInit = false;
 pTransliterationWrapper = nullptr;
diff --git a/basic/source/inc/sbintern.hxx b/basic/source/inc/sbintern.hxx
index a0ebd19..03ce05a 100644
--- a/basic/source/inc/sbintern.hxx
+++ b/basic/source/inc/sbintern.hxx
@@ -94,7 +94,7 @@ struct SbiGlobals
 SbError nCode;
 sal_Int32   nLine;
 sal_Int32   nCol1,nCol2;// from... to...
-boolbCompiler;  // flag for compiler error
+boolbCompilerError; // flag for compiler error
 boolbGlobalInitErr;
 boolbRunInit;   // true, if RunInit active from the Basic
 OUStringaErrMsg;// buffer for GetErrorText()
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 2183d16..1c93523 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -192,11 +192,6 @@ void SbxValue::Broadcast( sal_uInt32 )
 // If the variable contain a variable or an object, this will be
 // addressed.
 
-SbxValue* SbxValue::TheRealValue() const
-{
-return TheRealValue( true );
-}
-
 SbxValue* SbxValue::TheRealValue( bool bObjInObjError ) const
 {
 SbxValue* p = const_cast(this);
@@ -286,7 +281,7 @@ bool SbxValue::Get( SbxValues& rRes ) const
 // If an object or a VARIANT is requested, don't search the real values
 SbxValue* p = const_cast(this);
 if( rRes.eType != SbxOBJECT && rRes.eType != SbxVARIANT )
-p = TheRealValue();
+p = TheRealValue( true );
 if( p )
 {
 p->Broadcast( SBX_HINT_DATAWANTED );
diff --git a/canvas/source/tools/propertysethelper.cxx 
b/canvas/source/tools/propertysethelper.cxx
index ba8ade3..7fdc153 100644
--- a/canvas/source/tools/propertysethelper.cxx
+++ b/canvas/source/tools/propertysethelper.cxx
@@ -76,7 +76,7 @@ namespace canvas
 
 void PropertySetHelper::addProperties( const InputMap& rMap )
 {
-InputMap aMerged( getPropertyMap() );
+InputMap aMerged( maMapEntrie

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

2016-10-21 Thread Michael Meeks
 loolwsd/Storage.cpp |   21 -
 1 file changed, 16 insertions(+), 5 deletions(-)

New commits:
commit c015fecb2cae413e2e9fdc008e088b0a56599779
Author: Michael Meeks 
Date:   Fri Oct 21 09:57:17 2016 +0100

Improve logging of WOPI protocol errors.

diff --git a/loolwsd/Storage.cpp b/loolwsd/Storage.cpp
index f12c056..a20691d 100644
--- a/loolwsd/Storage.cpp
+++ b/loolwsd/Storage.cpp
@@ -263,6 +263,14 @@ Poco::Net::HTTPClientSession* getHTTPClientSession(const 
Poco::URI& uri)
: new Poco::Net::HTTPClientSession(uri.getHost(), 
uri.getPort());
 }
 
+Poco::Dynamic::Var getOrWarn(const Poco::JSON::Object::Ptr &object, const char 
*key)
+{
+const auto value = object->get(key);
+if (value.isEmpty())
+Log::error("Missing JSON property: '" + std::string(key) + "'");
+return value;
+}
+
 } // anonymous namespace
 
 StorageBase::FileInfo WopiStorage::getFileInfo(const Poco::URI& uriPublic)
@@ -308,15 +316,18 @@ StorageBase::FileInfo WopiStorage::getFileInfo(const 
Poco::URI& uriPublic)
 Poco::JSON::Parser parser;
 const auto result = parser.parse(stringJSON);
 const auto& object = result.extract();
-filename = object->get("BaseFileName").toString();
-size = std::stoul(object->get("Size").toString(), nullptr, 0);
-const auto userIdVar = object->get("UserId");
+filename = getOrWarn(object, "BaseFileName").toString();
+const auto sizeVar = getOrWarn(object, "Size");
+size = std::stoul(sizeVar.toString(), nullptr, 0);
+const auto userIdVar = getOrWarn(object, "UserId");
 userId = (userIdVar.isString() ? userIdVar.toString() : "");
-const auto userNameVar = object->get("UserFriendlyName");
+const auto userNameVar = getOrWarn(object,"UserFriendlyName");
 userName = (userNameVar.isString() ? userNameVar.toString() : 
"anonymous");
-const auto canWriteVar = object->get("UserCanWrite");
+const auto canWriteVar = getOrWarn(object, "UserCanWrite");
 canWrite = canWriteVar.isString() ? (canWriteVar.toString() == "true") 
: false;
 }
+else
+Log::error("WOPI::CheckFileInfo is missing JSON payload");
 
 // WOPI doesn't support file last modified time.
 _fileInfo = FileInfo({filename, Poco::Timestamp(), size, userId, userName, 
canWrite});
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-0' - loolwsd/Storage.cpp

2016-10-21 Thread Michael Meeks
 loolwsd/Storage.cpp |   21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

New commits:
commit a3ba0a4b0f2eddee8338c4de156573045ef25de4
Author: Michael Meeks 
Date:   Fri Oct 21 10:00:57 2016 +0100

Improve logging of WOPI protocol errors.

diff --git a/loolwsd/Storage.cpp b/loolwsd/Storage.cpp
index b53260f..e88fc09 100644
--- a/loolwsd/Storage.cpp
+++ b/loolwsd/Storage.cpp
@@ -258,6 +258,14 @@ Poco::Net::HTTPClientSession* 
lcl_getHTTPClientSession(const Poco::URI& uri)
: new Poco::Net::HTTPClientSession(uri.getHost(), 
uri.getPort());
 }
 
+Poco::Dynamic::Var getOrWarn(const Poco::JSON::Object::Ptr &object, const char 
*key)
+{
+const auto value = object->get(key);
+if (value.isEmpty())
+Log::error("Missing JSON property: '" + std::string(key) + "'");
+return value;
+}
+
 } // anonymous namespace
 
 ///
@@ -300,13 +308,18 @@ StorageBase::FileInfo WopiStorage::getFileInfo(const 
Poco::URI& uri)
 Poco::JSON::Parser parser;
 const auto result = parser.parse(stringJSON);
 const auto& object = result.extract();
-filename = object->get("BaseFileName").toString();
-size = std::stoul(object->get("Size").toString(), nullptr, 0);
-const auto userIdVar = object->get("UserId");
+filename = getOrWarn(object, "BaseFileName").toString();
+const auto sizeVar = getOrWarn(object, "Size");
+size = std::stoul(sizeVar.toString(), nullptr, 0);
+const auto userIdVar = getOrWarn(object, "UserId");
 userId = (userIdVar.isString() ? userIdVar.toString() : "");
-const auto userNameVar = object->get("UserFriendlyName");
+const auto userNameVar = getOrWarn(object,"UserFriendlyName");
 userName = (userNameVar.isString() ? userNameVar.toString() : 
"anonymous");
+const auto canWriteVar = getOrWarn(object, "UserCanWrite");
+// not used yet - but - will be required in newer versions.
 }
+else
+Log::error("WOPI::CheckFileInfo is missing JSON payload");
 
 // WOPI doesn't support file last modified time.
 return FileInfo({filename, Poco::Timestamp(), size, userId, userName});
___
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

2016-10-21 Thread Noel Grandin
 include/vcl/button.hxx  |1 -
 include/vcl/dockwin.hxx |1 -
 include/vcl/field.hxx   |8 
 include/vcl/layout.hxx  |9 -
 include/vcl/openglwin.hxx   |2 --
 include/vcl/tabctrl.hxx |5 -
 include/vcl/unohelp2.hxx|2 --
 include/vcl/virdev.hxx  |2 --
 vcl/source/app/unohelp2.cxx |2 +-
 vcl/source/control/button.cxx   |2 +-
 vcl/source/control/field.cxx|7 +--
 vcl/source/control/field2.cxx   |   11 +++
 vcl/source/control/tabctrl.cxx  |2 +-
 vcl/source/gdi/virdev.cxx   |2 +-
 vcl/source/window/dockwin.cxx   |2 +-
 vcl/source/window/layout.cxx|4 ++--
 vcl/source/window/openglwin.cxx |7 +--
 17 files changed, 12 insertions(+), 57 deletions(-)

New commits:
commit d24bc6089c13413e5d702f5606de0b8573a14f20
Author: Noel Grandin 
Date:   Fri Oct 21 09:55:09 2016 +0200

loplugin:expandablemethodds in include/vcl

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

diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 6ce35fa..c7976b4 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -130,7 +130,6 @@ protected:
 using Button::ImplGetTextStyle;
 SAL_DLLPRIVATE DrawTextFlags   ImplGetTextStyle( DrawFlags nDrawFlags ) 
const;
 SAL_DLLPRIVATE boolIsSymbol() const { return ( (meSymbol != 
SymbolType::DONTKNOW) && (meSymbol != SymbolType::IMAGE) ); }
-SAL_DLLPRIVATE boolIsImage() const { return 
Button::HasImage(); }
 
PushButton( const PushButton & ) = delete;
PushButton& operator=( const PushButton & )
diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx
index f0543ff..bbaef0f 100644
--- a/include/vcl/dockwin.hxx
+++ b/include/vcl/dockwin.hxx
@@ -267,7 +267,6 @@ public:
 
 SAL_DLLPRIVATE boolImplStartDocking( const Point& rPos );
 SAL_DLLPRIVATE boolisDeferredInit() const { return mbIsDefferedInit; }
-SAL_DLLPRIVATE boolhasPendingLayout() const { return 
maLayoutIdle.IsActive(); }
 virtualvoiddoDeferredInit(WinBits nBits);
 protected:
 DockingWindow( WindowType nType );
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index d6612fd..09e9a4e 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -249,9 +249,6 @@ public:
 
 class VCL_DLLPUBLIC CurrencyFormatter : public NumericFormatter
 {
-private:
-SAL_DLLPRIVATE void ImplInit();
-
 protected:
 CurrencyFormatter();
 SAL_DLLPRIVATE bool ImplCurrencyReformat( const OUString& rStr, 
OUString& rOutStr );
@@ -329,7 +326,6 @@ public:
 
 
 voidSetDate( const Date& rNewDate );
-voidSetUserDate( const Date& rNewDate );
 DateGetDate() const;
 voidSetEmptyDate();
 boolIsEmptyDate() const;
@@ -339,8 +335,6 @@ public:
 static void ExpandCentury( Date& rDate );
 static void ExpandCentury( Date& rDate, sal_uInt16 
nTwoDigitYearStart );
 
-static Date GetInvalidDate() { return Date( Date::EMPTY ); }
-
 /** enables or disables the enforcement of valid values
 
 If this is set to true (which is the default), then GetDate will 
always return a valid
@@ -414,8 +408,6 @@ public:
 voidSetEmptyTime() { 
FormatterBase::SetEmptyFieldValue(); }
 boolIsEmptyTime() const { return 
FormatterBase::IsEmptyFieldValue(); }
 
-static tools::Time  GetInvalidTime() { return tools::Time( 99, 99, 99 
); }
-
 /** enables or disables the enforcement of valid values
 
 If this is set to true (which is the default), then GetTime will 
always return a valid
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 8623260..7404630 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -39,11 +39,6 @@ public:
 //the rWindows alignment desires within that allocation
 static void setLayoutAllocation(vcl::Window &rWindow, const Point &rPos, 
const Size &rSize);
 
-void markLayoutDirty()
-{
-m_bLayoutDirty = true;
-}
-
 virtual void queue_resize(StateChangedType eReason = 
StateChangedType::Layout) override;
 protected:
 //these are the two that need to be implemented by
@@ -208,10 +203,6 @@ public:
 , m_eLayoutStyle(VCL_BUTTONBOX_DEFAULT_STYLE)
 {
 }
-void set_layout(VclButtonBoxStyle eStyle)
-{
-m_eLayoutStyle = eStyle;
-}
 virtual bool set_property(const OString &rKey, const OString &rValue) 
override;
 void sort_native_button_order();
 protected:
diff --git a/include/vcl/openglwin.hxx b/include/vcl/openg

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

2016-10-21 Thread Miklos Vajna
 sc/qa/unit/helper/qahelper.cxx  |2 
 sc/qa/unit/ucalc.cxx|   26 +-
 sc/qa/unit/ucalc_condformat.cxx |2 
 sc/qa/unit/ucalc_formula.cxx|   96 
 sc/qa/unit/ucalc_pivottable.cxx |4 -
 5 files changed, 65 insertions(+), 65 deletions(-)

New commits:
commit 5d8ba798498f0c68ab2a4dbb3471b37e9c6ea2b5
Author: Miklos Vajna 
Date:   Fri Oct 21 08:13:36 2016 +0200

CppunitTest_sc_ucalc: fix loplugin:cppunitassertequals warnings

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

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index e46de2b..32f2375 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -238,7 +238,7 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* 
pDoc, sal_Int32 nFormat)
 }
 pPattern = pDoc->GetPattern(1,4,1);
 Color aColor = static_cast(pPattern->GetItem(ATTR_BACKGROUND)).GetColor();
-CPPUNIT_ASSERT_MESSAGE("background color should be green", aColor == 
COL_LIGHTGREEN);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("background color should be green", 
Color(COL_LIGHTGREEN), aColor);
 pPattern = pDoc->GetPattern(2,0,1);
 SvxCellHorJustify eHorJustify = 
static_cast(static_cast(pPattern->GetItem(ATTR_HOR_JUSTIFY)).GetValue());
 CPPUNIT_ASSERT_EQUAL_MESSAGE("cell content should be aligned centre 
horizontally", SVX_HOR_JUSTIFY_CENTER, eHorJustify);
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 7d3f05c..24e0e45 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -521,7 +521,7 @@ void Test::testDataEntries()
 ++it;
 CPPUNIT_ASSERT_EQUAL(OUString("Charlie"), it->GetString());
 ++it;
-CPPUNIT_ASSERT_MESSAGE("The entries should have ended here.", it == 
aEntries.end());
+CPPUNIT_ASSERT_MESSAGE("The entries should have ended here.", bool(it == 
aEntries.end()));
 
 aEntries.clear();
 m_pDoc->GetDataEntries(0, MAXROW, 0, aEntries); // Try at the very bottom.
@@ -535,7 +535,7 @@ void Test::testDataEntries()
 ++it;
 CPPUNIT_ASSERT_EQUAL(OUString("Charlie"), it->GetString());
 ++it;
-CPPUNIT_ASSERT_MESSAGE("The entries should have ended here.", it == 
aEntries.end());
+CPPUNIT_ASSERT_MESSAGE("The entries should have ended here.", bool(it == 
aEntries.end()));
 
 m_pDoc->DeleteTab(0);
 }
@@ -711,8 +711,8 @@ void Test::testCopyToDocument()
 
 // verify note
 CPPUNIT_ASSERT_MESSAGE("There should be a note in A1 destDocument", 
aDestDoc.HasNote(ScAddress(0, 0, 0)));
-CPPUNIT_ASSERT_MESSAGE("The notes content should be the same on both 
documents",
-aDestDoc.GetNote(ScAddress(0, 0, 0))->GetText() ==  
m_pDoc->GetNote(ScAddress(0, 0, 0))->GetText());
+CPPUNIT_ASSERT_EQUAL_MESSAGE("The notes content should be the same on both 
documents",
+m_pDoc->GetNote(ScAddress(0, 0, 0))->GetText(), 
aDestDoc.GetNote(ScAddress(0, 0, 0))->GetText());
 
 m_pDoc->DeleteTab(0);
 }
@@ -3088,7 +3088,7 @@ void Test::testCopyPaste()
 CPPUNIT_ASSERT_EQUAL_MESSAGE("local range 1 should now point to 
Sheet2.A1", aSheet2A1, aRangeLocal1);
 
 pLocal2 = m_pDoc->GetRangeName(1)->findByUpperName(OUString("LOCAL2"));
-CPPUNIT_ASSERT_MESSAGE("local2 should not be copied", pLocal2 == nullptr);
+CPPUNIT_ASSERT_MESSAGE("local2 should not be copied", !pLocal2);
 
 pLocal3 = m_pDoc->GetRangeName(1)->findByUpperName(OUString("LOCAL3"));
 CPPUNIT_ASSERT_MESSAGE("local range name 3 should be copied", pLocal3);
@@ -4853,7 +4853,7 @@ void Test::testNoteBasic()
 bool bInsertRow = m_pDoc->InsertRow(0, 0, MAXCOL, 0, 1, 1);
 CPPUNIT_ASSERT_MESSAGE("failed to insert row", bInsertRow );
 
-CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNote(aAddr) == 
nullptr);
+CPPUNIT_ASSERT_MESSAGE("note hasn't moved", !m_pDoc->GetNote(aAddr));
 aAddr.IncRow(); // cell C4
 CPPUNIT_ASSERT_EQUAL_MESSAGE("note not there", pNote, 
m_pDoc->GetNote(aAddr));
 
@@ -4861,13 +4861,13 @@ void Test::testNoteBasic()
 bool bInsertCol = m_pDoc->InsertCol(0, 0, MAXROW, 0, 1, 1);
 CPPUNIT_ASSERT_MESSAGE("failed to insert column", bInsertCol );
 
-CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNote(aAddr) == 
nullptr);
+CPPUNIT_ASSERT_MESSAGE("note hasn't moved", !m_pDoc->GetNote(aAddr));
 aAddr.IncCol(); // cell D4
 CPPUNIT_ASSERT_EQUAL_MESSAGE("note not there", pNote, 
m_pDoc->GetNote(aAddr));
 
 // Insert a new sheet to shift the current sheet to the right.
 m_pDoc->InsertTab(0, "Table2");
-CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNote(aAddr) == 
nullptr);
+CPPUNIT_ASSERT_MESSAGE("note hasn't moved", !m_pDoc->GetNote(aAddr));
 aAddr.IncTab(); // Move to the next sheet.
 CPPUNIT_ASSERT_EQUAL_MESSAGE("note not there", pNote, 
m_pDoc->GetNote(aAddr));
 
@@ -5034,10 +5034

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

2016-10-21 Thread Maxim Monastirsky
 svx/source/tbxctrls/linectrl.cxx |2 +-
 svx/uiconfig/ui/sidebarline.ui   |   13 +
 2 files changed, 2 insertions(+), 13 deletions(-)

New commits:
commit 78cdc474893902395cee98bced32bf214c78ed7f
Author: Maxim Monastirsky 
Date:   Fri Oct 21 11:03:55 2016 +0300

Arrow style dropdown was applying the wrong line ends

Regression of:

commit 2b68e03348b3b4009e8bb2af7979de36bd3450c5
Date:   Mon Aug 15 09:19:35 2016 +0200

tdf#100782 have XPropertyList hold unique_ptr

Change-Id: Ib2bb4c25f93de45823aba43aa7c04075283d4097

diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index 5d5a2f5..98d3ffb 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -322,7 +322,7 @@ IMPL_LINK_NOARG(SvxLineEndWindow, SelectHdl, ValueSet*, 
void)
 }
 else // end of line
 {
-const XLineEndEntry* pEntry = pLineEndList->GetLineEnd( (nId - 1) / 2 
);
+const XLineEndEntry* pEntry = pLineEndList->GetLineEnd( nId / 2 - 2 );
 pLineEndItem.reset(new XLineEndItem(pEntry->GetName(), 
pEntry->GetLineEnd()));
 }
 
commit 199a449e2a045e30f1f742ae6f38bf71ecb168c1
Author: Maxim Monastirsky 
Date:   Fri Oct 21 10:25:39 2016 +0300

Silence warning

warn:vcl.layout:32414:1:vcl/source/window/builder.cxx:3100:
unknown class

Change-Id: I8019f8568b33f5a67c0acedb962d991cc1c93a1a

diff --git a/svx/uiconfig/ui/sidebarline.ui b/svx/uiconfig/ui/sidebarline.ui
index 43af15e..9e0e01d 100644
--- a/svx/uiconfig/ui/sidebarline.ui
+++ b/svx/uiconfig/ui/sidebarline.ui
@@ -2,7 +2,7 @@
 
 
   
-  
+  
   
 100
 10
@@ -288,12 +288,6 @@
 Corner Style
   
 
-
-  
-  
-  
-  
-
   
   
 0
@@ -334,11 +328,6 @@
 Cap Style
   
 
-
-  
-  
-  
-
   
   
 1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-21 Thread Caolán McNamara
 vcl/source/gdi/CommonSalLayout.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5c0265a78a5bb2633a42ff820a5837ef62cc91f1
Author: Caolán McNamara 
Date:   Fri Oct 21 09:04:49 2016 +0100

coverity#1374090 Unintentional integer overflow

and

coverity#1374091 Unintentional integer overflow

Change-Id: Ia36b1feafc44e6ea65c55c9ffc661256276d9b29

diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index 8432e91..96762f1 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -101,8 +101,8 @@ static hb_font_t* createHbFont(hb_face_t* pHbFace)
 
 static void scaleHbFont(hb_font_t* pHbFont, const FontSelectPattern& 
aFontSelData)
 {
-uint64_t nXScale = aFontSelData.mnWidth << 6;
-uint64_t nYScale = aFontSelData.mnHeight << 6;
+unsigned int nXScale = aFontSelData.mnWidth << 6;
+unsigned int nYScale = aFontSelData.mnHeight << 6;
 
 #if defined(_WIN32)
 // HACK to get stretched/shrunken text. TODO: Get rid of HACK
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/screenshotannotation' - cui/source

2016-10-21 Thread Katarina Behrens
 cui/source/dialogs/screenshotannotationdlg.cxx |   23 ++-
 1 file changed, 22 insertions(+), 1 deletion(-)

New commits:
commit f0b83ae615ea5832d63558ff1c4efaa0e6844150
Author: Katarina Behrens 
Date:   Thu Oct 20 20:31:40 2016 +0200

screenshot annotation: insert markup for annotated widgets

Change-Id: I82b8c541239271e3acfa6d8ad45b752fa1554931

diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx 
b/cui/source/dialogs/screenshotannotationdlg.cxx
index d44806b..0f34928 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -78,6 +78,15 @@ namespace
 OUString("");
 return aRet;
 }
+
+OUString lcl_Bookmark( const OUString& rWidgetId )
+{
+OUString aRet = ""  + 
SAL_NEWLINE_STRING;
+aRet += OUString("") + SAL_NEWLINE_STRING;
+return aRet;
+}
 }
 
 class ControlDataEntry
@@ -101,6 +110,8 @@ public:
 return maB2IRange;
 }
 
+const OString GetHelpId() const { return mrControl.GetHelpId(); }
+
 private:
 const vcl::Window&  mrControl;
 basegfx::B2IRange   maB2IRange;
@@ -165,6 +176,7 @@ private:
 
 // save as text
 OUStringmaSaveAsText;
+OUStringmaMainMarkupText;
 
 // folder URL
 static OUString maLastFolderURL;
@@ -246,7 +258,8 @@ ScreenshotAnnotationDlg_Impl::ScreenshotAnnotationDlg_Impl(
 if (mpText)
 {
 OUString aHelpId = OStringToOUString( mrParentDialog.GetHelpId(), 
RTL_TEXTENCODING_UTF8 );
-mpText->SetText( lcl_ParagraphWithImage( aHelpId) );
+maMainMarkupText = lcl_ParagraphWithImage( aHelpId);
+mpText->SetText( maMainMarkupText );
 mpText->SetReadOnly(true);
 }
 
@@ -589,6 +602,14 @@ IMPL_LINK_TYPED(ScreenshotAnnotationDlg_Impl, 
pictureFrameListener, VclWindowEve
 maSelected.insert(mpHilighted);
 }
 
+OUString aBookmarks;
+for (auto&& rCandidate : maSelected)
+{
+OUString aHelpId = OStringToOUString( 
rCandidate->GetHelpId(), RTL_TEXTENCODING_UTF8 );
+aBookmarks += lcl_Bookmark( aHelpId );
+}
+
+mpText->SetText( maMainMarkupText + aBookmarks );
 bRepaint = true;
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-21 Thread Caolán McNamara
 sw/source/core/text/frmcrsr.cxx  |3 +--
 sw/source/filter/ww8/ww8par2.cxx |2 +-
 sw/source/filter/ww8/ww8par6.cxx |2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 851703f2c525ee4192d9837998ce3e9f66f92012
Author: Caolán McNamara 
Date:   Thu Oct 20 20:34:27 2016 +0100

coverity#1371270 Missing move assignment operator

Change-Id: I47438184a9a895b7aa9889ae1308fda29434a774

diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 130c710..959dd44 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -1198,8 +1198,7 @@ bool SwTextFrame::UnitDown_(SwPaM *pPam, const SwTwips 
nOffset,
 // We make sure that we move down.
 if( nTmpOfst <= nStart && ! bFirstOfDouble )
 nTmpOfst = nStart + 1;
-pPam->GetPoint()->nContent =
-  SwIndex( const_cast(this)->GetTextNode(), 
nTmpOfst );
+
pPam->GetPoint()->nContent.Assign(const_cast(this)->GetTextNode(),
 nTmpOfst);
 
 if ( IsVertical() )
 const_cast(this)->SwapWidthAndHeight();
commit 0454c5717fe2fd0c96ff5b09b4c3a5b71ef8d862
Author: Caolán McNamara 
Date:   Thu Oct 20 20:33:21 2016 +0100

coverity#1371301 Missing move assignment operator

Change-Id: Ic6f11b8e39bafd401f4b261fa8aad66d8782ebeb

diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 5f5c4f8..817139d 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2337,7 +2337,7 @@ void wwSectionManager::PrependedInlineNode(const 
SwPosition &rPos,
 OSL_ENSURE(!maSegments.empty(),
 "should not be possible, must be at least one segment");
 if ((!maSegments.empty()) && (maSegments.back().maStart == rPos.nNode))
-maSegments.back().maStart = SwNodeIndex(rNode);
+maSegments.back().maStart.Assign(rNode);
 }
 
 void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem)
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 5f3afa8..11850a0 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2408,7 +2408,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo,
 void wwSectionManager::JoinNode(const SwPosition &rPos, const SwNode &rNode)
 {
 if ((!maSegments.empty()) && (maSegments.back().maStart == rPos.nNode))
-maSegments.back().maStart = SwNodeIndex(rNode);
+maSegments.back().maStart.Assign(rNode);
 }
 
 bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


RE: looking for developper informations about Calc

2016-10-21 Thread LORENZO Vincent
Hi Eike, 
I thank you for your answers. I will have a look at the documentation, but 
it is too bad to be limited to text and numeric as cell content, it will be 
more complex to manage our java object through Calc.

I found the group feature which allows to make trees, but it seems me it take 
big place to the left of my rows compared to NatTable, where the expand 
collapse button is available on each level and displayed into the cell. 

Regards, 
--
Vincent Lorenzo

-Message d'origine-
De : Eike Rathke [mailto:er...@redhat.com] 
Envoyé : jeudi 20 octobre 2016 21:25
À : LORENZO Vincent 
Cc : libreoffice@lists.freedesktop.org
Objet : Re: looking for developper informations about Calc

Hi LORENZO,

On Thursday, 2016-10-20 09:03:35 +, LORENZO Vincent wrote:

> Here I will give you a list of the main features used in NatTable and for 
> which I would like to know if they already exist in Calc and if there is an 
> API (in Java ?) to drive them:
> - Customize the cell appearance with CSS
No.

> - Manage the cell contents
Yes.

> - Manage the cell access (read-only or read-write)
Yes.

> - Declare custom cell editors (or dialogs) on cells to edit their 
> contents
No. However, validity criteria and selection lists can be created for cell 
input.

> - Show/hide columns or rows (not a deletion)
Yes.

> - Display data as a tree in a column (with expanding, collapsing and 
> hiding intermediate row without to hide its children)
Not sure what you mean, sounds a bit like Grouping or Pivot tables, you'd have 
to see yourself.


> In addition, I would like to know if the toolbars and the menus can be 
> customized and hidden easily.
Yes. Whether it's easy or not depends on your mileage..

> Concerning the cell management, in the NatTable widget we proceed in 2 steps :
> -  One step to declare the cell contents : we declare the java 
> object represented by the cell. It is not a string at this level, it is a 
> java object, like a list, a Boolean, an integer, ...)
> -  The second step calls a LabelProvider which returns the text 
> to display for the given object
> 
> Is it the same kind of process in Calc or it is only a text management ?
Calc has numeric, text or formula cell content. Content/results can be 
formatted for display using styles, number formats and conditional formatting. 
Java objects can't be set as cell content.

> So, to resume,  my main question concerns the customization capabilities of 
> Calc to manipulate its behavior programmatically.
> 
> At the end, please, could you indicate me where I can found developer 
> documentation about Calc and its API.

http://api.libreoffice.org/
Spreadsheet specific API under
http://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1sheet.html

  Eike

--
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A 
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/ Care 
about Free Software, support the FSFE https://fsfe.org/support/?erack
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Merging feature/commonsallayout branch

2016-10-21 Thread Tor Lillqvist
> You know the saying, "if it ain't broke, don't fix it", and most people
> dont consider XP broke (me included)


By the same token, they should then also consider LibreOffice 5.2 not
broken, and hold on to that.

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


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

2016-10-21 Thread Stephan Bergmann
 include/cppuhelper/proptypehlp.h   |1 -
 include/cppuhelper/proptypehlp.hxx |7 ---
 2 files changed, 8 deletions(-)

New commits:
commit 18f1965834757b4928bd81447457240610652241
Author: Stephan Bergmann 
Date:   Fri Oct 21 08:58:23 2016 +0200

Remove convertPropertyValue overload for OUString

...it never did anything different than the generic template overload.

Strictly speaking, removing that inline function overload could be 
considered an
API change, but it shouldn't cause any issues in practice even when 
recompiling
all code against the new include files.

Change-Id: Icb0942f56ee0888f09d3478f34d568d44651c838

diff --git a/include/cppuhelper/proptypehlp.h b/include/cppuhelper/proptypehlp.h
index d163831..ad44bdf 100644
--- a/include/cppuhelper/proptypehlp.h
+++ b/include/cppuhelper/proptypehlp.h
@@ -48,7 +48,6 @@ inline void SAL_CALL convertPropertyValue( sal_uInt16 & 
target, const css::uno::
 inline void SAL_CALL convertPropertyValue( sal_Int8 & target  , const 
css::uno::Any & source );
 inline void SAL_CALL convertPropertyValue( float & target , const 
css::uno::Any & source );
 inline void SAL_CALL convertPropertyValue( double &target , const 
css::uno::Any &source );
-inline void SAL_CALL convertPropertyValue( ::rtl::OUString &target  , const 
css::uno::Any &source );
 
 } // end namespace cppu
 
diff --git a/include/cppuhelper/proptypehlp.hxx 
b/include/cppuhelper/proptypehlp.hxx
index a9c55df..20b3013 100644
--- a/include/cppuhelper/proptypehlp.hxx
+++ b/include/cppuhelper/proptypehlp.hxx
@@ -272,13 +272,6 @@ inline void SAL_CALL convertPropertyValue( double &d , 
const css::uno::Any &a )
 }
 }
 
-inline void SAL_CALL convertPropertyValue( ::rtl::OUString &ow , const 
css::uno::Any &a )
-{
-if( !(a >>= ow) ) {
-throw css::lang::IllegalArgumentException();
-}
-}
-
 } // end namespace cppu
 
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits