[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - include/vcl vcl/inc vcl/opengl vcl/source

2016-05-06 Thread Tomaž Vajngerl
 include/vcl/opengl/OpenGLContext.hxx |8 +
 vcl/inc/opengl/RenderState.hxx   |  156 +++
 vcl/inc/opengl/TextureState.hxx  |   76 +
 vcl/opengl/gdiimpl.cxx   |   91 +---
 vcl/opengl/program.cxx   |   26 ++---
 vcl/opengl/salbmp.cxx|   14 ++-
 vcl/opengl/scale.cxx |3 
 vcl/opengl/texture.cxx   |   60 ++---
 vcl/opengl/x11/gdiimpl.cxx   |5 -
 vcl/source/opengl/OpenGLContext.cxx  |8 +
 10 files changed, 348 insertions(+), 99 deletions(-)

New commits:
commit 75667b6c68e7c9c288c74623e4925a2de42f2d6f
Author: Tomaž Vajngerl 
Date:   Thu Apr 28 14:55:45 2016 +0900

opengl: combined commits for state tracking

Includes commits:

opengl: track state of active and bound textures in context
ba0a5708803d899de4c40cfe2c1697ae83b4827a

opengl: track the state of scissor test and the dimensions
51e953a3579fb91f30f7f0d6159b737684976959

opengl: track the state of stencil test
b8f0e6452cc019744c44997c92831d94086b35b7

opengl: sync scissor and stencil state, generic capability state
a57d048f88ba6cac3ce1550e2a8a143a8887eb05

opengl: track the state of glViewport
540fee2dc7553152914f7f1d8a41921e765087ef

Change-Id: I770a6a744c0c41850c576b928f027375962088aa
Reviewed-on: https://gerrit.libreoffice.org/24508
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 
Reviewed-by: David Tardon 

diff --git a/include/vcl/opengl/OpenGLContext.hxx 
b/include/vcl/opengl/OpenGLContext.hxx
index a565f5b..c632ab5 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -62,6 +62,7 @@ class OpenGLProgram;
 class OpenGLTexture;
 class SalGraphicsImpl;
 class OpenGLTests;
+class RenderState;
 
 /// Holds the information of our new child window
 struct GLWindow
@@ -169,6 +170,11 @@ public:
 OpenGLProgram*  UseProgram( const OUString& rVertexShader, const 
OUString& rFragmentShader, const OString& preamble = "" );
 voidUseNoProgram();
 
+std::unique_ptr& state()
+{
+return mpRenderState;
+}
+
 /// Is this GL context the current context ?
 bool isCurrent();
 /// release bound resources from the current context
@@ -260,6 +266,8 @@ private:
 std::set maParents;
 #endif
 
+std::unique_ptr mpRenderState;
+
 public:
 vcl::Region maClipRegion;
 int mnPainting;
diff --git a/vcl/inc/opengl/RenderState.hxx b/vcl/inc/opengl/RenderState.hxx
new file mode 100644
index 000..ac215a8
--- /dev/null
+++ b/vcl/inc/opengl/RenderState.hxx
@@ -0,0 +1,156 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_VCL_INC_OPENGL_RENDER_STATE_H
+#define INCLUDED_VCL_INC_OPENGL_RENDER_STATE_H
+
+#include "opengl/TextureState.hxx"
+
+template
+class GenericCapabilityState
+{
+protected:
+bool mbTest;
+
+bool readState()
+{
+return (glIsEnabled(ENUM_TYPE) == GL_TRUE);
+};
+
+public:
+void sync()
+{
+mbTest = readState();
+}
+
+void enable()
+{
+if (!mbTest)
+{
+glEnable(ENUM_TYPE);
+CHECK_GL_ERROR();
+mbTest = true;
+}
+else
+{
+VCL_GL_INFO(TYPE::className() << ": enable called but already 
set");
+}
+#ifdef DBG_UTIL
+checkState();
+#endif
+}
+
+void disable()
+{
+if (mbTest)
+{
+glDisable(ENUM_TYPE);
+CHECK_GL_ERROR();
+mbTest = false;
+}
+else
+{
+VCL_GL_INFO(TYPE::className() << ": disable called but already 
set");
+}
+#ifdef DBG_UTIL
+checkState();
+#endif
+}
+
+#ifdef DBG_UTIL
+void checkState()
+{
+bool bRealState = readState();
+if (mbTest != bRealState)
+{
+VCL_GL_INFO(TYPE::className() << " mismatch! "
+<< "Expected: " << (mbTest ? "enabled" : 
"disabled")
+<< " but is: "<< (bRealState ? "enabled" : 
"disabled"));
+}
+}
+#endif
+};
+
+class ScissorState : public GenericCapabilityState
+{
+private:
+int mX;
+int mY;
+int mWidth;
+int mHeight;
+
+public:
+static std::string className() { return std::string("ScissorState"); }
+
+ScissorState()
+: mX(0)
+, mY(0)
+, mWidth(0)
+, mHeight(0)
+{}
+
+void set(int x, int y, int width, int height)
+{
+if (x != mX || y != mY || width != mWidth || height != mHeight)
+{
+   

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

2016-05-06 Thread David Tardon
 vcl/inc/window.h |2 --
 vcl/source/window/event.cxx  |   13 +
 vcl/source/window/window.cxx |1 -
 3 files changed, 1 insertion(+), 15 deletions(-)

New commits:
commit fe4ac23ed8054a8e863d911c6fb0a38c4449672a
Author: David Tardon 
Date:   Fri May 6 09:18:58 2016 +0200

tdf#99703 Revert "improve perf. of VCL event dispatch"

... as it causes a crash at exit.

This reverts commit 9ff1d7f8140de1224bb37fba0cb266a58f37e66d.

Change-Id: I48bfd8974e6ed6c5ba3f8282eb8717f685d580be

diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 302e9d0..e06a6b1 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -201,8 +201,6 @@ public:
 VclPtr mpLastFocusWindow;
 VclPtr mpDlgCtrlDownWindow;
 std::vector> maEventListeners;
-int mnEventListenersIteratingCount;
-std::set> maEventListenersDeleted;
 std::vector> maChildEventListeners;
 int mnChildEventListenersIteratingCount;
 std::set> maChildEventListenersDeleted;
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 0a7f04c..10a85ed 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -216,22 +216,11 @@ void Window::CallEventListeners( sal_uLong nEvent, void* 
pData )
 {
 // Copy the list, because this can be destroyed when calling a Link...
 std::vector> aCopy( 
mpWindowImpl->maEventListeners );
-// we use an iterating counter/flag and a set of deleted Link's to 
avoid O(n^2) behaviour
-mpWindowImpl->mnEventListenersIteratingCount++;
-auto& rWindowImpl = *mpWindowImpl;
-comphelper::ScopeGuard aGuard(
-[&rWindowImpl]()
-{
-rWindowImpl.mnEventListenersIteratingCount--;
-if (rWindowImpl.mnEventListenersIteratingCount == 0)
-rWindowImpl.maEventListenersDeleted.clear();
-}
-);
 for ( Link& rLink : aCopy )
 {
 if (xWindow->IsDisposed()) break;
 // check this hasn't been removed in some re-enterancy scenario 
fdo#47368
-if( rWindowImpl.maEventListenersDeleted.find(rLink) == 
rWindowImpl.maEventListenersDeleted.end() )
+if( std::find(mpWindowImpl->maEventListeners.begin(), 
mpWindowImpl->maEventListeners.end(), rLink) != 
mpWindowImpl->maEventListeners.end() )
 rLink.Call( aEvent );
 }
 }
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index d1c1ffe..f245c47 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -615,7 +615,6 @@ WindowImpl::WindowImpl( WindowType nType )
 mpNextOverlap   = nullptr;  // 
next overlap window of frame
 mpLastFocusWindow   = nullptr;  // 
window for focus restore
 mpDlgCtrlDownWindow = nullptr;  // 
window for dialog control
-mnEventListenersIteratingCount = 0;
 mnChildEventListenersIteratingCount = 0;
 mpUserData  = nullptr;  // 
user data
 mpCursor= nullptr;  // 
cursor
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-06 Thread David Tardon
 vcl/inc/window.h |2 ++
 vcl/source/window/event.cxx  |   15 ++-
 vcl/source/window/window.cxx |1 +
 3 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 2fb31f248fe86c52c1070cbc8b18b24872a4bedc
Author: David Tardon 
Date:   Fri May 6 09:33:37 2016 +0200

improve perf. of VCL event dispatch, take II

Change-Id: I5052f0c3e2c8739b336da52ef9590e5008255247

diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index e06a6b1..302e9d0 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -201,6 +201,8 @@ public:
 VclPtr mpLastFocusWindow;
 VclPtr mpDlgCtrlDownWindow;
 std::vector> maEventListeners;
+int mnEventListenersIteratingCount;
+std::set> maEventListenersDeleted;
 std::vector> maChildEventListeners;
 int mnChildEventListenersIteratingCount;
 std::set> maChildEventListenersDeleted;
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 10a85ed..c7d1777 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -216,11 +216,22 @@ void Window::CallEventListeners( sal_uLong nEvent, void* 
pData )
 {
 // Copy the list, because this can be destroyed when calling a Link...
 std::vector> aCopy( 
mpWindowImpl->maEventListeners );
+// we use an iterating counter/flag and a set of deleted Link's to 
avoid O(n^2) behaviour
+mpWindowImpl->mnEventListenersIteratingCount++;
+auto& rWindowImpl = *mpWindowImpl;
+comphelper::ScopeGuard aGuard(
+[&rWindowImpl]()
+{
+rWindowImpl.mnEventListenersIteratingCount--;
+if (rWindowImpl.mnEventListenersIteratingCount == 0)
+rWindowImpl.maEventListenersDeleted.clear();
+}
+);
 for ( Link& rLink : aCopy )
 {
 if (xWindow->IsDisposed()) break;
 // check this hasn't been removed in some re-enterancy scenario 
fdo#47368
-if( std::find(mpWindowImpl->maEventListeners.begin(), 
mpWindowImpl->maEventListeners.end(), rLink) != 
mpWindowImpl->maEventListeners.end() )
+if( rWindowImpl.maEventListenersDeleted.find(rLink) == 
rWindowImpl.maEventListenersDeleted.end() )
 rLink.Call( aEvent );
 }
 }
@@ -279,6 +290,8 @@ void Window::RemoveEventListener( const 
Link& rEventListen
 {
 auto& rListeners = mpWindowImpl->maEventListeners;
 rListeners.erase( std::remove(rListeners.begin(), rListeners.end(), 
rEventListener ), rListeners.end() );
+if (mpWindowImpl->mnEventListenersIteratingCount)
+mpWindowImpl->maEventListenersDeleted.insert(rEventListener);
 }
 }
 
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index f245c47..d1c1ffe 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -615,6 +615,7 @@ WindowImpl::WindowImpl( WindowType nType )
 mpNextOverlap   = nullptr;  // 
next overlap window of frame
 mpLastFocusWindow   = nullptr;  // 
window for focus restore
 mpDlgCtrlDownWindow = nullptr;  // 
window for dialog control
+mnEventListenersIteratingCount = 0;
 mnChildEventListenersIteratingCount = 0;
 mpUserData  = nullptr;  // 
user data
 mpCursor= nullptr;  // 
cursor
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-06 Thread Pranav Kant
 loleaflet/dist/spreadsheet.css|   10 ++---
 loleaflet/dist/toolbar/toolbar.js |   71 --
 2 files changed, 73 insertions(+), 8 deletions(-)

New commits:
commit 1864491e235b3eb06f606d7db88be604c56cca92
Author: Pranav Kant 
Date:   Fri May 6 13:59:21 2016 +0530

loleaflet: Enable/Disable buttons for edit/view modes, ccu#1768

Change-Id: Id14ef66adb9bda33246625d89c093cb88927f2bb

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index 96541a3..fbbaa33 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -176,9 +176,9 @@ $(function () {
 });
 
 var formatButtons = ['undo', 'redo', 'save',
-'bold', 'italic', 'underline', 
'strikeout',
-'fontcolor', 'backcolor', 'bullet', 
'numbering', 'alignleft', 'alignhorizontal', 'alignright', 'alignblock',
-'incrementindent', 'decrementindent', 
'insertgraphic'];
+ 'bold', 'italic', 'underline', 'strikeout',
+ 'fontcolor', 'backcolor', 'bullet', 'numbering', 
'alignleft', 'alignhorizontal', 'alignright', 'alignblock',
+ 'incrementindent', 'decrementindent', 'insertgraphic'];
 
 var takeEditPopupMessage = 'You are viewing now.Click here to take 
edit';
 var takeEditPopupTimeout = null;
@@ -919,6 +919,71 @@ map.on('editlock', function (e) {
toolbar.disable(id);
}
});
+
+   var spreadsheetButtons = ['firstrecord', 'prevrecord', 'nextrecord', 
'lastrecord'];
+   var formulaBarButtons = ['sum', 'function'];
+   var presentationButtons = ['insertpage', 'duplicatepage', 'deletepage'];
+   var toolbarDownButtons = ['next', 'prev'];
+   if (e.value) {
+   // Enable list boxes
+   $('.styles-select').prop('disabled', false);
+   $('.fonts-select').prop('disabled', false);
+   $('.fontsizes-select').prop('disabled', false);
+
+   // Enable formula bar
+   $('#formulaInput').prop('disabled', false);
+   toolbar = w2ui['formulabar'];
+   formulaBarButtons.forEach(function(id) {
+   toolbar.enable(id);
+   });
+
+   toolbar = w2ui['spreadsheet-toolbar'];
+   spreadsheetButtons.forEach(function(id) {
+   toolbar.enable(id);
+   });
+
+   toolbar = w2ui['presentation-toolbar'];
+   presentationButtons.forEach(function(id) {
+   toolbar.enable(id);
+   });
+
+   toolbar = w2ui['toolbar-down'];
+   toolbarDownButtons.forEach(function(id) {
+   toolbar.enable(id);
+   });
+   $('#search-input').prop('disabled', false);
+   }
+   else {
+   // Disable list boxes
+   $('.styles-select').prop('disabled', true);
+   $('.fonts-select').prop('disabled', true);
+   $('.fontsizes-select').prop('disabled', true);
+
+   // Disable formula bar
+   $('#formulaInput').prop('disabled', true);
+
+   toolbar = w2ui['formulabar'];
+   formulaBarButtons.forEach(function(id) {
+   toolbar.disable(id);
+   });
+
+   toolbar = w2ui['spreadsheet-toolbar'];
+   spreadsheetButtons.forEach(function(id) {
+   toolbar.disable(id);
+   });
+
+   toolbar = w2ui['presentation-toolbar'];
+   presentationButtons.forEach(function(id) {
+   toolbar.disable(id);
+   });
+
+   toolbar = w2ui['toolbar-down'];
+   toolbarDownButtons.forEach(function(id) {
+   toolbar.disable(id);
+   });
+   $('#search-input').prop('disabled', true);
+   }
+
 });
 
 map.on('mouseup keypress', function(e) {
commit 2d69745d2cfa3428a903512247a890b8cec74b2e
Author: Pranav Kant 
Date:   Fri May 6 13:06:26 2016 +0530

loleaflet: Use tabs consistently

Change-Id: I1d24ba1c8956a919eb02347dfc379927f536173e

diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css
index 774a366..53f8806 100644
--- a/loleaflet/dist/spreadsheet.css
+++ b/loleaflet/dist/spreadsheet.css
@@ -45,8 +45,8 @@
}
 
 .spreadsheet-context-menu-selected {
-   background: white !important;
-   color: black !important;
+   background: white !important;
+   color: black !important;
border-top: 1px solid lightgrey;
border-left: 1px solid lightgrey;
border-right: 1px solid lightgrey;
@@ -54,8 +54,8 @@
}
 
 .spreadsheet-context-menu.context-menu-disabled {
-color: grey;
-}
+   color: grey;
+   }
 
 .sp

Re: bootstrapconnector.jar / ooo.connector.BootstrapSocketConnector

2016-05-06 Thread Katarina Behrens
Hi Ivan & list, 

> I'm writing an application that uses LibreOffice API, however in order to
> connect to LibreOffice I've ended up using a certain JAR (originally
> published on OpenOffice forums) that allows to specify a path to
> LibreOffice binary named bootstrapconnector.jar.

I know which bootstrapconnector you mean. Certain Java library built over 
Libreoffice UNO API I accidentally ended up contributing to (noa-libre [1]) was 
using it as well. However I dropped it from there recently in favour of 
Libreoffice's own bootstrapping mechanism (see below). 

Maybe you can still dig the jar out of the depths of github and see if it's 
any better than the one from Maven central, but I'm pretty certain it was 
using this old-style CLI syntax with single dash as well and noa-libre was 
working around that in its own code somehow. 

Of course, I don't know what kind of application you are writing, but maybe 
you might want to have a look at noa-libre, if it matches your needs. It 
greatly simplifies the code when it comes to basic things such as bootstrapping 
and connecting to Libreoffice and it also has some pretty nice wrapper around 
UNO API for Writer functionality (some wrapper for Calc/Impress too, but those 
are in rather unfinished state *grin* )

> My question is -- does LibreOffice has it's own version of this module
> (perhaps included in some other package or named differently)? If not, then
> perhaps LibreOffice should have it as well?

Actually, nope. It's not that I'd know all the reasoning and history behind 
technical decisions made, but last time I asked, I was told that "The 
Libreoffice Way" to bootstrap UNO from Java code is to use the combination of:

* javaunohelper (juh.jar) bootstrap class (com.sun.star.comp.helper.Bootstrap) 
* and customized class loader (com.sun.star.lib.loader) from Libreoffice SDK

Since javaunohelper's bootstrapping mechanism doesn't allow to specify path to 
Libreoffice binary, one needs the customized classloader (the one from SDK is 
Java's URLClassLoader on LSD) that will then try to find UNO on the system in 
different places, looking at Java properties, environment variables, Windows 
registry and more.

HTH

[1] https://github.com/LibreOffice/noa-libre/
-- 

Katarina Behrens

Softwareentwicklerin LibreOffice
–––
CIB software GmbH
Geschäftsstelle Hamburg
Flachsland 10
22083 Hamburg
–––
T +49 (40) / 28 48 42 -235
F +49 (40) / 28 48 42 -100

katarina.behr...@cib.de
www.cib.de
–––
Sitz: München
Registergericht München, HRB 123286
Geschäftsführer: Dipl.-Ing. Ulrich Brandner
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-05-06 Thread Maxim Monastirsky
 svx/source/dialog/fontwork.cxx |   15 --
 svx/uiconfig/ui/dockingfontwork.ui |   38 ++---
 vcl/source/window/builder.cxx  |7 +-
 3 files changed, 29 insertions(+), 31 deletions(-)

New commits:
commit fe620cb2ac2cdd75e7dbdcc0af422dff58c4fb41
Author: Maxim Monastirsky 
Date:   Fri May 6 11:32:35 2016 +0300

Set toggle/radio ToolBox bits in .ui too

The way gtk works doesn't exactly map to our ToolBox
behavior, but still we can use that to some extent.

Change-Id: Ia525e4356a612e3abfacb54d591dba05750278f2

diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
index 4c67b92..a7cc7e9 100644
--- a/svx/source/dialog/fontwork.cxx
+++ b/svx/source/dialog/fontwork.cxx
@@ -193,42 +193,27 @@ SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings 
*pBindinx,
 
 get(m_pTbxStyle, "style");
 nStyleOffId = m_pTbxStyle->GetItemId(0);
-m_pTbxStyle->SetItemBits(nStyleOffId, ToolBoxItemBits::AUTOCHECK);
 // separator is item "1"
 nStyleRotateId = m_pTbxStyle->GetItemId(2);
-m_pTbxStyle->SetItemBits(nStyleRotateId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK);
 nStyleUprightId = m_pTbxStyle->GetItemId(3);
-m_pTbxStyle->SetItemBits(nStyleUprightId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK);
 nStyleSlantXId = m_pTbxStyle->GetItemId(4);
-m_pTbxStyle->SetItemBits(nStyleSlantXId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK);
 nStyleSlantYId = m_pTbxStyle->GetItemId(5);
-m_pTbxStyle->SetItemBits(nStyleSlantYId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK);
 
 get(m_pTbxShadow, "shadow");
 nShowFormId = m_pTbxShadow->GetItemId(0);
-m_pTbxShadow->SetItemBits(nShowFormId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::CHECKABLE);
 nOutlineId = m_pTbxShadow->GetItemId(1);
-m_pTbxShadow->SetItemBits(nOutlineId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::CHECKABLE);
 // separator is item "2"
 nShadowOffId = m_pTbxShadow->GetItemId(3);
-m_pTbxShadow->SetItemBits(nShadowOffId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK);
 nShadowNormalId = m_pTbxShadow->GetItemId(4);
-m_pTbxShadow->SetItemBits(nShadowNormalId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK);
 nShadowSlantId = m_pTbxShadow->GetItemId(5);
-m_pTbxShadow->SetItemBits(nShadowSlantId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK);
 
 get(m_pTbxAdjust, "adjust");
 nAdjustMirrorId = m_pTbxAdjust->GetItemId(0);
-m_pTbxAdjust->SetItemBits(nAdjustMirrorId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::CHECKABLE);
 // separator is item "1"
 nAdjustLeftId = m_pTbxAdjust->GetItemId(2);
-m_pTbxAdjust->SetItemBits(nAdjustLeftId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK);
 nAdjustCenterId = m_pTbxAdjust->GetItemId(3);
-m_pTbxAdjust->SetItemBits(nAdjustCenterId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK);
 nAdjustRightId = m_pTbxAdjust->GetItemId(4);
-m_pTbxAdjust->SetItemBits(nAdjustRightId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK);
 nAdjustAutoSizeId = m_pTbxAdjust->GetItemId(5);
-m_pTbxAdjust->SetItemBits(nAdjustAutoSizeId, 
ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK);
 
 ApplyImageList();
 
diff --git a/svx/uiconfig/ui/dockingfontwork.ui 
b/svx/uiconfig/ui/dockingfontwork.ui
index 382f269..0c729be 100644
--- a/svx/uiconfig/ui/dockingfontwork.ui
+++ b/svx/uiconfig/ui/dockingfontwork.ui
@@ -27,7 +27,7 @@
 True
 False
 
-  
+  
 True
 False
 Off
@@ -50,7 +50,7 @@
   
 
 
-  
+  
 True
 False
 Rotate
@@ -63,12 +63,13 @@
   
 
 
-  
+  
 True
 False
 Upright
 True
 svx/res/fw03.png
+rotate
   
   
 False
@@ -76,12 +77,13 @@
   
 
 
-  
+  
 True
 False
 Slant 
Horizontal
 True
 svx/res/fw04.png
+rotate
   
   
 False
@@ -89,12 +91,13 @@
   
 
 
-  
+  
 True
 False
 Slant 
Vertical
 True
 svx/res/fw05.png
+rotate
   
   
 False
@@ -112,7 +115,7 @@
 True
 False
 
-  
+  
 True
 False
 Orientation
@@ -135,7 +138,7 @@

[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - filter/source sd/CppunitTest_sd_import_tests.mk sd/qa

2016-05-06 Thread Mike Kaganski
 filter/source/msfilter/svdfppt.cxx |   54 +
 sd/CppunitTest_sd_import_tests.mk  |1 
 sd/qa/unit/data/ppt/tdf93124.ppt   |binary
 sd/qa/unit/import-tests.cxx|   51 ++
 4 files changed, 78 insertions(+), 28 deletions(-)

New commits:
commit ac2732bdc63fa687909fdf03e2a91081003f109e
Author: Mike Kaganski 
Date:   Wed Apr 13 20:07:52 2016 +1000

tdf#93124: Fix incorrect text fit in imported PPT - take two

This patch just fixes incorrect decision when the block alignment must
be applied.

Also, unit test is included.

Reviewed-on: https://gerrit.libreoffice.org/24648
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 940b21a87cca0985c33e9ebb78ddf3aa0c3b)

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

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index f9d14e8..127e779 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -889,7 +889,6 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, 
DffObjData& rObjData, voi
 eTHA = SDRTEXTHORZADJUST_LEFT;
 break;
 }
-// if there is a 100% use of following attributes, the 
textbox can been aligned also in vertical direction
 switch ( eTextAnchor )
 {
 case mso_anchorTopCentered :
@@ -899,20 +898,20 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, 
DffObjData& rObjData, voi
 case mso_anchorBottomCenteredBaseline:
 {
 // check if it is sensible to use the centered 
alignment
-sal_uInt32 nMask = 
PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT | 
PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT;
-if ( ( nTextFlags & nMask ) != nMask )  // if the 
textobject has left and also right aligned pararagraphs
-eTVA = SDRTEXTVERTADJUST_CENTER;// the 
text has to be displayed using the full width;
-}
-break;
-
-default :
-{
-if ( nTextFlags == 
PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT )
-eTVA = SDRTEXTVERTADJUST_TOP;
-else if ( nTextFlags == 
PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT )
-eTVA = SDRTEXTVERTADJUST_BOTTOM;
+const sal_uInt32 nMask = 
PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT | 
PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_CENTER | 
PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT | 
PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_BLOCK;
+switch (nTextFlags & nMask)
+{
+case PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT:
+case PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_CENTER:
+case PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT:
+case PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_BLOCK:
+eTVA = SDRTEXTVERTADJUST_CENTER;// If the 
textobject has only one type of alignment, then the text has not to be 
displayed using the full width;
+break;
+}
+break;
 }
-break;
+default:
+break;
 }
 nMinFrameWidth = rTextRect.GetWidth() - ( nTextLeft + 
nTextRight );
 }
@@ -945,7 +944,6 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, 
DffObjData& rObjData, voi
 eTVA = SDRTEXTVERTADJUST_BOTTOM;
 break;
 }
-// if there is a 100% usage of following attributes, the 
textbox can be aligned also in horizontal direction
 switch ( eTextAnchor )
 {
 case mso_anchorTopCentered :
@@ -955,20 +953,20 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, 
DffObjData& rObjData, voi
 case mso_anchorBottomCenteredBaseline:
 {
 // check if it is sensible to use the centered 
alignment
-sal_uInt32 nMask = 
PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT | 
PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT;
-if ( ( nTextFlags & nMask ) != nMask )  // if the 
textobject has left and also right aligned pararagraph

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

2016-05-06 Thread Samuel Mehrbrodt
 sc/source/ui/app/inputwin.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 23f86273068b2389fc8703a8cc6b5c77968c918d
Author: Samuel Mehrbrodt 
Date:   Fri May 6 08:20:21 2016 +0200

tdf#99701 Calc multiline input: Give button a fixed width

It should not depend on the scrollbar size as the scrollbar
is very thin in some environments (esp. GTK3)

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

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 1e9a102..962a84c 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -72,6 +72,7 @@
 
 #define THESIZE 100 // Should be more than enough!
 #define TBX_WINDOW_HEIGHT   22 // in pixel - TODO: The same on all systems?
+#define MULTILINE_BUTTON_WIDTH 20 // Width of the button which opens the 
multiline dropdown
 #define LEFT_OFFSET 5
 #define INPUTWIN_MULTILINES 6
 const long BUTTON_OFFSET = 2; ///< space between input line and the button to 
expand / collapse
@@ -882,7 +883,7 @@ ScInputBarGroup::ScInputBarGroup(vcl::Window* pParent, 
ScTabViewShell* pViewSh)
 maTextWnd->SetQuickHelpText(ScResId(SCSTR_QHELP_INPUTWND));
 maTextWnd->SetHelpId(HID_INSWIN_INPUT);
 
-Size aSize(GetSettings().GetStyleSettings().GetScrollBarSize(), 
maTextWnd->GetPixelHeightForLines(1));
+Size aSize(MULTILINE_BUTTON_WIDTH, maTextWnd->GetPixelHeightForLines(1));
 
 maButton->SetClickHdl(LINK(this, ScInputBarGroup, ClickHdl));
 maButton->SetSizePixel(aSize);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes20' -

2016-05-06 Thread László Németh
 0 files changed

New commits:
commit ea2c8f2694ae5ce404e5a84b7b272da00f2c1683
Author: László Németh 
Date:   Fri May 6 11:26:22 2016 +0200

empty commit (more high prec. timer)

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


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

2016-05-06 Thread Pranav Kant
 loolwsd/LOOLKit.cpp |   22 +-
 1 file changed, 17 insertions(+), 5 deletions(-)

New commits:
commit 1f990d3fc2e85dab478f26971ebe1927c9d2f381
Author: Pranav Kant 
Date:   Fri May 6 14:44:03 2016 +0530

loolwsd: Fix incorrect position of id=, editlock= params

editlock= is always the last parameter. This fixes the slide
previews in impress documents for editing session.

Change-Id: I3531c7f52e09e655524fa0afd6fe66da504b5d70

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index cebb4c9..3d80548 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -578,6 +578,8 @@ public:
 {
 int part, width, height, tilePosX, tilePosY, tileWidth, tileHeight;
 
+// There would be another param, editlock=, as the last parameter.
+// For presentations, it would be followed by id=
 if (tokens.count() < 9 ||
 !getTokenInteger(tokens[1], "part", part) ||
 !getTokenInteger(tokens[2], "width", width) ||
@@ -589,6 +591,7 @@ public:
 {
 //FIXME: Return error.
 //sendTextFrame("error: cmd=tile kind=syntax");
+Log::error() << "Invalid tile request" << Log::end;
 return;
 }
 
@@ -602,22 +605,31 @@ public:
 {
 //FIXME: Return error.
 //sendTextFrame("error: cmd=tile kind=invalid");
+Log::error() << "Invalid tile request" << Log::end;
 return;
 }
 
-int editLock = 0;
 size_t index = 8;
+int editLock = -1;
+int id = -1;
+if (tokens.count() > index && tokens[index].find("id") == 0)
+{
+getTokenInteger(tokens[index], "id", id);
+++index;
+}
+
 if (tokens.count() > index && tokens[index].find("editlock") == 0)
 {
 getTokenInteger(tokens[index], "editlock", editLock);
 ++index;
 }
 
-int id = -1;
-if (tokens.count() > index && tokens[index].find("id") == 0)
+// For time being, editlock information in tile requests is mandatory
+// till we have a better solution to handle multi-part documents
+if (editLock == -1)
 {
-getTokenInteger(tokens[index], "id", id);
-++index;
+Log::error("No editlock information found.");
+return;
 }
 
 std::unique_lock 
lock(ChildProcessSession::getLock());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-06 Thread Rohan Kumar
 sd/source/filter/eppt/pptx-epptbase.cxx   |   20 +---
 sd/source/filter/eppt/pptx-epptooxml.cxx  |   93 +-
 sd/source/filter/xml/sdxmlwrp.cxx |   20 
 sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx |2 
 4 files changed, 48 insertions(+), 87 deletions(-)

New commits:
commit 5c7ce42dfc35d9cceef5f05a96e813b4e3913d38
Author: Rohan Kumar 
Date:   Fri May 6 13:34:22 2016 +0530

tdf#91794 OSL_DEBUG_LEVEL > 1 & DBG macro removed (impress/draw)

I replaced the DGB(x) macro from the code with the SAL_INFO(...)
statements wherever i found necessary. I removed the DBG function
definitions also.

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

diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx 
b/sd/source/filter/eppt/pptx-epptbase.cxx
index bea2c39..e22fe9d 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -64,12 +64,6 @@
 #include 
 #include 
 
-#ifdef DEBUG
-#define DBG(x) x
-#include 
-#else
-#define DBG(x)
-#endif
 
 using namespace com::sun::star;
 
@@ -138,7 +132,7 @@ PPTWriterBase::PPTWriterBase()
 , meLatestPageType(NORMAL)
 , mpStyleSheet(nullptr)
 {
-DBG(printf ("PPTWriterBase::PPTWriterBase()\n"));
+SAL_INFO("sd.eppt", "PPTWriterBase::PPTWriterBase()");
 }
 
 PPTWriterBase::PPTWriterBase( const Reference< XModel > & rXModel,
@@ -205,7 +199,7 @@ void PPTWriterBase::exportPPT( const std::vector< 
css::beans::PropertyValue >& r
 maDestPageSize = MapSize( awt::Size( nWidth, nHeight ) );
 maPageSize = awt::Size(nWidth, nHeight);
 
-DBG(printf( "call exportDocumentPre()\n"));
+SAL_INFO("sd.eppt", "call exportDocumentPre()");
 exportPPTPre(rMediaData);
 
 if ( !GetStyleSheets() )
@@ -234,7 +228,7 @@ void PPTWriterBase::exportPPT( const std::vector< 
css::beans::PropertyValue >& r
 
 for ( i = 0; i < mnPages; i++ )
 {
-DBG(printf( "call ImplCreateSlide( %" SAL_PRIuUINT32 " )\n", i));
+SAL_INFO("sd.eppt", "call ImplCreateSlide( " << i << " )");
 if ( !CreateSlide( i ) )
 return;
 }
@@ -245,7 +239,7 @@ void PPTWriterBase::exportPPT( const std::vector< 
css::beans::PropertyValue >& r
 return;
 }
 
-DBG(printf( "call exportDocumentPost()\n"));
+SAL_INFO("sd.eppt", "call exportDocumentPost()");
 exportPPTPost();
 }
 
@@ -441,7 +435,7 @@ sal_Int32 PPTWriterBase::GetLayoutOffset( const 
css::uno::Reference< css::beans:
 if ( GetPropertyValue( aAny, rXPropSet, "Layout", true ) )
 aAny >>= nLayout;
 
-DBG(printf("GetLayoutOffset %" SAL_PRIdINT32 "\n", nLayout));
+SAL_INFO("sd.eppt", "GetLayoutOffset " << nLayout);
 
 return nLayout;
 }
@@ -470,7 +464,7 @@ PHLayout& PPTWriterBase::GetLayout( sal_Int32 nOffset )
 if( nOffset >= 0 && nOffset < EPP_LAYOUT_SIZE )
 return pPHLayout[ nOffset ];
 
-DBG(printf("asked %" SAL_PRIdINT32 " for layout outside of 0,%d array 
scope\n", nOffset, EPP_LAYOUT_SIZE ));
+SAL_INFO("sd.eppt", "asked " << nOffset << " for layout outside of 0, " << 
EPP_LAYOUT_SIZE  << " array scope");
 
 return pPHLayout[ 0 ];
 }
@@ -986,7 +980,7 @@ bool PPTWriterBase::ContainsOtherShapeThanPlaceholders()
 else
 bOtherThanPlaceHolders = true;
 }
-DBG(printf("mType == %s\n", mType.getStr()));
+SAL_INFO("sd.eppt", "mType == " << mType.getStr());
 }
 
 return bOtherThanPlaceHolders;
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index df82afd..dd48c9d 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -91,17 +91,8 @@ using ::com::sun::star::beans::XPropertySetInfo;
 using ::com::sun::star::container::XIndexAccess;
 using ::sax_fastparser::FSHelperPtr;
 
-// FIXME: this should be removed and replaced by SAL_INFO
-#ifndef DBG
-#  if OSL_DEBUG_LEVEL > 1
-#define DBG(x) x
-#  else
-#define DBG(x)
-#  endif
-#endif
-
-DBG(void dump_pset(Reference< XPropertySet > rXPropSet);)
 
+void dump_pset(Reference< XPropertySet > rXPropSet);
 #define IDS(x) OString(OStringLiteral(#x " ") + OString::number( 
mnShapeIdMax++ )).getStr()
 
 namespace oox {
@@ -168,7 +159,7 @@ int PowerPointExport::GetPPTXLayoutId( int nOffset )
 {
 int nId = LAYOUT_BLANK;
 
-DBG(printf("GetPPTXLayoutId %d\n", nOffset));
+SAL_INFO("sd.eppt", "GetPPTXLayoutId " << nOffset);
 
 switch( nOffset ) {
 case 0:
@@ -243,7 +234,7 @@ ShapeExport& PowerPointShapeExport::WriteTextShape( const 
Reference< XShape >& x
 {
 OUString sShapeType = xShape->getShapeType();
 
-DBG(printf( "shape(text): %s\n", USS(sShapeType) ));
+SAL_INFO("sd.eppt", "shape(text) : " << USS(sShapeType));
 
 if ( sShapeType == "com.sun.star.drawing.TextShap

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

2016-05-06 Thread Giuseppe Castagno
 ucb/source/ucp/webdav-neon/NeonSession.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit d324b4b3e1d32b25a6347f2f77ae921a584ee9b0
Author: Giuseppe Castagno 
Date:   Thu May 5 15:53:09 2016 +0200

tdf#99426 Use correct path for lock in PUT method

Change-Id: I2091024a601bebede5d2fb8596dda1054ca4ef3b
Reviewed-on: https://gerrit.libreoffice.org/24691
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx 
b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index e1ee6f2..6a4bce9 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -1891,7 +1891,13 @@ int NeonSession::PUT( ne_session * sess,
 ne_request * req = ne_request_create( sess, "PUT", uri );
 int ret;
 
-ne_lock_using_resource( req, uri, 0 );
+// tdf#99246
+// extract the path of uri
+// ne_lock_using_resource below compares path, ignores all the rest.
+// in case of Web proxy active, this function uri parameter is instead 
absolute
+ne_uri aUri;
+ne_uri_parse( uri, &aUri );
+ne_lock_using_resource( req, aUri.path, 0 );
 ne_lock_using_parent( req, uri );
 
 ne_set_request_body_buffer( req, buffer, size );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-06 Thread Armin Le Grand
 drawinglayer/source/attribute/fillgraphicattribute.cxx|6 
 drawinglayer/source/primitive2d/sceneprimitive2d.cxx  |  251 +++-
 drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx |4 
 drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx   |4 
 drawinglayer/source/processor3d/zbufferprocessor3d.cxx|  394 --
 include/basegfx/matrix/b3dhommatrix.hxx   |2 
 include/basegfx/polygon/b3dpolygon.hxx|2 
 include/basegfx/polygon/b3dpolypolygon.hxx|2 
 include/drawinglayer/processor3d/zbufferprocessor3d.hxx   |   18 
 9 files changed, 376 insertions(+), 307 deletions(-)

New commits:
commit 657413b5deea11a850970f23cba2cf34a5bdf8ea
Author: Armin Le Grand 
Date:   Fri Apr 29 12:30:16 2016 +0200

Refactor 3D renderer to use multithreading

This try uses full 3D renderers working on the same ZBuffer
target, but are capable to render one stripe per thread.
This is rougher in granularity and uses multiple cores better
than the first try (see gerrit 24393) which was too fine-granular
being based on scanline render parallelization.
SecUred some more classes based on SdrPrimitive3D for multi-
theaded usage (places where local buffered stuff is done)

Change-Id: I4ddd5885ad41dd6432d0695e528818a86e427bfd
Reviewed-on: https://gerrit.libreoffice.org/24538
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 
Reviewed-by: Armin Le Grand 

diff --git a/drawinglayer/source/attribute/fillgraphicattribute.cxx 
b/drawinglayer/source/attribute/fillgraphicattribute.cxx
index 6d70e46..9465af2 100644
--- a/drawinglayer/source/attribute/fillgraphicattribute.cxx
+++ b/drawinglayer/source/attribute/fillgraphicattribute.cxx
@@ -51,6 +51,12 @@ namespace drawinglayer
 mfOffsetX(fOffsetX),
 mfOffsetY(fOffsetY)
 {
+// access once to ensure that the buffered bitmap exists, else
+// the SolarMutex may be needed to create it. This may not be
+// available when a renderer works with multi-treading.
+// When changing this, please check if it is still possible to
+// use a metafile as texture for a 3D object
+maGraphic.GetBitmapEx();
 }
 
 ImpFillGraphicAttribute()
diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx 
b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
index 27a4e0d..68acb57 100644
--- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
@@ -32,10 +32,105 @@
 #include 
 #include 
 #include 
-
+#include 
+#include 
+#include 
 
 using namespace com::sun::star;
 
+namespace
+{
+BitmapEx BPixelRasterToBitmapEx(const basegfx::BPixelRaster& rRaster, 
sal_uInt16 mnAntiAlialize)
+{
+BitmapEx aRetval;
+const sal_uInt32 nWidth(mnAntiAlialize ? 
rRaster.getWidth()/mnAntiAlialize : rRaster.getWidth());
+const sal_uInt32 nHeight(mnAntiAlialize ? 
rRaster.getHeight()/mnAntiAlialize : rRaster.getHeight());
+
+if(nWidth && nHeight)
+{
+const Size aDestSize(nWidth, nHeight);
+sal_uInt8 nInitAlpha(255);
+Bitmap aContent(aDestSize, 24);
+AlphaMask aAlpha(aDestSize, &nInitAlpha);
+BitmapWriteAccess* pContent = aContent.AcquireWriteAccess();
+BitmapWriteAccess* pAlpha = aAlpha.AcquireWriteAccess();
+
+if (pContent && pAlpha)
+{
+if(mnAntiAlialize)
+{
+const sal_uInt16 nDivisor(mnAntiAlialize * mnAntiAlialize);
+
+for(sal_uInt32 y(0L); y < nHeight; y++)
+{
+for(sal_uInt32 x(0L); x < nWidth; x++)
+{
+sal_uInt16 nRed(0);
+sal_uInt16 nGreen(0);
+sal_uInt16 nBlue(0);
+sal_uInt16 nOpacity(0);
+sal_uInt32 nIndex(rRaster.getIndexFromXY(x * 
mnAntiAlialize, y * mnAntiAlialize));
+
+for(sal_uInt32 c(0); c < mnAntiAlialize; c++)
+{
+for(sal_uInt32 d(0); d < mnAntiAlialize; d++)
+{
+const basegfx::BPixel& 
rPixel(rRaster.getBPixel(nIndex++));
+nRed = nRed + rPixel.getRed();
+nGreen = nGreen + rPixel.getGreen();
+nBlue = nBlue + rPixel.getBlue();
+nOpacity = nOpacity + rPixel.getOpacity();
+}
+
+nIndex += rRaster.getWidth() - mnAntiAlialize;
+}
+
+  

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

2016-05-06 Thread Samuel Mehrbrodt
 officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu |   16 
++---
 officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu|2 
 officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu|2 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCategories.xcu  |2 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu|2 
 officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu |2 
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu|2 
 officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu  |2 
 officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu  |2 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs  |   30 
+-
 sw/uiconfig/swriter/ui/printeroptions.ui|2 
 11 files changed, 32 insertions(+), 32 deletions(-)

New commits:
commit 46a05c224687c7942b3b0d92d1e0be32bfc9af43
Author: Samuel Mehrbrodt 
Date:   Fri May 6 09:13:16 2016 +0200

tdf#70998 Termchange: Graphic->Image

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

diff --git 
a/officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu 
b/officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu
index d5fb575..fab5d19 100644
--- a/officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu
@@ -55,7 +55,7 @@
 Choose settings for optimizing 
images
 
 
-Graphics
+Images
 
 
 ~Lossless compression
@@ -67,7 +67,7 @@
 ~Quality in %
 
 
-~Delete cropped graphic areas
+~Delete cropped image areas
 
 
 Reduce ~image resolution
@@ -85,7 +85,7 @@
 300;300 DPI (print resolution)
 
 
-~Break links to external graphics
+~Embed external images
 
 
 OLE Objects
@@ -94,7 +94,7 @@
 Choose settings for replacing OLE 
objects
 
 
-Create static replacement graphics for OLE 
objects
+Create static replacement images for OLE 
objects
 
 
 For ~all OLE objects
@@ -152,10 +152,10 @@ The current presentation contains no OLE objects.
 Delete %SLIDES slides.
 
 
-Optimize %IMAGES graphics to %QUALITY% 
JPEG quality at %RESOLUTION DPI.
+Optimize %IMAGES images to %QUALITY% JPEG 
quality at %RESOLUTION DPI.
 
 
-Create replacement graphics for %OLE 
objects.
+Create replacement images for %OLE 
objects.
 
 
 Current file size:
@@ -188,10 +188,10 @@ The current presentation contains no OLE objects.
 Deleting slides...
 
 
-Optimizing graphics...
+Optimizing images...
 
 
-Creating replacement graphics for OLE 
objects...
+Creating replacement images for OLE 
objects...
 
 
 .
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
index 4a8cbb7..0485e53 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
@@ -110,7 +110,7 @@
   false
 
 
-  Graphic Filter
+  Image Filter
 
 
   false
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu
index 467be35..598edd8 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu
@@ -545,7 +545,7 @@
   false
 
 
-  Graphic Filter
+  Image Filter
 
 
   false
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCategories.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCategories.xcu
index e7eaef1..94032fc 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCategories.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCategories.xcu
@@ -92,7 +92,7 @@
   
   
 
-  Graphic
+  Image
 
   
   
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 9ec9315..f1f25a2 100644
--- a/officecf

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

2016-05-06 Thread Caolán McNamara
 vcl/inc/unx/gtk/gtksalmenu.hxx |   12 +-
 vcl/unx/gtk/gloactiongroup.cxx |   48 ++-
 vcl/unx/gtk/gtksalframe.cxx|2 
 vcl/unx/gtk/gtksalmenu.cxx |  165 +
 vcl/unx/gtk3/gtk3gtkframe.cxx  |2 
 5 files changed, 59 insertions(+), 170 deletions(-)

New commits:
commit 27014f563577c3c5da19e37a57d4e73c0ebae140
Author: Caolán McNamara 
Date:   Fri May 6 11:18:50 2016 +0100

Resolves: tdf#92067 and tdf#99599, use a foolproof action naming scheme

encode the GtkSalMenu and the item id into the action_name so
each one is unique and directly refers to the menu and item in the
menu so knowing which one is which is direct and simple

Change-Id: I81bb278e73946f864e29aeab884e07e16835dad3

diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index 2e182e6..9bd0a77 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -54,7 +54,6 @@ private:
 GMenuModel* mpMenuModel;
 GActionGroup*   mpActionGroup;
 
-GtkSalMenu* GetMenuForItemCommand( gchar* aCommand, int& 
rDupsToSkip, gboolean bGetSubmenu );
 voidImplUpdate(bool bRecurse, bool 
bRemoveDisabledEntries);
 voidActivateAllSubmenus(Menu* pMenuBar);
 
@@ -98,17 +97,18 @@ public:
 voidNativeCheckItem( unsigned nSection, unsigned 
nItemPos, MenuItemBits bits, gboolean bCheck );
 voidNativeSetAccelerator( unsigned nSection, 
unsigned nItemPos, const vcl::KeyCode& rKeyCode, const OUString& rKeyName );
 
-voidDispatchCommand( gint itemId, const gchar* 
aCommand );
 voidActivateAllSubmenus()
 {
 ActivateAllSubmenus(mpVCLMenu);
 }
-voidActivate( const gchar* aMenuCommand );
-voidDeactivate( const gchar* aMenuCommand );
+static void DispatchCommand(const gchar* pMenuCommand);
+static void Activate(const gchar* pMenuCommand);
+static void Deactivate(const gchar* pMenuCommand);
 voidEnableUnity(bool bEnable);
 boolPrepUpdate();
 virtual voidUpdate() override;  // Update this menu only.
 voidUpdateFull();   // Update full menu 
hierarchy from this menu.
+GtkSalMenu* GetTopLevel();
 
 void CreateMenuBarWidget();
 void DestroyMenuBarWidget();
diff --git a/vcl/unx/gtk/gloactiongroup.cxx b/vcl/unx/gtk/gloactiongroup.cxx
index 04d3a4c..663f1bb 100644
--- a/vcl/unx/gtk/gloactiongroup.cxx
+++ b/vcl/unx/gtk/gloactiongroup.cxx
@@ -101,7 +101,6 @@ struct GLOActionGroupPrivate
 {
 GHashTable  *table;/* string -> GLOAction */
 GtkSalFrame *frame;/* Frame to which GActionGroup is associated. */
-GtkSalMenu  *topmenu;  /* TopLevel Menu to which GActionGroup is 
associated. */
 };
 
 static void g_lo_action_group_iface_init (GActionGroupInterface *);
@@ -191,19 +190,13 @@ g_lo_action_group_perform_submenu_action (GLOActionGroup 
*group,
   const gchar*action_name,
   GVariant   *state)
 {
+gboolean bState = g_variant_get_boolean (state);
+SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << 
group << " to " << bState);
 
-GtkSalMenu* pSalMenu = group->priv->topmenu;
-SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << 
group << " for menu " << pSalMenu);
-
-if (pSalMenu != nullptr) {
-gboolean bState = g_variant_get_boolean (state);
-SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " 
<< group << " to " << bState);
-
-if (bState)
-pSalMenu->Activate (action_name);
-else
-pSalMenu->Deactivate (action_name);
-}
+if (bState)
+GtkSalMenu::Activate(action_name);
+else
+GtkSalMenu::Deactivate(action_name);
 }
 
 static void
@@ -261,20 +254,9 @@ g_lo_action_group_activate (GActionGroup *group,
 const gchar  *action_name,
 GVariant *parameter)
 {
-GLOActionGroup *lo_group = G_LO_ACTION_GROUP (group);
-GtkSalMenu* pSalMenu = lo_group->priv->topmenu;
-
-if ( parameter != nullptr )
-g_action_group_change_action_state( group, action_name, parameter );
-
-SAL_INFO("vcl.unity", "g_lo_action_group_activate for menu " << pSalMenu);
-
-if ( pSalMenu != nullptr )
-{
-GLOAction* action = G_LO_ACTION (g_hash_table_lookup 
(lo_group->priv->table, action_name));
-SAL_INFO("vcl.unity", "g_lo_action_group_activate dispatching action " 
<< action << " named " << action_name << " on menu " << pSalMenu);
-pSalMenu->D

Looking for an architect to help Thunderbird

2016-05-06 Thread Michael Meeks
Hi guys,

The ESC previously discussed sending (very occasional) job adverts to
the dev-list here; and concluded that it was reasonable (2015-03-12 for
those interested) for 'LibreOffice' jobs - so, this is not really that
(yet) - but who knows what the future holds.

As such - I'd encourage people to wrack their brains and rolodexen for
talented applicants to recommend that may be interested in this (frankly
exciting) project =) I'd love to do it myself, modulo not being even
remotely available.

FYI,

Michael.

 Forwarded Message 
Subject: Looking for an architect to help Thunderbird
Date: Thu, 5 May 2016 18:06:12 +0100

[Hi Michael: I'd like to make the LibreOffice community aware of this.
Can you suggest an appropriate way or ways? Thanks -- Gerv]

Hi everyone,

I want to politely draw to your attention an opportunity to help a
significant open source project out of a tricky spot, and ask you to
send this on to people you think may be able to help.

As you may know, Mozilla is currently going through a process, on
multiple fronts, to try and disentangle Thunderbird from Firefox and set
it up for success as an open source project. One of the big issues we
are addressing is that Thunderbird has some technical hurdles that are
looming on the horizon, in part due to changes upcoming in the Gecko
platform.

Mozilla is attempting to hire an architect for 3 months to take a
dispassionate look at the situation and recommend a good way forward:

https://careers.mozilla.org/position/ohUW2fwT

However, we are having trouble with knowing how to publicise this
position; we feel there is some advantage in having someone who is not
an existing or previous member of the Thunderbird community, but we
don't know where to look.

The job spec linked above has full details but, in short, we are looking
for someone with as many of the following as possible:

 * experience working in large, complex open source projects

 * experience building the technology needed for a consumer product
   with many users and significant security and localization
   requirements

 * understanding of the subtleties of both client-side C++ programs
   (from build engineering to localization) as well as web-service
   enabled interactions like addon systems, update systems, etc.

If people know anyone who might be a good fit for this position, I would
be very grateful indeed if they would pass the message on and encourage
them to apply, or contact me with questions.

Many thanks,

Gerv

-- 
 michael.me...@collabora.com  <><, Pseudo Engineer, itinerant idiot

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


[Libreoffice-commits] core.git: 2 commits - include/sal sd/source

2016-05-06 Thread Tor Lillqvist
 include/sal/log-areas.dox|1 +
 sd/source/filter/eppt/pptx-epptooxml.cxx |2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 72ea8912b8f2a6b0d6dae8ac47908211512c34f9
Author: Tor Lillqvist 
Date:   Fri May 6 13:57:17 2016 +0300

Make this a bit saner

Not sure about usefulness, though.

Change-Id: Ia1ef46a7ab7f599e90fe91e77707b20786573182

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index dd48c9d..dd5c3a9 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1592,7 +1592,7 @@ void PowerPointExport::ImplWriteNotes( sal_uInt32 
nPageNum )
 if( !mbCreateNotes || !ContainsOtherShapeThanPlaceholders() )
 return;
 
-SAL_INFO("write Notes %" SAL_PRIuUINT32 "\n", nPageNum);
+SAL_INFO("sd.eppt", "write Notes " << nPageNum << "\n");
 
 FSHelperPtr pFS = openFragmentStreamWithSerializer( OUStringBuffer()
 .append( 
"ppt/notesSlides/notesSlide" )
commit edb1c6583cfabd398c05b10317fcc5e871bb622a
Author: Tor Lillqvist 
Date:   Fri May 6 13:40:29 2016 +0300

loplugin:sallogareas

Change-Id: I4ca21392f38d1ab567e87d6f231641993c0e862c

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 0b19721..cbb93eb 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -153,6 +153,7 @@ certain functionality.
 
 @li @c sd
 @li @c sd.core
+@li @c sd.eppt
 @li @c sd.filter
 @li @c sd.fwk
 @li @c sd.slideshow
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-06 Thread Pranav Kant
 loolwsd/LOOLKit.cpp |   12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 27497ba4dcd363f060b6dcce7f2672e926566fa8
Author: Pranav Kant 
Date:   Fri May 6 14:47:04 2016 +0530

loolwsd: Fix tile previews for viewing sessions

Also, don't let these tile previews change part of the document
permanently. This is a temporary solution till we have some
better API from LOKit to deal with such a situation.

Change-Id: I8dfefd2b7ad8cf3e7a57afb95b57994ef0bb3b6c

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 3d80548..60b3e02 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -659,10 +659,10 @@ public:
 
 std::vector pixmap;
 pixmap.resize(4 * width * height);
-
-if (part != _loKitDocument->pClass->getPart(_loKitDocument))
+int oldPart = _loKitDocument->pClass->getPart(_loKitDocument);
+if (part != oldPart)
 {
-if (editLock)
+if (editLock || id != -1)
 {
 _loKitDocument->pClass->setPart(_loKitDocument, part);
 }
@@ -689,6 +689,12 @@ public:
 return;
 }
 
+// restore the original part if tilepreview request changed the part
+if (id != -1)
+{
+_loKitDocument->pClass->setPart(_loKitDocument, oldPart);
+}
+
 const auto length = output.size();
 if (length > SMALL_MESSAGE_SIZE)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/uiconfig officecfg/registry sysui/desktop

2016-05-06 Thread Samuel Mehrbrodt
 cui/uiconfig/ui/areatabpage.ui|
2 
 cui/uiconfig/ui/backgroundpage.ui |
6 +-
 cui/uiconfig/ui/optaccessibilitypage.ui   |
2 
 cui/uiconfig/ui/opthtmlpage.ui|
2 
 officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs |   
22 +-
 sysui/desktop/share/launcher_comment.ulf  |
2 
 6 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 8e8b51cbe2e61c60da14b0a6bae72f76f36c2503
Author: Samuel Mehrbrodt 
Date:   Fri May 6 13:10:50 2016 +0200

tdf#70998 Termchange: Graphic->Image

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

diff --git a/cui/uiconfig/ui/areatabpage.ui b/cui/uiconfig/ui/areatabpage.ui
index 2d7c4ee..b9bf6de 100644
--- a/cui/uiconfig/ui/areatabpage.ui
+++ b/cui/uiconfig/ui/areatabpage.ui
@@ -855,7 +855,7 @@
 
 
   
-Import 
Graphic...
+Import 
Image...
 True
 True
 True
diff --git a/cui/uiconfig/ui/backgroundpage.ui 
b/cui/uiconfig/ui/backgroundpage.ui
index bd31f22..5125e4c 100644
--- a/cui/uiconfig/ui/backgroundpage.ui
+++ b/cui/uiconfig/ui/backgroundpage.ui
@@ -21,7 +21,7 @@
 1
   
   
-Graphic
+Image
 4
   
 
@@ -272,7 +272,7 @@
 False
 True
 0
-Unlinked 
graphic
+Unlinked 
image
   
   
 0
@@ -284,7 +284,7 @@
 False
 True
 0
-Find 
graphics
+Find 
images
   
   
 0
diff --git a/cui/uiconfig/ui/optaccessibilitypage.ui 
b/cui/uiconfig/ui/optaccessibilitypage.ui
index 209e7dc..faacf84 100644
--- a/cui/uiconfig/ui/optaccessibilitypage.ui
+++ b/cui/uiconfig/ui/optaccessibilitypage.ui
@@ -60,7 +60,7 @@
 
 
   
-Allow animated 
_graphics
+Allow animated 
_images
 True
 True
 False
diff --git a/cui/uiconfig/ui/opthtmlpage.ui b/cui/uiconfig/ui/opthtmlpage.ui
index 9985432..7032b39 100644
--- a/cui/uiconfig/ui/opthtmlpage.ui
+++ b/cui/uiconfig/ui/opthtmlpage.ui
@@ -486,7 +486,7 @@
 
 
   
-_Copy local 
graphics to Internet
+_Copy local 
images to Internet
 True
 True
 False
diff --git 
a/officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs
index c283f27..179637d 100644
--- a/officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs
@@ -70,13 +70,13 @@



-   Specifies if linked graphics are 
to be embedded
+   Specifies if linked images are to 
be embedded

true



-   Specifies if OLE Objects are 
converted to Graphic objects at all
+   Specifies if OLE Objects are 
converted to image objects at all

true

@@ -169,11 +169,11 @@


String STR_GRAPHIC_OPTIMIZATION.
-   Choose settings for optimizing pictures 
and graphics
+   Choose settings for optimizing 
images


String STR_IMAGE_OPTIMIZATION.
-   Graphics
+   Images


String STR_LOSSLESS_COMPRESSION.
@@ -189,7 +189,7 @@


String STR_REMOVE_CROP_AREA.
-   ~Delete cropped graphic areas
+   ~Delete cropped image ar

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - desktop/inc desktop/source include/LibreOfficeKit

2016-05-06 Thread Ashod Nakashian
 desktop/inc/lib/init.hxx  |   14 -
 desktop/source/lib/init.cxx   |   46 ++
 include/LibreOfficeKit/LibreOfficeKit.h   |   13 
 include/LibreOfficeKit/LibreOfficeKit.hxx |   21 +
 4 files changed, 93 insertions(+), 1 deletion(-)

New commits:
commit 7f6a0f656ddb2312c3d78091fce663a36ef6e1db
Author: Ashod Nakashian 
Date:   Fri May 6 08:16:00 2016 -0400

Allow painting for arbitrary part

Painting should not cause any state changes, but
to paint a tile on a different part than the current
has to change the document, which sends notifications
to all clients.

A new API, paintPartTile, allows for painting tiles
on any part without sending change of part notifications.

Furthermore, because we block notifications during this
operation, no tile invalidation is issued due to
changing of the part.

One issue remains in the cases when the LO Core
resets the cursor position internally and we resume
editing after painting, the cursor might be at the top
of the page. This needs fixing separately.

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

diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index 8ed1666..3087c1b 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -33,7 +33,8 @@ namespace desktop {
 explicit CallbackFlushHandler(LibreOfficeKitCallback pCallback, void* 
pData)
 : Idle( "lokit timer callback" ),
   m_pCallback(pCallback),
-  m_pData(pData)
+  m_pData(pData),
+  m_bPartTilePainting(false)
 {
 SetPriority(SchedulerPriority::POST_PAINT);
 
@@ -78,6 +79,13 @@ namespace desktop {
 
 void queue(const int type, const char* data)
 {
+if (m_bPartTilePainting)
+{
+// We drop notifications when this is set.
+return;
+}
+
+
 const std::string payload(data ? data : "(nil)");
 std::unique_lock lock(m_mutex);
 
@@ -145,6 +153,9 @@ namespace desktop {
 }
 }
 
+void setPartTilePainting(const bool bPartPainting) { 
m_bPartTilePainting = bPartPainting; }
+bool isPartTilePainting() const { return m_bPartTilePainting; }
+
 private:
 void flush()
 {
@@ -187,6 +198,7 @@ namespace desktop {
 std::map m_states;
 LibreOfficeKitCallback m_pCallback;
 void *m_pData;
+bool m_bPartTilePainting;
 std::mutex m_mutex;
 };
 
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index f1cb9f0..d043a2f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -324,6 +324,12 @@ voiddoc_paintTile(LibreOfficeKitDocument* pThis,
   const int nCanvasWidth, const int nCanvasHeight,
   const int nTilePosX, const int nTilePosY,
   const int nTileWidth, const int nTileHeight);
+voiddoc_paintPartTile(LibreOfficeKitDocument* pThis,
+  unsigned char* pBuffer,
+  const int nPart,
+  const int nCanvasWidth, const int nCanvasHeight,
+  const int nTilePosX, const int nTilePosY,
+  const int nTileWidth, const int nTileHeight);
 static int doc_getTileMode(LibreOfficeKitDocument* pThis);
 static void doc_getDocumentSize(LibreOfficeKitDocument* pThis,
 long* pWidth,
@@ -402,6 +408,7 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
getPartName = doc_getPartName;
 m_pDocumentClass->setPartMode = doc_setPartMode;
 m_pDocumentClass->paintTile = doc_paintTile;
+m_pDocumentClass->paintPartTile = doc_paintPartTile;
 m_pDocumentClass->getTileMode = doc_getTileMode;
 m_pDocumentClass->getDocumentSize = doc_getDocumentSize;
 m_pDocumentClass->initializeForRendering = doc_initializeForRendering;
@@ -1076,6 +1083,45 @@ void doc_paintTile(LibreOfficeKitDocument* pThis,
 #endif
 }
 
+
+void doc_paintPartTile(LibreOfficeKitDocument* pThis,
+   unsigned char* pBuffer,
+   const int nPart,
+   const int nCanvasWidth, const int nCanvasHeight,
+   const int nTilePosX, const int nTilePosY,
+   const int nTileWidth, const int nTileHeight)
+{
+SAL_INFO( "lok.tiledrendering", "paintPartTile: painting @ " << nPart << " 
["
+   << nTileWidth << "x" << nTileHeight << "]@("
+   << nTilePosX << ", " << nTilePosY << ") to ["
+   << nCanvasWidth << "x" << nCanvasHeight << "]px" );
+
+

[Libreoffice-commits] core.git: Branch 'feature/fixes20' -

2016-05-06 Thread László Németh
 0 files changed

New commits:
commit 7b9979ff52d64f16ae267f9026589b6b6d18861a
Author: László Németh 
Date:   Fri May 6 14:42:33 2016 +0200

empty commit (no proc. idle)

Change-Id: Id429910aeb0bb3497686272070040147ffdfc62c
___
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-05-06 Thread Caolán McNamara
 vcl/inc/unx/gtk/gtksalmenu.hxx |5 +
 vcl/unx/gtk/gtksalmenu.cxx |3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 945064c0b7ad4da6e215668ae7e4edb14945f00c
Author: Caolán McNamara 
Date:   Fri May 6 13:50:38 2016 +0100

gtk3: getting new entries added after the menu is visible is problematic

Change-Id: Ibc2fc35c3d5315eb7d25181c2c2eba4cb5509a96

diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index 9bd0a77..359ac5d 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -97,10 +97,7 @@ public:
 voidNativeCheckItem( unsigned nSection, unsigned 
nItemPos, MenuItemBits bits, gboolean bCheck );
 voidNativeSetAccelerator( unsigned nSection, 
unsigned nItemPos, const vcl::KeyCode& rKeyCode, const OUString& rKeyName );
 
-voidActivateAllSubmenus()
-{
-ActivateAllSubmenus(mpVCLMenu);
-}
+voidActivateAllSubmenus() { 
ActivateAllSubmenus(mpVCLMenu); }
 static void DispatchCommand(const gchar* pMenuCommand);
 static void Activate(const gchar* pMenuCommand);
 static void Deactivate(const gchar* pMenuCommand);
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index c503234..f199f74 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -375,7 +375,7 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, 
const Rectangle& rRec
 mpActionGroup = G_ACTION_GROUP(pActionGroup);
 mpMenuModel = G_MENU_MODEL(g_lo_menu_new());
 // Generate the main menu structure, populates mpMenuModel
-UpdateFull();
+ActivateAllSubmenus();
 
 GtkWidget *pWidget = gtk_menu_new_from_model(mpMenuModel);
 gtk_menu_attach_to_widget(GTK_MENU(pWidget), 
mpFrame->getMouseEventWidget(), nullptr);
@@ -894,6 +894,7 @@ void GtkSalMenu::ActivateAllSubmenus(Menu* pMenuBar)
 pSalItem->mpSubMenu->Update();
 }
 }
+Update();
 }
 
 void GtkSalMenu::Activate(const gchar* pCommand)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-06 Thread Katarina Behrens
 sd/sdi/_drvwsh.sdi   |5 
 sd/source/ui/sidebar/SlideBackground.cxx |   32 +++
 sd/source/ui/sidebar/SlideBackground.hxx |4 ++-
 sd/source/ui/view/drviews2.cxx   |1 
 sd/source/ui/view/drviews7.cxx   |7 +-
 5 files changed, 43 insertions(+), 6 deletions(-)

New commits:
commit 8d10c23705f30e55f36220a7d9bad86c0c53c66a
Author: Katarina Behrens 
Date:   Wed Apr 27 10:59:21 2016 +0200

tdf#89466: Getting/setting page orientation works now

Change-Id: I1fd2f8cf3985079e9f8d752344646bd3a5769725
Reviewed-on: https://gerrit.libreoffice.org/24657
Reviewed-by: Katarina Behrens 
Tested-by: Katarina Behrens 

diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index bc5aa27..bce7cb6 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2612,6 +2612,11 @@ interface DrawView
 ExecMethod = FuTemporary ;
 StateMethod = GetMenuState ;
 ]
+SID_ATTR_PAGE
+[
+ExecMethod = FuTemporary ;
+StateMethod = GetPageProperties ;
+]
 SID_ATTR_PAGE_SIZE
 [
 ExecMethod = FuTemporary ;
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx 
b/sd/source/ui/sidebar/SlideBackground.cxx
index dd8a972..370aade 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -120,7 +120,8 @@ SlideBackground::SlideBackground(
  ) :
 PanelLayout( pParent, "SlideBackgroundPanel", 
"modules/simpress/ui/sidebarslidebackground.ui", rxFrame ),
 mrBase( rBase ),
-maPaperController(SID_ATTR_PAGE_SIZE, *pBindings, *this),
+maPaperSizeController(SID_ATTR_PAGE_SIZE, *pBindings, *this),
+maPaperOrientationController(SID_ATTR_PAGE, *pBindings, *this),
 maBckColorController(SID_ATTR_PAGE_COLOR, *pBindings, *this),
 maBckGradientController(SID_ATTR_PAGE_GRADIENT, *pBindings, *this),
 maBckHatchController(SID_ATTR_PAGE_HATCH, *pBindings, *this),
@@ -158,7 +159,7 @@ void SlideBackground::Initialize()
 {
 lcl_FillPaperSizeListbox( *mpPaperSizeBox );
 
mpPaperSizeBox->SetSelectHdl(LINK(this,SlideBackground,PaperSizeModifyHdl));
-
mpPaperOrientation->SetSelectHdl(LINK(this,SlideBackground,PaperSizeModifyHdl));
+
mpPaperOrientation->SetSelectHdl(LINK(this,SlideBackground,PaperOrientationModifyHdl));
 
 ::sd::DrawDocShell* pDocSh = dynamic_cast<::sd::DrawDocShell*>( 
SfxObjectShell::Current() );
 SdDrawDocument* pDoc = pDocSh->GetDoc();
@@ -174,7 +175,7 @@ void SlideBackground::Initialize()
 }
 }
 
-meUnit = maPaperController.GetCoreMetric();
+meUnit = maPaperSizeController.GetCoreMetric();
 
 mpMasterSlide->SetSelectHdl(LINK(this, SlideBackground, AssignMasterPage));
 
@@ -269,7 +270,8 @@ void SlideBackground::dispose()
 mpDspMasterBackground.clear();
 mpDspMasterObjects.clear();
 
-maPaperController.dispose();
+maPaperSizeController.dispose();
+maPaperOrientationController.dispose();
 maBckColorController.dispose();
 maBckGradientController.dispose();
 maBckHatchController.dispose();
@@ -398,6 +400,18 @@ void SlideBackground::NotifyItemUpdate(
 }
 break;
 
+case SID_ATTR_PAGE:
+{
+if(eState >= SfxItemState::DEFAULT)
+{
+const SvxPageItem* aPageItem = dynamic_cast< const 
SvxPageItem* >(pState);
+bool bIsLandscape = aPageItem->IsLandscape();
+
+mpPaperOrientation->SelectEntryPos( bIsLandscape ? 0 : 1 );
+}
+}
+break;
+
 case SID_DISPLAY_MASTER_BACKGROUND:
 {
 if(eState >= SfxItemState::DEFAULT)
@@ -432,6 +446,7 @@ void SlideBackground::NotifyItemUpdate(
 break;
 }
 }
+
 IMPL_LINK_NOARG_TYPED(SlideBackground, FillStyleModifyHdl, ListBox&, void)
 {
 const drawing::FillStyle eXFS = 
(drawing::FillStyle)mpFillStyle->GetSelectEntryPos();
@@ -439,6 +454,7 @@ IMPL_LINK_NOARG_TYPED(SlideBackground, FillStyleModifyHdl, 
ListBox&, void)
 Update();
 GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_FILLSTYLE, 
SfxCallMode::RECORD, { &aXFillStyleItem });
 }
+
 IMPL_LINK_NOARG_TYPED(SlideBackground, PaperSizeModifyHdl, ListBox&, void)
 {
 sal_uInt32 nPos = mpPaperSizeBox->GetSelectEntryPos();
@@ -452,6 +468,14 @@ IMPL_LINK_NOARG_TYPED(SlideBackground, PaperSizeModifyHdl, 
ListBox&, void)
 GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_SIZE, 
SfxCallMode::RECORD, { &aSizeItem });
 }
 
+IMPL_LINK_NOARG_TYPED(SlideBackground, PaperOrientationModifyHdl, ListBox&, 
void)
+{
+SvxPageItem aPageItem(SID_ATTR_PAGE);
+aPageItem.SetLandscape( mpPaperOrientation->GetSelectEntryPos() == 0 );
+
+GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE, 
SfxCallMode::RECORD,{ &aPageItem });
+}
+
 IMPL_LINK_NOARG_TYPED(SlideBackground, FillColorHdl, ListBox&, void)
 {
 const drawing::FillStyle eXFS = 
(drawing::FillStyle)mpFillStyle->Ge

spacing in font depends on position on the page

2016-05-06 Thread Xen
I find that the spacing between characters of a font will change 
depending on what exact position the text has on the page 
(horizontally).


I am sure you are full aware of that.

The question is: shouldn't the spacing within a word remain the same, 
even if the spacing between words would change?


Here is an image: 
www.xen.dds.nl/f/i/screenshots/libre-office-font-spacing-oddity.png

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


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

2016-05-06 Thread Michael Stahl
 include/svtools/ctrltool.hxx   |9 +++--
 svtools/source/control/ctrltool.cxx|   14 ++
 svtools/source/control/stdmenu.cxx |4 ++--
 sw/source/uibase/docvw/edtwin3.cxx |1 +
 sw/source/uibase/uiview/pview.cxx  |1 +
 vcl/source/font/PhysicalFontFamily.cxx |8 
 6 files changed, 17 insertions(+), 20 deletions(-)

New commits:
commit 02cdd8734636ea66259fbbda395d95aa9efd7b03
Author: Michael Stahl 
Date:   Fri May 6 15:56:41 2016 +0200

tdf#90923 sw: invalidate layout when font substitutions are changed

This should cause all text to re-format with the newly substituted fonts.

Change-Id: I73f64cc679f818524940a52c2f7e696b02891c43

diff --git a/sw/source/uibase/docvw/edtwin3.cxx 
b/sw/source/uibase/docvw/edtwin3.cxx
index 006cf7f..07037d5 100644
--- a/sw/source/uibase/docvw/edtwin3.cxx
+++ b/sw/source/uibase/docvw/edtwin3.cxx
@@ -156,6 +156,7 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt 
)
 pSh->LockPaint();
 bUnlockPaint = true;
 GetView().GetDocShell()->UpdateFontList();  //e.g. printer change
+pSh->InvalidateLayout(true);
 break;
 default: break;
 }
diff --git a/sw/source/uibase/uiview/pview.cxx 
b/sw/source/uibase/uiview/pview.cxx
index 3b48f81..103dabf 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -601,6 +601,7 @@ void SwPagePreviewWin::DataChanged( const DataChangedEvent& 
rDCEvt )
 case DataChangedEventType::FONTS:
 case DataChangedEventType::FONTSUBSTITUTION:
 mrView.GetDocShell()->UpdateFontList(); // Font change
+mpViewShell->InvalidateLayout(true);
 if ( mpViewShell->GetWin() )
 mpViewShell->GetWin()->Invalidate();
 break;
commit 3b12b5f44c1c46a4aae644a577cb015e2940af59
Author: Michael Stahl 
Date:   Fri May 6 15:53:20 2016 +0200

vcl: PhysicalFontFamily::maFontFaces must be sorted

When toggling the "Apply replacement table" setting in
Tools->Options->Fonts, the fonts are re-enumerated once per
OutputDevice, so if the sorting isn't maintained properly duplicates
will be inserted and the number of font faces goes from 400 to 40k.

(regression from a20a52a2f47c67ab30bf764d420c663f7173f032)

Change-Id: I7daa53ff28187056e34efa4e2173dea45a47df27

diff --git a/vcl/source/font/PhysicalFontFamily.cxx 
b/vcl/source/font/PhysicalFontFamily.cxx
index b2eb5ce..a1382a9 100644
--- a/vcl/source/font/PhysicalFontFamily.cxx
+++ b/vcl/source/font/PhysicalFontFamily.cxx
@@ -158,7 +158,8 @@ bool PhysicalFontFamily::AddFontFace( PhysicalFontFace* 
pNewFontFace )
 
 // add the new physical font face, replacing existing font face if 
necessary
 // TODO: get rid of linear search?
-for(std::vector< PhysicalFontFace* >::iterator it=maFontFaces.begin(); it 
!= maFontFaces.end(); ++it )
+auto it(maFontFaces.begin());
+for (; it != maFontFaces.end(); ++it)
 {
 PhysicalFontFace* pFoundFontFace = *it;
 sal_Int32 eComp = pNewFontFace->CompareWithSize( *pFoundFontFace );
@@ -177,12 +178,11 @@ bool PhysicalFontFamily::AddFontFace( PhysicalFontFace* 
pNewFontFace )
 
 // replace existing font face with a better one
 delete pFoundFontFace;
-it = maFontFaces.erase( it );
-maFontFaces.push_back( pNewFontFace );
+*it = pNewFontFace; // insert at sort position
 return true;
 }
 
-maFontFaces.push_back( pNewFontFace );
+maFontFaces.insert(it, pNewFontFace); // insert at sort position
 return true;
 }
 
commit afad4eeaffcad716f135de2bd111bd0aca68e07f
Author: Michael Stahl 
Date:   Fri May 6 13:46:03 2016 +0200

svtools: FontList loops with > 2^16 fonts

Change-Id: Idfe5d76ee384dff3280f81686cbf408c2f675dc6

diff --git a/include/svtools/ctrltool.hxx b/include/svtools/ctrltool.hxx
index c05b55e..7e2ec66 100644
--- a/include/svtools/ctrltool.hxx
+++ b/include/svtools/ctrltool.hxx
@@ -127,9 +127,6 @@ You should thus not reference the array after the next 
method call on the
 FontList.
 */
 
-
-#define FONTLIST_FONTINFO_NOTFOUND  ((sal_uInt16)0x)
-
 class SVT_DLLPUBLIC FontList
 {
 private:
@@ -182,11 +179,11 @@ public:
  FontItalic eItalic ) const;
 
 boolIsAvailable( const OUString& rName ) const;
-sal_uInt16  GetFontNameCount() const
+size_t GetFontNameCount() const
 {
-return (sal_uInt16)m_Entries.size();
+return m_Entries.size();
 }
-const FontMetric&GetFontName( sal_uInt16 nFont ) const;
+const FontMetric& GetFontName(size_t nFont) const;
 sal_Handle  GetFirstFontMetric( const OUString& rName ) const;
 static sal_Handle   GetNextFontMetric( sal_Handle hFontMetric );
 static const FontMetric& GetFontMetric( sal_Handle hFontMetric );
diff --git a/svtools/source/control/ctrltool.cxx 
b/svtools/source/con

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

2016-05-06 Thread Miklos Vajna
 writerfilter/source/rtftok/rtftokenizer.cxx |   52 ++--
 writerfilter/source/rtftok/rtftokenizer.hxx |8 ++--
 2 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit e9514bcc28caa83d39b40137ca09ebe83dc97e0c
Author: Miklos Vajna 
Date:   Fri May 6 15:25:25 2016 +0200

writerfilter: replace 's_m_' prefixes with just 's_'

The intention was to replace m_ with s_ for static members, not to
prepend s_ to the existing prefix.

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

diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx 
b/writerfilter/source/rtftok/rtftokenizer.cxx
index 0d4f376..a23c181 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -21,10 +21,10 @@ namespace writerfilter
 namespace rtftok
 {
 
-std::vector RTFTokenizer::s_m_aRTFControlWords;
-bool RTFTokenizer::s_m_bControlWordsSorted;
-std::vector RTFTokenizer::s_m_aRTFMathControlWords;
-bool RTFTokenizer::s_m_bMathControlWordsSorted;
+std::vector RTFTokenizer::s_aRTFControlWords;
+bool RTFTokenizer::s_bControlWordsSorted;
+std::vector RTFTokenizer::s_aRTFMathControlWords;
+bool RTFTokenizer::s_bMathControlWordsSorted;
 
 RTFTokenizer::RTFTokenizer(RTFListener& rImport, SvStream* pInStream, 
uno::Reference const& xStatusIndicator)
 : m_rImport(rImport),
@@ -35,17 +35,17 @@ RTFTokenizer::RTFTokenizer(RTFListener& rImport, SvStream* 
pInStream, uno::Refer
   m_nLineStartPos(0),
   m_nGroupStart(0)
 {
-if (!RTFTokenizer::s_m_bControlWordsSorted)
+if (!RTFTokenizer::s_bControlWordsSorted)
 {
-RTFTokenizer::s_m_bControlWordsSorted = true;
-s_m_aRTFControlWords = std::vector(aRTFControlWords, 
aRTFControlWords + nRTFControlWords);
-std::sort(s_m_aRTFControlWords.begin(), s_m_aRTFControlWords.end());
+RTFTokenizer::s_bControlWordsSorted = true;
+s_aRTFControlWords = std::vector(aRTFControlWords, 
aRTFControlWords + nRTFControlWords);
+std::sort(s_aRTFControlWords.begin(), s_aRTFControlWords.end());
 }
-if (!RTFTokenizer::s_m_bMathControlWordsSorted)
+if (!RTFTokenizer::s_bMathControlWordsSorted)
 {
-RTFTokenizer::s_m_bMathControlWordsSorted = true;
-s_m_aRTFMathControlWords = 
std::vector(aRTFMathControlWords, aRTFMathControlWords + 
nRTFMathControlWords);
-std::sort(s_m_aRTFMathControlWords.begin(), 
s_m_aRTFMathControlWords.end());
+RTFTokenizer::s_bMathControlWordsSorted = true;
+s_aRTFMathControlWords = 
std::vector(aRTFMathControlWords, aRTFMathControlWords + 
nRTFMathControlWords);
+std::sort(s_aRTFMathControlWords.begin(), 
s_aRTFMathControlWords.end());
 }
 }
 
@@ -271,11 +271,11 @@ RTFError RTFTokenizer::resolveKeyword()
 
 bool RTFTokenizer::lookupMathKeyword(RTFMathSymbol& rSymbol)
 {
-std::vector::iterator low = 
std::lower_bound(s_m_aRTFMathControlWords.begin(), 
s_m_aRTFMathControlWords.end(), rSymbol);
-int i = low - s_m_aRTFMathControlWords.begin();
-if (low == s_m_aRTFMathControlWords.end() || rSymbol < *low)
+std::vector::iterator low = 
std::lower_bound(s_aRTFMathControlWords.begin(), s_aRTFMathControlWords.end(), 
rSymbol);
+int i = low - s_aRTFMathControlWords.begin();
+if (low == s_aRTFMathControlWords.end() || rSymbol < *low)
 return false;
-rSymbol = s_m_aRTFMathControlWords[i];
+rSymbol = s_aRTFMathControlWords[i];
 return true;
 }
 
@@ -293,9 +293,9 @@ RTFError RTFTokenizer::dispatchKeyword(OString& rKeyword, 
bool bParam, int nPara
  "' with param? " << (bParam ? 1 : 0) <<" param val: '" << (bParam 
? nParam : 0) << "'");
 RTFSymbol aSymbol;
 aSymbol.sKeyword = rKeyword.getStr();
-std::vector::iterator low = 
std::lower_bound(s_m_aRTFControlWords.begin(), s_m_aRTFControlWords.end(), 
aSymbol);
-int i = low - s_m_aRTFControlWords.begin();
-if (low == s_m_aRTFControlWords.end() || aSymbol < *low)
+std::vector::iterator low = 
std::lower_bound(s_aRTFControlWords.begin(), s_aRTFControlWords.end(), aSymbol);
+int i = low - s_aRTFControlWords.begin();
+if (low == s_aRTFControlWords.end() || aSymbol < *low)
 {
 SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unknown keyword '\\" << 
rKeyword.getStr() << "'");
 RTFSkipDestination aSkip(m_rImport);
@@ -304,36 +304,36 @@ RTFError RTFTokenizer::dispatchKeyword(OString& rKeyword, 
bool bParam, int nPara
 }
 
 RTFError ret;
-switch (s_m_aRTFControlWords[i].nControlType)
+switch (s_aRTFControlWords[i].nControlType)
 {
 case CONTROL_FLAG:
 // flags ignore any parameter by definition
-ret = m_rImport.dispatchFlag(s_m_aRTFControlWords[i].nIndex);
+ret = m_rImport.dispatchFlag(s_aRTFControlWords[i].nIndex);
 if (ret != RTFError::OK)
 return ret;
 

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

2016-05-06 Thread Caolán McNamara
 vcl/inc/unx/gtk/gtkframe.hxx   |3 --
 vcl/inc/unx/gtk/gtksalmenu.hxx |   10 ++--
 vcl/unx/gtk/gloactiongroup.cxx |   13 --
 vcl/unx/gtk/gtksalframe.cxx|   17 -
 vcl/unx/gtk/gtksalmenu.cxx |   51 -
 vcl/unx/gtk3/gtk3gtkframe.cxx  |   17 -
 6 files changed, 49 insertions(+), 62 deletions(-)

New commits:
commit d20e08a3ab819ac24f7ea49a98b4dd3683120857
Author: Caolán McNamara 
Date:   Fri May 6 15:14:38 2016 +0100

Resolves: tdf#98636 if the menubar hierarchy has been changed

then update the whole thing by re-calling SetFrame

Change-Id: Ib16006a76ca04dc104232a056c43fda2b5b24074

diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index a5dc414..11ed51f 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -20,6 +20,7 @@
 
 #include 
 #include 
+#include 
 
 #if ENABLE_DBUS && ENABLE_GIO && \
 (GLIB_MAJOR_VERSION > 2 || GLIB_MINOR_VERSION >= 36)
@@ -42,8 +43,10 @@ class GtkSalMenu : public SalMenu
 {
 private:
 std::vector< GtkSalMenuItem* >  maItems;
+IdlemaUpdateMenuBarIdle;
 
 boolmbMenuBar;
+boolmbNeedsUpdate;
 GtkWidget*  mpMenuBarWidget;
 GtkWidget*  mpCloseButton;
 Menu*   mpVCLMenu;
@@ -57,6 +60,8 @@ private:
 voidImplUpdate(bool bRecurse, bool 
bRemoveDisabledEntries);
 voidActivateAllSubmenus(Menu* pMenuBar);
 
+DECL_LINK_TYPED(MenuBarHierarchyChangeHandler, Idle*, void);
+
 public:
 GtkSalMenu( bool bMenuBar );
 virtual ~GtkSalMenu();
@@ -104,8 +109,9 @@ public:
 boolPrepUpdate();
 virtual voidUpdate() override;  // Update this menu only.
 // Update full menu hierarchy from this menu.
-voidUpdateFull () { 
ActivateAllSubmenus(mpVCLMenu); }
+voidUpdateFull () { if (mbNeedsUpdate) 
ActivateAllSubmenus(mpVCLMenu); }
 GtkSalMenu* GetTopLevel();
+voidSetNeedsUpdate();
 
 void CreateMenuBarWidget();
 void DestroyMenuBarWidget();
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index fc3092a..b6deecf 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -182,6 +182,13 @@ void GtkSalMenu::ImplUpdate(bool bRecurse, bool 
bRemoveDisabledEntries)
 if( !PrepUpdate() )
 return;
 
+if (mbNeedsUpdate)
+{
+mbNeedsUpdate = false;
+if (mbMenuBar)
+maUpdateMenuBarIdle.Stop();
+}
+
 Menu* pVCLMenu = mpVCLMenu;
 GLOMenu* pLOMenu = G_LO_MENU( mpMenuModel );
 GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP( mpActionGroup );
@@ -409,6 +416,7 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, 
const Rectangle& rRec
 
 GtkSalMenu::GtkSalMenu( bool bMenuBar ) :
 mbMenuBar( bMenuBar ),
+mbNeedsUpdate( false ),
 mpMenuBarWidget( nullptr ),
 mpCloseButton( nullptr ),
 mpVCLMenu( nullptr ),
@@ -417,6 +425,32 @@ GtkSalMenu::GtkSalMenu( bool bMenuBar ) :
 mpMenuModel( nullptr ),
 mpActionGroup( nullptr )
 {
+//typically this only gets called after the menu has been customized on the
+//next idle slot, in the normal case of a new menubar SetFrame is called
+//directly long before this idle would get called.
+maUpdateMenuBarIdle.SetPriority(SchedulerPriority::HIGHEST);
+maUpdateMenuBarIdle.SetIdleHdl(LINK(this, GtkSalMenu, 
MenuBarHierarchyChangeHandler));
+maUpdateMenuBarIdle.SetDebugName("Native Gtk Menu Update Idle");
+}
+
+IMPL_LINK_NOARG_TYPED(GtkSalMenu, MenuBarHierarchyChangeHandler, Idle *, void)
+{
+SAL_WARN_IF(!mpFrame, "vcl.gtk", "MenuBar layout changed, but no frame for 
some reason!");
+if (!mpFrame)
+return;
+SetFrame(mpFrame);
+}
+
+void GtkSalMenu::SetNeedsUpdate()
+{
+GtkSalMenu* pMenu = this;
+while (pMenu && !pMenu->mbNeedsUpdate)
+{
+pMenu->mbNeedsUpdate = true;
+if (mbMenuBar)
+maUpdateMenuBarIdle.Start();
+pMenu = pMenu->mpParentSalMenu;
+}
 }
 
 void GtkSalMenu::SetMenuModel(GMenuModel* pMenuModel)
@@ -460,12 +494,15 @@ void GtkSalMenu::InsertItem( SalMenuItem* pSalMenuItem, 
unsigned nPos )
 maItems.insert( maItems.begin() + nPos, pItem );
 
 pItem->mpParentMenu = this;
+
+SetNeedsUpdate();
 }
 
 void GtkSalMenu::RemoveItem( unsigned nPos )
 {
 SolarMutexGuard aGuard;
 maItems.erase( maItems.begin() + nPos );
+SetNeedsUpdate();
 }
 
 void GtkSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, 
unsigned )
@@ -479,6 +516,8 @@ void GtkSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, 
SalMenu* pSubMenu, unsig
 
 pGtkSubMenu->mpParentSalMenu = this;
 pItem->mpS

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

2016-05-06 Thread Ashod Nakashian
 desktop/source/lib/init.cxx |   14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit aadab5f4a72e38ccc8bbe9b7811d2cdcaa00124c
Author: Ashod Nakashian 
Date:   Fri May 6 11:01:42 2016 -0400

Don't change part on text documents to paint tiles

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d043a2f..8742c49 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1101,15 +1101,21 @@ void doc_paintPartTile(LibreOfficeKitDocument* pThis,
 pDocument->mpCallbackFlushHandler->setPartTilePainting(true);
 try
 {
-const int nOrigPart = doc_getPart(pThis);
-if (nPart != nOrigPart)
+// Text documents have a single coordinate system; don't change part.
+int nOrigPart = 0;
+const bool isText = (doc_getDocumentType(pThis) == LOK_DOCTYPE_TEXT);
+if (!isText)
 {
-doc_setPart(pThis, nPart);
+nOrigPart = doc_getPart(pThis);
+if (nPart != nOrigPart)
+{
+doc_setPart(pThis, nPart);
+}
 }
 
 doc_paintTile(pThis, pBuffer, nCanvasWidth, nCanvasHeight, nTilePosX, 
nTilePosY, nTileWidth, nTileHeight);
 
-if (nPart != nOrigPart)
+if (!isText && nPart != nOrigPart)
 {
 doc_setPart(pThis, nOrigPart);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-06 Thread Ashod Nakashian
 loolwsd/LOOLKit.cpp |   37 +++-
 loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h |   13 +
 2 files changed, 20 insertions(+), 30 deletions(-)

New commits:
commit 8e480d7ac12fbdad5a983e4ef594392b440f0b7c
Author: Ashod Nakashian 
Date:   Fri May 6 11:03:34 2016 -0400

loolwsd: use paintPartTile and remove workarounds

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

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 60b3e02..2f524cb 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -659,24 +659,11 @@ public:
 
 std::vector pixmap;
 pixmap.resize(4 * width * height);
-int oldPart = _loKitDocument->pClass->getPart(_loKitDocument);
-if (part != oldPart)
-{
-if (editLock || id != -1)
-{
-_loKitDocument->pClass->setPart(_loKitDocument, part);
-}
-else
-{
-// Session without editlock cannot change part
-Log::debug() << "Declining tile render request: " << response  
<< Log::end;
-ws->sendFrame(response.data(), response.size());
-return;
-}
-}
 
 Timestamp timestamp;
-_loKitDocument->pClass->paintTile(_loKitDocument, pixmap.data(), 
width, height, tilePosX, tilePosY, tileWidth, tileHeight);
+_loKitDocument->pClass->paintPartTile(_loKitDocument, pixmap.data(), 
part,
+  width, height, tilePosX, 
tilePosY,
+  tileWidth, tileHeight);
 Log::trace() << "paintTile at [" << tilePosX << ", " << tilePosY
  << "] rendered in " << (timestamp.elapsed()/1000.) << " 
ms" << Log::end;
 
@@ -689,12 +676,6 @@ public:
 return;
 }
 
-// restore the original part if tilepreview request changed the part
-if (id != -1)
-{
-_loKitDocument->pClass->setPart(_loKitDocument, oldPart);
-}
-
 const auto length = output.size();
 if (length > SMALL_MESSAGE_SIZE)
 {
@@ -789,11 +770,6 @@ public:
 tiles.push_back(rectangle);
 }
 
-if (_docType != "text" && part != 
_loKitDocument->pClass->getPart(_loKitDocument))
-{
-_loKitDocument->pClass->setPart(_loKitDocument, part);
-}
-
 LibreOfficeKitTileMode mode = 
static_cast(_loKitDocument->pClass->getTileMode(_loKitDocument));
 
 int tilesByX = renderArea.getWidth() / tileWidth;
@@ -807,9 +783,10 @@ public:
 std::vector pixmap(pixmapSize, 0);
 
 Timestamp timestamp;
-_loKitDocument->pClass->paintTile(_loKitDocument, pixmap.data(), 
pixmapWidth, pixmapHeight,
-  renderArea.getLeft(), 
renderArea.getTop(),
-  renderArea.getWidth(), 
renderArea.getHeight());
+_loKitDocument->pClass->paintPartTile(_loKitDocument, pixmap.data(), 
part,
+  pixmapWidth, pixmapHeight,
+  renderArea.getLeft(), 
renderArea.getTop(),
+  renderArea.getWidth(), 
renderArea.getHeight());
 
 Log::debug() << "paintTile (combined) called, tile at [" << 
renderArea.getLeft() << ", " << renderArea.getTop() << "]"
 << " (" << renderArea.getWidth() << ", " << 
renderArea.getHeight() << ") rendered in "
diff --git a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h 
b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index 1281a21..110d4d5 100644
--- a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
@@ -228,6 +228,19 @@ struct _LibreOfficeKitDocumentClass
 /// @see lok::Document::getPartHash().
 char* (*getPartHash) (LibreOfficeKitDocument* pThis,
   int nPart);
+
+/// Paints a tile from a specific part.
+/// @see lok::Document::paintTile().
+void (*paintPartTile) (LibreOfficeKitDocument* pThis,
+   unsigned char* pBuffer,
+   const int nPart,
+   const int nCanvasWidth,
+   const int nCanvasHeight,
+   const int nTilePosX,
+   const int nTilePosY,
+   const int nTileWidth,
+   const int nTileHeight);
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

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

2016-05-06 Thread Eike Rathke
 sc/source/core/tool/compiler.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit bb0ef99fb9dce30e99a7e9f7fa295a634d07b423
Author: Eike Rathke 
Date:   Fri May 6 16:56:29 2016 +0200

Resolves: tdf#86575 for OOXML write plain #REF! if deleted parts

Change-Id: Ie3233d72bdbdd0ab82386c98a46755ce64ef3e7f

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index da93bad..c50174b 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -1422,6 +1422,14 @@ struct ConventionXL_OOX : public ConventionXL_A1
 aPos.SetRow(0);
 }
 
+if (rRef.Ref1.IsDeleted() || (!bSingleRef && rRef.Ref2.IsDeleted()))
+{
+// For OOXML write plain "#REF!" instead of detailed sheet/col/row
+// information.
+rBuf.append(rErrRef);
+return;
+}
+
 ConventionXL_A1::makeRefStr( rBuf, eGram, aPos, rErrRef, rTabNames, 
rRef, bSingleRef, bFromRangeName);
 }
 
commit eeb203089f2ba6dffba9a2543c9a7e8bf551bbc5
Author: Eike Rathke 
Date:   Fri May 6 16:31:06 2016 +0200

write the [#REF!] as defined in ODFF, tdf#86575 related

... if a part of the reference was deleted, instead of [.#REF!A1]

Actually this is a regression that already can be tracked down to
c54616f62bc70a9d39abf8837a9d7c3031c80a41 which changed things to use
ValidAddress() only.

Change-Id: I70f68722d7af02f6da3380c2dd9d54704c20b451

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 958f5b3..da93bad 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -1023,7 +1023,8 @@ struct ConventionOOO_A1_ODF : public ConventionOOO_A1
 if( !bSingleRef )
 aAbs2 = rRef.Ref2.toAbs(rPos);
 
-if (FormulaGrammar::isODFF(eGram) && (!ValidAddress(aAbs1) || 
!ValidAddress(aAbs2)))
+if (FormulaGrammar::isODFF(eGram) && (rRef.Ref1.IsDeleted() || 
!ValidAddress(aAbs1) ||
+(!bSingleRef && (rRef.Ref2.IsDeleted() || 
!ValidAddress(aAbs2)
 {
 rBuffer.append(rErrRef);
 // For ODFF write [#REF!], but not for PODF so apps reading ODF
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


New Defects reported by Coverity Scan for LibreOffice

2016-05-06 Thread scan-admin

Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

13 new defect(s) introduced to LibreOffice found with Coverity Scan.
13 defect(s), reported by Coverity Scan earlier, were marked fixed in the 
recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 13 of 13 defect(s)


** CID 1359237:  Uninitialized members  (UNINIT_CTOR)
/usr/include/c++/5.3.1/functional: 2258 in std::function> 
&)>::function> 
&), void, void>(T1)()



*** CID 1359237:  Uninitialized members  (UNINIT_CTOR)
/usr/include/c++/5.3.1/functional: 2258 in std::function> 
&)>::function> 
&), void, void>(T1)()
2252if (_My_handler::_M_not_empty_function(__f))
2253  {
2254_My_handler::_M_init_functor(_M_functor, std::move(__f));
2255_M_invoker = &_My_handler::_M_invoke;
2256_M_manager = &_My_handler::_M_manager;
2257  }
>>> CID 1359237:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "_M_invoker" is not initialized in this 
>>> constructor nor in any functions that it calls.
2258   }
2259 
2260   template
2261 _Res
2262 function<_Res(_ArgTypes...)>::
2263 operator()(_ArgTypes... __args) const

** CID 1359236:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/gdi/mapmod.cxx: 62 in MapMode::ImplMapMode::ImplMapMode(const 
MapMode::ImplMapMode&)()



*** CID 1359236:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/gdi/mapmod.cxx: 62 in MapMode::ImplMapMode::ImplMapMode(const 
MapMode::ImplMapMode&)()
56 MapMode::ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) :
57 meUnit( rImplMapMode.meUnit ),
58 maOrigin( rImplMapMode.maOrigin ),
59 maScaleX( rImplMapMode.maScaleX ),
60 maScaleY( rImplMapMode.maScaleY )
61 {
>>> CID 1359236:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mbSimple" is not initialized in this 
>>> constructor nor in any functions that it calls.
62 }
63 
64 bool MapMode::ImplMapMode::operator==( const ImplMapMode& rImpMapMode ) 
const
65 {
66 if (meUnit   == rImpMapMode.meUnit
67 && maOrigin == rImpMapMode.maOrigin

** CID 1359235:  Resource leaks  (RESOURCE_LEAK)
/desktop/unx/source/pagein.c: 69 in isRotational()



*** CID 1359235:  Resource leaks  (RESOURCE_LEAK)
/desktop/unx/source/pagein.c: 69 in isRotational()
63 {
64 fclose(fp);
65 return type == '1';
66 }
67 }
68 #endif
>>> CID 1359235:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "fp" going out of scope leaks the storage it points to.
69 return 1;
70 }
71 
72 void pagein_execute(char const * path, char const * file)
73 {
74 char fullpath[4096];

** CID 1359234:(PASS_BY_VALUE)
/usr/include/c++/5.3.1/functional: 2247 in std::function> 
&)>::function, 
std::_Placeholder<(int)2>, std::_Placeholder<(int)3>, 
std::_Placeholder<(int)4>, com::sun::star::rendering::Texture, 
com::sun::star::geometry::IntegerSize2D, com::sun::star::uno::Sequence, unsigned int, std::_Placeholder<(int)6>))(const oglcanvas::CanvasHelper 
&, const basegfx::B2DHomMatrix &, unsigned int, unsigned int, const 
com::sun::star::rendering::Texture &, const 
com::sun::star::geometry::IntegerSize2D &, const 
com::sun::star::uno::Sequence &, unsigned int, const 
std::vector> 
&)>, void, void>(T1)()
/usr/include/c++/5.3.1/functional: 2247 in std::function> 
&)>::function, 
std::_Placeholder<(int)2>, std::_Placeholder<(int)3>, 
std::_Placeholder<(int)4>, canvas::ParametricPolyPolygon::Values, 
com::sun::star::rendering::Texture, std::_Placeholder<(int)6>))(const 
oglcanvas::CanvasHelper &, const basegfx::B2DHomMatrix &, unsigned int, 
unsigned int, const canvas::ParametricPolyPolygon::Values &, const 
com::sun::star::rendering::Texture &, const 
std::vector> 
&)>, void, void>(T1)()
/usr/include/c++/5.3.1/functional: 2247 in std::function> 
&)>::function, 
std::_Placeholder<(int)2>, std::_Placeholder<(int)3>, 
std::_Placeholder<(int)4>, std::_Placeholder<(int)5>, 
oglcanvas::CanvasBitmap))(const oglcanvas::CanvasHelper &, const 
basegfx::B2DHomMatrix &, unsigned int, unsigned int, const 
com::sun::star::rendering::ARGBColor &, const oglcanvas::CanvasBitmap &)>, 
void, void>(T1)()



*** CID 1359234:(PASS_BY_VALUE)
/usr/include/c++/5.3.1/functional: 2247 in std::function> 
&)>::function, 
std::_Placeholder<(int)2>, std::_Placeholder<(int)3>, 
std

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

2016-05-06 Thread Katarina Behrens
 sd/source/ui/func/fupage.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 82573976439dea2db42b350356fa4747f38f7f24
Author: Katarina Behrens 
Date:   Wed May 4 11:07:16 2016 +0200

tdf#89466: Don't reset page background on size/orientation change

Change-Id: I5fbf44235784f285d42d2e83466d2f0d70fd0f5d
Reviewed-on: https://gerrit.libreoffice.org/24659
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 

diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 0978881..b33783f 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -129,10 +129,13 @@ void FuPage::DoExecute( SfxRequest& )
 {
 mpDrawViewShell = dynamic_cast(mpViewShell);
 DBG_ASSERT( mpDrawViewShell, "sd::FuPage::FuPage(), called without a 
current DrawViewShell!" );
+
 if( mpDrawViewShell )
 {
 mbMasterPage = mpDrawViewShell->GetEditMode() == EM_MASTERPAGE;
-mbDisplayBackgroundTabPage = (mpDrawViewShell->GetPageKind() == 
PK_STANDARD);
+// we don't really want to format page background with 
SID_ATTR_PAGE[_SIZE] slots
+mbDisplayBackgroundTabPage = ( mpDrawViewShell->GetPageKind() == 
PK_STANDARD) &&
+  ( nSlotId != SID_ATTR_PAGE_SIZE) && ( 
nSlotId != SID_ATTR_PAGE );
 mpPage = mpDrawViewShell->getCurrentPage();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-06 Thread Markus Mohrhard
 sfx2/source/doc/doctemplateslocal.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ba178877324384b19709c0789f496ddf44c8556a
Author: Markus Mohrhard 
Date:   Fri May 6 16:40:55 2016 +0200

fix typo, related tdf#96890

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

diff --git a/sfx2/source/doc/doctemplateslocal.cxx 
b/sfx2/source/doc/doctemplateslocal.cxx
index bbdc01b..3a9555c 100644
--- a/sfx2/source/doc/doctemplateslocal.cxx
+++ b/sfx2/source/doc/doctemplateslocal.cxx
@@ -63,7 +63,7 @@ void SAL_CALL 
DocTemplLocaleHelper::WriteGroupLocalizationSequence( const uno::R
 ::comphelper::AttributeList* pRootAttrList = new 
::comphelper::AttributeList;
 uno::Reference< xml::sax::XAttributeList > xRootAttrList( pRootAttrList );
 pRootAttrList->AddAttribute(
-"xmlns:groupinames",
+"xmlns:groupuinames",
 aCDATAString,
 "http://openoffice.org/2006/groupuinames"; );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - desktop/unx sd/source vcl/source

2016-05-06 Thread Caolán McNamara
 desktop/unx/source/pagein.c  |   20 +---
 sd/source/ui/sidebar/SlideBackground.cxx |   14 --
 vcl/source/gdi/mapmod.cxx|3 ++-
 3 files changed, 19 insertions(+), 18 deletions(-)

New commits:
commit 77ba88a0beaa78024ef29b8879edce0b7371ad9e
Author: Caolán McNamara 
Date:   Fri May 6 17:15:32 2016 +0100

coverity#1359231 Unchecked dynamic_cast

and

coverity#1359232 Unchecked dynamic_cast

Change-Id: I416e9156c6f3b1a933d6d664a992420067b68d1b

diff --git a/sd/source/ui/sidebar/SlideBackground.cxx 
b/sd/source/ui/sidebar/SlideBackground.cxx
index 370aade..6f0cf41 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -162,8 +162,8 @@ void SlideBackground::Initialize()
 
mpPaperOrientation->SetSelectHdl(LINK(this,SlideBackground,PaperOrientationModifyHdl));
 
 ::sd::DrawDocShell* pDocSh = dynamic_cast<::sd::DrawDocShell*>( 
SfxObjectShell::Current() );
-SdDrawDocument* pDoc = pDocSh->GetDoc();
-sal_uInt16 nCount = pDoc->GetMasterPageCount();
+SdDrawDocument* pDoc = pDocSh ? pDocSh->GetDoc() : nullptr;
+sal_uInt16 nCount = pDoc ? pDoc->GetMasterPageCount() : 0;
 for( sal_uInt16 nLayout = 0; nLayout < nCount; nLayout++ )
 {
 SdPage* pMaster = static_cast(pDoc->GetMasterPage(nLayout));
@@ -539,18 +539,20 @@ IMPL_LINK_NOARG_TYPED(SlideBackground, FillBackgroundHdl, 
ListBox&, void)
 IMPL_LINK_NOARG_TYPED(SlideBackground, AssignMasterPage, ListBox&, void)
 {
 ::sd::DrawDocShell* pDocSh = dynamic_cast<::sd::DrawDocShell*>( 
SfxObjectShell::Current() );
-SdDrawDocument* mpDoc = pDocSh->GetDoc();
+SdDrawDocument* pDoc = pDocSh ? pDocSh->GetDoc() : nullptr;
+if (!pDoc)
+return;
 sal_uInt16 nSelectedPage = SDRPAGE_NOTFOUND;
-for( sal_uInt16 nPage = 0; nPage < mpDoc->GetSdPageCount(PK_STANDARD); 
nPage++ )
+for( sal_uInt16 nPage = 0; nPage < pDoc->GetSdPageCount(PK_STANDARD); 
nPage++ )
 {
-if(mpDoc->GetSdPage(nPage,PK_STANDARD)->IsSelected())
+if (pDoc->GetSdPage(nPage,PK_STANDARD)->IsSelected())
 {
 nSelectedPage = nPage;
 break;
 }
 }
 OUString aLayoutName(mpMasterSlide->GetSelectEntry());
-mpDoc->SetMasterPage(nSelectedPage, aLayoutName, mpDoc, false, false);
+pDoc->SetMasterPage(nSelectedPage, aLayoutName, pDoc, false, false);
 }
 
 IMPL_LINK_NOARG_TYPED(SlideBackground, DspBackground, Button*, void)
commit bcab5bb03e2944eeb96fb0948c61e175929d07a2
Author: Caolán McNamara 
Date:   Fri May 6 17:02:40 2016 +0100

coverity#1359235 Resource leak

Change-Id: I3f307211c70384b55b62314a7aa302ffcdfc7398

diff --git a/desktop/unx/source/pagein.c b/desktop/unx/source/pagein.c
index 181637f..56baffa 100644
--- a/desktop/unx/source/pagein.c
+++ b/desktop/unx/source/pagein.c
@@ -46,27 +46,25 @@ static void do_pagein (const char * filename)
 
 int isRotational(char const * path)
 {
+int ret = 1;
 #ifdef LINUX
 FILE * fp = NULL;
 char fullpath[4096];
 struct stat out;
 int major, minor;
 char type;
-if(stat( path , &out ) == -1)
-return 1;
+if (stat(path , &out) == -1)
+return ret;
 major = major(out.st_dev);
 minor = 0; /* minor(out.st_dev); only the device itself has a queue */
 sprintf(fullpath,"/sys/dev/block/%d:%d/queue/rotational",major,minor);
-if ((fp = fopen (fullpath, "r")))
-{
-if (fgets(&type, 1, fp))
-{
-fclose(fp);
-return type == '1';
-}
-}
+if ((fp = fopen(fullpath, "r")) == NULL)
+return ret;
+if (fgets(&type, 1, fp))
+ret = type == '1';
+fclose(fp);
 #endif
-return 1;
+return ret;
 }
 
 void pagein_execute(char const * path, char const * file)
commit 9a7da369f73f3306ddd6ed050df3fcdc959742e2
Author: Caolán McNamara 
Date:   Fri May 6 16:57:21 2016 +0100

coverity#1359236 Uninitialized scalar field

Change-Id: I504b84ad39a8519f495676b7821e3079ac74aaf0

diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx
index 0a4a107..70b2065 100644
--- a/vcl/source/gdi/mapmod.cxx
+++ b/vcl/source/gdi/mapmod.cxx
@@ -57,7 +57,8 @@ MapMode::ImplMapMode::ImplMapMode( const ImplMapMode& 
rImplMapMode ) :
 meUnit( rImplMapMode.meUnit ),
 maOrigin( rImplMapMode.maOrigin ),
 maScaleX( rImplMapMode.maScaleX ),
-maScaleY( rImplMapMode.maScaleY )
+maScaleY( rImplMapMode.maScaleY ),
+mbSimple( rImplMapMode.mbSimple )
 {
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-06 Thread Katarina Behrens
 sd/sdi/_drvwsh.sdi   |8 -
 sd/source/ui/func/fupage.cxx |9 --
 sd/source/ui/inc/DrawViewShell.hxx   |4 
 sd/source/ui/sidebar/SlideBackground.cxx |   54 ++--
 sd/source/ui/view/drviews2.cxx   |5 -
 sd/source/ui/view/drviews7.cxx   |  133 ---
 sd/source/ui/view/drviewsf.cxx   |5 -
 7 files changed, 174 insertions(+), 44 deletions(-)

New commits:
commit 7848ba85695e715a8faaf40c22df133388da5d8c
Author: Katarina Behrens 
Date:   Wed May 4 10:44:43 2016 +0200

tdf#89466: Getting/setting page background works now

Change-Id: I60194adfdca2e4bd9d7d44cc1d43ec14f0774fc3
Reviewed-on: https://gerrit.libreoffice.org/24658
Reviewed-by: Katarina Behrens 
Tested-by: Katarina Behrens 

diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index bce7cb6..7ed164c 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2624,22 +2624,22 @@ interface DrawView
 ]
 SID_ATTR_PAGE_COLOR
 [
-ExecMethod = FuTemporary ;
+ExecMethod = SetPageProperties ;
 StateMethod = GetPageProperties;
 ]
 SID_ATTR_PAGE_GRADIENT
 [
-ExecMethod = FuTemporary ;
+ExecMethod = SetPageProperties ;
 StateMethod = GetPageProperties ;
 ]
 SID_ATTR_PAGE_HATCH
 [
-ExecMethod = FuTemporary ;
+ExecMethod = SetPageProperties ;
 StateMethod = GetPageProperties ;
 ]
 SID_ATTR_PAGE_BITMAP
 [
-ExecMethod = FuTemporary ;
+ExecMethod = SetPageProperties ;
 StateMethod = GetPageProperties ;
 ]
 SID_ATTR_PAGE_FILLSTYLE
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index b33783f..2ac7754b 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -154,15 +154,6 @@ void FuPage::DoExecute( SfxRequest& )
 ApplyItemSet( mpArgs );
 mpView->SetAttributes( *mpArgs );
 }
-
-static sal_uInt16 SidArray[] = {
-SID_ATTR_PAGE_COLOR,
-SID_ATTR_PAGE_GRADIENT,
-SID_ATTR_PAGE_HATCH,
-SID_ATTR_PAGE_BITMAP,
-SID_ATTR_PAGE_FILLSTYLE,
-0 };
-mpDrawViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
 }
 }
 
diff --git a/sd/source/ui/inc/DrawViewShell.hxx 
b/sd/source/ui/inc/DrawViewShell.hxx
index b043f18..b96a0e2 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -148,7 +148,6 @@ public:
 voidGetCtrlState(SfxItemSet& rSet);
 voidGetDrawAttrState(SfxItemSet& rSet);
 voidGetMenuState(SfxItemSet& rSet);
-voidGetPageProperties(SfxItemSet& rSet);
 voidGetTableMenuState(SfxItemSet& rSet);
 /** Set the items of the given item set that are related to
 switching the editing mode to the correct values.
@@ -159,6 +158,9 @@ public:
 voidGetAttrState(SfxItemSet& rSet);
 voidGetSnapItemState(SfxItemSet& rSet);
 
+voidSetPageProperties (SfxRequest& rReq);
+voidGetPageProperties(SfxItemSet& rSet);
+
 voidGetState (SfxItemSet& rSet);
 voidExecute (SfxRequest& rReq);
 
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx 
b/sd/source/ui/sidebar/SlideBackground.cxx
index 6f0cf41..884eca5 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -219,6 +219,15 @@ void SlideBackground::Update()
 mpFillLB->Clear();
 const SvxColorListItem aItem( *static_cast(pSh->GetItem(SID_COLOR_TABLE)));
 mpFillLB->Fill(aItem.GetColorList());
+
+const Color aColor = mpColorItem->GetColorValue();
+mpFillLB->SelectEntry( aColor );
+
+if(mpFillLB->GetSelectEntryCount() == 0)
+{
+mpFillLB->InsertEntry(aColor, OUString());
+mpFillLB->SelectEntry(aColor);
+}
 }
 break;
 case drawing::FillStyle_GRADIENT:
@@ -231,8 +240,27 @@ void SlideBackground::Update()
 mpFillGrad->Clear();
 mpFillLB->Fill(aItem.GetColorList());
 mpFillGrad->Fill(aItem.GetColorList());
+
+const XGradient xGradient = mpGradientItem->GetGradientValue();
+const Color aStartColor = xGradient.GetStartColor();
+const Color aEndColor = xGradient.GetEndColor();
+mpFillLB->SelectEntry( aStartColor );
+mpFillGrad->SelectEntry( aEndColor );
+
+if(mpFillLB->GetSelectEntryCount() == 0)
+{
+mpFillLB->InsertEntry(aStartColor, OUString());
+mpFillLB->SelectEntry(aStartColor);
+}
+
+if(mpFillGrad->GetSelectEntryCount() == 0)
+{
+

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

2016-05-06 Thread Caolán McNamara
 sd/source/ui/sidebar/SlideBackground.cxx |   46 ---
 1 file changed, 25 insertions(+), 21 deletions(-)

New commits:
commit f93ab86ea42789e6c3a18de83a2c838e3cd88de2
Author: Caolán McNamara 
Date:   Fri May 6 17:31:46 2016 +0100

coverity#1359233 Unchecked dynamic_cast

Change-Id: Icafdf8c187fc69866281e90bbb575e99c0f19024

diff --git a/sd/source/ui/sidebar/SlideBackground.cxx 
b/sd/source/ui/sidebar/SlideBackground.cxx
index 884eca5..67ab9fc 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -381,10 +381,12 @@ void SlideBackground::NotifyItemUpdate(
 
 case SID_ATTR_PAGE_FILLSTYLE:
 {
-if(eState >= SfxItemState::DEFAULT)
+const XFillStyleItem* pFillStyleItem = nullptr;
+if (eState >= SfxItemState::DEFAULT)
+pFillStyleItem = dynamic_cast< const XFillStyleItem* >(pState);
+if (pFillStyleItem)
 {
-const XFillStyleItem* aFillStyleItem = dynamic_cast< const 
XFillStyleItem* >(pState);
-css::drawing::FillStyle eXFS = aFillStyleItem->GetValue();
+css::drawing::FillStyle eXFS = pFillStyleItem->GetValue();
 switch(eXFS)
 {
 case drawing::FillStyle_NONE:
@@ -412,10 +414,12 @@ void SlideBackground::NotifyItemUpdate(
 
 case SID_ATTR_PAGE_SIZE:
 {
-if(eState >= SfxItemState::DEFAULT)
+const SvxSizeItem* pSizeItem = nullptr;
+if (eState >= SfxItemState::DEFAULT)
+pSizeItem = dynamic_cast< const SvxSizeItem* >(pState);
+if (pSizeItem)
 {
-const SvxSizeItem* aSizeItem = dynamic_cast< const 
SvxSizeItem* >(pState);
-Size aPaperSize = aSizeItem->GetSize();
+Size aPaperSize = pSizeItem->GetSize();
 if(mpPaperOrientation->GetSelectEntryPos() == 0)
Swap(aPaperSize);
 
@@ -438,10 +442,12 @@ void SlideBackground::NotifyItemUpdate(
 
 case SID_ATTR_PAGE:
 {
-if(eState >= SfxItemState::DEFAULT)
+const SvxPageItem* pPageItem = nullptr;
+if (eState >= SfxItemState::DEFAULT)
+pPageItem = dynamic_cast< const SvxPageItem* >(pState);
+if (pPageItem)
 {
-const SvxPageItem* aPageItem = dynamic_cast< const 
SvxPageItem* >(pState);
-bool bIsLandscape = aPageItem->IsLandscape();
+bool bIsLandscape = pPageItem->IsLandscape();
 
 mpPaperOrientation->SelectEntryPos( bIsLandscape ? 0 : 1 );
 }
@@ -450,22 +456,20 @@ void SlideBackground::NotifyItemUpdate(
 
 case SID_DISPLAY_MASTER_BACKGROUND:
 {
-if(eState >= SfxItemState::DEFAULT)
-{
-const SfxBoolItem* aBoolItem = dynamic_cast< const 
SfxBoolItem* >(pState);
-if(aBoolItem)
-mpDspMasterBackground->Check(aBoolItem->GetValue());
-}
+const SfxBoolItem* pBoolItem = dynamic_cast< const SfxBoolItem* 
>(pState);
+if (eState >= SfxItemState::DEFAULT)
+pBoolItem = dynamic_cast< const SfxBoolItem* >(pState);
+if (pBoolItem)
+mpDspMasterBackground->Check(pBoolItem->GetValue());
 }
 break;
 case SID_DISPLAY_MASTER_OBJECTS:
 {
-if(eState >= SfxItemState::DEFAULT)
-{
-const SfxBoolItem* aBoolItem = dynamic_cast< const 
SfxBoolItem* >(pState);
-if(aBoolItem)
-mpDspMasterObjects->Check(aBoolItem->GetValue());
-}
+const SfxBoolItem* pBoolItem = nullptr;
+if (eState >= SfxItemState::DEFAULT)
+pBoolItem = dynamic_cast< const SfxBoolItem* >(pState);
+if (pBoolItem)
+mpDspMasterObjects->Check(pBoolItem->GetValue());
 }
 break;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: New Defects reported by Coverity Scan for LibreOffice

2016-05-06 Thread Caolán McNamara
On Fri, 2016-05-06 at 08:12 -0700, scan-ad...@coverity.com wrote:


> ** CID 1359230:  Control flow issues  (DEADCODE)
> /sc/source/core/tool/interpr8.cxx: 1977 in
> ScInterpreter::ScSwitch_MS()()
> 
> 
> _
> ___
> *** CID 1359230:  Control flow issues  (DEADCODE)
> /sc/source/core/tool/interpr8.cxx: 1977 in
> ScInterpreter::ScSwitch_MS()()
> 1971  ( !isValue && aRefStr.getDataIgnoreCase() ==
> aStr.getDataIgnoreCase() )) )
> 1972 {
> 1973 // TRUE
> 1974 if ( nParamCount < 1 )
> 1975 {
> 1976 // no parameter given for THEN
> > > > CID 1359230:  Control flow issues  (DEADCODE)
> > > > Execution cannot reach this statement: "this->nGlobalError
> > > > = nFirst...".
> 1977 nGlobalError = nFirstMatchError;
> 1978 PushParameterExpected();
> 1979 return;
> 1980 }
> 1981 bFinished = true;
> 1982 }
> 
> ** CID 1359229:  Error handling issues  (CHECKED_RETURN)
> /sc/source/core/tool/interpr8.cxx: 1936 in
> ScInterpreter::ScSwitch_MS()()
> 
> 
> _
> ___
> *** CID 1359229:  Error handling issues  (CHECKED_RETURN)
> /sc/source/core/tool/interpr8.cxx: 1936 in
> ScInterpreter::ScSwitch_MS()()
> 1930 aRefStr = GetString();
> 1931 break;
> 1932 case svSingleRef :
> 1933 case svDoubleRef :
> 1934 {
> 1935 ScAddress aAdr;
> > > > CID 1359229:  Error handling issues  (CHECKED_RETURN)
> > > > Calling "PopDoubleRefOrSingleRef" without checking return
> > > > value (as is done elsewhere 24 out of 25 times).
> 1936 PopDoubleRefOrSingleRef( aAdr );
> 1937 if ( nGlobalError )
> 1938 break;
> 1939 ScRefCellValue aCell( *pDok, aAdr );
> 1940 isValue = !( aCell.hasString() ||
> aCell.hasEmptyValue() || aCell.isEmpty() );
> 1941 if ( isValue )


These look worth looking at, especially the first one.

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


Re: LibreOffice Windows installer release build failure

2016-05-06 Thread Stuart Swales

On 05/05/2016 22:14, Markus Mohrhard wrote:

Hey,

On Thu, May 5, 2016 at 4:55 PM, Stuart Swales
mailto:stuart.swales.croftnu...@gmail.com>> wrote:

I need to build the Windows installer in order to test some changes to
the installer code. Having had problems building before (last Dec) with
VS2013 I just checked out master and tried to build before making
any of these amendments.

Build on Windows 7 (32-bit) VM with
Visual Studio 2015 Community (Update 2)
Windows 10 SDK 10586.15
Setup with LODE

make works OK
make test-install works OK
make install FAILS

...

The _MergeErrors.idt extracted from the updated MSI is helpfully opaque:

TableNumRowMergeConflicts
s255i2
_MergeErrorsTable
_Validation2


There is no _MergeErrors table in the original MSI (copied as
libreoffice52_en-US.ms.1)

Any ideas?



We normally don't use make install. Use --with-package-format=msi in
your autogen.sh settings and it will produce the msi file during a
normal build.

Regards,
Markus


Thanks Markus - works a treat.

Regards,
Stuart

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


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

2016-05-06 Thread Eike Rathke
 sc/source/core/tool/compiler.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 7ff50286bf7a8d99711388dfe7bb5ebeca4aa4d0
Author: Eike Rathke 
Date:   Fri May 6 16:56:29 2016 +0200

tdf#86575 for OOXML write plain #REF! if deleted parts

(cherry picked from commit bb0ef99fb9dce30e99a7e9f7fa295a634d07b423)

write the [#REF!] as defined in ODFF, tdf#86575 related

... if a part of the reference was deleted, instead of [.#REF!A1]

Actually this is a regression that already can be tracked down to
c54616f62bc70a9d39abf8837a9d7c3031c80a41 which changed things to use
ValidAddress() only.

(cherry picked from commit eeb203089f2ba6dffba9a2543c9a7e8bf551bbc5)

70f68722d7af02f6da3380c2dd9d54704c20b451

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

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 9d27219..a841c80 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -1023,7 +1023,8 @@ struct ConventionOOO_A1_ODF : public ConventionOOO_A1
 if( !bSingleRef )
 aAbs2 = rRef.Ref2.toAbs(rPos);
 
-if (FormulaGrammar::isODFF(eGram) && (!ValidAddress(aAbs1) || 
!ValidAddress(aAbs2)))
+if (FormulaGrammar::isODFF(eGram) && (rRef.Ref1.IsDeleted() || 
!ValidAddress(aAbs1) ||
+(!bSingleRef && (rRef.Ref2.IsDeleted() || 
!ValidAddress(aAbs2)
 {
 rBuffer.append(rErrRef);
 // For ODFF write [#REF!], but not for PODF so apps reading ODF
@@ -1421,6 +1422,14 @@ struct ConventionXL_OOX : public ConventionXL_A1
 aPos.SetRow(0);
 }
 
+if (rRef.Ref1.IsDeleted() || (!bSingleRef && rRef.Ref2.IsDeleted()))
+{
+// For OOXML write plain "#REF!" instead of detailed sheet/col/row
+// information.
+rBuf.append(rErrRef);
+return;
+}
+
 ConventionXL_A1::makeRefStr( rBuf, eGram, aPos, rErrRef, rTabNames, 
rRef, bSingleRef, bFromRangeName);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Fix for Bug 98940

2016-05-06 Thread Michael Stahl
On 04.05.2016 14:33, Matteo Casalin wrote:
> Hi Michael,
> thanks for the details.
> I tried the "gerrit cherry-pick to libreoffice-5-1" method, and it seems [1] 
> that the same one-line patch is enough. I agree that the fix is trivial, so I 
> would prefer not testing it since my machine is quite slow - but if required 
> I can give it a try.

great, looks like it was reviewed in the mean time :)

> Just to be sure: 5.1.4 will be branched from 5.1, not from 5.1.3, right?

yes, there is only one micro release from each libreoffice-x-y-z branch,
and the next libreoffice-x-y-z+1 is branched from libreoffice-x-y again.

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


[Libreoffice-commits] core.git: 6 commits - accessibility/inc basctl/inc basegfx/inc basegfx/source connectivity/inc connectivity/source cppu/qa cui/inc oox/inc oox/source sd/inc sd/source slideshow/s

2016-05-06 Thread Michael Stahl
 accessibility/inc/pch/precompiled_acc.hxx   |1 
 basctl/inc/pch/precompiled_basctl.hxx   |1 
 basegfx/inc/pch/precompiled_basegfx.hxx |1 
 basegfx/source/range/b2drangeclipper.cxx|4 
 connectivity/inc/pch/precompiled_dbtools.hxx|1 
 connectivity/inc/pch/precompiled_odbc.hxx   |2 
 connectivity/source/commontools/FValue.cxx  |1 
 connectivity/source/drivers/odbc/OPreparedStatement.cxx |5 
 cppu/qa/test_any.cxx|   10 
 cui/inc/pch/precompiled_cui.hxx |1 
 oox/inc/pch/precompiled_oox.hxx |1 
 oox/source/drawingml/fillproperties.cxx |   49 
 sd/inc/pch/precompiled_sd.hxx   |1 
 sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx |2 
 sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx|4 
 slideshow/source/inc/listenercontainer.hxx  |4 
 svx/source/form/fmscriptingenv.cxx  | 1048 +---
 vcl/osx/clipboard.cxx   |1 
 xmloff/inc/pch/precompiled_xo.hxx   |1 
 xmloff/source/core/RDFaExportHelper.cxx |   24 
 xmloff/source/core/RDFaImportHelper.cxx |   30 
 21 files changed, 575 insertions(+), 617 deletions(-)

New commits:
commit 631191c72f84a4ed1c2f8312d0764ef480961dce
Author: Michael Stahl 
Date:   Fri May 6 23:17:16 2016 +0200

svx: replace boost::assign::list_of with C++11

"The purpose of this library is to make it easy to fill containers with
data by overloading operator,() and operator()()" - can't make this up!

Change-Id: Ia6f0840232a8048817dc8a09f4ab233b585ae9da

diff --git a/svx/source/form/fmscriptingenv.cxx 
b/svx/source/form/fmscriptingenv.cxx
index c4b9bc4..3cc284e 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -37,7 +37,6 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -182,530 +181,529 @@ namespace svxform
 // since we got rid of the notion of oneway, this is the list
 // of oneway methods, autogenerated by postprocessing of
 // commitdiff 90eac3e69749a9227c4b6902b1f3cef1e338c6d1
-static std::set< pair< OUString, OUString > > delayed_event_listeners =
-boost::assign::list_of
-
(pair("com.sun.star.accessibility.XAccessibleComponent","grabFocus"))
-
(pair("com.sun.star.accessibility.XAccessibleEventBroadcaster","addAccessibleEventListener"))
-
(pair("com.sun.star.accessibility.XAccessibleEventBroadcaster","removeAccessibleEventListener"))
-
(pair("com.sun.star.accessibility.XAccessibleSelection","clearAccessibleSelection"))
-
(pair("com.sun.star.accessibility.XAccessibleSelection","selectAllAccessibleChildren"))
-
(pair("com.sun.star.awt.XActionListener","actionPerformed"))
-
(pair("com.sun.star.awt.XActivateListener","windowActivated"))
-
(pair("com.sun.star.awt.XActivateListener","windowDeactivated"))
-
(pair("com.sun.star.awt.XAdjustmentListener","adjustmentValueChanged"))
-
(pair("com.sun.star.awt.XButton","addActionListener"))
-
(pair("com.sun.star.awt.XButton","removeActionListener"))
-(pair("com.sun.star.awt.XButton","setLabel"))
-
(pair("com.sun.star.awt.XButton","setActionCommand"))
-
(pair("com.sun.star.awt.XCheckBox","addItemListener"))
-
(pair("com.sun.star.awt.XCheckBox","removeItemListener"))
-(pair("com.sun.star.awt.XCheckBox","setState"))
-(pair("com.sun.star.awt.XCheckBox","setLabel"))
-
(pair("com.sun.star.awt.XCheckBox","enableTriState"))
-
(pair("com.sun.star.awt.XComboBox","addItemListener"))
-
(pair("com.sun.star.awt.XComboBox","removeItemListener"))
-
(pair("com.sun.star.awt.XComboBox","addActionListener"))
-
(pair("com.sun.star.awt.XComboBox","removeActionListener"))
-(pair("com.sun.star.awt.XComboBox","addItem"))
-(pair("com.sun.star.awt.XComboBox","addItems"))
-
(pair("com.sun.star.awt.XComboBox","removeItems"))
-
(pair("com.sun.star.awt.XComboBox","setDropDownLineCount"))
-(pair("com.sun.star.awt.XControl","setContext"))
-(pair("com.sun.star.awt.XControl","createPeer"))
-
(pair("com.sun.star.awt.XControl","setDesignMode"))
-
(pair("com.sun.star.awt.XControlContainer","setStatusText"))
-
(pair("com.sun.star.awt.XControlContainer","addControl"))
-
(pair("com.sun.star.awt.XControlContainer","removeControl"))
-
(pair("com.sun.star.awt.XCurrencyField","setValue"))

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

2016-05-06 Thread Michael Stahl
 vcl/osx/clipboard.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3342a05529b1fb33db4f1126b5836249551890f3
Author: Michael Stahl 
Date:   Fri May 6 23:49:57 2016 +0200

vcl: oops, so there was a macro there

Change-Id: I824fa3c83a5bc8b68a6554c9bfe5ce5b3c2d711f

diff --git a/vcl/osx/clipboard.cxx b/vcl/osx/clipboard.cxx
index 1e277e2..be86d28 100644
--- a/vcl/osx/clipboard.cxx
+++ b/vcl/osx/clipboard.cxx
@@ -277,7 +277,7 @@ void AquaClipboard::fireClipboardChangedEvent()
 
 void AquaClipboard::fireLostClipboardOwnershipEvent(Reference 
oldOwner, Reference oldContent)
 {
-BOOST_ASSERT(oldOwner.is());
+assert(oldOwner.is());
 
 try { oldOwner->lostOwnership(static_cast(this), 
oldContent); }
 catch(RuntimeException&) { }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-06 Thread Eike Rathke
 sc/source/core/tool/interpr8.cxx |   14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)

New commits:
commit 2844f3114c2a7b122fe299ed21ed06ca57866e47
Author: Eike Rathke 
Date:   Fri May 6 22:01:46 2016 +0200

actually propagate a match expression error, tdf#97831 follow-up

Change-Id: Iaeecf371af8dd5f6c2cbdea2f114566e8bf7cf47

diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 36304d8..7d1349f 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -1952,6 +1952,7 @@ void ScInterpreter::ScSwitch_MS()
 isValue = ScMatrix::IsValueType( GetDoubleOrStringFromMatrix( 
fRefVal, aRefStr ) );
 break;
 default :
+PopError();
 PushIllegalArgument();
 return;
 }
commit c54f6161480fc3721bf8e208cd12a7446ab608b7
Author: Eike Rathke 
Date:   Fri May 6 21:52:28 2016 +0200

coverity#1359230 DEADCODE, detect missing parameter, tdf#97831 follow-up

... so SWITCH with less than 3 parameters returns the proper error code
instead of #N/A.

Change-Id: Ib5d696a640f7084ca46c3cf8f378ea6e659e3f11

diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 1b7bf6d..36304d8 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -1913,6 +1913,9 @@ void ScInterpreter::ScSwitch_MS()
 {
 short nParamCount = GetByte();
 
+if (!MustHaveParamCountMin( nParamCount, 3))
+return;
+
 ReverseStack( nParamCount );
 
 nGlobalError = 0;   // propagate only for match or active result path
@@ -1970,13 +1973,6 @@ void ScInterpreter::ScSwitch_MS()
  ( !isValue && aRefStr.getDataIgnoreCase() == 
aStr.getDataIgnoreCase() )) )
 {
 // TRUE
-if ( nParamCount < 1 )
-{
-// no parameter given for THEN
-nGlobalError = nFirstMatchError;
-PushParameterExpected();
-return;
-}
 bFinished = true;
 }
 else
commit 0ed8a6a5bbe31c9713d017594fbbcf38618e8c1d
Author: Eike Rathke 
Date:   Fri May 6 21:29:57 2016 +0200

coverity#1359229 handle PopDoubleRefOrSingleRef() as usual

Change-Id: Ib74f00725f2e8b78cbbb92ef9760da74401c1984

diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 5cb33f0..1b7bf6d 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -1933,8 +1933,7 @@ void ScInterpreter::ScSwitch_MS()
 case svDoubleRef :
 {
 ScAddress aAdr;
-PopDoubleRefOrSingleRef( aAdr );
-if ( nGlobalError )
+if (!PopDoubleRefOrSingleRef( aAdr ))
 break;
 ScRefCellValue aCell( *pDok, aAdr );
 isValue = !( aCell.hasString() || aCell.hasEmptyValue() || 
aCell.isEmpty() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-06 Thread Markus Mohrhard
 sc/qa/perf/scperfobj.cxx |   10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

New commits:
commit d223aa57a1d6e356f24cd5ac4ddd702336b2ee87
Author: Markus Mohrhard 
Date:   Sat May 7 01:22:11 2016 +0200

these static vars are cargo cult copy&paste

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

diff --git a/sc/qa/perf/scperfobj.cxx b/sc/qa/perf/scperfobj.cxx
index 8bc12ca..c08dcb1 100644
--- a/sc/qa/perf/scperfobj.cxx
+++ b/sc/qa/perf/scperfobj.cxx
@@ -78,8 +78,7 @@ public:
 
 private:
 
-static sal_Int32 nTest;
-static uno::Reference< lang::XComponent > mxComponent;
+uno::Reference< lang::XComponent > mxComponent;
 
 // tests
 void testSheetFindAll();
@@ -102,9 +101,6 @@ private:
 void testMatConcatLarge();
 };
 
-sal_Int32 ScPerfObj::nTest = 0;
-uno::Reference< lang::XComponent > ScPerfObj::mxComponent;
-
 ScPerfObj::ScPerfObj()
 : CalcUnoApiTest("sc/qa/perf/testdocuments/")
 {
@@ -112,9 +108,6 @@ ScPerfObj::ScPerfObj()
 
 uno::Reference< uno::XInterface > ScPerfObj::init(const OUString& aFileName)
 {
-if (mxComponent.is())
-closeDocument(mxComponent);
-
 OUString aFileURL;
 createFileURL(aFileName, aFileURL);
 
@@ -127,7 +120,6 @@ uno::Reference< uno::XInterface > ScPerfObj::init(const 
OUString& aFileName)
 
 void ScPerfObj::setUp()
 {
-nTest++;
 CalcUnoApiTest::setUp();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-06 Thread Markus Mohrhard
 sc/qa/unit/ucalc.cxx |  325 ---
 sc/qa/unit/ucalc.hxx |   10 -
 2 files changed, 335 deletions(-)

New commits:
commit 52871b360c73efd59bfbc811b8b89a02b6375b29
Author: Markus Mohrhard 
Date:   Sat May 7 01:34:12 2016 +0200

nuke the old ucalc perf testing

We now have the real perf tests and converting this test seems quite
complicated as it uses a lot of private symbols. If we really need these
tests again we need to write them through some exported symbols.

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

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 228fafa..e92fd6f 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -109,35 +109,6 @@ FormulaGrammarSwitch::~FormulaGrammarSwitch()
 mpDoc->SetGrammar(meOldGrammar);
 }
 
-class MeasureTimeSwitch
-{
-double& mrDiff;
-TimeValue maTimeBefore;
-public:
-explicit MeasureTimeSwitch(double& rDiff) : mrDiff(rDiff)
-{
-mrDiff = .0;
-osl_getSystemTime(&maTimeBefore);
-}
-
-~MeasureTimeSwitch()
-{
-TimeValue aTimeAfter;
-osl_getSystemTime(&aTimeAfter);
-mrDiff = getTimeDiff(aTimeAfter, maTimeBefore);
-}
-
-static double getTimeDiff(const TimeValue& t1, const TimeValue& t2)
-{
-double tv1 = t1.Seconds;
-double tv2 = t2.Seconds;
-tv1 += t1.Nanosec / 10.0;
-tv2 += t2.Nanosec / 10.0;
-
-return tv1 - tv2;
-}
-};
-
 Test::Test() :
 m_pImpl(new TestImpl),
 m_pDoc(nullptr)
@@ -174,302 +145,6 @@ void Test::tearDown()
 BootstrapFixture::tearDown();
 }
 
-#define PERF_ASSERT(df,scale,time,message) \
-do { \
-double dfscaled = df / scale; \
-if ((dfscaled) >= (time)) \
-{ \
-std::ostringstream os; \
-os << message " took " << dfscaled << " pseudo-cycles (" << df << 
" real-time seconds), expected: " << time << " pseudo-cycles."; \
-CPPUNIT_FAIL(os.str().c_str()); \
-} \
-} while (false)
-
-void Test::testPerf()
-{
-CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet", m_pDoc->InsertTab (0, 
"foo"));
-
-// First do a set of simple operations to try to work out
-// how fast (or not) this particular machine is:
-double scale;
-{
-MeasureTimeSwitch aTime(scale);
-for (int i = 0; i < 1000; ++i)
-{
-// Bang on the allocator
-volatile ScRange *pRange = new ScRange (ScAddress (0,0,0));
-// Calc does quite a bit of string conversion
-volatile double it = OUString::number ((double)i/253.0).toDouble();
-// Do we have floating point math ?
-volatile double another = rtl::math::sin (it);
-(void)another;
-delete pRange;
-}
-}
-printf("CPU scale factor %g\n", scale);
-
-// FIXME: we should check if this already took too long
-// and if so not run the perf. tests to have pity on some
-// slow ARM machines - I think.
-
-// to make the numbers more round and helpful,
-// but the calculation of scale reasonably precise.
-scale /= 10.0;
-
-double diff;
-
-// Clearing an already empty sheet should finish in a fraction of a
-// second.  Flag failure if it takes more than one second.  Clearing 100
-// columns should be large enough to flag if something goes wrong.
-{
-MeasureTimeSwitch aTime(diff);
-clearRange(m_pDoc, ScRange(0,0,0,99,MAXROW,0));
-}
-PERF_ASSERT(diff, scale, 1.0, "Clearing an empty sheet");
-
-{
-// Switch to R1C1 to make it easier to input relative references in 
multiple cells.
-FormulaGrammarSwitch aFGSwitch(m_pDoc, 
formula::FormulaGrammar::GRAM_ENGLISH_XL_R1C1);
-
-// Insert formulas in B1:B10. This shouldn't take long, but may 
take
-// close to a second on a slower machine. We don't measure this yet, 
for
-// now.
-for (SCROW i = 0; i < 10; ++i)
-m_pDoc->SetString(ScAddress(1,i,0), "=RC[-1]");
-
-// Now, Delete B2:B10. This should complete in a fraction of a 
second
-// (0.06 sec on my machine).
-{
-MeasureTimeSwitch aTime(diff);
-clearRange(m_pDoc, ScRange(1,1,0,1,9,0));
-}
-PERF_ASSERT(diff, scale, 2000, "Removal of a large array of formula 
cells");
-}
-
-clearRange(m_pDoc, ScRange(0,0,0,1,MAXROW,0)); // Clear columns A:B.
-CPPUNIT_ASSERT_MESSAGE("Column A shouldn't have any broadcasters.", 
!m_pDoc->HasBroadcaster(0,0));
-CPPUNIT_ASSERT_MESSAGE("Column B shouldn't have any broadcasters.", 
!m_pDoc->HasBroadcaster(0,1));
-
-{
-// Measure the performance of repeat-pasting a single cell to a large
-// cell range, undoing it,