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

2016-09-16 Thread Gabor Kelemen
 source/text/swriter/01/0214.xhp  |2 +-
 source/text/swriter/guide/fields.xhp |2 +-
 source/text/swriter/guide/references.xhp |4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f3f6967430b24e04be249a063296d5b0f0769f94
Author: Gabor Kelemen 
Date:   Thu Sep 15 09:23:14 2016 +0200

Menu item rename: View -> Fields to View -> Field Names

Some occurrences were replaced in c375894037bb4da57fe7defc45b88d8c0c989dd8
but some others remained.

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

diff --git a/source/text/swriter/01/0214.xhp 
b/source/text/swriter/01/0214.xhp
index 6daae39..47baf18 100644
--- a/source/text/swriter/01/0214.xhp
+++ b/source/text/swriter/01/0214.xhp
@@ -37,7 +37,7 @@
 
 
 
-To change the view 
between field names and field contents in your document, choose View - 
Fields.
+To change the view 
between field names and field contents in your document, choose View - 
Field Names.
 If you select a 
DDE link in your 
document, and then choose Edit - Fields, the Edit 
Links dialog opens.
 If you click in 
front of a "sender" type field, and then choose Edit - 
Fields, the User data dialog opens.
 
diff --git a/source/text/swriter/guide/fields.xhp 
b/source/text/swriter/guide/fields.xhp
index 6342403..85098b1 100644
--- a/source/text/swriter/guide/fields.xhp
+++ b/source/text/swriter/guide/fields.xhp
@@ -39,7 +39,7 @@
 
   Fields are used for data that changes in a document, such as the 
current date or the total number of pages in a document.
   Viewing Fields
-  Fields consist of a field name and the field content. To switch the 
field display between the field name or the field content, choose View - Field 
Names.
+  Fields consist of a field name and the field content. To switch the 
field display between the field name or the field content, choose View - 
Field Names.
   To display or hide field highlighting in a document, choose 
View - Field Shadings. To permanently disable this feature, choose 
%PRODUCTNAME - 
PreferencesTools - 
Options - $[officename] - 
Application Colors, and clear the check box in front of Field 
shadings.
   To 
change the color of field shadings, choose %PRODUCTNAME - 
PreferencesTools - 
Options - $[officename] - Application Colors, 
locate the Field shadings option, and then select 
a different color in the Color setting 
box.
   Field Properties
diff --git a/source/text/swriter/guide/references.xhp 
b/source/text/swriter/guide/references.xhp
index 612e99a..8b3a62b 100644
--- a/source/text/swriter/guide/references.xhp
+++ b/source/text/swriter/guide/references.xhp
@@ -123,11 +123,11 @@
 
 Updating Cross-References
 To manually 
update the cross-references in a document, choose Tools - Update - 
Fields from the menu or press F9.
-Choose View - 
Fields to switch between viewing the reference names and the reference 
contents.
+Choose View - 
Field Names to switch between viewing the reference names and the 
reference contents.
 
 
 
 
 
 
-
\ No newline at end of file
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2016-09-16 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e043b12b4b81a54d6936f62cd77475395c7983a6
Author: Gabor Kelemen 
Date:   Thu Sep 15 09:23:14 2016 +0200

Updated core
Project: help  f3f6967430b24e04be249a063296d5b0f0769f94

Menu item rename: View -> Fields to View -> Field Names

Some occurrences were replaced in c375894037bb4da57fe7defc45b88d8c0c989dd8
but some others remained.

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

diff --git a/helpcontent2 b/helpcontent2
index dbaafc0..f3f6967 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit dbaafc06a3900c768074b2f5c2a0af8c7c6194d8
+Subproject commit f3f6967430b24e04be249a063296d5b0f0769f94
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Fatal error trying to open new build

2016-09-16 Thread Markus Mohrhard
Hey,

On Sat, Sep 17, 2016 at 1:58 AM, Michael Lewis  wrote:

> I tried open instdir/LibreOfficeDev.app and got:
>
>
> LibreOfficeDev 5.3 - Fatal Error
> The application cannot be started.
> A general error occurred while accessing your central configuration.
> ("component context fails to supply service 
> com.sun.star.configuration.ReadWriteAccess
> of type com.sun.star.configuration.XReadWriteAccess")
>
>
> Can anyone point me to information that relates to this error?
>
>
>
>
Your build has not finished and therefore you can't run the instdir build
yet. You first need to finish a build without any problems.

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


Fatal error trying to open new build

2016-09-16 Thread Michael Lewis
I tried open instdir/LibreOfficeDev.app and got:


LibreOfficeDev 5.3 - Fatal Error
The application cannot be started. 
A general error occurred while accessing your central configuration. 
("component context fails to supply service 
com.sun.star.configuration.ReadWriteAccess of type 
com.sun.star.configuration.XReadWriteAccess")


Can anyone point me to information that relates to this error?

thanks, ML___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-2' - embeddedobj/source include/svx sc/inc sc/source sd/source svx/source sw/source

2016-09-16 Thread Caolán McNamara
 embeddedobj/source/commonembedding/visobj.cxx |5 
 include/svx/svdoole2.hxx  |   16 ++
 sc/inc/documentlinkmgr.hxx|5 
 sc/source/ui/docshell/docsh.cxx   |7 -
 sc/source/ui/docshell/docsh4.cxx  |   12 +-
 sc/source/ui/docshell/documentlinkmgr.cxx |   26 +++-
 sc/source/ui/view/tabvwsh4.cxx|2 
 sd/source/core/drawdoc.cxx|6 +
 sd/source/ui/docshell/docshel4.cxx|4 
 svx/source/svdraw/svdoole2.cxx|   18 ---
 svx/source/unodraw/unoshap4.cxx   |4 
 sw/source/core/doc/DocumentLinksAdministrationManager.cxx |   83 +++---
 sw/source/uibase/app/docshini.cxx |3 
 13 files changed, 124 insertions(+), 67 deletions(-)

New commits:
commit 9cc175e5f36d5900f1b88b9a6c6e4790a6f4da68
Author: Caolán McNamara 
Date:   Tue Sep 13 12:32:04 2016 +0100

disable generation of ole previews in ODF format until after load

so the user update links dialog can control their generation

SdrEmbedObjectLink becomes exposed to calc so it can
detect if the link dialog needs to be used to update
ole links.

Reviewed-on: https://gerrit.libreoffice.org/28879
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 74844277cc2194c9e43f5bd7a6f78a9603da32f3)

Change-Id: Id1dd7ea17342140eab9307d546528747e3a98090

detangle gadzillion checks into something readable

no logic change intended

Change-Id: Ib6af93afc1f80b7fc36239c96d5e0a71fcbcb789
(cherry picked from commit fad9786b06d188ba6e354620f57176f3d94a6637)

Unmodified default SdrOle2Obj size is 101x101

svx/source/unodraw/unoshape.cxx

sets a css::awt::Size maSize to 100, 100

svx/source/unodraw/unopage.cxx

increases that by 1, 1

awt::Size aSize = xShape->getSize();
aSize.Width += 1;
aSize.Height += 1;

to call SdrObjFactory::MakeNewObject with 101, 101
so default size is 101x101 (getWidth() vs GetWidth() confusion ?)

Change-Id: I4d4375dff64d7b8e236d1a24322e749e04ee530f
Reviewed-on: https://gerrit.libreoffice.org/28895
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 7f0a219c9ad38ae33b51ff69d545f69659691c1e)
Reviewed-on: https://gerrit.libreoffice.org/28951
Reviewed-by: Michael Stahl 
Reviewed-by: Miklos Vajna 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/embeddedobj/source/commonembedding/visobj.cxx 
b/embeddedobj/source/commonembedding/visobj.cxx
index fea7c3a..6bf9c49 100644
--- a/embeddedobj/source/commonembedding/visobj.cxx
+++ b/embeddedobj/source/commonembedding/visobj.cxx
@@ -174,7 +174,10 @@ embed::VisualRepresentation SAL_CALL 
OCommonEmbeddedObject::getPreferredVisualRe
 bool bBackToLoaded = false;
 if ( m_nObjectState == embed::EmbedStates::LOADED )
 {
-changeState( embed::EmbedStates::RUNNING );
+awt::Size aOrigSize = getVisualAreaSize(nAspect);
+changeState(embed::EmbedStates::RUNNING);
+if (aOrigSize != getVisualAreaSize(nAspect))
+setVisualAreaSize(nAspect, aOrigSize);
 
 // the links should be switched back to loaded state for now to avoid 
locking problems
 bBackToLoaded = m_bIsLink;
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index cd21df9..3629ce7 100644
--- a/include/svx/svdoole2.hxx
+++ b/include/svx/svdoole2.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -175,6 +176,21 @@ public:
 virtual SdrObject* DoConvertToPolyObj(bool bBezier, bool bAddText) const 
override;
 };
 
+class SVX_DLLPUBLIC SdrEmbedObjectLink : public sfx2::SvBaseLink
+{
+SdrOle2Obj* pObj;
+
+public:
+explicitSdrEmbedObjectLink(SdrOle2Obj* pObj);
+virtual ~SdrEmbedObjectLink();
+
+virtual voidClosed() override;
+virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+const OUString& rMimeType, const css::uno::Any & rValue ) override;
+
+boolConnect() { return GetRealObject() != nullptr; }
+};
+
 #endif // INCLUDED_SVX_SVDOOLE2_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/documentlinkmgr.hxx b/sc/inc/documentlinkmgr.hxx
index 4553470..d5d801a 100644
--- a/sc/inc/documentlinkmgr.hxx
+++ b/sc/inc/documentlinkmgr.hxx
@@ -55,14 +55,17 @@ public:
 bool idleCheckLinks();
 
 bool hasDdeLinks() const;
+bool hasDdeOrOleLinks() const;
 
-bool updateDdeLinks( vcl::Window* pWin );
+bool updateDdeOrOleLinks(vcl::Window* pWin);
 
 void updateDdeLink( const OUString& rAppl, const OUString& rTopic, const 
OUString& rItem );
 
 size_t getDde

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - embeddedobj/source include/svx sc/inc sc/source sd/source svx/source sw/source

2016-09-16 Thread Caolán McNamara
 embeddedobj/source/commonembedding/visobj.cxx |5 
 include/svx/svdoole2.hxx  |   16 ++
 sc/inc/documentlinkmgr.hxx|5 
 sc/source/ui/docshell/docsh.cxx   |7 -
 sc/source/ui/docshell/docsh4.cxx  |   12 +-
 sc/source/ui/docshell/documentlinkmgr.cxx |   26 +++-
 sc/source/ui/view/tabvwsh4.cxx|2 
 sd/source/core/drawdoc.cxx|6 +
 sd/source/ui/docshell/docshel4.cxx|4 
 svx/source/svdraw/svdoole2.cxx|   18 ---
 svx/source/unodraw/unoshap4.cxx   |4 
 sw/source/core/doc/DocumentLinksAdministrationManager.cxx |   83 +++---
 sw/source/uibase/app/docshini.cxx |3 
 13 files changed, 124 insertions(+), 67 deletions(-)

New commits:
commit 8c20df32c8278bc4a076cef285db7788627f4c07
Author: Caolán McNamara 
Date:   Tue Sep 13 12:32:04 2016 +0100

disable generation of ole previews in ODF format until after load

so the user update links dialog can control their generation

SdrEmbedObjectLink becomes exposed to calc so it can
detect if the link dialog needs to be used to update
ole links.

Reviewed-on: https://gerrit.libreoffice.org/28879
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 74844277cc2194c9e43f5bd7a6f78a9603da32f3)

Change-Id: Id1dd7ea17342140eab9307d546528747e3a98090

detangle gadzillion checks into something readable

no logic change intended

Change-Id: Ib6af93afc1f80b7fc36239c96d5e0a71fcbcb789
(cherry picked from commit fad9786b06d188ba6e354620f57176f3d94a6637)

Unmodified default SdrOle2Obj size is 101x101

svx/source/unodraw/unoshape.cxx

sets a css::awt::Size maSize to 100, 100

svx/source/unodraw/unopage.cxx

increases that by 1, 1

awt::Size aSize = xShape->getSize();
aSize.Width += 1;
aSize.Height += 1;

to call SdrObjFactory::MakeNewObject with 101, 101
so default size is 101x101 (getWidth() vs GetWidth() confusion ?)

Change-Id: I4d4375dff64d7b8e236d1a24322e749e04ee530f
Reviewed-on: https://gerrit.libreoffice.org/28895
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 7f0a219c9ad38ae33b51ff69d545f69659691c1e)
Reviewed-on: https://gerrit.libreoffice.org/28926
Reviewed-by: Michael Stahl 
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/embeddedobj/source/commonembedding/visobj.cxx 
b/embeddedobj/source/commonembedding/visobj.cxx
index fea7c3a..6bf9c49 100644
--- a/embeddedobj/source/commonembedding/visobj.cxx
+++ b/embeddedobj/source/commonembedding/visobj.cxx
@@ -174,7 +174,10 @@ embed::VisualRepresentation SAL_CALL 
OCommonEmbeddedObject::getPreferredVisualRe
 bool bBackToLoaded = false;
 if ( m_nObjectState == embed::EmbedStates::LOADED )
 {
-changeState( embed::EmbedStates::RUNNING );
+awt::Size aOrigSize = getVisualAreaSize(nAspect);
+changeState(embed::EmbedStates::RUNNING);
+if (aOrigSize != getVisualAreaSize(nAspect))
+setVisualAreaSize(nAspect, aOrigSize);
 
 // the links should be switched back to loaded state for now to avoid 
locking problems
 bBackToLoaded = m_bIsLink;
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index cd21df9..3629ce7 100644
--- a/include/svx/svdoole2.hxx
+++ b/include/svx/svdoole2.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -175,6 +176,21 @@ public:
 virtual SdrObject* DoConvertToPolyObj(bool bBezier, bool bAddText) const 
override;
 };
 
+class SVX_DLLPUBLIC SdrEmbedObjectLink : public sfx2::SvBaseLink
+{
+SdrOle2Obj* pObj;
+
+public:
+explicitSdrEmbedObjectLink(SdrOle2Obj* pObj);
+virtual ~SdrEmbedObjectLink();
+
+virtual voidClosed() override;
+virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+const OUString& rMimeType, const css::uno::Any & rValue ) override;
+
+boolConnect() { return GetRealObject() != nullptr; }
+};
+
 #endif // INCLUDED_SVX_SVDOOLE2_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/documentlinkmgr.hxx b/sc/inc/documentlinkmgr.hxx
index 4553470..d5d801a 100644
--- a/sc/inc/documentlinkmgr.hxx
+++ b/sc/inc/documentlinkmgr.hxx
@@ -55,14 +55,17 @@ public:
 bool idleCheckLinks();
 
 bool hasDdeLinks() const;
+bool hasDdeOrOleLinks() const;
 
-bool updateDdeLinks( vcl::Window* pWin );
+bool updateDdeOrOleLinks(vcl::Window* pWin);
 
 void updateDdeLink( const OUString& rAppl, const OUString& rTopic, const 
OUString& rItem );
 
 size_t getDdeLinkCou

WIP: new VCL scheduler feature branch

2016-09-16 Thread Jan-Marek Glogowski
Hi everybody,

finally I have a working solution, which doesn't instantly show bugs on
Linux with KDE4 (feature/new-vcl-scheduler).

This fixes my mail merge performance problem since the 5.0 merge of idle
job handling.

It completely drops the idea of separated idle and timer handling and
drops a lot of special handling and workarounds for problems in the
original code, but keeps the Idle class for convenience. I tried to list
all the revert commit ids and started to test the original bugs.

Everything is just scheduled by priority and Idles now get a very low
one per default, while they previously had the same one, then timers.
Additionally it drops the 1ms lag for tasks, which actually adds up, as
idle tasks weren't instantly scheduled.

I already fixed the two most obvious busy loop bugs in Writer with
workarounds for the general idle job handler and the statistics
collector. Instead of polling for work I would like to switch these to
be enabled on demand, but that'll definitely take more work. Currently
they are converted to timers, which check for work every few seconds,
then should switch to idle - ok 0ms timeouts, until all work is processed.

I tried to simplify the priority groups to make it easier to select the
correct one. There are still some suspicios HIGHEST ones. I had to guess
the new dependencies from the original priority of the idles, but I'm
quite sure there is some missing stuff. I would like to get some kind of
annotations to be able to build a priority tree of all of them for a
better overview.

It would be great to get feedback from people of all other platforms /
VCL backends.

Thanks for your comments and feedback

Jan-Marek

P.S. it adds a VCL python GDB script, which can be used to dump the list
of currently scheduled tasks.

P.P.S. naming is sill a mess. Sometimes it's task, sometimes event. The
scheduler class is actually the base class for the timers and idles and
should be renamed Event or Task.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - embeddedobj/source include/svx sc/inc sc/source sd/source svx/source sw/inc sw/source

2016-09-16 Thread Caolán McNamara
 embeddedobj/source/commonembedding/visobj.cxx |6 
 include/svx/svdoole2.hxx  |   16 ++
 sc/inc/documentlinkmgr.hxx|5 
 sc/source/ui/docshell/docsh.cxx   |7 -
 sc/source/ui/docshell/docsh4.cxx  |   12 +
 sc/source/ui/docshell/documentlinkmgr.cxx |   26 +++-
 sc/source/ui/view/tabvwsh4.cxx|2 
 sd/source/core/drawdoc.cxx|6 
 sd/source/ui/docshell/docshel4.cxx|5 
 svx/source/svdraw/svdoole2.cxx|   20 ---
 svx/source/unodraw/unoshap4.cxx   |4 
 sw/inc/IDocumentLinksAdministration.hxx   |2 
 sw/source/core/doc/DocumentLinksAdministrationManager.cxx |   85 +++---
 sw/source/core/inc/DocumentLinksAdministrationManager.hxx |2 
 sw/source/filter/basflt/shellio.cxx   |2 
 sw/source/uibase/app/docsh.cxx|2 
 sw/source/uibase/app/docshini.cxx |3 
 17 files changed, 131 insertions(+), 74 deletions(-)

New commits:
commit 2ff4c68b63c4842ec85a21287317096b6ca8e66e
Author: Caolán McNamara 
Date:   Tue Sep 13 12:32:04 2016 +0100

disable generation of ole previews in ODF format until after load

so the user update links dialog can control their generation

SdrEmbedObjectLink becomes exposed to calc so it can
detect if the link dialog needs to be used to update
ole links.

Reviewed-on: https://gerrit.libreoffice.org/28879
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 74844277cc2194c9e43f5bd7a6f78a9603da32f3)

detangle gadzillion checks into something readable

no logic change intended

(cherry picked from commit fad9786b06d188ba6e354620f57176f3d94a6637)

+ partial merge of

commit c09b3e32372537be739182b02ae83a96386d1e1c
Author: Noel Grandin 
Date:   Tue Mar 8 13:13:59 2016 +0200

loplugin:constantparam in sw

for bool bUI is always true in UpdateLinks

Unmodified default SdrOle2Obj size is 101x101

svx/source/unodraw/unoshape.cxx

sets a css::awt::Size maSize to 100, 100

svx/source/unodraw/unopage.cxx

increases that by 1, 1

awt::Size aSize = xShape->getSize();
aSize.Width += 1;
aSize.Height += 1;

to call SdrObjFactory::MakeNewObject with 101, 101
so default size is 101x101 (getWidth() vs GetWidth() confusion ?)

Reviewed-on: https://gerrit.libreoffice.org/28895
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 7f0a219c9ad38ae33b51ff69d545f69659691c1e)

Change-Id: Id1dd7ea17342140eab9307d546528747e3a98090
b6af93afc1f80b7fc36239c96d5e0a71fcbcb789
4d4375dff64d7b8e236d1a24322e749e04ee530f
Reviewed-on: https://gerrit.libreoffice.org/28930
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/embeddedobj/source/commonembedding/visobj.cxx 
b/embeddedobj/source/commonembedding/visobj.cxx
index fea7c3a..3ee8585 100644
--- a/embeddedobj/source/commonembedding/visobj.cxx
+++ b/embeddedobj/source/commonembedding/visobj.cxx
@@ -174,7 +174,11 @@ embed::VisualRepresentation SAL_CALL 
OCommonEmbeddedObject::getPreferredVisualRe
 bool bBackToLoaded = false;
 if ( m_nObjectState == embed::EmbedStates::LOADED )
 {
-changeState( embed::EmbedStates::RUNNING );
+awt::Size aOrigSize = getVisualAreaSize(nAspect);
+changeState(embed::EmbedStates::RUNNING);
+awt::Size aNewSize = getVisualAreaSize(nAspect);
+if (aOrigSize.Width != aNewSize.Width || aOrigSize.Height != 
aNewSize.Height)
+setVisualAreaSize(nAspect, aOrigSize);
 
 // the links should be switched back to loaded state for now to avoid 
locking problems
 bBackToLoaded = m_bIsLink;
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index 2d0b49d..239284b 100644
--- a/include/svx/svdoole2.hxx
+++ b/include/svx/svdoole2.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -176,6 +177,21 @@ public:
 virtual SdrObject* DoConvertToPolyObj(bool bBezier, bool bAddText) const 
override;
 };
 
+class SVX_DLLPUBLIC SdrEmbedObjectLink : public sfx2::SvBaseLink
+{
+SdrOle2Obj* pObj;
+
+public:
+explicitSdrEmbedObjectLink(SdrOle2Obj* pObj);
+virtual ~SdrEmbedObjectLink();
+
+virtual voidClosed() override;
+virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+const OUString& rMimeType, const css::uno::Any & rValue ) override;
+
+boolConnect() { return GetRealObject() != nullptr; }
+};
+
 #endif // INCLUDED_SVX_SVD

[Libreoffice-commits] core.git: Changes to 'feature/new-vcl-scheduler'

2016-09-16 Thread Jan-Marek Glogowski
New branch 'feature/new-vcl-scheduler' available with the following commits:
commit 7bf8afcf2eb37c7c0c43bcae077a9f189a7e0f84
Author: Jan-Marek Glogowski 
Date:   Tue Sep 13 11:03:08 2016 +0200

Round-robin invoked / started tasks

And some simple round-robin to the task processing, so equal
priority (auto) tasks won't always be scheduled, if there are
multiple with the same priority.

Currently breaks LO, which indicates dependencies in the same
priority class, which must not exist!

Change-Id: If84496bff68aec42d0fa63c2b7e05c3202f67b2c

commit b2e123f9a22928d2e0cea8ceb4ae75ff5102c6dc
Author: Jan-Marek Glogowski 
Date:   Wed Aug 10 12:33:21 2016 +0200

Readd SAL_INFOs to dump the Scheduler handling

Debug area name is "vcl.schedule".

Conflicts:
include/sal/log-areas.dox
vcl/source/app/scheduler.cxx

Change-Id: Ia1eab69e76671bd33ce3324c5eb058e4e00dfdd2

commit f701ea310606611fd7b80eac53481365ca06218d
Author: Jan-Marek Glogowski 
Date:   Wed Sep 14 18:17:18 2016 +0200

Don't poll busy documents via idle task

Creates a very busy idle-loop, for non-task work like mail merge.

Change-Id: If7be82e4675008f23e6f4f6be5c40df40a231a8b

commit a1ecb280872c5487615558f8d140a380ef3e0d36
Author: Jan-Marek Glogowski 
Date:   Wed Sep 14 15:33:54 2016 +0200

Run Idle tasks immediatly

There is really no reason to wait a millisecond for an idle.

Change-Id: I7665d5f2e7d6ba3e01290a692bbc8e42c36b9986

commit 2798b797c9acec175bfdb658f63df2cd968e2d6e
Author: Jan-Marek Glogowski 
Date:   Wed Sep 14 13:48:02 2016 +0200

Change Idle to be a actually a Timer subclass

Drops a lot of duplicated code and actually reflects the Scheduler
handling of "idle" in the source code.

Change-Id: I847592e92e86d15ab1cab168bf0e667322e48048

commit 102c41c2e429bee489334361536779aa298bc181
Author: Jan-Marek Glogowski 
Date:   Mon Sep 12 18:24:14 2016 +0200

Handle all main loop and task events

Change-Id: I75ed5a38b0e24966dafcfdd2ea4cb8afc93a8a0c

commit 5e4361e84607fc6d7623b31630505da7c934b945
Author: Jan-Marek Glogowski 
Date:   Wed Aug 10 12:00:53 2016 +0200

Reorganize Scheduler priority classes

This is based on glibs classification of tasks, but while glib uses
an int for more fine grained priority, we stay with our enum.

1. Timers start with DEFAULT priority, which directly corresponds
   with the previous HIGH priority
2. Idles start with DEFAULT_IDLE priority instead of the previous
   HIGH priority, so idle default becomes "really run when idle".

As RESIZE and REPAINT are special, and the DEFAULTS are set, there
is just one primary decision for the programmer: should my idle
run before paint (AKA HIGH_IDLE)?

If we really need a more fine-grained classification, we can add it
later, or also switch to a real int. As a result, this drops many
classifications from the code and drastically changes behaviour,
AKA a mail merge from KDE is now as fast as Gtk+ again.

Conflicts:
cui/source/tabpages/macroass.cxx
desktop/source/deployment/gui/dp_gui_dialog2.cxx
include/vcl/scheduler.hxx
sc/source/core/tool/dbdata.cxx
sc/source/ui/formdlg/dwfunctr.cxx
sc/source/ui/miscdlgs/anyrefdg.cxx
sd/source/ui/dlg/dlgass.cxx
sd/source/ui/slideshow/slideshowimpl.cxx
svx/source/inc/eventhandler.hxx
svx/source/sdr/overlay/overlaymanagerbuffered.cxx
sw/source/uibase/docvw/srcedtw.cxx
sw/source/uibase/utlui/unotools.cxx
vcl/source/app/idle.cxx
vcl/source/app/scheduler.cxx
vcl/source/app/timer.cxx

Change-Id: I498a73fd02d5fb6f5d7e9f742f3bce972de9b1f9

commit c43ebd2dc563a8d3ebc90e4181b6f3eec5c02c23
Author: Jan-Marek Glogowski 
Date:   Tue Sep 13 12:20:45 2016 +0200

Don't wait in Yield with pending events

This re-introduces some functionality of commit
  87199d3829257420429057336283c55be6ae7481

I'm not sure, if we really want to skip the wait on pendig events.

Change-Id: Ie88c2945acb066e312bab7d0f5b2f3b525fa1c4c

commit 71ce92d177a7f8c08c8051d0ef4f9e8ab0f00470
Author: Jan-Marek Glogowski 
Date:   Sun Jul 31 17:31:07 2016 +0200

Just schedule tasks, if timeout has ellapsed

As the native main loop wakes up on new events and not just by
timer timeouts, make sure there is really an ellapsed event.

Probably we should just schedule events via the system timeout.
At least this will prevent expensive re-scheduling.

Conflicts:
vcl/source/app/scheduler.cxx

Change-Id: I248c9b8acb7df026295d10f256871b9fc8d39c07

commit 4255a5a4340bc7d106b976cfd2b805eda0295978
Author: Jan-Marek Glogowski 
Date:   Mon Sep 12 17:03:29 2016 +0200

Drop special idle handling

Idles are just instant, mainly low-priority timers.
So we'l

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

2016-09-16 Thread Winfried Donkers
 sc/source/core/tool/interpr2.cxx |   22 +-
 1 file changed, 13 insertions(+), 9 deletions(-)

New commits:
commit 3bf31803959ccc54bb949630f936a768ef47a90b
Author: Winfried Donkers 
Date:   Fri Sep 9 13:18:42 2016 +0200

tdf#101541 function WORKDAY.INTL not working properly

When holidays are adjacent to weekend days, wrong results occurred.

Change-Id: I9ec86e00f1a62ea941ff70617a1b448601aff9cc
Reviewed-on: https://gerrit.libreoffice.org/28771
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 5e9d5eeb8a33fdcc500377d9eace40b5f5a7f750)
Reviewed-on: https://gerrit.libreoffice.org/28970
Tested-by: Jenkins 
Reviewed-on: https://gerrit.libreoffice.org/28973

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index bd255fc..d287718 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -513,14 +513,16 @@ void ScInterpreter::ScWorkday_MS()
 size_t nRef = 0;
 while ( nDays )
 {
-while ( nRef < nMax && nSortArray.at( nRef ) < nDate )
-nRef++;
-if ( !( nRef < nMax && nSortArray.at( nRef ) == nDate 
) || nRef >= nMax )
- nDays--;
-
 do
+{
 ++nDate;
+}
 while ( bWeekendMask[ GetDayOfWeek( nDate ) ] ); 
//jump over weekend day(s)
+
+while ( nRef < nMax && nSortArray.at( nRef ) < nDate )
+nRef++;
+if ( !( nRef < nMax && nSortArray.at( nRef ) == nDate 
) || nRef >= nMax )
+nDays--;
 }
 }
 else
@@ -528,14 +530,16 @@ void ScInterpreter::ScWorkday_MS()
 sal_Int16 nRef = nMax - 1;
 while ( nDays )
 {
+do
+{
+  --nDate;
+}
+while ( bWeekendMask[ GetDayOfWeek( nDate ) ] ); 
//jump over weekend day(s)
+
 while ( nRef >= 0 && nSortArray.at( nRef ) > nDate )
 nRef--;
 if ( !( nRef >= 0 && nSortArray.at( nRef ) == nDate ) 
|| nRef < 0 )
  nDays++;
-
-do
-  --nDate;
-while ( bWeekendMask[ GetDayOfWeek( nDate ) ] ); 
//jump over weekend day(s)
 }
 }
 PushDouble( ( double ) ( nDate - nNullDate ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/jmux/master-fixes_7' - 0 commits -

2016-09-16 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Tamás Zolnai
 sc/source/ui/unoobj/dapiuno.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 5b6185d27781d5876d1c6fb18d848a7babdfec88
Author: Tamás Zolnai 
Date:   Sat Sep 17 07:05:09 2016 +0200

Reduce scope of soma local variables

Change-Id: I6e8938fa76e6afe0763610266b25ebf5ffe48d56

diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index a27ebbc..94b01ec 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -2557,11 +2557,9 @@ Reference< XDataPilotField > SAL_CALL 
ScDataPilotFieldObj::createNameGroup( cons
 
 // remove the selected items from their groups
 // (empty groups are removed, too)
-sal_Int32 nEntryCount = rItems.getLength();
-sal_Int32 nEntry;
 if ( pGroupDimension )
 {
-for (nEntry=0; nEntry SAL_CALL 
ScDataPilotFieldObj::createNameGroup( cons
 throw RuntimeException();
 }
 
-for (nEntry=0; nEntry___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Winfried Donkers
 sc/source/core/tool/interpr2.cxx |   22 +-
 1 file changed, 13 insertions(+), 9 deletions(-)

New commits:
commit 13ba2592254c861dafa337121902168d83f610bd
Author: Winfried Donkers 
Date:   Fri Sep 9 13:18:42 2016 +0200

tdf#101541 function WORKDAY.INTL not working properly

When holidays are adjacent to weekend days, wrong results occurred.

Change-Id: I9ec86e00f1a62ea941ff70617a1b448601aff9cc
Reviewed-on: https://gerrit.libreoffice.org/28771
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 5e9d5eeb8a33fdcc500377d9eace40b5f5a7f750)
Reviewed-on: https://gerrit.libreoffice.org/28970
Tested-by: Jenkins 

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 773eaba..38523e5 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -538,14 +538,16 @@ void ScInterpreter::ScWorkday_MS()
 size_t nRef = 0;
 while ( nDays )
 {
-while ( nRef < nMax && nSortArray.at( nRef ) < nDate )
-nRef++;
-if ( !( nRef < nMax && nSortArray.at( nRef ) == nDate 
) || nRef >= nMax )
- nDays--;
-
 do
+{
 ++nDate;
+}
 while ( bWeekendMask[ GetDayOfWeek( nDate ) ] ); 
//jump over weekend day(s)
+
+while ( nRef < nMax && nSortArray.at( nRef ) < nDate )
+nRef++;
+if ( !( nRef < nMax && nSortArray.at( nRef ) == nDate 
) || nRef >= nMax )
+nDays--;
 }
 }
 else
@@ -553,14 +555,16 @@ void ScInterpreter::ScWorkday_MS()
 sal_Int16 nRef = nMax - 1;
 while ( nDays )
 {
+do
+{
+  --nDate;
+}
+while ( bWeekendMask[ GetDayOfWeek( nDate ) ] ); 
//jump over weekend day(s)
+
 while ( nRef >= 0 && nSortArray.at( nRef ) > nDate )
 nRef--;
 if ( !( nRef >= 0 && nSortArray.at( nRef ) == nDate ) 
|| nRef < 0 )
  nDays++;
-
-do
-  --nDate;
-while ( bWeekendMask[ GetDayOfWeek( nDate ) ] ); 
//jump over weekend day(s)
 }
 }
 PushDouble( ( double ) ( nDate - nNullDate ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Tamás Zolnai
 sc/source/core/data/dpcache.cxx  |4 ++--
 sc/source/core/data/dpobject.cxx |8 
 sc/source/core/data/pivot2.cxx   |2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 94782edef386a9e32842d3caba39e69a04760248
Author: Tamás Zolnai 
Date:   Sat Sep 17 06:37:02 2016 +0200

Fix build with DEBUG_PIVOT_TABLE macro

Change-Id: Ia2e38469ab8df268c6e03d77cae76e16e454ad76

diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 655a460..85de538 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -1281,7 +1281,7 @@ void ScDPCache::Dump() const
 FieldsType::const_iterator it = maFields.begin(), itEnd = 
maFields.end();
 for (size_t i = 0; it != itEnd; ++it, ++i)
 {
-const Field& fld = *it;
+const Field& fld = *(*it);
 cout << "* source dimension: " << GetDimensionName(i) << " (ID = " 
<< i << ")" << endl;
 cout << "item count: " << fld.maItems.size() << endl;
 if (bDumpItems)
@@ -1306,7 +1306,7 @@ void ScDPCache::Dump() const
 GroupFieldsType::const_iterator it = maGroupFields.begin(), itEnd = 
maGroupFields.end();
 for (size_t i = maFields.size(); it != itEnd; ++it, ++i)
 {
-const GroupItems& gi = *it;
+const GroupItems& gi = *(*it);
 cout << "* group dimension: (unnamed) (ID = " << i << ")" << endl;
 cout << "item count: " << gi.maItems.size() << endl;
 cout << "group type: " << getGroupTypeName(gi.mnGroupType) << 
endl;
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 733ff90..4ba4398 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -3778,12 +3778,12 @@ bool ScDPCollection::HasTable( const ScRange& rRange ) 
const
 
 namespace {
 
-struct DumpTable : std::unary_function
+struct DumpTable : std::unary_function, void>
 {
-void operator() (const ScDPObject& rObj) const
+void operator() (const std::unique_ptr& rObj) const
 {
-cout << "-- '" << rObj.GetName() << "'" << endl;
-ScDPSaveData* pSaveData = rObj.GetSaveData();
+cout << "-- '" << rObj->GetName() << "'" << endl;
+ScDPSaveData* pSaveData = rObj->GetSaveData();
 if (!pSaveData)
 return;
 
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index cbb6f83..ddfebaf 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -182,7 +182,7 @@ ScPivotFuncData::ScPivotFuncData( SCCOL nCol, PivotFunc 
nFuncMask ) :
 void ScPivotFuncData::Dump() const
 {
 cout << "ScPivotFuncData: (col=" << mnCol << ", original dim=" << 
mnOriginalDim
-<< ", func mask=" << mnFuncMask << ", duplicate count=" << 
static_cast(mnDupCount)
+<< ", func mask=" << static_cast(mnFuncMask) << ", duplicate 
count=" << static_cast(mnDupCount)
 << ")" << endl;
 }
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Jan-Marek Glogowski
 sw/source/ui/misc/bookmark.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 96454829f7dc6480f9ddd4262bc03d5ccabadea4
Author: Jan-Marek Glogowski 
Date:   Fri Sep 16 22:13:02 2016 +0200

tdf#101359 Just advance list box for BOOKMARKs

Since the list box just contains MarkType::BOOKMARK, just advance
the list box position for marks of this type.

Change-Id: I7b8743abb1ffb2fda2242c5e7301b3ff15ae355b

diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index ec6f3a3..b932883 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -257,8 +257,8 @@ bool SwInsertBookmarkDlg::HaveBookmarksChanged()
 if (aTableBookmark.first != ppBookmark->get() ||
 aTableBookmark.second != ppBookmark->get()->GetName())
 return true;
+++ppBookmark;
 }
-++ppBookmark;
 }
 return false;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Winfried Donkers
 sc/source/core/tool/interpr2.cxx |   30 +-
 1 file changed, 13 insertions(+), 17 deletions(-)

New commits:
commit 5e9d5eeb8a33fdcc500377d9eace40b5f5a7f750
Author: Winfried Donkers 
Date:   Fri Sep 9 13:18:42 2016 +0200

tdf#101541 function WORKDAY.INTL not working properly

When holidays are adjacent to weekend days, wrong results occurred.

Change-Id: I9ec86e00f1a62ea941ff70617a1b448601aff9cc
Reviewed-on: https://gerrit.libreoffice.org/28771
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index e214d39..0d02066 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -596,41 +596,37 @@ void ScInterpreter::ScWorkday_MS()
 if ( nDays > 0 )
 {
 size_t nRef = 0;
-//skip holidays before/on start date
-while ( nRef < nMax && nSortArray.at( nRef ) <= nDate )
-nRef++;
-
 while ( nDays )
 {
+do
+{
+++nDate;
+}
+while ( bWeekendMask[ GetDayOfWeek( nDate ) ] ); 
//jump over weekend day(s)
+
 while ( nRef < nMax && nSortArray.at( nRef ) < nDate )
 nRef++;
 
 if ( !( nRef < nMax && nSortArray.at( nRef ) == nDate 
) || nRef >= nMax )
- nDays--;
-
-do
-++nDate;
-while ( bWeekendMask[ GetDayOfWeek( nDate ) ] ); 
//jump over weekend day(s)
+nDays--;
 }
 }
 else
 {
 sal_Int16 nRef = nMax - 1;
-//skip holidays after/on start date
-while ( nRef >= 0 && nSortArray.at( nRef ) >= nDate )
-nRef--;
-
 while ( nDays )
 {
+do
+{
+  --nDate;
+}
+while ( bWeekendMask[ GetDayOfWeek( nDate ) ] ); 
//jump over weekend day(s)
+
 while ( nRef >= 0 && nSortArray.at( nRef ) > nDate )
 nRef--;
 
 if ( !( nRef >= 0 && nSortArray.at( nRef ) == nDate ) 
|| nRef < 0 )
  nDays++;
-
-do
-  --nDate;
-while ( bWeekendMask[ GetDayOfWeek( nDate ) ] ); 
//jump over weekend day(s)
 }
 }
 PushDouble( ( double ) ( nDate - nNullDate ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'private/Ashod/tilecombine' - loleaflet/dist

2016-09-16 Thread Andras Timar
 dev/null  |binary
 loleaflet/dist/toolbar.css|1 -
 loleaflet/dist/toolbar/toolbar.js |   16 
 3 files changed, 17 deletions(-)

New commits:
commit d2b7d6a178f7654c29712370a9d47c1bd22df6d0
Author: Andras Timar 
Date:   Thu Sep 1 17:20:14 2016 +0200

Revert "Add footnote and text wrap functions"

This reverts commit 5902700922d110aee29d67be6224094bb521132d.

diff --git a/loleaflet/dist/images/lc_insertfootnote.png 
b/loleaflet/dist/images/lc_insertfootnote.png
deleted file mode 100644
index 65b110f..000
Binary files a/loleaflet/dist/images/lc_insertfootnote.png and /dev/null differ
diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css
index aef6e23..40f53f5 100644
--- a/loleaflet/dist/toolbar.css
+++ b/loleaflet/dist/toolbar.css
@@ -246,7 +246,6 @@ button.leaflet-control-search-next
 .w2ui-icon.save{ background: url('/loleaflet/dist/images/lc_save.png') 
no-repeat center !important; }
 .w2ui-icon.saveas{ background: url('/loleaflet/dist/images/lc_saveas.png') 
no-repeat center !important; }
 .w2ui-icon.strikeout{ background: 
url('/loleaflet/dist/images/lc_strikeout.png') no-repeat center !important; }
-.w2ui-icon.insertfootnote{ background: 
url('/loleaflet/dist/images/lc_insertfootnote.png') no-repeat center 
!important; }
 .w2ui-icon.underline{ background: 
url('/loleaflet/dist/images/lc_underline.png') no-repeat center !important; }
 .w2ui-icon.undo{ background: url('/loleaflet/dist/images/lc_undo.png') 
no-repeat center !important; }
 .w2ui-icon.zoomin{ background: url('/loleaflet/dist/images/plus.png') 
no-repeat center !important; }
diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index f6597f2..218bb46 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -171,11 +171,6 @@ function onClick(id, item, subItem) {
else if (id === 'lastrecord') {

$('#spreadsheet-tab-scroll').scrollLeft($('#spreadsheet-tab-scroll').prop('scrollWidth'));
}
-   else if (id.startsWith('menu:wrap:wrap-'))
-   {
-   var wrapType = id.substring('menu:wrap:wrap-'.length);
-   map.toggleCommandState(wrapType);
-   }
else if (id === 'insertgraphic') {
L.DomUtil.get('insertgraphic').click();
}
@@ -334,15 +329,6 @@ $(function () {
name: 'toolbar-up',
items: [
{type: 'html', id: 'left'},
-   {type: 'menu', id: 'writer:menu:wrap', caption: 
_('Textwrap'), items: [
-   { text: _('No wrap'), id: 'wrap-WrapOff' },
-   { text: _('Page wrap'), id: 'wrap-WrapOn' },
-   { text: _('Wrap anchor only'), id: 
'wrap-WrapAnchorOnly' },
-   { text: _('Ideal wrap'), id: 'wrap-WrapIdeal' },
-   { text: _('Left wrap'), id: 'wrap-WrapLeft' },
-   { text: _('Right wrap'), id: 'wrap-WrapRight' },
-   { text: _('Wrap through'), id: 
'wrap-WrapThrough' }
-   ]},
{type: 'button',  id: 'save', img: 'save', hint: 
_('Save'), uno: 'Save'},
{type: 'break'},
{type: 'button',  id: 'undo',  img: 'undo', hint: 
_('Undo'), uno: 'Undo'},
@@ -358,8 +344,6 @@ $(function () {
{type: 'button',  id: 'underline',  img: 'underline', 
hint: _('Underline'), uno: 'Underline'},
{type: 'button',  id: 'strikeout', img: 'strikeout', 
hint: _('Strikeout'), uno: 'Strikeout'},
{type: 'break'},
-   {type: 'button',  id: 'insertfootnote', img: 
'insertfootnote', hint: _('Insert Footnote'), uno: 'InsertFootnote' },
-   {type: 'break' },
{type: 'html',  id: 'fontcolor-html', html: ''},
{type: 'button',  id: 'fontcolor', img: 'color', hint: 
_('Font color')},
{type: 'html',  id: 'backcolor-html', html: ''},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Tried to run new build -- got fatal error

2016-09-16 Thread Michael Lewis
I tried open instdir/LibreOfficeDev.app on the build that I completed yesterday 
(please see yesterday’s email below for build errors). I got the following when 
I tried to open the app:

LibreOfficeDev 5.3 - Fatal Error
The application cannot be started. 
A general error occurred while accessing your central configuration. 
("component context fails to supply service 
com.sun.star.configuration.ReadWriteAccess of type 
com.sun.star.configuration.XReadWriteAccess")

Not sure how to interpret this. The permissions in instdir and its two files 
(LibreOfficeDev.app and LibreOffice5.3_SDK) are set at 755. Should they be 777? 
Will this solve the fatal error?

Any assistance appreciated.

ML



> Begin forwarded message:
> 
> From: Michael Lewis 
> Subject: Build completes, but with errors
> Date: September 15, 2016 at 8:47:34 PM PDT
> To: libreoffice@lists.freedesktop.org
> Reply-To: Michael Lewis 
> 
> I worked from the Building LibreOffice on OS X web page & chose the “minimal 
> setup” build. Make ran for ~4 hr. The last few lines of build.log are:
> 
> 
> testTdf99074::Import finished in: 147ms
> File tested,Execution Time (ms)
> tdf99140.docx:
> 107
> testTdf99140::Import finished in: 117ms
> /Users/ml/lo/core/sw/qa/extras/ooxmlimport/ooxmlimport.cxx:1884: Assertion
> Test name: textboxWpsOnly::Import
> equality assertion failed
> - Expected: 2
> - Actual  : 0
> 
> Failures !!!
> Run: 220   Failure total: 1   Failures: 1   Errors: 0
> 2016-09-15 20:16:45.309 cppunittester[84771:1171679] *** -[NSAutoreleasePool 
> release]: This pool has already been released, do not drain it (double 
> release).
> 
> Error: a unit test failed, please do one of:
> make CppunitTest_sw_ooxmlimport CPPUNITTRACE="lldb --"   # for 
> interactive debugging on OS X
> make CppunitTest_sw_ooxmlimport VALGRIND=memcheck# for memory 
> checking
> 
> make[1]: *** [/Users/ml/lo/core/workdir/CppunitTest/sw_ooxmlimport.test] 
> Error 1
> make: *** [build] Error 2
> 
> 
> This is my first build of LO. I’m not sure how to proceed from here. Should I 
> try one of the make CppunitTest options? Which one? Do I have a viable build?
> 
> Any assistance appreciated, thanks
> 
> ML

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


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

2016-09-16 Thread Eike Rathke
 sc/qa/unit/data/functions/fods/cumprinc.fods | 1739 +
 sc/qa/unit/data/functions/fods/growth.fods   | 7952 ++
 sc/qa/unit/data/functions/fods/linest.fods   | 8042 +++
 sc/qa/unit/data/functions/fods/logest.fods   | 3324 +++
 sc/qa/unit/data/functions/fods/mod.fods  | 3714 
 5 files changed, 24771 insertions(+)

New commits:
commit cfde267f21b047bc19fe77dbd7ce52bdd7a1141d
Author: Eike Rathke 
Date:   Fri Sep 16 19:18:19 2016 +0200

Revert "Revert "add MOD test case""

This reverts commit 9dc3356f1499a2b90078be86ca7470eb2e96aba8.

Should not fail now since

commit b9a27d5856f60688456762bfcc29c38670009254
Date:   Wed Sep 14 12:56:31 2016 +0200

sc: disable function test documents for 32-bit PLATFORMID=linux_x86

diff --git a/sc/qa/unit/data/functions/fods/mod.fods 
b/sc/qa/unit/data/functions/fods/mod.fods
new file mode 100644
index 000..48ab478
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/mod.fods
@@ -0,0 +1,3714 @@
+
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-25T07:16:38.437590147P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/a2c557d80ac68c06ea59586245a7431e061938f0
+ 
+  
+   0
+   0
+   22082
+   14449
+   
+
+ view1
+ 
+  
+   2
+   9
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   95
+   60
+   true
+   false
+  
+  
+   4
+   22
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   95
+   60
+   true
+   false
+  
+  
+   1
+   18
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   1
+   0
+   95
+   60
+   true
+   false
+  
+ 
+ tdf86219
+ 1241
+ 0
+ 95
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ en
+ US
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   qQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpBNAAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 

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

2016-09-16 Thread Stephan Bergmann
 sc/qa/extras/macros-test.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit cfde3fd966ae9ef35fe685759e7e19bf0b8466ab
Author: Stephan Bergmann 
Date:   Fri Sep 16 18:25:53 2016 +0200

Improve test failure output

Change-Id: Idf3838e1a434b0667e43b1168909e2d3d86cdc43

diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index f07ab31..064dccd 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -330,8 +330,8 @@ void ScMacrosTest::testVba()
 aOutParam);
 OUString aStringRes;
 aRet >>= aStringRes;
-SAL_INFO("sc.qa", "value of Ret " << aStringRes);
-CPPUNIT_ASSERT_MESSAGE( "script reported failure", aStringRes == "OK" 
);
+CPPUNIT_ASSERT_EQUAL_MESSAGE(
+"script reported failure", OUString("OK"), aStringRes);
 pFoundShell->DoClose();
 if ( bWorkbooksHandling )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Stephan Bergmann
 external/python3/ExternalProject_python3.mk |1 
 external/python3/UnpackedTarball_python3.mk |6 +++
 external/python3/internal-zlib.patch.0  |   46 
 3 files changed, 53 insertions(+)

New commits:
commit 5fb8a050210a7cabf49daac0da8f80b94d60de2c
Author: Stephan Bergmann 
Date:   Fri Sep 16 16:07:47 2016 +0200

external/python3: Fix building against external/zlib

...whose (static) library is called "zlib" instead of just "z".

(I ran into this when trying to do a 32-bit Linux build in a 64-bit 
environment,
with only very limited 32-bit support installed in the system.)

Change-Id: I9286975917ddf643a22803561677af035e66fb98
Reviewed-on: https://gerrit.libreoffice.org/28964
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 757d782..ef9246e 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -91,6 +91,7 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
LDFLAGS="$(strip $(LDFLAGS) \
$(if $(SYSTEM_OPENSSL),,-L$(call 
gb_UnpackedTarball_get_dir,openssl)) \
$(if $(SYSTEM_EXPAT),,-L$(gb_StaticLibrary_WORKDIR)) \
+   $(if $(SYSTEM_ZLIB),,-L$(gb_StaticLibrary_WORKDIR)) \
$(if $(SYSBASE), -L$(SYSBASE)/usr/lib) \
$(if $(filter WNT-GCC,$(OS)-$(COM)), -shared-libgcc \
$(if 
$(MINGW_SHARED_GCCLIB),-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2 
-Wl$(COMMA)--export-all-symbols)) \
diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index 0e706d7..0c471f0 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -52,4 +52,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
 endif
 endif
 
+ifneq ($(SYSTEM_ZLIB),TRUE)
+$(eval $(call gb_UnpackedTarball_add_patches,python3, \
+external/python3/internal-zlib.patch.0 \
+))
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/python3/internal-zlib.patch.0 
b/external/python3/internal-zlib.patch.0
new file mode 100644
index 000..d045f46
--- /dev/null
+++ b/external/python3/internal-zlib.patch.0
@@ -0,0 +1,46 @@
+--- configure
 configure
+@@ -11607,13 +11607,13 @@
+   ;;
+ esac
+ 
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
+-$as_echo_n "checking for inflateCopy in -lz... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lzlib" 
>&5
++$as_echo_n "checking for inflateCopy in -lzlib... " >&6; }
+ if ${ac_cv_lib_z_inflateCopy+:} false; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lz  $LIBS"
++LIBS="-lzlib  $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+--- setup.py
 setup.py
+@@ -1379,13 +1379,13 @@
+ version = line.split()[2]
+ break
+ if version >= version_req:
+-if (self.compiler.find_library_file(lib_dirs, 'z')):
++if (self.compiler.find_library_file(lib_dirs, 'zlib')):
+ if host_platform == "darwin":
+ zlib_extra_link_args = ('-Wl,-search_paths_first',)
+ else:
+ zlib_extra_link_args = ()
+ exts.append( Extension('zlib', ['zlibmodule.c'],
+-   libraries = ['z'],
++   libraries = ['zlib'],
+extra_link_args = 
zlib_extra_link_args))
+ have_zlib = True
+ else:
+@@ -1399,7 +1399,7 @@
+ # crc32 if we have it.  Otherwise binascii uses its own.
+ if have_zlib:
+ extra_compile_args = ['-DUSE_ZLIB_CRC32']
+-libraries = ['z']
++libraries = ['zlib']
+ extra_link_args = zlib_extra_link_args
+ else:
+ extra_compile_args = []
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Stephan Bergmann
 external/harfbuzz/UnpackedTarball_harfbuzz.mk |1 +
 external/harfbuzz/no-freetype.patch   |   13 +
 2 files changed, 14 insertions(+)

New commits:
commit ec3fb334b00c1790de2bfff15fe1aa5bec88
Author: Stephan Bergmann 
Date:   Fri Sep 16 16:02:42 2016 +0200

external/harfbuzz: Remove hidden dependency on freetype

In external/harfbuzz/ExternalProject_harfbuzz.mk we are careful to configure
harfbuzz --with-freetype=no, but then harfbuzz goes on to nevertheless link 
some
of its programs against freetype.  However, those all appear to be test 
programs
that we do not otherwise rely on, so just suppress building them in the 
first
place.

(I ran into this when trying to do a 32-bit Linux build in a 64-bit 
environment,
with only very limited 32-bit support installed in the system.)

Change-Id: I1bab2ff4b533e5a30d68d72ec001904cb63f5d94
Reviewed-on: https://gerrit.libreoffice.org/28963
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk 
b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
index 9a5560f..1514fd8 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
 external/harfbuzz/ubsan.patch \
+external/harfbuzz/no-freetype.patch \
 ))
 
 ifneq ($(ENABLE_RUNTIME_OPTIMIZATIONS),TRUE)
diff --git a/external/harfbuzz/no-freetype.patch 
b/external/harfbuzz/no-freetype.patch
new file mode 100644
index 000..32d62e2
--- /dev/null
+++ b/external/harfbuzz/no-freetype.patch
@@ -0,0 +1,13 @@
+--- src/Makefile.in
 src/Makefile.in
+@@ -149,9 +149,7 @@
+ @HAVE_GOBJECT_TRUE@   $(HB_GOBJECT_ENUM_headers) \
+ @HAVE_GOBJECT_TRUE@   $(NULL)
+ 
+-noinst_PROGRAMS = main$(EXEEXT) test$(EXEEXT) \
+-  test-buffer-serialize$(EXEEXT) test-size-params$(EXEEXT) \
+-  test-would-substitute$(EXEEXT) $(am__EXEEXT_1)
++noinst_PROGRAMS = main$(EXEEXT) $(am__EXEEXT_1)
+ bin_PROGRAMS =
+ check_PROGRAMS = test-ot-tag$(EXEEXT) $(am__EXEEXT_1)
+ TESTS = $(am__EXEEXT_2) $(check_PROGRAMS)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Stephan Bergmann
 include/o3tl/typed_flags_set.hxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 43d633d789d817916a11801d0bd3c927a75ac258
Author: Stephan Bergmann 
Date:   Fri Sep 16 17:55:15 2016 +0200

Try silence cid#1371124 ("Operands don't affect result")

...where Coverity doesn't reveal which instantiation of the templated code 
it is
complaining about, but it must be ScRefFlags (sc/inc/address.hxx), which has
underlying type sal_uInt16 and a mask of 0x.

Change-Id: If0abd195885acdffb3c61cdab88d7a2c87c00c4f

diff --git a/include/o3tl/typed_flags_set.hxx b/include/o3tl/typed_flags_set.hxx
index 9b8cb81..e3ca014 100644
--- a/include/o3tl/typed_flags_set.hxx
+++ b/include/o3tl/typed_flags_set.hxx
@@ -79,7 +79,11 @@ struct is_typed_flags {
 {
 #if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
 assert(detail::isNonNegative(value));
-assert((value & ~M) == 0);
+assert(
+static_cast::type>(~M) == 0
+// avoid "operands don't affect result" warnings when M
+// covers all bits of the underlying type
+|| (value & ~M) == 0);
 #endif
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Miklos Vajna
 sd/qa/unit/tiledrendering/tiledrendering.cxx |4 
 sd/source/ui/view/ViewShellBase.cxx  |   11 +++
 2 files changed, 15 insertions(+)

New commits:
commit d53bb5c044f039bd2fd38977a85012b03abbe32c
Author: Miklos Vajna 
Date:   Fri Sep 16 17:15:05 2016 +0200

sd draw text: emit LOK_CALLBACK_VIEW_LOCK from registerCallback()

This is similar to commit 7b784e4e3927d91a96cd0b54fc43c9b488822e47 (sw
draw text: emit LOK_CALLBACK_VIEW_LOCK from registerCallback(),
2016-09-14), but this fix is for Impress.

Change-Id: I995d2ed223aa6ce7845c440039d176b6beada84e

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 67455cf..37d0607 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -1058,7 +1058,11 @@ void SdTiledRenderingTest::testCursorViews()
 // second view as well, even if the second view was created after begin
 // text edit in the first view.
 ViewCallback aView2;
+aView2.m_bViewLock = false;
 
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback,
 &aView2);
+// This failed: the second view didn't get a lock notification, even if the
+// first view already started text edit.
+CPPUNIT_ASSERT(aView2.m_bViewLock);
 SfxLokHelper::setView(nView1);
 aView2.m_bTilesInvalidated = false;
 pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0);
diff --git a/sd/source/ui/view/ViewShellBase.cxx 
b/sd/source/ui/view/ViewShellBase.cxx
index 8513599..f07ba04 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -1059,6 +1059,17 @@ void ViewShellBase::NotifyCursor(SfxViewShell* 
pOtherShell) const
 rEditView.RegisterOtherShell(nullptr);
 // Text selection, if any.
 rEditView.DrawSelection(pOtherShell);
+
+// Shape text lock.
+if (OutlinerView* pOutlinerView = pDrawView->GetTextEditOutlinerView())
+{
+Rectangle aRectangle = pOutlinerView->GetOutputArea();
+vcl::Window* pWin = pThisShell->GetActiveWindow();
+if (pWin && pWin->GetMapMode().GetMapUnit() == MAP_100TH_MM)
+aRectangle = OutputDevice::LogicToLogic(aRectangle, 
MAP_100TH_MM, MAP_TWIP);
+OString sRectangle = aRectangle.toString();
+SfxLokHelper::notifyOtherView(&pDrawViewShell->GetViewShellBase(), 
pOtherShell, LOK_CALLBACK_VIEW_LOCK, "rectangle", sRectangle);
+}
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Winfried Donkers
 sc/source/core/tool/interpr3.cxx |   25 +
 1 file changed, 5 insertions(+), 20 deletions(-)

New commits:
commit 46f09cb1252078ef23ed93a3551acbdcca9d31cd
Author: Winfried Donkers 
Date:   Fri Sep 2 11:03:11 2016 +0200

tdf#101855 BETA.DIST: apply same constraints as Excel does.

Change-Id: I617146665e72286aef3de35b859ca2e52d039bd8
Reviewed-on: https://gerrit.libreoffice.org/28612
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 9a89993..5d51bad 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -1079,10 +1079,10 @@ void ScInterpreter::ScBetaDist()
 }
 
 /**
-  fdo#71008
   Microsoft version has parameters in different order
   Also, upper and lowerbound are optional and have default values
-  otherwise, function is identical with ScInterpreter::ScBetaDist()
+  and different constraints apply.
+  Basically, function is identical with ScInterpreter::ScBetaDist()
 */
 void ScInterpreter::ScBetaDist_MS()
 {
@@ -1096,7 +1096,7 @@ void ScInterpreter::ScBetaDist_MS()
 fUpperBound = GetDouble();
 else
 fUpperBound = 1.0;
-if (nParamCount >= 4)
+if (nParamCount >= 5)
 fLowerBound = GetDouble();
 else
 fLowerBound = 0.0;
@@ -1104,35 +1104,20 @@ void ScInterpreter::ScBetaDist_MS()
 beta = GetDouble();
 alpha = GetDouble();
 x = GetDouble();
-double fScale = fUpperBound - fLowerBound;
-if (fScale <= 0.0 || alpha <= 0.0 || beta <= 0.0)
+if (alpha <= 0.0 || beta <= 0.0 || x < fLowerBound || x > fUpperBound)
 {
 PushIllegalArgument();
 return;
 }
+double fScale = fUpperBound - fLowerBound;
 if (bIsCumulative) // cumulative distribution function
 {
-// special cases
-if (x < fLowerBound)
-{
-PushDouble(0.0); return; //see spec
-}
-if (x > fUpperBound)
-{
-PushDouble(1.0); return; //see spec
-}
-// normal cases
 x = (x-fLowerBound)/fScale;  // convert to standard form
 PushDouble(GetBetaDist(x, alpha, beta));
 return;
 }
 else // probability density function
 {
-if (x < fLowerBound || x > fUpperBound)
-{
-PushDouble(0.0);
-return;
-}
 x = (x-fLowerBound)/fScale;
 PushDouble(GetBetaDistPDF(x, alpha, beta)/fScale);
 return;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loolwsd/LOOLSession.cpp loolwsd/LOOLSession.hpp

2016-09-16 Thread Tor Lillqvist
 loolwsd/LOOLSession.cpp |2 +-
 loolwsd/LOOLSession.hpp |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 20d6acae29fd9685e58952e2597834a27e9cb9cc
Author: Tor Lillqvist 
Date:   Fri Sep 16 15:57:36 2016 +0300

Return true in LOOLSession::forwardToPeer() when peer is closing

Fixes the testEditAnnotationWriter unit test, and doesn't break any
other ones. Many other tests do fail, but they fail also without this
change.

diff --git a/loolwsd/LOOLSession.hpp b/loolwsd/LOOLSession.hpp
index 4c7c485..79b4e1a 100644
--- a/loolwsd/LOOLSession.hpp
+++ b/loolwsd/LOOLSession.hpp
@@ -108,13 +108,13 @@ protected:
 else if (peer->isCloseFrame())
 {
 Log::trace(getName() + ": peer began the closing handshake. 
Dropping forward message [" + message + "].");
-return false;
+return true;
 }
 else if (peer->isHeadless())
 {
 // Fail silently and return as there is no actual websocket
 // connection in this case.
-Log::info(getName() + ": Ignoring forward message due to peer 
being headless");
+Log::info(getName() + ": Headless peer, not forwarding message [" 
+ message + "].");
 return true;
 }
 
commit fbd738c32adf12274e2562dfffbfb41a6a6b0b4e
Author: Tor Lillqvist 
Date:   Fri Sep 16 13:16:49 2016 +0300

One more

diff --git a/loolwsd/LOOLSession.cpp b/loolwsd/LOOLSession.cpp
index f9510f1..6b37618 100644
--- a/loolwsd/LOOLSession.cpp
+++ b/loolwsd/LOOLSession.cpp
@@ -218,7 +218,7 @@ bool LOOLSession::handleInput(const char *buffer, int 
length)
 const auto summary = getAbbreviatedMessage(buffer, length);
 try
 {
-Log::trace(getName() + " Recv: " + summary);
+Log::trace(getName() + ": Recv: " + summary);
 if (TerminationFlag)
 {
 Log::warn("Input while terminating: [" + summary + "].");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread sll
 sc/source/ui/navipi/navipi.cxx |   28 ++--
 1 file changed, 22 insertions(+), 6 deletions(-)

New commits:
commit 1eebbd48fabbefaa52f5f223649c8d591915a884
Author: sll 
Date:   Tue Sep 6 18:18:02 2016 +0200

tdf#98493 UI : "SCENARIO SELECTION IN NAVIGATOR (sheet group)"

Change-Id: I71071ba71ce05487273ce66e64f930cd2ec7b8d0
Reviewed-on: https://gerrit.libreoffice.org/28697
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 10573c1..73ee425 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -955,16 +955,32 @@ void ScNavigatorDlg::SetCurrentTableStr( const OUString& 
rName )
 if (!GetViewData()) return;
 
 ScDocument* pDoc = pViewData->GetDocument();
-SCTAB nCount = pDoc->GetTableCount();
+SCTAB nCount = pDoc->GetTableCount();
 OUString aTabName;
+SCTAB nLastSheet = 0;
 
-for ( SCTAB i=0; iGetName( i, aTabName );
-if ( aTabName.equals(rName) )
+pDoc->GetName(i, aTabName);
+if (aTabName.equals(rName))
 {
-SetCurrentTable( i );
-return;
+// Check if this is a Scenario sheet and if so select the sheet
+// where it belongs to, which is the previous non-Scenario sheet.
+if (pDoc->IsScenario(i))
+{
+SetCurrentTable(nLastSheet);
+return;
+}
+else
+{
+SetCurrentTable(i);
+return;
+}
+}
+else
+{
+if (!pDoc->IsScenario(i))
+nLastSheet = i;
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Eike Rathke
 include/formula/errorcodes.hxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 9c4fb18ba92265910d9c837d83c28926242b7915
Author: Eike Rathke 
Date:   Tue Sep 13 15:26:09 2016 +0200

recognize NaN with no bits set in lower word as error

Which can happen for example for -nan(0x8) as a result of
calculating with -inf. This was displayed as NaN instead of a proper error
value, now #NUM!

Example test case:
=FORECAST.ETS.ADD(50, {-1,-2,-3,-4}, {10,20,30,40})

Change-Id: I1e1d95e1f188e0036b72be37dd20039c9a9a13f6
(cherry picked from commit 4ef10fce39575ec0bd3793b5fdf731c0b9af25a3)
Reviewed-on: https://gerrit.libreoffice.org/28867
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit ca19404c254c306d31a332958da5dde5d69a8d20)
Reviewed-on: https://gerrit.libreoffice.org/28876
Reviewed-by: Markus Mohrhard 
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/include/formula/errorcodes.hxx b/include/formula/errorcodes.hxx
index 13597b9..173c744 100644
--- a/include/formula/errorcodes.hxx
+++ b/include/formula/errorcodes.hxx
@@ -103,11 +103,14 @@ inline sal_uInt16 GetDoubleErrorValue( double fVal )
 return 0;
 if ( ::rtl::math::isInf( fVal ) )
 return errIllegalFPOperation;   // normal INF
-sal_uInt32 nErr = reinterpret_cast< sal_math_Double * >(
-&fVal)->nan_parts.fraction_lo;
+sal_uInt32 nErr = reinterpret_cast< sal_math_Double * >( 
&fVal)->nan_parts.fraction_lo;
 if ( nErr & 0x )
 return errNoValue;  // just a normal NAN
-return (sal_uInt16)(nErr & 0x); // any other error
+if (!nErr)
+// Another NAN, e.g. -nan(0x8) from calculating with -inf
+return errIllegalFPOperation;
+// Any other error known to us as error code.
+return (sal_uInt16)(nErr & 0x);
 }
 
 } // namespace formula
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Noel Grandin
 sw/inc/iodetect.hxx  |   26 +-
 sw/source/filter/basflt/fltini.cxx   |   32 +---
 sw/source/filter/basflt/iodetect.cxx |8 +---
 3 files changed, 31 insertions(+), 35 deletions(-)

New commits:
commit d9cff00683d31fbd4b3c4c2d6afbe164f4a85d47
Author: Noel Grandin 
Date:   Fri Sep 16 16:11:43 2016 +0200

Revert "convert ReaderWriterEnum to scoped enum"

It causes breakage on some gcc's with "default constructor could be not
generated" message.
Will attempt to re-land later.

This reverts commit 6da5ed6d7cea0917047dca92a9e32a7eb5e85ad6.

diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
index 33673cc..91ee8ae 100644
--- a/sw/inc/iodetect.hxx
+++ b/sw/inc/iodetect.hxx
@@ -58,21 +58,21 @@ struct SwIoDetect
 }
 };
 
-enum class ReaderWriterType {
-Rtf,
-Bas,
-Ww6,
-Ww8,
-RtfWh,
-Html,
-Ww5,
-Xml,
-TextDlg,
-Text,
-LAST = Text
+enum ReaderWriterEnum {
+READER_WRITER_RTF,
+READER_WRITER_BAS,
+READER_WRITER_WW6,
+READER_WRITER_WW8,
+READER_WRITER_RTF_WH,
+READER_WRITER_HTML,
+READER_WRITER_WW5,
+READER_WRITER_XML,
+READER_WRITER_TEXT_DLG,
+READER_WRITER_TEXT,
+MAXFILTER
 };
 
-SwIoDetect& GetSwIoDetect(ReaderWriterType);
+extern SwIoDetect aFilterDetect[];
 
 /** The following class is a wrapper for basic i/o functions of Writer 3.0.
  Everything is static. All filter names mentioned are Writer-internal
diff --git a/sw/source/filter/basflt/fltini.cxx 
b/sw/source/filter/basflt/fltini.cxx
index 8534eac..071751b 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -57,8 +57,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 
 using namespace utl;
 using namespace com::sun::star::uno;
@@ -70,8 +68,8 @@ Reader* GetRTFReader();
 Reader* GetWW8Reader();
 
 // Note: if editing, please don't forget to modify also the enum
-// ReaderWriterType and aFilterDetect in iodetect.cxx
-o3tl::enumarray aReaderWriter =
+// ReaderWriterEnum and aFilterDetect in shellio.hxx
+SwReaderWriterEntry aReaderWriter[] =
 {
 SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter,  true  ),
 SwReaderWriterEntry( nullptr,   &::GetASCWriter,  false ),
@@ -110,16 +108,20 @@ SwRead SwGetReaderXML() // SW_DLLPUBLIC
 return ReadXML;
 }
 
+inline void SetFltPtr( sal_uInt16 rPos, SwRead pReader )
+{
+aReaderWriter[ rPos ].pReader = pReader;
+}
 
 namespace sw {
 
 Filters::Filters()
 {
-aReaderWriter[ ReaderWriterType::Bas ].pReader =  ReadAscii = new 
AsciiReader;
-aReaderWriter[ ReaderWriterType::Html ].pReader = ReadHTML = new 
HTMLReader;
-aReaderWriter[ ReaderWriterType::Xml ].pReader =  ReadXML = new XMLReader;
-aReaderWriter[ ReaderWriterType::TextDlg ].pReader = ReadAscii;
-aReaderWriter[ ReaderWriterType::Text ].pReader = ReadAscii;
+SetFltPtr( READER_WRITER_BAS, (ReadAscii = new AsciiReader) );
+SetFltPtr( READER_WRITER_HTML, (ReadHTML = new HTMLReader) );
+SetFltPtr( READER_WRITER_XML, (ReadXML = new XMLReader)  );
+SetFltPtr( READER_WRITER_TEXT_DLG, ReadAscii );
+SetFltPtr( READER_WRITER_TEXT, ReadAscii );
 }
 
 Filters::~Filters()
@@ -159,15 +161,15 @@ namespace SwReaderWriter {
 
 Reader* GetRtfReader()
 {
-return aReaderWriter[ReaderWriterType::Rtf].GetReader();
+return aReaderWriter[READER_WRITER_RTF].GetReader();
 }
 
 void GetWriter( const OUString& rFltName, const OUString& rBaseURL, WriterRef& 
xRet )
 {
-for( ReaderWriterType aType : o3tl::enumrange() )
-if ( GetSwIoDetect(aType).IsFilter( rFltName ) )
+for( int n = 0; n < MAXFILTER; ++n )
+if ( aFilterDetect[n].IsFilter( rFltName ) )
 {
-aReaderWriter[aType].GetWriter( rFltName, rBaseURL, xRet );
+aReaderWriter[n].GetWriter( rFltName, rBaseURL, xRet );
 break;
 }
 }
@@ -175,9 +177,9 @@ void GetWriter( const OUString& rFltName, const OUString& 
rBaseURL, WriterRef& x
 SwRead GetReader( const OUString& rFltName )
 {
 SwRead pRead = nullptr;
-for( ReaderWriterType n : o3tl::enumrange() )
+for( int n = 0; n < MAXFILTER; ++n )
 {
-if ( GetSwIoDetect(n).IsFilter( rFltName ) )
+if ( aFilterDetect[n].IsFilter( rFltName ) )
 {
 pRead = aReaderWriter[n].GetReader();
 // add special treatment for some readers
diff --git a/sw/source/filter/basflt/iodetect.cxx 
b/sw/source/filter/basflt/iodetect.cxx
index 2fc3c09..5b6e92f 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 
 
 using namespace ::com::sun::star;
@@ -34,7 +33,7 @@ static bool IsDocShellRegistered()
 return SvtModuleOptions().IsWriter();
 }
 
-o3tl::enumarray aFilterDetect =
+SwIoDetect aFilterDetect[] =
 {
 SwIoDetect( FILTER_RTF ),
 SwIoDetect( FILTER_

Modifying gb_C(XX)FLAGS in solenv/gbuild/LINUX_*_GCC.mk?

2016-09-16 Thread Stephan Bergmann
Various of the solenv/gbuild/LINUX_*_GCC.mk (namely ARM, AXP, M86K, 
POWERPC64, S390, S390X) have lines


  gb_CFLAGS += ...
  gb_CXXFLAGS += ...

to add additional flags before including linux.mk.  However, these 
additions appear to not be effective, as unxgcc.mk (included from 
linux.mk) unconditionally resets those variables via


  gb_CFLAGS := ...
  gb_CXXFLAGS := ...

(Also, moving the additions in the LINUX_*_GCC.mk files after including 
linux.mk wouldn't appear to help, either, as the ultimate use of these 
two variables is in


  gb_LinkTarget_CFLAGS := $(gb_CFLAGS)
  gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)

in unxgcc.mk, so the latter variables would still not get the additions. 
 The only correct way appears to be to have


  gb_LinkTarget_CFLAGS += ...
  gb_LinkTarget_CXXFLAGS += ...

in the LINUX_*_GCC.mk files after including linux.mk.  Similar problems 
may be present in other $(OS)_$(CPUNAME)_$(COM) files, too)


Or what am I missing?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Minutes of the Design Hangout: 2016-Sep-16

2016-09-16 Thread Heiko Tietze
Present: Jay, Tomaz, Anxhelo, Heiko, Samuel, Kendy (joined late)

Welcome Anxhelo!

Tasks
(mostly in preparation for the next GSoC)

* Create a "Get Involved" page- temporarily host in another page, later on 
we`ll find a solution for it
  => Anxhelo will do as a new user
  + go over ideas for GSoC - 
https://wiki.documentfoundation.org/Development/GSoC/Ideas#User_Interface
  
* Extended Toolbar (Heiko)
  + Naming convention
+ possibilities: Extended Toolbar, Advanced Toolbar, AdvancedBar, LibreBar, 
MUFFIN, ROBBIN
  + Activation (tdf#102070, tdf#101249, tdf#91441)
+ Do not put this feature into front (e.g. big red button)
+ Make it just another toolbar (no triple setting)
  + Implementation
+ Do not publish the feature unless it's polished (experimental feature)

* Custom Shapes
  + Edit Custom Shapes dialog (tdf#101862)
  + Add Custom Shapes
+ e.g. Coil (tdf#50998)
* Draw
  + Auto format of (block) diagrams
  + 3D dialog (tdf#53866)
  + SmartArt (tdf#37932, tdf#92902)
  => Low priority

* Rework of existing/add new dialogs
  + HIG: Alignment of labels and controls in dialogs 
+ UX should go over all dialogs when the standard has been defined (Jay)
+ https://bugs.documentfoundation.org/show_bug.cgi?id=99104
  + Checking accessibility (ongoing work => Jay)
  
  + Hyperlink dialog (tdf#90679)
  + Dialog for block arcs (tdf#100596)
  + Improvements to options dialog (tdf#101609)
  + Bibliography (tdf#101258)
  + Load Styles (tdf#102002)
  
* Simple conversion of measurement units (tdf#72662)
* High precise object position (tdf#44267)
  + Widget: Numerical input including unit conversation and arbitrary precision 
(tdf#44267)
  
* Navigator
  + Ticket already created for Draw (Jay)
  + Have a design session with devs

* LibreOffice Addition
  + http://pad.documentfoundation.org/p/UX-GHNS
  + Refine the idea and present in a blog post (Heiko)
  + First improve the backend situation (Kendy)

* Enabling activation of extra large 32px icons (Jay)
  + https://bugs.documentfoundation.org/show_bug.cgi?id=95014
  + All Breeze icons have been done
  + Need dev to do the necessary to enable to option in the options dialog
  => Add code pointer (Samuel)  
 
* Handling of wrapping of images/object in Writer (Cor)
  + easy or/preferred use
  + competitive analysis
  + compatibility...
  => Start with a survey (Jay), AI: Heiko
  
UX stats
  * Sep-16
+ needsUXAdvice of 2016-Sep-08: Total 495 (-23)
Base 0
Calc13
Draw64
Extensions   1
filters and storage  1
framework3
Impress 10
Installation 1
LibreOffice350
Localization 0
UI  13
Writer  39
 
Events
* Oct-29
  + Ladies in FOSS https://wikimedia.de/wiki/Ladies_that_FOSS



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


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

2016-09-16 Thread Noel Grandin
 sw/inc/iodetect.hxx  |   26 +-
 sw/source/filter/basflt/fltini.cxx   |   32 +++-
 sw/source/filter/basflt/iodetect.cxx |8 +++-
 3 files changed, 35 insertions(+), 31 deletions(-)

New commits:
commit 6da5ed6d7cea0917047dca92a9e32a7eb5e85ad6
Author: Noel Grandin 
Date:   Fri Sep 16 14:52:29 2016 +0200

convert ReaderWriterEnum to scoped enum

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

diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
index 91ee8ae..33673cc 100644
--- a/sw/inc/iodetect.hxx
+++ b/sw/inc/iodetect.hxx
@@ -58,21 +58,21 @@ struct SwIoDetect
 }
 };
 
-enum ReaderWriterEnum {
-READER_WRITER_RTF,
-READER_WRITER_BAS,
-READER_WRITER_WW6,
-READER_WRITER_WW8,
-READER_WRITER_RTF_WH,
-READER_WRITER_HTML,
-READER_WRITER_WW5,
-READER_WRITER_XML,
-READER_WRITER_TEXT_DLG,
-READER_WRITER_TEXT,
-MAXFILTER
+enum class ReaderWriterType {
+Rtf,
+Bas,
+Ww6,
+Ww8,
+RtfWh,
+Html,
+Ww5,
+Xml,
+TextDlg,
+Text,
+LAST = Text
 };
 
-extern SwIoDetect aFilterDetect[];
+SwIoDetect& GetSwIoDetect(ReaderWriterType);
 
 /** The following class is a wrapper for basic i/o functions of Writer 3.0.
  Everything is static. All filter names mentioned are Writer-internal
diff --git a/sw/source/filter/basflt/fltini.cxx 
b/sw/source/filter/basflt/fltini.cxx
index 071751b..8534eac 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -57,6 +57,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace utl;
 using namespace com::sun::star::uno;
@@ -68,8 +70,8 @@ Reader* GetRTFReader();
 Reader* GetWW8Reader();
 
 // Note: if editing, please don't forget to modify also the enum
-// ReaderWriterEnum and aFilterDetect in shellio.hxx
-SwReaderWriterEntry aReaderWriter[] =
+// ReaderWriterType and aFilterDetect in iodetect.cxx
+o3tl::enumarray aReaderWriter =
 {
 SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter,  true  ),
 SwReaderWriterEntry( nullptr,   &::GetASCWriter,  false ),
@@ -108,20 +110,16 @@ SwRead SwGetReaderXML() // SW_DLLPUBLIC
 return ReadXML;
 }
 
-inline void SetFltPtr( sal_uInt16 rPos, SwRead pReader )
-{
-aReaderWriter[ rPos ].pReader = pReader;
-}
 
 namespace sw {
 
 Filters::Filters()
 {
-SetFltPtr( READER_WRITER_BAS, (ReadAscii = new AsciiReader) );
-SetFltPtr( READER_WRITER_HTML, (ReadHTML = new HTMLReader) );
-SetFltPtr( READER_WRITER_XML, (ReadXML = new XMLReader)  );
-SetFltPtr( READER_WRITER_TEXT_DLG, ReadAscii );
-SetFltPtr( READER_WRITER_TEXT, ReadAscii );
+aReaderWriter[ ReaderWriterType::Bas ].pReader =  ReadAscii = new 
AsciiReader;
+aReaderWriter[ ReaderWriterType::Html ].pReader = ReadHTML = new 
HTMLReader;
+aReaderWriter[ ReaderWriterType::Xml ].pReader =  ReadXML = new XMLReader;
+aReaderWriter[ ReaderWriterType::TextDlg ].pReader = ReadAscii;
+aReaderWriter[ ReaderWriterType::Text ].pReader = ReadAscii;
 }
 
 Filters::~Filters()
@@ -161,15 +159,15 @@ namespace SwReaderWriter {
 
 Reader* GetRtfReader()
 {
-return aReaderWriter[READER_WRITER_RTF].GetReader();
+return aReaderWriter[ReaderWriterType::Rtf].GetReader();
 }
 
 void GetWriter( const OUString& rFltName, const OUString& rBaseURL, WriterRef& 
xRet )
 {
-for( int n = 0; n < MAXFILTER; ++n )
-if ( aFilterDetect[n].IsFilter( rFltName ) )
+for( ReaderWriterType aType : o3tl::enumrange() )
+if ( GetSwIoDetect(aType).IsFilter( rFltName ) )
 {
-aReaderWriter[n].GetWriter( rFltName, rBaseURL, xRet );
+aReaderWriter[aType].GetWriter( rFltName, rBaseURL, xRet );
 break;
 }
 }
@@ -177,9 +175,9 @@ void GetWriter( const OUString& rFltName, const OUString& 
rBaseURL, WriterRef& x
 SwRead GetReader( const OUString& rFltName )
 {
 SwRead pRead = nullptr;
-for( int n = 0; n < MAXFILTER; ++n )
+for( ReaderWriterType n : o3tl::enumrange() )
 {
-if ( aFilterDetect[n].IsFilter( rFltName ) )
+if ( GetSwIoDetect(n).IsFilter( rFltName ) )
 {
 pRead = aReaderWriter[n].GetReader();
 // add special treatment for some readers
diff --git a/sw/source/filter/basflt/iodetect.cxx 
b/sw/source/filter/basflt/iodetect.cxx
index 5b6e92f..2fc3c09 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 using namespace ::com::sun::star;
@@ -33,7 +34,7 @@ static bool IsDocShellRegistered()
 return SvtModuleOptions().IsWriter();
 }
 
-SwIoDetect aFilterDetect[] =
+o3tl::enumarray aFilterDetect =
 {
 SwIoDetect( FILTER_RTF ),
 SwIoDetect( FILTER_BAS ),
@@ -47,6 +48,11 @@ SwIoDetect aFilter

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

2016-09-16 Thread Stephan Bergmann
 include/editeng/outliner.hxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 1ba11723b89497f045cc10d548eb4228986af608
Author: Stephan Bergmann 
Date:   Fri Sep 16 15:23:09 2016 +0200

Missing include

Change-Id: Ia4b86b8a6c8cc5ae87284080a31f8ddf9d99455d

diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index a0eef10..a9e8e3b 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -39,6 +39,8 @@
 #include 
 
 #include 
+
+#include 
 #include 
 
 class OutlinerEditEng;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Stephan Bergmann
 binaryurp/source/incomingrequest.cxx  |   51 +-
 binaryurp/source/outgoingrequests.cxx |6 ++--
 binaryurp/source/writer.cxx   |   45 --
 3 files changed, 54 insertions(+), 48 deletions(-)

New commits:
commit 0ba00ee1a2e4e711aca31cda7b1d8ef7a33c95b4
Author: Stephan Bergmann 
Date:   Fri Sep 16 15:17:37 2016 +0200

Replace remaining OSL_ASSERT etc. in binaryurp

Change-Id: I6f013cacbefe9c681baa3e91f73f4fc05c99ba78

diff --git a/binaryurp/source/incomingrequest.cxx 
b/binaryurp/source/incomingrequest.cxx
index 2413b68..cf66f9c 100644
--- a/binaryurp/source/incomingrequest.cxx
+++ b/binaryurp/source/incomingrequest.cxx
@@ -19,6 +19,7 @@
 
 #include "sal/config.h"
 
+#include 
 #include 
 #include 
 
@@ -27,6 +28,7 @@
 #include "rtl/byteseq.hxx"
 #include "rtl/ref.hxx"
 #include "rtl/ustring.hxx"
+#include "sal/log.hxx"
 #include "sal/types.h"
 #include "typelib/typedescription.hxx"
 #include "uno/dispatcher.hxx"
@@ -51,7 +53,9 @@ IncomingRequest::IncomingRequest(
 setter_(setter), inArguments_(inArguments),
 currentContextMode_(currentContextMode), currentContext_(currentContext)
 {
-OSL_ASSERT(bridge.is() && member.is() && member.get()->bComplete);
+assert(bridge.is());
+assert(member.is());
+assert(member.get()->bComplete);
 }
 
 IncomingRequest::~IncomingRequest() {}
@@ -98,17 +102,14 @@ void IncomingRequest::execute() const {
 tid_, member_, setter_, isExc, ret, outArgs, false);
 return;
 } catch (const css::uno::RuntimeException & e) {
-OSL_TRACE(
-"caught UNO runtime exception '%s'",
-(OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).
- getStr()));
+SAL_INFO("binaryurp", "caught UNO runtime exception " << 
e.Message);
 } catch (const std::exception & e) {
-OSL_TRACE("caught C++ exception '%s'", e.what());
+SAL_INFO("binaryurp", "caught C++ exception " << e.what());
 }
 bridge_->terminate(false);
 } else {
 if (isExc) {
-OSL_TRACE("oneway method raised exception");
+SAL_INFO("binaryurp", "oneway method raised exception");
 }
 bridge_->decrementCalls();
 }
@@ -122,15 +123,16 @@ static size_t size_t_round(size_t val)
 bool IncomingRequest::execute_throw(
 BinaryAny * returnValue, std::vector< BinaryAny > * outArguments) const
 {
-OSL_ASSERT(
-returnValue != nullptr &&
+assert(returnValue != nullptr);
+assert(
 returnValue->getType().equals(
-css::uno::TypeDescription(cppu::UnoType::get())) &&
-outArguments != nullptr && outArguments->empty());
+css::uno::TypeDescription(cppu::UnoType::get(;
+assert(outArguments != nullptr);
+assert(outArguments->empty());
 bool isExc = false;
 switch (functionId_) {
 case SPECIAL_FUNCTION_ID_RESERVED:
-OSL_ASSERT(false); // this cannot happen
+assert(false); // this cannot happen
 break;
 case SPECIAL_FUNCTION_ID_RELEASE:
 bridge_->releaseStub(oid_, type_);
@@ -144,11 +146,10 @@ bool IncomingRequest::execute_throw(
 try {
 ifc = prov->getInstance(oid_);
 } catch (const css::container::NoSuchElementException & e) {
-OSL_TRACE(
-"initial element '%s': NoSuchElementException '%s'",
-OUStringToOString(oid_, 
RTL_TEXTENCODING_UTF8).getStr(),
-(OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).
- getStr()));
+SAL_INFO(
+"binaryurp",
+"initial element " << oid_
+<< ": NoSuchElementException " << e.Message);
 }
 }
 if (ifc.is()) {
@@ -174,7 +175,7 @@ bool IncomingRequest::execute_throw(
 SAL_FALLTHROUGH;
 default:
 {
-OSL_ASSERT(object_.is());
+assert(object_.is());
 css::uno::TypeDescription retType;
 std::list< std::vector< char > > outBufs;
 std::vector< void * > args;
@@ -187,10 +188,10 @@ bool IncomingRequest::execute_throw(
 member_.get())->
 pAttributeTypeRef);
 if (setter_) {
-OSL_ASSERT(inArguments_.size() == 1);
+assert(inArguments_.size() == 1);
 args.push_back(inArguments_[0].getValue(t));
 } else {
-OSL_ASSERT(inArguments_.empty());
+assert(inArguments_.empty());
 retType = t;
 }
 break;
@@ -223,11 +224,11 @@ bool IncomingRequest::execute_throw(
 o

[Libreoffice-commits] core.git: Branch 'distro/collabora/lov-5.2' - 6 commits - avmedia/Module_avmedia.mk configure.ac external/firebird external/python3 postprocess/Rdb_services.mk vcl/osx

2016-09-16 Thread Tor Lillqvist
 avmedia/Module_avmedia.mk |2 ++
 configure.ac  |   19 ++-
 external/firebird/ExternalProject_firebird.mk |5 +
 external/python3/ExternalProject_python3.mk   |6 ++
 postprocess/Rdb_services.mk   |4 +++-
 vcl/osx/PictToBmpFlt.cxx  |1 -
 6 files changed, 30 insertions(+), 7 deletions(-)

New commits:
commit e145cf15d1b452e575867b990095d176cf53383c
Author: Tor Lillqvist 
Date:   Fri Sep 16 10:28:07 2016 +0300

Bump version to 5.2.1.4

Change-Id: If89d9d2bc5c92506a32254a107da33a70659061a

diff --git a/configure.ac b/configure.ac
index 96dcd7e..7c4c4d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice Vanilla],[5.2.1.3],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice Vanilla],[5.2.1.4],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit c1c3fe67e7e2c878c57aff12240e6ea4814c6f76
Author: Tor Lillqvist 
Date:   Thu Aug 4 23:29:12 2016 +0300

No QuickTime in the 10.12 SDK

Finally. It has been documented as deprecated for years, after all.

Change-Id: Ia7f81639b2e0b313e0a8931f49c3902c5856339d

diff --git a/avmedia/Module_avmedia.mk b/avmedia/Module_avmedia.mk
index fb9497d..a037b4d 100644
--- a/avmedia/Module_avmedia.mk
+++ b/avmedia/Module_avmedia.mk
@@ -37,11 +37,13 @@ endif
 
 ifeq ($(OS),MACOSX)
 ifneq ($(ENABLE_MACOSX_SANDBOX),TRUE)
+ifneq ($(filter 1080 1090 101000 101100,$(MACOSX_SDK_VERSION)),)
 $(eval $(call gb_Module_add_targets,avmedia,\
Library_avmediaQuickTime \
 ))
 endif
 endif
+endif
 
 ifeq ($(OS),MACOSX)
 $(eval $(call gb_Module_add_targets,avmedia,\
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index 775022a..f56e55b 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -127,7 +127,9 @@ $(eval $(call gb_Rdb_add_components,services,\
$(if $(filter MACOSX,$(OS)), \
$(call 
gb_Helper_optional,AVMEDIA,avmedia/source/macavf/avmediaMacAVF) \
$(if $(filter TRUE,$(ENABLE_MACOSX_SANDBOX)),, \
-   $(call 
gb_Helper_optional,AVMEDIA,avmedia/source/quicktime/avmediaQuickTime) \
+   $(if $(filter 1080 1090 101000 
101100,$(MACOSX_SDK_VERSION)), \
+   $(call 
gb_Helper_optional,AVMEDIA,avmedia/source/quicktime/avmediaQuickTime) \
+   ) \
) \
lingucomponent/source/spellcheck/macosxspell/MacOSXSpell \
fpicker/source/aqua/fps_aqua \
commit feedb662d800373fcf6163e245293272bfea0a34
Author: Tor Lillqvist 
Date:   Thu Aug 4 23:24:12 2016 +0300

Drop unneeded include

There is no  in the 10.12 SDK anyway.

Change-Id: I0d937d4b036d118fcb503543a516e55f859a3718

diff --git a/vcl/osx/PictToBmpFlt.cxx b/vcl/osx/PictToBmpFlt.cxx
index af8740b..153c036 100644
--- a/vcl/osx/PictToBmpFlt.cxx
+++ b/vcl/osx/PictToBmpFlt.cxx
@@ -19,7 +19,6 @@
 
 #include 
 #include 
-#include 
 #include 
 
 #include 
commit ae4544ee0d0e5eec8c868d6d9c9b4ad20468facf
Author: Stephan Bergmann 
Date:   Wed Sep 14 16:18:49 2016 +0200

external/firebird: Hack around detection of clock_gettime on Mac OS X

...where the 10.12 SDK includes clock_gettime, marked as

  __attribute__((availability(macosx,introduced=10.12)))

in time.h.  However, the way firebird's configure checks for it, it gets
detected as available regardless of the used -mmacosx-version-min value (and
even if the configure check would go via the time.h header, the availability
attribute would only cause a -Wpartial-availability warning, not an error, 
so
we'd need to pass CFLAGS=-Werror=partial-availability into firebird's
configure.)

Change-Id: I67e12743e1df0574e7fc4b2121add9fe1fb7677b

diff --git a/external/firebird/ExternalProject_firebird.mk 
b/external/firebird/ExternalProject_firebird.mk
index cd89dfb..6187985 100644
--- a/external/firebird/ExternalProject_firebird.mk
+++ b/external/firebird/ExternalProject_firebird.mk
@@ -70,6 +70,11 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
, \
--enable-shared --disable-static \
) \
+   $(if $(filter MACOSX,$(OS)), \
+   $(if $(filter 1, \
+   $(shell expr 
'$(MAC_OS_X_VERSION_MIN_REQUIRED)' \
+   '<' 101200)), \
+   ac_cv_func_clock_gettime=no)) \
&& if [ -n "$${FB_CPU_ARG}" ]; then \
   $(MAKE_P

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

2016-09-16 Thread Gabor Kelemen
 sfx2/classification/example.xml |   13 +
 1 file changed, 13 insertions(+)

New commits:
commit e488d3c9527e0e7cfd3dd56479db4ed6d4035ea3
Author: Gabor Kelemen 
Date:   Fri Sep 16 12:20:53 2016 +0200

tdf#101088 Add comments about translatable elements of classification

Make it obvious which parts are translatable to avoid overtranslation

Change-Id: Ic2772f6d4c394189b6fa089906985a7fdae75b26
Reviewed-on: https://gerrit.libreoffice.org/28945
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/sfx2/classification/example.xml b/sfx2/classification/example.xml
index 053caeb..f2647f9 100644
--- a/sfx2/classification/example.xml
+++ b/sfx2/classification/example.xml
@@ -1,11 +1,14 @@
 
 
+
 TSCP Example Policy 
Authority
+
 TSCP Example Policy
 
 urn:example:tscp:1
 
 
+
 
 
 
@@ -13,10 +16,12 @@
 0
 
 
+
 
 
 
 Document: Header
+
 Classification: General Business
 
 
@@ -25,18 +30,22 @@
 1
 
 
+
 
 
 
 Document: Header
+
 Classification: Confidential
 
 
 Document: Footer
+
 This content is marked Confidential. Do not 
distribute it externally without business approval.
 
 
 Document: Watermark
+
 Confidential
 
 
@@ -45,18 +54,22 @@
 2
 
 
+
 
 
 
 Document: Header
+
 Classification: Internal Only
 
 
 Document: Footer
+
 This content is marked Internal Only. Do not 
distribute it outside of the business.
 
 
 Document: Watermark
+
 Internal Only
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread László Németh
 extras/source/autocorr/emoji/emoji.ulf |   24 ++---
 extras/source/autocorr/lang/bg/DocumentList.xml|   24 -
 extras/source/autocorr/lang/ca/DocumentList.xml|   24 -
 extras/source/autocorr/lang/cs/DocumentList.xml|   24 -
 extras/source/autocorr/lang/da/DocumentList.xml|   24 -
 extras/source/autocorr/lang/en-AU/DocumentList.xml |   24 -
 extras/source/autocorr/lang/en-GB/DocumentList.xml |   24 -
 extras/source/autocorr/lang/en-US/DocumentList.xml |   24 -
 extras/source/autocorr/lang/es/DocumentList.xml|   24 -
 extras/source/autocorr/lang/fi/DocumentList.xml|   24 -
 extras/source/autocorr/lang/fr/DocumentList.xml|   24 -
 extras/source/autocorr/lang/hr/DocumentList.xml|   12 --
 extras/source/autocorr/lang/hu/DocumentList.xml|   24 -
 extras/source/autocorr/lang/is/DocumentList.xml|   24 -
 extras/source/autocorr/lang/it/DocumentList.xml|   24 -
 extras/source/autocorr/lang/ja/DocumentList.xml|   24 -
 extras/source/autocorr/lang/ko/DocumentList.xml|   24 -
 extras/source/autocorr/lang/lt/DocumentList.xml|   24 -
 extras/source/autocorr/lang/nl-BE/DocumentList.xml |   24 -
 extras/source/autocorr/lang/nl/DocumentList.xml|   24 -
 extras/source/autocorr/lang/pt-BR/DocumentList.xml |   24 -
 extras/source/autocorr/lang/pt/DocumentList.xml|   24 -
 extras/source/autocorr/lang/ro/DocumentList.xml|   24 -
 extras/source/autocorr/lang/sk/DocumentList.xml|   24 -
 extras/source/autocorr/lang/sl/DocumentList.xml|   24 -
 extras/source/autocorr/lang/sv/DocumentList.xml|   24 -
 extras/source/autocorr/lang/tr/DocumentList.xml|   24 -
 extras/source/autocorr/lang/zh-CN/DocumentList.xml |   24 -
 28 files changed, 12 insertions(+), 648 deletions(-)

New commits:
commit d17c9626f8997cef8ded6f4736003fcf694bc175
Author: László Németh 
Date:   Fri Sep 9 15:30:38 2016 +0200

tdf#97191 fix emoji correction conflict with time format

by removing the ":12:"-like patterns from DocumentList.xmls.

To be consistent in the AutoCorrect dialog of the bug-fixing
releases, not only the full hour clockface patterns, but
the :1.30:-like ones are removed from the patterns here.

Also complete the fix for tdf#93233, removing the :1:30:-like
(never working) patterns.

Change-Id: Ia39e1f0d5fdbf686713c6deacf2a56e0beb8b42b
Reviewed-on: https://gerrit.libreoffice.org/28761
Tested-by: Jenkins 
Reviewed-by: László Németh 
Reviewed-by: Eike Rathke 
(cherry picked from commit 14f914eb105765386438ae53c83c5ce295648414)
Reviewed-on: https://gerrit.libreoffice.org/28922
Reviewed-by: Markus Mohrhard 
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/extras/source/autocorr/emoji/emoji.ulf 
b/extras/source/autocorr/emoji/emoji.ulf
index 268ae34..f06b2e0 100644
--- a/extras/source/autocorr/emoji/emoji.ulf
+++ b/extras/source/autocorr/emoji/emoji.ulf
@@ -3501,51 +3501,51 @@ en-US = "button"
 
 [CLOCK_FACE_ONE_OCLOCK]
 x-comment = "🕐 (U+1F550), see http://wiki.documentfoundation.org/Emoji";
-en-US = "1"
+en-US = "1 h"
 
 [CLOCK_FACE_TWO_OCLOCK]
 x-comment = "🕑 (U+1F551), see http://wiki.documentfoundation.org/Emoji";
-en-US = "2"
+en-US = "2 h"
 
 [CLOCK_FACE_THREE_OCLOCK]
 x-comment = "🕒 (U+1F552), see http://wiki.documentfoundation.org/Emoji";
-en-US = "3"
+en-US = "3 h"
 
 [CLOCK_FACE_FOUR_OCLOCK]
 x-comment = "🕓 (U+1F553), see http://wiki.documentfoundation.org/Emoji";
-en-US = "4"
+en-US = "4 h"
 
 [CLOCK_FACE_FIVE_OCLOCK]
 x-comment = "🕔 (U+1F554), see http://wiki.documentfoundation.org/Emoji";
-en-US = "5"
+en-US = "5 h"
 
 [CLOCK_FACE_SIX_OCLOCK]
 x-comment = "🕕 (U+1F555), see http://wiki.documentfoundation.org/Emoji";
-en-US = "6"
+en-US = "6 h"
 
 [CLOCK_FACE_SEVEN_OCLOCK]
 x-comment = "🕖 (U+1F556), see http://wiki.documentfoundation.org/Emoji";
-en-US = "7"
+en-US = "7 h"
 
 [CLOCK_FACE_EIGHT_OCLOCK]
 x-comment = "🕗 (U+1F557), see http://wiki.documentfoundation.org/Emoji";
-en-US = "8"
+en-US = "8 h"
 
 [CLOCK_FACE_NINE_OCLOCK]
 x-comment = "🕘 (U+1F558), see http://wiki.documentfoundation.org/Emoji";
-en-US = "9"
+en-US = "9 h"
 
 [CLOCK_FACE_TEN_OCLOCK]
 x-comment = "🕙 (U+1F559), see http://wiki.documentfoundation.org/Emoji";
-en-US = "10"
+en-US = "10 h"
 
 [CLOCK_FACE_ELEVEN_OCLOCK]
 x-comment = "🕚 (U+1F55A), see http://wiki.documentfoundation.org/Emoji";
-en-US = "11"
+

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

2016-09-16 Thread Miklos Vajna
 desktop/qa/desktop_lib/test_desktop_lib.cxx |6 ++
 desktop/source/lib/init.cxx |8 
 include/LibreOfficeKit/LibreOfficeKit.h |5 +
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   16 
 include/sfx2/lokhelper.hxx  |2 ++
 sfx2/source/view/lokhelper.cxx  |   14 ++
 6 files changed, 51 insertions(+)

New commits:
commit c485dfc8c38972e0538ec4dde0a457b7fa050d05
Author: Miklos Vajna 
Date:   Fri Sep 16 12:38:31 2016 +0200

sfx2: add SfxLokHelper::getViewIds

and also expose it in the LOK API. This way clients don't have to keep
track of what views they created / destroyed, they can also get an up to
date list with this method.

Change-Id: Ibaee42c545803e04a31e7c13ab6ec370b99465c4
(cherry picked from commit dcc92a7cb5aa1faa711c8da7f7d8ecee0a192c25)

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index b5da41b..0a2d823 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -315,6 +315,12 @@ void DesktopLOKTest::testCreateView()
 int nId1 = pDocument->m_pDocumentClass->createView(pDocument);
 CPPUNIT_ASSERT_EQUAL(2, 
pDocument->m_pDocumentClass->getViewsCount(pDocument));
 
+// Test getViewIds().
+std::vector aViewIds(2);
+CPPUNIT_ASSERT(pDocument->m_pDocumentClass->getViewIds(pDocument, 
aViewIds.data(), aViewIds.size()));
+CPPUNIT_ASSERT_EQUAL(nId0, aViewIds[0]);
+CPPUNIT_ASSERT_EQUAL(nId1, aViewIds[1]);
+
 // Make sure the created view is the active one, then switch to the old
 // one.
 CPPUNIT_ASSERT_EQUAL(nId1, 
pDocument->m_pDocumentClass->getView(pDocument));
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7b61e66..9f3ed40 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -439,6 +439,7 @@ static void doc_destroyView(LibreOfficeKitDocument* pThis, 
int nId);
 static void doc_setView(LibreOfficeKitDocument* pThis, int nId);
 static int doc_getView(LibreOfficeKitDocument* pThis);
 static int doc_getViewsCount(LibreOfficeKitDocument* pThis);
+static bool doc_getViewIds(LibreOfficeKitDocument* pThis, int* pArray, size_t 
nSize);
 static unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis,
   const char *pFontName,
   int* pFontWidth,
@@ -486,6 +487,7 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
setView = doc_setView;
 m_pDocumentClass->getView = doc_getView;
 m_pDocumentClass->getViewsCount = doc_getViewsCount;
+m_pDocumentClass->getViewIds = doc_getViewIds;
 
 m_pDocumentClass->renderFont = doc_renderFont;
 m_pDocumentClass->getPartHash = doc_getPartHash;
@@ -2315,6 +2317,12 @@ static int doc_getViewsCount(LibreOfficeKitDocument* 
/*pThis*/)
 return SfxLokHelper::getViewsCount();
 }
 
+static bool doc_getViewIds(LibreOfficeKitDocument* /*pThis*/, int* pArray, 
size_t nSize)
+{
+SolarMutexGuard aGuard;
+return SfxLokHelper::getViewIds(pArray, nSize);
+}
+
 unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/,
 const char* pFontName,
 int* pFontWidth,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index a0ed819..c97655f 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -244,6 +244,11 @@ struct _LibreOfficeKitDocumentClass
const int nTileWidth,
const int nTileHeight);
 
+/// @see lok::Document::getViewIds().
+bool (*getViewIds) (LibreOfficeKitDocument* pThis,
+   int* pArray,
+   size_t nSize);
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 9e185b6..0c52843 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -435,6 +435,22 @@ public:
 nTileWidth, nTileHeight);
 }
 
+/**
+ * Returns the viewID for each existing view. Since viewIDs are not reused,
+ * viewIDs are not the same as the index of the view in the view array over
+ * time. Use getViewsCount() to know the minimal nSize that's large enough.
+ *
+ * @param pArray the array to write the viewIDs into
+ * @param nSize the size of pArray
+ * @returns true if pArray was large enough and result is written, false
+ * otherwise.
+ */
+inline bool getViewIds(int* pArray,
+   size_t nSize)
+{
+return mpDoc->pClass->getViewIds(mpDoc, pArray, nSize);
+}
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --g

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

2016-09-16 Thread Miklos Vajna
 loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 784f2eb94c7b125a51c74414720e72066dff2aab
Author: Miklos Vajna 
Date:   Fri Sep 16 14:50:18 2016 +0200

Update bundled LibreOfficeKit include files

Change-Id: I8f08c3b22d81b81ba8dc13398269cd4b8e75aaf6

diff --git a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h 
b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index a0ed819..c97655f 100644
--- a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
@@ -244,6 +244,11 @@ struct _LibreOfficeKitDocumentClass
const int nTileWidth,
const int nTileHeight);
 
+/// @see lok::Document::getViewIds().
+bool (*getViewIds) (LibreOfficeKitDocument* pThis,
+   int* pArray,
+   size_t nSize);
+
 #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-commits


[Libreoffice-commits] core.git: desktop/qa desktop/source include/LibreOfficeKit include/sfx2 sfx2/source

2016-09-16 Thread Miklos Vajna
 desktop/qa/desktop_lib/test_desktop_lib.cxx |6 ++
 desktop/source/lib/init.cxx |8 
 include/LibreOfficeKit/LibreOfficeKit.h |5 +
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   16 
 include/sfx2/lokhelper.hxx  |2 ++
 sfx2/source/view/lokhelper.cxx  |   14 ++
 6 files changed, 51 insertions(+)

New commits:
commit dcc92a7cb5aa1faa711c8da7f7d8ecee0a192c25
Author: Miklos Vajna 
Date:   Fri Sep 16 12:38:31 2016 +0200

sfx2: add SfxLokHelper::getViewIds

and also expose it in the LOK API. This way clients don't have to keep
track of what views they created / destroyed, they can also get an up to
date list with this method.

Change-Id: Ibaee42c545803e04a31e7c13ab6ec370b99465c4

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 8f3807e..a7e24fc 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -316,6 +316,12 @@ void DesktopLOKTest::testCreateView()
 int nId1 = pDocument->m_pDocumentClass->createView(pDocument);
 CPPUNIT_ASSERT_EQUAL(2, 
pDocument->m_pDocumentClass->getViewsCount(pDocument));
 
+// Test getViewIds().
+std::vector aViewIds(2);
+CPPUNIT_ASSERT(pDocument->m_pDocumentClass->getViewIds(pDocument, 
aViewIds.data(), aViewIds.size()));
+CPPUNIT_ASSERT_EQUAL(nId0, aViewIds[0]);
+CPPUNIT_ASSERT_EQUAL(nId1, aViewIds[1]);
+
 // Make sure the created view is the active one, then switch to the old
 // one.
 CPPUNIT_ASSERT_EQUAL(nId1, 
pDocument->m_pDocumentClass->getView(pDocument));
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 967d730..39e6c65 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -438,6 +438,7 @@ static void doc_destroyView(LibreOfficeKitDocument* pThis, 
int nId);
 static void doc_setView(LibreOfficeKitDocument* pThis, int nId);
 static int doc_getView(LibreOfficeKitDocument* pThis);
 static int doc_getViewsCount(LibreOfficeKitDocument* pThis);
+static bool doc_getViewIds(LibreOfficeKitDocument* pThis, int* pArray, size_t 
nSize);
 static unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis,
   const char *pFontName,
   int* pFontWidth,
@@ -485,6 +486,7 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
setView = doc_setView;
 m_pDocumentClass->getView = doc_getView;
 m_pDocumentClass->getViewsCount = doc_getViewsCount;
+m_pDocumentClass->getViewIds = doc_getViewIds;
 
 m_pDocumentClass->renderFont = doc_renderFont;
 m_pDocumentClass->getPartHash = doc_getPartHash;
@@ -2313,6 +2315,12 @@ static int doc_getViewsCount(LibreOfficeKitDocument* 
/*pThis*/)
 return SfxLokHelper::getViewsCount();
 }
 
+static bool doc_getViewIds(LibreOfficeKitDocument* /*pThis*/, int* pArray, 
size_t nSize)
+{
+SolarMutexGuard aGuard;
+return SfxLokHelper::getViewIds(pArray, nSize);
+}
+
 unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/,
 const char* pFontName,
 int* pFontWidth,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index a0ed819..c97655f 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -244,6 +244,11 @@ struct _LibreOfficeKitDocumentClass
const int nTileWidth,
const int nTileHeight);
 
+/// @see lok::Document::getViewIds().
+bool (*getViewIds) (LibreOfficeKitDocument* pThis,
+   int* pArray,
+   size_t nSize);
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index cd34885..7c90df5 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -435,6 +435,22 @@ public:
 nTileWidth, nTileHeight);
 }
 
+/**
+ * Returns the viewID for each existing view. Since viewIDs are not reused,
+ * viewIDs are not the same as the index of the view in the view array over
+ * time. Use getViewsCount() to know the minimal nSize that's large enough.
+ *
+ * @param pArray the array to write the viewIDs into
+ * @param nSize the size of pArray
+ * @returns true if pArray was large enough and result is written, false
+ * otherwise.
+ */
+inline bool getViewIds(int* pArray,
+   size_t nSize)
+{
+return mpDoc->pClass->getViewIds(mpDoc, pArray, nSize);
+}
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 746037

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 4 commits - comphelper/source include/comphelper sc/source svx/source vcl/source

2016-09-16 Thread Ashod Nakashian
 comphelper/source/misc/lok.cxx |   24 ++
 include/comphelper/lok.hxx |   12 +
 sc/source/ui/view/gridwin4.cxx |  216 -
 svx/source/sdr/contact/objectcontactofpageview.cxx |   31 ++-
 vcl/source/outdev/bitmap.cxx   |   14 +
 5 files changed, 212 insertions(+), 85 deletions(-)

New commits:
commit a03179ce1b9365eedeb782a4d5766f620ccadd6e
Author: Ashod Nakashian 
Date:   Thu Jun 16 07:28:58 2016 -0400

LOK: tile rendering regression fix

Calc fast rendering requires us to offset
the are being rendered and shift all
bitmaps accordingly. This however is
breaking Impress rendering since the
offseting logic is common (in svx and vcl).

This adds new API to enable or disable
this local rendering (as opposed to
rendering a full document as was previously
done.

The new flag is then set by Calc to
enable the offseting logic in isolation
without affecting other applications.

In one case isolation was achieved by
checking the MapModeUnit.

Change-Id: Ia0aadfc3f6df7c1a891b97dc731f5897414c9420
Reviewed-on: https://gerrit.libreoffice.org/26367
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 60fdcda65bad242f99895cb453182578250fbdea)
Reviewed-on: https://gerrit.libreoffice.org/26378
Tested-by: Jenkins 
(cherry picked from commit c337011d2052ec3ddb80e61bcc4b0574b4e898ba)

diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index a6abd2a..a321260 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -17,6 +17,8 @@ namespace LibreOfficeKit
 
 static bool g_bActive(false);
 
+static bool g_bViewCallback(true);
+
 void setActive(bool bActive)
 {
 g_bActive = bActive;
@@ -27,6 +29,28 @@ bool isActive()
 return g_bActive;
 }
 
+void setViewCallback(bool bViewCallback)
+{
+g_bViewCallback = bViewCallback;
+}
+
+bool isViewCallback()
+{
+return g_bViewCallback;
+}
+
+static bool g_bLocalRendering(false);
+
+void setLocalRendering(bool bLocalRendering)
+{
+g_bLocalRendering = bLocalRendering;
+}
+
+bool isLocalRendering()
+{
+return g_bLocalRendering;
+}
+
 static void (*pStatusIndicatorCallback)(void *data, 
statusIndicatorCallbackType type, int percent)(nullptr);
 static void *pStatusIndicatorCallbackData(nullptr);
 
diff --git a/include/comphelper/lok.hxx b/include/comphelper/lok.hxx
index 79fa115..8afd3d8 100644
--- a/include/comphelper/lok.hxx
+++ b/include/comphelper/lok.hxx
@@ -36,6 +36,18 @@ COMPHELPER_DLLPUBLIC void setStatusIndicatorCallback(void 
(*callback)(void *data
 // Check whether the code is running as invoked through LibreOfficeKit.
 COMPHELPER_DLLPUBLIC bool isActive();
 
+/// Shift the coordinates before rendering each bitmap.
+/// Used by Calc to render each tile separately.
+/// This should be unnecessary (and removed) once Calc
+/// moves to using 100MM Unit.
+COMPHELPER_DLLPUBLIC void setLocalRendering(bool bLocalRendering = true);
+COMPHELPER_DLLPUBLIC bool isLocalRendering();
+
+/// Check whether clients register a callback for each view.
+COMPHELPER_DLLPUBLIC bool isViewCallback();
+/// Set whether clients register a callback for each view.
+COMPHELPER_DLLPUBLIC void setViewCallback(bool bViewCallback);
+
 // Status indicator handling. Even if in theory there could be several status 
indicators active at
 // the same time, in practice there is only one at a time, so we don't handle 
any identification of
 // status indicator in this API.
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 33fb2aa..7ce585c 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -826,6 +826,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const 
ScTableInfo& rTableI
 aOrigin.getY() - aOrigin.getY() / twipFactor);
 aNew.SetOrigin(aOrigin);
 pContentDev->SetMapMode(aNew);
+comphelper::LibreOfficeKit::setLocalRendering();
 }
 
 DrawRedraw( aOutputData, eMode, SC_LAYER_FRONT );
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx 
b/svx/source/sdr/contact/objectcontactofpageview.cxx
index 71522cf..b6f244a 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -232,7 +232,8 @@ namespace sdr
 
 // transform to world coordinates
 
aViewRange.transform(rTargetOutDev.GetInverseViewTransformation());
-if (comphelper::LibreOfficeKit::isActive())
+if (comphelper::LibreOfficeKit::isActive() &&
+comphelper::LibreOfficeKit::isLocalRendering())
 {
 const int TWIPS_PER_PIXEL = 15;
 aViewRange = 
basegfx::B2DRange(aViewRange.getMinimum().getX(),
@@ -309,7 +310,8 @@ namespace 

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

2016-09-16 Thread Michael Stahl
 embeddedobj/source/commonembedding/visobj.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 9035f00ede7925eb699864d17baf7c897a8c7e53
Author: Michael Stahl 
Date:   Fri Sep 16 14:36:38 2016 +0200

embeddedobj: add a comment why the original size is restored

... in OCommonEmbeddedObject::getPreferredVisualRepresentation()

Change-Id: I326b7df4350f34fc9a1c363ea0e9bc77d8f1e976

diff --git a/embeddedobj/source/commonembedding/visobj.cxx 
b/embeddedobj/source/commonembedding/visobj.cxx
index 6bf9c49..87a7f39 100644
--- a/embeddedobj/source/commonembedding/visobj.cxx
+++ b/embeddedobj/source/commonembedding/visobj.cxx
@@ -174,6 +174,8 @@ embed::VisualRepresentation SAL_CALL 
OCommonEmbeddedObject::getPreferredVisualRe
 bool bBackToLoaded = false;
 if ( m_nObjectState == embed::EmbedStates::LOADED )
 {
+// restore original VisualAreaSize, because writer objects set
+// themselves to a default size OLESIZE
 awt::Size aOrigSize = getVisualAreaSize(nAspect);
 changeState(embed::EmbedStates::RUNNING);
 if (aOrigSize != getVisualAreaSize(nAspect))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Ashod Nakashian
 loolwsd/test/test.cpp |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 3d9b50aeebdd5b3fadc6daacfba78daf9c7bec3c
Author: Ashod Nakashian 
Date:   Wed Sep 14 17:43:56 2016 -0400

loolwsd: unittest runner improvement and logging

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

diff --git a/loolwsd/test/test.cpp b/loolwsd/test/test.cpp
index af0ff59..a8c697c 100644
--- a/loolwsd/test/test.cpp
+++ b/loolwsd/test/test.cpp
@@ -19,6 +19,8 @@
 
 #include 
 
+#include 
+
 class HTTPGetTest;
 
 bool filterTests(CPPUNIT_NS::TestRunner& runner, CPPUNIT_NS::Test* 
testRegistry)
@@ -57,7 +59,11 @@ bool filterTests(CPPUNIT_NS::TestRunner& runner, 
CPPUNIT_NS::Test* testRegistry)
 }
 }
 
-std::cerr << "Failed to match [" << testName << "] to any names in the 
test-suite. Running all tests." << std::endl;
+if (!haveTests)
+{
+std::cerr << "Failed to match [" << testName << "] to any names in 
the test-suite. Running all tests." << std::endl;
+}
+
 return haveTests;
 }
 
@@ -66,6 +72,9 @@ bool filterTests(CPPUNIT_NS::TestRunner& runner, 
CPPUNIT_NS::Test* testRegistry)
 
 int main(int /*argc*/, char** /*argv*/)
 {
+Log::initialize("tst", "trace", true, false);
+
+
 CPPUNIT_NS::TestResult controller;
 CPPUNIT_NS::TestResultCollector result;
 controller.addListener(&result);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Michael Stahl
 include/xmloff/xmlictxt.hxx   |6 +++---
 include/xmloff/xmlimp.hxx |5 +++--
 xmloff/source/core/xmlimp.cxx |   26 +-
 3 files changed, 19 insertions(+), 18 deletions(-)

New commits:
commit dbf87d2124a0c01014b9e839804455d3be38831f
Author: Michael Stahl 
Date:   Fri Sep 16 14:26:50 2016 +0200

coverity#1372990 xmloff: use unique_ptr for RewindMaps

Change-Id: I51e67607d94a465ce39e822f01a0c60efbf1a0f0

diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx
index 6e064e2..6d24112 100644
--- a/include/xmloff/xmlictxt.hxx
+++ b/include/xmloff/xmlictxt.hxx
@@ -43,10 +43,10 @@ class XMLOFF_DLLPUBLIC SvXMLImportContext : public 
::cppu::WeakImplHelper1< ::cs
 sal_uInt16   mnPrefix;
 OUString maLocalName;
 
-std::unique_ptr   mxRewindMap;
+std::unique_ptr m_pRewindMap;
 
-SAL_DLLPRIVATE SvXMLNamespaceMap *TakeRewindMap() { return 
mxRewindMap.release(); }
-SAL_DLLPRIVATE void PutRewindMap( SvXMLNamespaceMap *p ) { 
mxRewindMap.reset(p); }
+SAL_DLLPRIVATE std::unique_ptr TakeRewindMap() { return 
std::move(m_pRewindMap); }
+SAL_DLLPRIVATE void PutRewindMap(std::unique_ptr p) { 
m_pRewindMap = std::move(p); }
 
 protected:
 
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index cc54fe1..87634e7 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -175,7 +175,7 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public 
::cppu::WeakImplHelper8<
 
 std::unique_ptr  mpImpl;// dummy
 
-SvXMLNamespaceMap   *mpNamespaceMap;
+std::unique_ptr mpNamespaceMap;
 std::unique_ptr mpUnitConv;
 SvXMLImportContexts_ImplmaContexts;
 FastSvXMLImportContexts_ImplmaFastContexts;
@@ -200,7 +200,8 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public 
::cppu::WeakImplHelper8<
 const OUString getNamespacePrefixFromToken( sal_Int32 nToken );
 void registerNamespaces();
 void registerNSHelper(sal_Int32 nToken, sal_Int32 nPrefix, sal_Int32 
nNamespace );
-SvXMLNamespaceMap* processNSAttributes(const css::uno::Reference< 
css::xml::sax::XAttributeList >& xAttrList);
+std::unique_ptr processNSAttributes(
+const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList);
 void Characters(const OUString& aChars);
 
 protected:
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 52df8ce..715ddb9 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -447,8 +447,6 @@ SvXMLImport::SvXMLImport(
 
 SvXMLImport::~SvXMLImport() throw ()
 {
-delete mpNamespaceMap;
-
 if (mxEventListener.is() && mxModel.is())
 mxModel->removeEventListener(mxEventListener);
 }
@@ -659,9 +657,10 @@ void SAL_CALL SvXMLImport::endDocument()
 }
 }
 
-SvXMLNamespaceMap* SvXMLImport::processNSAttributes(const uno::Reference< 
xml::sax::XAttributeList >& xAttrList)
+std::unique_ptr SvXMLImport::processNSAttributes(
+const uno::Reference< xml::sax::XAttributeList >& xAttrList)
 {
-SvXMLNamespaceMap *pRewindMap = nullptr;
+std::unique_ptr pRewindMap;
 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
 for( sal_Int16 i=0; i < nAttrCount; i++ )
 {
@@ -685,8 +684,8 @@ SvXMLNamespaceMap* SvXMLImport::processNSAttributes(const 
uno::Reference< xml::s
 {
 if( !pRewindMap )
 {
-pRewindMap = mpNamespaceMap;
-mpNamespaceMap = new SvXMLNamespaceMap( *mpNamespaceMap );
+pRewindMap = std::move(mpNamespaceMap);
+mpNamespaceMap.reset(new SvXMLNamespaceMap(*pRewindMap));
 }
 const OUString& rAttrValue = xAttrList->getValueByIndex( i );
 
@@ -719,7 +718,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& 
rName,
 //SAL_INFO("svg", "startElement " << rName);
 // Process namespace attributes. This must happen before creating the
 // context, because namespace decaration apply to the element name itself.
-SvXMLNamespaceMap *pRewindMap = processNSAttributes(xAttrList);
+std::unique_ptr 
pRewindMap(processNSAttributes(xAttrList));
 
 // Get element's namespace and local name.
 OUString aLocalName;
@@ -759,7 +758,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& 
rName,
 
 // Remember old namespace map.
 if( pRewindMap )
-xContext->PutRewindMap( pRewindMap );
+xContext->PutRewindMap(std::move(pRewindMap));
 
 // Call a startElement at the new context.
 xContext->StartElement( xAttrList );
@@ -782,7 +781,7 @@ rName
 return;
 }
 
-SvXMLNamespaceMap * pRewindMap(nullptr);
+std::unique_ptr pRewindMap;
 
 {
 // Get topmost context and remove it from the stack.
@@ -808,8 +807,8 @@ rName
 // Rewind a namespace map.
 if (pRewindMap)
 {
-delete mpNamespaceMap;
-mpNamespaceMap = pRewindMap;
+mpNamespaceMap.reset();
+

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

2016-09-16 Thread Ashod Nakashian
 loolwsd/test/TileCacheTests.cpp |   65 
 1 file changed, 65 insertions(+)

New commits:
commit b26b52af611384d24c159e434abdea9899ec0446
Author: Ashod Nakashian 
Date:   Wed Sep 14 17:43:29 2016 -0400

loolwsd: unittest for tile prioritization

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

diff --git a/loolwsd/test/TileCacheTests.cpp b/loolwsd/test/TileCacheTests.cpp
index e44a18d..a4d3527 100644
--- a/loolwsd/test/TileCacheTests.cpp
+++ b/loolwsd/test/TileCacheTests.cpp
@@ -14,6 +14,7 @@
 
 #include "Common.hpp"
 #include "LOOLProtocol.hpp"
+#include "MessageQueue.hpp"
 #include "Png.hpp"
 #include "TileCache.hpp"
 #include "Unit.hpp"
@@ -22,6 +23,24 @@
 
 using namespace helpers;
 
+namespace CPPUNIT_NS
+{
+template<>
+struct assertion_traits>
+{
+static bool equal(const std::vector& x, const std::vector& y)
+{
+return x == y;
+}
+
+static std::string toString(const std::vector& x)
+{
+const std::string text = '"' + (!x.empty() ? std::string(x.data(), 
x.size()) : "") + '"';
+return text;
+}
+};
+}
+
 /// TileCache unit-tests.
 class TileCacheTests : public CPPUNIT_NS::TestFixture
 {
@@ -42,6 +61,7 @@ class TileCacheTests : public CPPUNIT_NS::TestFixture
 CPPUNIT_TEST(testLoad12ods);
 CPPUNIT_TEST(testTileInvalidateWriter);
 //CPPUNIT_TEST(testTileInvalidateCalc);
+CPPUNIT_TEST(testTileQueuePriority);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -56,6 +76,7 @@ class TileCacheTests : public CPPUNIT_NS::TestFixture
 void testTileInvalidateWriter();
 void testWriterAnyKey();
 void testTileInvalidateCalc();
+void testTileQueuePriority();
 
 void checkTiles(Poco::Net::WebSocket& socket,
 const std::string& type,
@@ -578,6 +599,50 @@ void TileCacheTests::testTileInvalidateCalc()
 socket.shutdown();
 }
 
+void TileCacheTests::testTileQueuePriority()
+{
+const std::string reqHigh = "tile part=0 width=256 height=256 tileposx=0 
tileposy=0 tilewidth=3840 tileheight=3840";
+const TileQueue::Payload payloadHigh(reqHigh.data(), reqHigh.data() + 
reqHigh.size());
+const std::string reqLow = "tile part=0 width=256 height=256 tileposx=0 
tileposy=253440 tilewidth=3840 tileheight=3840";
+const TileQueue::Payload payloadLow(reqLow.data(), reqLow.data() + 
reqLow.size());
+
+TileQueue queue;
+
+// Request the tiles.
+queue.put(reqLow);
+queue.put(reqHigh);
+
+// Original order.
+CPPUNIT_ASSERT_EQUAL(payloadLow, queue.get());
+CPPUNIT_ASSERT_EQUAL(payloadHigh, queue.get());
+
+// Request the tiles.
+queue.put(reqLow);
+queue.put(reqHigh);
+queue.put(reqHigh);
+queue.put(reqLow);
+
+// Set cursor above reqHigh.
+queue.updateCursorPosition(0, 0, 0, 0, 10, 100);
+
+// Prioritized order.
+CPPUNIT_ASSERT_EQUAL(payloadHigh, queue.get());
+CPPUNIT_ASSERT_EQUAL(payloadLow, queue.get());
+
+// Repeat with cursor position set.
+queue.put(reqLow);
+queue.put(reqHigh);
+CPPUNIT_ASSERT_EQUAL(payloadHigh, queue.get());
+CPPUNIT_ASSERT_EQUAL(payloadLow, queue.get());
+
+// Repeat by changing cursor position.
+queue.put(reqLow);
+queue.put(reqHigh);
+queue.updateCursorPosition(0, 0, 0, 253450, 10, 100);
+CPPUNIT_ASSERT_EQUAL(payloadLow, queue.get());
+CPPUNIT_ASSERT_EQUAL(payloadHigh, queue.get());
+}
+
 void TileCacheTests::checkTiles(Poco::Net::WebSocket& socket, const 
std::string& docType, const std::string& name)
 {
 const std::string current = "current=";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Ashod Nakashian
 loolwsd/DocumentBroker.cpp |2 +-
 loolwsd/TileCache.cpp  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ffa146a8700aee5ab9dc0d9b5192a11f96eeecf9
Author: Ashod Nakashian 
Date:   Tue Sep 13 18:40:23 2016 -0400

loolwsd: log tile version in stats

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

diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index ff3fc1b..3c6c3fb 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -574,7 +574,7 @@ void 
DocumentBroker::handleTileCombinedRequest(TileCombined& tileCombined,
 
 assert(cachedTile->is_open());
 cachedTile->seekg(0, std::ios_base::end);
-size_t pos = output.size();
+const auto pos = output.size();
 std::streamsize size = cachedTile->tellg();
 output.resize(pos + size);
 cachedTile->seekg(0, std::ios_base::beg);
diff --git a/loolwsd/TileCache.cpp b/loolwsd/TileCache.cpp
index 0f6936a..b3cf0ea 100644
--- a/loolwsd/TileCache.cpp
+++ b/loolwsd/TileCache.cpp
@@ -188,7 +188,7 @@ void TileCache::saveTileAndNotify(const TileDesc& tile, 
const char *data, const
 // Remove subscriptions.
 if (tileBeingRendered->getVersion() == tile.getVersion())
 {
-Log::debug() << "STATISTICS: tile internal roundtrip "
+Log::debug() << "STATISTICS: tile " << tile.getVersion() << " 
internal roundtrip "
  << tileBeingRendered->getElapsedTimeMs() << " ms." << 
Log::end;
 _tilesBeingRendered.erase(cachedName);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Ashod Nakashian
 loolwsd/test/helpers.hpp |   58 +++
 1 file changed, 9 insertions(+), 49 deletions(-)

New commits:
commit d2872846d83a848c5760afaa9bfc3d06fc3722f9
Author: Ashod Nakashian 
Date:   Sun Sep 11 14:29:09 2016 -0400

loolwsd: cleanup of unittests and helpers

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

diff --git a/loolwsd/test/helpers.hpp b/loolwsd/test/helpers.hpp
index 4e60850..d6b519d 100644
--- a/loolwsd/test/helpers.hpp
+++ b/loolwsd/test/helpers.hpp
@@ -238,8 +238,9 @@ void getResponseMessage(Poco::Net::WebSocket& ws, const 
std::string& prefix, std
 }
 
 inline
-std::vector getResponseMessage(Poco::Net::WebSocket& ws, const 
std::string& prefix, const std::string& name = "")
+std::vector getResponseMessage(Poco::Net::WebSocket& ws, const 
std::string& prefix, std::string name = "")
 {
+name = name + '[' + prefix + "] ";
 try
 {
 int flags = 0;
@@ -256,15 +257,16 @@ std::vector 
getResponseMessage(Poco::Net::WebSocket& ws, const std::string
 int bytes = ws.receiveFrame(response.data(), response.size(), 
flags);
 response.resize(bytes >= 0 ? bytes : 0);
 auto message = LOOLProtocol::getAbbreviatedMessage(response);
-std::cerr << name << "Got " << bytes << " bytes: " << message 
<< std::endl;
 if (bytes > 0 && (flags & 
Poco::Net::WebSocket::FRAME_OP_BITMASK) != Poco::Net::WebSocket::FRAME_OP_CLOSE)
 {
 if (message.find(prefix) == 0)
 {
+std::cerr << name << "Got " << bytes << " bytes: " << 
message << std::endl;
 return response;
 }
 else if (message.find("nextmessage") == 0)
 {
+std::cerr << name << "Got " << bytes << " bytes: " << 
message << std::endl;
 Poco::StringTokenizer tokens(message, " ", 
Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
 int size = 0;
 if (tokens.count() == 2 &&
@@ -274,9 +276,9 @@ std::vector getResponseMessage(Poco::Net::WebSocket& 
ws, const std::string
 bytes = ws.receiveFrame(response.data(), 
response.size(), flags);
 response.resize(bytes >= 0 ? bytes : 0);
 message = 
LOOLProtocol::getAbbreviatedMessage(response);
-std::cerr << name << "Got " << bytes << " bytes: " 
<< message << std::endl;
 if (bytes > 0 && message.find(prefix) == 0)
 {
+std::cerr << name << "Got " << bytes << " 
bytes: " << message << std::endl;
 return response;
 }
 }
@@ -293,11 +295,13 @@ std::vector 
getResponseMessage(Poco::Net::WebSocket& ws, const std::string
 {
 break;
 }
+
+std::cerr << name << "Ignored: " << message << std::endl;
 }
 else
 {
-std::cerr << name << "Timeout waiting for " << prefix << "\n";
 --retries;
+std::cerr << name << "Timeout " << retries << std::endl;
 }
 }
 while (retries > 0 && (flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) 
!= Poco::Net::WebSocket::FRAME_OP_CLOSE);
@@ -467,51 +471,7 @@ void parseDocSize(const std::string& message, const 
std::string& type,
 inline
 std::vector getTileMessage(Poco::Net::WebSocket& ws, const std::string& 
name = "")
 {
-int flags = 0;
-int retries = 20;
-static const Poco::Timespan waitTime(100);
-std::vector response(READ_BUFFER_SIZE);
-
-// 5 seconds timeout
-ws.setReceiveTimeout(500);
-do
-{
-if (ws.poll(waitTime, Poco::Net::Socket::SELECT_READ))
-{
-response.resize(READ_BUFFER_SIZE);
-int bytes = ws.receiveFrame(response.data(), response.size(), 
flags);
-response.resize(bytes >= 0 ? bytes : 0);
-auto message = LOOLProtocol::getAbbreviatedMessage(response);
-if (bytes > 0 && (flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) 
!= Poco::Net::WebSocket::FRAME_OP_CLOSE)
-{
-if (message.find("nextmessage") == 0)
-{
-Poco::StringTokenizer tokens(message, " ", 
Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
-int size = 0;
-if (tokens.count() == 2 &&
-tokens[0] == "nextmessage:" && 
LOOLProtocol::getTokenInteger(tokens[1], "size", size) && size > 0)
-   

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

2016-09-16 Thread Ashod Nakashian
 loolwsd/LOOLStress.cpp |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit a0478719ffde1bbfd7994bd57665e40cb54982ce
Author: Ashod Nakashian 
Date:   Fri Sep 2 17:50:59 2016 -0400

loolwsd: benchmark iterations count as argument to the cli

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

diff --git a/loolwsd/LOOLStress.cpp b/loolwsd/LOOLStress.cpp
index 237b4a0..fe9ca98 100644
--- a/loolwsd/LOOLStress.cpp
+++ b/loolwsd/LOOLStress.cpp
@@ -53,6 +53,7 @@ public:
 ~Stress() {}
 
 static bool Benchmark;
+static int Iterations;
 static bool NoDelay;
 unsigned _numClients;
 std::string _serverURI;
@@ -246,13 +247,14 @@ private:
 
 void benchmark()
 {
+std::cout << "Running " << Stress::Iterations << " iterations of 
Benchmark." << std::endl;
 static std::atomic SessionId;
 const auto sessionId = ++SessionId;
 auto connection = Connection::create(_app._serverURI, _uri, 
std::to_string(sessionId));
 
 connection->load();
 
-for (auto i = 0; i < 10; ++i)
+for (auto i = 0; i < Stress::Iterations; ++i)
 {
 renderTile(connection);
 
@@ -389,6 +391,7 @@ private:
 
 bool Stress::NoDelay = false;
 bool Stress::Benchmark = false;
+int Stress::Iterations = 100;
 
 Stress::Stress() :
 _numClients(1),
@@ -408,6 +411,9 @@ void Stress::defineOptions(OptionSet& optionSet)
 .required(false).repeatable(false));
 optionSet.addOption(Option("bench", "", "Performance benchmark. The 
argument is a document URL to load.")
 .required(false).repeatable(false));
+optionSet.addOption(Option("iter", "", "Number of iterations to use for 
Benchmarking.")
+.required(false).repeatable(false)
+.argument("iter"));
 optionSet.addOption(Option("nodelay", "", "Replay at full speed 
disregarding original timing.")
 .required(false).repeatable(false));
 optionSet.addOption(Option("clientsperdoc", "", "Number of simultaneous 
clients on each doc.")
@@ -435,6 +441,8 @@ void Stress::handleOption(const std::string& optionName,
 }
 else if (optionName == "bench")
 Stress::Benchmark = true;
+else if (optionName == "iter")
+Stress::Iterations = std::max(std::stoi(value), 10);
 else if (optionName == "nodelay")
 Stress::NoDelay = true;
 else if (optionName == "clientsperdoc")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Ashod Nakashian
 loolwsd/LOOLStress.cpp |   64 +++--
 1 file changed, 41 insertions(+), 23 deletions(-)

New commits:
commit 67c05ec319482bd8c4cde4583bba3a04dfead097
Author: Ashod Nakashian 
Date:   Sun Sep 11 14:22:24 2016 -0400

loolstress: improved benchmarking and stats

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

diff --git a/loolwsd/LOOLStress.cpp b/loolwsd/LOOLStress.cpp
index fe9ca98..b4478b4 100644
--- a/loolwsd/LOOLStress.cpp
+++ b/loolwsd/LOOLStress.cpp
@@ -213,19 +213,23 @@ private:
 
 const auto startRendering = std::chrono::steady_clock::now();
 
-con->send("tilecombine part=0 width=256 height=256 tileposx=0 
tileposy=0 tilewidth=3840 tileheight=3840");
-if (helpers::getTileMessage(*con->getWS(), con->getName()).empty())
+auto expectedTilesCount = 3;
+con->send("tilecombine part=0 width=256 height=256 
tileposx=0,3840,7680 tileposy=0,0,0 tilewidth=3840 tileheight=3840");
+for (int i = 0; i < expectedTilesCount; ++i)
 {
-return false;
-}
+if (helpers::getTileMessage(*con->getWS(), con->getName()).empty())
+{
+return false;
+}
 
 const auto now = std::chrono::steady_clock::now();
 
 const auto deltaRendering = 
std::chrono::duration_cast(now - 
startRendering).count();
 _renderingStats.push_back(deltaRendering);
 
-const auto deltaModify = 
std::chrono::duration_cast(now - 
startModify).count();
-_latencyStats.push_back(deltaModify);
+const auto deltaModify = 
std::chrono::duration_cast(now - 
startModify).count();
+_latencyStats.push_back(deltaModify);
+}
 
 return true;
 }
@@ -234,20 +238,30 @@ private:
 {
 const auto start = std::chrono::steady_clock::now();
 
-con->send("tilecombine part=0 width=256 height=256 tileposx=0 
tileposy=0 tilewidth=3840 tileheight=3840");
-if (helpers::getTileMessage(*con->getWS(), con->getName()).empty())
+auto expectedTilesCount = 3;
+con->send("tilecombine part=0 width=256 height=256 
tileposx=0,3840,7680 tileposy=0,0,0 tilewidth=3840 tileheight=3840");
+for (int i = 0; i < expectedTilesCount; ++i)
 {
-return false;
+if (helpers::getTileMessage(*con->getWS(), con->getName()).empty())
+{
+return false;
+}
+
+const auto delta = 
std::chrono::duration_cast(std::chrono::steady_clock::now()
 - start).count();
+_cacheStats.push_back(delta);
 }
 
-const auto delta = 
std::chrono::duration_cast(std::chrono::steady_clock::now()
 - start).count();
-_cacheStats.push_back(delta);
 return true;
 }
 
 void benchmark()
 {
 std::cout << "Running " << Stress::Iterations << " iterations of 
Benchmark." << std::endl;
+
+_cacheStats.reserve(Stress::Iterations * 4);
+_latencyStats.reserve(Stress::Iterations * 4);
+_renderingStats.reserve(Stress::Iterations * 4);
+
 static std::atomic SessionId;
 const auto sessionId = ++SessionId;
 auto connection = Connection::create(_app._serverURI, _uri, 
std::to_string(sessionId));
@@ -505,20 +519,24 @@ int Stress::main(const std::vector& args)
 cachedStats.insert(cachedStats.end(), cachedStat.begin(), 
cachedStat.end());
 }
 
-std::cerr << "\nResults:\n";
-std::cerr << "Latency best: " << latencyStats[0] << " microsecs, 95th 
percentile: " << percentile(latencyStats, 95) << " microsecs." << std::endl;
-std::cerr << "Tile best: " << renderingStats[0] << " microsecs, 
rendering 95th percentile: " << percentile(renderingStats, 95) << " microsecs." 
<< std::endl;
-std::cerr << "Cached best: " << cachedStats[0] << " microsecs, tile 
95th percentile: " << percentile(cachedStats, 95) << " microsecs." << std::endl;
+if (!latencyStats.empty() && !renderingStats.empty() && 
!cachedStats.empty())
+{
+std::cerr << "\nResults:\n";
+
+std::cerr << "Latency best: " << latencyStats[0] << " microsecs, 
95th percentile: " << percentile(latencyStats, 95) << " microsecs." << 
std::endl;
+std::cerr << "Tile best: " << renderingStats[0] << " microsecs, 
rendering 95th percentile: " << percentile(renderingStats, 95) << " microsecs." 
<< std::endl;
+std::cerr << "Cached best: " << cachedStats[0] << " microsecs, 
tile 95th percentile: " << percentile(cachedStats, 95) << " microsecs." << 
std::endl;
 
-const auto renderingTime = std::accumulate(renderingStats.begin(), 
renderingStats.end(), 0L);
-const double renderedPixels = 256 * 256 * renderingStats.size();
-const auto pixelsPerSecRendered = renderedPixels / r

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

2016-09-16 Thread Ashod Nakashian
 loolwsd/LOOLStress.cpp |   38 +++---
 1 file changed, 19 insertions(+), 19 deletions(-)

New commits:
commit fcb7da4c76c32fe5a7b6df9afe594680425389a4
Author: Ashod Nakashian 
Date:   Fri Sep 2 16:35:44 2016 -0400

loolstress: cout <-> cerr

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

diff --git a/loolwsd/LOOLStress.cpp b/loolwsd/LOOLStress.cpp
index a296571..237b4a0 100644
--- a/loolwsd/LOOLStress.cpp
+++ b/loolwsd/LOOLStress.cpp
@@ -112,7 +112,7 @@ public:
 Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, 
"/lool/ws/" + documentURL);
 Poco::Net::HTTPResponse response;
 auto ws = helpers::connectLOKit(uri, request, response, sessionId + ' 
');
-std::cerr << "Connected.\n";
+std::cout << "Connected.\n";
 return std::shared_ptr(new Connection(documentURL, 
sessionId, ws));
 }
 
@@ -187,12 +187,12 @@ public:
 }
 catch (const Poco::Exception &e)
 {
-std::cerr << "Error: " << e.name() << ' '
+std::cout << "Error: " << e.name() << ' '
   << e.message() << std::endl;
 }
 catch (const std::exception &e)
 {
-std::cerr << "Error: " << e.what() << std::endl;
+std::cout << "Error: " << e.what() << std::endl;
 }
 }
 
@@ -283,7 +283,7 @@ private:
 {
 if (delay > 1e6)
 {
-std::cerr << "Sleeping for " << delay / 1000 << " ms.\n";
+std::cout << "Sleeping for " << delay / 1000 << " ms.\n";
 }
 
 std::this_thread::sleep_for(std::chrono::microseconds(delay));
@@ -304,7 +304,7 @@ private:
 // Add a new session.
 if (it->second.find(rec.SessionId) != it->second.end())
 {
-std::cerr << "ERROR: session [" << rec.SessionId 
<< "] already exists on doc [" << uri << "]\n";
+std::cout << "ERROR: session [" << rec.SessionId 
<< "] already exists on doc [" << uri << "]\n";
 }
 else
 {
@@ -313,7 +313,7 @@ private:
 }
 else
 {
-std::cerr << "New Document: " << uri << "\n";
+std::cout << "New Document: " << uri << "\n";
 _childToDoc.emplace(rec.Pid, uri);
 _sessions[uri].emplace(rec.SessionId, 
Connection::create(_app._serverURI, uri, rec.SessionId));
 }
@@ -324,19 +324,19 @@ private:
 auto it = _sessions.find(uri);
 if (it != _sessions.end())
 {
-std::cerr << "EndSession [" << rec.SessionId << "]: " 
<< uri << "\n";
+std::cout << "EndSession [" << rec.SessionId << "]: " 
<< uri << "\n";
 
 it->second.erase(rec.SessionId);
 if (it->second.empty())
 {
-std::cerr << "End Doc [" << uri << "].\n";
+std::cout << "End Doc [" << uri << "].\n";
 _sessions.erase(it);
 _childToDoc.erase(rec.Pid);
 }
 }
 else
 {
-std::cerr << "ERROR: Doc [" << uri << "] does not 
exist.\n";
+std::cout << "ERROR: Doc [" << uri << "] does not 
exist.\n";
 }
 }
 }
@@ -358,12 +358,12 @@ private:
 }
 else
 {
-std::cerr << "ERROR: Doc [" << uri << "] does not 
exist.\n";
+std::cout << "ERROR: Doc [" << uri << "] does not 
exist.\n";
 }
 }
 else
 {
-std::cerr << "ERROR: Unknown PID [" << rec.Pid << "] maps 
to no active document.\n";
+std::cout << "ERROR: Unknown PID [" << rec.Pid << "] maps 
to no active document.\n";
 }
 }
 
@@ -430,7 +430,7 @@ void Stress::handleOption(const std::string& optionName,
 helpFormatter.setCommand(commandName());
 helpFormatter.setUsage("OPTIONS");
 helpFormatter.setHeader("LibreOffice On-Line tool.");
-helpFormatter.format(std::cout);
+helpFormatter.format(std::cerr);
 std::exit(Application::EXIT_OK);
 }
 else if (optionName == "bench")
@@ -443,7 +443,7 @@ void Stress::handleOption(const std::string& optionName,
 _serverURI = valu

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

2016-09-16 Thread Stephan Bergmann
 binaryurp/source/writer.cxx |   24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)

New commits:
commit c480677f5f654ada532dfba21e3d34718c977131
Author: Stephan Bergmann 
Date:   Fri Sep 16 10:52:25 2016 +0200

In binaryurp, fix change from rtl_copyMemory to memcpy

...done in 36a2db3722b79ed3df075d7f3fa77fb761bcf5a4 "Replace usage of
rtl_*Memory with equivalent from string.h"

Change-Id: I068feab3140cdcb34ea8c80e273ea2761f0efb7f
Reviewed-on: https://gerrit.libreoffice.org/28941
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx
index 7558f82..54373d1 100644
--- a/binaryurp/source/writer.cxx
+++ b/binaryurp/source/writer.cxx
@@ -19,9 +19,12 @@
 
 #include "sal/config.h"
 
+#include 
+#include 
+#include 
 #include 
+#include 
 #include 
-#include 
 
 #include "com/sun/star/connection/XConnection.hpp"
 #include "com/sun/star/lang/WrappedTargetRuntimeException.hpp"
@@ -411,18 +414,17 @@ void Writer::sendMessage(std::vector< unsigned char > 
const & buffer) {
 OSL_ASSERT(!buffer.empty());
 unsigned char const * p = &buffer[0];
 std::vector< unsigned char >::size_type n = buffer.size();
-OSL_ASSERT(header.size() <= SAL_MAX_INT32 && SAL_MAX_INT32 <= 
SAL_MAX_SIZE);
-sal_Size k = SAL_MAX_INT32 - header.size();
+OSL_ASSERT(header.size() <= SAL_MAX_INT32);
+/*static_*/assert(SAL_MAX_INT32 <= 
std::numeric_limits::max());
+std::size_t k = SAL_MAX_INT32 - header.size();
 if (n < k) {
-k = static_cast< sal_Size >(n);
+k = n;
 }
-css::uno::Sequence< sal_Int8 > s(
-static_cast< sal_Int32 >(header.size() + k));
+css::uno::Sequence s(header.size() + k);
 OSL_ASSERT(!header.empty());
-memcpy(
-s.getArray(), &header[0], static_cast< sal_Size >(header.size()));
+std::memcpy(s.getArray(), &header[0], header.size());
 for (;;) {
-memcpy(s.getArray() + s.getLength() - k, p, k);
+std::memcpy(s.getArray() + s.getLength() - k, p, k);
 try {
 bridge_->getConnection()->write(s);
 } catch (const css::io::IOException & e) {
@@ -431,14 +433,14 @@ void Writer::sendMessage(std::vector< unsigned char > 
const & buffer) {
 "Binary URP write raised IO exception: " + e.Message,
 css::uno::Reference< css::uno::XInterface >(), exc);
 }
-n = static_cast< std::vector< unsigned char >::size_type >(n - k);
+n -= k;
 if (n == 0) {
 break;
 }
 p += k;
 k = SAL_MAX_INT32;
 if (n < k) {
-k = static_cast< sal_Size >(n);
+k = n;
 }
 s.realloc(k);
 }
___
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-09-16 Thread scan-admin

Hi,

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

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
9 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 1 of 1 defect(s)


** CID 1372990:  Resource leaks  (RESOURCE_LEAK)
/xmloff/source/core/xmlimp.cxx: 887 in SvXMLImport::startFastElement(int, const 
com::sun::star::uno::Reference 
&)()



*** CID 1372990:  Resource leaks  (RESOURCE_LEAK)
/xmloff/source/core/xmlimp.cxx: 887 in SvXMLImport::startFastElement(int, const 
com::sun::star::uno::Reference 
&)()
881 maNamespaceHandler->addNSDeclAttributes( rAttrList );
882 SvXMLNamespaceMap *pRewindMap = 
processNSAttributes(rAttrList.get());
883 SvXMLImportContext *pContext = 
dynamic_cast( xContext.get() );
884 if( pContext && pRewindMap )
885 pContext->PutRewindMap( pRewindMap );
886 maContexts.push_back( pContext );
>>> CID 1372990:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "pRewindMap" going out of scope leaks the storage it points to.
887 }
888 
889 // Push context on stack.
890 maFastContexts.push_back( xContext );
891 }
892 



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyRyWAQFVX7P6bsI-2BQOY7H3EcAKISf1sb6wpwdnCIg-2F3qjqB44tKEcQbNeJ3qeddOis5WKzExZNDicRCJoQ-2Bk4IAqdw7lcbrCldgS3ZDbEQh4g3lrRej04MgGMptz-2FbIH0JXpWbMIHFcFbQ-2FCcOkWS3bYIqcRxRXB0yUcK8UTxY1M-3D

To manage Coverity Scan email notifications for 
"libreoffice@lists.freedesktop.org", click 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4k1FZJSDV-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5N5X-2B1MAElavPQhH6nLwozJzqOkt2k8uOkYf2ZoppNa9QVe0T3fEZVQ7Kky1tOkLz_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyRyWAQFVX7P6bsI-2BQOY7H3HyfX16NjAsBhpnMwDTLDfCE-2FMQyOKKlkz8BbKg9-2BP-2Ffy7osw6HsbVhOzBRQJV-2B1lcyZNsA434ikbFXFPGNbyq97dZNgxF1-2Bg17ECTAaWapxiscxMmxpmotzyMxJn54GJPFr5LaDJ8fnRfQPWTNYVQw-3D

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


Re: Build completes, but with errors

2016-09-16 Thread Alexander Thurgood
Le 16/09/2016 à 05:47, Michael Lewis a écrit :


Hi Michael,


> testTdf99074::Import finished in: 147ms
> File tested,Execution Time (ms)
> tdf99140.docx:
> 107
> testTdf99140::Import finished in: 117ms
> /Users/ml/lo/core/sw/qa/extras/ooxmlimport/ooxmlimport.cxx:1884: Assertion
> Test name: textboxWpsOnly::Import
> equality assertion failed
> - Expected: 2
> - Actual  : 0
> 


Julien encountered the same failure a while back and filed a bug report
with bz tdf#100147, as yet unconfirmed (I don't see this in my own OSX
builds).




Alex

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


[Libreoffice-commits] core.git: helpcontent2

2016-09-16 Thread Yousuf Philips
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 77cf4acc2765e43e3289fc933fb510c9a30c
Author: Yousuf Philips 
Date:   Fri Sep 16 13:39:33 2016 +0400

Updated core
Project: help  dbaafc06a3900c768074b2f5c2a0af8c7c6194d8

tdf#102219 Correct shortcuts for navigator and references

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

diff --git a/helpcontent2 b/helpcontent2
index e965f37..dbaafc0 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit e965f370818b8ab4de16db492402cdff4ee574e9
+Subproject commit dbaafc06a3900c768074b2f5c2a0af8c7c6194d8
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Yousuf Philips
 source/text/scalc/04/0102.xhp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit dbaafc06a3900c768074b2f5c2a0af8c7c6194d8
Author: Yousuf Philips 
Date:   Fri Sep 16 13:39:33 2016 +0400

tdf#102219 Correct shortcuts for navigator and references

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

diff --git a/source/text/scalc/04/0102.xhp 
b/source/text/scalc/04/0102.xhp
index e9c9b07..22667d8 100644
--- a/source/text/scalc/04/0102.xhp
+++ b/source/text/scalc/04/0102.xhp
@@ -320,7 +320,7 @@
 
 
 
-F4
+Shift+CommandCtrl+F4
 
 
 Shows or Hides the Database explorer.
@@ -328,7 +328,7 @@
 
 
 
-Shift+F4
+F4
 
 
 Rearranges the relative or absolute references (for example, A1, 
$A$1, $A1, A$1) in the input field.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[QA] New IDs for massive pings

2016-09-16 Thread Xisco Fauli

Hello,

From now on, all massive pings in bugzilla will contain an ID at the 
end of the message so they can be easily filtered in order to avoid your 
email to be flooded. The IDs are:


*'MassPing-NeedInfo-'* for NEEDINFO bugs. Info: 
https://wiki.documentfoundation.org/QA/Bugzilla/Gardening#Task:_Cleaning-out_NEEDINFO


and

*'MassPing-UntouchedBug-'* for bug untouched for more than a year. 
Info: 
https://wiki.documentfoundation.org/QA/Bugzilla/Gardening#Task:_Bugs_untouched_for_a_year


so if you want to filter all of them just use 'MassPing-' in the filter, 
otherwise, use 'MassPing-NeedInfo-' or 'MassPing-UntouchedBug-' at will.


Note: Remember to add the filter before next Tuesday 20th as I'll 
perform the next mass ping for Untouched bugs that day.


Regards
--

Xisco Faulí
Libreoffice QA Team

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


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

2016-09-16 Thread Laurent Balland-Poirier
 sc/qa/unit/data/ods/tdf79398_NatNum5.ods |binary
 sc/qa/unit/subsequent_export-test.cxx|2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b193670284a4129aea04fa62c965663551d609de
Author: Laurent Balland-Poirier 
Date:   Thu Sep 1 21:30:07 2016 +0200

tdf#79398 Add qa unit test for sub-format

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

diff --git a/sc/qa/unit/data/ods/tdf79398_NatNum5.ods 
b/sc/qa/unit/data/ods/tdf79398_NatNum5.ods
index 08f2028..4346445 100644
Binary files a/sc/qa/unit/data/ods/tdf79398_NatNum5.ods and 
b/sc/qa/unit/data/ods/tdf79398_NatNum5.ods differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index bb6a350..ac1f035 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3650,7 +3650,7 @@ void ScExportTest::testNatNumInNumberFormatXLSX()
 xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, 
"xl/styles.xml", FORMAT_XLSX);
 CPPUNIT_ASSERT(pDoc);
 
-assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode", 
"[DBNum2][$-804]General");
+assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode", 
"[DBNum2][$-804]General;[RED][DBNum2][$-804]General");
 
 xDocSh->DoClose();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


license statement

2016-09-16 Thread Ravi Kumar Prasad
All of my past and future contributions to LibreOffice may be licensed
under the MPLv2/LGPLv3+ dual license.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: MSVC2013 build failure

2016-09-16 Thread Caolán McNamara
On Fri, 2016-09-16 at 09:14 +0300, Mike Kaganski wrote:
> Hello,
> 
> building with MSVC 2013, I get the following error:

This should be building again with the most recent bodge to workaround
the problem.

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


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

2016-09-16 Thread Miklos Vajna
 desktop/qa/desktop_lib/test_desktop_lib.cxx|6 +++---
 desktop/source/lib/init.cxx|8 
 include/LibreOfficeKit/LibreOfficeKit.h|4 ++--
 include/LibreOfficeKit/LibreOfficeKit.hxx  |   12 ++--
 include/sfx2/lokhelper.hxx |2 +-
 libreofficekit/source/gtk/lokdocview.cxx   |2 +-
 sfx2/source/view/lokhelper.cxx |4 ++--
 sw/qa/extras/tiledrendering/tiledrendering.cxx |2 +-
 8 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit dabf5c6ef2fbc9f041fbd3c5c4ddaa62ebeb493c
Author: Miklos Vajna 
Date:   Fri Sep 16 10:15:31 2016 +0200

lok::Document: rename getViews() to getViewsCount()

As this only returns the number of views, not the actual views. Since
it's a rename, it's just an API (but not an ABI) change.

Change-Id: Ib4f0ea56a90e5ae9c80ee1781aa2f29aff4259e7
(cherry picked from commit dc00592b4e48a111efc6ff78bdbf7af998e58e22)

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index a6c256d..b5da41b 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -309,11 +309,11 @@ void DesktopLOKTest::testGetFonts()
 void DesktopLOKTest::testCreateView()
 {
 LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
-CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViews(pDocument));
+CPPUNIT_ASSERT_EQUAL(1, 
pDocument->m_pDocumentClass->getViewsCount(pDocument));
 
 int nId0 = pDocument->m_pDocumentClass->getView(pDocument);
 int nId1 = pDocument->m_pDocumentClass->createView(pDocument);
-CPPUNIT_ASSERT_EQUAL(2, pDocument->m_pDocumentClass->getViews(pDocument));
+CPPUNIT_ASSERT_EQUAL(2, 
pDocument->m_pDocumentClass->getViewsCount(pDocument));
 
 // Make sure the created view is the active one, then switch to the old
 // one.
@@ -322,7 +322,7 @@ void DesktopLOKTest::testCreateView()
 CPPUNIT_ASSERT_EQUAL(nId0, 
pDocument->m_pDocumentClass->getView(pDocument));
 
 pDocument->m_pDocumentClass->destroyView(pDocument, nId1);
-CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViews(pDocument));
+CPPUNIT_ASSERT_EQUAL(1, 
pDocument->m_pDocumentClass->getViewsCount(pDocument));
 }
 
 void DesktopLOKTest::testGetPartPageRectangles()
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a4ec903..7b61e66 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -438,7 +438,7 @@ static int doc_createView(LibreOfficeKitDocument* pThis);
 static void doc_destroyView(LibreOfficeKitDocument* pThis, int nId);
 static void doc_setView(LibreOfficeKitDocument* pThis, int nId);
 static int doc_getView(LibreOfficeKitDocument* pThis);
-static int doc_getViews(LibreOfficeKitDocument* pThis);
+static int doc_getViewsCount(LibreOfficeKitDocument* pThis);
 static unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis,
   const char *pFontName,
   int* pFontWidth,
@@ -485,7 +485,7 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
destroyView = doc_destroyView;
 m_pDocumentClass->setView = doc_setView;
 m_pDocumentClass->getView = doc_getView;
-m_pDocumentClass->getViews = doc_getViews;
+m_pDocumentClass->getViewsCount = doc_getViewsCount;
 
 m_pDocumentClass->renderFont = doc_renderFont;
 m_pDocumentClass->getPartHash = doc_getPartHash;
@@ -2308,11 +2308,11 @@ static int doc_getView(LibreOfficeKitDocument* 
/*pThis*/)
 return SfxLokHelper::getView();
 }
 
-static int doc_getViews(LibreOfficeKitDocument* /*pThis*/)
+static int doc_getViewsCount(LibreOfficeKitDocument* /*pThis*/)
 {
 SolarMutexGuard aGuard;
 
-return SfxLokHelper::getViews();
+return SfxLokHelper::getViewsCount();
 }
 
 unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 81d65c1..a0ed819 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -219,8 +219,8 @@ struct _LibreOfficeKitDocumentClass
 void (*setView) (LibreOfficeKitDocument* pThis, int nId);
 /// @see lok::Document::getView().
 int (*getView) (LibreOfficeKitDocument* pThis);
-/// @see lok::Document::getViews().
-int (*getViews) (LibreOfficeKitDocument* pThis);
+/// @see lok::Document::getViewsCount().
+int (*getViewsCount) (LibreOfficeKitDocument* pThis);
 
 /// @see lok::Document::renderFont().
 unsigned char* (*renderFont) (LibreOfficeKitDocument* pThis,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index aae5f38..9e185b6 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -363,7 +363,7 @@ public:
  * By default a loa

[Libreoffice-commits] core.git: desktop/qa desktop/source include/LibreOfficeKit include/sfx2 libreofficekit/source sfx2/source sw/qa

2016-09-16 Thread Miklos Vajna
 desktop/qa/desktop_lib/test_desktop_lib.cxx|6 +++---
 desktop/source/lib/init.cxx|8 
 include/LibreOfficeKit/LibreOfficeKit.h|4 ++--
 include/LibreOfficeKit/LibreOfficeKit.hxx  |   12 ++--
 include/sfx2/lokhelper.hxx |2 +-
 libreofficekit/source/gtk/lokdocview.cxx   |2 +-
 sfx2/source/view/lokhelper.cxx |4 ++--
 sw/qa/extras/tiledrendering/tiledrendering.cxx |2 +-
 8 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit dc00592b4e48a111efc6ff78bdbf7af998e58e22
Author: Miklos Vajna 
Date:   Fri Sep 16 10:15:31 2016 +0200

lok::Document: rename getViews() to getViewsCount()

As this only returns the number of views, not the actual views. Since
it's a rename, it's just an API (but not an ABI) change.

Change-Id: Ib4f0ea56a90e5ae9c80ee1781aa2f29aff4259e7

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 28d78bc..8f3807e 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -310,11 +310,11 @@ void DesktopLOKTest::testGetFonts()
 void DesktopLOKTest::testCreateView()
 {
 LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
-CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViews(pDocument));
+CPPUNIT_ASSERT_EQUAL(1, 
pDocument->m_pDocumentClass->getViewsCount(pDocument));
 
 int nId0 = pDocument->m_pDocumentClass->getView(pDocument);
 int nId1 = pDocument->m_pDocumentClass->createView(pDocument);
-CPPUNIT_ASSERT_EQUAL(2, pDocument->m_pDocumentClass->getViews(pDocument));
+CPPUNIT_ASSERT_EQUAL(2, 
pDocument->m_pDocumentClass->getViewsCount(pDocument));
 
 // Make sure the created view is the active one, then switch to the old
 // one.
@@ -323,7 +323,7 @@ void DesktopLOKTest::testCreateView()
 CPPUNIT_ASSERT_EQUAL(nId0, 
pDocument->m_pDocumentClass->getView(pDocument));
 
 pDocument->m_pDocumentClass->destroyView(pDocument, nId1);
-CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViews(pDocument));
+CPPUNIT_ASSERT_EQUAL(1, 
pDocument->m_pDocumentClass->getViewsCount(pDocument));
 }
 
 void DesktopLOKTest::testGetPartPageRectangles()
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index affc019..967d730 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -437,7 +437,7 @@ static int doc_createView(LibreOfficeKitDocument* pThis);
 static void doc_destroyView(LibreOfficeKitDocument* pThis, int nId);
 static void doc_setView(LibreOfficeKitDocument* pThis, int nId);
 static int doc_getView(LibreOfficeKitDocument* pThis);
-static int doc_getViews(LibreOfficeKitDocument* pThis);
+static int doc_getViewsCount(LibreOfficeKitDocument* pThis);
 static unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis,
   const char *pFontName,
   int* pFontWidth,
@@ -484,7 +484,7 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
destroyView = doc_destroyView;
 m_pDocumentClass->setView = doc_setView;
 m_pDocumentClass->getView = doc_getView;
-m_pDocumentClass->getViews = doc_getViews;
+m_pDocumentClass->getViewsCount = doc_getViewsCount;
 
 m_pDocumentClass->renderFont = doc_renderFont;
 m_pDocumentClass->getPartHash = doc_getPartHash;
@@ -2306,11 +2306,11 @@ static int doc_getView(LibreOfficeKitDocument* 
/*pThis*/)
 return SfxLokHelper::getView();
 }
 
-static int doc_getViews(LibreOfficeKitDocument* /*pThis*/)
+static int doc_getViewsCount(LibreOfficeKitDocument* /*pThis*/)
 {
 SolarMutexGuard aGuard;
 
-return SfxLokHelper::getViews();
+return SfxLokHelper::getViewsCount();
 }
 
 unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 81d65c1..a0ed819 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -219,8 +219,8 @@ struct _LibreOfficeKitDocumentClass
 void (*setView) (LibreOfficeKitDocument* pThis, int nId);
 /// @see lok::Document::getView().
 int (*getView) (LibreOfficeKitDocument* pThis);
-/// @see lok::Document::getViews().
-int (*getViews) (LibreOfficeKitDocument* pThis);
+/// @see lok::Document::getViewsCount().
+int (*getViewsCount) (LibreOfficeKitDocument* pThis);
 
 /// @see lok::Document::renderFont().
 unsigned char* (*renderFont) (LibreOfficeKitDocument* pThis,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index eae43af..cd34885 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -363,7 +363,7 @@ public:
  * By default a loaded document has 1 view.
  * @return the ID of the new view.
  */

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

2016-09-16 Thread Miklos Vajna
 loolwsd/LOOLKit.cpp |4 ++--
 loolwsd/LibreOfficeKit.hpp  |4 ++--
 loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h |4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 3d27e285b6a81ee515c3be1d6a996a5333dc86c2
Author: Miklos Vajna 
Date:   Fri Sep 16 12:32:19 2016 +0200

lok::Document: rename getViews() to getViewsCount()

Adapt client code to the changed core.git API.

Change-Id: I752d27919b7983909c8e96900115cca26bac11c6

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 6f0f4c4..e1b0a12 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -641,7 +641,7 @@ public:
 }
 
 std::unique_lock lock(_loKitDocument->getLock());
-if (_loKitDocument->getViews() <= 0)
+if (_loKitDocument->getViewsCount() <= 0)
 {
 Log::error("Tile rendering requested without views.");
 return;
@@ -716,7 +716,7 @@ public:
 }
 
 std::unique_lock lock(_loKitDocument->getLock());
-if (_loKitDocument->getViews() <= 0)
+if (_loKitDocument->getViewsCount() <= 0)
 {
 Log::error("Tile rendering requested without views.");
 return;
diff --git a/loolwsd/LibreOfficeKit.hpp b/loolwsd/LibreOfficeKit.hpp
index 5881c77..3abdf7f 100644
--- a/loolwsd/LibreOfficeKit.hpp
+++ b/loolwsd/LibreOfficeKit.hpp
@@ -427,9 +427,9 @@ public:
 /**
  * Get number of views of this document.
  */
-inline int getViews()
+inline int getViewsCount()
 {
-return _pDoc->pClass->getViews(_pDoc);
+return _pDoc->pClass->getViewsCount(_pDoc);
 }
 
 /**
diff --git a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h 
b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index 81d65c1..a0ed819 100644
--- a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
@@ -219,8 +219,8 @@ struct _LibreOfficeKitDocumentClass
 void (*setView) (LibreOfficeKitDocument* pThis, int nId);
 /// @see lok::Document::getView().
 int (*getView) (LibreOfficeKitDocument* pThis);
-/// @see lok::Document::getViews().
-int (*getViews) (LibreOfficeKitDocument* pThis);
+/// @see lok::Document::getViewsCount().
+int (*getViewsCount) (LibreOfficeKitDocument* pThis);
 
 /// @see lok::Document::renderFont().
 unsigned char* (*renderFont) (LibreOfficeKitDocument* pThis,
___
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-09-16 Thread Caolán McNamara
 vcl/inc/unx/gtk/gtkframe.hxx  |6 +-
 vcl/unx/gtk3/gtk3gtkframe.cxx |   19 +--
 2 files changed, 10 insertions(+), 15 deletions(-)

New commits:
commit ef7abe81df10cb8a8c04afbb1fbe700f94e73f04
Author: Caolán McNamara 
Date:   Fri Sep 16 11:19:52 2016 +0100

Resolves: rhbz#1373933 gtk 3.21 emits a lot more "style-set" signals

also deb#837356

since gtk3 commit of...

commit 0f116135f4a5033ce4e9dfa19f10624701fa615c
Author: Matthias Clasen 
Date:   Fri May 6 10:12:14 2016 -0400

Avoid emitting ::style-set by name

GtkStyle is deprecated, but we still emit ::style-set quite
a bit, so lets at least not be slow while doing it.

docs say...

'GtkWidget::style-set has been deprecated since version 3.0 and should not 
be
used in newly-written code.

Use the “style-updated” signal'

and this code just came over from gtk2 without any thought about it at the
time, so change it over to the "style-updated" which makes everything happy
again

Change-Id: I9e920d2fb2d820ff1b1b5a9ecb228484df3d6146

diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index b9fafd6..0cdff6c 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -239,7 +239,11 @@ class GtkSalFrame : public SalFrame
 
 // signals
 static gboolean signalButton( GtkWidget*, GdkEventButton*, gpointer );
-static void signalStyleSet( GtkWidget*, GtkStyle* pPrevious, 
gpointer );
+#if GTK_CHECK_VERSION(3,0,0)
+static void signalStyleUpdated(GtkWidget*, gpointer);
+#else
+static void signalStyleSet(GtkWidget*, GtkStyle* pPrevious, 
gpointer);
+#endif
 #if GTK_CHECK_VERSION(3,0,0)
 static gboolean signalDraw( GtkWidget*, cairo_t *cr, gpointer );
 static void sizeAllocated(GtkWidget*, GdkRectangle *pAllocation, 
gpointer frame);
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 3a6eef7..49bce84 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1009,7 +1009,7 @@ void GtkSalFrame::InitCommon()
 
 
 // connect signals
-g_signal_connect( G_OBJECT(m_pWindow), "style-set", 
G_CALLBACK(signalStyleSet), this );
+g_signal_connect( G_OBJECT(m_pWindow), "style-updated", 
G_CALLBACK(signalStyleUpdated), this );
 gtk_widget_set_has_tooltip(pEventWidget, true);
 m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), 
"query-tooltip", G_CALLBACK(signalTooltipQuery), this ));
 m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), 
"button-press-event", G_CALLBACK(signalButton), this ));
@@ -3101,22 +3101,13 @@ gboolean GtkSalFrame::signalDelete( GtkWidget*, 
GdkEvent*, gpointer frame )
 return true;
 }
 
-void GtkSalFrame::signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer 
frame )
+void GtkSalFrame::signalStyleUpdated(GtkWidget*, gpointer frame)
 {
 GtkSalFrame* pThis = static_cast(frame);
 
-// every frame gets an initial style set on creation
-// do not post these as the whole application tends to
-// redraw itself to adjust to the new style
-// where there IS no new style resulting in tremendous unnecessary 
flickering
-if( pPrevious != nullptr )
-{
-// signalStyleSet does NOT usually have the gdk lock
-// so post user event to safely dispatch the SalEvent::SettingsChanged
-// note: settings changed for multiple frames is avoided in 
winproc.cxx ImplHandleSettings
-GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, 
SalEvent::SettingsChanged );
-GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, 
SalEvent::FontChanged );
-}
+// note: settings changed for multiple frames is avoided in winproc.cxx 
ImplHandleSettings
+GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, 
SalEvent::SettingsChanged );
+GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, 
SalEvent::FontChanged );
 }
 
 gboolean GtkSalFrame::signalWindowState( GtkWidget*, GdkEvent* pEvent, 
gpointer frame )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Tor Lillqvist
 loolwsd/LOOLSession.cpp|4 ++--
 loolwsd/PrisonerSession.cpp|2 +-
 loolwsd/test/countloolkits.hpp |6 --
 3 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 8518620ddd6d50e261e3775287a6437c65ba823c
Author: Tor Lillqvist 
Date:   Fri Sep 16 13:09:00 2016 +0300

Try to unify format of log messages a tiny bit

Lots more of that to do if one could be bothered. Just some details I
noticed in passing.

diff --git a/loolwsd/LOOLSession.cpp b/loolwsd/LOOLSession.cpp
index 055a489..f9510f1 100644
--- a/loolwsd/LOOLSession.cpp
+++ b/loolwsd/LOOLSession.cpp
@@ -81,7 +81,7 @@ bool LOOLSession::sendTextFrame(const char* buffer, const int 
length)
 return false;
 }
 
-Log::trace(getName() + " Send: " + getAbbreviatedMessage(buffer, length));
+Log::trace(getName() + ": Send: " + getAbbreviatedMessage(buffer, length));
 try
 {
 std::unique_lock lock(_mutex);
@@ -113,7 +113,7 @@ bool LOOLSession::sendBinaryFrame(const char *buffer, int 
length)
 return false;
 }
 
-Log::trace(getName() + " Send: " + std::to_string(length) + " bytes");
+Log::trace(getName() + ": Send: " + std::to_string(length) + " bytes");
 try
 {
 std::unique_lock lock(_mutex);
diff --git a/loolwsd/PrisonerSession.cpp b/loolwsd/PrisonerSession.cpp
index 35ce139..b7368f9 100644
--- a/loolwsd/PrisonerSession.cpp
+++ b/loolwsd/PrisonerSession.cpp
@@ -76,7 +76,7 @@ bool PrisonerSession::_handleInput(const char *buffer, int 
length)
 if (tokens[0] == "unocommandresult:")
 {
 const std::string stringMsg(buffer, length);
-Log::info(getName() + "Command: " + stringMsg);
+Log::info(getName() + ": Command: " + stringMsg);
 const auto index = stringMsg.find_first_of('{');
 if (index != std::string::npos)
 {
commit 42fdb3b079d88c00e327b37ede0640b6604d0c83
Author: Tor Lillqvist 
Date:   Fri Sep 16 12:50:54 2016 +0300

Drop always-defaulted 'timeoutMs' parameter to countLoolKitProcesses()

Also, drop the pointless use of POLL_TIMEOUT_MS, we first multiplied by
it and then divided.

diff --git a/loolwsd/test/countloolkits.hpp b/loolwsd/test/countloolkits.hpp
index e5e4632..d0c479c 100644
--- a/loolwsd/test/countloolkits.hpp
+++ b/loolwsd/test/countloolkits.hpp
@@ -66,9 +66,11 @@ int getLoolKitProcessCount()
 }
 
 static
-int countLoolKitProcesses(const int expected, const int timeoutMs = 
POLL_TIMEOUT_MS * 10)
+int countLoolKitProcesses(const int expected)
 {
-const size_t repeat = 1 + (2 * timeoutMs / POLL_TIMEOUT_MS);
+// Fairly random number, I don't think there is any actual reason for 
using exactly this repeat
+// count.
+const size_t repeat = 21;
 auto count = getLoolKitProcessCount();
 for (size_t i = 0; i < repeat; ++i)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

2016-09-16 Thread Stephan Bergmann

On 09/07/2016 10:37 PM, Eike Rathke wrote:

You could do us a favour, are you willing to invest some machine time
and try if passing either -msse or -msse2 as compiler flags would solve
the failing function tests problem? For this you'd need to do

make clean
make ENVCFLAGS=-msse ENVCFLAGSCXX=-msse && make sc.check

and if that still fails try

make clean
make ENVCFLAGS=-msse2 ENVCFLAGSCXX=-msse2 && make sc.check


Turns out, the relevant GCC switches are

  -mfpmath=sse -msse2

-mfpmath=sse (instead of the x86-32 default of -mfpmath=387) prevents 
usage of the extended 80-bit precision for temporary results. (Which 
caused e.g. the subtraction in ScChiDistFunction::GetValue, 
sc/source/core/tool/interpr3.cxx, to produce results different from IEEE 
double, causing the computation of CHIINV(0.999, 
1.00E+001) in sc/qa/unit/data/functions/fods/chiinv.fods to 
produce unexpected results.) 
 
also claims: "The resulting code should be considerably faster [compared 
to -mfpmath=387] in the majority of cases and avoid the numerical 
instability problems of 387 code [...]"


But -mfpmath=sse only takes effect when compiling for an architecture 
that actually supports the relevant SSE instructions (otherwise silently 
falling back to the "387" instructions, it appears).  So we need an 
additional -msse2 to enable the instructions relevant for 64-bit double 
(-msse would only enable instructions relevant for 32-bit float).


SSE2 support reportedly got added with Pentium 4, around 2001.  Any 
thoughts on whether we'd want to enforce that for 32-bit x86 Linux 
builds (or already effectively enforce anyway)?  In which case we could 
add the relevant flags to solenv/gbuild/platform/LINUX_INTEL_GCC.mk and 
revert 
 
"sc: disable function test documents for 32-bit PLATFORMID=linux_x86" again.


(Notwithstanding the fact that tests that rely on Calc doing 
computations in a specific way, when Calc doesn't give any guarantees of 
how those computations should be carried out exactly AFAIK, are dubious 
and a pain at best.)

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


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

2016-09-16 Thread László Németh
 sw/source/ui/index/cnttab.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 0f433fb2f51953296e3050392e827dadfd19b22f
Author: László Németh 
Date:   Thu Sep 15 22:14:49 2016 +0200

tdf#56907 extend dot leader character list in ToC for typography

Add ONE DOT LEADER, TWO DOT LEADER and HORIZONTAL ELLIPSIS
characters to the "Fill character" list of tab stop entries in
Table of Contents formatting. These characters give typographically
better dot leaders, than the default dense FULL STOP dot leader.

See also http://scripts.sil.org/CharStories_2024

Change-Id: I1d10c8bf59b2722c3ec78d59063a25534570129b
Reviewed-on: https://gerrit.libreoffice.org/28937
Reviewed-by: László Németh 
Tested-by: László Németh 

diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 965b66f..ecea420 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1925,6 +1925,9 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(vcl::Window* 
pParent, const SfxItemSet& rAt
 m_pFillCharCB->InsertEntry(OUString('.'));
 m_pFillCharCB->InsertEntry(OUString('-'));
 m_pFillCharCB->InsertEntry(OUString('_'));
+m_pFillCharCB->InsertEntry(OUString(sal_Unicode(0x2024))); // ONE DOT 
LEADER
+m_pFillCharCB->InsertEntry(OUString(sal_Unicode(0x2025))); // TWO DOT 
LEADER
+m_pFillCharCB->InsertEntry(OUString(sal_Unicode(0x2026))); // HORIZONTAL 
ELLIPSIS
 
 m_pEditStylePB->Enable(false);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Jochen Nitschke
 cui/source/tabpages/tpline.cxx |3 +--
 oox/source/drawingml/chart/objectformatter.cxx |2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit ea9da1dd7790de9a8057a00a22c9b28a4a7bc09c
Author: Jochen Nitschke 
Date:   Thu Sep 15 00:17:41 2016 +0200

add comment for raw number

values are already in initial commit
fd069bee7e57ad529c3c0974559fd2d84ec3151a
(svx/source/dialog/tpline.cxx)

corresponding chart2 commit
668c6b0245b6076ac8fb3f5d734795117188675e
(chart2/source/controller/dialogs/dlg_ObjectProperties.cxx)

nNoArrowDlg = 1100 was initially commented out and removed later

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

diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index fa2398f..afd5858 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -672,8 +672,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
 }
 // Page does not yet exist in the ctor, that's why we do it here!
 
-else if ( m_nDlgType == 1100 ||
-  m_nDlgType == 1101 )
+else if (m_nDlgType == 1101) // nNoArrowNoShadowDlg from 
chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
 {
 m_pFlLineEnds->Hide();
 m_pFLEdgeStyle->Hide();
commit ae65dbbafe3a07a701f8f45059d0a3d55b1afc59
Author: Jochen Nitschke 
Date:   Fri Sep 16 09:34:12 2016 +0200

fix copy&paste in DownBarFills

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

diff --git a/oox/source/drawingml/chart/objectformatter.cxx 
b/oox/source/drawingml/chart/objectformatter.cxx
index 197867b..a26edfa 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -369,7 +369,7 @@ static const AutoFormatEntry spDownBarFills[] =
 AUTOFORMAT_ACCENTSMOD( 27, THEMED_STYLE_INTENSE,  XML_shade, 
25000 ),
 AUTOFORMAT_COLORMOD(   33, 33, THEMED_STYLE_SUBTLE,  XML_dk1, XML_tint,  
85000 ),
 AUTOFORMAT_COLORMOD(   34, 34, THEMED_STYLE_SUBTLE,  XML_dk1, XML_tint,  
95000 ),
-AUTOFORMAT_ACCENTSMOD( 27, THEMED_STYLE_SUBTLE,   XML_shade, 
25000 ),
+AUTOFORMAT_ACCENTSMOD( 35, THEMED_STYLE_SUBTLE,   XML_shade, 
25000 ),
 AUTOFORMAT_COLORMOD(   41, 41, THEMED_STYLE_INTENSE, XML_dk1, XML_tint,  
85000 ),
 AUTOFORMAT_COLOR(  42, 42, THEMED_STYLE_INTENSE, XML_dk1 ),
 AUTOFORMAT_ACCENTSMOD( 43, THEMED_STYLE_INTENSE,  XML_shade, 
25000 ),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Tor Lillqvist
 loolwsd/ChildSession.hpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 941f400e719a38851a1f227828b72ca61a9dcab2
Author: Tor Lillqvist 
Date:   Fri Sep 16 12:03:23 2016 +0300

Minor comment fix

diff --git a/loolwsd/ChildSession.hpp b/loolwsd/ChildSession.hpp
index e2b738c..e0b9df5 100644
--- a/loolwsd/ChildSession.hpp
+++ b/loolwsd/ChildSession.hpp
@@ -49,7 +49,7 @@ public:
 void notifyCurrentViewOfOtherViews(const std::string& sessionId) const = 0;
 };
 
-/// Represents the session to the WSD process, in the Kit process.
+/// Represents the session to the WSD process, in a Kit process.
 class ChildSession final : public LOOLSession
 {
 public:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread e12346
 vcl/source/gdi/animate.cxx|6 -
 vcl/source/gdi/bitmap3.cxx|  196 +++---
 vcl/source/gdi/bitmapex.cxx   |   16 +--
 vcl/source/gdi/bmpacc.cxx |8 -
 vcl/source/gdi/bmpacc2.cxx|4 
 vcl/source/gdi/dibtools.cxx   |   68 ++---
 vcl/source/gdi/gdimtf.cxx |   28 ++---
 vcl/source/gdi/impanmvw.cxx   |   32 +++---
 vcl/source/gdi/impgraph.cxx   |4 
 vcl/source/gdi/impvect.cxx|  106 ++--
 vcl/source/gdi/octree.cxx |   26 ++---
 vcl/source/gdi/pdfwriter_impl.cxx |   10 -
 vcl/source/gdi/print.cxx  |   12 +-
 vcl/source/gdi/print2.cxx |   32 +++---
 vcl/source/gdi/region.cxx |4 
 vcl/source/gdi/regionband.cxx |8 -
 vcl/source/gdi/salmisc.cxx|   42 
 vcl/source/gdi/svgdata.cxx|2 
 vcl/source/gdi/svmconverter.cxx   |   10 -
 19 files changed, 307 insertions(+), 307 deletions(-)

New commits:
commit 171201c574b325653794bcd851d0aa7a80dc3249
Author: e12346 
Date:   Mon Aug 1 23:08:30 2016 +0530

tdf#96505 - Remove "long" integer literals in vcl/source/gdi/

Removed the "long" integer literals in "vcl/source/gdi/". Some literals are
left to match external methods

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

diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 225d1f7..c585e0a 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -27,8 +27,8 @@
 
 #include "impanmvw.hxx"
 
-#define MIN_TIMEOUT 2L
-#define INC_TIMEOUT 0L
+#define MIN_TIMEOUT 2
+#define INC_TIMEOUT 0
 
 sal_uLong Animation::mnAnimCount = 0UL;
 
@@ -336,7 +336,7 @@ void Animation::Draw( OutputDevice* pOut, const Point& 
rDestPt, const Size& rDes
 
 void Animation::ImplRestartTimer( sal_uLong nTimeout )
 {
-maTimer.SetTimeout( std::max( nTimeout, (sal_uLong)(MIN_TIMEOUT + ( 
mnAnimCount - 1 ) * INC_TIMEOUT) ) * 10L );
+maTimer.SetTimeout( std::max( nTimeout, (sal_uLong)(MIN_TIMEOUT + ( 
mnAnimCount - 1 ) * INC_TIMEOUT) ) * 10 );
 maTimer.Start();
 }
 
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 32dd2cc..f4223fe 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -38,7 +38,7 @@
 #include "BitmapScaleConvolution.hxx"
 
 #define RGB15( _def_cR, _def_cG, _def_cB )  
(((sal_uLong)(_def_cR)<<10UL)|((sal_uLong)(_def_cG)<<5UL)|(sal_uLong)(_def_cB))
-#define GAMMA( _def_cVal, _def_InvGamma )   ((sal_uInt8)MinMax(FRound(pow( 
_def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
+#define GAMMA( _def_cVal, _def_InvGamma )   ((sal_uInt8)MinMax(FRound(pow( 
_def_cVal/255.0,_def_InvGamma)*255.0),0,255))
 
 #define CALC_ERRORS
 \
 nTemp = p1T[nX++] >> 12;  \
@@ -363,9 +363,9 @@ bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold )
 
 if( pReadAcc->HasPalette() )
 {
-for( long nY = 0L; nY < nHeight; nY++ )
+for( long nY = 0; nY < nHeight; nY++ )
 {
-for( long nX = 0L; nX < nWidth; nX++ )
+for( long nX = 0; nX < nWidth; nX++ )
 {
 const sal_uInt8 cIndex = pReadAcc->GetPixelIndex( nY, 
nX );
 if( pReadAcc->GetPaletteColor( cIndex ).GetLuminance() 
>=
@@ -380,9 +380,9 @@ bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold )
 }
 else
 {
-for( long nY = 0L; nY < nHeight; nY++ )
+for( long nY = 0; nY < nHeight; nY++ )
 {
-for( long nX = 0L; nX < nWidth; nX++ )
+for( long nX = 0; nX < nWidth; nX++ )
 {
 if( pReadAcc->GetPixel( nY, nX ).GetLuminance() >=
 cThreshold )
@@ -438,9 +438,9 @@ bool Bitmap::ImplMakeMonoDither()
 
 if( pReadAcc->HasPalette() )
 {
-for( long nY = 0L; nY < nHeight; nY++ )
+for( long nY = 0; nY < nHeight; nY++ )
 {
-for( long nX = 0L, nModY = nY % 16; nX < nWidth; nX++ )
+for( long nX = 0, nModY = nY % 16; nX < nWidth; nX++ )
 {
 const sal_uInt8 cIndex = pReadAcc->GetPixelIndex( nY, 
nX );
 if( pReadAcc->GetPaletteColor( cIndex ).GetLuminance() 
>
@@ -455,9 +455,9 @@ bool Bitmap::ImplMakeMonoDither()
 }
 else
 {
-for( long nY = 0L; nY < nHeight; nY++ )
+for( long nY = 0; nY < nHeight; nY++ )
 {
-for( long nX = 0L, nModY = nY % 16; nX < nWidth; nX++ )
+  

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

2016-09-16 Thread Miklos Vajna
 filter/qa/cppunit/priority-test.cxx |4 ++--
 filter/qa/cppunit/xslt-test.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 81ce0f37728295660a3b6a7a09920f16f3fc7663
Author: Miklos Vajna 
Date:   Fri Sep 16 09:19:49 2016 +0200

filter: fix loplugin:cppunitassertequals warnings

Change-Id: Ibb80377a581d70501dbd243307e883057508e67f

diff --git a/filter/qa/cppunit/priority-test.cxx 
b/filter/qa/cppunit/priority-test.cxx
index 70093fb..9eff49f 100644
--- a/filter/qa/cppunit/priority-test.cxx
+++ b/filter/qa/cppunit/priority-test.cxx
@@ -69,9 +69,9 @@ void PriorityFilterTest::testPriority()
 aMsg.append("' should be '");
 aMsg.append(aFormatCorrect);
 aMsg.append("'");
-
CPPUNIT_ASSERT_MESSAGE(rtl::OUStringToOString(aMsg.makeStringAndClear(),
+
CPPUNIT_ASSERT_EQUAL_MESSAGE(rtl::OUStringToOString(aMsg.makeStringAndClear(),
   
RTL_TEXTENCODING_UTF8).getStr(),
-   aTypeName == aFormatCorrect);
+   aFormatCorrect, aTypeName);
 }
 catch (const uno::Exception &e)
 {
diff --git a/filter/qa/cppunit/xslt-test.cxx b/filter/qa/cppunit/xslt-test.cxx
index 01fe09d..a19a2a5 100644
--- a/filter/qa/cppunit/xslt-test.cxx
+++ b/filter/qa/cppunit/xslt-test.cxx
@@ -76,7 +76,7 @@ void XsltFilterTest::testXsltCopyNew()
 oslFileHandle tempFile;
 OUString tempURL;
 osl::File::RC rc = osl::File::createTempFile(nullptr, &tempFile, &tempURL);
-CPPUNIT_ASSERT(osl::FileBase::E_None == rc);
+CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, rc);
 osl_closeFile(tempFile); // close it so xSFA can open it on WNT
 
 OUString source(
@@ -133,7 +133,7 @@ void XsltFilterTest::testXsltCopyOld()
 oslFileHandle tempFile;
 OUString tempURL;
 osl::File::RC rc = osl::File::createTempFile(nullptr, &tempFile, &tempURL);
-CPPUNIT_ASSERT(osl::FileBase::E_None == rc);
+CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, rc);
 osl_closeFile(tempFile); // close it so xSFA can open it on WNT
 
 OUString source(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Code Contributor Statement

2016-09-16 Thread Chamal Udugama
All of my past & future contributions to LibreOffice may be licensed
under the MPLv2/LGPLv3+ dual license.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: basic/source compilerplugins/clang connectivity/source cppcanvas/source cui/source embeddedobj/source extensions/source filter/source framework/source helpcompiler/inc

2016-09-16 Thread Noel Grandin
 basic/source/classes/sb.cxx   |5 -
 basic/source/classes/sbunoobj.cxx |6 -
 basic/source/comp/parser.cxx  |1 
 basic/source/inc/parser.hxx   |1 
 basic/source/inc/runtime.hxx  |1 
 basic/source/inc/sbunoobj.hxx |2 
 basic/source/runtime/runtime.cxx  |1 
 compilerplugins/clang/singlevalfields.py  |   14 ++-
 connectivity/source/drivers/dbase/DTable.cxx  |3 
 connectivity/source/drivers/mork/MQueryHelper.cxx |9 --
 connectivity/source/drivers/mork/MQueryHelper.hxx |3 
 connectivity/source/drivers/mork/MResultSet.cxx   |9 --
 connectivity/source/drivers/mork/MResultSet.hxx   |3 
 connectivity/source/drivers/mork/MorkParser.cxx   |5 -
 connectivity/source/drivers/mork/MorkParser.hxx   |2 
 connectivity/source/drivers/odbc/OConnection.cxx  |2 
 connectivity/source/drivers/odbc/OResultSet.cxx   |3 
 connectivity/source/drivers/postgresql/pq_connection.cxx  |   12 +--
 connectivity/source/drivers/postgresql/pq_connection.hxx  |3 
 connectivity/source/drivers/postgresql/pq_preparedstatement.cxx   |6 -
 connectivity/source/drivers/postgresql/pq_resultset.cxx   |4 -
 connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx   |2 
 connectivity/source/drivers/postgresql/pq_statement.cxx   |   38 
+-
 connectivity/source/drivers/postgresql/pq_tools.cxx   |6 -
 connectivity/source/drivers/postgresql/pq_updateableresultset.cxx |5 -
 connectivity/source/drivers/postgresql/pq_xcolumns.cxx|6 -
 connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx   |4 -
 connectivity/source/drivers/postgresql/pq_xindexes.cxx|6 -
 connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx |6 -
 connectivity/source/drivers/postgresql/pq_xkeys.cxx   |6 -
 connectivity/source/inc/dbase/DTable.hxx  |1 
 connectivity/source/inc/odbc/OResultSet.hxx   |1 
 cppcanvas/source/mtfrenderer/emfplus.cxx  |6 -
 cui/source/customize/macropg.cxx  |4 -
 cui/source/dialogs/scriptdlg.cxx  |2 
 cui/source/inc/cuitabarea.hxx |3 
 cui/source/inc/numpages.hxx   |3 
 cui/source/inc/scriptdlg.hxx  |1 
 cui/source/tabpages/numpages.cxx  |   29 
++-
 cui/source/tabpages/tpcolor.cxx   |   19 -
 embeddedobj/source/general/intercept.cxx  |3 
 embeddedobj/source/inc/intercept.hxx  |1 
 extensions/source/bibliography/loadlisteneradapter.cxx|   11 +-
 extensions/source/bibliography/loadlisteneradapter.hxx|5 -
 filter/source/graphicfilter/eps/eps.cxx   |5 -
 filter/source/msfilter/msdffimp.cxx   |4 -
 filter/source/msfilter/viscache.hxx   |5 -
 filter/source/t602/t602filter.cxx |5 -
 filter/source/t602/t602filter.hxx |3 
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |3 
 helpcompiler/inc/HelpCompiler.hxx |   16 
 helpcompiler/source/HelpLinker.cxx|8 --
 idl/inc/lex.hxx   |2 
 idl/source/cmptools/lex.cxx   |1 
 54 files changed, 93 insertions(+), 222 deletions(-)

New commits:
commit a2b77b43685884fb4e9be04152a49294fa50db36
Author: Noel Grandin 
Date:   Thu Sep 15 15:54:19 2016 +0200

loplugin:singlevalfields in basic..idl

Also fix obvious bug in the initialisation of the
connectivity::odbc::OConnection::m_bClosed field.
Probably closes some kind of connection leak there.

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

diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 58e6834..b47c3a8 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1390,11 +1390,8 @@ void StarBASIC::QuitAndExitApplication()
 void StarBASIC::Stop()
 {
 SbiInstance* p = GetSbData()->pInst;
-while( p )
-  

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

2016-09-16 Thread Caolán McNamara
 sw/source/filter/ww8/ww8par.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 389939b02bde4ea72268960310bbd1f2984200bf
Author: Caolán McNamara 
Date:   Fri Sep 16 09:24:27 2016 +0100

fix build

Change-Id: I700d3b791ad7380e4d875cf33b98879303f01fb0

diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 52b3626..39c7df7 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -221,7 +221,7 @@ public:
 rtl_TextEncoding m_eRTLFontSrcCharSet;// rtl_TextEncoding for the font
 rtl_TextEncoding m_eCJKFontSrcCharSet;// rtl_TextEncoding for the font
 SwFormat*  m_pFormat;
-std::unique_ptr m_xWWFly;
+std::shared_ptr m_xWWFly;
 SwNumRule*  m_pOutlineNumrule;
 longm_nFilePos;
 sal_uInt16  m_nBase;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 3 commits - loolwsd/ChildSession.hpp loolwsd/ClientSession.hpp loolwsd/LOOLSession.cpp loolwsd/LOOLSession.hpp loolwsd/PrisonerSession.hpp

2016-09-16 Thread Tor Lillqvist
 loolwsd/ChildSession.hpp|3 +--
 loolwsd/ClientSession.hpp   |2 +-
 loolwsd/LOOLSession.cpp |1 -
 loolwsd/LOOLSession.hpp |2 +-
 loolwsd/PrisonerSession.hpp |3 +--
 5 files changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 9d03ff29460aeb4903d3684d0c1d4ba246c3ce94
Author: Tor Lillqvist 
Date:   Fri Sep 16 10:00:03 2016 +0300

No need to include ChildSession.hpp here

diff --git a/loolwsd/LOOLSession.cpp b/loolwsd/LOOLSession.cpp
index 3664bd0..055a489 100644
--- a/loolwsd/LOOLSession.cpp
+++ b/loolwsd/LOOLSession.cpp
@@ -33,7 +33,6 @@
 #include 
 #include 
 
-#include "ChildSession.hpp"
 #include "Common.hpp"
 #include "IoUtil.hpp"
 #include "LOOLProtocol.hpp"
commit 4799bcc73ef325b4899fc47e6524e770fba84322
Author: Tor Lillqvist 
Date:   Fri Sep 16 09:56:35 2016 +0300

Clarify comments about the meaning of the three LOOLSession subclasses

Be careful in using the definite article for classes that are
instantiated as singletons in a process, and otherwise an indefinite
article. Also mention in which process objects of the type in question
exist.

diff --git a/loolwsd/ChildSession.hpp b/loolwsd/ChildSession.hpp
index f181ef9..e2b738c 100644
--- a/loolwsd/ChildSession.hpp
+++ b/loolwsd/ChildSession.hpp
@@ -49,8 +49,7 @@ public:
 void notifyCurrentViewOfOtherViews(const std::string& sessionId) const = 0;
 };
 
-/// Represents a client session, with the socket end-point,
-/// and handles all incoming UI traffic.
+/// Represents the session to the WSD process, in the Kit process.
 class ChildSession final : public LOOLSession
 {
 public:
diff --git a/loolwsd/ClientSession.hpp b/loolwsd/ClientSession.hpp
index dc531c8..f710088 100644
--- a/loolwsd/ClientSession.hpp
+++ b/loolwsd/ClientSession.hpp
@@ -16,7 +16,7 @@
 class DocumentBroker;
 class PrisonerSession;
 
-/// Represents client sessions and socket end-point in WSD.
+/// Represents a session to a LOOL client, in the WSD process.
 class ClientSession final : public LOOLSession, public 
std::enable_shared_from_this
 {
 public:
diff --git a/loolwsd/PrisonerSession.hpp b/loolwsd/PrisonerSession.hpp
index 3ee088c..a40ce98 100644
--- a/loolwsd/PrisonerSession.hpp
+++ b/loolwsd/PrisonerSession.hpp
@@ -15,8 +15,7 @@
 class DocumentBroker;
 class ClientSession;
 
-/// An internal end-point in WSD with Kit process
-/// for a given client.
+/// Represents a session to a Kit process, in the WSD process.
 class PrisonerSession final : public LOOLSession, public 
std::enable_shared_from_this
 {
 public:
commit 9d17637488799aeaef196fc96d650f6d7d2d4049
Author: Tor Lillqvist 
Date:   Fri Sep 16 09:50:07 2016 +0300

Fix comment

diff --git a/loolwsd/LOOLSession.hpp b/loolwsd/LOOLSession.hpp
index 0153339..4c7c485 100644
--- a/loolwsd/LOOLSession.hpp
+++ b/loolwsd/LOOLSession.hpp
@@ -28,7 +28,7 @@
 #include "TileCache.hpp"
 #include "Log.hpp"
 
-/// Base class of a client session.
+/// Base class of a WebSocket session.
 class LOOLSession
 {
 public:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 2 commits - libreofficekit/qa sd/qa sd/source sw/qa sw/sdi sw/source

2016-09-16 Thread Miklos Vajna
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx |9 --
 sd/qa/unit/tiledrendering/tiledrendering.cxx|   19 
 sd/source/ui/view/ViewShellBase.cxx |   17 ++-
 sw/qa/extras/uiwriter/uiwriter.cxx  |   30 ++--
 sw/sdi/swriter.sdi  |3 --
 sw/source/uibase/uiview/view2.cxx   |   16 +-
 6 files changed, 83 insertions(+), 11 deletions(-)

New commits:
commit 5cd5f66c42b9bf8cdb6b6065dd0877a50e343294
Author: Miklos Vajna 
Date:   Thu Sep 15 16:04:05 2016 +0200

sw: allow select of redline by index

Previously .uno:NextTrackedChange always worked by cursor position, but
redlines are stored in the redline table, so they have a unique index.
Allow specifying that index when invoking the command, and in that case
ignore the cursor position.

(cherry picked from commit 84e91157c674b0b78b792fc1d4f841fe50b1dd9b)

Change-Id: I7dbe8044feca8fcc48635482a22317b024f40ffa

diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx 
b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 01290d4..b8a90afbc 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -482,6 +482,8 @@ static void documentRedline(GtkWidget* pButton, gpointer 
/*pItem*/)
  GTK_RESPONSE_YES,
  "Reject",
  GTK_RESPONSE_NO,
+ "Jump",
+ GTK_RESPONSE_APPLY,
  nullptr);
 GtkWidget* pContentArea = gtk_dialog_get_content_area(GTK_DIALOG 
(pDialog));
 
@@ -518,7 +520,7 @@ static void documentRedline(GtkWidget* pButton, gpointer 
/*pItem*/)
 gint res = gtk_dialog_run(GTK_DIALOG(pDialog));
 
 // Dispatch the matching command, if necessary.
-if (res == GTK_RESPONSE_YES || res == GTK_RESPONSE_NO)
+if (res == GTK_RESPONSE_YES || res == GTK_RESPONSE_NO || res == 
GTK_RESPONSE_APPLY)
 {
 GtkTreeSelection* pSelection = 
gtk_tree_view_get_selection(GTK_TREE_VIEW(pTreeView));
 GtkTreeIter aTreeIter;
@@ -531,8 +533,11 @@ static void documentRedline(GtkWidget* pButton, gpointer 
/*pItem*/)
 std::string aCommand;
 if (res == GTK_RESPONSE_YES)
 aCommand = ".uno:AcceptTrackedChange";
-else
+else if (res == GTK_RESPONSE_NO)
 aCommand = ".uno:RejectTrackedChange";
+else
+// Just select the given redline, don't accept or reject it.
+aCommand = ".uno:NextTrackedChange";
 // Without the '.uno:' prefix.
 std::string aKey = aCommand.substr(strlen(".uno:"));
 
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 656eb76..d63b3fc 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -3281,15 +3281,39 @@ void SwUiWriterTest::testRedlineParam()
 pWrtShell->EndDoc();
 pWrtShell->Insert("zzz");
 
-// Move the cursor to the start again, and reject the second change.
+// Select the first redline.
 pWrtShell->SttDoc();
 uno::Sequence 
aPropertyValues(comphelper::InitPropertySequence(
 {
-{"RejectTrackedChange", uno::makeAny(static_cast(1))}
+{"NextTrackedChange", uno::makeAny(static_cast(0))}
 }));
-lcl_dispatchCommand(mxComponent, ".uno:RejectTrackedChange", 
aPropertyValues);
+lcl_dispatchCommand(mxComponent, ".uno:NextTrackedChange", 
aPropertyValues);
 Scheduler::ProcessEventsToIdle();
 SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
+// This failed: the parameter wasn't handled so the next change (zzz) was
+// selected, not the first one (aaa).
+CPPUNIT_ASSERT_EQUAL(OUString("aaa"), pShellCursor->GetText());
+
+// Select the second redline.
+pWrtShell->SttDoc();
+aPropertyValues = comphelper::InitPropertySequence(
+{
+{"NextTrackedChange", uno::makeAny(static_cast(1))}
+});
+lcl_dispatchCommand(mxComponent, ".uno:NextTrackedChange", 
aPropertyValues);
+Scheduler::ProcessEventsToIdle();
+pShellCursor = pWrtShell->getShellCursor(false);
+CPPUNIT_ASSERT_EQUAL(OUString("zzz"), pShellCursor->GetText());
+
+// Move the cursor to the start again, and reject the second change.
+pWrtShell->SttDoc();
+aPropertyValues = comphelper::InitPropertySequence(
+{
+{"RejectTrackedChange", uno::makeAny(static_cast(1))}
+});
+lcl_dispatchCommand(mxComponent, ".uno:RejectTrackedChange", 
aPropertyValues);
+Scheduler::ProcessEventsToIdle();
+pShellCursor = pWrtShell->getShellCursor(false);
 
 // This was 'mid

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

2016-09-16 Thread Tor Lillqvist
 solenv/gbuild/platform/macosx.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 7b660e1423554928350e1de2cd4cb7eb577a27ec
Author: Tor Lillqvist 
Date:   Thu Sep 15 19:37:24 2016 +0300

Either -O2 is broken in Apple Clang, or some of our code is broken

Already with Xcode 7.3.1 some unit tests crash when the code is built
with full optimisation. Xcode 8 did not help. So use -O1. Yeah, this
sucks. Don't have time to investigate in detail.

Change-Id: I0cffad1a3ee3ee86b61eca3c856476133125049b

diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index bacd794..01adafbd 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -22,6 +22,8 @@ export VCL_HIDE_WINDOWS=1
 
 gb_SDKDIR := $(MACOSX_SDK_PATH)
 
+gb_COMPILEROPTFLAGS := -O1
+
 include $(GBUILDDIR)/platform/com_GCC_defs.mk
 
 # Darwin mktemp -t expects a prefix, not a pattern
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-16 Thread Stephan Bergmann
 hwpfilter/source/hiodev.cxx |   22 +-
 hwpfilter/source/hiodev.h   |   10 ++
 2 files changed, 7 insertions(+), 25 deletions(-)

New commits:
commit b755094c831d449aba37eaf53e4f6e28b9ee5ad9
Author: Stephan Bergmann 
Date:   Fri Sep 16 09:13:53 2016 +0200

No need for an abstaract HIODev::close

...that was only called from dtors anyway, where its virtual-ness doesn't
actually help (and would trigger loplugin:fragiledestructor if that were
enabled)

Change-Id: I477a22f2cadd1124b7106c5338e525629968a284

diff --git a/hwpfilter/source/hiodev.cxx b/hwpfilter/source/hiodev.cxx
index a5e0357..98001e9 100644
--- a/hwpfilter/source/hiodev.cxx
+++ b/hwpfilter/source/hiodev.cxx
@@ -116,7 +116,11 @@ HStreamIODev::HStreamIODev(HStream * 
stream):_stream(stream)
 
 HStreamIODev::~HStreamIODev()
 {
-close();
+/* 플러시한 후 닫는다. */
+this->flush();
+if (_gzfp)
+gz_close(_gzfp);
+_gzfp = nullptr;
 }
 
 
@@ -142,16 +146,6 @@ void HStreamIODev::flush()
 }
 
 
-void HStreamIODev::close()
-{
-/* 플러시한 후 닫는다. */
-this->flush();
-if (_gzfp)
-gz_close(_gzfp);
-_gzfp = nullptr;
-}
-
-
 int HStreamIODev::state() const
 {
 return 0;
@@ -272,7 +266,6 @@ HMemIODev::HMemIODev(char *s, int len)
 
 HMemIODev::~HMemIODev()
 {
-close();
 }
 
 
@@ -295,11 +288,6 @@ void HMemIODev::flush()
 }
 
 
-void HMemIODev::close()
-{
-}
-
-
 int HMemIODev::state() const
 {
 if (pos <= length)
diff --git a/hwpfilter/source/hiodev.h b/hwpfilter/source/hiodev.h
index b30a79f..ab90435 100644
--- a/hwpfilter/source/hiodev.h
+++ b/hwpfilter/source/hiodev.h
@@ -46,7 +46,6 @@ class DLLEXPORT HIODev
 virtual ~HIODev();
 
 virtual bool open() = 0;
-virtual void close() = 0;
 virtual void flush() = 0;
 virtual int  state() const = 0;
 /* gzip routine wrapper */
@@ -73,7 +72,7 @@ struct gz_stream;
  * This controls the HStream given by constructor
  * @short Stream IO device
  */
-class HStreamIODev : public HIODev
+class HStreamIODev final: public HIODev
 {
 private:
 /* zlib으로 압축을 풀기 위한 자료 구조 */
@@ -87,10 +86,6 @@ class HStreamIODev : public HIODev
  */
 virtual bool open() override;
 /**
- * Free stream object
- */
-virtual void close() override;
-/**
  * If the stream is gzipped, flush the stream.
  */
 virtual void flush() override;
@@ -139,7 +134,7 @@ class HStreamIODev : public HIODev
  * The HMemIODev class controls the Input/Output device.
  * @short Memory IO device
  */
-class HMemIODev : public HIODev
+class HMemIODev final: public HIODev
 {
 uchar *ptr;
 int pos, length;
@@ -148,7 +143,6 @@ class HMemIODev : public HIODev
 virtual ~HMemIODev() override;
 
 virtual bool open() override;
-virtual void close() override;
 virtual void flush() override;
 virtual int  state() const override;
 /* gzip routine wrapper */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits