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

2014-10-03 Thread Tor Lillqvist
 sc/source/core/data/column4.cxx |6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit d6c842e0e9f88a7edf642c8f807b92e7ced9a1d1
Author: Tor Lillqvist 
Date:   Fri Oct 3 11:35:38 2014 +0300

WaE: private fields 'mnTab' and 'mnCol' are not used

Change-Id: I449b85b00aeaf690644e17be0a6b2b9398a3cd3f

diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index c0c1fde..a577e7a 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -326,15 +326,11 @@ namespace {
 
 class ConvertFormulaToValueHandler
 {
-SCTAB mnTab;
-SCCOL mnCol;
 sc::CellValues maResValues;
 bool mbModified;
 
 public:
-ConvertFormulaToValueHandler( SCTAB nTab, SCCOL nCol ) :
-mnTab(nTab),
-mnCol(nCol),
+ConvertFormulaToValueHandler( SCTAB, SCCOL ) :
 mbModified(false)
 {
 maResValues.reset(MAXROWCOUNT);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 75025] LibreOffice 4.3 most annoying bugs

2014-10-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=75025

Timur  changed:

   What|Removed |Added

 Depends on|83666   |

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 75025] LibreOffice 4.3 most annoying bugs

2014-10-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=75025

Timur  changed:

   What|Removed |Added

 Depends on|83675   |

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sal/osl

2014-10-03 Thread Noel Grandin
 sal/osl/unx/signal.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bbe9a7b8b390d0e0e668ebb26af8c35cfd5805af
Author: Noel Grandin 
Date:   Fri Oct 3 10:46:40 2014 +0200

fix clang 3.5 build

Change-Id: I86fe850b4b7bc8fc4c44717ca813772114ca70ff

diff --git a/sal/osl/unx/signal.c b/sal/osl/unx/signal.c
index ba4a325..18461b0 100644
--- a/sal/osl/unx/signal.c
+++ b/sal/osl/unx/signal.c
@@ -893,14 +893,14 @@ static void DUMPCURRENTALLOCS(void)
 {
 VALGRIND_PRINTF( "=== start memcheck dump of active allocations ===\n" );
 
-#ifdef __GNUC__
+#if __GNUC__ && !__clang__
 #   pragma GCC diagnostic push
 #   pragma GCC diagnostic ignored "-Wunused-but-set-variable"
 #endif
 
 VALGRIND_DO_LEAK_CHECK;
 
-#ifdef __GNUC__
+#if __GNUC__ && !__clang__
 #   pragma GCC diagnostic pop
 #endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 65675] LibreOffice 4.2 most annoying bugs

2014-10-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65675

Timur  changed:

   What|Removed |Added

 Depends on||70223

--- Comment #221 from Timur  ---
Added Bug 70223 "Chart not exported to PDF"

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2014-10-03 Thread Miklos Vajna
 sw/qa/extras/mailmerge/mailmerge.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4e3757de8aeef91cc37f31091fc392b217e04c48
Author: Miklos Vajna 
Date:   Thu Oct 2 09:19:35 2014 -0700

CppunitTest_sw_mailmerge: enable on OS X

Reviewed on:
https://gerrit.libreoffice.org/11773

Change-Id: I5dc63abea660f097a63f7e61fc2b3b4cd48fa949

diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx 
b/sw/qa/extras/mailmerge/mailmerge.cxx
index 79ab78d..1b8dc2e 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -12,7 +12,7 @@
 
 #include 
 
-#if !defined(MACOSX) && !defined(WNT)
+#if !defined(WNT)
 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: OASIS JIRA report | Proposal: hint for complex content

2014-10-03 Thread Regina Henschel

Hi Miklos,

Miklos Vajna schrieb:

Hi Regina,

On Fri, Oct 03, 2014 at 12:02:29AM +0200, Regina Henschel 
 wrote:

  It is not about

custom shapes, with this we can attach a textframe to drawinglayer
shapes, so we can have tables, redlining, etc. in shapes.


That is the implementation side. In ODF1.2 file format, shapes have
child  which has child , which has child
 or  a.o. So "complex" text is possible
without anything in addition.


You mean you're aware of any other ODF implementation that already
supports shapes with complex content, like the "rectangle with rounded
corners, containing a table" example?


No, I do not know any. But I don't know, what MS does, when it converts 
the own complex shapes to ODF.


The file format itself allows such complex shapes.



Till now it is not obvious to me, why this information needs to be
in the file format. Couldn't it be detected when parsing on opening?


Regarding the implementation: the proposed "complex" shapes use the
SwNodes array to store the document model and the sw layout to render
the content, while non-complex shapes are rendered by editeng. Both have
features which are missing from the other engine. *Before* the text of
the shape is read, we want to know which type of document model to
populate.


When you parse the file and detect a child in  which is not one 
of the simple ones, then it is "complex" and you can switch to the other 
model.




Regarding ODF: at the moment ODF requires that the shape text be simple
-- the draw-text define in the .rng schema says that only text-p and
text-list is allowed.


Yes. But the element text:p is not simple. See the possible child 
elements listed in 5.1.3


For your purpose relevant is, that it can have a child . And 
this in turn can have all you want, see the list in 10.4.2. 
Especially the child  is possible.


 This means that an ODF implementation can use a

much simpler engine for shape text rendering, compared to what is
required to render the normal text content of a .odt file.


It depends on the children of  what renderer is needed. That 
should be detected on parsing.




The text-content define describes all these additional features,
table-table is one such example. If we would propose to allow
table-table in shape text without an extra attribute, then implementers
could be worried about adding too much features to the shape text
engine, which would slow down the handling of simple content, which
would be only draw-text.


I disagree here. An implementation should be able to analyze the XML 
tree and react according to existing or not existing child elements.




So the idea is to add a new boolean attribute, and only use complex
content in that case -- so at import time implementations can decide
what engine to use for handling the content.


And would LibreOffice not show the  element of the shape,
when it is "complex" but not marked as such? You cannot expect that
another producer will write such attribute, because "complex" shape
text is already possible yet, without having such attribute.


The new boolean attribute is completely optional. If it's missing, then
LO will use editeng to handle the shape text, just like before. If the
new attribute is present and it's true, then LO Writer will use SwNodes
to handle the content of the shape, which allows features like having a
table in a shape text.


No, I do not know, whether any application writes the attribute
draw:engine. I would expect it for MS Office 365 or MS Office 2013,
but I haven't got one to test it.


I created a shape containing a table in Word 2013 and saved it as .odt.
The 2x2 table is written as:

   A1
   B1
   A2
   B2

I.e. the complex content (the table) is lost during export. I can
understand this, they didn't want to spend time on extending ODF to
their needs, and this is probably the best you can do with ODF 1.2.

Sounds like one more argument showing that we need to do some extending
to allow this. :-)


ODF 1.2 already allow complex content, no need to extend it.




But from its description, "The
draw:engine attribute specifies the name of a specific rendering
engine that can be used to render a custom shape." it would do
exactly what you want - only, that it is currently only usable for
custom-shapes.


If you grep for ENGINE in xmloff, then you'll see that draw:engine is
already used by LO, to persist the CustomShapeEngine UNO property of the
shape.


As far as I know, LO only preserves the string, but does not evaluate 
it. Only the draw:type attribute is evaluated to distinguish MS 
custom-shapes from others and give the MS custom-shapes a special treatment.


 I did not check in detail, but I expect that this is more about

how the attributes and child nodes of  get
handled. I guess that's why Andras asked if you are aware of any
existing document using this attribute, that would help.


And are you really going to implement the new engine for arbitrary shapes?


Not "going t

[Libreoffice-commits] core.git: sal/osl

2014-10-03 Thread Caolán McNamara
 sal/osl/unx/signal.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5ed973e0fa38b2752850c04659452aa1cf2479e4
Author: Caolán McNamara 
Date:   Fri Oct 3 11:11:25 2014 +0100

fix build

Change-Id: I997dfa3b1fe651db56ad2a6a24ec0cb6d5044550

diff --git a/sal/osl/unx/signal.c b/sal/osl/unx/signal.c
index 18461b0..6b73d50 100644
--- a/sal/osl/unx/signal.c
+++ b/sal/osl/unx/signal.c
@@ -893,14 +893,14 @@ static void DUMPCURRENTALLOCS(void)
 {
 VALGRIND_PRINTF( "=== start memcheck dump of active allocations ===\n" );
 
-#if __GNUC__ && !__clang__
+#if __GNUC__ && !defined(__clang__)
 #   pragma GCC diagnostic push
 #   pragma GCC diagnostic ignored "-Wunused-but-set-variable"
 #endif
 
 VALGRIND_DO_LEAK_CHECK;
 
-#if __GNUC__ && !__clang__
+#if __GNUC__ && !defined(__clang__)
 #   pragma GCC diagnostic pop
 #endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/perfwork' - 3 commits - include/sax oox/source sax/source

2014-10-03 Thread Matúš Kukan
 include/sax/fshelper.hxx|1 -
 oox/source/core/xmlfilterbase.cxx   |7 +++
 sax/source/tools/CachedOutputStream.hxx |   14 ++
 sax/source/tools/fastserializer.cxx |4 ++--
 sax/source/tools/fshelper.cxx   |   22 ++
 5 files changed, 25 insertions(+), 23 deletions(-)

New commits:
commit 06af390c362f9801b610c87307d31f99cf9afd6c
Author: Matúš Kukan 
Date:   Fri Oct 3 11:35:46 2014 +0200

FastSerializer: Use fixed sized Sequence directly as cache

Well, at least the allocated space is fixed size.
When passing that to XOutputStream, change the size in a hacky way.

Change-Id: I24fa134286e3086beda25c9a6915549e7c69119a

diff --git a/sax/source/tools/CachedOutputStream.hxx 
b/sax/source/tools/CachedOutputStream.hxx
index 82c2b66..8877bb7 100644
--- a/sax/source/tools/CachedOutputStream.hxx
+++ b/sax/source/tools/CachedOutputStream.hxx
@@ -28,10 +28,14 @@ class CachedOutputStream
 /// Output stream, usually writing data into files.
 css::uno::Reference< css::io::XOutputStream > mxOutputStream;
 sal_Int32 mnCacheWrittenSize;
-sal_Int8 mpCache[ mnMaximumSize ];
+const css::uno::Sequence mpCache;
+uno_Sequence *pSeq;
 
 public:
-CachedOutputStream() : mnCacheWrittenSize(0) {}
+CachedOutputStream() : mnCacheWrittenSize(0)
+ , mpCache(mnMaximumSize)
+ , pSeq(mpCache.get())
+{}
 ~CachedOutputStream() {}
 
 css::uno::Reference< css::io::XOutputStream > getOutputStream() const
@@ -62,14 +66,16 @@ public:
 }
 }
 
-memcpy(mpCache + mnCacheWrittenSize, pStr, nLen);
+memcpy(pSeq->elements + mnCacheWrittenSize, pStr, nLen);
 mnCacheWrittenSize += nLen;
 }
 
 /// immediately write buffer into mxOutputStream and clear
 void flush()
 {
-mxOutputStream->writeBytes( css::uno::Sequence(mpCache, 
mnCacheWrittenSize) );
+// resize the Sequence to written size
+pSeq->nElements = mnCacheWrittenSize;
+mxOutputStream->writeBytes( mpCache );
 // and next time write to the beginning
 mnCacheWrittenSize = 0;
 }
commit a83e71c71bdaf1c947545d1d88fcd0814715451d
Author: Matúš Kukan 
Date:   Fri Oct 3 10:41:18 2014 +0200

FastSerializer: Use -1 for unknown string length

Change-Id: I3920caf9d95f20992b7961873f1668468d797e8e

diff --git a/sax/source/tools/fastserializer.cxx 
b/sax/source/tools/fastserializer.cxx
index d885768..3876609 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -113,7 +113,7 @@ namespace sax_fastparser {
 
 void FastSaxSerializer::write( const char* pStr, sal_Int32 nLen, bool 
bEscape )
 {
-if (nLen == 0)
+if (nLen == -1)
 nLen = strlen(pStr);
 
 if (!bEscape)
@@ -251,7 +251,7 @@ namespace sax_fastparser {
 
 writeBytes(sEqualSignAndQuote, N_CHARS(sEqualSignAndQuote));
 
-write(maTokenValues[j].pValue, 0, true);
+write(maTokenValues[j].pValue, -1, true);
 
 writeBytes(sQuote, N_CHARS(sQuote));
 }
diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx
index e0ed751..801be10 100644
--- a/sax/source/tools/fshelper.cxx
+++ b/sax/source/tools/fshelper.cxx
@@ -102,7 +102,7 @@ void FastSerializerHelper::singleElement(sal_Int32 
elementTokenId, XFastAttribut
 
 FastSerializerHelper* FastSerializerHelper::write(const char* value)
 {
-mpSerializer->write(value, 0, false);
+mpSerializer->write(value, -1, false);
 return this;
 }
 
@@ -132,13 +132,14 @@ FastSerializerHelper* FastSerializerHelper::write(double 
value)
 
 FastSerializerHelper* FastSerializerHelper::writeEscaped(const char* value)
 {
-mpSerializer->write(value, 0, true);
+mpSerializer->write(value, -1, true);
 return this;
 }
 
 FastSerializerHelper* FastSerializerHelper::writeEscaped(const OUString& value)
 {
-mpSerializer->write(value, true);
+if (!value.isEmpty())
+mpSerializer->write(value, true);
 return this;
 }
 
commit 8e243bb23fbc55dafa048454b827142cedec6faa
Author: Matúš Kukan 
Date:   Fri Oct 3 11:16:39 2014 +0200

Remove few pointless OUString::number() and one method

Change-Id: I3e9a302a7513eebfeff07402f71fc3dde22e4cc2

diff --git a/include/sax/fshelper.hxx b/include/sax/fshelper.hxx
index 1f3b1b8..50248ce 100644
--- a/include/sax/fshelper.hxx
+++ b/include/sax/fshelper.hxx
@@ -124,7 +124,6 @@ public:
 
 FastSerializerHelper* write(const char* value);
 FastSerializerHelper* write(const OUString& value);
-FastSerializerHelper* write(const OString& value);
 FastSerializerHelper* write(sal_Int32 value);
 FastSerializerHelper* write(sal_Int64 value);
 FastSerializerHelper* write(double value);
diff --git a/oox/source/core/xmlfilterbase.cxx 
b/oox/source/core/xmlfilterbase.cxx
index bf82eef..fb5908f 100644
-

[Libreoffice-commits] core.git: 5 commits - sw/CppunitTest_sw_ooxmlimport.mk sw/qa sw/source writerfilter/source

2014-10-03 Thread Luboš Luňák
 sw/CppunitTest_sw_ooxmlimport.mk  |1 
 sw/qa/extras/ooxmlimport/data/bnc821804.docx  |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx  |  111 ++
 sw/source/core/unocore/unoredline.cxx |1 
 sw/source/uibase/misc/redlndlg.cxx|2 
 sw/source/uibase/shells/textfld.cxx   |1 
 writerfilter/source/dmapper/DomainMapper.cxx  |   37 +++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |  108 +++--
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |   25 +---
 writerfilter/source/dmapper/PropertyMap.hxx   |   19 +++
 writerfilter/source/ooxml/model.xml   |   10 -
 11 files changed, 223 insertions(+), 92 deletions(-)

New commits:
commit fd26de3b4a4e8be165f7627cb22029841ba4ab31
Author: Luboš Luňák 
Date:   Fri Oct 3 13:22:18 2014 +0200

docx redline import test (bnc#821804)

Change-Id: I09749037deb44c0cd74b28af226dd4b3e34ee0d1

diff --git a/sw/CppunitTest_sw_ooxmlimport.mk b/sw/CppunitTest_sw_ooxmlimport.mk
index 682b31c..5d21e9e 100644
--- a/sw/CppunitTest_sw_ooxmlimport.mk
+++ b/sw/CppunitTest_sw_ooxmlimport.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ooxmlimport, \
 unotest \
 utl \
 sw \
+tl \
 vcl \
$(gb_UWINAPI) \
 ))
diff --git a/sw/qa/extras/ooxmlimport/data/bnc821804.docx 
b/sw/qa/extras/ooxmlimport/data/bnc821804.docx
new file mode 100644
index 000..9ec2e07
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/bnc821804.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index fe0241e..adc0df2 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -56,11 +56,13 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -2375,6 +2377,115 @@ DECLARE_OOXMLIMPORT_TEST(testBnc891663, 
"bnc891663.docx")
 CPPUNIT_ASSERT( textNextRowTop >= imageTop + imageHeight );
 }
 
+static OString dateTimeToString( const util::DateTime& dt )
+{
+return DateTimeToOString( DateTime( Date( dt.Day, dt.Month, dt.Year ), 
tools::Time( dt.Hours, dt.Minutes, dt.Seconds )));
+}
+
+DECLARE_OOXMLIMPORT_TEST(testBnc821804, "bnc821804.docx")
+{
+CPPUNIT_ASSERT_EQUAL( OUString( "TITLE" ), getRun( getParagraph( 1 ), 1 
)->getString());
+CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(1), 1), "RedlineType"));
+// Redline information (SwXRedlinePortion) are separate "runs" apparently.
+CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 2), "RedlineType"));
+
CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty(getRun(getParagraph(1),
 2), "RedlineType"));
+CPPUNIT_ASSERT_EQUAL(true,getProperty(getRun(getParagraph(1), 2), 
"IsStart"));
+
CPPUNIT_ASSERT_EQUAL(OUString("unknown1"),getProperty(getRun(getParagraph(1),
 2), "RedlineAuthor"));
+
CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T09:46:00Z"),dateTimeToString(getProperty(getRun(getParagraph(1),
 2), "RedlineDateTime")));
+// So only the 3rd run is actual text (and the two runs have been merged 
into one, not sure why, but that shouldn't be a problem).
+CPPUNIT_ASSERT_EQUAL(OUString(" (1st run of an insert) (2nd run of an 
insert)"), getRun(getParagraph(1),3)->getString());
+CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(1), 3), "RedlineType"));
+// And the end SwXRedlinePortion of the redline.
+
CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty(getRun(getParagraph(1),
 4), "RedlineType"));
+
CPPUNIT_ASSERT_EQUAL(OUString("unknown1"),getProperty(getRun(getParagraph(1),
 4), "RedlineAuthor"));
+
CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T09:46:00Z"),dateTimeToString(getProperty(getRun(getParagraph(1),
 4), "RedlineDateTime")));
+CPPUNIT_ASSERT_EQUAL(false,getProperty(getRun(getParagraph(1), 4), 
"IsStart"));
+
+CPPUNIT_ASSERT_EQUAL(OUString("Normal text"), 
getRun(getParagraph(2),1)->getString());
+CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(2), 1), "RedlineType"));
+
+
CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty(getRun(getParagraph(3),
 1), "RedlineType"));
+
CPPUNIT_ASSERT_EQUAL(OUString("unknown2"),getProperty(getRun(getParagraph(3),
 1), "RedlineAuthor"));
+
CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T09:47:00Z"),dateTimeToString(getProperty(getRun(getParagraph(3),
 1), "RedlineDateTime")));
+CPPUNIT_ASSERT_EQUAL(OUString("Deleted"), 
getRun(getParagraph(3),2)->getString());
+
+// This is both inserted and formatted, so there are two SwXRedlinePortion 
"runs". Given that the redlines overlap and Writer core
+// doesn't officially expect that (even though it copes, the redline info 
will be split depending on how Writer deal with it).
+
CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty(getRun(getParagraph(4),
 1), "RedlineType"));
+CPPUNIT_ASSERT_EQUAL(true,getProperty(getRun(getP

[Bug 65675] LibreOffice 4.2 most annoying bugs

2014-10-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65675
Bug 65675 depends on bug 76565, which changed state.

Bug 76565 Summary: In-place editing of input fields - don't work "copy" "paste" 
and "cut"
https://bugs.freedesktop.org/show_bug.cgi?id=76565

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: canvas/Package_opengl.mk chart2/Package_opengl.mk slideshow/Package_opengl.mk

2014-10-03 Thread Tor Lillqvist
 canvas/Package_opengl.mk|2 +-
 chart2/Package_opengl.mk|2 +-
 slideshow/Package_opengl.mk |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 8717cbc9848efc1ee1284fac15ffc5c4ff080297
Author: Tor Lillqvist 
Date:   Fri Oct 3 14:51:51 2014 +0300

GLSL files should go into $(LIBO_ETC_FOLDER)/opengl

(And not $(LIBO_BIN_FOLDER)/opengl. Note that on Linux and Windows,
LIBO_ETC_FOLDER and LIBO_BIN_FOLDER are the same, "program".)

That's where getShaderFolder() in vcl/source/opengl/OpenGLHelper.cxx
looks for them. Also, as they are data and not executable code, to
conform to strict OS X code signing and sandboxing requirements, they
definitely should not be in $(LIBO_BIN_FOLDER)

Change-Id: I902e08f7a1f142697df827d50e0bda74be918eb4

diff --git a/canvas/Package_opengl.mk b/canvas/Package_opengl.mk
index af256bf..5e54b73 100644
--- a/canvas/Package_opengl.mk
+++ b/canvas/Package_opengl.mk
@@ -9,7 +9,7 @@
 
 $(eval $(call gb_Package_Package,canvas_opengl_shader,$(SRCDIR)/canvas/opengl))
 
-$(eval $(call 
gb_Package_add_files,canvas_opengl_shader,$(LIBO_BIN_FOLDER)/opengl,\
+$(eval $(call 
gb_Package_add_files,canvas_opengl_shader,$(LIBO_ETC_FOLDER)/opengl,\
dummyVertexShader.glsl \
linearMultiColorGradientFragmentShader.glsl \
linearTwoColorGradientFragmentShader.glsl \
diff --git a/chart2/Package_opengl.mk b/chart2/Package_opengl.mk
index 820cf35..aa12a95 100644
--- a/chart2/Package_opengl.mk
+++ b/chart2/Package_opengl.mk
@@ -9,7 +9,7 @@
 
 $(eval $(call gb_Package_Package,chart2_opengl_shader,$(SRCDIR)/chart2/opengl))
 
-$(eval $(call 
gb_Package_add_files,chart2_opengl_shader,$(LIBO_BIN_FOLDER)/opengl,\
+$(eval $(call 
gb_Package_add_files,chart2_opengl_shader,$(LIBO_ETC_FOLDER)/opengl,\
backgroundFragmentShader.glsl \
backgroundVertexShader.glsl \
commonFragmentShader.glsl \
diff --git a/slideshow/Package_opengl.mk b/slideshow/Package_opengl.mk
index a7e9a8c..d5634a4 100644
--- a/slideshow/Package_opengl.mk
+++ b/slideshow/Package_opengl.mk
@@ -9,7 +9,7 @@
 
 $(eval $(call 
gb_Package_Package,slideshow_opengl_shader,$(SRCDIR)/slideshow/opengl))
 
-$(eval $(call 
gb_Package_add_files,slideshow_opengl_shader,$(LIBO_BIN_FOLDER)/opengl,\
+$(eval $(call 
gb_Package_add_files,slideshow_opengl_shader,$(LIBO_ETC_FOLDER)/opengl,\
basicVertexShader.glsl \
dissolveFragmentShader.glsl \
staticFragmentShader.glsl \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/perfwork' - sax/source

2014-10-03 Thread Matúš Kukan
 sax/source/tools/fastserializer.cxx |   24 ++--
 sax/source/tools/fastserializer.hxx |5 +
 sax/source/tools/fshelper.cxx   |2 +-
 3 files changed, 28 insertions(+), 3 deletions(-)

New commits:
commit 4a0b656701ff863dfc0ab4d2c3cdedb798a572d7
Author: Matúš Kukan 
Date:   Fri Oct 3 12:30:51 2014 +0200

FastSerializer: Avoid some cycles when dealing with doubles

Would be easier to use OStringBuffer, but we can't get its pData member.
Also its append(double) is suboptimal (or anything that uses
rtl_str_valueOfDouble) - should be doing something like this commit.

Change-Id: I8f3140081a574a84f0e60dc85cce1bd2de23cd34

diff --git a/sax/source/tools/fastserializer.cxx 
b/sax/source/tools/fastserializer.cxx
index 3876609..cd8b0ca 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -20,7 +20,7 @@
 #include "fastserializer.hxx"
 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -66,19 +66,39 @@ namespace sax_fastparser {
 FastSaxSerializer::FastSaxSerializer( const css::uno::Reference< 
css::io::XOutputStream >& xOutputStream )
 : maCachedOutputStream()
 , maMarkStack()
+, mpDoubleStr(NULL)
+, mnDoubleStrCapacity(RTL_STR_MAX_VALUEOFDOUBLE)
 {
+rtl_string_new_WithLength(&mpDoubleStr, mnDoubleStrCapacity);
 mxFastTokenHandler = css::xml::sax::FastTokenHandler::create(
 ::comphelper::getProcessComponentContext());
 assert(xOutputStream.is()); // cannot do anything without that
 maCachedOutputStream.setOutputStream( xOutputStream );
 }
-FastSaxSerializer::~FastSaxSerializer() {}
+
+FastSaxSerializer::~FastSaxSerializer()
+{
+rtl_string_release(mpDoubleStr);
+}
 
 void FastSaxSerializer::startDocument()
 {
 writeBytes(sXmlHeader, N_CHARS(sXmlHeader));
 }
 
+void FastSaxSerializer::write( double value )
+{
+rtl_math_doubleToString(
+&mpDoubleStr, &mnDoubleStrCapacity, 0, value, 
rtl_math_StringFormat_G,
+RTL_STR_MAX_VALUEOFDOUBLE - RTL_CONSTASCII_LENGTH("-x.E-xxx"), 
'.', 0,
+0, sal_True);
+
+write(mpDoubleStr->buffer, mpDoubleStr->length);
+// and "clear" the string
+mpDoubleStr->length = 0;
+mnDoubleStrCapacity = RTL_STR_MAX_VALUEOFDOUBLE;
+}
+
 void FastSaxSerializer::write( const OUString& sOutput, bool bEscape )
 {
 if (!lcl_isAscii(sOutput))
diff --git a/sax/source/tools/fastserializer.hxx 
b/sax/source/tools/fastserializer.hxx
index 60ef71b..5b740ce 100644
--- a/sax/source/tools/fastserializer.hxx
+++ b/sax/source/tools/fastserializer.hxx
@@ -110,6 +110,7 @@ public:
 void writeId( ::sal_Int32 Element );
 OString getId( ::sal_Int32 Element );
 
+void write( double value );
 void write( const OUString& s, bool bEscape = false );
 void write( const OString& s, bool bEscape = false );
 void write( const char* pStr, sal_Int32 nLen, bool bEscape = false );
@@ -204,6 +205,10 @@ private:
 };
 
 ::std::stack< boost::shared_ptr< ForMerge > > maMarkStack;
+// Would be better to use OStringBuffer instead of these two
+// but then we couldn't get the rtl_String* member :-(
+rtl_String *mpDoubleStr;
+sal_Int32 mnDoubleStrCapacity;
 TokenValueList maTokenValues;
 
 #ifdef DBG_UTIL
diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx
index 801be10..15a5efa 100644
--- a/sax/source/tools/fshelper.cxx
+++ b/sax/source/tools/fshelper.cxx
@@ -126,7 +126,7 @@ FastSerializerHelper* FastSerializerHelper::write(sal_Int64 
value)
 
 FastSerializerHelper* FastSerializerHelper::write(double value)
 {
-mpSerializer->write(OString::number(value));
+mpSerializer->write(value);
 return this;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-03 Thread Noel Grandin
 svtools/inc/roadmap.hxx|2 +-
 svtools/source/control/roadmap.cxx |   18 +++---
 2 files changed, 8 insertions(+), 12 deletions(-)

New commits:
commit 11d22e164ec5e62e067a38ce11929b157381d1b7
Author: Noel Grandin 
Date:   Fri Oct 3 15:17:43 2014 +0200

cid#1194925 Resource leak

reorganise the code to keep coverity happy

Change-Id: I18fc2dfd17f97edf1d17c57caaed4cc9d2fedd13

diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx
index c1f8e46..362f797 100644
--- a/svtools/inc/roadmap.hxx
+++ b/svtools/inc/roadmap.hxx
@@ -110,7 +110,7 @@ namespace svt
 ItemId  GetNextAvailableItemId( ItemIndex 
_NewIndex );
 ItemId  GetPreviousAvailableItemId( ItemIndex 
_NewIndex );
 RoadmapItem*GetByPointer(vcl::Window* pWindow);
-RoadmapItem*InsertHyperLabel( ItemIndex _Index, const 
OUString& _aStr, ItemId _RMID, bool _bEnabled = true  );
+RoadmapItem*InsertHyperLabel( ItemIndex _Index, const 
OUString& _aStr, ItemId _RMID, bool _bEnabled, bool _bIncomplete  );
 voidUpdatefollowingHyperLabels( ItemIndex 
_Index );
 };
 
diff --git a/svtools/source/control/roadmap.cxx 
b/svtools/source/control/roadmap.cxx
index 58f3d06..ce70900 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -30,7 +30,6 @@
 #define ROADMAP_INDENT_X4
 #define ROADMAP_INDENT_Y27
 #define ROADMAP_ITEM_DISTANCE_Y 6
-#define RMINCOMPLETE-1
 
 
 namespace svt
@@ -235,7 +234,7 @@ namespace svt
 
 
 
-RoadmapItem* ORoadmap::InsertHyperLabel( ItemIndex _Index, const OUString& 
_sLabel, ItemId _RMID, bool _bEnabled)
+RoadmapItem* ORoadmap::InsertHyperLabel( ItemIndex _Index, const OUString& 
_sLabel, ItemId _RMID, bool _bEnabled, bool _bIncomplete)
 {
 if ( m_pImpl->getItemCount() == 0 )
 m_pImpl->initItemSize();
@@ -244,14 +243,14 @@ namespace svt
 RoadmapItem* pOldItem = GetPreviousHyperLabel( _Index );
 
 pItem = new RoadmapItem( *this, m_pImpl->getItemSize() );
-if ( _RMID != RMINCOMPLETE )
+if ( _bIncomplete )
 {
-pItem->SetInteractive( m_pImpl->isInteractive() );
-m_pImpl->insertHyperLabel( _Index, pItem );
+pItem->SetInteractive( false );
 }
 else
 {
-pItem->SetInteractive( false );
+pItem->SetInteractive( m_pImpl->isInteractive() );
+m_pImpl->insertHyperLabel( _Index, pItem );
 }
 pItem->SetPosition( pOldItem );
 pItem->Update( _Index, _sLabel );
@@ -306,7 +305,7 @@ namespace svt
 }
 }
 else if ( bWasComplete )
-m_pImpl->InCompleteHyperLabel = InsertHyperLabel( 
m_pImpl->getItemCount(), OUString("..."), RMINCOMPLETE );
+m_pImpl->InCompleteHyperLabel = InsertHyperLabel( 
m_pImpl->getItemCount(), OUString("..."), -1, true/*bEnabled*/, 
true/*bIncomplete*/ );
 }
 
 
@@ -365,10 +364,7 @@ namespace svt
 
 void ORoadmap::InsertRoadmapItem( ItemIndex _Index, const OUString& 
_RoadmapItem, ItemId _nUniqueId, bool _bEnabled )
 {
-// make coverity happy, because then it knows the return value from 
InsertHyperLabel won't leak
-assert( _nUniqueId != RMINCOMPLETE );
-
-InsertHyperLabel( _Index, _RoadmapItem, _nUniqueId, _bEnabled );
+InsertHyperLabel( _Index, _RoadmapItem, _nUniqueId, _bEnabled, 
false/*bIncomplete*/ );
 // TODO YPos is superfluous, if items are always appended
 UpdatefollowingHyperLabels( _Index + 1 );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - canvas/source connectivity/source dbaccess/source include/sfx2 include/svl linguistic/source sfx2/source

2014-10-03 Thread Noel Grandin
 canvas/source/cairo/cairo_xlib_cairo.cxx|   11 +-
 connectivity/source/commontools/FValue.cxx  |2 
 connectivity/source/drivers/calc/CCatalog.cxx   |2 
 connectivity/source/drivers/calc/CColumns.cxx   |2 
 connectivity/source/drivers/calc/CDatabaseMetaData.cxx  |2 
 connectivity/source/drivers/dbase/DColumns.cxx  |3 
 connectivity/source/drivers/file/FDriver.cxx|2 
 connectivity/source/drivers/file/FPreparedStatement.cxx |2 
 connectivity/source/drivers/file/FStatement.cxx |2 
 connectivity/source/drivers/file/fcomp.cxx  |   16 ++--
 connectivity/source/drivers/firebird/DatabaseMetaData.cxx   |2 
 connectivity/source/drivers/firebird/Statement.cxx  |2 
 connectivity/source/drivers/flat/EColumns.cxx   |3 
 connectivity/source/drivers/flat/ETables.cxx|2 
 connectivity/source/drivers/jdbc/Blob.cxx   |2 
 connectivity/source/drivers/jdbc/CallableStatement.cxx  |2 
 connectivity/source/drivers/jdbc/Clob.cxx   |4 -
 connectivity/source/drivers/jdbc/DatabaseMetaData.cxx   |   48 ++--
 connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx |8 +-
 connectivity/source/drivers/jdbc/JConnection.cxx|4 -
 connectivity/source/drivers/jdbc/JStatement.cxx |4 -
 connectivity/source/drivers/jdbc/Object.cxx |6 -
 connectivity/source/drivers/jdbc/PreparedStatement.cxx  |6 -
 connectivity/source/drivers/jdbc/ResultSet.cxx  |   12 +--
 connectivity/source/drivers/jdbc/SQLException.cxx   |2 
 connectivity/source/drivers/jdbc/String.cxx |2 
 connectivity/source/drivers/jdbc/Timestamp.cxx  |2 
 connectivity/source/drivers/jdbc/tools.cxx  |4 -
 connectivity/source/drivers/mork/MPreparedStatement.cxx |2 
 connectivity/source/drivers/mork/MStatement.cxx |2 
 connectivity/source/drivers/odbc/OConnection.cxx|8 +-
 connectivity/source/drivers/odbc/OPreparedStatement.cxx |2 
 connectivity/source/drivers/odbc/ORealDriver.cxx|2 
 connectivity/source/drivers/odbc/OStatement.cxx |2 
 connectivity/source/drivers/odbc/OTools.cxx |4 -
 connectivity/source/drivers/postgresql/pq_xcontainer.cxx|8 +-
 connectivity/source/drivers/postgresql/pq_xcontainer.hxx|2 
 dbaccess/source/core/api/FilteredContainer.cxx  |2 
 dbaccess/source/core/api/KeySet.cxx |8 +-
 dbaccess/source/core/api/OptimisticSet.cxx  |2 
 dbaccess/source/core/api/RowSet.cxx |2 
 dbaccess/source/core/api/RowSetBase.cxx |2 
 dbaccess/source/core/dataaccess/databasecontext.cxx |2 
 dbaccess/source/core/dataaccess/databasedocument.cxx|2 
 dbaccess/source/core/dataaccess/definitioncontainer.cxx |4 -
 dbaccess/source/filter/xml/dbloader2.cxx|2 
 dbaccess/source/filter/xml/xmlfilter.cxx|4 -
 dbaccess/source/sdbtools/connection/connectiondependent.hxx |2 
 dbaccess/source/ui/app/AppController.cxx|   14 +--
 dbaccess/source/ui/app/AppDetailPageHelper.cxx  |2 
 dbaccess/source/ui/browser/brwctrlr.cxx |4 -
 dbaccess/source/ui/browser/dbloader.cxx |2 
 dbaccess/source/ui/browser/exsrcbrw.cxx |2 
 dbaccess/source/ui/browser/formadapter.cxx  |   12 +--
 dbaccess/source/ui/browser/genericcontroller.cxx|2 
 dbaccess/source/ui/browser/sbagrid.cxx  |   22 ++---
 dbaccess/source/ui/browser/sbamultiplex.cxx |2 
 dbaccess/source/ui/browser/unodatbr.cxx |   28 +++
 dbaccess/source/ui/control/FieldDescControl.cxx |   10 +-
 dbaccess/source/ui/dlg/odbcconfig.cxx   |4 -
 dbaccess/source/ui/misc/DExport.cxx |2 
 dbaccess/source/ui/misc/TokenWriter.cxx |8 +-
 dbaccess/source/ui/misc/WCopyTable.cxx  |4 -
 dbaccess/source/ui/misc/WTypeSelect.cxx |   12 +--
 dbaccess/source/ui/misc/databaseobjectview.cxx  |   28 +++
 dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx|2 
 dbaccess/source/ui/misc/linkeddocuments.cxx |4 -
 dbaccess/source/ui/querydesign/QTableConnectionData.cxx |4 -
 dbaccess/source/ui/querydesign/querycontroller.cxx  |   22 ++---
 dbaccess/source/ui/relationdesign/RelationTableView.cxx |2 
 dbaccess/source/ui/tabledesign/TableController.cxx  |2 
 include/sfx2/childw

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

2014-10-03 Thread Noel Grandin
 hwpfilter/source/hwpeq.cxx |  690 ++---
 1 file changed, 346 insertions(+), 344 deletions(-)

New commits:
commit 0a6f6cb0912bfd3609826daba62418d6ee179cf3
Author: Noel Grandin 
Date:   Fri Oct 3 15:48:58 2014 +0200

fix indentation

Change-Id: Icd67d066eb72b951f3e4846d45d00e7863a6000e

diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx
index 3b5e9fc..41c2f3e 100644
--- a/hwpfilter/source/hwpeq.cxx
+++ b/hwpfilter/source/hwpeq.cxx
@@ -63,321 +63,321 @@ static bool eq_sentence(MzString& outs, istream *strm, 
const char *end = 0);
 struct hwpeq {
   const char*key;   // hwp math keyword
   const char*latex; // corresponding latex keywork
-  int   nargs;  // # of argument
+  int   nargs;  // # of argument
   unsigned char flag;   // case sensitive?
 };
 
 static const hwpeq eq_tbl[] = {
-  { "!=",   "\\equiv ", 0,  0   },
-  { "#","", 0,  0   },
-  { "+-",   "\\pm ",0,  0   },
-  { "-+",   "\\mp ",0,  0   },
-  { "<=",   "\\leq ",   0,  0   },
-  { "==",   "\\equiv ", 0,  0   },
-  { ">=",   "\\geq ",   0,  0   },
-  { "Pr",   NULL,   0,  0   },
-  { "^","^",1,  0   },
-  { "_","_",1,  0   },
-  { "`","\\;",  0,  0   },
-  { "acute",NULL,   1,  0   },
-  { "aleph",NULL,   0,  0   },
-  { "alpha",NULL,   0,  EQ_CASE },
-  { "amalg",NULL,   0,  0   },
-  { "and",  NULL,   0,  0   },
-  { "angle",NULL,   0,  0   },
-  { "angstrom", NULL,   0,  0   },
-  { "approx",   NULL,   0,  0   },
-  { "arc",  NULL,   0,  0   },
-  { "arccos",   NULL,   0,  0   },
-  { "arch", NULL,   0,  0   },
-  { "arcsin",   NULL,   0,  0   },
-  { "arctan",   NULL,   0,  0   },
-  { "arg",  NULL,   0,  0   },
-  { "assert",   "\\vdash",  0,  0   },
-  { "ast",  NULL,   0,  0   },
-  { "asymp",NULL,   0,  0   },
-  { "atop", NULL,   1,  EQ_ATOP },
-  { "backslash",NULL,   0,  0   },
-  { "bar",  NULL,   1,  0   },
-  { "because",  NULL,   0,  0   },
-  { "beta", NULL,   0,  EQ_CASE },
-  { "big",  NULL,   0,  EQ_CASE },
-  { "bigcap",   NULL,   0,  0   },
-  { "bigcirc",  NULL,   0,  0   },
-  { "bigcup",   NULL,   0,  0   },
-  { "bigg", NULL,   0,  EQ_CASE },
-  { "bigodiv",  NULL,   0,  0   },
-  { "bigodot",  NULL,   0,  0   },
-  { "bigominus",NULL,   0,  0   },
-  { "bigoplus", NULL,   0,  0   },
-  { "bigotimes",NULL,   0,  0   },
-  { "bigsqcap", NULL,   0,  0   },
-  { "bigsqcup", NULL,   0,  0   },
-  { "biguplus", NULL,   0,  0   },
-  { "bigvee",   NULL,   0,  0   },
-  { "bigwedge", NULL,   0,  0   },
-  { "binom",NULL,   2,  0   },
-  { "bmatrix",  NULL,   0,  EQ_ENV  },
-  { "bold", NULL,   0,  0   },
-  { "bot",  NULL,   0,  0   },
-  { "breve",NULL,   1,  0   },
-  { "buildrel", NULL,   0,  0   }, // LATER
-  { "bullet",   NULL,   0,  0   },
-  { "cap",  NULL,   0,  0   },
-  { "cases",NULL,   0,  EQ_ENV  },
-  { "ccol", NULL,   0,  0   }, /* 세로로 가운데 */
-  { "cdot", NULL,   0,  0   },
-  { "cdots",NULL,   0,  0   },
-  { "check",NULL,   1,  0   },
-  { "chi",  NULL,   0,  EQ_CASE },
-  { "choose",   NULL,   0,  EQ_ATOP },
-  { "circ", NULL,   0,  0   },
-  { "col",  NULL,   0,  0   }, // LATER
-  { "cong", NULL,   0,  0   },
-  { "coprod",   NULL,   0,  0   },
-  { "cos",  NULL,   0,  0   },
-  { "cosec",NULL,   0,  0   },
-  { "cosh", NULL,   0,  0   },
-  { "cot",  NULL,   0,  0   },
-  { "coth", NULL,   0,  0   },
-  { "cpile",NULL,   0,  0   }, // LATER
-  { "csc",  NULL,   0,  0   },
-  { "cup",  NULL,   0,  0   },
-  { "dagger",   NULL,   0,  0   },
-  { "dashv",NULL,   0,  0   },
-  { "ddagger",  NULL,   0,  0   },
-  { "ddot", NULL,   1,  0   },
-  { "ddots",NULL,   0,  0   },
-  { "def",  NULL,   0,  0   },
-  { "deg",  NULL,   0,  0   },
-  { "del",  NULL,   0,  0   },
-  { "delta",NULL,   0,  EQ_CASE },
-  { "diamond",  NULL,   0,  0   },
-  { "dim",  NULL,   0,  0   },
-  { "div",  NULL,   0,  0   },
-  { "divide",   NULL,   0,  0   },
-  { "dline",NULL,   0,  0   },
-  { "dmatrix",  NULL,   0,  EQ_ENV  },
-  { "dot",  NULL,   1,  0   },
-  { "doteq",NULL,   0,  0   },
-  { "dotsaxis", NULL,   0,  0   },
-  { "dotsdiag", NULL,   0,  0   },
-  { "dotslow",  "\\ldots",  

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

2014-10-03 Thread Noel Grandin
 connectivity/source/drivers/jdbc/JConnection.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8f539e3f711d6253e65180f6c0f9567e5247a322
Author: Noel Grandin 
Date:   Fri Oct 3 16:00:30 2014 +0200

cid#704588 Dereference after null check

Change-Id: If84e072da9e59140466262fbeac4dc787a9de898

diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx 
b/connectivity/source/drivers/jdbc/JConnection.cxx
index b1e1777..a9b8ef9 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -718,7 +718,7 @@ void java_sql_Connection::loadDriverFromProperties( const 
OUString& _sDriverClas
 ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
 m_pDriverobject = driverObject.release();
 
-if( t.pEnv && m_pDriverobject )
+if( m_pDriverobject )
 m_pDriverobject = t.pEnv->NewGlobalRef( 
m_pDriverobject );
 
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 65675] LibreOffice 4.2 most annoying bugs

2014-10-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65675

Timur  changed:

   What|Removed |Added

 Depends on||60762

--- Comment #222 from Timur  ---
Added Bug 60762 - PRINTING: Images do not print or export to PDF

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2014-10-03 Thread Miklos Vajna
 sw/qa/extras/ooxmlexport/data/table-style-border.docx|binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx |   15 +
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |   42 +++
 3 files changed, 57 insertions(+)

New commits:
commit 95b4f258c439575f0ace02e1672ebd748d832616
Author: Miklos Vajna 
Date:   Fri Oct 3 15:42:30 2014 +0200

DOCX import: improve table style handling wrt. cell borders

The symptom was that some cell borders were missing. It's because in
Word, cell borders are additions to table borders, so if a table border
is single, but the cell border is none, then the outcome should be
single, not none. In Writer, this is a single UNO property, so if it's
set to SOLID then to NONE, the latter wins.

There are two situations where we now do the right thing:

1) style-cell-border is set, direct-cell-border is none -> outcome is
now inheriting (style-table-border, direct-table-border, etc.)

2) style-cell-border is none, direct-cell-border is none, but
direct-table-border is set -> outcome is now direct-table-border.

Change-Id: I320ae908c61221c8020e3b5323c31dec11c15b2f

diff --git a/sw/qa/extras/ooxmlexport/data/table-style-border.docx 
b/sw/qa/extras/ooxmlexport/data/table-style-border.docx
new file mode 100644
index 000..ceb0bd8
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/table-style-border.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 19ea3a1..c35b404 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -378,6 +378,21 @@ DECLARE_OOXMLEXPORT_TEST(testTableStyleCellBackColor, 
"table-style-cell-back-col
 CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00ff00), getProperty(xCell, 
"BackColor"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTableStyleBorder, "table-style-border.docx")
+{
+uno::Reference xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+uno::Reference xTable(xTables->getByIndex(0), 
uno::UNO_QUERY);
+
+// This was 0, the second cell was missing its right border.
+uno::Reference xCell = xTable->getCellByName("A2");
+CPPUNIT_ASSERT(getProperty(xCell, 
"RightBorder").LineWidth > 0);
+
+// This was also 0 (even after fixing the previous problem), the first 
cell was missing its right border, too.
+xCell = xTable->getCellByName("A1");
+CPPUNIT_ASSERT(getProperty(xCell, 
"RightBorder").LineWidth > 0);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 0287adf..3fc80f8 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -714,6 +715,47 @@ CellPropertyValuesSeq_t 
DomainMapperTableHandler::endTableGetCellProperties(Tabl
 if ( rInfo.pTableStyle )
 {
 PropertyMapPtr pStyleProps = 
rInfo.pTableStyle->GetProperties( nCnfStyleMask );
+
+// Check if we need to clean up some empty border 
definitions to match what Word does.
+static const PropertyIds pBorders[] =
+{
+PROP_TOP_BORDER, PROP_LEFT_BORDER, PROP_BOTTOM_BORDER, 
PROP_RIGHT_BORDER
+};
+for (size_t i = 0; i < SAL_N_ELEMENTS(pBorders); ++i)
+{
+boost::optional 
oStyleCellBorder = pStyleProps->getProperty(pBorders[i]);
+boost::optional 
oDirectCellBorder = (*aCellIterator)->getProperty(pBorders[i]);
+if (oStyleCellBorder && oDirectCellBorder)
+{
+// We have a cell border from the table style and 
as direct formatting as well.
+table::BorderLine2 aStyleCellBorder = 
oStyleCellBorder->second.get();
+table::BorderLine2 aDirectCellBorder = 
oDirectCellBorder->second.get();
+if (aStyleCellBorder.LineStyle != 
table::BorderLineStyle::NONE && aDirectCellBorder.LineStyle == 
table::BorderLineStyle::NONE)
+{
+// The style one would be visible, but then 
cleared away as direct formatting.
+// Delete both, so that table formatting can 
become visible.
+pStyleProps->Erase(pBorders[i]);
+(*aCellIterator)->Erase(pBorders[i]);
+}
+else
+{

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

2014-10-03 Thread Matúš Kukan
 oox/source/drawingml/color.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit a54e0780897a8e8a8ca3ae2ba00118bd6debaf9c
Author: Matúš Kukan 
Date:   Fri Oct 3 16:56:32 2014 +0200

Remove OSL_ASSERT which could fail for allowed XLS_TOKEN(tint)

Change-Id: I6e0cc345f6903128ffebe5fb56f6e198ee32da9a

diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx
index 05cc58d..e6f3bf1 100644
--- a/oox/source/drawingml/color.cxx
+++ b/oox/source/drawingml/color.cxx
@@ -461,7 +461,6 @@ sal_Int32 Color::getColor( const GraphicHelper& 
rGraphicHelper, sal_Int32 nPhClr
 {
 for( TransformVec::const_iterator aIt = maTransforms.begin(), aEnd = 
maTransforms.end(); aIt != aEnd; ++aIt )
 {
-OSL_ASSERT((aIt->mnToken & sal_Int32(0x))==0);
 switch( aIt->mnToken )
 {
 case XML_red:   toCrgb(); lclSetValue( mnC1, aIt->mnValue 
);break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-03 Thread Marco Cecchetti
 sw/CppunitTest_sw_htmlexport.mk   |1 
 sw/qa/extras/htmlexport/data/checkbox-radiobutton.doc |binary
 sw/qa/extras/htmlexport/htmlexport.cxx|   20 ++
 sw/source/filter/html/htmlforw.cxx|5 +++-
 4 files changed, 25 insertions(+), 1 deletion(-)

New commits:
commit b2922c99f5fe1250e6a01390809736d29563fec9
Author: Marco Cecchetti 
Date:   Fri Oct 3 15:45:17 2014 +0200

html export: Fix export of checked checkbox and radiobutton.

Change-Id: Ia77f9840df7508d96292aac63e65714a7892342f

diff --git a/sw/CppunitTest_sw_htmlexport.mk b/sw/CppunitTest_sw_htmlexport.mk
index 475ce41..23cdef1 100644
--- a/sw/CppunitTest_sw_htmlexport.mk
+++ b/sw/CppunitTest_sw_htmlexport.mk
@@ -56,6 +56,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_htmlexport,\
canvas/source/factory/canvasfactory \
 comphelper/util/comphelp \
 configmgr/source/configmgr \
+dbaccess/util/dba \
 embeddedobj/util/embobj \
 filter/source/config/cache/filterconfig1 \
 filter/source/storagefilterdetect/storagefd \
diff --git a/sw/qa/extras/htmlexport/data/checkbox-radiobutton.doc 
b/sw/qa/extras/htmlexport/data/checkbox-radiobutton.doc
new file mode 100644
index 000..17162a4
Binary files /dev/null and 
b/sw/qa/extras/htmlexport/data/checkbox-radiobutton.doc differ
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 1c479a0..2db20ef 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -200,6 +200,26 @@ DECLARE_HTMLEXPORT_TEST(testExportImageProperties, 
"HTMLImage.odt")
 assertXPath(pDoc, "/html/body/p/a/font/img", "usemap", "#map1");
 }
 
+DECLARE_HTMLEXPORT_TEST(testExportCheckboxRadioButtonState, 
"checkbox-radiobutton.doc")
+{
+htmlDocPtr pDoc = parseHtml(maTempFile);
+CPPUNIT_ASSERT(pDoc);
+
+assertXPath(pDoc, "/html/body", 1);
+assertXPath(pDoc, "/html/body/p[1]/input", "type", "checkbox");
+assertXPath(pDoc, "/html/body/p[1]/input", "checked", "checked");
+assertXPath(pDoc, "/html/body/p[2]/input", "type", "checkbox");
+assertXPathNoAttribute(pDoc, "/html/body/p[2]/input", "checked");
+assertXPath(pDoc, "/html/body/form/p[1]/input", "type", "checkbox");
+assertXPath(pDoc, "/html/body/form/p[1]/input", "checked", "checked");
+assertXPath(pDoc, "/html/body/form/p[2]/input", "type", "checkbox");
+assertXPathNoAttribute(pDoc, "/html/body/form/p[2]/input", "checked");
+assertXPath(pDoc, "/html/body/form/p[3]/input", "type", "radio");
+assertXPath(pDoc, "/html/body/form/p[3]/input", "checked", "checked");
+assertXPath(pDoc, "/html/body/form/p[4]/input", "type", "radio");
+assertXPathNoAttribute(pDoc, "/html/body/form/p[4]/input", "checked");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlforw.cxx 
b/sw/source/filter/html/htmlforw.cxx
index 4fc3adf..781704f 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -752,6 +752,9 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
 TRISTATE_FALSE != *(sal_Int16*) aTmp.getValue() )
 {
 sOptions += " " + OString(OOO_STRING_SVTOOLS_HTML_O_checked);
+sOptions += "=\"";
+sOptions += OString(OOO_STRING_SVTOOLS_HTML_O_checked);
+sOptions += "\"";
 }
 
 aTmp = xPropSet->getPropertyValue( "RefValue" );
@@ -970,7 +973,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
 sOut = "\"";
 }
 
-sOut = sOptions;
+sOut += " " + sOptions;
 
 if( TYPE_IMAGE == eType )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 27 commits - basegfx/source basic/source connectivity/source cui/source dbaccess/source sc/source sd/source sfx2/source svx/source sw/source vcl/source

2014-10-03 Thread Caolán McNamara
 basegfx/source/polygon/b2dpolygontools.cxx|5 
 basic/source/classes/sb.cxx   |4 
 connectivity/source/drivers/dbase/DTable.cxx  |6 -
 cui/source/options/optdict.cxx|4 
 cui/source/options/optjava.cxx|   13 --
 dbaccess/source/ui/dlg/advancedsettings.cxx   |8 -
 sc/source/core/opencl/opencl_device_selection.h   |1 
 sc/source/ui/condformat/condformatmgr.cxx |   11 +-
 sc/source/ui/inc/tabsplit.hxx |2 
 sc/source/ui/view/tabsplit.cxx|   16 ---
 sc/source/ui/view/tabvwshg.cxx|3 
 sd/source/ui/framework/configuration/ConfigurationUpdater.cxx |5 
 sfx2/source/view/viewfrm.cxx  |5 
 svx/source/unodraw/unoshtxt.cxx   |2 
 sw/source/core/crsr/crsrsh.cxx|4 
 sw/source/ui/index/cnttab.cxx |2 
 sw/source/uibase/dochdl/gloshdl.cxx   |   53 +-
 sw/source/uibase/docvw/edtwin.cxx |2 
 sw/source/uibase/inc/glosdoc.hxx  |1 
 sw/source/uibase/misc/glosdoc.cxx |9 -
 sw/source/uibase/misc/glshell.cxx |5 
 sw/source/uibase/uno/unoatxt.cxx  |4 
 sw/source/uibase/utlui/content.cxx|   24 ++--
 sw/source/uibase/utlui/gloslst.cxx|2 
 vcl/source/filter/sgvtext.cxx |2 
 25 files changed, 84 insertions(+), 109 deletions(-)

New commits:
commit c11389f14136cb9b30a6e903d08385b9cec68ecc
Author: Caolán McNamara 
Date:   Fri Oct 3 10:34:30 2014 +0100

coverity#1242443 Identical code for different branches

Splitter derives from Window and doesn't override
MouseMove so both branches are the same

Change-Id: Id74f12e2efb458ac2ae183686a57befdf0225778

diff --git a/sc/source/ui/inc/tabsplit.hxx b/sc/source/ui/inc/tabsplit.hxx
index 1572a7c..a81e803 100644
--- a/sc/source/ui/inc/tabsplit.hxx
+++ b/sc/source/ui/inc/tabsplit.hxx
@@ -31,7 +31,6 @@ private:
 boolbFixed;
 
 protected:
-virtual voidMouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
 virtual voidMouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
 virtual voidSplitting( Point& rSplitPos ) SAL_OVERRIDE;
 
diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx
index 89b9ed4..755aeef 100644
--- a/sc/source/ui/view/tabsplit.cxx
+++ b/sc/source/ui/view/tabsplit.cxx
@@ -35,14 +35,6 @@ ScTabSplitter::~ScTabSplitter()
 {
 }
 
-void ScTabSplitter::MouseMove( const MouseEvent& rMEvt )
-{
-if (bFixed)
-Window::MouseMove( rMEvt );
-else
-Splitter::MouseMove( rMEvt );
-}
-
 void ScTabSplitter::MouseButtonDown( const MouseEvent& rMEvt )
 {
 if (bFixed)
commit 130354cf8e506798900b01460ae5cd7b5ff82bc0
Author: Caolán McNamara 
Date:   Fri Oct 3 10:33:01 2014 +0100

coverity#1242454 Identical code for different branches

Splitter derives from Window and doesn't override
MouseButtonUp so both branches are the same

Change-Id: I9072d24b60dacfdb1d3e9ca1c97f08002f7e24ba

diff --git a/sc/source/ui/inc/tabsplit.hxx b/sc/source/ui/inc/tabsplit.hxx
index a05aca5..1572a7c 100644
--- a/sc/source/ui/inc/tabsplit.hxx
+++ b/sc/source/ui/inc/tabsplit.hxx
@@ -32,7 +32,6 @@ private:
 
 protected:
 virtual voidMouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
-virtual voidMouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
 virtual voidMouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
 virtual voidSplitting( Point& rSplitPos ) SAL_OVERRIDE;
 
diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx
index c2f15e4..89b9ed4 100644
--- a/sc/source/ui/view/tabsplit.cxx
+++ b/sc/source/ui/view/tabsplit.cxx
@@ -43,14 +43,6 @@ void ScTabSplitter::MouseMove( const MouseEvent& rMEvt )
 Splitter::MouseMove( rMEvt );
 }
 
-void ScTabSplitter::MouseButtonUp( const MouseEvent& rMEvt )
-{
-if (bFixed)
-Window::MouseButtonUp( rMEvt );
-else
-Splitter::MouseButtonUp( rMEvt );
-}
-
 void ScTabSplitter::MouseButtonDown( const MouseEvent& rMEvt )
 {
 if (bFixed)
commit b8ddd25acb0f47db6ccaefd9e1ae7edd40d44d73
Author: Caolán McNamara 
Date:   Fri Oct 3 10:42:30 2014 +0100

coverity#1242431 Explicit null dereferenced

Change-Id: I96cbc59931400ad2f348ffb44925e8fe34b782ed

diff --git a/sc/source/ui/condformat/condformatmgr.cxx 
b/sc/source/ui/condformat/condformatmgr.cxx
index d61fd36..a46095f 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/

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

2014-10-03 Thread Tor Lillqvist
 Repository.mk |2 +-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 4e678058267bb0749cc427b22d4583af72d86217
Author: Tor Lillqvist 
Date:   Fri Oct 3 18:52:22 2014 +0300

Try putting vcldemo in instdir/program

Chris Sherlock says that should make it possible to get it to actually
run. (Didn't work for me, though.)

Change-Id: I69a7badaf1f19481546866cfa2a417029c305105

diff --git a/Repository.mk b/Repository.mk
index 29dbf6e..16189e4 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -66,7 +66,6 @@ $(eval $(call gb_Helper_register_executables,NONE, \
 svdemo \
 svptest \
 svpclient \
-vcldemo \
 pixelctl ) \
 ))
 
@@ -100,6 +99,7 @@ $(eval $(call gb_Helper_register_executables,OOO, \
) \
uri-encode \
ui-previewer \
+   vcldemo \
tiledrendering \
$(if $(and $(ENABLE_GTK), $(filter LINUX,$(OS))), gtktiledviewer) \
$(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \
commit ff978f9728e808290e5ae87ef2e4549a8e6cb68b
Author: Tor Lillqvist 
Date:   Fri Oct 3 15:58:59 2014 +0300

WaE: implicit conversion of NULL constant to 'boost::detail::sp_nullptr_t'

Change-Id: Id0f3345613ae3b9c19cc5f5845140fa1c067bee0

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index eb08875..bec1542 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1654,11 +1654,11 @@ void DomainMapper_Impl::CheckRedline( uno::Reference< 
text::XTextRange > const&
 // (and so if that happens, it may be better to fix Writer).
 // Create the redlines here from lowest (formats) to highest 
(inserts/removals) priority, since the last one is
 // what Writer presents graphically, so this will show deletes as deleted 
text and not as just formatted text being there.
-if( GetTopContextOfType(CONTEXT_PARAGRAPH) != NULL )
+if( GetTopContextOfType(CONTEXT_PARAGRAPH) )
 for( std::vector::const_iterator it = 
GetTopContextOfType(CONTEXT_PARAGRAPH)->Redlines().begin();
  it != GetTopContextOfType(CONTEXT_PARAGRAPH)->Redlines().end(); 
++it )
 CreateRedline( xRange, *it );
-if( GetTopContextOfType(CONTEXT_CHARACTER) != NULL )
+if( GetTopContextOfType(CONTEXT_CHARACTER) )
 for( std::vector::const_iterator it = 
GetTopContextOfType(CONTEXT_CHARACTER)->Redlines().begin();
  it != GetTopContextOfType(CONTEXT_CHARACTER)->Redlines().end(); 
++it )
 CreateRedline( xRange, *it );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-03 Thread Caolán McNamara
 sw/source/uibase/docvw/PostItMgr.cxx |  161 ++-
 1 file changed, 141 insertions(+), 20 deletions(-)

New commits:
commit 03a0f1147af703dc20574919213152a8599d2a8f
Author: Caolán McNamara 
Date:   Thu Oct 2 17:02:10 2014 +0100

Resolves:fdo#58277 don't double delete postits

In redline mode, if deleting the anchor point for a postit causes another 
one
to get moved, i.e. deleting it and creating a replacement. Then update the
the queue of postits to remove the old candidate and add the new candidate.

This is complicated by the occasional anonymous SWFMTFLD_REMOVED event
which just states that "something" got removed from the document (but not
truly deleted), and I don't see any better way to handle it than to 
completely
refill the pool of candidates and rely on the fix of

commit 1f18b3b07832fee769e7a36c4f3503effde26f1e
Date:   Thu Oct 2 16:33:46 2014 +0100
Related: fdo#58277 only DelRight after a successful GotoField

to skip the previously successful candidates which got moved
into the redline backing area and so not loop forever

Change-Id: I0b30111bc1f2527011e68d048ecd65fcf71416a5

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index a75a70f..cbfc62c 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -1186,30 +1186,154 @@ void SwPostItMgr::RemoveSidebarWin()
 PreparePageContainer();
 }
 
+class FilterFunctor : public std::unary_function
+{
+public:
+virtual bool operator()(const SwFmtFld* pFld) const = 0;
+virtual ~FilterFunctor() {}
+};
+
+class IsPostitField : public FilterFunctor
+{
+public:
+bool operator()(const SwFmtFld* pFld) const SAL_OVERRIDE
+{
+return pFld->GetField()->GetTyp()->Which() == RES_POSTITFLD;
+}
+};
+
+class IsPostitFieldWithAuthorOf : public FilterFunctor
+{
+OUString m_sAuthor;
+public:
+IsPostitFieldWithAuthorOf(const OUString &rAuthor)
+: m_sAuthor(rAuthor)
+{
+}
+bool operator()(const SwFmtFld* pFld) const SAL_OVERRIDE
+{
+if (pFld->GetField()->GetTyp()->Which() != RES_POSTITFLD)
+return false;
+return static_cast(pFld->GetField())->GetPar1() 
== m_sAuthor;
+}
+};
+
+
+//Manages the passed in vector by automatically removing entries if they are 
deleted
+//and automatically adding entries if they appear in the document and match the
+//functor.
+//
+//This will completely refill in the case of a "anonymous" NULL pFld stating
+//rather unhelpfully that "something changed" so you may process the same
+//Fields more than once.
+class FieldDocWatchingStack : public SfxListener
+{
+std::list& l;
+std::vector v;
+SwDocShell& m_rDocShell;
+FilterFunctor& m_rFilter;
+
+virtual void Notify(SfxBroadcaster&, const SfxHint& rHint) SAL_OVERRIDE
+{
+const SwFmtFldHint* pHint = dynamic_cast(&rHint);
+if (pHint)
+{
+bool bAllInvalidated = false;
+if (pHint->Which() == SWFMTFLD_REMOVED)
+{
+const SwFmtFld* pFld = pHint->GetField();
+bAllInvalidated = pFld == NULL;
+if (!bAllInvalidated && m_rFilter(pFld))
+{
+EndListening(const_cast(*pFld));
+v.erase(std::remove(v.begin(), v.end(), pFld), v.end());
+}
+}
+else if (pHint->Which() == SWFMTFLD_INSERTED)
+{
+const SwFmtFld* pFld = pHint->GetField();
+bAllInvalidated = pFld == NULL;
+if (!bAllInvalidated && m_rFilter(pFld))
+{
+StartListening(const_cast(*pFld));
+v.push_back(pFld);
+}
+}
+
+if (bAllInvalidated)
+FillVector();
+
+return;
+}
+}
+
+public:
+FieldDocWatchingStack(std::list& in, SwDocShell 
&rDocShell, FilterFunctor& rFilter)
+: l(in)
+, m_rDocShell(rDocShell)
+, m_rFilter(rFilter)
+{
+FillVector();
+StartListening(m_rDocShell);
+}
+void FillVector()
+{
+EndListeningToAllFields();
+v.clear();
+v.reserve(l.size());
+for(std::list::iterator aI = l.begin(); aI != l.end(); 
++aI)
+{
+SwSidebarItem* p = *aI;
+const SwFmtFld& rFld = p->GetFmtFld();
+if (!m_rFilter(&rFld))
+continue;
+StartListening(const_cast(rFld));
+v.push_back(&rFld);
+}
+}
+void EndListeningToAllFields()
+{
+for(std::vector::iterator aI = v.begin(); aI != 
v.end(); ++aI)
+{
+const SwFmtFld* pFld = *aI;
+EndListening(const_cast(*pFld));
+}
+}
+~FieldDocWatchingStack()
+{
+EndListeningToAllFields();
+

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

2014-10-03 Thread Miklos Vajna
 sw/qa/extras/ooxmlexport/data/table-position.docx|binary
 sw/qa/extras/ooxmlexport/data/table-style-border-export.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx |   10 ++
 sw/source/filter/ww8/docxattributeoutput.cxx |8 ++--
 4 files changed, 16 insertions(+), 2 deletions(-)

New commits:
commit a3b154ab0262e39497e788917085708ec645eae6
Author: Miklos Vajna 
Date:   Fri Oct 3 18:04:56 2014 +0200

DOCX export: fix missing table border when original doc has table style

Scenario is that the original document has a table style, which sets
borders around the table, so A1 cell gets top and left borders (and none
for right/bottom). Then on export, if we write A1 as table default, then
this overwrites the table style, so the real right / bottom borders from
the table style are lost, as on export we think that they are available
from the table style already, so we don't write them.

Regression from commit ae61569eea0719a882010cfbb260a1a0d690d974 (oox: Do
not overwrite table style properties, 2014-04-03).

Change-Id: I54c10ffc2ade65260693b769274b1311efc086f9

diff --git a/sw/qa/extras/ooxmlexport/data/table-style-border-export.docx 
b/sw/qa/extras/ooxmlexport/data/table-style-border-export.docx
new file mode 100644
index 000..eeb23ee
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/table-style-border-export.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index c35b404..d1ef8ae 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -393,6 +393,16 @@ DECLARE_OOXMLEXPORT_TEST(testTableStyleBorder, 
"table-style-border.docx")
 CPPUNIT_ASSERT(getProperty(xCell, 
"RightBorder").LineWidth > 0);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTableStyleBorderExport, 
"table-style-border-export.docx")
+{
+uno::Reference xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+uno::Reference xTable(xTables->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xCell = xTable->getCellByName("A3");
+// Bottom border was white, so this was 0xff.
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0x8064A2), 
getProperty(xCell, "BottomBorder").Color);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index da0c48c..36b1f30 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3386,8 +3386,12 @@ void DocxAttributeOutput::TableDefaultBorders( 
ww8::WW8TableNodeInfoInner::Point
 
 bool bEcma = GetExport().GetFilter().getVersion( ) == 
oox::core::ECMA_DIALECT;
 
-// the defaults of the table are taken from the top-left cell
-impl_borders( m_pSerializer, pFrmFmt->GetBox( ), 
lcl_getTableDefaultBorderOptions(bEcma), NULL, m_aTableStyleConf );
+// Don't write table defaults based on the top-left cell if we have a 
table style available.
+if (m_aTableStyleConf.empty())
+{
+// the defaults of the table are taken from the top-left cell
+impl_borders(m_pSerializer, pFrmFmt->GetBox(), 
lcl_getTableDefaultBorderOptions(bEcma), NULL, m_aTableStyleConf);
+}
 }
 
 void DocxAttributeOutput::TableDefaultCellMargins( 
ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
commit 453583cc610b3dacddede52662fa4df276dd7c61
Author: Miklos Vajna 
Date:   Fri Oct 3 17:54:45 2014 +0200

CppunitTest_sw_ooxmlexport2: clean up test file

This test file wants to test table positioning, but it also has
references to table styles. Remove these references to keep the testcase
minimal.

Change-Id: Ib7c7086bf767a8580dd7bae4452d0773e02d32a2

diff --git a/sw/qa/extras/ooxmlexport/data/table-position.docx 
b/sw/qa/extras/ooxmlexport/data/table-position.docx
index 4347854..f59a5da 100644
Binary files a/sw/qa/extras/ooxmlexport/data/table-position.docx and 
b/sw/qa/extras/ooxmlexport/data/table-position.docx differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 5 commits - sw/inc sw/qa sw/source sw/UIConfig_swriter.mk

2014-10-03 Thread Luboš Luňák
 sw/UIConfig_swriter.mk |1 
 sw/inc/hintids.hxx |2 
 sw/qa/extras/mailmerge/data/missing-default-line-color.ott |binary
 sw/qa/extras/mailmerge/data/one-empty-address.ods  |binary
 sw/qa/extras/mailmerge/mailmerge.cxx   |   23 ++
 sw/source/core/doc/docnew.cxx  |3 
 sw/source/uibase/dbui/dbmgr.cxx|   49 -
 7 files changed, 29 insertions(+), 49 deletions(-)

New commits:
commit f4825097a98c681cc187d88cfc1f8fd82362e1e0
Author: Luboš Luňák 
Date:   Fri Oct 3 18:21:08 2014 +0200

copy default drawinglayer attributes when doing mailmerge

Change-Id: I4c6fc31ae72d179975c65aec0b560741474d433e

diff --git a/sw/qa/extras/mailmerge/data/missing-default-line-color.ott 
b/sw/qa/extras/mailmerge/data/missing-default-line-color.ott
new file mode 100644
index 000..dad5a7b
Binary files /dev/null and 
b/sw/qa/extras/mailmerge/data/missing-default-line-color.ott differ
diff --git a/sw/qa/extras/mailmerge/data/one-empty-address.ods 
b/sw/qa/extras/mailmerge/data/one-empty-address.ods
new file mode 100644
index 000..abffed9
Binary files /dev/null and b/sw/qa/extras/mailmerge/data/one-empty-address.ods 
differ
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx 
b/sw/qa/extras/mailmerge/mailmerge.cxx
index 1b8dc2e..33f8f43 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -71,6 +71,29 @@ DECLARE_DFLT_MAILMERGE_TEST(testMultiPageAnchoredDraws, 
"multiple-page-anchored-
 }
 }
 
+DECLARE_DFLT_MAILMERGE_TEST(testMissingDefaultLineColor, 
"missing-default-line-color.ott", "one-empty-address.ods", "one-empty-address")
+{
+executeMailMerge();
+// The document was created by LO version which didn't write out the 
default value for line color
+// (see XMLGraphicsDefaultStyle::SetDefaults()).
+uno::Reference 
xDrawPageSupplier(mxMMComponent, uno::UNO_QUERY);
+uno::Reference 
xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
+uno::Reference xPropertySet(xDraws->getByIndex(0), 
uno::UNO_QUERY);
+// Lines do not have a line color.
+CPPUNIT_ASSERT( !xPropertySet->getPropertySetInfo()->hasPropertyByName( 
"LineColor" ));
+SwXTextDocument* pTxtDoc = dynamic_cast(mxMMComponent.get());
+CPPUNIT_ASSERT(pTxtDoc);
+uno::Reference< lang::XMultiServiceFactory > xFact( mxMMComponent, 
uno::UNO_QUERY );
+uno::Reference< beans::XPropertySet > xDefaults( xFact->createInstance( 
"com.sun.star.drawing.Defaults" ), uno::UNO_QUERY );
+CPPUNIT_ASSERT( xDefaults.is());
+uno::Reference< beans::XPropertySetInfo > xInfo( 
xDefaults->getPropertySetInfo());
+CPPUNIT_ASSERT( xInfo->hasPropertyByName( "LineColor" ));
+sal_uInt32 lineColor;
+xDefaults->getPropertyValue( "LineColor" ) >>= lineColor;
+// And the default value is black (wasn't copied properly by mailmerge).
+CPPUNIT_ASSERT_EQUAL( COL_BLACK, lineColor );
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 7701873..710db73 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -853,6 +853,7 @@ void SwDoc::ReplaceDefaults(const SwDoc& rSource)
 RES_PARATR_BEGIN, RES_PARATR_END-1,
 RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
 RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
+XATTR_START, XATTR_END-1,
 0
 };
 
commit 47db7c5d61f96ce90aebf560c29fcb999567e75f
Author: Luboš Luňák 
Date:   Fri Oct 3 18:22:53 2014 +0200

list mmcreatingdialog.ui in makefile

Change-Id: I05c5030530591f440323f72088bc7b456b774b7d

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index e2d35c2..dbfb7d4 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -171,6 +171,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/queryshowchangesdialog \
sw/uiconfig/swriter/ui/mailmerge \
sw/uiconfig/swriter/ui/mmaddressblockpage \
+   sw/uiconfig/swriter/ui/mmcreatingdialog \
sw/uiconfig/swriter/ui/mmlayoutpage \
sw/uiconfig/swriter/ui/mmmailbody \
sw/uiconfig/swriter/ui/mmmergepage \
commit 72da443f876a59a8107e26a277a8992838ea9231
Author: Luboš Luňák 
Date:   Fri Oct 3 16:54:35 2014 +0200

isDrawingLayerAttribute() maybe could return true for all drawinglayer attrs

Change-Id: I83013ecd45b32100bf14e004899561a57a087aef

diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index 6877276..76d5202 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -403,7 +403,7 @@ inline bool isFRMATR(const sal_uInt16 nWhich)
 }
 inline bool isDrawingLayerAttribute(const sal_uInt16 nWhich) //
 {
-return (XATTR_FILL_FIRST <= nWhich) && (XATTR_FILL_LAST >= nWhich);
+return (XATTR_START <= nWhich) && (XATTR_END > nWhich);
 }
 inline b

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

2014-10-03 Thread Tor Lillqvist
 sw/source/uibase/docvw/PostItMgr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6b7ae5d5bc8e75f2f318dd11ea09a115dd6552f8
Author: Tor Lillqvist 
Date:   Fri Oct 3 20:12:47 2014 +0300

WaE: overriding destructor declaration not explicitly marked 'virtual'

Change-Id: Ifb4ca15c862fb7111ff2e86cc6208573f48710d3

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index cbfc62c..6b1d5c9 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -1299,7 +1299,7 @@ public:
 EndListening(const_cast(*pFld));
 }
 }
-~FieldDocWatchingStack()
+virtual ~FieldDocWatchingStack()
 {
 EndListeningToAllFields();
 EndListening(m_rDocShell);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/perfwork' - 5 commits - formula/source include/formula sc/inc sc/qa sc/source

2014-10-03 Thread Kohei Yoshida
 formula/source/core/api/vectortoken.cxx  |   39 ++
 include/formula/vectortoken.hxx  |   16 -
 sc/inc/formulagroup.hxx  |2 
 sc/inc/platforminfo.hxx  |   10 
 sc/qa/unit/opencl-test.cxx   |  472 +++
 sc/source/core/opencl/formulagroupcl.cxx |   50 +--
 sc/source/core/opencl/opbase.cxx |  393 +++--
 sc/source/core/opencl/opbase.hxx |  207 -
 sc/source/core/opencl/openclwrapper.cxx  |   74 ++--
 sc/source/core/opencl/openclwrapper.hxx  |   16 -
 sc/source/core/tool/formulagroup.cxx |   20 -
 sc/source/core/tool/platforminfo.cxx |4 
 sc/source/ui/optdlg/calcoptionsdlg.cxx   |   18 -
 sc/source/ui/optdlg/calcoptionsdlg.hxx   |6 
 sc/source/ui/unoobj/docuno.cxx   |6 
 15 files changed, 700 insertions(+), 633 deletions(-)

New commits:
commit e3dc740c6973fa94d72362be9f1495f6fb8dd59b
Author: Kohei Yoshida 
Date:   Fri Oct 3 15:16:06 2014 -0400

Let's consistently spell OpenCL as 'OpenCL'.

Change-Id: I8bdcf0667b326b77d11001efeeefd5247987ebdc

diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx
index a063cdf..1ee0249 100644
--- a/sc/inc/formulagroup.hxx
+++ b/sc/inc/formulagroup.hxx
@@ -120,7 +120,7 @@ class SC_DLLPUBLIC FormulaGroupInterpreter
 
  public:
 static FormulaGroupInterpreter *getStatic();
-static void fillOpenCLInfo(std::vector& rPlatforms);
+static void fillOpenCLInfo(std::vector& rPlatforms);
 static bool switchOpenCLDevice(const OUString& rDeviceId, bool 
bAutoSelect, bool bForceEvaluation = false);
 static void enableOpenCL(bool bEnable);
 static void getOpenCLDeviceInfo(sal_Int32& rDeviceId, sal_Int32& 
rPlatformId);
diff --git a/sc/inc/platforminfo.hxx b/sc/inc/platforminfo.hxx
index 2c2e831..c7bb377 100644
--- a/sc/inc/platforminfo.hxx
+++ b/sc/inc/platforminfo.hxx
@@ -18,7 +18,7 @@
 
 namespace sc {
 
-struct SC_DLLPUBLIC OpenclDeviceInfo
+struct SC_DLLPUBLIC OpenCLDeviceInfo
 {
 void* device;
 OUString maName;
@@ -28,17 +28,17 @@ struct SC_DLLPUBLIC OpenclDeviceInfo
 size_t mnComputeUnits;
 size_t mnFrequency;
 
-OpenclDeviceInfo();
+OpenCLDeviceInfo();
 };
 
-struct SC_DLLPUBLIC OpenclPlatformInfo
+struct SC_DLLPUBLIC OpenCLPlatformInfo
 {
 void* platform;
 OUString maVendor;
 OUString maName;
-std::vector maDevices;
+std::vector maDevices;
 
-OpenclPlatformInfo();
+OpenCLPlatformInfo();
 };
 
 }
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx
index c23aa38..aab8fda 100644
--- a/sc/qa/unit/opencl-test.cxx
+++ b/sc/qa/unit/opencl-test.cxx
@@ -40,12 +40,12 @@ using namespace ::com::sun::star::uno;
 
 /* Implementation of Filters test */
 
-class ScOpenclTest
+class ScOpenCLTest
 : public test::FiltersTest
 , public ScBootstrapFixture
 {
 public:
-ScOpenclTest();
+ScOpenCLTest();
 
 /**
  * Try to auto-detect OpenCL device if one is available.
@@ -294,7 +294,7 @@ public:
 void testStatisticalFormulaStDevA1();
 void testStatisticalFormulaStDevPA1();
 void testFinancialMDurationFormula1();
-CPPUNIT_TEST_SUITE(ScOpenclTest);
+CPPUNIT_TEST_SUITE(ScOpenCLTest);
 CPPUNIT_TEST(testSharedFormulaXLS);
 CPPUNIT_TEST(testFinacialFormula);
 CPPUNIT_TEST(testStatisticalFormulaFisher);
@@ -526,7 +526,7 @@ private:
 uno::Reference m_xCalcComponent;
 };
 
-bool ScOpenclTest::load(const OUString &rFilter, const OUString &rURL,
+bool ScOpenCLTest::load(const OUString &rFilter, const OUString &rURL,
 const OUString &rUserData, unsigned int nFilterFlags,
 unsigned int nClipboardID, unsigned int nFilterVersion)
 {
@@ -539,18 +539,18 @@ bool ScOpenclTest::load(const OUString &rFilter, const 
OUString &rURL,
 return bLoaded;
 }
 
-bool ScOpenclTest::detectOpenCLDevice()
+bool ScOpenCLTest::detectOpenCLDevice()
 {
 sc::FormulaGroupInterpreter::enableOpenCL(true);
 return sc::FormulaGroupInterpreter::switchOpenCLDevice(OUString(),true);
 }
 
-void ScOpenclTest::enableOpenCL()
+void ScOpenCLTest::enableOpenCL()
 {
 sc::FormulaGroupInterpreter::enableOpenCL(true);
 }
 
-void ScOpenclTest::testCompilerHorizontal()
+void ScOpenCLTest::testCompilerHorizontal()
 {
 if (!detectOpenCLDevice())
 return;
@@ -578,7 +578,7 @@ void ScOpenclTest::testCompilerHorizontal()
 xDocSh->DoClose();
 xDocShRes->DoClose();
 }
-void ScOpenclTest::testCompilerNested()
+void ScOpenCLTest::testCompilerNested()
 {
 if (!detectOpenCLDevice())
 return;
@@ -601,7 +601,7 @@ void ScOpenclTest::testCompilerNested()
 xDocShRes->DoClose();
 }
 
-void ScOpenclTest::testCompilerString()
+void ScOpenCLTest::testCompilerString()
 {
 if (!detectOpenCLDevice())
 return;
@@ -630,7 +630,7 @@ void ScOpenclTest::testCompilerString()
 xDocShRes->DoClose();
 }
 
-void ScOpenclTest::testCompilerInEq()
+void ScOpenCLTest::testCompilerInEq()
 {
 if (!de

[Libreoffice-commits] core.git: 5 commits - formula/source include/formula sc/inc sc/qa sc/source

2014-10-03 Thread Kohei Yoshida
 formula/source/core/api/vectortoken.cxx  |   39 ++
 include/formula/vectortoken.hxx  |   16 -
 sc/inc/formulagroup.hxx  |2 
 sc/inc/platforminfo.hxx  |   10 
 sc/qa/unit/opencl-test.cxx   |  472 +++
 sc/source/core/opencl/formulagroupcl.cxx |   50 +--
 sc/source/core/opencl/opbase.cxx |  393 +++--
 sc/source/core/opencl/opbase.hxx |  207 -
 sc/source/core/opencl/openclwrapper.cxx  |   74 ++--
 sc/source/core/opencl/openclwrapper.hxx  |   16 -
 sc/source/core/tool/formulagroup.cxx |   20 -
 sc/source/core/tool/platforminfo.cxx |4 
 sc/source/ui/optdlg/calcoptionsdlg.cxx   |   18 -
 sc/source/ui/optdlg/calcoptionsdlg.hxx   |6 
 sc/source/ui/unoobj/docuno.cxx   |6 
 15 files changed, 700 insertions(+), 633 deletions(-)

New commits:
commit 27ebfb10e9fba1af3bfee86973a349168bd041b1
Author: Kohei Yoshida 
Date:   Fri Oct 3 15:16:06 2014 -0400

Let's consistently spell OpenCL as 'OpenCL'.

Change-Id: I8bdcf0667b326b77d11001efeeefd5247987ebdc

diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx
index a063cdf..1ee0249 100644
--- a/sc/inc/formulagroup.hxx
+++ b/sc/inc/formulagroup.hxx
@@ -120,7 +120,7 @@ class SC_DLLPUBLIC FormulaGroupInterpreter
 
  public:
 static FormulaGroupInterpreter *getStatic();
-static void fillOpenCLInfo(std::vector& rPlatforms);
+static void fillOpenCLInfo(std::vector& rPlatforms);
 static bool switchOpenCLDevice(const OUString& rDeviceId, bool 
bAutoSelect, bool bForceEvaluation = false);
 static void enableOpenCL(bool bEnable);
 static void getOpenCLDeviceInfo(sal_Int32& rDeviceId, sal_Int32& 
rPlatformId);
diff --git a/sc/inc/platforminfo.hxx b/sc/inc/platforminfo.hxx
index 2c2e831..c7bb377 100644
--- a/sc/inc/platforminfo.hxx
+++ b/sc/inc/platforminfo.hxx
@@ -18,7 +18,7 @@
 
 namespace sc {
 
-struct SC_DLLPUBLIC OpenclDeviceInfo
+struct SC_DLLPUBLIC OpenCLDeviceInfo
 {
 void* device;
 OUString maName;
@@ -28,17 +28,17 @@ struct SC_DLLPUBLIC OpenclDeviceInfo
 size_t mnComputeUnits;
 size_t mnFrequency;
 
-OpenclDeviceInfo();
+OpenCLDeviceInfo();
 };
 
-struct SC_DLLPUBLIC OpenclPlatformInfo
+struct SC_DLLPUBLIC OpenCLPlatformInfo
 {
 void* platform;
 OUString maVendor;
 OUString maName;
-std::vector maDevices;
+std::vector maDevices;
 
-OpenclPlatformInfo();
+OpenCLPlatformInfo();
 };
 
 }
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx
index c23aa38..aab8fda 100644
--- a/sc/qa/unit/opencl-test.cxx
+++ b/sc/qa/unit/opencl-test.cxx
@@ -40,12 +40,12 @@ using namespace ::com::sun::star::uno;
 
 /* Implementation of Filters test */
 
-class ScOpenclTest
+class ScOpenCLTest
 : public test::FiltersTest
 , public ScBootstrapFixture
 {
 public:
-ScOpenclTest();
+ScOpenCLTest();
 
 /**
  * Try to auto-detect OpenCL device if one is available.
@@ -294,7 +294,7 @@ public:
 void testStatisticalFormulaStDevA1();
 void testStatisticalFormulaStDevPA1();
 void testFinancialMDurationFormula1();
-CPPUNIT_TEST_SUITE(ScOpenclTest);
+CPPUNIT_TEST_SUITE(ScOpenCLTest);
 CPPUNIT_TEST(testSharedFormulaXLS);
 CPPUNIT_TEST(testFinacialFormula);
 CPPUNIT_TEST(testStatisticalFormulaFisher);
@@ -526,7 +526,7 @@ private:
 uno::Reference m_xCalcComponent;
 };
 
-bool ScOpenclTest::load(const OUString &rFilter, const OUString &rURL,
+bool ScOpenCLTest::load(const OUString &rFilter, const OUString &rURL,
 const OUString &rUserData, unsigned int nFilterFlags,
 unsigned int nClipboardID, unsigned int nFilterVersion)
 {
@@ -539,18 +539,18 @@ bool ScOpenclTest::load(const OUString &rFilter, const 
OUString &rURL,
 return bLoaded;
 }
 
-bool ScOpenclTest::detectOpenCLDevice()
+bool ScOpenCLTest::detectOpenCLDevice()
 {
 sc::FormulaGroupInterpreter::enableOpenCL(true);
 return sc::FormulaGroupInterpreter::switchOpenCLDevice(OUString(),true);
 }
 
-void ScOpenclTest::enableOpenCL()
+void ScOpenCLTest::enableOpenCL()
 {
 sc::FormulaGroupInterpreter::enableOpenCL(true);
 }
 
-void ScOpenclTest::testCompilerHorizontal()
+void ScOpenCLTest::testCompilerHorizontal()
 {
 if (!detectOpenCLDevice())
 return;
@@ -578,7 +578,7 @@ void ScOpenclTest::testCompilerHorizontal()
 xDocSh->DoClose();
 xDocShRes->DoClose();
 }
-void ScOpenclTest::testCompilerNested()
+void ScOpenCLTest::testCompilerNested()
 {
 if (!detectOpenCLDevice())
 return;
@@ -601,7 +601,7 @@ void ScOpenclTest::testCompilerNested()
 xDocShRes->DoClose();
 }
 
-void ScOpenclTest::testCompilerString()
+void ScOpenCLTest::testCompilerString()
 {
 if (!detectOpenCLDevice())
 return;
@@ -630,7 +630,7 @@ void ScOpenclTest::testCompilerString()
 xDocShRes->DoClose();
 }
 
-void ScOpenclTest::testCompilerInEq()
+void ScOpenCLTest::testCompilerInEq()
 {
 if (!de

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

2014-10-03 Thread Szymon Kłos
 svx/source/tbxctrls/tbcontrl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9a3ccbb69c9b4f2fb046d26d588fbe2521c99a52
Author: Szymon Kłos 
Date:   Fri Oct 3 18:59:19 2014 +0200

fdo#84620 : The styles drop down menu in Writer crashes LO.

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

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 193d9ad..f9bcf18 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -557,7 +557,7 @@ void SvxStyleBox_Impl::UserDraw( const UserDrawEvent& 
rUDEvt )
 {
 Rectangle aRect(rUDEvt.GetRect());
 unsigned int nId = (aRect.getY() / aRect.GetSize().Height());
-if(m_pButtons[nId])
+if(nId < MAX_STYLES_ENTRIES && m_pButtons[nId])
 m_pButtons[nId]->Hide();
 // draw the non-style entries, ie. "Clear Formatting" or "More..."
 DrawEntry( rUDEvt, true, true );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-03 Thread Szymon Kłos
 svx/source/tbxctrls/tbcontrl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 58cd14d597fbd02a3419ab829d677af13403b726
Author: Szymon Kłos 
Date:   Fri Oct 3 20:13:03 2014 +0200

fdo#84605 : fixed style editing from the style drop down menu

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

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index f9bcf18..4fbd806 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -347,8 +347,8 @@ void SvxStyleBox_Impl::ReleaseFocus()
 
 IMPL_LINK( SvxStyleBox_Impl, MenuSelectHdl, Menu*, pMenu)
 {
-ReleaseFocus();
 OUString sEntry = OUString( (GetEntry(GetSelectEntryPos())) );
+ReleaseFocus(); // It must be after getting entry pos!
 Sequence< PropertyValue > aArgs( 2 );
 aArgs[0].Name   = "Param";
 aArgs[0].Value  = makeAny( sEntry );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Crash test update

2014-10-03 Thread Miklos Vajna
New crashtest update available at 
http://dev-builds.libreoffice.org/crashtest/548b360c0e4693aac0cbdd2fcc1aab433fc54010/


exportCrashes.csv
Description: Binary data


importCrash.csv
Description: Binary data


validationErrors.csv
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2014-10-03 Thread Julien Nabet
 vcl/source/window/menu.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 24fb87501ef9d5aa715d572de7eb5efe49a0d9c3
Author: Julien Nabet 
Date:   Fri Oct 3 22:49:36 2014 +0200

Resolves fdo#84608: Right-click customize crashes LibO

Regression from 26f2da07b1c6074e519d28557a3d1d5518ff6cb4

Change-Id: I382c4686b5fff0c04bdb36f1859c8ea5b2424772

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 0a96f9f..582fdcb 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -775,7 +775,7 @@ void Menu::SetPopupMenu( sal_uInt16 nItemId, PopupMenu* 
pMenu )
 return;
 
 // same menu, nothing to do
-if ( dynamic_cast(pData->pSubMenu) == pMenu )
+if ( static_cast(pData->pSubMenu) == pMenu )
 return;
 
 // data exchange
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Node indexing/ordering inconsistency

2014-10-03 Thread Kartik Subbarao
I wanted to raise what might be a broader issue discovered while 
troubleshooting a bug:


https://www.libreoffice.org/bugzilla/show_bug.cgi?id=81012#c6

It appears that there are two different methods that 
SwNode::FindOutlineNodeOfLevel() (and functions that it calls) uses to 
determine the position of of a node:


1) GetIndex() (which seems to generally correlate with parsing order)
2) (pageframe)->Frm().Top() (absolute Y position in the document)

Bug 81012 seems to be related to the fact that GetIndex() doesn't return 
as expected for endnotes, and, that these two methods return divergent 
results.


This got me to thinking whether there might be other parts of the code 
that are relying on this kind of indexing/ordering, so I figured I would 
mention it here.


Regards,

-Kartik
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2014-10-03 Thread Chris Sherlock
 include/vcl/metric.hxx |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit f33002aa5de7e88960e7c21286a661c89fd478c7
Author: Chris Sherlock 
Date:   Sat Oct 4 13:29:56 2014 +1000

vcl: tab cleanup of metric.hxx

Change-Id: I7d168f89fc8cb1b5b85c78e260a9ed786a437265

diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx
index 6eb2da7..c22c553 100644
--- a/include/vcl/metric.hxx
+++ b/include/vcl/metric.hxx
@@ -128,23 +128,23 @@ class VCL_DLLPUBLIC TextRectInfo
 friend class ::OutputDevice;
 
 private:
-longmnMaxWidth;
+longmnMaxWidth;
 sal_uInt16  mnLineCount;
-boolmbEllipsis;
+boolmbEllipsis;
 
 public:
-TextRectInfo();
+TextRectInfo();
 
 sal_uInt16  GetLineCount() const { return mnLineCount; }
-longGetMaxLineWidth() const { return mnMaxWidth; }
-boolIsEllipses() const { return mbEllipsis; }
-
-booloperator ==( const TextRectInfo& rInfo ) const
-{ return ((mnMaxWidth   == rInfo.mnMaxWidth)&&
-  (mnLineCount  == rInfo.mnLineCount)   &&
-  (mbEllipsis   == rInfo.mbEllipsis)); }
-booloperator !=( const TextRectInfo& rInfo ) const
-{ return !(TextRectInfo::operator==( rInfo )); }
+longGetMaxLineWidth() const { return mnMaxWidth; }
+boolIsEllipses() const { return mbEllipsis; }
+
+booloperator ==( const TextRectInfo& rInfo ) const
+{ return ((mnMaxWidth   == rInfo.mnMaxWidth)&&
+  (mnLineCount  == rInfo.mnLineCount)   &&
+  (mbEllipsis   == rInfo.mbEllipsis)); }
+booloperator !=( const TextRectInfo& rInfo ) const
+{ return !(TextRectInfo::operator==( rInfo )); }
 };
 
 inline TextRectInfo::TextRectInfo()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-03 Thread Chris Sherlock
 vcl/inc/impfont.hxx |  125 ++--
 vcl/source/gdi/font.cxx |4 -
 2 files changed, 60 insertions(+), 69 deletions(-)

New commits:
commit d244a0c1af7e5448d46cfa3172bcee5799f38087
Author: Chris Sherlock 
Date:   Sat Oct 4 15:32:54 2014 +1000

vcl: remove FontRefCount typedef

There is honestly no real need for FontRefCount. I really cannot see
why this typedef was ever introduced into the codebase

Change-Id: Ifa24a95cf6c788b4b11a4425520a2f6bc0e61169

diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx
index 434db48..3c42f6e 100644
--- a/vcl/inc/impfont.hxx
+++ b/vcl/inc/impfont.hxx
@@ -31,8 +31,6 @@
 
 // - Impl_Font -
 
-typedef sal_uInt32 FontRefCount;
-
 class Impl_Font
 {
 public:
@@ -51,7 +49,7 @@ private:
 friend class vcl::Font;
 voidAskConfig();
 
-FontRefCountmnRefCount;
+sal_uInt32  mnRefCount;
 OUStringmaFamilyName;
 OUStringmaStyleName;
 SizemaSize;
@@ -98,7 +96,7 @@ private:
 longmnLineHeight;  // Ascent+Descent+EmphasisMark
 longmnSlant;   // Slant
 sal_uInt16  mnMiscFlags;   // Misc Flags
-FontRefCountmnRefCount;// Reference Counter
+sal_uInt32  mnRefCount;// Reference Counter
 
 enum { DEVICE_FLAG=1, SCALABLE_FLAG=2, LATIN_FLAG=4, CJK_FLAG=8, 
CTL_FLAG=16 };
 
@@ -194,7 +192,7 @@ private:
 const sal_uInt16*   mpGlyphIds;   // individual glyphid mappings
 int mnRangeCount;
 int mnCharCount;  // covered codepoints
-mutable FontRefCount mnRefCount;
+mutable sal_uInt32  mnRefCount;
 };
 
 // CmapResult is a normalized version of the many CMAP formats
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index 269527e..81270c0 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -234,7 +234,7 @@ Font::Font()
 
 Font::Font( const vcl::Font& rFont )
 {
-bool bRefIncrementable = rFont.mpImplFont->mnRefCount < 
::std::numeric_limits::max();
+bool bRefIncrementable = rFont.mpImplFont->mnRefCount < 
::std::numeric_limits::max();
 DBG_ASSERT( bRefIncrementable, "Font: RefCount overflow" );
 
 mpImplFont = rFont.mpImplFont;
@@ -565,7 +565,7 @@ void Font::SetWordLineMode( bool bWordLine )
 
 Font& Font::operator=( const vcl::Font& rFont )
 {
-bool bRefIncrementable = rFont.mpImplFont->mnRefCount < 
::std::numeric_limits::max();
+bool bRefIncrementable = rFont.mpImplFont->mnRefCount < 
::std::numeric_limits::max();
 DBG_ASSERT( bRefIncrementable, "Font: RefCount overflow" );
 
 // Increment RefCount first, so that we can reference ourselves
commit bcfa2ea2225875c53c9e8935ecc2740c3bc0db94
Author: Chris Sherlock 
Date:   Sat Oct 4 13:39:45 2014 +1000

vcl: tab cleanup of vcl/inc/impfont.hxx

Change-Id: I54f669cd4ba472744f013f157baa035519d052bf

diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx
index 5cd5d2a..434db48 100644
--- a/vcl/inc/impfont.hxx
+++ b/vcl/inc/impfont.hxx
@@ -36,10 +36,10 @@ typedef sal_uInt32 FontRefCount;
 class Impl_Font
 {
 public:
- Impl_Font();
- Impl_Font( const Impl_Font& );
+Impl_Font();
+Impl_Font( const Impl_Font& );
 
-bool operator==( const Impl_Font& ) const;
+booloperator==( const Impl_Font& ) const;
 
 FontPitch   GetPitch()  { if(mePitch==PITCH_DONTKNOW)
AskConfig(); return mePitch; }
 FontFamily  GetFamily() { if(meFamily==FAMILY_DONTKNOW)  
AskConfig(); return meFamily; }
@@ -91,36 +91,36 @@ class ImplFontMetric
 friend class ::OutputDevice;
 
 private:
-longmnAscent;  // Ascent
-longmnDescent; // Descent
-longmnIntLeading;  // Internal Leading
-longmnExtLeading;  // External Leading
-longmnLineHeight;  // Ascent+Descent+EmphasisMark
-longmnSlant;   // Slant
-sal_uInt16  mnMiscFlags;   // Misc Flags
-FontRefCount mnRefCount;// Reference Counter
+longmnAscent;  // Ascent
+longmnDescent; // Descent
+longmnIntLeading;  // Internal Leading
+longmnExtLeading;  // External Leading
+longmnLineHeight;  // Ascent+Descent+EmphasisMark
+longmnSlant;   // Slant
+sal_uInt16  mnMiscFlags;   // Misc Flags
+FontRefCountmnRefCount;// Reference Counter
 
 enum { DEVICE_FLAG=1, SCALABLE_FLAG=2, LATIN_FLAG=4, CJK_FLAG=8, 
CTL_FLAG=16 };
 
 public:
-ImplFontMetric();
-voidAddReference();
-voidDeReference();
-
-longGetAscent() const   { return mnAscent; }
-longGetDescent() const  { return mnDescent; }
-longGetIntLeading() const   { return mnIntLeading; }
-long

LibreOffice Gerrit News for core on 2014-10-04

2014-10-03 Thread gerrit
Moin!

* Open changes on master for project core changed in the last 25 hours:

 First time contributors doing great things! 
+ fdo#81356: convert Fraction to boost::rational - wip
  in https://gerrit.libreoffice.org/11551 from Juan Picca
  about module basctl, basic, chart2, connectivity, cui, dbaccess, desktop, 
drawinglayer, editeng, filter, forms, include, reportdesign, sc, sd, sfx2, 
starmath, svtools, svx, sw, toolkit, tools, vcl, writerfilter
+ scripting: line break (code formatting)
  in https://gerrit.libreoffice.org/11794 from Robert Antoni Buj i Gelonch
  about module scripting
+ fdo#71248 "Excel VBA: ActiveDocument is not tracking currently selected D
  in https://gerrit.libreoffice.org/11725 from Justin Luth
  about module sfx2, sw
+ fdo#84629 Inclusion of new tango icons for new toolbar buttons
  in https://gerrit.libreoffice.org/11790 from Yousuf Philips
  about module icon-themes
 End of freshness 

+ fdo#39468 Translate German Comments - difimp and htmlimp
  in https://gerrit.libreoffice.org/11802 from Christian M. Heller
  about module sc
+ vcl: Merge ImpFontCharMap with FontCharMap, use intrusive_ptr to manage
  in https://gerrit.libreoffice.org/11565 from Chris Sherlock
  about module cui, include, sc, starmath, svtools, svx, vcl
+ FDO#80652 (part) help for page CMIS file access
  in https://gerrit.libreoffice.org/11801 from Olivier Hallot
  about module svtools
+ make gbuild-to-ide VS files work with separate builddir
  in https://gerrit.libreoffice.org/11799 from Peter Foley
  about module bin
+ gbuild-to-ide improvments
  in https://gerrit.libreoffice.org/11797 from Peter Foley
  about module bin
+ gbuild-to-ide fixes
  in https://gerrit.libreoffice.org/11754 from Peter Foley
  about module build
+ fdo#58194 - export DOCX Automatic indent as firstLine indent
  in https://gerrit.libreoffice.org/10425 from Joren De Cuyper
  about module sw
+ fdo#65864: dont't traverse defs-nodes when in shape writing mode
  in https://gerrit.libreoffice.org/11793 from Christina Roßmanith
  about module filter
+ fdo#39468 Finish translating German comments in sw/source/core/inc
  in https://gerrit.libreoffice.org/11792 from Philipp Weissenbacher
  about module sw
+ logerrit: Simplify SSH config
  in https://gerrit.libreoffice.org/11788 from Mathieu Parent
  about module build
+ Handle ftp proxies
  in https://gerrit.libreoffice.org/11787 from Mathieu Parent
  about module ucb
+ remove SvRefBase::QueryDelete
  in https://gerrit.libreoffice.org/11786 from Noel Grandin
  about module connectivity, include, tools


* Merged changes on master for project core changed in the last 25 hours:

+ fdo#84605 : fixed style editing from the style drop down menu
  in https://gerrit.libreoffice.org/11800 from Szymon Kłos
+ fdo#84620 : The styles drop down menu in Writer crashes LO.
  in https://gerrit.libreoffice.org/11796 from Szymon Kłos
+ rename SvRef::AddRef to AddFirstRef
  in https://gerrit.libreoffice.org/11763 from Noel Grandin
+ collada2gltf: drop tr1 support
  in https://gerrit.libreoffice.org/11695 from Jan-Marek Glogowski
+ fdo#82577: Handle Time
  in https://gerrit.libreoffice.org/11684 from Noel Grandin
+ clean up some weird type-casting in SvxRTFParser
  in https://gerrit.libreoffice.org/11705 from Noel Grandin
+ CppunitTest_sw_mailmerge: enable on OS X
  in https://gerrit.libreoffice.org/11773 from Miklos Vajna
+ Speed up SwAttrIter::GetNextAttr()
  in https://gerrit.libreoffice.org/11784 from Matthew Francis
+ Fix unbalanced new/free() -> new/delete
  in https://gerrit.libreoffice.org/11785 from Matthew Francis
+ scripting: organize imports
  in https://gerrit.libreoffice.org/11768 from Robert Antoni Buj i Gelonch


* Abandoned changes on master for project core changed in the last 25 hours:

None

* Open changes needing tweaks, but being untouched for more than a week:

+ fdo#73151 Always open Styles&Formatting dialog in the sidebar
  in https://gerrit.libreoffice.org/11648 from Samuel Mehrbrodt
+ fdo#83003 Startcenter: No method for returnin Recent Docs
  in https://gerrit.libreoffice.org/11525 from Efe Gürkan Yalaman
+ fdo#82335.
  in https://gerrit.libreoffice.org/11555 from Sudarshan Rao
+ HIG-ification of GSoC Color Picker dialog
  in https://gerrit.libreoffice.org/11494 from Olivier Hallot
+ l10ntools-transex3: convert 'int' to 'bool' where it's logical
  in https://gerrit.libreoffice.org/11317 from Douglas Mencken
+ Perftest for loading autocorrect dictionaries (fdo#79761)
  in https://gerrit.libreoffice.org/11296 from Matúš Kukan
+ fdo#81956 : Rendering of vml group shape was wrong.
  in https://gerrit.libreoffice.org/11013 from sushil_shinde
+ fdo#79018: LO hangs while opening file.
  in https://gerrit.libreoffice.org/9564 from Yogesh Bharate
+ fdo#81426 : Data from header and footer is getting lost.
  in https://gerrit.libreoffice.org/10531 from Rajashri Udhoji
+ fdo#79541 :Corrupt: Shape  enclosed within a floating table
  in https://gerrit.libreoffice.org/9914 from Rajashri

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

2014-10-03 Thread Miklos Vajna
 writerfilter/source/dmapper/DomainMapper.cxx   |4 ++--
 writerfilter/source/dmapper/PropertyMap.cxx|   11 +--
 writerfilter/source/ooxml/model.xml|   10 +-
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |   14 +++---
 4 files changed, 19 insertions(+), 20 deletions(-)

New commits:
commit 34bfe4552d7e2e36805bc3d41982e9d9904a2f01
Author: Miklos Vajna 
Date:   Fri Oct 3 09:00:44 2014 +0200

Use constants for ST_SectionMark values

Change-Id: I3ac385b8f21409b5083b1224652283fec8bb2fa4

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 14b9971..4ef5e71 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1646,14 +1646,14 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, 
PropertyMapPtr rContext )
 // Ignore continuous section break at the end of the document, if 
the previous section had the same type as well
 // It makes the importer lose margin settings with no benefit
 SectionPropertyMap* pLastContext = 
m_pImpl->GetLastSectionContext();
-int nPrevBreakType = 0;
+int nPrevBreakType = NS_ooxml::LN_Value_ST_SectionMark_continuous;
 bool bHasPrevSection = false;
 if (pLastContext)
 {
 bHasPrevSection = true;
 nPrevBreakType = pLastContext->GetBreakType();
 }
-if (m_pImpl->GetParaSectpr() || nIntValue != 0 || (bHasPrevSection 
&& nPrevBreakType != nIntValue))
+if (m_pImpl->GetParaSectpr() || nIntValue != 
NS_ooxml::LN_Value_ST_SectionMark_continuous || (bHasPrevSection && 
nPrevBreakType != nIntValue))
 pSectionContext->SetBreakType( nIntValue );
 }
 break;
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index adf882e..a91f035 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1071,11 +1071,10 @@ void SectionPropertyMap::CloseSectionGroup( 
DomainMapper_Impl& rDM_Impl )
 }
 }
 
-// break type : 0 - No break 1 - New Column 2 - New page 3 - Even page 4 - 
odd page
 // depending on the break type no page styles should be created
 // If the section type is missing, but we have columns, then this should be
 // handled as a continuous section break.
-if(m_nBreakType == 0 || (m_nBreakType == -1 && m_nColumnCount > 0))
+if(m_nBreakType == NS_ooxml::LN_Value_ST_SectionMark_continuous || 
(m_nBreakType == -1 && m_nColumnCount > 0))
 {
 //todo: insert a section or access the already inserted section
 uno::Reference< beans::XPropertySet > xSection =
@@ -1106,7 +1105,7 @@ void SectionPropertyMap::CloseSectionGroup( 
DomainMapper_Impl& rDM_Impl )
 // If the section is of type "New column" (0x01), then simply insert a 
column break.
 // But only if there actually are columns on the page, otherwise a column 
break
 // seems to be handled like a page break by MSO.
-else if(m_nBreakType == 1 && m_nColumnCount > 0 )
+else if(m_nBreakType == NS_ooxml::LN_Value_ST_SectionMark_nextColumn && 
m_nColumnCount > 0 )
 {
 uno::Reference< beans::XPropertySet > xRangeProperties;
 if( m_xStartingRange.is() )
@@ -1253,7 +1252,7 @@ void SectionPropertyMap::CloseSectionGroup( 
DomainMapper_Impl& rDM_Impl )
 // Handle page breaks with odd/even page numbering. We need to 
use an extra page style for setting the page style
 // to left/right, because if we set it to the normal style, 
we'd set it to "First Page"/"Default Style", which would
 // break them (all default pages would be only left or right).
-if (m_nBreakType == 3 || m_nBreakType == 4)
+if (m_nBreakType == NS_ooxml::LN_Value_ST_SectionMark_evenPage 
|| m_nBreakType == NS_ooxml::LN_Value_ST_SectionMark_oddPage)
 {
 OUString* pageStyle = m_bTitlePage ? 
&m_sFirstPageStyleName : &m_sFollowPageStyleName;
 OUString evenOddStyleName = 
lcl_FindUnusedPageStyleName(rDM_Impl.GetPageStyles()->getElementNames());
@@ -1275,9 +1274,9 @@ void SectionPropertyMap::CloseSectionGroup( 
DomainMapper_Impl& rDM_Impl )
 evenOddStyle->setPropertyValue("FooterIsOn", 
uno::makeAny(sal_False));
 CopyHeaderFooter( pageProperties, evenOddStyle );
 *pageStyle = evenOddStyleName; // And use it instead of 
the original one (which is set as follow of this one).
-if (m_nBreakType == 3)
+if (m_nBreakType == 
NS_ooxml::LN_Value_ST_SectionMark_evenPage)
 
evenOddStyle->setPropertyValue(rPropNameSupplier.GetName(PROP_PAGE_STYLE_LAYOUT),
 uno::makeAny(style::PageStyleLayout_LEFT));
-  

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

2014-10-03 Thread Tor Lillqvist
 external/boost/boost.random.Wshadow.warnings.patch |   96 +
 1 file changed, 96 insertions(+)

New commits:
commit 54ae614e3f5fc86ca774126e74ef75ea877b13bd
Author: Tor Lillqvist 
Date:   Fri Oct 3 09:59:34 2014 +0300

WaE: -Wshadow

Change-Id: I3a9e01237d8cade5d99955f02c01c25618ccd9de

diff --git a/external/boost/boost.random.Wshadow.warnings.patch 
b/external/boost/boost.random.Wshadow.warnings.patch
index c2e39d3..17c0f59 100644
--- a/external/boost/boost.random.Wshadow.warnings.patch
+++ b/external/boost/boost.random.Wshadow.warnings.patch
@@ -129,6 +129,19 @@
  
 --- foo/foo/foo/boost/random/subtract_with_carry.hpp
 +++ foo/foo/foo/boost/random/subtract_with_carry.hpp
+@@ -249,10 +249,10 @@
+  * Returns true if the two generators will produce identical
+  * sequences of values.
+  */
+-BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(subtract_with_carry_engine, x, y)
++BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(subtract_with_carry_engine, x_arg, 
y_arg)
+ {
+ for(unsigned int j = 0; j < r; ++j)
+-if(x.compute(j) != y.compute(j))
++if(x_arg.compute(j) != y_arg.compute(j))
+ return false;
+ return true;
+ }
 @@ -268,21 +268,21 @@
  
  friend struct detail::subtract_with_carry_discard;
@@ -156,6 +169,19 @@
  }
  /// \endcond
  
+@@ -483,10 +483,10 @@
+ }
+ 
+ /** Returns true if the two generators will produce identical sequences. 
*/
+-BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(subtract_with_carry_01_engine, x, y)
++BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(subtract_with_carry_01_engine, 
x_arg, y_arg)
+ {
+ for(unsigned int j = 0; j < r; ++j)
+-if(x.compute(j) != y.compute(j))
++if(x_arg.compute(j) != y_arg.compute(j))
+ return false;
+ return true;
+ }
 @@ -498,17 +498,17 @@
  
  friend struct detail::subtract_with_carry_discard;
@@ -179,3 +205,73 @@
  }
  /// \endcond
  std::size_t k;
+--- misc/boost_1_44_0/boost/random/lagged_fibonacci.hpp
 misc/build/boost_1_44_0/boost/random/lagged_fibonacci.hpp
+@@ -148,8 +148,8 @@
+ BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, lagged_fibonacci_engine, f)
+ {
+ os << f.i;
+-for(unsigned int i = 0; i < f.long_lag; ++i)
+-os << ' ' << f.x[i];
++for(unsigned int i_index = 0; i_index < f.long_lag; ++i_index)
++os << ' ' << f.x[i_index];
+ return os;
+ }
+ 
+@@ -159,17 +159,17 @@
+ BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, lagged_fibonacci_engine, f)
+ {
+ is >> f.i >> std::ws;
+-for(unsigned int i = 0; i < f.long_lag; ++i)
+-is >> f.x[i] >> std::ws;
++for(unsigned int i_index = 0; i_index < f.long_lag; ++i_index)
++is >> f.x[i_index] >> std::ws;
+ return is;
+ }
+ 
+ /**
+  * Returns true if the two generators will produce identical
+  * sequences of outputs.
+  */
+-BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(lagged_fibonacci_engine, x, y)
+-{ return x.i == y.i && std::equal(x.x, x.x+long_lag, y.x); }
++BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(lagged_fibonacci_engine, x_arg, 
y_arg)
++{ return x_arg.i == y_arg.i && std::equal(x_arg.x, x_arg.x+long_lag, 
y_arg.x); }
+ 
+ /**
+  * Returns true if the two generators will produce different
+@@ -359,8 +359,8 @@
+ using std::pow;
+ os << f.i;
+ std::ios_base::fmtflags oldflags = os.flags(os.dec | os.fixed | 
os.left); 
+-for(unsigned int i = 0; i < f.long_lag; ++i)
+-os << ' ' << f.x[i] * f.modulus();
++for(unsigned int i_index = 0; i_index < f.long_lag; ++i_index)
++os << ' ' << f.x[i_index] * f.modulus();
+ os.flags(oldflags);
+ return os;
+ }
+@@ -371,10 +371,10 @@
+ BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, lagged_fibonacci_01_engine, f)
+ {
+ is >> f.i;
+-for(unsigned int i = 0; i < f.long_lag; ++i) {
++for(unsigned int i_index = 0; i_index < f.long_lag; ++i_index) {
+ typename lagged_fibonacci_01_engine::result_type value;
+ is >> std::ws >> value;
+-f.x[i] = value / f.modulus();
++f.x[i_index] = value / f.modulus();
+ }
+ return is;
+ }
+@@ -383,8 +383,8 @@
+  * Returns true if the two generators will produce identical
+  * sequences of outputs.
+  */
+-BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(lagged_fibonacci_01_engine, x, y)
+-{ return x.i == y.i && std::equal(x.x, x.x+long_lag, y.x); }
++BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(lagged_fibonacci_01_engine, x_arg, 
y_arg)
++{ return x_arg.i == y_arg.i && std::equal(x_arg.x, x_arg.x+long_lag, 
y_arg.x); }
+ 
+ /**
+  * Returns true if the two generators will produce different
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.f

[Bug 79641] LibreOffice 4.4 most annoying bugs

2014-10-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79641
Bug 79641 depends on bug 84617, which changed state.

Bug 84617 Summary: Crash on text selection
https://bugs.freedesktop.org/show_bug.cgi?id=84617

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sal/osl

2014-10-03 Thread Matthew J . Francis
 sal/osl/unx/thread.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 794e5c7a3f4292ac849ca993c12c7953b5e85102
Author: Matthew J. Francis 
Date:   Fri Oct 3 14:29:12 2014 +0800

Fix unbalanced new/free() -> new/delete

(Spotted while valgrinding an unrelated issue)

Change-Id: I2eab4c08e251d79f427fd01442c4dce20d7d89f0
Reviewed-on: https://gerrit.libreoffice.org/11785
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx
index f23f55b..f681175 100644
--- a/sal/osl/unx/thread.cxx
+++ b/sal/osl/unx/thread.cxx
@@ -166,7 +166,7 @@ static void osl_thread_destruct_Impl (Thread_Impl ** ppImpl)
 pthread_cond_destroy  (&((*ppImpl)->m_Cond));
 pthread_mutex_destroy (&((*ppImpl)->m_Lock));
 
-free (*ppImpl);
+delete *ppImpl;
 (*ppImpl) = 0;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: OASIS JIRA report | Proposal: hint for complex content

2014-10-03 Thread Miklos Vajna
Hi Regina,

On Fri, Oct 03, 2014 at 12:02:29AM +0200, Regina Henschel 
 wrote:
>  It is not about
> >custom shapes, with this we can attach a textframe to drawinglayer
> >shapes, so we can have tables, redlining, etc. in shapes.
> 
> That is the implementation side. In ODF1.2 file format, shapes have
> child  which has child , which has child
>  or  a.o. So "complex" text is possible
> without anything in addition.

You mean you're aware of any other ODF implementation that already
supports shapes with complex content, like the "rectangle with rounded
corners, containing a table" example?

> Till now it is not obvious to me, why this information needs to be
> in the file format. Couldn't it be detected when parsing on opening?

Regarding the implementation: the proposed "complex" shapes use the
SwNodes array to store the document model and the sw layout to render
the content, while non-complex shapes are rendered by editeng. Both have
features which are missing from the other engine. *Before* the text of
the shape is read, we want to know which type of document model to
populate.

Regarding ODF: at the moment ODF requires that the shape text be simple
-- the draw-text define in the .rng schema says that only text-p and
text-list is allowed. This means that an ODF implementation can use a
much simpler engine for shape text rendering, compared to what is
required to render the normal text content of a .odt file.

The text-content define describes all these additional features,
table-table is one such example. If we would propose to allow
table-table in shape text without an extra attribute, then implementers
could be worried about adding too much features to the shape text
engine, which would slow down the handling of simple content, which
would be only draw-text.

So the idea is to add a new boolean attribute, and only use complex
content in that case -- so at import time implementations can decide
what engine to use for handling the content.

> And would LibreOffice not show the  element of the shape,
> when it is "complex" but not marked as such? You cannot expect that
> another producer will write such attribute, because "complex" shape
> text is already possible yet, without having such attribute.

The new boolean attribute is completely optional. If it's missing, then
LO will use editeng to handle the shape text, just like before. If the
new attribute is present and it's true, then LO Writer will use SwNodes
to handle the content of the shape, which allows features like having a
table in a shape text.

> No, I do not know, whether any application writes the attribute
> draw:engine. I would expect it for MS Office 365 or MS Office 2013,
> but I haven't got one to test it.

I created a shape containing a table in Word 2013 and saved it as .odt.
The 2x2 table is written as:

  A1
  B1
  A2
  B2

I.e. the complex content (the table) is lost during export. I can
understand this, they didn't want to spend time on extending ODF to
their needs, and this is probably the best you can do with ODF 1.2.

Sounds like one more argument showing that we need to do some extending
to allow this. :-)

> But from its description, "The
> draw:engine attribute specifies the name of a specific rendering
> engine that can be used to render a custom shape." it would do
> exactly what you want - only, that it is currently only usable for
> custom-shapes.

If you grep for ENGINE in xmloff, then you'll see that draw:engine is
already used by LO, to persist the CustomShapeEngine UNO property of the
shape. I did not check in detail, but I expect that this is more about
how the attributes and child nodes of  get
handled. I guess that's why Andras asked if you are aware of any
existing document using this attribute, that would help.

> And are you really going to implement the new engine for arbitrary shapes?

Not "going to", this is all already implemented in master, see the draft
.
 ;-)

> BTW, the example 
> http://cgit.freedesktop.org/libreoffice/core/tree/sw/qa/extras/odfexport/data/textbox-rounded-corners.odt
> from the blog post is not valid, because  is not
> allowed as child of .

Indeed. I guess I'll just make the sw ODF filter write 
inside shapes for now, then we'll need a next ODF proposal to allow
 inside shape text (possibly saying "an ODF reader can
expect that this child element only appears when style:complex-content
is true").

In any case, any constructive input is welcome on how to better
represent the "shape with a TextBox" feature in ODF. Till 4.4 is
released, we can still modify that without worrying about backwards
compatibility. :-)

Thanks,

Miklos


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


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

2014-10-03 Thread Matthew J . Francis
 sw/source/core/text/itratr.cxx |   16 
 1 file changed, 12 insertions(+), 4 deletions(-)

New commits:
commit 7f5ed8228290e6e9ca9fac301d6a6adbda31ff23
Author: Matthew J. Francis 
Date:   Fri Oct 3 11:27:20 2014 +0800

Speed up SwAttrIter::GetNextAttr()

The inner loop which iterates over the characters of
m_pTxtNode->GetTxt() is already bounded to the length of the
string, so there's no need to pay the price of checking its length
for each array position

Change-Id: I7674ea2b46db75fea30dd016b96ec932068fd73b
Reviewed-on: https://gerrit.libreoffice.org/11784
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 3c4451c..a66618f 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -306,11 +306,19 @@ sal_Int32 SwAttrIter::GetNextAttr( ) const
 // TODO maybe use hints like FieldHints for this instead of looking at 
the text...
 const sal_Int32 l = nNextLen() ? nNext : 
m_pTxtNode->Len();
 sal_Int32 p=nPos;
-while (pGetTxt()[p] != CH_TXT_ATR_FIELDSTART
-   && m_pTxtNode->GetTxt()[p] != CH_TXT_ATR_FIELDEND
-   && m_pTxtNode->GetTxt()[p] != CH_TXT_ATR_FORMELEMENT)
+const sal_Unicode* aStr = m_pTxtNode->GetTxt().getStr();
+while (p CH_TXT_ATR_FIELDEND)
+{
+++p;
+}
+else
+{
+break;
+}
 }
 if ((pnPos) || nNext<=p)
 nNext=p;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - writerfilter/source

2014-10-03 Thread Jan-Marek Glogowski
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 5401e1b618a59c4a4df7fa073b4a5f481bd1ede7
Author: Jan-Marek Glogowski 
Date:   Fri Oct 3 01:42:13 2014 +0200

Don't assign NULL to boost::shared_ptr

This is already done by the constructor.

Fixes the libreoffic-4-3 build on Ubuntu 12.04.

Change-Id: I7bbec905c0d1efb5670c61c975f36f2e37a74cac
Reviewed-on: https://gerrit.libreoffice.org/11778
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 075a3fa..23b976b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3288,7 +3288,8 @@ void DomainMapper_Impl::CloseFieldCommand()
 dmapper_logger->element("closeFieldCommand");
 #endif
 
-FieldContextPtr pContext = m_aFieldStack.empty() ? NULL : 
m_aFieldStack.top();
+FieldContextPtr pContext;
+if (!m_aFieldStack.empty()) pContext = m_aFieldStack.top();
 OSL_ENSURE( pContext.get(), "no field context available");
 if( pContext.get() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sd/source

2014-10-03 Thread Tor Lillqvist
 sd/source/ui/docshell/docshel4.cxx |   22 ++
 1 file changed, 22 insertions(+)

New commits:
commit 18b9cb260a5ec358f6a7b73362bbc306af0417b1
Author: Tor Lillqvist 
Date:   Thu Oct 2 16:52:54 2014 +0300

bnc#657899: Paragraph vertical spacing differs from PowerPoint

We need to set the "paragraph summation" flag also for .pptx import. (As is
already done for .ppt import.)

This is what in the Options (Preferences) UI is called "Add spacing between
paragraphs and tables (in current document)", on the LibreOffice
Impress:General page. This is a setting that when set becomes local to the
document. I actually don't really understand why this needs to be a
user-visible option, wouldn't it be enough for it to be an internal flag 
that
is set for documents imported from .ppt and .pptx, and is clear otherwise?

Change-Id: I525178957276e7d587b6ac4be8ae7919fc245a27
(cherry picked from commit 96d210bf9ca0a99fc8256d6e0a4952207cce69e0)
Signed-off-by: Andras Timar 

diff --git a/sd/source/ui/docshell/docshel4.cxx 
b/sd/source/ui/docshell/docshel4.cxx
index 654d6a8..952d307 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -24,6 +24,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -378,6 +380,26 @@ bool DrawDocShell::LoadFrom( SfxMedium& rMedium )
 bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
 uno::Reference const& xInsertPosition)
 {
+const OUString aFilterName( rMedium.GetFilter()->GetFilterName() );
+if( aFilterName == "Impress MS PowerPoint 2007 XML" ||
+aFilterName == "Impress MS PowerPoint 2007 XML AutoPlay" )
+{
+// As this is a MSFT format, we should use the "MS Compat"
+// mode for spacing before and after paragraphs.
+
+// This is copied from what is done for .ppt import in
+// ImplSdPPTImport::Import() in sd/source/filter/ppt/pptin.cxx
+// in. We need to tell both the edit engine of the draw outliner,
+// and the document, to do "summation of paragraphs".
+SdrOutliner& rOutl = mpDoc->GetDrawOutliner();
+sal_uInt32 nControlWord = rOutl.GetEditEngine().GetControlWord();
+nControlWord |=  EE_CNTRL_ULSPACESUMMATION;
+nControlWord &=~ EE_CNTRL_ULSPACEFIRSTPARA;
+((EditEngine&)rOutl.GetEditEngine()).SetControlWord( nControlWord );
+
+mpDoc->SetSummationOfParagraphs( true );
+}
+
 const bool bRet = SfxObjectShell::ImportFrom(rMedium, xInsertPosition);
 
 SfxItemSet* pSet = rMedium.GetItemSet();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-03 Thread Tor Lillqvist
 sd/source/ui/docshell/docshel4.cxx |   22 ++
 1 file changed, 22 insertions(+)

New commits:
commit 8f8f7e944a0fce6d240550453696de3a78791204
Author: Tor Lillqvist 
Date:   Thu Oct 2 16:52:54 2014 +0300

bnc#657899: Paragraph vertical spacing differs from PowerPoint

We need to set the "paragraph summation" flag also for .pptx import. (As is
already done for .ppt import.)

This is what in the Options (Preferences) UI is called "Add spacing between
paragraphs and tables (in current document)", on the LibreOffice
Impress:General page. This is a setting that when set becomes local to the
document. I actually don't really understand why this needs to be a
user-visible option, wouldn't it be enough for it to be an internal flag 
that
is set for documents imported from .ppt and .pptx, and is clear otherwise?

(cherry picked from commit 96d210bf9ca0a99fc8256d6e0a4952207cce69e0)
Signed-off-by: Andras Timar 

Conflicts:
sd/source/ui/docshell/docshel4.cxx

Change-Id: I525178957276e7d587b6ac4be8ae7919fc245a27

diff --git a/sd/source/ui/docshell/docshel4.cxx 
b/sd/source/ui/docshell/docshel4.cxx
index 91370cb..66df3ed 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -24,6 +24,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -380,6 +382,26 @@ sal_Bool DrawDocShell::LoadFrom( SfxMedium& rMedium )
 bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
 uno::Reference const& xInsertPosition)
 {
+const OUString aFilterName( rMedium.GetFilter()->GetFilterName() );
+if( aFilterName == "Impress MS PowerPoint 2007 XML" ||
+aFilterName == "Impress MS PowerPoint 2007 XML AutoPlay" )
+{
+// As this is a MSFT format, we should use the "MS Compat"
+// mode for spacing before and after paragraphs.
+
+// This is copied from what is done for .ppt import in
+// ImplSdPPTImport::Import() in sd/source/filter/ppt/pptin.cxx
+// in. We need to tell both the edit engine of the draw outliner,
+// and the document, to do "summation of paragraphs".
+SdrOutliner& rOutl = mpDoc->GetDrawOutliner();
+sal_uInt32 nControlWord = rOutl.GetEditEngine().GetControlWord();
+nControlWord |=  EE_CNTRL_ULSPACESUMMATION;
+nControlWord &=~ EE_CNTRL_ULSPACEFIRSTPARA;
+((EditEngine&)rOutl.GetEditEngine()).SetControlWord( nControlWord );
+
+mpDoc->SetSummationOfParagraphs( true );
+}
+
 const sal_Bool bRet = SfxObjectShell::ImportFrom(rMedium, xInsertPosition);
 
 SfxItemSet* pSet = rMedium.GetItemSet();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 14 commits - accessibility/source filter/source framework/source idlc/source sal/rtl sd/source svtools/source sw/source vcl/generic vcl/source

2014-10-03 Thread Caolán McNamara
 accessibility/source/extended/AccessibleGridControlHeader.cxx |5 -
 filter/source/msfilter/msdffimp.cxx   |4 -
 framework/source/fwe/classes/addonsoptions.cxx|3 
 idlc/source/parser.y  |6 -
 sal/rtl/strtmpl.cxx   |   37 --
 sd/source/ui/view/DocumentRenderer.cxx|4 -
 svtools/source/uno/treecontrolpeer.cxx|3 
 sw/source/filter/writer/writer.cxx|9 +-
 sw/source/filter/ww8/ww8par5.cxx  |   10 +-
 sw/source/uibase/shells/grfsh.cxx |4 -
 vcl/generic/fontmanager/fontmanager.cxx   |4 -
 vcl/generic/print/genprnpsp.cxx   |4 -
 vcl/source/gdi/pngread.cxx|2 
 13 files changed, 47 insertions(+), 48 deletions(-)

New commits:
commit adf74f8287a626d5dbd40a65c87cc79702b482fb
Author: Caolán McNamara 
Date:   Thu Oct 2 21:06:37 2014 +0100

coverity#1241327 Dereference after null check

Change-Id: I214884e9ee1d49dcc4db71f8744513468b912691

diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx
index a990159..71a2fb2 100644
--- a/sal/rtl/strtmpl.cxx
+++ b/sal/rtl/strtmpl.cxx
@@ -1375,24 +1375,22 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newFromLiteral )( 
IMPL_RTL_STRINGDATA** ppThi
 
 *ppThis = IMPL_RTL_STRINGNAME( ImplAlloc )( nLen + allocExtra );
 assert( *ppThis != NULL );
-if ( (*ppThis) )
+
+(*ppThis)->length = nLen; // fix after possible allocExtra != 0
+(*ppThis)->buffer[nLen] = 0;
+IMPL_RTL_STRCODE* pBuffer = (*ppThis)->buffer;
+sal_Int32 nCount;
+for( nCount = nLen; nCount > 0; --nCount )
 {
-(*ppThis)->length = nLen; // fix after possible allocExtra != 0
-(*ppThis)->buffer[nLen] = 0;
-IMPL_RTL_STRCODE* pBuffer = (*ppThis)->buffer;
-sal_Int32 nCount;
-for( nCount = nLen; nCount > 0; --nCount )
-{
-/* Check ASCII range */
-SAL_WARN_IF( ((unsigned char)*pCharStr) > 127, "rtl.string",
-"rtl_uString_newFromLiteral - Found char > 127" );
-SAL_WARN_IF( ((unsigned char)*pCharStr) == '\0', "rtl.string",
-"rtl_uString_newFromLiteral - Found embedded \\0 
character" );
-
-*pBuffer = *pCharStr;
-pBuffer++;
-pCharStr++;
-}
+/* Check ASCII range */
+SAL_WARN_IF( ((unsigned char)*pCharStr) > 127, "rtl.string",
+"rtl_uString_newFromLiteral - Found char > 127" );
+SAL_WARN_IF( ((unsigned char)*pCharStr) == '\0', "rtl.string",
+"rtl_uString_newFromLiteral - Found embedded \\0 
character" );
+
+*pBuffer = *pCharStr;
+pBuffer++;
+pCharStr++;
 }
 
 RTL_LOG_STRING_NEW( *ppThis );
commit 898cb8b726128c98e44539ca3c24e72ceb1742c6
Author: Caolán McNamara 
Date:   Thu Oct 2 21:04:58 2014 +0100

coverity#982268 Copy-paste error

Change-Id: I68e8e6a564356bae620647b385e16279ff212d32

diff --git a/idlc/source/parser.y b/idlc/source/parser.y
index e06b967..c239fba 100644
--- a/idlc/source/parser.y
+++ b/idlc/source/parser.y
@@ -2153,9 +2153,9 @@ at_least_one_scoped_name :
 $$ = $2;
 } else
 {
-StringList* pNames = new StringList();
-pNames->push_back(*$1);
-$$ = pNames;
+StringList* pScopedNames = new StringList();
+pScopedNames->push_back(*$1);
+$$ = pScopedNames;
 }
 delete($1);
 }
commit 9a65df25138750915f9c6e1e1fa09988a2d11434
Author: Caolán McNamara 
Date:   Thu Oct 2 21:00:22 2014 +0100

coverity#1078526 Logically dead code

Change-Id: I203511fcb1e740d7d371821d49a7c13a72e6fc3b

diff --git a/framework/source/fwe/classes/addonsoptions.cxx 
b/framework/source/fwe/classes/addonsoptions.cxx
index 27891a4..550112c 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -1451,8 +1451,7 @@ AddonsOptions_Impl::ImageEntry* 
AddonsOptions_Impl::ReadImageData( const OUStrin
 
 SubstituteVariables( aImageURL );
 
-pEntry->addImage(i == OFFSET_IMAGES_SMALL ? IMGSIZE_SMALL : 
IMGSIZE_BIG,
- Image(), aImageURL);
+pEntry->addImage(IMGSIZE_BIG, Image(), aImageURL);
 }
 }
 
commit c7ee74cedaaac2951849852546d653ee8c4c4135
Author: Caolán McNamara 
Date:   Thu Oct 2 20:56:39 2014 +0100

coverity#1093225 Dereference after null check

Change-Id: I34a7b79b4a7b5d86c3d39fd995ed3bd998eeeab8

diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index 8a17b16..2bbfede 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -1619,6 +1619,8 @@ void PNGR

Re: Minutes of the Design Hangout: 2014-10-01

2014-10-03 Thread Caolán McNamara
On Thu, 2014-10-02 at 07:39 -0500, Adolfo Jayme Barrientos wrote:
> > * New Color Picker (Samuel)
> >
> > + Who's going to finish it?
> 
> there's a horrible bug with .ui-based
> popups (in Windows at least) that causes them to be positioned very
> far from their correct place.

Is this fixed by...

commit 7d860f6134654c2f46ceebb1ca1a792c143af795
Author: Maxim Monastirsky 
Date:   Sun Sep 21 16:06:52 2014 +0300

WB_OWNERDRAWDECORATION is needed by toolbar popups

Can be tested with the new color popup. Without this
change it keeps itself on top of other windows, and
even if the main window lost focus. Also for some vcl
plugins the popup have a wrong placement.

Change-Id: Ibf4216683ce2c58a1b919cdb63eda964a764eefd

or is it still a problem in master right now?

C.

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


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - translations

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

New commits:
commit ea3f45b7085c875d6da4f6c020804e121e6711b6
Author: Andras Timar 
Date:   Fri Oct 3 10:25:28 2014 +0200

Updated core
Project: translations  3f6da2afc8cd96d196fab9a9c33f3755f2c38225

diff --git a/translations b/translations
index 7c998fb..3f6da2a 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 7c998fb6c4688730bb292c92e90be08c5d4e10ad
+Subproject commit 3f6da2afc8cd96d196fab9a9c33f3755f2c38225
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: Branch 'distro/collabora/cp-4.2' - source/ar source/br source/ca source/cs source/de source/en-GB source/es source/et source/fi source/fr source/ja source/lv so

2014-10-03 Thread Andras Timar
 source/ar/cui/uiconfig/ui.po   |   
10 
 source/br/sc/source/ui/miscdlgs.po |   
19 
 source/br/scaddins/source/analysis.po  |   
10 
 source/br/sfx2/source/dialog.po|   
 6 
 source/ca/sfx2/source/control.po   |   
10 
 source/cs/instsetoo_native/inc_openoffice/windows/msi_languages.po |   
 6 
 source/de/cui/uiconfig/ui.po   |   
14 
 source/de/formula/source/core/resource.po  |   
44 
 source/de/helpcontent2/source/text/shared/guide.po |   
10 
 source/de/instsetoo_native/inc_openoffice/windows/msi_languages.po |   
10 
 source/de/librelogo/source/pythonpath.po   |   
14 
 source/de/sw/uiconfig/swriter/ui.po|   
 6 
 source/en-GB/editeng/source/editeng.po |   
12 
 source/en-GB/padmin/source.po  |   
 8 
 source/en-GB/scaddins/source/pricing.po|   
10 
 source/en-GB/scp2/source/accessories.po|   
21 
 source/en-GB/sfx2/source/dialog.po |   
 8 
 source/en-GB/sfx2/uiconfig/ui.po   |   
10 
 source/en-GB/svx/source/unodialogs/textconversiondlgs.po   |   
 9 
 source/en-GB/sw/source/ui/config.po|   
12 
 source/en-GB/sw/source/ui/inc.po   |   
14 
 source/es/basctl/source/basicide.po|   
 6 
 source/es/cui/source/dialogs.po|   
 6 
 source/es/dbaccess/source/ui/dlg.po|   
 6 
 source/es/extensions/source/update/check.po|   
 6 
 source/es/sc/source/ui/src.po  |   
 8 
 source/es/sc/uiconfig/scalc/ui.po  |   
12 
 source/es/sfx2/source/dialog.po|   
 6 
 source/es/sfx2/source/doc.po   |   
10 
 source/es/svx/source/stbctrls.po   |   
12 
 source/es/sw/source/core/undo.po   |   
 8 
 source/es/sw/uiconfig/swriter/ui.po|   
 8 
 source/es/swext/mediawiki/help.po  |   
 8 
 source/es/uui/source.po|   
12 
 source/es/vcl/source/src.po|   
 6 
 source/es/wizards/source/euro.po   |   
10 
 source/es/wizards/source/formwizard.po |   
 8 
 source/es/wizards/source/importwizard.po   |   
16 
 source/et/sc/source/ui/src.po  |   
10 
 source/fi/sw/source/ui/inc.po  |   
15 
 source/fi/sw/uiconfig/swriter/ui.po|   
12 
 source/fr/sd/uiconfig/sdraw/ui.po  |   
 6 
 source/fr/sfx2/uiconfig/ui.po  |   
10 
 source/ja/helpcontent2/source/text/shared/00.po|   
10 
 source/ja/sc/uiconfig/scalc/ui.po  |   
14 
 source/ja/svx/uiconfig/ui.po   |   
12 
 source/lv/svx/source/sidebar/paragraph.po  |   
15 
 source/nb/librelogo/source/pythonpath.po   |   
 8 
 source/nb/scaddins/source/pricing.po   |   
10 
 source/nb/sw/source/ui/inc.po  |   
14 
 source/nl/connectivity/registry/evoab2/org/openoffice/Office/DataAccess.po |   
 6 
 source/nl/cui/source/options.po|   
 8 
 source/nl/cui/uiconfig/ui.po   |   
 8 
 source/nl/dbaccess/uiconfig/ui.po  |   
10 
 source/nl/extensions/source/abpilot.po |   
13 
 source/nl/officecfg/registry/data/org/openoffice/Office/UI.po  |   
 8 
 source/nl/readlicense_oo/docs.po   |   
12 
 source/nl/sc/uiconfig/scalc/ui.po  |   
16 
 source/nl/sfx2/source/doc.po

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 10 commits - oox/source sc/source sd/qa svx/source sw/qa writerfilter/source

2014-10-03 Thread Christian Lohmaier
 oox/source/drawingml/color.cxx   |   30 +---
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx  |   10 ++
 oox/source/drawingml/table/tablecell.cxx |   55 +--
 sc/source/ui/dbgui/filtdlg.cxx   |5 +
 sc/source/ui/dbgui/validate.cxx  |   15 +++-
 sc/source/ui/view/cellsh2.cxx|2 
 sd/qa/unit/data/pptx/bnc584721_4.pptx|binary
 sd/qa/unit/import-tests.cxx  |   53 ++
 svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx |2 
 sw/qa/core/data/ooxml/pass/fdo73608-1.docx   |binary
 sw/qa/core/data/ooxml/pass/fdo73608-2.docx   |binary
 sw/qa/core/data/ooxml/pass/fdo79129.docx |binary
 sw/qa/core/data/ooxml/pass/fdo79131.docx |binary
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |   16 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|2 
 15 files changed, 149 insertions(+), 41 deletions(-)

New commits:
commit ab218d72e9c044541f855f6e39cd9a7b0346fa8f
Author: Christian Lohmaier 
Date:   Thu Oct 2 17:21:36 2014 +0200

shared_ptr is too smart to accept NULL

Change-Id: Id1bc223ffe2a8811219cdc47d145cd139199281a
Reviewed-on: https://gerrit.libreoffice.org/11767
Reviewed-by: Norbert Thiebaud 
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index f564407..cdb1198 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3088,7 +3088,7 @@ void DomainMapper_Impl::CloseFieldCommand()
 dmapper_logger->element("closeFieldCommand");
 #endif
 
-FieldContextPtr pContext = m_aFieldStack.empty() ? NULL : 
m_aFieldStack.top();
+FieldContextPtr pContext = m_aFieldStack.empty() ? 
boost::shared_ptr() : m_aFieldStack.top();
 OSL_ENSURE( pContext.get(), "no field context available");
 if( pContext.get() )
 {
commit 2374173a331db79425ffe28ed0765b16817e5d6b
Author: Caolán McNamara 
Date:   Sat Sep 27 20:38:24 2014 +0100

Resolves: fdo#79130 Crash in DomainMapper_Impl::CloseFieldCommand

Change-Id: Ia59e0c79ec7f2066891b78657559f41eaeb80a09
(cherry picked from commit a392a1deb0bb55f39f0232f9b3df8ad9ac9062af)
Reviewed-on: https://gerrit.libreoffice.org/11666
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 37152f6..f564407 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3088,7 +3088,7 @@ void DomainMapper_Impl::CloseFieldCommand()
 dmapper_logger->element("closeFieldCommand");
 #endif
 
-FieldContextPtr pContext = m_aFieldStack.top();
+FieldContextPtr pContext = m_aFieldStack.empty() ? NULL : 
m_aFieldStack.top();
 OSL_ENSURE( pContext.get(), "no field context available");
 if( pContext.get() )
 {
commit 142527fff381c3269ca05e99b9fb8a6fb7ab1b6c
Author: Caolán McNamara 
Date:   Sun Sep 28 16:47:13 2014 +0100

Related: fdo#73608 don't crash on missing table styles

(cherry picked from commit 5fd7382651d64f77e8ad1d9a5c053f52f3641f9f)

Conflicts:
writerfilter/source/dmapper/DomainMapperTableHandler.cxx

Change-Id: I340b43b7afc4c5c4d6dc8e4ed182279240306540

Resolves: fdo#73608 bail out on loop in style sheet hierarchy

Change-Id: I03975d1ce8eaceceb4d5c263eb11c1521bcd57eb
(cherry picked from commit be18133e84120625734a09380594ee89b23c4322)
Reviewed-on: https://gerrit.libreoffice.org/11680
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sw/qa/core/data/ooxml/pass/fdo73608-1.docx 
b/sw/qa/core/data/ooxml/pass/fdo73608-1.docx
new file mode 100644
index 000..d3cc84a
Binary files /dev/null and b/sw/qa/core/data/ooxml/pass/fdo73608-1.docx differ
diff --git a/sw/qa/core/data/ooxml/pass/fdo73608-2.docx 
b/sw/qa/core/data/ooxml/pass/fdo73608-2.docx
new file mode 100644
index 000..f558878
Binary files /dev/null and b/sw/qa/core/data/ooxml/pass/fdo73608-2.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 7b8d9cd..b4002d7 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -116,9 +116,17 @@ void DomainMapperTableHandler::startTable(unsigned int 
nRows,
 PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const 
StyleSheetEntryPtr pStyleSheet, StyleSheetTablePtr pStyleSheetTable)
 {
 PropertyMapPtr pRet;
+
+if (!pStyleSheet)
+return pRet;
+
 if(!pStyleSheet->sBaseStyleIden