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

2016-06-30 Thread Stephan Bergmann
 chart2/source/view/charttypes/BubbleChart.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit bfff963fefa930839171c4233699339979f3ceec
Author: Stephan Bergmann 
Date:   Fri Jul 1 08:53:14 2016 +0200

clang-analyzer-deadcode.DeadStores

...after 0f17e343306fd457c542067c09242ddd04ca39e9 "loplugin:singlevalfields 
in
chart2"

Change-Id: I111d6a0eb5380d9559799db348deb43594f90630

diff --git a/chart2/source/view/charttypes/BubbleChart.cxx 
b/chart2/source/view/charttypes/BubbleChart.cxx
index 2f8f9c7..df523dd 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -130,10 +130,8 @@ drawing::Direction3D 
BubbleChart::transformToScreenBubbleSize( double fLogicSize
 
 double fMaxSize = m_fMaxLogicBubbleSize;
 
-double fMaxRadius = fMaxSize;
-double fRaduis = fLogicSize;
-fMaxRadius = sqrt( fMaxSize / F_PI );
-fRaduis = sqrt( fLogicSize / F_PI );
+double fMaxRadius = sqrt( fMaxSize / F_PI );
+double fRaduis = sqrt( fLogicSize / F_PI );
 
 aRet.DirectionX = m_fBubbleSizeScaling * m_fBubbleSizeFactorToScreen * 
fRaduis / fMaxRadius;
 aRet.DirectionY = aRet.DirectionX;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-30 Thread Takeshi Abe
 starmath/inc/node.hxx|   35 +--
 starmath/source/node.cxx |3 +--
 2 files changed, 14 insertions(+), 24 deletions(-)

New commits:
commit faddbce32ed863bda4238e54dd11df1b468ccd86
Author: Takeshi Abe 
Date:   Thu Jun 30 18:00:05 2016 +0900

Make SmStructureNode's ctor initialize the number of sub nodes

This also drops newly unused SetNumSubNodes() as a result.

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

diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 72da13b..c93c978 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -286,8 +286,9 @@ class SmStructureNode : public SmNode
 SmNodeArray  aSubNodes;
 
 protected:
-SmStructureNode(SmNodeType eNodeType, const SmToken &rNodeToken)
-:   SmNode(eNodeType, rNodeToken)
+SmStructureNode(SmNodeType eNodeType, const SmToken &rNodeToken, size_t 
nSize = 0)
+: SmNode(eNodeType, rNodeToken)
+, aSubNodes(nSize)
 {}
 
 public:
@@ -296,7 +297,6 @@ public:
 virtual boolIsVisible() const override;
 
 virtual sal_uInt16  GetNumSubNodes() const override;
-voidSetNumSubNodes(sal_uInt16 nSize) { 
aSubNodes.resize(nSize); }
 
 using   SmNode::GetSubNode;
 virtual SmNode *GetSubNode(sal_uInt16 nIndex) override;
@@ -745,9 +745,8 @@ class SmUnHorNode : public SmStructureNode
 {
 public:
 explicit SmUnHorNode(const SmToken &rNodeToken)
-:   SmStructureNode(NUNHOR, rNodeToken)
+: SmStructureNode(NUNHOR, rNodeToken, 2)
 {
-SetNumSubNodes(2);
 }
 
 virtual void Arrange(OutputDevice &rDev, const SmFormat &rFormat) override;
@@ -775,9 +774,8 @@ protected:
 
 public:
 explicit SmRootNode(const SmToken &rNodeToken)
-:   SmStructureNode(NROOT, rNodeToken)
+: SmStructureNode(NROOT, rNodeToken, 3)
 {
-SetNumSubNodes(3);
 }
 
 virtual void Arrange(OutputDevice &rDev, const SmFormat &rFormat) override;
@@ -805,9 +803,8 @@ class SmDynIntegralNode : public SmStructureNode
 {
 public:
 explicit SmDynIntegralNode(const SmToken &rNodeToken)
-:   SmStructureNode(NDYNINT, rNodeToken)
+: SmStructureNode(NDYNINT, rNodeToken, 2)
 {
-SetNumSubNodes(2);
 }
 
 virtual void Arrange(OutputDevice &rDev, const SmFormat &rFormat) override;
@@ -836,9 +833,8 @@ class SmBinHorNode : public SmStructureNode
 {
 public:
 explicit SmBinHorNode(const SmToken &rNodeToken)
-:   SmStructureNode(NBINHOR, rNodeToken)
+: SmStructureNode(NBINHOR, rNodeToken, 3)
 {
-SetNumSubNodes(3);
 }
 
 virtual void Arrange(OutputDevice &rDev, const SmFormat &rFormat) override;
@@ -869,9 +865,8 @@ class SmBinVerNode : public SmStructureNode
 {
 public:
 explicit SmBinVerNode(const SmToken &rNodeToken)
-:   SmStructureNode(NBINVER, rNodeToken)
+: SmStructureNode(NBINVER, rNodeToken, 3)
 {
-SetNumSubNodes(3);
 }
 
 virtual const SmNode * GetLeftMost() const override;
@@ -956,9 +951,8 @@ class SmSubSupNode : public SmStructureNode
 
 public:
 explicit SmSubSupNode(const SmToken &rNodeToken)
-:   SmStructureNode(NSUBSUP, rNodeToken)
+: SmStructureNode(NSUBSUP, rNodeToken, 1 + SUBSUP_NUM_ENTRIES)
 {
-SetNumSubNodes(1 + SUBSUP_NUM_ENTRIES);
 bUseLimits = false;
 }
 
@@ -1007,9 +1001,8 @@ class SmBraceNode : public SmStructureNode
 {
 public:
 explicit SmBraceNode(const SmToken &rNodeToken)
-:   SmStructureNode(NBRACE, rNodeToken)
+: SmStructureNode(NBRACE, rNodeToken, 3)
 {
-SetNumSubNodes(3);
 }
 
 SmMathSymbolNode* OpeningBrace();
@@ -1083,10 +1076,9 @@ public:
 };
 
 
-inline SmVerticalBraceNode::SmVerticalBraceNode(const SmToken &rNodeToken) :
-SmStructureNode(NVERTICAL_BRACE, rNodeToken)
+inline SmVerticalBraceNode::SmVerticalBraceNode(const SmToken &rNodeToken)
+: SmStructureNode(NVERTICAL_BRACE, rNodeToken, 3)
 {
-SetNumSubNodes(3);
 }
 
 
@@ -1104,9 +1096,8 @@ class SmOperNode : public SmStructureNode
 {
 public:
 explicit SmOperNode(const SmToken &rNodeToken)
-:   SmStructureNode(NOPER, rNodeToken)
+: SmStructureNode(NOPER, rNodeToken, 2)
 {
-SetNumSubNodes(2);
 }
 
 SmNode *   GetSymbol();
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index fa0c748..a8ae9e8 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -1018,10 +1018,9 @@ sal_uInt16 GetLineIntersectionPoint(Point &rResult,
 
 
 SmBinDiagonalNode::SmBinDiagonalNode(const SmToken &rNodeToken)
-:   SmStructureNode(NBINDIAGONAL, rNodeToken)
+: SmStructureNode(NBINDIAGONAL, rNodeToken, 3)
 {
 bAscending = false;
-SetNumSubNodes(3);
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists

Re: chained editeng: Add TextChainFlow related files

2016-06-30 Thread Matteo Campanelli
No strong feelings. :)
[Ouch: I left all those XXX comments?]

On Wed, Jun 29, 2016 at 5:43 AM Thorsten Behrens 
wrote:

> Stephan Bergmann wrote:
> > > +// XXX
> > > +bMustMergeParaOF = true; // XXX: Experiment: no deep merging.
> >
> > should that be removed?
> >
> Unless Matteo feels strongly - yeah.
>
> Cheers,
>
> -- Thorsten
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Bug Report

2016-06-30 Thread Sam Mazza
Hi,


Sorry having to email to all of you, I did not see a bug report email address.

See attached png.  When typing the word rennovation (2 n's), right click to 
correct, spell-checking changes the R to an O and offers "oenovation".   When 
selecting that, this, the correct spelling (with R) is inserted in the doc.


Win10 (64bit) on Dell


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


Re: Different behavior of same code in Linux and Windows

2016-06-30 Thread Laurent BP
Hi Eike,

I've got it! You were right (as always). The problem was exactly there:

When fRemainder is weak, for instance due to floating point representation
0.2 gives 0.2000...0018 in double precision and fRemainder may tend to about
1e-15, nPartialDenom cannot represent its reciprocal in 32 bits precision.
That's why 64 bits precision is required.

Correct commit is on the way. :-)

Best regards,

Laurent BP



-
LibreOffice 5.1.4.1
--
View this message in context: 
http://nabble.documentfoundation.org/Different-behavior-of-same-code-in-Linux-and-Windows-tp4187462p4187654.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-06-30 Thread Henry Castro
 loleaflet/dist/toolbar/toolbar.js |   59 ++
 loleaflet/src/control/Styles.js   |   22 +-
 2 files changed, 80 insertions(+), 1 deletion(-)

New commits:
commit cc8f9f4c64154ec33aedb42384fff5848cee18c6
Author: Henry Castro 
Date:   Thu Jun 30 18:24:01 2016 -0400

loleaflet: add status bar items for Calc

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index e0a4255..d5d1ce0 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -647,6 +647,39 @@ map.on('doclayerinit', function () {
toolbar.hide('annotation');
}
}
+
+   var statusbar = w2ui['toolbar-down'];
+   switch (docType) {
+   case 'spreadsheet':
+   statusbar.insert('left', [
+   {type: 'break', id:'break1'},
+   {type: 'html',  id: 'StatusDocPos',  html: '_' },
+   {type: 'break', id:'break2'},
+   {type: 'html',  id: 'RowColSelCount',  html: '_' },
+   {type: 'break', id:'break3'},
+   {type: 'html',  id: 'SatusPageStyle',  html: '_' },
+   {type: 'break', id:'break4'},
+   {type: 'html',  id: 'InsertMode',  html: '_' },
+   {type: 'break', id:'break5'},
+   {type: 'html',  id: 'StatusSelectionMode',  html: '_' },
+   //{type: 'break', id:'break6'},
+   //{type: 'html',  id: 'ModifiedStatus',  html: '_' },
+   {type: 'break', id:'break7'},
+   {type: 'html',  id: 'Signature',  html: '_' },
+   {type: 'break', id:'break8'},
+   {type: 'html',  id: 'StateTableCell',  html: '_' },
+   //{type: 'break', id:'break9'},
+   //{type: 'html',  id: 'ZoomSlider',  html: '_' },
+   //{type: 'break', id:'break10'},
+   //{type: 'html',  id: 'Zoom',  html: '_' },
+   ])
+   statusbar.refresh();
+   break;
+   case 'text':
+   break;
+   case 'presentation':
+   break;
+   }
 });
 
 map.on('commandstatechanged', function (e) {
@@ -760,6 +793,32 @@ map.on('commandstatechanged', function (e) {
$('#modifiedstatuslabel').html(_('Document saved'));
}
}
+   else if (commandName === '.uno:StatusDocPos') {
+   $('#StatusDocPos').html(state ? state : '_');
+   }
+   else if (commandName === '.uno:RowColSelCount') {
+   $('#RowColSelCount').html(state ? state : '_');
+   }
+   else if (commandName === '.uno:StatusPageStyle') {
+   $('#StatusPageStyle').html(state ? state : '_');
+   }
+   else if (commandName === '.uno:InsertMode') {
+   $('#InsertMode').html(state ? L.Styles.insertMode[state] : 
'_');
+   }
+   else if (commandName === '.uno:StatusSelectionMode') {
+   $('#StatusSelectionMode').html(state ? 
L.Styles.selectionMode[state] : '_');
+   }
+   else if (commandName === '.uno:Signature') {
+   $('#Signature').html(state ? L.Styles.signatureState[state] : 
'_');
+   }
+   else if (commandName === '.uno:Position' ||
+commandName === '.uno:StateTableCell' ||
+commandName === '.uno:StatusBarFunc' ||
+commandName === '.uno:Size') {
+   if (state) {
+   $('#StateTableCell').html(state);
+   }
+   }
 
var toolbarUpMore = w2ui['toolbar-up-more'];
var id = commandName.toLowerCase().substr(5);
diff --git a/loleaflet/src/control/Styles.js b/loleaflet/src/control/Styles.js
index 609dd88..206bae8 100644
--- a/loleaflet/src/control/Styles.js
+++ b/loleaflet/src/control/Styles.js
@@ -316,5 +316,25 @@ L.Styles = {
{id: 28, text: 'Vertical Title, Vertical Text'},
{id: 29, text: 'Title, Vertical Text'},
{id: 30, text: 'Title, Vertical Text, Clipart'}
-   ]
+   ],
+
+   insertMode : {
+   'true'  : 'Insert',
+   'false' : 'Overwrite'
+   },
+
+   selectionMode : [
+   'Standard selection',
+   'Extending selection',
+   'Adding selection',
+   'Selección de bloque'
+   ],
+
+   signatureState : {
+   '-1' : 'The document is not signed.',
+   '0'  : 'The document signature is OK.',
+   '1'  : 'The document signature does not match the document 
content',
+   '2'  : 'The document signature is OK, but the certificates 
could not be validated.',
+   '3'  : 'The document signature and

[Libreoffice-commits] libcdr.git: src/lib

2016-06-30 Thread Fridrich Štrba
 src/lib/CMXParser.cpp  |  288 -
 src/lib/CMXParser.h|1 
 src/lib/CommonParser.h |1 
 3 files changed, 170 insertions(+), 120 deletions(-)

New commits:
commit 426554639786a0fd18ed1f081e478564ca11
Author: Fridrich Å trba 
Date:   Thu Jun 30 23:10:55 2016 +0200

Some fill attributes + some fixes in CMX1

Change-Id: I2ae0d2fe17c706396a02fd317695d411e4e1a680

diff --git a/src/lib/CMXParser.cpp b/src/lib/CMXParser.cpp
index f215a1c..129e019 100644
--- a/src/lib/CMXParser.cpp
+++ b/src/lib/CMXParser.cpp
@@ -388,6 +388,7 @@ void 
libcdr::CMXParser::readPolyCurve(librevenge::RVNGInputStream *input)
   }
   else if (m_precision == libcdr::PRECISION_16BIT)
   {
+CDR_DEBUG_MSG(("  CMXParser::readPolyCurve\n"));
 readRenderingAttributes(input);
 pointNum = readU16(input);
 const unsigned long maxPoints = getRemainingLength(input) / (2 * 2 + 1);
@@ -670,27 +671,56 @@ void 
libcdr::CMXParser::readFill(librevenge::RVNGInputStream *input)
 input->seek(startOffset + tagLength, librevenge::RVNG_SEEK_SET);
   }
   while (tagId != CMX_Tag_EndTag);
-  m_collector->collectFillStyle(fillIdentifier, color1, color2, gradient, 
imageFill);
 }
 else if (m_precision == libcdr::PRECISION_16BIT)
 {
-  readU16(input, m_bigEndian);
+  CDR_DEBUG_MSG(("Solid fill\n"));
+  unsigned colorRef = readU16(input, m_bigEndian);
+  color1 = getPaletteColor(colorRef);
   readU16(input, m_bigEndian);
 }
+m_collector->collectFillStyle(fillIdentifier, color1, color2, gradient, 
imageFill);
 break;
-  case 2:
+  case 2:  // Fountain
+if (m_precision == libcdr::PRECISION_32BIT)
+{
+}
+else
+{
+  CDR_DEBUG_MSG(("Fountain fill\n"));
+  /* unsigned short fountain = */ readU16(input, m_bigEndian);
+  /* unsigned short screen = */ readU16(input, m_bigEndian);
+  /* unsigned short padding = */ readU16(input, m_bigEndian);
+  /* int angle = */ readS32(input, m_bigEndian);
+  /* int xoff = */ readS32(input, m_bigEndian);
+  /* int yoff = */ readS32(input, m_bigEndian);
+  /* unsigned short steps = */ readU16(input, m_bigEndian);
+  /* unsigned short mode = */ readU16(input, m_bigEndian);
+  unsigned short colorCount = readU16(input, m_bigEndian);
+  for (unsigned short i = 0; i < colorCount; ++i)
+  {
+/* unsigned short color = */ readU16(input, m_bigEndian);
+/* unsigned short position = */ readU16(input, m_bigEndian);
+  }
+}
 break;
   case 6:
+CDR_DEBUG_MSG(("Postscript fill\n"));
 break;
   case 7:
+CDR_DEBUG_MSG(("Two-Color Pattern fill\n"));
 break;
   case 8:
+CDR_DEBUG_MSG(("Monochrome with transparent bitmap fill\n"));
 break;
   case 9:
+CDR_DEBUG_MSG(("Imported Bitmap fill\n"));
 break;
   case 10:
+CDR_DEBUG_MSG(("Full-Color Pattern fill\n"));
 break;
   case 11:
+CDR_DEBUG_MSG(("Texture fill\n"));
 break;
   default:
 break;
@@ -730,7 +760,10 @@ void 
libcdr::CMXParser::readRenderingAttributes(librevenge::RVNGInputStream *inp
   while (tagId != CMX_Tag_EndTag);
 }
 else if (m_precision == libcdr::PRECISION_16BIT)
+{
+  CDR_DEBUG_MSG(("  Fill specification\n"));
   readFill(input);
+}
   }
   if (bitMask & 0x02) // outline
   {
@@ -758,6 +791,11 @@ void 
libcdr::CMXParser::readRenderingAttributes(librevenge::RVNGInputStream *inp
   }
   while (tagId != CMX_Tag_EndTag);
 }
+else if (m_precision == libcdr::PRECISION_16BIT)
+{
+  CDR_DEBUG_MSG(("  Outline specification\n"));
+  readU16(input, m_bigEndian);
+}
   }
   if (bitMask & 0x04) // lens
   {
@@ -783,6 +821,10 @@ void 
libcdr::CMXParser::readRenderingAttributes(librevenge::RVNGInputStream *inp
   }
   while (tagId != CMX_Tag_EndTag);
 }
+else if (m_precision == libcdr::PRECISION_16BIT)
+{
+  CDR_DEBUG_MSG(("  Lens specification\n"));
+}
   }
   if (bitMask & 0x08) // canvas
   {
@@ -808,6 +850,10 @@ void 
libcdr::CMXParser::readRenderingAttributes(librevenge::RVNGInputStream *inp
   }
   while (tagId != CMX_Tag_EndTag);
 }
+else if (m_precision == libcdr::PRECISION_16BIT)
+{
+  CDR_DEBUG_MSG(("  Canvas specification\n"));
+}
   }
   if (bitMask & 0x10) // container
   {
@@ -833,6 +879,10 @@ void 
libcdr::CMXParser::readRenderingAttributes(librevenge::RVNGInputStream *inp
   }
   while (tagId != CMX_Tag_EndTag);
 }
+else if (m_precision == libcdr::PRECISION_16BIT)
+{
+  CDR_DEBUG_MSG(("  Container specification\n"));
+}
   }
 }
 
@@ -873,13 +923,12 @@ void 
libcdr::CMXParser::readJumpAbsolute(librevenge::RVNGInputStream *input)
 void libcdr::CMXParser::readRclr(librevenge::RVNGInputStream *input, unsigned 
/* length */)
 {
   unsigned numRecords = readU16(input, m_bigEndian);
-  if (m_precision == libcdr::PRECISION_32BIT)
+ 

Re: New C2220: warning treated as error (MSVC 2015 build failure)

2016-06-30 Thread Markus Mohrhard
Hey Luke,

On Thu, Jun 30, 2016 at 7:46 PM, Luke Benes  wrote:

> Ever since
> https://cgit.freedesktop.org/libreoffice/core/commit/?id=62c047ffb397802c09df9070492e70725928cadf
>
> Author: Markus Mohrhard 
> Date:   Mon Jun 20 09:02:47 2016 +0200
>
> switch to EHs on windows
>
> I'm getting the following build error with MSVC 2015 (32-bit MSVC 2013
> still works).
>
> [build CXX] svl/source/undo/undo.cxx
> c:\lode\dev\core\svl\source\undo\undo.cxx(390) : error C2220: warning
> treated as error - no 'object' file generated
> c:\lode\dev\core\svl\source\undo\undo.cxx(390) : warning C4702:
> unreachable code
> C:/lode/dev/core/solenv/gbuild/LinkTarget.mk:189: recipe for target
> 'C:/lode/dev/core/workdir/CxxObject/svl/source/undo/undo.o' failed
> make[1]: *** [C:/lode/dev/core/workdir/CxxObject/svl/source/undo/undo.o]
> Error 2
> make[1]: *** Waiting for unfinished jobs
> Makefile:258: recipe for target 'build' failed
> make: *** [build] Error 2
>


Most likely you need to remove the try .. catch block. As currently nobody
is really using MSVC 2015 we are not going to see these issues. So if you
plan to compile with MSVC 2015 you must fix most of them yourself until we
finally switch.

I have currently no MSVC 2015 to see if removing the try catch block is the
right fix.

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


[Libreoffice-commits] core.git: Branch 'feature/dialog-screenshots' - include/test test/Library_test.mk test/source

2016-06-30 Thread Katarina Behrens
 include/test/screenshot_test.hxx |   39 ++
 test/Library_test.mk |1 
 test/source/screenshot_test.cxx  |  102 +++
 3 files changed, 142 insertions(+)

New commits:
commit a09da27d7d8541db75b4f0c2a7485b637fda1294
Author: Katarina Behrens 
Date:   Thu Jun 30 22:39:28 2016 +0200

Move shared code to a separate test class

Change-Id: I1760de221bc53d345c2bbfb4fe878c120073ea45

diff --git a/include/test/screenshot_test.hxx b/include/test/screenshot_test.hxx
new file mode 100644
index 000..f07c29a
--- /dev/null
+++ b/include/test/screenshot_test.hxx
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_SCREENSHOT_TEST_HXX
+#define INCLUDED_TEST_SCREENSHOT_TEST_HXX
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+class VclAbstractDialog;
+
+
+class OOO_DLLPUBLIC_TEST ScreenshotTest : public test::BootstrapFixture, 
public unotest::MacrosTest
+{
+public:
+ScreenshotTest();
+
+virtual void setUp() override;
+virtual void tearDown() override;
+
+void dumpDialogToPath( VclAbstractDialog& rDialog );
+
+private:
+void saveScreenshot( VclAbstractDialog& rDialog );
+OUString m_aScreenshotDirectory;
+};
+
+#endif // INCLUDED_TEST_SCREENSHOT_TEST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/Library_test.mk b/test/Library_test.mk
index df7bfd2..2e34b21 100644
--- a/test/Library_test.mk
+++ b/test/Library_test.mk
@@ -47,6 +47,7 @@ $(eval $(call gb_Library_add_exception_objects,test,\
 test/source/mtfxmldump \
 test/source/xmlwriter \
 test/source/primitive2dxmldump \
+test/source/screenshot_test \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx
new file mode 100644
index 000..d02e738
--- /dev/null
+++ b/test/source/screenshot_test.cxx
@@ -0,0 +1,102 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "test/screenshot_test.hxx"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace {
+void splitHelpId( OString& rHelpId, OUString& rDirname, OUString 
&rBasename )
+{
+sal_Int32 nIndex = rHelpId.lastIndexOf( '/' );
+
+if( nIndex > 0 )
+rDirname = OStringToOUString( rHelpId.copy( 0, nIndex ), 
RTL_TEXTENCODING_UTF8 );
+
+if( rHelpId.getLength() > nIndex+1 )
+rBasename= OStringToOUString( rHelpId.copy( nIndex+1 ), 
RTL_TEXTENCODING_UTF8 );
+}
+}
+
+using namespace css;
+using namespace css::uno;
+
+ScreenshotTest::ScreenshotTest()
+  : m_aScreenshotDirectory("/workdir/screenshots/")
+{
+}
+
+void ScreenshotTest::setUp()
+{
+test::BootstrapFixture::setUp();
+
+mxDesktop = css::frame::Desktop::create( 
comphelper::getComponentContext(getMultiServiceFactory()) );
+CPPUNIT_ASSERT_MESSAGE("no desktop!", mxDesktop.is());
+
+osl::FileBase::RC err = osl::Directory::create( 
m_directories.getURLFromSrc( m_aScreenshotDirectory ) );
+CPPUNIT_ASSERT_MESSAGE( "Failed to create screenshot directory", (err == 
osl::FileBase::E_None || err == osl::FileBase::E_EXIST) );
+}
+
+void ScreenshotTest::tearDown()
+{
+test::BootstrapFixture::tearDown();
+}
+
+void ScreenshotTest::saveScreenshot( VclAbstractDialog& rDialog )
+{
+ const Bitmap aScreenshot(rDialog.createScreenshot());
+
+ if (!aScreenshot.IsEmpty())
+ {
+ OString aScreenshotId = rDialog.GetScreenshotId();
+ OUString aDirname, aBasename;
+ splitHelpId( aScreenshotId, aDirname, aBasename );
+ aDirname =  m_aScreenshotDirectory + aDirname;
+
+ osl::FileBase::RC err = osl::Directory::createPath( 
m_directories.getURLFromSrc( aDirname ));
+ CPPUNIT_ASSERT_MESSAGE( OUStringToOString( "Failed to create " + 
aDirname, RTL_TEXTENCODING_UTF8).getStr(),
+ (err == osl::FileBase::E_None || err == 
osl::FileBase::E_EXIST) );
+
+ OUString aFullPath = m_directories.getSrcRootPath() + aDirname + "/" 
+ aBasename + ".png";
+ SvFileStream aNew(aFullPath, StreamMode::WRITE | StreamMode::TRUNC);
+ CPPUNIT_ASSERT_MESSAGE( OUStringToOString( "Failed to open " + 
OUString::number(aNew.GetErrorCode()), RTL_TEXTENCODING_UTF8).getStr(), 
aNew.IsOpen() );
+
+ vcl::PNGWriter aPNGWriter(aScreenshot);
+ aPNGWriter.Write(aNew);
+ }

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

2016-06-30 Thread Marco Cecchetti
 filter/source/svg/svgwriter.cxx |1 -
 filter/source/svg/svgwriter.hxx |1 -
 2 files changed, 2 deletions(-)

New commits:
commit 3ca7bf489d3df36b4e23bc3c5b515bd93e235e27
Author: Marco Cecchetti 
Date:   Thu Jun 30 21:59:38 2016 +0200

svg export: removed unused class data field

Change-Id: Icd98992279770fbfdaed2aab3501e5c95938196f

diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 9859195..d01ef3d 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1734,7 +1734,6 @@ SVGActionWriter::SVGActionWriter( SVGExport& rExport, 
SVGFontExport& rFontExport
 mnCurClipPathId( 1 ),
 mpCurrentClipRegionElem(),
 mrExport( rExport ),
-mrFontExport( rFontExport ),
 maContextHandler(),
 mrCurrentState( maContextHandler.getCurrentState() ),
 maAttributeWriter( rExport, rFontExport, mrCurrentState ),
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index e0f9185..cf4d24b 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -353,7 +353,6 @@ private:
 ::std::unique_ptr< SvXMLElementExport > mpCurrentClipRegionElem;
 ::std::unique_ptr< SVGShapeDescriptor > mapCurShape;
 SVGExport&  mrExport;
-SVGFontExport&  mrFontExport;
 SVGContextHandler   maContextHandler;
 SVGState&   mrCurrentState;
 SVGAttributeWriter  maAttributeWriter;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-30 Thread Stephan Bergmann
 compilerplugins/clang/badstatics.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 45129b0a204fc2a40b2d071cc6c9f36d027c3242
Author: Stephan Bergmann 
Date:   Thu Jun 30 21:14:45 2016 +0200

loplugin:badstatics: new static only found with libc++

Change-Id: I93f12629fe6aa4bddae7379a5a7ac4f4c42c7923

diff --git a/compilerplugins/clang/badstatics.cxx 
b/compilerplugins/clang/badstatics.cxx
index 12e6b93..7f09dbc 100644
--- a/compilerplugins/clang/badstatics.cxx
+++ b/compilerplugins/clang/badstatics.cxx
@@ -150,6 +150,9 @@ public:
 // ScAddInAsync* keys if that set is not empty at exit
 || name == "g_aWindowList"
 //vcl/unx/gtk/a11y/atkutil.cxx, asserted empty at exit
+|| name=="aViewMap"
+// sfx2/source/view/lokhelper.cxx, not owning, leaked by
+// (mis-)design
) // these variables appear unproblematic
 {
 return true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Order of menu items

2016-06-30 Thread Oliver Brinzing

Hi Jan,

 > In Linux LO respects this order and arranges the menu items in order.
 > In Windows, it doesn't.

i use "m001", "m002", etc. to sort my menu entries.

Regards
Oliver



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


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

2016-06-30 Thread Rishabh Kumar
 cui/source/tabpages/tppattern.cxx |2 +-
 cui/uiconfig/ui/patterntabpage.ui |   18 +-
 2 files changed, 2 insertions(+), 18 deletions(-)

New commits:
commit 4fbd96f6b34244bc274f2471474f9bacf2d6f4c1
Author: Rishabh Kumar 
Date:   Thu Jun 30 23:03:19 2016 +0530

Minor changes for Pattern tab

Change-Id: Ibc10b24c2367fd7a6ca068ee61fd4098d2f66bdb
Reviewed-on: https://gerrit.libreoffice.org/26825
Tested-by: Jenkins 
Reviewed-by: Rishabh Kumar 

diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index b90a5bd..f28bc53 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -52,7 +52,7 @@ using namespace com::sun::star;
 SvxPatternTabPage::SvxPatternTabPage(  vcl::Window* pParent, const SfxItemSet& 
rInAttrs) :
 
 SvxTabPage  ( pParent,
-  "BitmapTabPage",
+  "PatternTabPage",
   "cui/ui/patterntabpage.ui",
   rInAttrs ),
 m_rOutAttrs   ( rInAttrs ),
diff --git a/cui/uiconfig/ui/patterntabpage.ui 
b/cui/uiconfig/ui/patterntabpage.ui
index cce4493..8f6cc5f 100644
--- a/cui/uiconfig/ui/patterntabpage.ui
+++ b/cui/uiconfig/ui/patterntabpage.ui
@@ -13,7 +13,7 @@
 False
 res/sc05502.png
   
-  
+  
 True
 False
 True
@@ -239,7 +239,6 @@
   
 True
 False
-6
 6
 
   
@@ -279,21 +278,6 @@
 1
   
 
-
-  
-False
-Bitmap
-  
-  
-0
-1
-1
-1
-  
-
-
-  
-
   
   
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-30 Thread Muhammet Kara
 include/svx/dlgctrl.hxx   |2 +-
 svx/source/accessibility/svxpixelctlaccessiblecontext.cxx |4 ++--
 svx/source/dialog/dlgctrl.cxx |8 
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 1a4da5839546fd2a1d446a5eeb459ed981e873f3
Author: Muhammet Kara 
Date:   Thu Jun 30 14:05:47 2016 +0300

Rename GetFoucsPosIndex() to GetFocusPosIndex()

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

diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 1478b64..73d05b1 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -222,7 +222,7 @@ public:
 
 long PointToIndex(const Point &pt) const;
 Point IndexToPoint(long nIndex) const ;
-long GetFoucsPosIndex() const ;
+long GetFocusPosIndex() const ;
 //Keyboard function for key input and focus handling function
 virtual voidKeyInput( const KeyEvent& rKEvt ) override;
 virtual voidGetFocus() override;
diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx 
b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
index 230cc6e..0253d24 100644
--- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
@@ -329,7 +329,7 @@ sal_Bool SAL_CALL 
SvxPixelCtlAccessible::isAccessibleChildSelected( sal_Int32 nC
 {
 ::osl::MutexGuard   aGuard( m_aMutex );
 
-return mrPixelCtl.GetFoucsPosIndex() == nChildIndex;
+return mrPixelCtl.GetFocusPosIndex() == nChildIndex;
 }
 
 void SAL_CALL SvxPixelCtlAccessible::clearAccessibleSelection(  ) throw 
(RuntimeException, std::exception)
@@ -704,7 +704,7 @@ uno::Reference< XAccessibleStateSet > SAL_CALL 
SvxPixelCtlAccessibleChild::getAc
 pStateSetHelper->AddState( AccessibleStateType::SHOWING );
 pStateSetHelper->AddState( AccessibleStateType::VISIBLE );
 
-long nIndex = mrParentWindow.GetFoucsPosIndex();
+long nIndex = mrParentWindow.GetFocusPosIndex();
 if ( nIndex == mnIndexInParent)
 {
 pStateSetHelper->AddState( AccessibleStateType::SELECTED );
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 0d3b626..9c75ffa 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -771,7 +771,7 @@ Point SvxPixelCtl::IndexToPoint(long nIndex) const
 return aPtTl;
 }
 
-long SvxPixelCtl::GetFoucsPosIndex() const
+long SvxPixelCtl::GetFocusPosIndex() const
 {
 return aFocusPosition.getX() + aFocusPosition.getY() * nLines ;
 }
@@ -795,7 +795,7 @@ long SvxPixelCtl::ShowPosition( const Point &pt)
 if (pTabPage && WINDOW_TABPAGE == pTabPage->GetType())
 static_cast(pTabPage)->PointChanged( this, RP_MM ); // 
RectPoint ist dummy
 
-return GetFoucsPosIndex();
+return GetFocusPosIndex();
 
 }
 
@@ -1006,7 +1006,7 @@ void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt )
 }
 if(m_xAccess.is())
 {
-long nIndex = GetFoucsPosIndex();
+long nIndex = GetFocusPosIndex();
 switch(nCode)
 {
 case KEY_LEFT:
@@ -1039,7 +1039,7 @@ void SvxPixelCtl::GetFocus()
 
 if(m_pAccess)
 {
-m_pAccess->NotifyChild(GetFoucsPosIndex(),true,false);
+m_pAccess->NotifyChild(GetFocusPosIndex(),true,false);
 }
 
 Control::GetFocus();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


New C2220: warning treated as error (MSVC 2015 build failure)

2016-06-30 Thread Luke Benes
Ever since 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=62c047ffb397802c09df9070492e70725928cadf
Author: Markus Mohrhard Date:   Mon Jun 20 
09:02:47 2016 +0200
switch to EHs on windows
I'm getting the following build error with MSVC 2015 (32-bit MSVC 2013 still 
works). 
[build CXX] 
svl/source/undo/undo.cxxc:\lode\dev\core\svl\source\undo\undo.cxx(390) : error 
C2220: warning treated as error - no 'object' file 
generatedc:\lode\dev\core\svl\source\undo\undo.cxx(390) : warning C4702: 
unreachable codeC:/lode/dev/core/solenv/gbuild/LinkTarget.mk:189: recipe for 
target 'C:/lode/dev/core/workdir/CxxObject/svl/source/undo/undo.o' 
failedmake[1]: *** [C:/lode/dev/core/workdir/CxxObject/svl/source/undo/undo.o] 
Error 2make[1]: *** Waiting for unfinished jobsMakefile:258: recipe for 
target 'build' failedmake: *** [build] Error 2  
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-06-30 Thread Eike Rathke
 sc/qa/unit/data/functions/fods/weeks.fods |  485 +-
 sc/qa/unit/data/functions/fods/years.fods |  539 ++
 scaddins/source/datefunc/datefunc.cxx |9 
 3 files changed, 518 insertions(+), 515 deletions(-)

New commits:
commit 14e31d6cf4c4ba8a28b932c77994bc905686dba5
Author: Eike Rathke 
Date:   Thu Jun 30 18:49:36 2016 +0200

Resolves: tdf#100440 check mode to be 0 or 1 for MONTHS(), YEARS() and 
WEEKS()

Needed to adapt the WEEKS and YEARS test documents to cope with the
change.

Change-Id: Ia52505418f4fed684bd04290c608e2a65eee2fbc

diff --git a/sc/qa/unit/data/functions/fods/weeks.fods 
b/sc/qa/unit/data/functions/fods/weeks.fods
index 3c7b728..0002995 100644
--- a/sc/qa/unit/data/functions/fods/weeks.fods
+++ b/sc/qa/unit/data/functions/fods/weeks.fods
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2016-06-16T20:38:26.745575429P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/131e604073f89e6c1dd54be88b94b7befd881f2e
+ 
2016-06-16T20:38:26.745575429P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/6402c19c9b4d51dd7feaa3129b6f15b20704d356
  
   
0
0
35796
-   12440
+   12426

 
  view1
@@ -30,8 +30,8 @@
true
   
   
-   2
-   15
+   1
+   2
0
0
0
@@ -48,7 +48,7 @@
   
  
  Sheet2
- 1241
+ 1540
  0
  100
  60
@@ -88,10 +88,12 @@
true
true
true
+   true
+   true
false
12632256
false
-   Lexmark-E352dn
+   Generic 
Printer

 
  cs
@@ -115,14 +117,12 @@
  
 

-   true
-   true
3
1
true
1
true
-   qQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpBNAAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   hAH+/0dlbmVyaWMgUHJpbnRlcgAAU0dFTlBSVAAWAAMAqgAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9R2VuZXJpYyBQcmludGVyCm9yaWVudGF0aW9uPVBvcnRyYWl0CmNvcGllcz0xCm1hcmdpbmRhanVzdG1lbnQ9MCwwLDAsMApjb2xvcmRlcHRoPTI0CnBzbGV2ZWw9MApwZGZkZXZpY2U9MApjb2xvcmRldmljZT0wClBQRENvbnRleERhdGEKUGFnZVNpemU6TGV0dGVyAAASAENPTVBBVF9EVVBMRVhfTU9ERQoARFVQTEVYX09GRg==
false
0
   
@@ -146,259 +146,248 @@
  
  
   
-   
+   

   
   

   
-  
+  

 
Kč
   
-  
+  

-

 
Kč
-   
+   
   
-  
+  
£

   
-  
+  
-
£

-   
+   
   
-  
+  
£

   
-  
+  
-
£

-   
+   
   
-  
+  
£

   
-  
+  

-
£

-   
+   
   
-  
+  

Order of menu items

2016-06-30 Thread Jan Rheinländer
Hi,

my extension adds a menu to the Office menu bar with an .xcu file. The
file starts like this:


http://openoffice.org/2001/registry";
xmlns:xs="http://www.w3.org/2001/XMLSchema"; oor:name="Addons"
oor:package="org.openoffice.Office">
  

  

  iMath
iMath
  

 
com.sun.star.text.TextDocument,com.sun.star.text.GlobalDocument

  

   
 de.gmx.rheinlaender.jan.imath:edit
   
   
  Bearbeiten
  Edit
   
   
  _self
   
 
 
etc.etc.

As you can see I have numbered the nodes like 10:edit, next is
020:insert etc.

In Linux LO respects this order and arranges the menu items in order.
In Windows, it doesn't.

Is there any other way to define in which order the menu items should be
shown?

Thanks for any ideas!
Jan
 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-06-30 Thread Caolán McNamara
 sw/inc/accmap.hxx|8 
 sw/source/core/access/accmap.cxx |   10 +-
 sw/source/core/view/viewimp.cxx  |2 +-
 sw/source/uibase/docvw/PostItMgr.cxx |2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit ad59dcf7dad19540403f5812677901e6fad30257
Author: Caolán McNamara 
Date:   Thu Jun 30 15:33:14 2016 +0100

everything is called Dispose, hard to find anything

Change-Id: I473ed39c975886a6be30860cb61f6fe59c5508a4

diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index 2178a72..7c1f229 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -182,10 +182,10 @@ public:
 void RemoveContext( const SdrObject *pObj );
 
 // Dispose frame and its children if bRecursive is set
-void Dispose( const SwFrame* pFrame,
-  const SdrObject* pObj,
-  vcl::Window* pWindow,
-  bool bRecursive = false );
+void A11yDispose( const SwFrame* pFrame,
+  const SdrObject* pObj,
+  vcl::Window* pWindow,
+  bool bRecursive = false );
 
 void InvalidatePosOrSize( const SwFrame* pFrame,
   const SdrObject* pObj,
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 2f902ad..26720d1 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -2241,10 +2241,10 @@ void SwAccessibleMap::RemoveContext( const SdrObject 
*pObj )
 }
 }
 
-void SwAccessibleMap::Dispose( const SwFrame *pFrame,
-   const SdrObject *pObj,
-   vcl::Window* pWindow,
-   bool bRecursive )
+void SwAccessibleMap::A11yDispose( const SwFrame *pFrame,
+   const SdrObject *pObj,
+   vcl::Window* pWindow,
+   bool bRecursive )
 {
 SwAccessibleChild aFrameOrObj( pFrame, pObj, pWindow );
 
@@ -3189,7 +3189,7 @@ bool SwAccessibleMap::ReplaceChild (
 // Also get keep parent.
 uno::Reference < XAccessible > xParent( 
pCurrentChild->getAccessibleParent() );
 pCurrentChild = nullptr;  // will be released by dispose
-Dispose( nullptr, pObj, nullptr );
+A11yDispose( nullptr, pObj, nullptr );
 
 {
 osl::MutexGuard aGuard( maMutex );
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index 254a5b7..09b21ba 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -308,7 +308,7 @@ void SwViewShellImp::DisposeAccessible( const SwFrame 
*pFrame,
 for(SwViewShell& rTmp : GetShell()->GetRingContainer())
 {
 if( rTmp.Imp()->IsAccessible() )
-rTmp.Imp()->GetAccessibleMap().Dispose( pFrame, pObj, nullptr, 
bRecursive );
+rTmp.Imp()->GetAccessibleMap().A11yDispose( pFrame, pObj, nullptr, 
bRecursive );
 }
 }
 
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 4e7e165..66a2de1 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -2182,7 +2182,7 @@ void SwPostItMgr::DisconnectSidebarWinFromFrame( const 
SwFrame& rFrame,
 if ( bRemoved &&
  mpWrtShell->GetAccessibleMap() )
 {
-mpWrtShell->GetAccessibleMap()->Dispose( nullptr, nullptr, 
&rSidebarWin );
+mpWrtShell->GetAccessibleMap()->A11yDispose( nullptr, nullptr, 
&rSidebarWin );
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] libcdr.git: 2 commits - src/lib

2016-06-30 Thread Fridrich Štrba
 src/lib/CDRCollector.cpp   |8 +
 src/lib/CDRDocumentStructure.h |1 
 src/lib/CMXDocument.cpp|6 -
 src/lib/CMXParser.cpp  |  190 ++---
 src/lib/CMXParser.h|7 +
 5 files changed, 198 insertions(+), 14 deletions(-)

New commits:
commit fe3247f88f940990557d7822899d50483960c653
Author: Fridrich Å trba 
Date:   Thu Jun 30 18:15:03 2016 +0200

missing break

Change-Id: I6ed22efb32a75225c7cfd15a80637613e0483913

diff --git a/src/lib/CMXParser.cpp b/src/lib/CMXParser.cpp
index b2b40c6..f215a1c 100644
--- a/src/lib/CMXParser.cpp
+++ b/src/lib/CMXParser.cpp
@@ -651,6 +651,7 @@ void 
libcdr::CMXParser::readFill(librevenge::RVNGInputStream *input)
 if (tagId == CMX_Tag_EndTag)
 {
   CDR_DEBUG_MSG(("Solid fill - tagId %i\n", tagId));
+  break;
 }
 tagLength = readU16(input, m_bigEndian);
 CDR_DEBUG_MSG(("Solid fill - tagId %i, tagLength %u\n", tagId, 
tagLength));
commit 90c1937b9bd954a09d180c3dcefe39401f9a2019
Author: Fridrich Å trba 
Date:   Thu Jun 30 14:58:45 2016 +0200

Initial implementation of fills in cmx v6

Change-Id: I359cd6509fe52f1b48c2d4367850c85ba16492d0

diff --git a/src/lib/CDRCollector.cpp b/src/lib/CDRCollector.cpp
index a2f2edd..cc921a2 100644
--- a/src/lib/CDRCollector.cpp
+++ b/src/lib/CDRCollector.cpp
@@ -470,6 +470,14 @@ unsigned libcdr::CDRParserState::_getRGBColor(const 
CDRColor &color)
 }
 break;
   }
+  // BW
+  case 0x08:
+  {
+red = col0 ? 0 : 0xff;
+green = col0 ? 0 : 0xff;
+blue = col0 ? 0 : 0xff;
+break;
+  }
   // Grayscale
   case 0x09:
   {
diff --git a/src/lib/CDRDocumentStructure.h b/src/lib/CDRDocumentStructure.h
index 2d5b1da..5f93b77 100644
--- a/src/lib/CDRDocumentStructure.h
+++ b/src/lib/CDRDocumentStructure.h
@@ -92,6 +92,7 @@
 
 #define CDR_FOURCC_RIFF 0x46464952
 #define CDR_FOURCC_RIFX 0x58464952
+#define CDR_FOURCC_rclr 0x726c6372
 #define CDR_FOURCC_rvsn 0x6e737672
 
 #define CDR_FOURCC_spnd 0x646e7073
diff --git a/src/lib/CMXDocument.cpp b/src/lib/CMXDocument.cpp
index ff8df44..c92aae1 100644
--- a/src/lib/CMXDocument.cpp
+++ b/src/lib/CMXDocument.cpp
@@ -7,6 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -65,7 +66,8 @@ CDRAPI bool 
libcdr::CMXDocument::parse(librevenge::RVNGInputStream *input, libre
   input->seek(0, librevenge::RVNG_SEEK_SET);
   CDRParserState ps;
   CDRStylesCollector stylesCollector(ps);
-  CMXParser stylesParser(&stylesCollector);
+  std::map colorPalette;
+  CMXParser stylesParser(&stylesCollector, colorPalette);
   bool retVal = stylesParser.parseRecords(input);
   if (ps.m_pages.empty())
 retVal = false;
@@ -73,7 +75,7 @@ CDRAPI bool 
libcdr::CMXDocument::parse(librevenge::RVNGInputStream *input, libre
   {
 input->seek(0, librevenge::RVNG_SEEK_SET);
 CDRContentCollector contentCollector(ps, painter);
-CMXParser contentParser(&contentCollector);
+CMXParser contentParser(&contentCollector, colorPalette);
 retVal = contentParser.parseRecords(input);
   }
   return retVal;
diff --git a/src/lib/CMXParser.cpp b/src/lib/CMXParser.cpp
index c94e027..b2b40c6 100644
--- a/src/lib/CMXParser.cpp
+++ b/src/lib/CMXParser.cpp
@@ -28,12 +28,12 @@
 #define M_PI 3.14159265358979323846
 #endif
 
-libcdr::CMXParser::CMXParser(libcdr::CDRCollector *collector)
+libcdr::CMXParser::CMXParser(libcdr::CDRCollector *collector, 
std::map &colorPalette)
   : CommonParser(collector),
 m_bigEndian(false), m_unit(0),
 m_scale(0.0), m_xmin(0.0), m_xmax(0.0), m_ymin(0.0), m_ymax(0.0),
 m_indexSectionOffset(0), m_infoSectionOffset(0), m_thumbnailOffset(0),
-m_fillIndex(0), m_nextInstructionOffset(0) {}
+m_fillIndex(0), m_nextInstructionOffset(0), m_colorPalette(colorPalette) {}
 
 libcdr::CMXParser::~CMXParser()
 {
@@ -124,6 +124,9 @@ void libcdr::CMXParser::readRecord(unsigned fourCC, 
unsigned &length, librevenge
   case CDR_FOURCC_ccmm:
 readCcmm(input, recordEnd);
 break;
+  case CDR_FOURCC_rclr:
+readRclr(input, length);
+break;
   default:
 break;
   }
@@ -336,6 +339,7 @@ void 
libcdr::CMXParser::readBeginGroup(librevenge::RVNGInputStream * /* input */
 
 void libcdr::CMXParser::readPolyCurve(librevenge::RVNGInputStream *input)
 {
+  m_collector->collectObject(1);
   unsigned pointNum = 0;
   std::vector > points;
   std::vector pointTypes;
@@ -402,13 +406,13 @@ void 
libcdr::CMXParser::readPolyCurve(librevenge::RVNGInputStream *input)
   else
 return;
 
-  m_collector->collectObject(1);
   outputPath(points, pointTypes);
   m_collector->collectLevel(1);
 }
 
 void libcdr::CMXParser::readEllipse(librevenge::RVNGInputStream *input)
 {
+  m_collector->collectObject(1);
   double angle1 = 0.0;
   double angle2 = 0.0;
   double rotation = 0.0;
@@ -469,7 +473,6 @@ void 
libcdr::CMXParser::readEllipse(librevenge::RVNGInputStream *input)
   el

minutes of ESC call ...

2016-06-30 Thread Michael Meeks
* Present:
+ Stefan W. (smux, muted), jan i, Sophie, Lionel, Norbert, Miklos, Stephan,
  Caolan, Michael M, Eike, Noel, Jan-Marek, Markus, Thorsten, Michael S, 
Olivier,
  Heiko, Andras, Bjoern (10 minutes in)
 
* Completed Action Items:
+ mark no-code-pointer Easy Hacks as NEEDINFO & NeedsDevEval (Heiko)
 
* Pending Action Items:
+ connect Cloph + Norbert wrt. Mac & Windows machines for base (Lionel)
 [ unable to do anything, can't find student on IRC at the same to
   give access to remote Mac / Windows machines:
   some good progress ongoing in Firebird (Lionel)
   need an SSH key and desired user-name to access a Win firewall 
(Cloph)
  + idle Swiss Mac Mini ? (Norbert)
  + JanI happy to help with Win issues. ]
+ investigate a cron job that queries & auto-merges (Norbert)
 + if +2 by author and +1 by jenkins -> auto-push (on-going)
+ SQL query done.. but yield interesting result...
  https://gerrit.libreoffice.org/#/c/26347/  which 1/ is marked
  'not mergeable' but I can't yet detect that
  and really should not be merged anyway.. based on comments.
  + Not found a way to detect this yet.
  + That's probably a typo, he must have meant -1/-2 (Lionel)
  + in the same click foo.
  + hope is that if it gets merged this will stop (Michael)
  + says "can't merge" but not reflected in SQL table (Norbert)
  + what happens in the chron job +2 by author, but -2 by other ? 
(Lionel)
  + query - condition - is: +2 by author, and verified +1 by ci 
(Norbert)
  + has to be a committer - no non-committers can't +2
  + wise to check no -1's by anyone else.
  + also only valid on master, not elsewhere.
  + on other branches: could automate the rules (Lionel)
+ tweak UI and get LiveConnect API key / build case for board (Christian)
+ attempt to re-build a recent gstreamer 1.0 / core spec file
  on our CentOS6 base (tdf#94508) (Christian)
 
* Release Engineering update (Christian)
+ 5.2 RC2 - due July 5th (Tue next week)
+ will create libreoffice 5-2-0 branch
+ 5.1.5 rc1 : July 12th (week 28)
+ Android & iOS Remote
+ still crashes on startup.
 
* Documentation (Olivier)
+ Delivered chapter on Base for revision
+ To close the book on 5.1 - need to update base & impress
+ next is 5.2
+ Discussion with staff on how to increase Doc' visibility & Download rates 
(WIP)
+ More downloads, more public, more reads, more interest,
  better feedback/contrib/volunteers
+ a 2nd product - books; can give beside the software download.
   + can we have links in the help menu ?
   + such as books, ask etc. ?
   + easy to do - poke UX guys too (Michael)
+ Blog post
+ asking for new people to show up:

https://blog.documentfoundation.org/blog/2016/06/29/libreoffice-documentation-join-us-in-this-adventure/
+ two new people showed up already
 
* GSoC 2016 (Thorsten)
+ Everyone passed at Mid-Term
+ progress looks good.
+ next deadline is mid/end August for final evaluation.
+ poke & ask/encourage students to submit & register for LibOCon
+ particularly for foreign students.
=> will be re-imbursed up to Eur 1k each, for more ask mentor.
+ blogging encouraged too ! with screenshot would be good.
+ talked to UX students (Heiko)
+ not having time to come to the conference.
AI: + send E-mail to ask & encourage (Thorsten)
 
* Disable OpenCL by default in Calc (Markus, Eike)
+ Quite a lot of nasty bugs with OpenCL (Markus)
+ hard to reproduce them
+ three different code-paths to calculate
+ Hard to reproduce the bugs
+ Tracker bug (Michael)
+ 
https://bugs.documentfoundation.org/showdependencytree.cgi?id=97391&hide_resolved=1
+ 23 bugs over all time, 6 open currently, 4 needinfo 2 un-confirmed.
+ Crashes:
+ bad - but mis-calculation worse (Eike, Michael)
+ not spotted mis-calculations are worst.
+ need to avoid them.
+ Concern (Markus)
+ quality, and rate of bug fixing.
+ OpenCL - suggested improvements: (Michael)
+ test it when we 1st ever start - before we do real calcs.
+ OpenCLZone - cf. GL stuff to turn off on crash.
+ more active maintenance.
+ currently 3 different code-paths (Markus)
+ don't know which one we're using.
+ don't like the S/W interpreter.
+ Sw/Interp. (Michael)
+ only used for subset of ocAcc, ocSub, ocMul, ocDiv, ocSum, ocProduct
+ much faster.
+ Tor just accelerated the CPU S/W vs. OCL testing (Michael)
+ don't see value of it for the proj

Iterations and limit with Calc

2016-06-30 Thread Horst Reinhard Umlauf
With the first spreadsheets I remember the main idea behind iterations
and change limit was consistency within spreadsheets.
It seems this has changed.
When cells were changed within the set limit the iteration marker was set.
For iterations it was compared and when the number of iterations was not
reached the whole sheet was reprocessed.
Why has this changed to a cell iteration value where the number of
iterations is processed on a cell basis?
Can it be expected that this will be changed again in the future?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Firebird - status update

2016-06-30 Thread Bunth Tamás
>> I believe Firebird3 now supports auto-increment columsn
>>   
>> http://stackoverflow.com/questions/34553826/easiest-way-to-create-an-auto-increment-field-in-firebird-database
>
> I see that your latest gerrit revision takes that in account. Good! I
> should have some time this week-end to do a complete review.

Yes, thank you for the tip, Noel, that is certainly a better solution
as with triggers.

With my last path, I think it is ready to go, though it depends on the
previous "update to Firebird 3" patch, that's why it doesn't compile.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-06-30 Thread Mark Hung
 oox/source/export/shapes.cxx |4 ++--
 sd/qa/unit/data/odp/cellspan.odp |binary
 sd/qa/unit/export-tests.cxx  |   19 +++
 3 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit 0381026924947c6164d1eebe7395c91f619965ce
Author: Mark Hung 
Date:   Thu Jun 2 01:45:55 2016 +0800

tdf#100179 correct cell merging in pptx.

Change-Id: I7a5bc6fb33c64d1ff398986eff5b960fe037df4d
Reviewed-on: https://gerrit.libreoffice.org/25791
Tested-by: Jenkins 
Reviewed-by: Mark Hung 

diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index e389fc6..8d63d2c 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1321,7 +1321,7 @@ void ShapeExport::WriteTable( const Reference< XShape >& 
rXShape  )
 // having : horizontal merge
 mpFS->startElementNS(XML_a, XML_tc, XML_gridSpan,
  I32S(xCell->getColumnSpan()), FSEND);
-for(sal_Int32 columnIndex = nColumn; columnIndex < 
xCell->getColumnSpan(); ++columnIndex) {
+for(sal_Int32 columnIndex = nColumn; columnIndex < nColumn 
+ xCell->getColumnSpan(); ++columnIndex) {
 sal_Int32 transposeIndexForMergeCell = 
(nRow*nColumnCount) + columnIndex;
 mergedCellMap[transposeIndexForMergeCell] =
 std::make_pair(transposedIndexofCell, xCell);
@@ -1333,7 +1333,7 @@ void ShapeExport::WriteTable( const Reference< XShape >& 
rXShape  )
 mpFS->startElementNS(XML_a, XML_tc, XML_rowSpan,
  I32S(xCell->getRowSpan()), FSEND);
 
-for(sal_Int32 rowIndex = nRow; rowIndex < 
xCell->getRowSpan(); ++rowIndex) {
+for(sal_Int32 rowIndex = nRow; rowIndex < nRow + 
xCell->getRowSpan(); ++rowIndex) {
 sal_Int32 transposeIndexForMergeCell = 
(rowIndex*nColumnCount) + nColumn;
 mergedCellMap[transposeIndexForMergeCell] =
 std::make_pair(transposedIndexofCell, xCell);
diff --git a/sd/qa/unit/data/odp/cellspan.odp b/sd/qa/unit/data/odp/cellspan.odp
new file mode 100755
index 000..775e1e4
Binary files /dev/null and b/sd/qa/unit/data/odp/cellspan.odp differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index a2c3be2..5d79439 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -128,6 +128,7 @@ public:
 void testCellLeftAndRightMargin();
 void testRightToLeftParaghraph();
 void testTextboxWithHyperlink();
+void testMergedCells();
 void testTableCellBorder();
 void testBulletColor();
 void testTdf62176();
@@ -185,6 +186,7 @@ public:
 CPPUNIT_TEST(testCellLeftAndRightMargin);
 CPPUNIT_TEST(testRightToLeftParaghraph);
 CPPUNIT_TEST(testTextboxWithHyperlink);
+CPPUNIT_TEST(testMergedCells);
 CPPUNIT_TEST(testTableCellBorder);
 CPPUNIT_TEST(testBulletColor);
 CPPUNIT_TEST(testTdf62176);
@@ -1356,6 +1358,23 @@ void SdExportTest::testCellLeftAndRightMargin()
 xDocShRef->DoClose();
 }
 
+void SdExportTest::testMergedCells()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/cellspan.odp"), ODP);
+xDocShRef = saveAndReload( xDocShRef, PPTX );
+const SdrPage *pPage = GetPage( 1, xDocShRef );
+
+sdr::table::SdrTableObj *pTableObj = 
dynamic_cast(pPage->GetObj(0));
+
+CPPUNIT_ASSERT( pTableObj );
+uno::Reference< table::XTable > xTable(pTableObj->getTable(), 
uno::UNO_QUERY_THROW);
+uno::Reference< text::XTextRange > xText1(xTable->getCellByPosition(3, 0), 
uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT_EQUAL( OUString("0,3"), xText1->getString() );
+
+uno::Reference< text::XTextRange > xText2(xTable->getCellByPosition(3, 2), 
uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT_EQUAL( OUString("2,3"), xText2->getString() );
+}
+
 void SdExportTest::testTableCellBorder()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/n90190.pptx"), PPTX);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Different behavior of same code in Linux and Windows

2016-06-30 Thread Eike Rathke
Hi Noel,

On Thursday, 2016-06-30 08:51:35 +0200, Noel Grandin wrote:

> Under Windows, the Fraction class uses 32-bit calculations (because long is
> 32-bit on Windows), while on Linux it uses 64-bit values (because long is
> 64-bit  on 64-bit Linux)​

Just that Laurent's problem wasn't about the Fraction class ;-)  Anyhow,
32- vs 64-bit I think points into the right direction.

  Eike

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


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


Re: Firebird - status update

2016-06-30 Thread Lionel Elie Mamane
On Wed, Jun 29, 2016 at 10:16:01AM +0200, Noel Grandin wrote:
> On 2016/06/28 8:18 PM, Bunth Tamás wrote:
>> Currently I'm working on implementing auto increment columns for the
>> Firebird sdbc driver.

> I believe Firebird3 now supports auto-increment columsn
>   
> http://stackoverflow.com/questions/34553826/easiest-way-to-create-an-auto-increment-field-in-firebird-database

I see that your latest gerrit revision takes that in account. Good! I
should have some time this week-end to do a complete review.

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


Re: Different behavior of same code in Linux and Windows

2016-06-30 Thread Eike Rathke
Hi Laurent,

On Wednesday, 2016-06-29 05:19:43 -0700, Laurent BP wrote:

> On Linux, *sal_uLong nFrac* and *nDev* are modified and tend to a solution.
> My tests on Windows, thanks to Jenkin, show that *nFrac* and *nDev* keep the
> same values (respectively 0 and 1). So there is an infinite loop with this
> *while* when testing fractions in unit tests.

Try to make them sal_uInt64, as sal_uLong typedef'ed to sal_uIntPtr is
platform dependent and on Windows 32-bit is, well, 32-bit. If that still
fails try to make them volatile in case the compiler over-optimizes
things, or use double type.

  Eike

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


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


[Libreoffice-commits] core.git: extras/source sc/uiconfig sd/uiconfig sw/uiconfig vcl/source

2016-06-30 Thread Szymon Kłos
 extras/source/glade/libreoffice-catalog.xml.in |3 
 sc/uiconfig/scalc/ui/notebookbar.ui|   88 ++--
 sd/uiconfig/simpress/ui/notebookbar.ui |   96 --
 sw/uiconfig/swriter/ui/notebookbar.ui  |  106 -
 vcl/source/control/button.cxx  |7 +
 vcl/source/window/builder.cxx  |4 
 6 files changed, 112 insertions(+), 192 deletions(-)

New commits:
commit 5ee7caad68fecfb2124dd90e077597e92b6400c9
Author: Szymon Kłos 
Date:   Wed Jun 29 19:10:25 2016 +0200

GSoC added button with small padding

+ vcl builder setups action for custom buttons
+ new control: vcllo-SmallButton with WB_SMALLSTYLE property

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

diff --git a/extras/source/glade/libreoffice-catalog.xml.in 
b/extras/source/glade/libreoffice-catalog.xml.in
index 30dcecc..8744ebf 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -821,5 +821,8 @@
 
+
   
 
diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui 
b/sc/uiconfig/scalc/ui/notebookbar.ui
index cf72d70..3c1752c 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -237,8 +237,7 @@
 True
 False
 
-  
-70
+  
 True
 True
 True
@@ -296,8 +295,7 @@
   
 
 
-  
-130
+  
 True
 True
 True
@@ -1379,8 +1377,7 @@
 True
 False
 
-  
-130
+  
 True
 True
 True
@@ -1418,8 +1415,7 @@
 True
 False
 
-  
-60
+  
 True
 True
 True
@@ -1435,8 +1431,7 @@
   
 
 
-  
-110
+  
 True
 True
 True
@@ -1452,8 +1447,7 @@
   
 
 
-  
-60
+  
 True
 True
 True
@@ -1503,8 +1497,7 @@
   
 
 
-  
-150
+  
 True
 True
 True
@@ -1520,8 +1513,7 @@
   
 
 
-  
-80
+  
 True
 True
 True
@@ -1537,8 +1529,7 @@
   
 
 
-  
-80
+  
 True
 True
 True
@@ -1566,8 +1557,7 @@
   
 
 
-  
-70
+  
 True
 True
 True
@@ -1599,8 +1589,7 @@
 True
 False
 
-  
-130
+  
 True
 True
 True
@@ -1616,8 +1605,7 @@
   
 
 
-  
-70
+  
 True
 True
 True
@@ -1665,8 +1653,7 @@
 True
 False
 
-  
-100
+  
 True
 True
 True
@@ -1682,8 +1669,7 @@
   
 
 
-  
-120
+  
 True
 True
 True
@@ -1764,8 +1750,7 @@
 

Marco Filippozzi license statement

2016-06-30 Thread Marco Filippozzi
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


Re: A toolbar option that makes it easier to type using unicode

2016-06-30 Thread V Stuart Foote
Additionally, we already support this with the Special Character dialog. It
allows one to select by Unicode block, and has the Characters field to
compse with, picking glyphs and inserting into a paragraph when ready.  

In fact, the only missing element now for handling Unicode as requested by
OP with the Special Character dialog is the capability to display coverage
of specific Unicode block(s) listed by font families.  That would be a
useful enhancement, but is somewhat specialized.

Other work to be done with the Special Character dialog (e.g. recents,
favorits, Emoji, search) but in sum this request is not valid as it is
already provided for.

Stuart



--
View this message in context: 
http://nabble.documentfoundation.org/A-toolbar-option-that-makes-it-easier-to-type-using-unicode-tp4187542p4187597.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-06-30 Thread Caolán McNamara
 sfx2/source/sidebar/SidebarController.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 675c8faefd8756f7c43312f23eb341797bcbca4d
Author: Caolán McNamara 
Date:   Thu Jun 30 12:48:06 2016 +0100

Resolves: tdf#100692 crash in sidebar on deleting image from writer

stumbled on this in passing and it has the same bt as


http://crashreport.libreoffice.org/stats/signature/vcl::Window::setPosSizePixel(long,long,long,long,PosSizeFlags)

Change-Id: I1f19275029b05f353dfa823a2ff435e5045250a6

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 4685bf6..80afec5 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -313,7 +313,7 @@ void SAL_CALL SidebarController::requestLayout()
 throw(css::uno::RuntimeException, std::exception)
 {
 sal_Int32 nMinimalWidth = 0;
-if (mpCurrentDeck)
+if (mpCurrentDeck && !mpCurrentDeck->isDisposed())
 {
 mpCurrentDeck->RequestLayout();
 nMinimalWidth = mpCurrentDeck->GetMinimalWidth();
@@ -356,7 +356,7 @@ void SidebarController::NotifyResize()
 mbIsDeckRequestedOpen = bIsDeckVisible;
 UpdateCloseIndicator(!bIsDeckVisible);
 
-if (mpCurrentDeck)
+if (mpCurrentDeck && !mpCurrentDeck->isDisposed())
 {
 SfxSplitWindow* pSplitWindow = GetSplitWindow();
 WindowAlign eAlign = pSplitWindow ? pSplitWindow->GetAlign() : 
WindowAlign::Right;
@@ -390,7 +390,7 @@ void SidebarController::NotifyResize()
 
 // Determine if the closer of the deck can be shown.
 sal_Int32 nMinimalWidth = 0;
-if (mpCurrentDeck)
+if (mpCurrentDeck && !mpCurrentDeck->isDisposed())
 {
 DeckTitleBar* pTitleBar = mpCurrentDeck->GetTitleBar();
 if (pTitleBar != nullptr && pTitleBar->IsVisible())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-30 Thread Samuel Mehrbrodt
 sd/source/ui/dlg/PhotoAlbumDialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d12ed381be17a6bb2dac33ac82c46d85dcd41771
Author: Samuel Mehrbrodt 
Date:   Thu Jun 30 11:21:03 2016 +0200

tdf#65356 Photo Album: Disable "Insert Link" in the add dialog

since we have that option in the dialog directly

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

diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx 
b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 304ff9e..9622b8c 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -501,7 +501,7 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, 
Button*, void)
 IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, FileHdl, Button*, void)
 {
 ::sfx2::FileDialogHelper aDlg(
-css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
+css::ui::dialogs::TemplateDescription::FILEOPEN_PREVIEW,
 FileDialogFlags::Graphic | FileDialogFlags::MultiSelection
 );
 // Read configuration
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: fpicker/source offapi/com sfx2/source vcl/unx

2016-06-30 Thread Samuel Mehrbrodt
 fpicker/source/aqua/ControlHelper.mm|3 +++
 fpicker/source/aqua/SalAquaFilePicker.mm|7 +--
 fpicker/source/office/OfficeFilePicker.cxx  |4 
 fpicker/source/win32/filepicker/FilePicker.cxx  |1 +
 fpicker/source/win32/filepicker/VistaFilePicker.cxx |7 +++
 fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx |1 +
 offapi/com/sun/star/ui/dialogs/TemplateDescription.idl  |9 +
 sfx2/source/dialog/filedlghelper.cxx|   10 ++
 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx|6 ++
 vcl/unx/kde/UnxFilePicker.cxx   |6 ++
 vcl/unx/kde4/KDE4FilePicker.cxx |4 
 11 files changed, 56 insertions(+), 2 deletions(-)

New commits:
commit e9891e5dd8e9c83a1bf0483aa314e743a1c02e50
Author: Samuel Mehrbrodt 
Date:   Thu Jun 30 11:19:43 2016 +0200

Add new open dialog type: Preview only (without link)

This is needed e.g. for the "Insert Photo Album" dialog
where we don't want the "Insert Link" option in the file open dialog 
(tdf#65356)

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

diff --git a/fpicker/source/aqua/ControlHelper.mm 
b/fpicker/source/aqua/ControlHelper.mm
index 5727cdf..0cecb40 100644
--- a/fpicker/source/aqua/ControlHelper.mm
+++ b/fpicker/source/aqua/ControlHelper.mm
@@ -216,6 +216,9 @@ void ControlHelper::initialize( sal_Int16 nTemplateId )
 case FILESAVE_AUTOEXTENSION:
 m_bToggleVisibility[AUTOEXTENSION] = true;
 break;
+case FILEOPEN_PREVIEW:
+m_bToggleVisibility[PREVIEW] = true;
+break;
 }
 
 createControls();
diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm 
b/fpicker/source/aqua/SalAquaFilePicker.mm
index 78ec4f8..eef8f42 100644
--- a/fpicker/source/aqua/SalAquaFilePicker.mm
+++ b/fpicker/source/aqua/SalAquaFilePicker.mm
@@ -204,7 +204,7 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( 
uno::RuntimeException )
 
 default:
 throw uno::RuntimeException(
-  "The dialog returned with an unknown result!", 
+  "The dialog returned with an unknown result!",
   static_cast( static_cast( 
this ) ));
 break;
 }
@@ -288,7 +288,7 @@ uno::Sequence SAL_CALL 
SalAquaFilePicker::getSelectedFiles() thro
 SAL_INFO("fpicker.aqua", "# of items: " << nFiles);
 
 uno::Sequence< rtl::OUString > aSelectedFiles(nFiles);
-
+
 for(long nIndex = 0; nIndex < nFiles; nIndex += 1)
 {
 NSURL *url = [files objectAtIndex:nIndex];
@@ -483,6 +483,9 @@ throw( uno::Exception, uno::RuntimeException )
 case FILESAVE_AUTOEXTENSION:
 m_nDialogType = NAVIGATIONSERVICES_SAVE;
 break;
+case FILEOPEN_PREVIEW:
+m_nDialogType = NAVIGATIONSERVICES_OPEN;
+break;
 default:
 throw lang::IllegalArgumentException("Unknown template",
  static_cast( 
static_cast(this) ),
diff --git a/fpicker/source/office/OfficeFilePicker.cxx 
b/fpicker/source/office/OfficeFilePicker.cxx
index 728dd4f..1a5496b 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -277,6 +277,10 @@ PickerFlags SvtFilePicker::getPickerFlags()
 {
 nBits = PickerFlags::Open | PickerFlags::InsertAsLink | 
PickerFlags::ShowPreview;
 }
+else if ( m_nServiceType == TemplateDescription::FILEOPEN_PREVIEW )
+{
+nBits = PickerFlags::Open | PickerFlags::ShowPreview;
+}
 if ( m_bMultiSelection && ( nBits & PickerFlags::Open ) )
 nBits |= PickerFlags::MultiSelection;
 
diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx 
b/fpicker/source/win32/filepicker/FilePicker.cxx
index 88c8cdb..40c258d 100644
--- a/fpicker/source/win32/filepicker/FilePicker.cxx
+++ b/fpicker/source/win32/filepicker/FilePicker.cxx
@@ -562,6 +562,7 @@ void SAL_CALL CFilePicker::initialize(const 
uno::Sequence& aArguments)
 break;
 
 case FILEOPEN_LINK_PREVIEW:
+case FILEOPEN_PREVIEW: //FIXME: FILEOPEN_PREVIEW needs an own template, no 
idea how to create one
 winResTemplateId = TMPL2000_FILEOPEN_LINK_PREVIEW_BOX_SIMPLE_ID;
 break;
 
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx 
b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index 4b2a436..102117e 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
@@ -523,6 +523,13 @@ void SAL_CALL VistaFilePicker::initialize(const 
css::uno::Sequence< css::uno::An
 nFeatures|= FEATURE_AUTOEXTENSION;
 }
 break;
+
+case css::ui::dialog

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

2016-06-30 Thread Miklos Vajna
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   49 -
 sw/source/core/crsr/viscrs.cxx |4 +-
 2 files changed, 51 insertions(+), 2 deletions(-)

New commits:
commit 6168f10b6280b2d60de44a333f3f1dc23cbb9bcf
Author: Miklos Vajna 
Date:   Thu Jun 30 12:40:49 2016 +0200

sw lok: mix missing invalidation due to page calc in visible cursor change

Steps to reproduce in gtktiledviewer:

- two windows, then enable edit in both
- view #0: go inside a word
- view #1: select the same word
- press Del in view #1 -> no invalidation

Fix the problem by changing the LOK-specific GetPageNum() call in
SwVisibleCursor::SetPosAndShow(), so that it doesn't re-calculate the
frame, that way later when SwLayAction::TurboAction_() attempts to
re-calculate the layout, then the frame will be still invalid, and that
re-calculation then triggers the necessary invalidations.

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

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 240a27c..7709df8 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -52,6 +52,7 @@ public:
 void testPageDownInvalidation();
 void testPartHash();
 void testViewCursors();
+void testMissingInvalidation();
 
 CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
 CPPUNIT_TEST(testRegisterCallback);
@@ -71,6 +72,7 @@ public:
 CPPUNIT_TEST(testPageDownInvalidation);
 CPPUNIT_TEST(testPartHash);
 CPPUNIT_TEST(testViewCursors);
+CPPUNIT_TEST(testMissingInvalidation);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -550,12 +552,14 @@ public:
 bool m_bViewCursorInvalidated;
 bool m_bOwnSelectionSet;
 bool m_bViewSelectionSet;
+bool m_bTilesInvalidated;
 
 ViewCallback()
 : m_bOwnCursorInvalidated(false),
   m_bViewCursorInvalidated(false),
   m_bOwnSelectionSet(false),
-  m_bViewSelectionSet(false)
+  m_bViewSelectionSet(false),
+  m_bTilesInvalidated(false)
 {
 }
 
@@ -568,6 +572,11 @@ public:
 {
 switch (nType)
 {
+case LOK_CALLBACK_INVALIDATE_TILES:
+{
+m_bTilesInvalidated = true;
+}
+break;
 case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
 {
 m_bOwnCursorInvalidated = true;
@@ -592,6 +601,44 @@ public:
 }
 };
 
+void SwTiledRenderingTest::testMissingInvalidation()
+{
+comphelper::LibreOfficeKit::setActive();
+
+// Create two views.
+SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
+ViewCallback aView1;
+
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback,
 &aView1);
+int nView1 = SfxLokHelper::getView();
+SfxLokHelper::createView();
+ViewCallback aView2;
+
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback,
 &aView2);
+int nView2 = SfxLokHelper::getView();
+
+// First view: put the cursor into the first word.
+SfxLokHelper::setView(nView1);
+SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
+pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, 
/*bBasicCall=*/false);
+
+// Second view: select the first word.
+SfxLokHelper::setView(nView2);
+CPPUNIT_ASSERT(pXTextDocument->GetDocShell()->GetWrtShell() != pWrtShell);
+pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
+pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, 
/*bBasicCall=*/false);
+pWrtShell->SelWrd();
+
+// Now delete the selected word and make sure both views are invalidated.
+aView1.m_bTilesInvalidated = false;
+aView2.m_bTilesInvalidated = false;
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::DELETE);
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::DELETE);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT(aView1.m_bTilesInvalidated);
+CPPUNIT_ASSERT(aView2.m_bTilesInvalidated);
+
+comphelper::LibreOfficeKit::setActive(false);
+}
+
 void SwTiledRenderingTest::testViewCursors()
 {
 comphelper::LibreOfficeKit::setActive();
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 1ba80d9..bde11875 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -186,7 +186,9 @@ void SwVisibleCursor::SetPosAndShow()
 {
 // notify about page number change (if that happened)
 sal_uInt16 nPage, nVirtPage;
-const_cast(m_pCursorShell)->GetPageNum(nPage, 
nVirtPage);
+// bCalcFrame=false is important to avoid calculating the layout when
+// we're in the middle of doing that already.
+const_cast(m_pCursorShell)->GetPageNu

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

2016-06-30 Thread Eike Rathke
 sc/source/core/inc/interpre.hxx  |8 +++
 sc/source/core/tool/interpr1.cxx |   56 +++---
 sc/source/core/tool/interpr2.cxx |   99 ++-
 sc/source/core/tool/interpr4.cxx |   44 +
 sc/source/core/tool/interpr5.cxx |   15 -
 5 files changed, 141 insertions(+), 81 deletions(-)

New commits:
commit 0ac0061b437310c8bfb9d8b3596dae579a264b46
Author: Eike Rathke 
Date:   Thu Jun 30 12:51:01 2016 +0200

use GetInt*() in the most obvious places

found with /approxFloor.*GetDouble

Change-Id: Ice058c9cb318d7b0b0cadb9a26b4eb9f3691752f

diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 3da084f..6e8d9a7 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -513,8 +513,15 @@ void ScInterpreter::ScMatValue()
 if ( MustHaveParamCount( GetByte(), 3 ) )
 {
 // 0 to count-1
-SCSIZE nR = static_cast(::rtl::math::approxFloor(GetDouble()));
-SCSIZE nC = static_cast(::rtl::math::approxFloor(GetDouble()));
+// Theoretically we could have GetSize() instead of GetUInt32(), but
+// really, practically ...
+SCSIZE nR = static_cast(GetUInt32());
+SCSIZE nC = static_cast(GetUInt32());
+if (nGlobalError)
+{
+PushError( nGlobalError);
+return;
+}
 switch (GetStackType())
 {
 case svSingleRef :
@@ -606,8 +613,8 @@ void ScInterpreter::ScEMat()
 {
 if ( MustHaveParamCount( GetByte(), 1 ) )
 {
-SCSIZE nDim = 
static_cast(::rtl::math::approxFloor(GetDouble()));
-if (nDim == 0)
+SCSIZE nDim = static_cast(GetUInt32());
+if (nGlobalError || nDim == 0)
 PushIllegalArgument();
 else if (!ScMatrix::IsSizeAllocatable( nDim, nDim))
 PushError( errMatrixSize);
commit 2b376803a79c8eb74ebe2569badd271b63ccd4d6
Author: Eike Rathke 
Date:   Thu Jun 30 12:39:52 2016 +0200

use GetInt*() in the most obvious places

found with /approxFloor.*GetDouble

Change-Id: I2a08d8c268e6c1d64270d9c9f343b69a62f27708

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 5888abf..548e842 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -126,21 +126,21 @@ void ScInterpreter::ScGetActTime()
 void ScInterpreter::ScGetYear()
 {
 Date aDate = *(pFormatter->GetNullDate());
-aDate += (long) ::rtl::math::approxFloor(GetDouble());
+aDate += (long) GetInt32();
 PushDouble( (double) aDate.GetYear() );
 }
 
 void ScInterpreter::ScGetMonth()
 {
 Date aDate = *(pFormatter->GetNullDate());
-aDate += (long) ::rtl::math::approxFloor(GetDouble());
+aDate += (long) GetInt32();
 PushDouble( (double) aDate.GetMonth() );
 }
 
 void ScInterpreter::ScGetDay()
 {
 Date aDate = *(pFormatter->GetNullDate());
-aDate += (long)::rtl::math::approxFloor(GetDouble());
+aDate += (long) GetInt32();
 PushDouble((double) aDate.GetDay());
 }
 
@@ -192,19 +192,12 @@ void ScInterpreter::ScGetDayOfWeek()
 {
 sal_Int16 nFlag;
 if (nParamCount == 2)
-{
 nFlag = GetInt16();
-if (nGlobalError)
-{
-PushError( nGlobalError);
-return;
-}
-}
 else
 nFlag = 1;
 
 Date aDate = *(pFormatter->GetNullDate());
-aDate += (long)::rtl::math::approxFloor(GetDouble());
+aDate += (long) GetInt32();
 int nVal = (int) aDate.GetDayOfWeek();  // MONDAY = 0
 switch (nFlag)
 {
@@ -243,10 +236,10 @@ void ScInterpreter::ScWeeknumOOo()
 {
 if ( MustHaveParamCount( GetByte(), 2 ) )
 {
-short nFlag = (short) ::rtl::math::approxFloor(GetDouble());
+sal_Int16 nFlag = GetInt16();
 
 Date aDate = *(pFormatter->GetNullDate());
-aDate += (long)::rtl::math::approxFloor(GetDouble());
+aDate += (long) GetInt32();
 PushInt( (int) aDate.GetWeekOfYear( nFlag == 1 ? SUNDAY : MONDAY ));
 }
 }
@@ -258,21 +251,12 @@ void ScInterpreter::ScGetWeekOfYear()
 {
 sal_Int16 nFlag;
 if (nParamCount == 1)
-{
 nFlag = 1;
-}
 else
-{
 nFlag = GetInt16();
-if (nGlobalError)
-{
-PushError( nGlobalError);
-return;
-}
-}
 
 Date aDate = *(pFormatter->GetNullDate());
-aDate += (long)::rtl::math::approxFloor(GetDouble());
+aDate += (long) GetInt32();
 
 sal_Int32 nMinimumNumberOfDaysInWeek;
 DayOfWeek eFirstDayOfWeek;
@@ -315,7 +299,7 @@ void ScInterpreter::ScGetIsoWeekOfYear()
 if ( MustHaveParamCount( GetByte(), 1 ) )
 {
 Date aDate = *(pFormatter->GetNullDate());
-aDate += (long)::rtl::math::approxFloor(GetDouble())

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

2016-06-30 Thread Stephan Bergmann
 compilerplugins/clang/badstatics.cxx |2 ++
 vcl/unx/gtk/a11y/atkutil.cxx |   21 +
 2 files changed, 19 insertions(+), 4 deletions(-)

New commits:
commit 2ea01fb9002c4aceba724cabad663d6026381c0c
Author: Stephan Bergmann 
Date:   Thu Jun 30 12:53:40 2016 +0200

loplugin:badstatics: further (Linux-only) static only found with libc++

Change-Id: I048212e3feb3f548d5a65940dd71ccb71cade778

diff --git a/compilerplugins/clang/badstatics.cxx 
b/compilerplugins/clang/badstatics.cxx
index 4904e1a..12e6b93 100644
--- a/compilerplugins/clang/badstatics.cxx
+++ b/compilerplugins/clang/badstatics.cxx
@@ -148,6 +148,8 @@ public:
 || name == "theAddInAsyncTbl"
 // sc/source/core/tool/adiasync.cxx, would leak
 // ScAddInAsync* keys if that set is not empty at exit
+|| name == "g_aWindowList"
+//vcl/unx/gtk/a11y/atkutil.cxx, asserted empty at exit
) // these variables appear unproblematic
 {
 return true;
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index d722936..79d8013 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -44,6 +44,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -483,7 +484,19 @@ static void handle_toolbox_buttonchange(VclWindowEvent 
const *pEvent)
 
 /*/
 
-static std::set< VclPtr > g_aWindowList;
+namespace {
+
+struct WindowList {
+~WindowList() { assert(list.empty()); };
+// needs to be empty already on DeInitVCL, but at least check it's 
empty
+// on exit
+
+std::set< VclPtr > list;
+};
+
+WindowList g_aWindowList;
+
+}
 
 static void handle_get_focus(::VclWindowEvent const * pEvent)
 {
@@ -534,9 +547,9 @@ static void handle_get_focus(::VclWindowEvent const * 
pEvent)
 }
 else
 {
-if( g_aWindowList.find(pWindow) == g_aWindowList.end() )
+if( g_aWindowList.list.find(pWindow) == g_aWindowList.list.end() )
 {
-g_aWindowList.insert(pWindow);
+g_aWindowList.list.insert(pWindow);
 try
 {
 aDocumentFocusListener->attachRecursive(xAccessible, xContext, 
xStateSet);
@@ -628,7 +641,7 @@ void WindowEventHandler(void *, VclSimpleEvent& rEvent)
 break;
 
 case VCLEVENT_OBJECT_DYING:
-g_aWindowList.erase( static_cast< ::VclWindowEvent const * 
>(&rEvent)->GetWindow() );
+g_aWindowList.list.erase( static_cast< ::VclWindowEvent const * 
>(&rEvent)->GetWindow() );
 SAL_FALLTHROUGH;
 case VCLEVENT_TOOLBOX_HIGHLIGHTOFF:
 handle_toolbox_highlightoff(static_cast< ::VclWindowEvent const * 
>(&rEvent)->GetWindow());
___
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.0' - filter/source

2016-06-30 Thread Andras Timar
 filter/source/svg/js2hxx.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6835231ec6e406787831911c6f1de2eb7547024f
Author: Andras Timar 
Date:   Thu Jun 30 12:53:27 2016 +0200

avoid 'Compiler Error C2026 string too big, trailing characters truncated'

Change-Id: I7580b1b9bb5323c13c19cef86d50fde19a2f3a97

diff --git a/filter/source/svg/js2hxx.py b/filter/source/svg/js2hxx.py
index 5d6ddd51..f5f6352 100755
--- a/filter/source/svg/js2hxx.py
+++ b/filter/source/svg/js2hxx.py
@@ -20,7 +20,7 @@
 
 import os, sys
 
-MAX_LINES = 200
+MAX_LINES = 150
 VARIABLE_NAME = 'aSVGScript'
 
 def get_var_decl(n):
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-30 Thread Samuel Mehrbrodt
 sd/sdi/sdraw.sdi |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dc93e3330e143113df6cf74861315c15a80324b5
Author: Samuel Mehrbrodt 
Date:   Thu Jun 30 12:01:43 2016 +0200

Photo Album: Allow assigning keyboard shortcuts

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

diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index 19904de..fec1edf 100644
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -4720,7 +4720,7 @@ SfxVoidItem PhotoAlbumDialog SID_PHOTOALBUM
 RecordAbsolute = FALSE,
 RecordPerItem;
 
-AccelConfig = FALSE,
+AccelConfig = TRUE,
 MenuConfig = TRUE,
 ToolBoxConfig = TRUE,
 GroupId = GID_OPTIONS;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-30 Thread Samuel Mehrbrodt
 sd/uiconfig/simpress/ui/photoalbum.ui |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 9596ab09d05d0e939d408c0f359c9d9de2fbe3cc
Author: Samuel Mehrbrodt 
Date:   Thu Jun 30 11:35:31 2016 +0200

Photo album: Remove padding from preview image

So that it aligns well with the other controls

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

diff --git a/sd/uiconfig/simpress/ui/photoalbum.ui 
b/sd/uiconfig/simpress/ui/photoalbum.ui
index bda02f8..66948ee 100644
--- a/sd/uiconfig/simpress/ui/photoalbum.ui
+++ b/sd/uiconfig/simpress/ui/photoalbum.ui
@@ -244,7 +244,6 @@
 False
 True
 6
-12
 
   
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-30 Thread Samuel Mehrbrodt
 sd/source/ui/dlg/PhotoAlbumDialog.cxx |   39 +++---
 sd/source/ui/dlg/PhotoAlbumDialog.hxx |1 
 sd/uiconfig/simpress/ui/photoalbum.ui |   19 ++--
 3 files changed, 50 insertions(+), 9 deletions(-)

New commits:
commit 49f93558f073f97e33f3303ebca823a14e238e99
Author: Samuel Mehrbrodt 
Date:   Thu Jun 30 09:50:35 2016 +0200

tdf#65356 Photo Album: Allow inserting images as link

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

diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx 
b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 04a7b80..304ff9e 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -56,6 +56,8 @@ SdPhotoAlbumDialog::SdPhotoAlbumDialog(vcl::Window* pWindow, 
SdDrawDocument* pAc
 get(pInsTypeCombo, "opt_combo");
 get(pASRCheck, "asr_check");
 get(pCapCheck, "cap_check");
+get(pInsertAsLinkCheck, "insert_as_link_check");
+
 pCancelBtn->SetClickHdl(LINK(this, SdPhotoAlbumDialog, CancelHdl));
 pCreateBtn->SetClickHdl(LINK(this, SdPhotoAlbumDialog, CreateHdl));
 
@@ -92,6 +94,7 @@ void SdPhotoAlbumDialog::dispose()
 pInsTypeCombo.clear();
 pASRCheck.clear();
 pCapCheck.clear();
+pInsertAsLinkCheck.clear();
 ModalDialog::dispose();
 }
 
@@ -119,6 +122,7 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, 
Button*, void)
 // determine if to use Captions (use TitleObject) and choose the 
correct AutoLayout
 // from the beginning
 const bool bCreateCaptions(pCapCheck->IsChecked());
+const bool bInsertAsLink(pInsertAsLinkCheck->IsChecked());
 const AutoLayout aAutoLayout(bCreateCaptions ? AUTOLAYOUT_TITLE_ONLY : 
AUTOLAYOUT_NONE);
 
 // get the option
@@ -145,7 +149,10 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, 
Button*, void)
 uno::UNO_QUERY);
 
 Reference< beans::XPropertySet > xProps( xShape, 
uno::UNO_QUERY );
-xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic));
+if (bInsertAsLink)
+xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl));
+else
+xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic));
 
 ::awt::Size aPageSize;
 
@@ -220,7 +227,10 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, 
Button*, void)
 uno::UNO_QUERY);
 
 Reference< beans::XPropertySet > xProps( xShape, 
uno::UNO_QUERY );
-xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic));
+if (bInsertAsLink)
+xProps->setPropertyValue("GraphicURL", 
::uno::Any(sUrl1));
+else
+xProps->setPropertyValue("Graphic", 
::uno::Any(xGraphic));
 
 ::awt::Point aPicPos;
 
@@ -255,7 +265,10 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, 
Button*, void)
 uno::UNO_QUERY);
 
 Reference< beans::XPropertySet > xProps( xShape, 
uno::UNO_QUERY );
-xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic));
+if (bInsertAsLink)
+xProps->setPropertyValue("GraphicURL", 
::uno::Any(sUrl2));
+else
+xProps->setPropertyValue("Graphic", 
::uno::Any(xGraphic));
 
 ::awt::Point aPicPos;
 
@@ -335,7 +348,10 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, 
Button*, void)
 uno::UNO_QUERY);
 
 Reference< beans::XPropertySet > xProps( xShape, 
uno::UNO_QUERY );
-xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic));
+if (bInsertAsLink)
+xProps->setPropertyValue("GraphicURL", 
::uno::Any(sUrl1));
+else
+xProps->setPropertyValue("Graphic", 
::uno::Any(xGraphic));
 
 ::awt::Point aPicPos;
 
@@ -369,7 +385,10 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, 
Button*, void)
 uno::UNO_QUERY);
 
 Reference< beans::XPropertySet > xProps( xShape, 
uno::UNO_QUERY );
-xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic));
+if (bInsertAsLink)
+xProps->setPropertyValue("GraphicURL", 
::uno::Any(sUrl2));
+else
+xProps->setPropertyValue("Graphic", 
::uno::Any(xGraphic));
 
 ::awt::Point aPicPos;
 
@@ -404,7 +423,10 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, 
Button*, void)
 uno::UNO_QUERY);
 
 Reference< beans::XPropertySet > xProps( xShape, 
uno::UN

[Libreoffice-commits] core.git: Makefile.in

2016-06-30 Thread Stephan Bergmann
 Makefile.in |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f63b5c5cbc8f5a9dd32f7cf5010187f8ae24206a
Author: Stephan Bergmann 
Date:   Thu Jun 30 11:23:22 2016 +0200

distclean the generated bin/bffvalidator.sh

Change-Id: I3ea4f0682250ddb475c66a9782194177e6ae7586

diff --git a/Makefile.in b/Makefile.in
index 2fb1f5f..ef56bee 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -183,6 +183,7 @@ distclean : clean compilerplugins-clean
 $(BUILDDIR)/Makefile \
 $(BUILDDIR)/aclocal.m4 \
 $(BUILDDIR)/autom4te.cache \
+$(BUILDDIR)/bin/bffvalidator.sh \
 $(BUILDDIR)/config.log \
 $(BUILDDIR)/config.Build.log \
 $(BUILDDIR)/config.status \
___
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' - svx/inc svx/source

2016-06-30 Thread Samuel Mehrbrodt
 svx/inc/tbunosearchcontrollers.hxx |2 +
 svx/source/tbxctrls/tbunosearchcontrollers.cxx |   29 +++--
 2 files changed, 11 insertions(+), 20 deletions(-)

New commits:
commit 2e171fa809495120a5b944ce7b1f77099dbb9a4a
Author: Samuel Mehrbrodt 
Date:   Wed Jun 29 22:50:22 2016 +0200

tdf#89616 Find toolbar: Activate search arrows when input has text

Not only when input is modfified

Change-Id: Ic6b94dbfba34ec6eb88c9c385aaa36a7bac19de7
Reviewed-on: https://gerrit.libreoffice.org/26782
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 
(cherry picked from commit 6f34143dfb061cb8dda76b9e4f449f1e6b4fc181)
Reviewed-on: https://gerrit.libreoffice.org/26788
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/svx/inc/tbunosearchcontrollers.hxx 
b/svx/inc/tbunosearchcontrollers.hxx
index efa07be..5b38ff7 100644
--- a/svx/inc/tbunosearchcontrollers.hxx
+++ b/svx/inc/tbunosearchcontrollers.hxx
@@ -117,6 +117,8 @@ public:
 
 private:
 
+void textfieldChanged();
+
 VclPtr m_pFindTextFieldControl;
 
 sal_uInt16 m_nDownSearchId; // item position of findbar
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx 
b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index f050ca6..77c7474 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -450,15 +450,9 @@ void SAL_CALL FindTextToolbarController::initialize( const 
css::uno::Sequence< c
 {
 OUString sItemCommand = pToolBox->GetItemCommand(i);
 if ( sItemCommand == COMMAND_DOWNSEARCH )
-{
-pToolBox->EnableItem(i, false);
 m_nDownSearchId = i;
-}
 else if ( sItemCommand == COMMAND_UPSEARCH )
-{
-pToolBox->EnableItem(i, false);
 m_nUpSearchId = i;
-}
 }
 }
 
@@ -497,29 +491,24 @@ void SAL_CALL FindTextToolbarController::statusChanged( 
const css::frame::Featur
 {
 
m_pFindTextFieldControl->Remember_Impl(m_pFindTextFieldControl->GetText());
 }
+// enable up/down buttons in case there is already text (from the search 
history)
+textfieldChanged();
 }
 
 IMPL_LINK_NOARG_TYPED(FindTextToolbarController, EditModifyHdl, Edit&, void)
 {
+textfieldChanged();
+}
+
+void FindTextToolbarController::textfieldChanged() {
 // enable or disable item DownSearch/UpSearch of findbar
 vcl::Window* pWindow = VCLUnoHelper::GetWindow( getParent() );
 ToolBox* pToolBox = static_cast(pWindow);
 if ( pToolBox && m_pFindTextFieldControl )
 {
-if (!m_pFindTextFieldControl->GetText().isEmpty())
-{
-if ( !pToolBox->IsItemEnabled(m_nDownSearchId) )
-pToolBox->EnableItem(m_nDownSearchId);
-if ( !pToolBox->IsItemEnabled(m_nUpSearchId) )
-pToolBox->EnableItem(m_nUpSearchId);
-}
-else
-{
-if ( pToolBox->IsItemEnabled(m_nDownSearchId) )
-pToolBox->EnableItem(m_nDownSearchId, false);
-if ( pToolBox->IsItemEnabled(m_nUpSearchId) )
-pToolBox->EnableItem(m_nUpSearchId, false);
-}
+bool enableButtons = !m_pFindTextFieldControl->GetText().isEmpty();
+pToolBox->EnableItem(m_nDownSearchId, enableButtons);
+pToolBox->EnableItem(m_nUpSearchId, enableButtons);
 }
 }
 
___
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' - compilerplugins/Makefile-clang.mk

2016-06-30 Thread Michael Stahl
 compilerplugins/Makefile-clang.mk |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 02e751037b5ff301ba356793c10af9b4bfb5817e
Author: Michael Stahl 
Date:   Wed Jun 29 22:34:02 2016 +0200

compilerplugins: -isystem /usr/include breaks the build

... on Fedora 24, and it's a Bad Idea in general because it breaks
"#include_next" ordering of GCC's and glibc's variously distributed
headers.

Change-Id: I0c8b51a6d7191ec9cc5187636ea2717e8fd97715
(cherry picked from commit 11f69994b0231a760231b712d9faf6806334232f)
Reviewed-on: https://gerrit.libreoffice.org/26783
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 868b5b0..cc2bdc7 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -25,7 +25,8 @@ CLANGCXXFLAGS=-O2 -Wall -Wextra -Wundef -g
 # Clang headers require these.
 CLANGDEFS=-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
-D__STDC_LIMIT_MACROS -fno-rtti
 # All include locations needed.
-CLANGINCLUDES=-isystem $(CLANGDIR)/include -isystem 
$(CLANGDIR)/tools/clang/include
+CLANGINCLUDES=$(if $(filter /usr,$(CLANGDIR)),,-isystem $(CLANGDIR)/include) \
+ -isystem $(CLANGDIR)/tools/clang/include
 
 # Clang/LLVM libraries are intentionally not linked in, they are usually built 
as static libraries, which means the resulting
 # plugin would be big (even though the clang binary already includes it all) 
and it'd be necessary to explicitly specify
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Manuel De Franceschi license statement

2016-06-30 Thread jan iversen
WELCOME
Thanks for your license statement.

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

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

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

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

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


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - compilerplugins/clang

2016-06-30 Thread Stephan Bergmann
 compilerplugins/clang/badstatics.cxx |2 
 compilerplugins/clang/check.cxx  |   80 
 compilerplugins/clang/check.hxx  |  207 +++
 compilerplugins/clang/fpcomparison.cxx   |   54 +++---
 compilerplugins/clang/getimplementationname.cxx  |2 
 compilerplugins/clang/implicitboolconversion.cxx |1 
 compilerplugins/clang/passstuffbyref.cxx |   27 ++-
 compilerplugins/clang/refcounting.cxx|9 -
 compilerplugins/clang/salbool.cxx|1 
 compilerplugins/clang/staticmethods.cxx  |2 
 compilerplugins/clang/stringconstant.cxx |2 
 compilerplugins/clang/typecheck.cxx  |   70 ---
 compilerplugins/clang/typecheck.hxx  |  158 -
 13 files changed, 350 insertions(+), 265 deletions(-)

New commits:
commit 39f64074d34116d9aa647fa637d982b27fef8ae4
Author: Stephan Bergmann 
Date:   Tue Jun 28 18:54:31 2016 +0200

More Clang 3.4 "(anonymous namespace)" fixes

Reviewed-on: https://gerrit.libreoffice.org/26748
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 
(cherry picked from commit 0d3738a2580d72b778547bfcdf691fdeb0eccbdd)
Conflicts:
compilerplugins/clang/refcounting.cxx
compilerplugins/clang/weakobject.cxx

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

diff --git a/compilerplugins/clang/badstatics.cxx 
b/compilerplugins/clang/badstatics.cxx
index aa50241..f316b4d 100644
--- a/compilerplugins/clang/badstatics.cxx
+++ b/compilerplugins/clang/badstatics.cxx
@@ -7,8 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include "check.hxx"
 #include "plugin.hxx"
-#include "typecheck.hxx"
 
 namespace {
 
diff --git a/compilerplugins/clang/typecheck.cxx 
b/compilerplugins/clang/check.cxx
similarity index 78%
rename from compilerplugins/clang/typecheck.cxx
rename to compilerplugins/clang/check.cxx
index dcfc6db..26a48c2 100644
--- a/compilerplugins/clang/typecheck.cxx
+++ b/compilerplugins/clang/check.cxx
@@ -7,8 +7,10 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
+#include "check.hxx"
 #include "compat.hxx"
-#include "typecheck.hxx"
 
 namespace loplugin {
 
@@ -46,7 +48,15 @@ TypeCheck TypeCheck::NotSubstTemplateTypeParmType() const {
 ? *this : TypeCheck();
 }
 
-TerminalCheck NamespaceCheck::GlobalNamespace() const {
+ContextCheck DeclCheck::Operator(clang::OverloadedOperatorKind op) const {
+assert(op != clang::OO_None);
+auto f = llvm::dyn_cast_or_null(decl_);
+return ContextCheck(
+f != nullptr && f->getOverloadedOperator() == op
+? f->getDeclContext() : nullptr);
+}
+
+TerminalCheck ContextCheck::GlobalNamespace() const {
 return TerminalCheck(
 context_ != nullptr
 && ((compat::isLookupContext(*context_)
@@ -54,14 +64,14 @@ TerminalCheck NamespaceCheck::GlobalNamespace() const {
 ->isTranslationUnit()));
 }
 
-TerminalCheck NamespaceCheck::StdNamespace() const {
+TerminalCheck ContextCheck::StdNamespace() const {
 return TerminalCheck(
 context_ != nullptr && compat::isStdNamespace(*context_));
 }
 
-NamespaceCheck NamespaceCheck::AnonymousNamespace() const {
+ContextCheck ContextCheck::AnonymousNamespace() const {
 auto n = llvm::dyn_cast_or_null(context_);
-return NamespaceCheck(
+return ContextCheck(
 n != nullptr && n->isAnonymousNamespace() ? n->getParent() : nullptr);
 }
 
diff --git a/compilerplugins/clang/typecheck.hxx 
b/compilerplugins/clang/check.hxx
similarity index 53%
rename from compilerplugins/clang/typecheck.hxx
rename to compilerplugins/clang/check.hxx
index 02c6382..999a318 100644
--- a/compilerplugins/clang/typecheck.hxx
+++ b/compilerplugins/clang/check.hxx
@@ -7,23 +7,24 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_COMPILERPLUGINS_CLANG_TYPECHECK_HXX
-#define INCLUDED_COMPILERPLUGINS_CLANG_TYPECHECK_HXX
+#ifndef INCLUDED_COMPILERPLUGINS_CLANG_CHECK_HXX
+#define INCLUDED_COMPILERPLUGINS_CLANG_CHECK_HXX
 
 #include 
 
 #include 
 #include 
 #include 
+#include 
 
 namespace loplugin {
 
-class NamespaceCheck;
+class ContextCheck;
 class TerminalCheck;
 
 namespace detail {
 
-template NamespaceCheck checkRecordDecl(
+template ContextCheck checkRecordDecl(
 clang::Decl const * decl, clang::TagTypeKind tag, char const (& id)[N]);
 
 }
@@ -40,7 +41,7 @@ public:
 
 TypeCheck LvalueReference() const;
 
-template inline NamespaceCheck Class(char const (& id)[N])
+template inline ContextCheck Class(char const (& id)[N])
 const;
 
 TypeCheck NotSubstTemplateTypeParmType() const;
@@ -51,50 +52,65 @@ private:
 clang::QualType const type_;
 };
 
-class NamespaceCheck {
+clas

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - compilerplugins/clang

2016-06-30 Thread Stephan Bergmann
 compilerplugins/clang/staticmethods.cxx |9 +++--
 compilerplugins/clang/typecheck.cxx |6 +++
 compilerplugins/clang/typecheck.hxx |   57 +++-
 3 files changed, 61 insertions(+), 11 deletions(-)

New commits:
commit be9cd27b83c573bb143bd2778d6c63828e59aa3e
Author: Stephan Bergmann 
Date:   Tue Jun 28 17:48:22 2016 +0200

More adaption to Clang 3.4

...where NmaedDecl::getQualifiedNameAsString (which is expensive and bad,
anyway) apparently returns something other than "(anonymous namespace)"

Change-Id: I05ef96665c48f8f596dd0d317388e91a75b8307b
(cherry picked from commit c1ab6613ae7b45f2d90aafd6c6a829a471ceca55)
Reviewed-on: https://gerrit.libreoffice.org/26778
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/compilerplugins/clang/staticmethods.cxx 
b/compilerplugins/clang/staticmethods.cxx
index be014fd..9108e02 100644
--- a/compilerplugins/clang/staticmethods.cxx
+++ b/compilerplugins/clang/staticmethods.cxx
@@ -9,8 +9,9 @@
 
 #include "clang/AST/Attr.h"
 
-#include "plugin.hxx"
 #include "compat.hxx"
+#include "plugin.hxx"
+#include "typecheck.hxx"
 
 /*
   Look for member functions that can be static
@@ -118,12 +119,14 @@ bool StaticMethods::TraverseCXXMethodDecl(const 
CXXMethodDecl * pCXXMethodDecl)
 }
 // can't change it because in debug mode it can't be static
 // sal/cpprt/operators_new_delete.cxx
-if (aParentName == "(anonymous namespace)::AllocatorTraits") {
+auto dc = loplugin::DeclCheck(pCXXMethodDecl->getParent());
+if (dc.Struct("AllocatorTraits").AnonymousNamespace().GlobalNamespace()) {
 return true;
 }
 // in this case, the code is taking the address of the member function
 // shell/source/unix/sysshell/recently_used_file_handler.cxx
-if (aParentName == "(anonymous namespace)::recently_used_item") {
+if (dc.Struct("recently_used_item").AnonymousNamespace().GlobalNamespace())
+{
 return true;
 }
 // the unotools and svl config code stuff is doing weird stuff with a 
reference-counted statically allocated pImpl class
diff --git a/compilerplugins/clang/typecheck.cxx 
b/compilerplugins/clang/typecheck.cxx
index 490deb8..dcfc6db 100644
--- a/compilerplugins/clang/typecheck.cxx
+++ b/compilerplugins/clang/typecheck.cxx
@@ -59,6 +59,12 @@ TerminalCheck NamespaceCheck::StdNamespace() const {
 context_ != nullptr && compat::isStdNamespace(*context_));
 }
 
+NamespaceCheck NamespaceCheck::AnonymousNamespace() const {
+auto n = llvm::dyn_cast_or_null(context_);
+return NamespaceCheck(
+n != nullptr && n->isAnonymousNamespace() ? n->getParent() : nullptr);
+}
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/compilerplugins/clang/typecheck.hxx 
b/compilerplugins/clang/typecheck.hxx
index 70e3d8c..02c6382 100644
--- a/compilerplugins/clang/typecheck.hxx
+++ b/compilerplugins/clang/typecheck.hxx
@@ -21,6 +21,13 @@ namespace loplugin {
 class NamespaceCheck;
 class TerminalCheck;
 
+namespace detail {
+
+template NamespaceCheck checkRecordDecl(
+clang::Decl const * decl, clang::TagTypeKind tag, char const (& id)[N]);
+
+}
+
 class TypeCheck {
 public:
 explicit TypeCheck(clang::QualType type): type_(type) {}
@@ -55,8 +62,12 @@ public:
 
 TerminalCheck StdNamespace() const;
 
+NamespaceCheck AnonymousNamespace() const;
+
 private:
-friend class TypeCheck;
+friend TypeCheck;
+template friend NamespaceCheck detail::checkRecordDecl(
+clang::Decl const * decl, clang::TagTypeKind tag, char const (& 
id)[N]);
 
 explicit NamespaceCheck(clang::DeclContext const * context = nullptr):
 context_(context) {}
@@ -64,6 +75,19 @@ private:
 clang::DeclContext const * const context_;
 };
 
+class DeclCheck {
+public:
+explicit DeclCheck(clang::Decl const * decl): decl_(decl) {}
+
+explicit operator bool() const { return decl_ != nullptr; }
+
+template inline NamespaceCheck Struct(char const (& id)[N])
+const;
+
+private:
+clang::Decl const * const decl_;
+};
+
 class TerminalCheck {
 public:
 explicit operator bool() const { return satisfied_; }
@@ -77,19 +101,30 @@ private:
 bool const satisfied_;
 };
 
+namespace detail {
+
+template NamespaceCheck checkRecordDecl(
+clang::Decl const * decl, clang::TagTypeKind tag, char const (& id)[N])
+{
+auto r = llvm::dyn_cast_or_null(decl);
+if (r != nullptr && r->getTagKind() == tag) {
+auto const i = r->getIdentifier();
+if (i != nullptr && i->isStr(id)) {
+return NamespaceCheck(r->getDeclContext());
+}
+}
+return NamespaceCheck();
+}
+
+}
+
 template NamespaceCheck TypeCheck::Class(char const (& id)[N])
 const
 {
 if (!type_.isNull()) {
 auto const t = type_->getAs();
 if (t != nullptr) {
-auto const d = t->getDecl();
-if (d->isClass()) {
- 

[Libreoffice-commits] core.git: Branch 'feature/dialog-screenshots' - 2 commits - sd/qa

2016-06-30 Thread Katarina Behrens
 sd/qa/unit/dialogs-test.cxx |   36 
 1 file changed, 12 insertions(+), 24 deletions(-)

New commits:
commit 7c5941768400e4186937e8c07bbd846ac01958e5
Author: Katarina Behrens 
Date:   Thu Jun 30 01:11:05 2016 +0200

It is really unused

Change-Id: Iaaf171f7b91476be0f2d668402e6f309b81d53c3

diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index d86e7bc..f3e51d2 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -665,8 +665,6 @@ void SdDialogsTest::dumpDialogToPath(VclAbstractDialog& 
rDlg)
 
 void SdDialogsTest::openAnyDialog()
 {
-const OUString aTempTargetPath = m_directories.getPathFromSrc( 
SCREENSHOT_DIRECTORY );
-
 // example for SfxTabDialog: 5
 // example for TabDialog: 23
 // example for self-adapted wizard: 0
commit e54a683377c0f73ab63521505f9c3c3a01f6cfff
Author: Katarina Behrens 
Date:   Thu Jun 30 01:08:06 2016 +0200

Use smart pointers

Change-Id: I7b3780aecc7807e5905865f8d7eca816993ab148

diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index 0578fac..d86e7bc 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -91,9 +91,10 @@ private:
 ::sd::DrawDocShell* mpDocShell;
 ::sd::ViewShell*mpViewShell;
 ::sd::DrawView* mpDrawView;
-const SfxItemSet*   mpSfxItemSetFromSdrObject;
-const SfxItemSet*   mpEmptySfxItemSet;
-SfxItemSet* mpEmptyFillStyleSfxItemSet;
+
+std::unique_ptr mpSfxItemSetFromSdrObject;
+std::unique_ptr mpEmptySfxItemSet;
+std::unique_ptr mpEmptyFillStyleSfxItemSet;
 
 /// helpers
 SdAbstractDialogFactory* getSdAbstractDialogFactory();
@@ -162,20 +163,10 @@ void SdDialogsTest::setUp()
 
 void SdDialogsTest::tearDown()
 {
-if (mpEmptySfxItemSet)
-{
-delete mpEmptySfxItemSet;
-}
-
-if (mpEmptyFillStyleSfxItemSet)
-{
-delete mpEmptyFillStyleSfxItemSet;
-}
-
-if (mxComponent.is())
-{
-mxComponent->dispose();
-}
+//if (mxComponent.is())
+//{
+//mxComponent->dispose();
+//}
 
 test::BootstrapFixture::tearDown();
 }
@@ -233,7 +224,7 @@ const SfxItemSet& 
SdDialogsTest::getSfxItemSetFromSdrObject()
 CPPUNIT_ASSERT(pSdPage);
 SdrObject* pSdrObj = pSdPage->GetObj(0);
 CPPUNIT_ASSERT(pSdrObj);
-mpSfxItemSetFromSdrObject = &pSdrObj->GetMergedItemSet();
+mpSfxItemSetFromSdrObject.reset( new SfxItemSet( 
pSdrObj->GetMergedItemSet() ) );
 CPPUNIT_ASSERT(mpSfxItemSetFromSdrObject);
 }
 
@@ -247,7 +238,7 @@ const SfxItemSet& SdDialogsTest::getEmptySfxItemSet()
 // needs an SfxItemSet, use the one from the 1st object
 SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc();
 CPPUNIT_ASSERT(pDrawDoc);
-mpEmptySfxItemSet = new SfxItemSet(pDrawDoc->GetItemPool());
+mpEmptySfxItemSet.reset( new SfxItemSet(pDrawDoc->GetItemPool()) );
 CPPUNIT_ASSERT(mpEmptySfxItemSet);
 }
 
@@ -260,7 +251,7 @@ const SfxItemSet& 
SdDialogsTest::getEmptyFillStyleSfxItemSet()
 {
 SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc();
 CPPUNIT_ASSERT(pDrawDoc);
-mpEmptyFillStyleSfxItemSet = new SfxItemSet(pDrawDoc->GetItemPool(), 
XATTR_FILL_FIRST, XATTR_FILL_LAST);
+mpEmptyFillStyleSfxItemSet.reset( new 
SfxItemSet(pDrawDoc->GetItemPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST) );
 CPPUNIT_ASSERT(mpEmptyFillStyleSfxItemSet);
 
mpEmptyFillStyleSfxItemSet->Put(XFillStyleItem(drawing::FillStyle_NONE));
 }
@@ -685,12 +676,11 @@ void SdDialogsTest::openAnyDialog()
 // loop and dump all Dialogs from SD for now
 for (sal_uInt32 a(nStartValue); a < nEndValue; a++)
 {
-VclAbstractDialog* pDlg = createDialogByID(a);
+std::unique_ptr pDlg( createDialogByID(a) );
 
 if (pDlg)
 {
 dumpDialogToPath(*pDlg);
-delete pDlg;
 }
 }
 
___
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' - compilerplugins/clang

2016-06-30 Thread Stephan Bergmann
 compilerplugins/clang/compat.hxx |   21 +
 compilerplugins/clang/faileddyncast.cxx  |1 +
 compilerplugins/clang/implicitboolconversion.cxx |8 ++--
 compilerplugins/clang/passstuffbyref.cxx |2 +-
 compilerplugins/clang/privatebase.cxx|8 
 compilerplugins/clang/staticmethods.cxx  |2 ++
 compilerplugins/clang/typecheck.cxx  |3 ++-
 compilerplugins/clang/unuseddefaultparams.cxx|2 ++
 compilerplugins/clang/unusedmethods.cxx  |5 -
 compilerplugins/clang/vclwidgets.cxx |8 +---
 10 files changed, 48 insertions(+), 12 deletions(-)

New commits:
commit cae64f2a8b372b87d1e323b8b0332665eeef7d9f
Author: Stephan Bergmann 
Date:   Tue Jun 28 16:25:55 2016 +0200

Adapt to Clang 3.4 (in preparation of a buildbot on CentOS 7)

(cherry picked from commit 9308f353186fb39a02eddfc281fc72ac1026e0b6)
Conflicts:
compilerplugins/clang/refcounting.cxx
compilerplugins/clang/singlevalfields.cxx
compilerplugins/clang/weakobject.cxx

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

diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx
index e1b4d8e..2f73b7f 100644
--- a/compilerplugins/clang/compat.hxx
+++ b/compilerplugins/clang/compat.hxx
@@ -323,6 +323,27 @@ inline auto getAsTagDecl(clang::Type const& t) -> 
clang::TagDecl *
 #endif
 }
 
+inline bool isStdNamespace(clang::DeclContext const & context) {
+#if CLANG_VERSION >= 30500
+return context.isStdNamespace();
+#else
+// cf. lib/AST/DeclBase.cpp:
+if (!context.isNamespace()) {
+return false;
+}
+const clang::NamespaceDecl *ND = clang::cast(
+&context);
+if (ND->isInline()) {
+return isStdNamespace(*ND->getParent());
+}
+if (!context.getParent()->getRedeclContext()->isTranslationUnit()) {
+return false;
+}
+const clang::IdentifierInfo *II = ND->getIdentifier();
+return II && II->isStr("std");
+#endif
+}
+
 }
 
 #endif
diff --git a/compilerplugins/clang/faileddyncast.cxx 
b/compilerplugins/clang/faileddyncast.cxx
index 6fef227..9be28f0 100644
--- a/compilerplugins/clang/faileddyncast.cxx
+++ b/compilerplugins/clang/faileddyncast.cxx
@@ -9,6 +9,7 @@
 
 #include 
 
+#include "clang/AST/Attr.h"
 #include "clang/AST/CXXInheritance.h"
 
 #include "plugin.hxx"
diff --git a/compilerplugins/clang/implicitboolconversion.cxx 
b/compilerplugins/clang/implicitboolconversion.cxx
index 8c47212..e035c90 100644
--- a/compilerplugins/clang/implicitboolconversion.cxx
+++ b/compilerplugins/clang/implicitboolconversion.cxx
@@ -20,7 +20,9 @@
 
 #if CLANG_VERSION < 30700
 
-template<> struct std::iterator_traits {
+namespace std {
+
+template<> struct iterator_traits {
 typedef std::ptrdiff_t difference_type;
 typedef Expr * value_type;
 typedef Expr const ** pointer;
@@ -28,7 +30,7 @@ template<> struct std::iterator_traits {
 typedef std::random_access_iterator_tag iterator_category;
 };
 
-template<> struct std::iterator_traits {
+template<> struct iterator_traits {
 typedef std::ptrdiff_t difference_type;
 typedef Expr const * value_type;
 typedef Expr const ** pointer;
@@ -36,6 +38,8 @@ template<> struct std::iterator_traits {
 typedef std::random_access_iterator_tag iterator_category;
 };
 
+}
+
 #endif
 
 namespace {
diff --git a/compilerplugins/clang/passstuffbyref.cxx 
b/compilerplugins/clang/passstuffbyref.cxx
index a14d01f..059b1de 100644
--- a/compilerplugins/clang/passstuffbyref.cxx
+++ b/compilerplugins/clang/passstuffbyref.cxx
@@ -122,7 +122,7 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * 
functionDecl, const C
 return;
 }
 
-const QualType type = 
functionDecl->getReturnType().getDesugaredType(compiler.getASTContext());
+const QualType type = 
compat::getReturnType(*functionDecl).getDesugaredType(compiler.getASTContext());
 if (type->isReferenceType() || type->isIntegralOrEnumerationType() || 
type->isPointerType()
 || type->isTemplateTypeParmType() || type->isDependentType() || 
type->isBuiltinType()
 || type->isScalarType())
diff --git a/compilerplugins/clang/privatebase.cxx 
b/compilerplugins/clang/privatebase.cxx
index 8084ee3..d2a125d 100644
--- a/compilerplugins/clang/privatebase.cxx
+++ b/compilerplugins/clang/privatebase.cxx
@@ -34,14 +34,14 @@ bool PrivateBase::VisitCXXRecordDecl(CXXRecordDecl const * 
decl) {
 {
 return true;
 }
-for (auto const & i: decl->bases()) {
-if (i.getAccessSpecifierAsWritten() == AS_none) {
+for (auto i = decl->bases_begin(); i != decl->bases_end(); ++i) {
+if (i->getAccessSpecifierAsWritten() == AS_none) {
 report(
 DiagnosticsEngine::Warnin

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - compilerplugins/clang

2016-06-30 Thread Noel Grandin
 compilerplugins/clang/compat.hxx |   17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

New commits:
commit 78879355c540237a2a73708413230001d7490065
Author: Noel Grandin 
Date:   Tue Jun 28 15:28:18 2016 +0200

loplugin compat with clang 3.4

Change-Id: I264fe688519b8b2173d5cccd8a453847a7fb89d9
(cherry picked from commit 1aafc64b4d3ca2a01057209f047b136297c7842b)
Reviewed-on: https://gerrit.libreoffice.org/26776
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx
index 7a87944..e1b4d8e 100644
--- a/compilerplugins/clang/compat.hxx
+++ b/compilerplugins/clang/compat.hxx
@@ -128,20 +128,35 @@ inline clang::QualType getReturnType(clang::FunctionDecl 
const & decl) {
 #endif
 }
 
+
 #if CLANG_VERSION >= 30900
 inline clang::ArrayRef parameters(
 clang::FunctionDecl const & decl)
 {
 return decl.parameters();
 }
-#else
+#elif CLANG_VERSION >= 30500
 inline clang::FunctionDecl::param_const_range parameters(
 clang::FunctionDecl const & decl)
 {
 return decl.params();
 }
+#else
+struct FunctionDeclParamsWrapper
+{
+clang::FunctionDecl const & decl;
+FunctionDeclParamsWrapper(clang::FunctionDecl const & _decl) : decl(_decl) 
{}
+clang::FunctionDecl::param_const_iterator begin() const { return 
decl.param_begin(); }
+clang::FunctionDecl::param_const_iterator end() const { return 
decl.param_end(); }
+};
+inline FunctionDeclParamsWrapper parameters(
+clang::FunctionDecl const & decl)
+{
+return FunctionDeclParamsWrapper(decl);
+}
 #endif
 
+
 inline clang::QualType getReturnType(clang::FunctionProtoType const & type) {
 #if CLANG_VERSION >= 30500
 return type.getReturnType();
___
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' - compilerplugins/clang

2016-06-30 Thread Stephan Bergmann
 compilerplugins/clang/compat.hxx  |   14 ++
 compilerplugins/clang/constantparam.cxx   |2 +-
 compilerplugins/clang/unuseddefaultparams.cxx |2 +-
 compilerplugins/clang/unusedfields.cxx|2 +-
 compilerplugins/clang/unusedmethods.cxx   |4 ++--
 compilerplugins/clang/unusedmethodsremove.cxx |2 +-
 6 files changed, 20 insertions(+), 6 deletions(-)

New commits:
commit 3624d0d1bd54d262b39cdc6aeffb8a2f7c3c7ad7
Author: Stephan Bergmann 
Date:   Fri Jun 24 16:46:55 2016 +0200

Adpat to 

"Use more ArrayRefs"

Change-Id: Ied0ab11dd9366b3f499100b2627f4919cca52c9c
(cherry picked from commit f8a18a464eb2cd8ee7a07b8ddef0fa5d79d638ef)
Reviewed-on: https://gerrit.libreoffice.org/26775
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx
index db573f5..7a87944 100644
--- a/compilerplugins/clang/compat.hxx
+++ b/compilerplugins/clang/compat.hxx
@@ -128,6 +128,20 @@ inline clang::QualType getReturnType(clang::FunctionDecl 
const & decl) {
 #endif
 }
 
+#if CLANG_VERSION >= 30900
+inline clang::ArrayRef parameters(
+clang::FunctionDecl const & decl)
+{
+return decl.parameters();
+}
+#else
+inline clang::FunctionDecl::param_const_range parameters(
+clang::FunctionDecl const & decl)
+{
+return decl.params();
+}
+#endif
+
 inline clang::QualType getReturnType(clang::FunctionProtoType const & type) {
 #if CLANG_VERSION >= 30500
 return type.getReturnType();
diff --git a/compilerplugins/clang/constantparam.cxx 
b/compilerplugins/clang/constantparam.cxx
index 99db545..ab6a7cd 100644
--- a/compilerplugins/clang/constantparam.cxx
+++ b/compilerplugins/clang/constantparam.cxx
@@ -123,7 +123,7 @@ MyCallSiteInfo ConstantParam::niceName(const FunctionDecl* 
functionDecl, int par
 }
 aInfo.nameAndParams += functionDecl->getNameAsString() + "(";
 bool bFirst = true;
-for (const ParmVarDecl *pParmVarDecl : functionDecl->params()) {
+for (const ParmVarDecl *pParmVarDecl : compat::parameters(*functionDecl)) {
 if (bFirst)
 bFirst = false;
 else
diff --git a/compilerplugins/clang/unuseddefaultparams.cxx 
b/compilerplugins/clang/unuseddefaultparams.cxx
index 0a3ce28..6d2094e 100644
--- a/compilerplugins/clang/unuseddefaultparams.cxx
+++ b/compilerplugins/clang/unuseddefaultparams.cxx
@@ -107,7 +107,7 @@ MyFuncInfo UnusedDefaultParams::niceName(const 
FunctionDecl* functionDecl)
 }
 aInfo.nameAndParams += functionDecl->getNameAsString() + "(";
 bool bFirst = true;
-for (const ParmVarDecl *pParmVarDecl : functionDecl->params()) {
+for (const ParmVarDecl *pParmVarDecl : compat::parameters(*functionDecl)) {
 if (bFirst)
 bFirst = false;
 else
diff --git a/compilerplugins/clang/unusedfields.cxx 
b/compilerplugins/clang/unusedfields.cxx
index a370cb3..8174511 100644
--- a/compilerplugins/clang/unusedfields.cxx
+++ b/compilerplugins/clang/unusedfields.cxx
@@ -124,7 +124,7 @@ std::string UnusedFields::fullyQualifiedName(const 
FunctionDecl* functionDecl)
 }
 ret += functionDecl->getNameAsString() + "(";
 bool bFirst = true;
-for (const ParmVarDecl *pParmVarDecl : functionDecl->params()) {
+for (const ParmVarDecl *pParmVarDecl : compat::parameters(*functionDecl)) {
 if (bFirst)
 bFirst = false;
 else
diff --git a/compilerplugins/clang/unusedmethods.cxx 
b/compilerplugins/clang/unusedmethods.cxx
index aa645fb..d84449f 100644
--- a/compilerplugins/clang/unusedmethods.cxx
+++ b/compilerplugins/clang/unusedmethods.cxx
@@ -148,7 +148,7 @@ MyFuncInfo UnusedMethods::niceName(const FunctionDecl* 
functionDecl)
 }
 aInfo.nameAndParams += functionDecl->getNameAsString() + "(";
 bool bFirst = true;
-for (const ParmVarDecl *pParmVarDecl : functionDecl->params()) {
+for (const ParmVarDecl *pParmVarDecl : compat::parameters(*functionDecl)) {
 if (bFirst)
 bFirst = false;
 else
@@ -178,7 +178,7 @@ std::string UnusedMethods::fullyQualifiedName(const 
FunctionDecl* functionDecl)
 }
 ret += functionDecl->getNameAsString() + "(";
 bool bFirst = true;
-for (const ParmVarDecl *pParmVarDecl : functionDecl->params()) {
+for (const ParmVarDecl *pParmVarDecl : compat::parameters(*functionDecl)) {
 if (bFirst)
 bFirst = false;
 else
diff --git a/compilerplugins/clang/unusedmethodsremove.cxx 
b/compilerplugins/clang/unusedmethodsremove.cxx
index 74c310d..273b415 100644
--- a/compilerplugins/clang/unusedmethodsremove.cxx
+++ b/compilerplugins/clang/unusedmethodsremove.cxx
@@ -79,7 +79,7 @@ std::string niceName(const CXXMethodDecl* functionDecl)
 + "::" + functionDecl->getNameAsString()
 + "(";
 bool bFirst = true;
-for (const ParmVarDecl *pParm

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

2016-06-30 Thread Caolán McNamara
 sc/source/ui/view/cellsh2.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 937cbdb579820aa1dd0526682df1ea98a34168c5
Author: Caolán McNamara 
Date:   Thu Jun 30 09:14:05 2016 +0100

fix Window::~Window: inconsistency in top window chain leak

Change-Id: I4f32b77a4b107e5315e0c2bc9b20db897135c8b0

diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index fec2ae4..e85e369 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -335,8 +335,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
 OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
 
-AbstractScDataFormDlg* pDlg = pFact->CreateScDataFormDlg(
-pTabViewShell->GetDialogParent(), pTabViewShell);
+std::unique_ptr 
pDlg(pFact->CreateScDataFormDlg(
+pTabViewShell->GetDialogParent(), pTabViewShell));
 OSL_ENSURE(pDlg, "Dialog create fail!");
 
 pDlg->Execute();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-30 Thread Miklos Vajna
 libreofficekit/source/gtk/lokdocview.cxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit bfd4234fd863ee75f4f07d9bded061063bbde3d4
Author: Miklos Vajna 
Date:   Thu Jun 30 09:13:52 2016 +0200

lokdocview: avoid pointless setView() before getView()

This fixes the following use-case:

1) Start gtktiledviewer, click New View
2) Click Edit in the first view
3) Click somewhere in the document in the first view -> nothing happens

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

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index c27a1f9..8e2d278 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -848,10 +848,6 @@ static gboolean postDocumentLoad(gpointer pData)
 LOKDocViewPrivate& priv = getPrivate(pLOKDocView);
 
 std::unique_lock aGuard(g_aLOKMutex);
-std::stringstream ss;
-ss << "lok::Document::setView(" << priv->m_nViewId << ")";
-g_info("%s", ss.str().c_str());
-priv->m_pDocument->pClass->setView(priv->m_pDocument, priv->m_nViewId);
 priv->m_pDocument->pClass->initializeForRendering(priv->m_pDocument, 
priv->m_aRenderingArguments.c_str());
 priv->m_nViewId = priv->m_pDocument->pClass->getView(priv->m_pDocument);
 priv->m_pDocument->pClass->registerCallback(priv->m_pDocument, 
callbackWorker, pLOKDocView);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-30 Thread Stephan Bergmann
 compilerplugins/Makefile-clang.mk |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 944ed68645fbf9731c699dda9361719759af4ac4
Author: Stephan Bergmann 
Date:   Thu Jun 30 09:27:58 2016 +0200

Explain usage of -isystem instead of -I

Change-Id: Ib7153db5c2c1542ff7e9a0daa6d7124225c7701c

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 5939868..dc92557 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -24,7 +24,8 @@ CLANGCXXFLAGS=-O2 -Wall -Wextra -Wundef -g
 
 # Clang headers require these.
 CLANGDEFS=-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
-D__STDC_LIMIT_MACROS -fno-rtti
-# All include locations needed.
+# All include locations needed (using -isystem silences various warnings when
+# including those files):
 CLANGINCLUDES=$(if $(filter /usr,$(CLANGDIR)),,-isystem $(CLANGDIR)/include)
 
 # Clang/LLVM libraries are intentionally not linked in, they are usually built 
as static libraries, which means the resulting
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-30 Thread Stephan Bergmann
 compilerplugins/Makefile-clang.mk |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 4d54e240262ffb2d2de1d72986f025657e230c77
Author: Stephan Bergmann 
Date:   Thu Jun 30 09:11:54 2016 +0200

Who needs that $(CLANGDIR)/tools/clang/include anyway?

It was included ever since 02a8d36ebf3d54784903f2899eafe010bedf2f4c "initial
support for clang compiler plugins" but will probably point at either a non-
existing dir or a dir in the Clang source tree (that does not even contain 
all
the include files that the corresponding installation dir would contain, as 
some
include files are generated during the build).  For a properly installed 
LLVM/
Clang, all include files should be found underneath a single include/ dir.

Change-Id: Ie23cb1ae701eed1ee78448eb6c828d07b15121c2

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index cc2bdc7..5939868 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -25,8 +25,7 @@ CLANGCXXFLAGS=-O2 -Wall -Wextra -Wundef -g
 # Clang headers require these.
 CLANGDEFS=-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
-D__STDC_LIMIT_MACROS -fno-rtti
 # All include locations needed.
-CLANGINCLUDES=$(if $(filter /usr,$(CLANGDIR)),,-isystem $(CLANGDIR)/include) \
- -isystem $(CLANGDIR)/tools/clang/include
+CLANGINCLUDES=$(if $(filter /usr,$(CLANGDIR)),,-isystem $(CLANGDIR)/include)
 
 # Clang/LLVM libraries are intentionally not linked in, they are usually built 
as static libraries, which means the resulting
 # plugin would be big (even though the clang binary already includes it all) 
and it'd be necessary to explicitly specify
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-30 Thread Miklos Vajna
 oox/source/shape/WpsContext.cxx |2 +-
 sw/source/filter/ww8/rtfattributeoutput.cxx |3 +--
 sw/source/filter/ww8/rtfexport.cxx  |   16 
 3 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit 79e8a15ae49540ac107808b03328fad90557e381
Author: Miklos Vajna 
Date:   Thu Jun 30 08:17:41 2016 +0200

RTF export: it's enough to pass these by const ref, no need to copy

Change-Id: I6854c3c8e9a2b5c6d478551c5f9bba19e114152c
Reviewed-on: https://gerrit.libreoffice.org/26787
Reviewed-by: Miklos Vajna 
Tested-by: Noel Grandin 

diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index 15a1022..d3beeb8 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -181,7 +181,7 @@ oox::core::ContextHandlerRef 
WpsContext::onCreateContext(sal_Int32 nElementToken
 {
 uno::Reference xPropertySet(mxShape, 
uno::UNO_QUERY);
 oox::OptValue presetShapeName = 
rAttribs.getString(XML_prst);
-OUString preset = presetShapeName.get();
+const OUString& preset = presetShapeName.get();
 comphelper::SequenceAsHashMap 
aCustomShapeGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
 aCustomShapeGeometry["PresetTextWarp"] = uno::makeAny(preset);
 xPropertySet->setPropertyValue("CustomShapeGeometry", 
uno::makeAny(aCustomShapeGeometry.getAsConstPropertyValueList()));
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index e74fbcf..572afaa 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1961,8 +1961,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const 
ww8::Frame& rFrame, const Poi
 {
 if (const SdrUnoObj* pFormObj = dynamic_cast< const 
SdrUnoObj*>(pObject))
 {
-uno::Reference< awt::XControlModel > xControlModel =
-pFormObj->GetUnoControlModel();
+const uno::Reference& xControlModel = 
pFormObj->GetUnoControlModel();
 uno::Reference< lang::XServiceInfo > xInfo(xControlModel, 
uno::UNO_QUERY);
 if (xInfo.is())
 {
diff --git a/sw/source/filter/ww8/rtfexport.cxx 
b/sw/source/filter/ww8/rtfexport.cxx
index 1a772bf..9189cf7 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -318,24 +318,24 @@ void RtfExport::DoComboBox(const OUString& /*rName*/,
 void RtfExport::DoFormText(const SwInputField* pField)
 {
 OUString sResult = pField->ExpandField(true);
-OUString sHelp(pField->GetHelp());
+const OUString& rHelp = pField->GetHelp();
 OUString sName = pField->GetPar2();
-OUString sStatus = pField->GetToolTip();
+const OUString& rStatus = pField->GetToolTip();
 m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_FIELD "{" 
OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FLDINST "{ FORMTEXT }");
 m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_IGNORE 
OOO_STRING_SVTOOLS_RTF_FORMFIELD " {" OOO_STRING_SVTOOLS_RTF_FFTYPE "0");
-if (!sHelp.isEmpty())
+if (!rHelp.isEmpty())
 m_pAttrOutput->RunText().append(OOO_STRING_SVTOOLS_RTF_FFOWNHELP);
-if (!sStatus.isEmpty())
+if (!rStatus.isEmpty())
 m_pAttrOutput->RunText().append(OOO_STRING_SVTOOLS_RTF_FFOWNSTAT);
 m_pAttrOutput->RunText().append(OOO_STRING_SVTOOLS_RTF_FFTYPETXT  "0");
 
 if (!sName.isEmpty())
 m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_IGNORE 
OOO_STRING_SVTOOLS_RTF_FFNAME " ").append(msfilter::rtfutil::OutString(sName, 
m_eDefaultEncoding)).append("}");
-if (!sHelp.isEmpty())
-m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_IGNORE 
OOO_STRING_SVTOOLS_RTF_FFHELPTEXT " 
").append(msfilter::rtfutil::OutString(sHelp, m_eDefaultEncoding)).append("}");
+if (!rHelp.isEmpty())
+m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_IGNORE 
OOO_STRING_SVTOOLS_RTF_FFHELPTEXT " 
").append(msfilter::rtfutil::OutString(rHelp, m_eDefaultEncoding)).append("}");
 m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_IGNORE 
OOO_STRING_SVTOOLS_RTF_FFDEFTEXT " 
").append(msfilter::rtfutil::OutString(sResult, 
m_eDefaultEncoding)).append("}");
-if (!sStatus.isEmpty())
-m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_IGNORE 
OOO_STRING_SVTOOLS_RTF_FFSTATTEXT " 
").append(msfilter::rtfutil::OutString(sStatus, 
m_eDefaultEncoding)).append("}");
+if (!rStatus.isEmpty())
+m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_IGNORE 
OOO_STRING_SVTOOLS_RTF_FFSTATTEXT " 
").append(msfilter::rtfutil::OutString(rStatus, 
m_eDefaultEncoding)).append("}");
 m_pAttrOutput->RunText().append("}}}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " ");
 m_pAttrOutput->RunText().append(msfilter::rtfutil::OutString

[Libreoffice-commits] core.git: idl/inc idl/source include/editeng include/svx sdext/source sd/inc sd/source svx/source vcl/opengl xmloff/source

2016-06-30 Thread Noel Grandin
 idl/inc/hash.hxx  |8 ++--
 idl/source/cmptools/hash.cxx  |2 +-
 include/editeng/numitem.hxx   |   10 --
 include/svx/svdcrtv.hxx   |1 -
 include/svx/svdoashp.hxx  |1 -
 sd/inc/anminfo.hxx|1 -
 sd/source/core/anminfo.cxx|2 --
 sd/source/ui/dlg/TemplateScanner.cxx  |3 +--
 sd/source/ui/inc/TemplateScanner.hxx  |5 ++---
 sdext/source/presenter/PresenterToolBar.cxx   |7 ---
 svx/source/svdraw/svdoashp.cxx|1 -
 vcl/opengl/PackedTextureAtlas.cxx |2 --
 xmloff/source/text/XMLPropertyBackpatcher.cxx |1 -
 xmloff/source/text/XMLPropertyBackpatcher.hxx |3 ---
 14 files changed, 10 insertions(+), 37 deletions(-)

New commits:
commit fbd23182ee1804fd87a13d79a71e231549767408
Author: Noel Grandin 
Date:   Wed Jun 29 09:09:05 2016 +0200

loplugin:unusedfields

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

diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx
index a2e923c..6546ca7 100644
--- a/idl/inc/hash.hxx
+++ b/idl/inc/hash.hxx
@@ -52,19 +52,16 @@ class SvStringHashEntry : public SvRefBase
 {
 friend class SvStringHashTable;
 OString aName;
-sal_uInt32  nHashId;
 sal_uLong   nValue;
 boolbHasId;
 public:
 SvStringHashEntry()
-: nHashId(0)
-, nValue(0)
+: nValue(0)
 , bHasId(false)
 {
 }
-SvStringHashEntry( const OString& rName, sal_uInt32 nIdx )
+SvStringHashEntry( const OString& rName )
 : aName(rName)
-, nHashId(nIdx)
 , nValue(0)
 , bHasId(true)
 {
@@ -80,7 +77,6 @@ public:
 SvStringHashEntry & operator = ( const SvStringHashEntry & rRef )
 { SvRefBase::operator=( rRef );
   aName   = rRef.aName;
-  nHashId = rRef.nHashId;
   nValue  = rRef.nValue;
   bHasId  = rRef.bHasId;
   return *this;
diff --git a/idl/source/cmptools/hash.cxx b/idl/source/cmptools/hash.cxx
index fc63730..a03f4cd 100644
--- a/idl/source/cmptools/hash.cxx
+++ b/idl/source/cmptools/hash.cxx
@@ -167,7 +167,7 @@ bool SvStringHashTable::Insert( const OString& rName, 
sal_uInt32 * pIndex )
 return false;
 
 if( !IsEntry( *pIndex ) )
-pEntries[ *pIndex ] = SvStringHashEntry( rName, *pIndex );
+pEntries[ *pIndex ] = SvStringHashEntry( rName );
 return true;
 }
 
diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index 2d67dd1..13ffac0 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -315,11 +315,10 @@ public:
 class SvxNodeNum
 {
 sal_uInt16 nLevelVal[ SVX_MAX_NUM ];// Numbers of all levels
-sal_uInt16 nSetValue;   // predetermined number
-sal_uInt8  nMyLevel; // Current Level
+sal_uInt8  nMyLevel;// Current Level
 
 public:
-explicit inline SvxNodeNum( sal_uInt16 nSetVal = USHRT_MAX );
+explicit inline SvxNodeNum();
 inline SvxNodeNum& operator=( const SvxNodeNum& rCpy );
 
 sal_uInt8 GetLevel() const  { return nMyLevel; }
@@ -329,8 +328,8 @@ public:
   sal_uInt16* GetLevelVal() { return nLevelVal; }
 };
 
-SvxNodeNum::SvxNodeNum( sal_uInt16 nSetVal )
-: nSetValue( nSetVal ), nMyLevel( 0 )
+SvxNodeNum::SvxNodeNum()
+: nMyLevel( 0 )
 {
 memset( nLevelVal, 0, sizeof( nLevelVal ) );
 }
@@ -339,7 +338,6 @@ inline SvxNodeNum& SvxNodeNum::operator=( const SvxNodeNum& 
rCpy )
 {
 if ( &rCpy != this)
 {
-nSetValue = rCpy.nSetValue;
 nMyLevel = rCpy.nMyLevel;
 
 memcpy( nLevelVal, rCpy.nLevelVal, sizeof( nLevelVal ) );
diff --git a/include/svx/svdcrtv.hxx b/include/svx/svdcrtv.hxx
index 83fc407..33fa675 100644
--- a/include/svx/svdcrtv.hxx
+++ b/include/svx/svdcrtv.hxx
@@ -51,7 +51,6 @@ protected:
 sal_uInt32  nAktInvent; // set the current ones
 sal_uInt16  nAktIdent;  // Obj for re-creating
 
-boolbAutoTextEdit : 1; // Textedit after we start 
the creation of a text frame
 boolb1stPointAsCenter : 1;
 boolbUseIncompatiblePathCreateInterface : 1;
 
diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx
index b31d9bf..4ff7100 100644
--- a/include/svx/svdoashp.hxx
+++ b/include/svx/svdoashp.hxx
@@ -145,7 +145,6 @@ protected:
 // and object sizes
 virtual void AdaptTextMinSize() override;
 
-OUString  aName;
 Size  m_aSuggestedTextFrameSize;
 
 public:
diff --git a/sd/inc/anminfo.hxx b/sd/inc/anminfo.hxx
index db2aeb3..96cb5a0 100644
--- a/sd/inc/anminfo.hxx
+++ b/sd/inc/anminfo.hxx
@@ -57,7 +57,6 @@ pu

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

2016-06-30 Thread Mark Page
 vcl/inc/impgraph.hxx|2 
 vcl/source/gdi/impgraph.cxx |  104 +++-
 2 files changed, 27 insertions(+), 79 deletions(-)

New commits:
commit f160d8c879b7184b2a41f2310a09c0432c14379a
Author: Mark Page 
Date:   Tue Jun 28 11:55:51 2016 +0100

Modify the ImpGraphic class SwapFile to use a shared pointer

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

diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index a41d684..884b6a6 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -42,7 +42,7 @@ private:
 ImpSwapInfo maSwapInfo;
 Animation*  mpAnimation;
 GraphicReader*  mpContext;
-ImpSwapFile*mpSwapFile;
+std::shared_ptr mpSwapFile;
 GfxLink*mpGfxLink;
 GraphicType meType;
 mutable sal_uLong   mnSizeBytes;
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 82e6b74..ba92a25 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define GRAPHIC_MTFTOBMP_MAXEXT 2048
 #define GRAPHIC_STREAMBUFSIZE   8192UL
@@ -58,7 +59,7 @@ using namespace com::sun::star;
 struct ImpSwapFile
 {
 INetURLObject   aSwapURL;
-sal_uLong   nRefCount;
+~ImpSwapFile();
 };
 
 class ReaderData
@@ -96,7 +97,6 @@ Size GraphicReader::GetPreviewSize() const
 ImpGraphic::ImpGraphic() :
 mpAnimation ( nullptr ),
 mpContext   ( nullptr ),
-mpSwapFile  ( nullptr ),
 mpGfxLink   ( nullptr ),
 meType  ( GraphicType::NONE ),
 mnSizeBytes ( 0UL ),
@@ -119,9 +119,6 @@ ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
 mbSwapUnderway  ( false ),
 mbDummyContext  ( rImpGraphic.mbDummyContext )
 {
-if( mpSwapFile )
-mpSwapFile->nRefCount++;
-
 if( rImpGraphic.mpGfxLink )
 mpGfxLink = new GfxLink( *rImpGraphic.mpGfxLink );
 else
@@ -143,7 +140,6 @@ ImpGraphic::ImpGraphic( const Bitmap& rBitmap ) :
 maEx( rBitmap ),
 mpAnimation ( nullptr ),
 mpContext   ( nullptr ),
-mpSwapFile  ( nullptr ),
 mpGfxLink   ( nullptr ),
 meType  ( !rBitmap.IsEmpty() ? GraphicType::Bitmap : 
GraphicType::NONE ),
 mnSizeBytes ( 0UL ),
@@ -158,7 +154,6 @@ ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) :
 maEx( rBitmapEx ),
 mpAnimation ( nullptr ),
 mpContext   ( nullptr ),
-mpSwapFile  ( nullptr ),
 mpGfxLink   ( nullptr ),
 meType  ( !rBitmapEx.IsEmpty() ? GraphicType::Bitmap : 
GraphicType::NONE ),
 mnSizeBytes ( 0UL ),
@@ -172,7 +167,6 @@ ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) :
 ImpGraphic::ImpGraphic(const SvgDataPtr& rSvgDataPtr)
 :   mpAnimation( nullptr ),
 mpContext( nullptr ),
-mpSwapFile( nullptr ),
 mpGfxLink( nullptr ),
 meType( rSvgDataPtr.get() ? GraphicType::Bitmap : GraphicType::NONE ),
 mnSizeBytes( 0UL ),
@@ -188,7 +182,6 @@ ImpGraphic::ImpGraphic( const Animation& rAnimation ) :
 maEx( rAnimation.GetBitmapEx() ),
 mpAnimation ( new Animation( rAnimation ) ),
 mpContext   ( nullptr ),
-mpSwapFile  ( nullptr ),
 mpGfxLink   ( nullptr ),
 meType  ( GraphicType::Bitmap ),
 mnSizeBytes ( 0UL ),
@@ -203,7 +196,6 @@ ImpGraphic::ImpGraphic( const GDIMetaFile& rMtf ) :
 maMetaFile  ( rMtf ),
 mpAnimation ( nullptr ),
 mpContext   ( nullptr ),
-mpSwapFile  ( nullptr ),
 mpGfxLink   ( nullptr ),
 meType  ( GraphicType::GdiMetafile ),
 mnSizeBytes ( 0UL ),
@@ -248,9 +240,6 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& 
rImpGraphic )
 {
 mbSwapOut = rImpGraphic.mbSwapOut;
 mpSwapFile = rImpGraphic.mpSwapFile;
-
-if( mpSwapFile )
-mpSwapFile->nRefCount++;
 }
 
 delete mpGfxLink;
@@ -362,42 +351,33 @@ void ImpGraphic::ImplClearGraphics( bool bCreateSwapInfo )
 maPdfData = uno::Sequence();
 }
 
-void ImpGraphic::ImplClear()
+ImpSwapFile::~ImpSwapFile()
 {
-if( mpSwapFile )
+try
 {
-if( mpSwapFile->nRefCount > 1 )
-mpSwapFile->nRefCount--;
-else
-{
-try
-{
-::ucbhelper::Content aCnt( mpSwapFile->aSwapURL.GetMainURL( 
INetURLObject::NO_DECODE ),
- css::uno::Reference< 
css::ucb::XCommandEnvironment >(),
- comphelper::getProcessComponentContext() 
);
+::ucbhelper::Content aCnt( aSwapURL.Ge