[Bug 30732] Character formatting not retained in entries of TOC, table lists, etc.

2014-07-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30732

--- Comment #28 from Stephan van den Akker  ---
Confirmed fixed for subscript, superscript and italics. 

"selected character attributes" means no bold, underline, font changes, font
colours and Unicode Line Breaks, right? 

This will probably not satisfy Owen Genat (see comment 15), but it will do for
my use cases (engineering / science). 

Nice work, Tobias! I vote for VERIFIED FIXED.

Tested on
OpenSuSE 12.3 (64-bit)
LOdev version: 4.4.0.0.alpha0+
Build ID: 8b499cea76577b4221fccb17703aa9e86b625e90

-- 
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: writerfilter/CustomTarget_source.mk writerfilter/source

2014-07-12 Thread Miklos Vajna
 writerfilter/CustomTarget_source.mk|6 
 writerfilter/source/ooxml/factoryimpl.py   |  204 +
 writerfilter/source/ooxml/factoryimpl.xsl  |  274 -
 writerfilter/source/ooxml/factorytools.xsl |   20 --
 4 files changed, 207 insertions(+), 297 deletions(-)

New commits:
commit a7706f8a4e79fd36a296e988f7f852dfd549a16f
Author: Miklos Vajna 
Date:   Sat Jul 12 10:09:53 2014 +0200

writerfilter: convert factoryimpl to Python

Change-Id: I2065215db5da0a379e902a74eff419d5c6068d21

diff --git a/writerfilter/CustomTarget_source.mk 
b/writerfilter/CustomTarget_source.mk
index 989a623..9fdaf00 100644
--- a/writerfilter/CustomTarget_source.mk
+++ b/writerfilter/CustomTarget_source.mk
@@ -79,9 +79,9 @@ 
writerfilter_SRC_ooxml_Preprocess_py=$(writerfilter_SRC)/ooxml/modelpreprocess.p
 writerfilter_SRC_ooxml_QNameToStr_py=$(writerfilter_SRC)/ooxml/qnametostr.py
 writerfilter_SRC_ooxml_ResourceIds_py=$(writerfilter_SRC)/ooxml/resourceids.py
 
-$(writerfilter_GEN_ooxml_Factory_cxx) : 
$(writerfilter_SRC)/ooxml/factoryimpl.xsl 
$(writerfilter_GEN_ooxml_Model_processed)
-   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,XSL,1)
-   $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $< 
$(writerfilter_GEN_ooxml_Model_processed)) > $@
+$(writerfilter_GEN_ooxml_Factory_cxx) : 
$(writerfilter_SRC)/ooxml/factoryimpl.py 
$(writerfilter_GEN_ooxml_Model_processed)
+   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1)
+   $(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $< 
$(writerfilter_GEN_ooxml_Model_processed)) > $@
 
 $(writerfilter_GEN_ooxml_Factory_hxx) : 
$(writerfilter_SRC)/ooxml/factoryinc.py 
$(writerfilter_GEN_ooxml_Model_processed)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1)
diff --git a/writerfilter/source/ooxml/factoryimpl.py 
b/writerfilter/source/ooxml/factoryimpl.py
new file mode 100644
index 000..0fb9144
--- /dev/null
+++ b/writerfilter/source/ooxml/factoryimpl.py
@@ -0,0 +1,204 @@
+#!/usr/bin/env python
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from __future__ import print_function
+from xml.dom import minidom
+import sys
+
+
+def getElementsByTagNamesNS(parent, ns, names, ret=minidom.NodeList()):
+for node in parent.childNodes:
+if node.nodeType == minidom.Node.ELEMENT_NODE and node.namespaceURI == 
ns and node.tagName in names:
+ret.append(node)
+getElementsByTagNamesNS(node, ns, names, ret)
+return ret
+
+
+def createFastChildContextFromFactory(model):
+print("""uno::Reference 
OOXMLFactory::createFastChildContextFromFactory
+(OOXMLFastContextHandler* pHandler, OOXMLFactory_ns::Pointer_t pFactory, 
Token_t Element)
+{
+uno::Reference  aResult;
+Id nDefine = pHandler->getDefine();
+
+if (pFactory.get() != NULL)
+{
+CreateElementMapPointer pMap = pFactory->getCreateElementMap(nDefine);
+TokenToIdMapPointer pTokenMap = pFactory->getTokenToIdMap(nDefine);
+
+if (pMap.get() != NULL)
+{
+Id nId = (*pTokenMap)[Element];
+CreateElement aCreateElement = (*pMap)[Element];
+
+switch (aCreateElement.m_nResource)
+{""")
+resources = ["List", "Integer", "Hex", "String", "UniversalMeasure", 
"Boolean"]
+for resource in [r.getAttribute("resource") for r in 
model.getElementsByTagName("resource")]:
+if resource not in resources:
+resources.append(resource)
+print("""case RT_%s:
+
aResult.set(OOXMLFastHelper::createAndSetParentAndDefine(pHandler,
 Element, nId, aCreateElement.m_nId));
+break;""" % (resource, resource))
+print("""case RT_Any:
+aResult.set(createFastChildContextFromStart(pHandler, 
Element));
+break;
+default:
+break;
+}
+
+}
+}
+
+return aResult;
+}
+""")
+
+
+def getFactoryForNamespace(model):
+print("""OOXMLFactory_ns::Pointer_t 
OOXMLFactory::getFactoryForNamespace(Id nId)
+{
+OOXMLFactory_ns::Pointer_t pResult;
+
+switch (nId & 0x)
+{""")
+
+for namespace in [ns.getAttribute("name") for ns in 
model.getElementsByTagName("namespace")]:
+id = namespace.replace('-', '_')
+print("""case NN_%s:
+pResult = OOXMLFactory_%s::getInstance();
+break;""" % (id, id))
+print("""default:
+break;
+}
+
+return pResult;
+}
+""")
+
+
+def createFastChildContextFromStart(model):
+print("""uno::Reference 
OOXMLFactory::createFastChildContextFromStart
+(OOXMLFastContextHandler* pHandler, Token_t Element)
+{
+uno::Reference aResult;
+

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

2014-07-12 Thread Zolnai Tamás
 sw/qa/extras/ww8import/data/fdo80333.doc |binary
 sw/qa/extras/ww8import/ww8import.cxx |9 +
 sw/source/filter/ww8/ww8par6.cxx |   24 ++--
 3 files changed, 23 insertions(+), 10 deletions(-)

New commits:
commit c2e708d61746a259888c0e5fb1d3e9a43e3ca696
Author: Zolnai Tamás 
Date:   Sat Jul 12 10:05:52 2014 +0200

fdo#80333: .doc has large black rectangles between paragraphs

These black rectangles are character shadows, because checking
whether there is a border at all was missing. In Word there
is no shadow without a border.

Change-Id: Ib3cb4e904fdd33f215c81d7c02762a196f484b1b

diff --git a/sw/qa/extras/ww8import/data/fdo80333.doc 
b/sw/qa/extras/ww8import/data/fdo80333.doc
new file mode 100644
index 000..773a922
Binary files /dev/null and b/sw/qa/extras/ww8import/data/fdo80333.doc differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx 
b/sw/qa/extras/ww8import/ww8import.cxx
index 15d10d2..58a3bc1 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -460,6 +461,14 @@ DECLARE_WW8IMPORT_TEST(testFdo77844, "fdo77844.doc")
 #endif
 }
 
+DECLARE_WW8IMPORT_TEST(testFdp80333, "fdo80333.doc")
+{
+// Despite there is no character border, border shadow was imported
+uno::Reference xRun(getRun(getParagraph(1),1), 
uno::UNO_QUERY);
+const table::ShadowFormat aShadow = getProperty(xRun, 
"CharShadowFormat");
+CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_NONE, aShadow.Location);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index a73df03..08e216f 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -4775,16 +4775,20 @@ void SwWW8ImplReader::Read_CharBorder(sal_uInt16 nId, 
const sal_uInt8* pData, sh
 
 _SetWW8_BRC(nBrcVer, aBrc, pData);
 
-Set1Border(aBoxItem, aBrc, BOX_LINE_TOP, 0, 0, true);
-Set1Border(aBoxItem, aBrc, BOX_LINE_BOTTOM, 0, 0, true);
-Set1Border(aBoxItem, aBrc, BOX_LINE_LEFT, 0, 0, true);
-Set1Border(aBoxItem, aBrc, BOX_LINE_RIGHT, 0, 0, true);
-NewAttr( aBoxItem );
-
-short aSizeArray[WW8_RIGHT+1]={0}; aSizeArray[WW8_RIGHT] = 1;
-SvxShadowItem aShadowItem(RES_CHRATR_SHADOW);
-if( SetShadow( aShadowItem, &aSizeArray[0], aBrc ) )
-NewAttr( aShadowItem );
+// Border style is none -> no border, no shadow
+if( editeng::ConvertBorderStyleFromWord(aBrc.brcType()) != 
table::BorderLineStyle::NONE )
+{
+Set1Border(aBoxItem, aBrc, BOX_LINE_TOP, 0, 0, true);
+Set1Border(aBoxItem, aBrc, BOX_LINE_BOTTOM, 0, 0, true);
+Set1Border(aBoxItem, aBrc, BOX_LINE_LEFT, 0, 0, true);
+Set1Border(aBoxItem, aBrc, BOX_LINE_RIGHT, 0, 0, true);
+NewAttr( aBoxItem );
+
+short aSizeArray[WW8_RIGHT+1]={0}; aSizeArray[WW8_RIGHT] = 1;
+SvxShadowItem aShadowItem(RES_CHRATR_SHADOW);
+if( SetShadow( aShadowItem, &aSizeArray[0], aBrc ) )
+NewAttr( aShadowItem );
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-12 Thread Miklos Vajna
 sw/inc/viewsh.hxx   |1 +
 sw/source/core/draw/dflyobj.cxx |4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit fb0b42b89af95b42cc6caadf8c22321e5c9386e8
Author: Miklos Vajna 
Date:   Sat Jul 12 11:09:06 2014 +0200

CppunitTest_tiledrendering: disable SwVirtFlyDrawObj assert for now

Change-Id: I289632e4e686b56d83855a0a5c69744b3b7e035e

diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 14b7982..a0b9613 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -571,6 +571,7 @@ public:
 bool IsShowHeaderFooterSeparator( FrameControlType eControl ) { return 
(eControl == Header)? mbShowHeaderSeparator: mbShowFooterSeparator; }
 virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool 
bShow ) { if ( eControl == Header ) mbShowHeaderSeparator = bShow; else 
mbShowFooterSeparator = bShow; }
 bool IsSelectAll() { return mbSelectAll; }
+bool IsTiledRendering() { return mbTiledRendering; }
 };
 
 // manages global ShellPointer
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index bc043ed..c8177a9 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -469,7 +469,9 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject(
 // if there's no viewport set, all fly-frames will be painted,
 // which is slow, wastes memory, and can cause other trouble.
 (void) rViewInformation; // suppress "unused parameter" warning
-assert(!rViewInformation.getViewport().isEmpty());
+if (!pShell->IsTiledRendering())
+// FIXME is it OK to have no viewport during tiled rendering?
+assert(!rViewInformation.getViewport().isEmpty());
 if ( !pFlyFrm->IsFlyInCntFrm() )
 {
 // it is also necessary to restore the VCL MapMode from 
ViewInformation since e.g.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-12 Thread Michael Meeks
 sal/osl/unx/mutex.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 231db56d020d95e9bcf2520cb3c64235d99aa650
Author: Michael Meeks 
Date:   Sat Jul 12 12:14:58 2014 +0100

sal: restore pthread to its original non-ideal state.

Hopefully repairs the tinderboxen.

Change-Id: I2933e6cbf1079a09dab48d4f7ed20b93634d8959

diff --git a/sal/osl/unx/mutex.c b/sal/osl/unx/mutex.c
index a43f662..a8eb99d 100644
--- a/sal/osl/unx/mutex.c
+++ b/sal/osl/unx/mutex.c
@@ -25,7 +25,7 @@
 #include 
 #include 
 
-#if defined LINUX && (__GLIBC__ == 2) && (__GLIBC_MINOR__ <= 1) /* bad hack */
+#if defined LINUX /* bad hack */
 int pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int);
 #define pthread_mutexattr_settype pthread_mutexattr_setkind_np
 #define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - external/libgltf svtools/source

2014-07-12 Thread Markus Mohrhard
 external/libgltf/ExternalProject_libgltf.mk   |2 +-
 svtools/source/contnr/DocumentInfoPreview.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 717f8a87a7f009b821fd512c26cb35b2cac14993
Author: Markus Mohrhard 
Date:   Sat Jul 12 12:59:47 2014 +0200

enable debug informations for gltf in debug builds

Change-Id: I81fc7ebc77a67d2d64dd74e1dec0ce7ffbb1b19b

diff --git a/external/libgltf/ExternalProject_libgltf.mk 
b/external/libgltf/ExternalProject_libgltf.mk
index 25f57b8..dfbe271 100644
--- a/external/libgltf/ExternalProject_libgltf.mk
+++ b/external/libgltf/ExternalProject_libgltf.mk
@@ -59,7 +59,7 @@ $(call gb_ExternalProject_get_state_target,libgltf,build) :
export PKG_CONFIG="" \
&& ./configure \
--with-pic \
-   --disable-debug \
+   $(if $(filter 
TRUE,$(ENABLE_DEBUG)),--enable-debug,--disable-debug) \
--disable-werror \
BOOST_CFLAGS="$(if 
$(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost)) 
-I$(BUILDDIR)/config_$(gb_Side)" \
GLEW_CFLAGS="$(if 
$(SYSTEM_GLEW),$(GLEW_CFLAGS),-I$(call 
gb_UnpackedTarball_get_dir,glew)/include)" \
commit 6a393f7843bc32b14d007ccdb41922f42afe0f3d
Author: Markus Mohrhard 
Date:   Sat Jul 12 12:34:56 2014 +0200

pass by reference

Change-Id: I44e8f40935a19f8023bb23f53c5fb458eb28a3dc

diff --git a/svtools/source/contnr/DocumentInfoPreview.cxx 
b/svtools/source/contnr/DocumentInfoPreview.cxx
index 5a4e154..c371f4b 100644
--- a/svtools/source/contnr/DocumentInfoPreview.cxx
+++ b/svtools/source/contnr/DocumentInfoPreview.cxx
@@ -54,7 +54,7 @@ ODocumentInfoPreview::ODocumentInfoPreview(Window * pParent, 
WinBits nBits):
 
 ODocumentInfoPreview::~ODocumentInfoPreview() {}
 
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL 
makeODocumentInfoPreview(Window *pParent, VclBuilder::stringmap)
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL 
makeODocumentInfoPreview(Window *pParent, VclBuilder::stringmap&)
 {
 return new ODocumentInfoPreview(pParent, WB_BORDER | WB_READONLY);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 47800] Most of the predefined autotexts are missing in czech language

2014-07-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=47800

michalis  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #15 from michalis  ---
I reopen the bug and change the title because the same problem exists also in
Greek language and seems to affect other languages also. There is no autotext,
is totally empty so I can't use the formula numbering fn F3. Moreover in my
installation I have both Greek and English languages installed and it is not
working (is empty) for English too. I checked the folder /share/autotext/ and
all the language subdirs there are empty. Also I am missing the en-US/
subfolder, which suggests that the installation file is missing the
/share/autotext/en-US/ folder. I have a clean install.

version 4.2.5.2 windows

-- 
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 47800] Most of the predefined autotexts are missing in most languages

2014-07-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=47800

michalis  changed:

   What|Removed |Added

Summary|Most of the predefined  |Most of the predefined
   |autotexts are missing in|autotexts are missing in
   |czech language  |most languages

-- 
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: sot/source

2014-07-12 Thread Takeshi Abe
 sot/source/sdstor/stgdir.cxx |9 +++-
 sot/source/sdstor/stgole.cxx |8 +++
 sot/source/sdstor/stgstrms.cxx   |   16 +++---
 sot/source/sdstor/storage.cxx|   15 +++--
 sot/source/sdstor/storinfo.cxx   |9 +++-
 sot/source/sdstor/ucbstorage.cxx |   42 ---
 6 files changed, 46 insertions(+), 53 deletions(-)

New commits:
commit 1bae012c997a3cf5b99a6772746107c0a6800458
Author: Takeshi Abe 
Date:   Sat Jul 12 23:10:34 2014 +0900

Avoid possible memory leaks in case of exceptions

Change-Id: Id0304366c4e6191db85527935f5bc5cdb0aeb8d8

diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index f4903a5..d7dce35 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -26,7 +26,7 @@
 #include "stgstrms.hxx"
 #include "stgdir.hxx"
 #include "stgio.hxx"
-
+#include 
 
  class StgDirEntry
 
@@ -350,13 +350,12 @@ bool StgDirEntry::SetSize( sal_Int32 nNewSize )
 // if so, we probably need to copy the old data
 if( nOldSize )
 {
-void* pBuf = new sal_uInt8[ nOldSize ];
+boost::scoped_array pBuf(new sal_uInt8[ 
nOldSize ]);
 pOld->Pos2Page( 0L );
 pStgStrm->Pos2Page( 0L );
-if( pOld->Read( pBuf, nOldSize )
- && pStgStrm->Write( pBuf, nOldSize ) )
+if( pOld->Read( pBuf.get(), nOldSize )
+&& pStgStrm->Write( pBuf.get(), nOldSize ) )
 bRes = true;
-delete[] static_cast(pBuf);
 }
 else
 bRes = true;
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 0b9d0b5..9bbf3ee 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -20,6 +20,7 @@
 #include "rtl/string.h"
 #include "stgole.hxx"
 #include "sot/storinfo.hxx"
+#include 
 
 #ifdef _MSC_VER
 #pragma warning(disable: 4342)
@@ -117,9 +118,9 @@ bool StgCompObjStream::Load()
 // higher bits are ignored
 sal_uLong nStrLen = ::std::min( nLen1, (sal_Int32)0xFFFE );
 
-sal_Char* p = new sal_Char[ nStrLen+1 ];
+boost::scoped_array p(new sal_Char[ nStrLen+1 ]);
 p[nStrLen] = 0;
-if( Read( p, nStrLen ) == nStrLen )
+if( Read( p.get(), nStrLen ) == nStrLen )
 {
 //The encoding here is "ANSI", which is pretty useless seeing 
as
 //the actual codepage used doesn't seem to be specified/stored
@@ -127,12 +128,11 @@ bool StgCompObjStream::Load()
 //all platforms and envs
 //https://issues.apache.org/ooo/attachment.cgi?id=68668
 //for a good edge-case example
-aUserName = nStrLen ? OUString( p, nStrLen, 
RTL_TEXTENCODING_MS_1252 ) : OUString();
+aUserName = nStrLen ? OUString( p.get(), nStrLen, 
RTL_TEXTENCODING_MS_1252 ) : OUString();
 nCbFormat = ReadClipboardFormat( *this );
 }
 else
 SetError( SVSTREAM_GENERALERROR );
-delete [] p;
 }
 }
 return GetError() == SVSTREAM_OK;
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index e4214b2..f2450c9 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -31,6 +31,7 @@
 #include "stgstrms.hxx"
 #include "stgdir.hxx"
 #include "stgio.hxx"
+#include 
 
 / class StgFAT
 
@@ -1136,7 +1137,7 @@ bool StgTmpStrm::Copy( StgTmpStrm& rSrc )
 SetSize( n );
 if( GetError() == SVSTREAM_OK )
 {
-sal_uInt8* p = new sal_uInt8[ 4096 ];
+boost::scoped_array p(new sal_uInt8[ 4096 ]);
 rSrc.Seek( 0L );
 Seek( 0L );
 while( n )
@@ -1144,13 +1145,13 @@ bool StgTmpStrm::Copy( StgTmpStrm& rSrc )
 sal_uLong nn = n;
 if( nn > 4096 )
 nn = 4096;
-if( rSrc.Read( p, nn ) != nn )
+if( rSrc.Read( p.get(), nn ) != nn )
 break;
-if( Write( p, nn ) != nn )
+if( Write( p.get(), nn ) != nn )
 break;
 n -= nn;
 }
-delete [] p;
+p.reset();
 rSrc.Seek( nCur );
 Seek( nCur );
 return n == 0;
@@ -1197,18 +1198,17 @@ void StgTmpStrm::SetSize(sal_uInt64 n)
 sal_uLong i = nEndOfData;
 if( i )
 {
-sal_uInt8* p = new sal_uInt8[ 4096 ];
+boost::scoped_array p(new sal_uInt8[ 4096 ]);
 Seek( 0L );
 while( i )
 {
 sal_uLong nb = ( i > 4096 ) ? 4096 : i;
-if( Read( p, nb ) == nb
- && s->Write( p, nb ) == nb )

[Bug 47800] Most of the predefined autotexts are missing in most languages

2014-07-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=47800

Michal Horák  changed:

   What|Removed |Added

   Assignee|hora...@gmail.com   |libreoffice-b...@lists.free
   ||desktop.org

-- 
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 43157] Clean up OSL_ASSERT, DBG_ASSERT, etc.

2014-07-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43157

Björn Michaelsen  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #29 from Björn Michaelsen  ---
NEEDINFO->NEW: The NEEDINFO state seems to have happened accidentally.

-- 
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 61005] VIEWING: Toolbar element height should match the icon size

2014-07-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=61005

Björn Michaelsen  changed:

   What|Removed |Added

 Whiteboard|BSA EasyHack|BSA
   |DifficultyInteresting   |
   |SkillCpp|

--- Comment #5 from Björn Michaelsen  ---
Removing "Easy Hack" as long as this is in NEEDINFO.

-- 
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: Changes to 'private/jmux/old-layouting'

2014-07-12 Thread Jan-Marek Glogowski
New branch 'private/jmux/old-layouting' available with the following commits:
commit 9b92db424f9ec161e1c26cc84de271a61606dd3e
Author: Jan-Marek Glogowski 
Date:   Sat Jul 12 23:17:31 2014 +0200

fdo#70346 MM: hide sections based on field values

This recalculates the section conditions based on the mail merge
fields before converting the fields to text.

It also removes the condition from the sections, as the fields
won't be available in the merged document.

Change-Id: I82a5f9f6962628a76c836e8e2a7c9e264fdc16e0

commit f2c1e437fc251aaa052f0f7f27fb36a56d82edf9
Author: Jan-Marek Glogowski 
Date:   Sat Jul 12 19:32:15 2014 +0200

Revert i#23187 fix; introduces layout problems

commit 09f50c017fe106b7bf94f60933667b55130ea1b5

  Reintroduce unlockPositionOfObjects().

  This unlocking code was accidentally removed in commit
  120922361a5928ea4437ffe253ce209abd7060b0.  Not sure if it is
  still necessary, but I am at the moment unable to prove it is
  not, so better to be safe :-)

and

commit 120922361a5928ea4437ffe253ce209abd7060b0

  i#23187: Fix crash of the document.

  The mbLayoutInProgress bool was effectively unused - only set and
  reset, but  the only place that was checking for that was in
  lcl_RecalcRow(), again, only to set and reset it.

  Worse - with the document from i#23187, the mbLayoutInProgress was
  set / reset on a page already disposed in SwFrm::InsertPage() which
  was causing the crash here.

  So let's get rid of all this mbLayoutInProgress, its getter and
  setter, and  NotifyLayoutOfPageInProgress class.

  Valgrind, thank you that you exist, would have never found it
  without you! :-)

This is no real fix for fdo#80926 - it just restores the "working"
state, if a document is loaded in a shell, where just a single page
can be displayed.

Change-Id: I8493a7f802f255fc8b5f911086f4944c5cc8b161

commit fe0f93fa0cd410f3795675d363137ccbc803879d
Author: Jan-Marek Glogowski 
Date:   Sat Jul 12 19:27:11 2014 +0200

Invalidate rect cache before moving object

Otherwise I get sw/source/core/layout/anchoredobject.cxx:582:

   - cache for object
  rectangle inclusive spaces marked as valid, but it couldn't be.
  Missing invalidation of cache. Please inform OD.

Change-Id: I3f315b15fca6e2480c11183269be5583e6aea123

commit aff4e0288f2be49a00f95a9913b487f9675bfb2b
Author: Jan-Marek Glogowski 
Date:   Sat Jul 12 13:35:54 2014 +0200

Fix moving out-of-bounds draw / fly objects

Actually move the object in the right direction, if it's outside
of the document boundaries.

Fixes the mysterious effect, that negative y-offset in fdo#80926
changed the objects x-offset values.

Change-Id: If88cf2a07fb44537b2e047e77c5e009664db94af

commit 33b5685979f37c28873ded0701e8e9a79898687a
Author: Jan-Marek Glogowski 
Date:   Sat Jul 12 13:34:01 2014 +0200

Better variable naming in SwViewImp::NotifySizeChg

Make it obvious, which variable contains the document boundaries and
which the draw / fly object boundaries.

Change-Id: I0bc2bcb5515e317c7a204b3458b92c61482e1a5c

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/kohei/sort-ref-update' - 4 commits - sc/inc sc/source

2014-07-12 Thread Kohei Yoshida
 sc/inc/sortparam.hxx   |   20 ++-
 sc/inc/table.hxx   |3 
 sc/inc/undosort.hxx|3 
 sc/source/core/data/sortparam.cxx  |   51 +++
 sc/source/core/data/table3.cxx |  242 +++--
 sc/source/ui/docshell/dbdocfun.cxx |   93 --
 sc/source/ui/undo/undosort.cxx |   23 +++
 7 files changed, 273 insertions(+), 162 deletions(-)

New commits:
commit 61655e2d53f7f6d620992eda5dd4b5d72c0d6a7c
Author: Kohei Yoshida 
Date:   Sat Jul 12 17:56:23 2014 -0400

Cleanup.

Change-Id: I0da0f83778961b7f933f3b77a1337497072eea50

diff --git a/sc/source/ui/docshell/dbdocfun.cxx 
b/sc/source/ui/docshell/dbdocfun.cxx
index daaff7f..5398042 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -52,48 +52,6 @@
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
-namespace {
-
-class stack_printer
-{
-public:
-explicit stack_printer(const char* msg) :
-msMsg(msg)
-{
-fprintf(stdout, "%s: --begin\n", msMsg.c_str());
-mfStartTime = getTime();
-}
-
-~stack_printer()
-{
-double fEndTime = getTime();
-fprintf(stdout, "%s: --end (duration: %g sec)\n", msMsg.c_str(), 
(fEndTime - mfStartTime));
-}
-
-void printTime(int line) const
-{
-double fEndTime = getTime();
-fprintf(stdout, "%s: --(%d) (duration: %g sec)\n", msMsg.c_str(), 
line, (fEndTime - mfStartTime));
-}
-
-private:
-double getTime() const
-{
-timeval tv;
-gettimeofday(&tv, NULL);
-return tv.tv_sec + tv.tv_usec / 100.0;
-}
-
-::std::string msMsg;
-double mfStartTime;
-};
-
-}
-
 using namespace ::com::sun::star;
 
 bool ScDBDocFunc::AddDBRange( const OUString& rName, const ScRange& rRange, 
bool /* bApi */ )
@@ -468,17 +426,12 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool 
bRecord, bool bApi, bo
 bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
 bool bRecord, bool bPaint, bool bApi )
 {
-stack_printer __stack_printer__("ScDBDocFunc::Sort");
 ScDocShellModificator aModificator( rDocShell );
 
 ScDocument& rDoc = rDocShell.GetDocument();
 if (bRecord && !rDoc.IsUndoEnabled())
 bRecord = false;
 
-#if 0
-ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
-#endif
-
 ScDBData* pDBData = rDoc.GetDBAtArea( nTab, rSortParam.nCol1, 
rSortParam.nRow1,
 rSortParam.nCol2, 
rSortParam.nRow2 );
 if (!pDBData)
@@ -552,46 +505,6 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& 
rSortParam,
 if ( aQueryParam.GetEntry(0).bDoQuery )
 bRepeatQuery = true;
 
-#if 0
-ScUndoSort* pUndoAction = 0;
-if ( bRecord )
-{
-//  Referenzen ausserhalb des Bereichs werden nicht veraendert !
-
-ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
-//  Zeilenhoehen immer (wegen automatischer Anpassung)
-//! auf ScBlockUndo umstellen
-pUndoDoc->InitUndo( &rDoc, nTab, nTab, false, true );
-
-/*  #i59745# Do not copy note captions to undo document. All existing
-caption objects will be repositioned while sorting which is tracked
-in drawing undo. When undo is executed, the old positions will be
-restored, and the cells with the old notes (which still refer to 
the
-existing captions) will be copied back into the source document. */
-rDoc.CopyToDocument( aLocalParam.nCol1, aLocalParam.nRow1, nTab,
-aLocalParam.nCol2, aLocalParam.nRow2, nTab,
-IDF_ALL|IDF_NOCAPTIONS, false, pUndoDoc );
-
-//  Zeilenhoehen immer (wegen automatischer Anpassung)
-//! auf ScBlockUndo umstellen
-//if (bRepeatQuery)
-rDoc.CopyToDocument( 0, aLocalParam.nRow1, nTab, MAXCOL, 
aLocalParam.nRow2, nTab,
-IDF_NONE, false, pUndoDoc );
-
-ScDBCollection* pUndoDB = NULL;
-ScDBCollection* pDocDB = rDoc.GetDBCollection();
-if (!pDocDB->empty())
-pUndoDB = new ScDBCollection( *pDocDB );
-
-pUndoAction = new ScUndoSort(&rDocShell, nTab, rSortParam, pUndoDoc, 
pUndoDB);
-rDocShell.GetUndoManager()->AddUndoAction( pUndoAction );
-
-// #i59745# collect all drawing undo actions affecting cell note 
captions
-if( pDrawLayer )
-pDrawLayer->BeginCalcUndo(false);
-}
-#endif
-
 sc::ReorderParam aUndoParam;
 
 // don't call ScDocument::Sort with an empty SortParam (may be empty here 
if bCopy is set)
@@ -634,12 +547,6 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& 
rSortParam,
 if (!bUniformRowHeight)
 rDocShell.AdjustRowHeight(nStartRow, aLocalParam.nRow2, nTab);
 
-#if 0
-// #i59745# set collected drawing undo actions at sorting undo action

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

2014-07-12 Thread Bjoern Michaelsen
 sw/source/core/doc/docbm.cxx |  292 ++-
 1 file changed, 183 insertions(+), 109 deletions(-)

New commits:
commit 6708edc8952108f4bfb3bbac3e3e50afa64e1539
Author: Bjoern Michaelsen 
Date:   Sun Jul 13 01:13:16 2014 +0200

typo

Change-Id: Ia400c34f91f190453aa9cf87480d4559d8818a58

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 1e896b7..68a3574 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -2055,7 +2055,7 @@ void CntntIdxStoreImpl::RestoreUnoCrsrs(SwDoc* pDoc, 
sal_uLong nNode, sal_Int32
 sal_uInt16 nCnt = 0;
 BOOST_FOREACH(const SwUnoCrsr* pUnoCrsr, pDoc->GetUnoCrsrTbl())
 {
-SAL_INFO("sw.core", "::Looking for Index " << aEntry.m_nIdx << " 
now at PaM Index" << nCnt << ": " << pUnoCrsr);
+SAL_INFO("sw.core", "Looking for Index " << aEntry.m_nIdx << " now 
at PaM Index" << nCnt << ": " << pUnoCrsr);
 SwPosition* pPos = NULL;
 FOREACHPAM_START( const_cast(pUnoCrsr) )
 if( aEntry.m_nIdx == nCnt )
commit 8018d8d7e3b120c973a27bb4cd74df81ad5f8463
Author: Bjoern Michaelsen 
Date:   Sun Jul 13 01:07:40 2014 +0200

now use the refactored UnoCrsr implementation ...

... now that we verified it to work as the old version used to do.

Change-Id: I7980f263b35a6504337d2836ae2d4b9f29b19942

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 226da0e..1e896b7 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1134,8 +1134,6 @@ namespace
 //  0x2001 = frame anchored at character, which should be moved
 //  0x0800 = Crsr from the CrsrShell Mark
 //  0x0801 = Crsr from the CrsrShell Point
-//  0x0400 = UnoCrsr Mark
-//  0x0401 = UnoCrsr Point
 
 class _SwSaveTypeCountContent
 {
@@ -1246,7 +1244,7 @@ namespace
 rSave.DecType();
 }
 }
-#if OSL_DEBUG_LEVEL > 0
+#if 0
 static void DumpSaves(std::vector &rSaveArr)
 {
 sal_uInt16 n = 0;
@@ -1591,29 +1589,6 @@ void _SaveCntntIdx(SwDoc* pDoc,
 FOREACHSHELL_END( pShell )
 }
 }
-// 6. UnoCrsr
-{
-aSave.SetTypeAndCount( 0x400, 0 );
-const SwUnoCrsrTbl& rTbl = pDoc->GetUnoCrsrTbl();
-for (SwUnoCrsrTbl::const_iterator it = rTbl.begin();
-it != rTbl.end(); ++it)
-{
-FOREACHPAM_START( *it )
-lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR, aSave, false );
-aSave.IncCount();
-FOREACHPAM_END()
-
-SwUnoTableCrsr* pUnoTblCrsr =
-dynamic_cast(*it);
-if( pUnoTblCrsr )
-{
-FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() )
-lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR, aSave, 
false );
-aSave.IncCount();
-FOREACHPAM_END()
-}
-}
-}
 }
 
 void _RestoreCntntIdx(SwDoc* pDoc,
@@ -1703,49 +1678,6 @@ void _RestoreCntntIdx(SwDoc* pDoc,
 }
 }
 break;
-
-case 0x0400:
-case 0x0401:
-{
-sal_uInt16 nCnt = 0;
-const SwUnoCrsrTbl& rTbl = pDoc->GetUnoCrsrTbl();
-for (SwUnoCrsrTbl::const_iterator it = rTbl.begin();
-it != rTbl.end(); ++it)
-{
-FOREACHPAM_START( *it )
-if( aSave.GetCount() == nCnt )
-{
-SAL_INFO("sw.core", "Found PaM " << PCURCRSR << " 
for Index " << aSave.GetCount());
-pPos = &PCURCRSR->GetBound( 0x0400 ==
-aSave.GetType() );
-break;
-}
-else
-SAL_INFO("sw.core", "Skipped PaM " << PCURCRSR << 
" for Index " << aSave.GetCount());
-++nCnt;
-FOREACHPAM_END()
-if( pPos )
-break;
-
-SwUnoTableCrsr* pUnoTblCrsr =
-dynamic_cast(*it);
-if ( pUnoTblCrsr )
-{
-FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() )
-if( aSave.GetCount() == nCnt )
-{
-pPos = &PCURCRSR->GetBound( 0x0400 ==
-aSave.GetType() );
-break;
-}
-++nCnt;
-FOREACHPAM_END()
-}
-if ( pPos )
-break;
-}
-}
-break;

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

2014-07-12 Thread Kohei Yoshida
 sc/qa/unit/ucalc.cxx   |   68 +
 sc/qa/unit/ucalc.hxx   |2 +
 sc/source/ui/docshell/dbdocfun.cxx |4 +-
 3 files changed, 73 insertions(+), 1 deletion(-)

New commits:
commit 47a82452b5040cd712ffafb7d153fd18940ee1af
Author: Kohei Yoshida 
Date:   Sat Jul 12 22:09:10 2014 -0400

Add another test case.

Change-Id: I1664bc3faf44abc978391d0f97820c468f4419b0

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index b10bf54..7708427 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -5058,6 +5058,38 @@ void Test::testSortSingleRow()
 bool bSorted = aFunc.Sort(0, aSortData, true, true, true);
 CPPUNIT_ASSERT(bSorted);
 
+// Another test case - single row horizontal sort with header column.
+clearSheet(m_pDoc, 0);
+
+// A1:G1
+m_pDoc->SetString(ScAddress(0,0,0), "Header");
+m_pDoc->SetValue(ScAddress(1,0,0),  1.0);
+m_pDoc->SetValue(ScAddress(2,0,0), 10.0);
+m_pDoc->SetValue(ScAddress(3,0,0),  3.0);
+m_pDoc->SetValue(ScAddress(4,0,0),  9.0);
+m_pDoc->SetValue(ScAddress(5,0,0), 12.0);
+m_pDoc->SetValue(ScAddress(6,0,0),  2.0);
+
+// Define A1:G1 as sheet-local anonymous database range.
+m_pDoc->SetAnonymousDBData(
+0, new ScDBData(STR_DB_LOCAL_NONAME, 0, 0, 0, 6, 0, false, true));
+
+// Update the sort data.
+aSortData.nCol1 = 0;
+aSortData.nCol2 = 6;
+aSortData.bByRow = false;
+bSorted = aFunc.Sort(0, aSortData, true, true, true);
+CPPUNIT_ASSERT(bSorted);
+
+// Check the result.
+CPPUNIT_ASSERT_EQUAL(OUString("Header"), 
m_pDoc->GetString(ScAddress(0,0,0)));
+CPPUNIT_ASSERT_EQUAL( 1.0, m_pDoc->GetValue(ScAddress(1,0,0)));
+CPPUNIT_ASSERT_EQUAL( 2.0, m_pDoc->GetValue(ScAddress(2,0,0)));
+CPPUNIT_ASSERT_EQUAL( 3.0, m_pDoc->GetValue(ScAddress(3,0,0)));
+CPPUNIT_ASSERT_EQUAL( 9.0, m_pDoc->GetValue(ScAddress(4,0,0)));
+CPPUNIT_ASSERT_EQUAL(10.0, m_pDoc->GetValue(ScAddress(5,0,0)));
+CPPUNIT_ASSERT_EQUAL(12.0, m_pDoc->GetValue(ScAddress(6,0,0)));
+
 m_pDoc->DeleteTab(0);
 }
 
commit 9e5b1eb98b8e97b184f8c6876b154f47b6e0730d
Author: Kohei Yoshida 
Date:   Sat Jul 12 21:55:59 2014 -0400

fdo#80462: Write test for this.

Change-Id: Icdc83c0264fd76239e8c8772c207cc22ce969a76

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index af272a5..b10bf54 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -5025,6 +5025,42 @@ void Test::testSortHorizontal()
 m_pDoc->DeleteTab(0);
 }
 
+void Test::testSortSingleRow()
+{
+// This test case is from fdo#80462.
+
+m_pDoc->InsertTab(0, "Test");
+
+// Sort range consists of only one row.
+m_pDoc->SetString(ScAddress(0,0,0), "X");
+m_pDoc->SetString(ScAddress(1,0,0), "Y");
+
+// Define A1:B1 as sheet-local anonymous database range.
+m_pDoc->SetAnonymousDBData(
+0, new ScDBData(STR_DB_LOCAL_NONAME, 0, 0, 0, 1, 0));
+
+// Sort A1:B1 horizontally, ascending by row 1.
+ScDBDocFunc aFunc(getDocShell());
+
+ScSortParam aSortData;
+aSortData.nCol1 = 0;
+aSortData.nCol2 = 1;
+aSortData.nRow1 = 0;
+aSortData.nRow2 = 0;
+aSortData.bHasHeader = true;
+aSortData.bByRow = true;
+aSortData.bIncludePattern = true;
+aSortData.maKeyState[0].bDoSort = true;
+aSortData.maKeyState[0].nField = 0;
+aSortData.maKeyState[0].bAscending = true;
+
+// Do the sorting.  This should not crash.
+bool bSorted = aFunc.Sort(0, aSortData, true, true, true);
+CPPUNIT_ASSERT(bSorted);
+
+m_pDoc->DeleteTab(0);
+}
+
 void Test::testSortInFormulaGroup()
 {
 static struct {
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 2df47c0..c592e69 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -341,6 +341,7 @@ public:
 void testFindAreaPosColRight();
 void testSort();
 void testSortHorizontal();
+void testSortSingleRow();
 void testSortWithFormulaRefs();
 void testSortWithStrings();
 void testSortInFormulaGroup();
@@ -509,6 +510,7 @@ public:
 CPPUNIT_TEST(testFindAreaPosColRight);
 CPPUNIT_TEST(testSort);
 CPPUNIT_TEST(testSortHorizontal);
+CPPUNIT_TEST(testSortSingleRow);
 CPPUNIT_TEST(testSortWithFormulaRefs);
 CPPUNIT_TEST(testSortWithStrings);
 CPPUNIT_TEST(testSortInFormulaGroup);
commit 5902dcf0995cdd0a6c1dbd1f9c21b0b2b3f5609f
Author: Kohei Yoshida 
Date:   Sat Jul 12 21:46:13 2014 -0400

fdo#80462: Don't always increment the start row position.

Sometimes someone might attempt to sort only a single row.

Change-Id: Ie29d4cf7ec0bd3a5c945997083368b6ef6074268

diff --git a/sc/source/ui/docshell/dbdocfun.cxx 
b/sc/source/ui/docshell/dbdocfun.cxx
index 1c7ad53..94578f2 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -489,7 +489,9 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& 
rSortParam,
 
 WaitObject aWait( rDocSh

[Bug 65675] LibreOffice 4.2 most annoying bugs

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

Bug 65675 depends on bug 80462, which changed state.

Bug 80462 Summary: Other: Crash when sorting single row
https://bugs.freedesktop.org/show_bug.cgi?id=80462

   What|Removed |Added

 Status|ASSIGNED|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: Branch 'private/kohei/sort-ref-update' - 4 commits - sc/inc sc/qa sc/source

2014-07-12 Thread Kohei Yoshida
 sc/inc/table.hxx   |2 -
 sc/qa/unit/ucalc.cxx   |   68 +
 sc/qa/unit/ucalc.hxx   |2 +
 sc/source/core/data/table3.cxx |   23 +---
 sc/source/ui/docshell/dbdocfun.cxx |4 +-
 5 files changed, 84 insertions(+), 15 deletions(-)

New commits:
commit bda3a2375f8ef581d12da54a4905392d1504b2f0
Author: Kohei Yoshida 
Date:   Sat Jul 12 22:09:10 2014 -0400

Add another test case.

Change-Id: I1664bc3faf44abc978391d0f97820c468f4419b0

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index c834766..8e88ee4 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -5059,6 +5059,38 @@ void Test::testSortSingleRow()
 bool bSorted = aFunc.Sort(0, aSortData, true, true, true);
 CPPUNIT_ASSERT(bSorted);
 
+// Another test case - single row horizontal sort with header column.
+clearSheet(m_pDoc, 0);
+
+// A1:G1
+m_pDoc->SetString(ScAddress(0,0,0), "Header");
+m_pDoc->SetValue(ScAddress(1,0,0),  1.0);
+m_pDoc->SetValue(ScAddress(2,0,0), 10.0);
+m_pDoc->SetValue(ScAddress(3,0,0),  3.0);
+m_pDoc->SetValue(ScAddress(4,0,0),  9.0);
+m_pDoc->SetValue(ScAddress(5,0,0), 12.0);
+m_pDoc->SetValue(ScAddress(6,0,0),  2.0);
+
+// Define A1:G1 as sheet-local anonymous database range.
+m_pDoc->SetAnonymousDBData(
+0, new ScDBData(STR_DB_LOCAL_NONAME, 0, 0, 0, 6, 0, false, true));
+
+// Update the sort data.
+aSortData.nCol1 = 0;
+aSortData.nCol2 = 6;
+aSortData.bByRow = false;
+bSorted = aFunc.Sort(0, aSortData, true, true, true);
+CPPUNIT_ASSERT(bSorted);
+
+// Check the result.
+CPPUNIT_ASSERT_EQUAL(OUString("Header"), 
m_pDoc->GetString(ScAddress(0,0,0)));
+CPPUNIT_ASSERT_EQUAL( 1.0, m_pDoc->GetValue(ScAddress(1,0,0)));
+CPPUNIT_ASSERT_EQUAL( 2.0, m_pDoc->GetValue(ScAddress(2,0,0)));
+CPPUNIT_ASSERT_EQUAL( 3.0, m_pDoc->GetValue(ScAddress(3,0,0)));
+CPPUNIT_ASSERT_EQUAL( 9.0, m_pDoc->GetValue(ScAddress(4,0,0)));
+CPPUNIT_ASSERT_EQUAL(10.0, m_pDoc->GetValue(ScAddress(5,0,0)));
+CPPUNIT_ASSERT_EQUAL(12.0, m_pDoc->GetValue(ScAddress(6,0,0)));
+
 m_pDoc->DeleteTab(0);
 }
 
commit f565bd8e0597ccbc2b525c03ea430bcc1abce9ee
Author: Kohei Yoshida 
Date:   Sat Jul 12 21:55:59 2014 -0400

fdo#80462: Write test for this.

Change-Id: Icdc83c0264fd76239e8c8772c207cc22ce969a76

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index ac66506..c834766 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -5026,6 +5026,42 @@ void Test::testSortHorizontal()
 m_pDoc->DeleteTab(0);
 }
 
+void Test::testSortSingleRow()
+{
+// This test case is from fdo#80462.
+
+m_pDoc->InsertTab(0, "Test");
+
+// Sort range consists of only one row.
+m_pDoc->SetString(ScAddress(0,0,0), "X");
+m_pDoc->SetString(ScAddress(1,0,0), "Y");
+
+// Define A1:B1 as sheet-local anonymous database range.
+m_pDoc->SetAnonymousDBData(
+0, new ScDBData(STR_DB_LOCAL_NONAME, 0, 0, 0, 1, 0));
+
+// Sort A1:B1 horizontally, ascending by row 1.
+ScDBDocFunc aFunc(getDocShell());
+
+ScSortParam aSortData;
+aSortData.nCol1 = 0;
+aSortData.nCol2 = 1;
+aSortData.nRow1 = 0;
+aSortData.nRow2 = 0;
+aSortData.bHasHeader = true;
+aSortData.bByRow = true;
+aSortData.bIncludePattern = true;
+aSortData.maKeyState[0].bDoSort = true;
+aSortData.maKeyState[0].nField = 0;
+aSortData.maKeyState[0].bAscending = true;
+
+// Do the sorting.  This should not crash.
+bool bSorted = aFunc.Sort(0, aSortData, true, true, true);
+CPPUNIT_ASSERT(bSorted);
+
+m_pDoc->DeleteTab(0);
+}
+
 void Test::testSortInFormulaGroup()
 {
 static struct {
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 2df47c0..c592e69 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -341,6 +341,7 @@ public:
 void testFindAreaPosColRight();
 void testSort();
 void testSortHorizontal();
+void testSortSingleRow();
 void testSortWithFormulaRefs();
 void testSortWithStrings();
 void testSortInFormulaGroup();
@@ -509,6 +510,7 @@ public:
 CPPUNIT_TEST(testFindAreaPosColRight);
 CPPUNIT_TEST(testSort);
 CPPUNIT_TEST(testSortHorizontal);
+CPPUNIT_TEST(testSortSingleRow);
 CPPUNIT_TEST(testSortWithFormulaRefs);
 CPPUNIT_TEST(testSortWithStrings);
 CPPUNIT_TEST(testSortInFormulaGroup);
commit 6fb4cbb860652c780dbb56cec92fc93e769e97a5
Author: Kohei Yoshida 
Date:   Sat Jul 12 21:46:13 2014 -0400

fdo#80462: Don't always increment the start row position.

Sometimes someone might attempt to sort only a single row.

Change-Id: Ie29d4cf7ec0bd3a5c945997083368b6ef6074268

diff --git a/sc/source/ui/docshell/dbdocfun.cxx 
b/sc/source/ui/docshell/dbdocfun.cxx
index 5398042..187621d 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -485,7 +485,9

[Libreoffice-commits] cppunit.git: Changes to 'feature/new_assert_macros'

2014-07-12 Thread Markus Mohrhard
New branch 'feature/new_assert_macros' available with the following commits:
commit 4dbaa35920fa376c48eedf8cc3440b3965a01caa
Author: Markus Mohrhard 
Date:   Sat May 5 21:52:20 2012 +0200

add new assertion macros for <, <=, > and >=

Now we support the following new macros:

- CPPUNIT_ASSERT_LESS
- CPPUNIT_ASSERT_GREATER
- CPPUNIT_ASSERT_LESSEQUAL
- CPPUNIT_ASSERT_GREATEREQUAL

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-12 Thread Markus Mohrhard
 chart2/source/view/charttypes/GL3DBarChart.cxx |4 
 include/vcl/opengl/OpenGLContext.hxx   |1 +
 vcl/source/opengl/OpenGLContext.cxx|   11 +++
 3 files changed, 16 insertions(+)

New commits:
commit dde00f1f8ac598314b7f8a787eeacc841bc65f1c
Author: Markus Mohrhard 
Date:   Sun Jul 13 07:52:51 2014 +0200

make threaded rendering work correctly, fdo#81110

The context may only be bound in one thread!

Change-Id: Ibb67f88c2f11fd48884ee39d89620193e4e5471b

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx 
b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 8ce235f..540615b 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -407,6 +407,7 @@ void GL3DBarChart::update()
 Size aSize = mrWindow.GetSizePixel();
 mrWindow.getContext().setWinSize(aSize);
 mpRenderThread = rtl::Reference(new 
RenderOneFrameThread(this));
+mrWindow.getContext().resetCurrent();
 mpRenderThread->launch();
 }
 
@@ -441,6 +442,7 @@ void GL3DBarChart::moveToDefault()
 Size aSize = mrWindow.GetSizePixel();
 mrWindow.getContext().setWinSize(aSize);
 mpRenderThread = rtl::Reference(new 
RenderAnimationThread(this, maCameraPosition, maDefaultCameraPosition, STEPS));
+mrWindow.getContext().resetCurrent();
 mpRenderThread->launch();
 
 /*
@@ -498,6 +500,7 @@ void GL3DBarChart::clickedAt(const Point& rPos, sal_uInt16 
nButtons)
 Size aSize = mrWindow.GetSizePixel();
 mrWindow.getContext().setWinSize(aSize);
 mpRenderThread = rtl::Reference(new 
RenderAnimationThread(this, maCameraPosition, maTargetPosition, STEPS));
+mrWindow.getContext().resetCurrent();
 mpRenderThread->launch();
 
 /*
@@ -579,6 +582,7 @@ void GL3DBarChart::moveToCorner()
 mrWindow.getContext().setWinSize(aSize);
 mpRenderThread = rtl::Reference(new 
RenderAnimationThread(this, getCornerPosition(mnCornerId),
 maCameraPosition, STEPS));
+mrWindow.getContext().resetCurrent();
 mpRenderThread->launch();
 
 // TODO: moggi: add to thread
diff --git a/include/vcl/opengl/OpenGLContext.hxx 
b/include/vcl/opengl/OpenGLContext.hxx
index 1e6f13e..94c70f3 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -151,6 +151,7 @@ public:
 bool init(SystemChildWindow* pChildWindow);
 
 void makeCurrent();
+void resetCurrent();
 void swapBuffers();
 void sync();
 void show();
diff --git a/vcl/source/opengl/OpenGLContext.cxx 
b/vcl/source/opengl/OpenGLContext.cxx
index 48eb267..dedd5b4 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -800,6 +800,17 @@ void OpenGLContext::makeCurrent()
 #endif
 }
 
+void OpenGLContext::resetCurrent()
+{
+#if defined( WNT )
+wglMakeCurrent( m_aGLWin.hDC, 0 );
+#elif defined( MACOSX ) || defined( IOS ) || defined( ANDROID )
+// nothing
+#elif defined( UNX )
+glXMakeCurrent(m_aGLWin.dpy, None, NULL);
+#endif
+}
+
 void OpenGLContext::swapBuffers()
 {
 #if defined( WNT )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


LibreOffice Gerrit News for core on 2014-07-13

2014-07-12 Thread gerrit
Moin!

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

 First time contributors doing great things! 
+ OS X: SDK configuration
  in https://gerrit.libreoffice.org/9952 from Robert Antoni Buj i Gelonch
  about module build
+ ExternalProject_python3.mk: MACOSX
  in https://gerrit.libreoffice.org/10249 from Robert Antoni Buj i Gelonch
  about module external
 End of freshness 

+ VS2013: Prefer it over VS2012 and VS2010
  in https://gerrit.libreoffice.org/10154 from David Ostrovsky
  about module build


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

None

* 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:

+ attempt
  in https://gerrit.libreoffice.org/9939 from Michael Stahl
+ fdo#78947 : The File gets corrupted when saved in LO
  in https://gerrit.libreoffice.org/9775 from BisalNayal
+ move OpenGLContext to SAL
  in https://gerrit.libreoffice.org/9429 from David Tardon
+ Changes for Wordml
  in https://gerrit.libreoffice.org/9013 from Michel Messak
+ fdo#64945 Remove inconvenient localized symbol code.
  in https://gerrit.libreoffice.org/8696 from Darshana Padmadas
+ fdo#77716 : Paragraph spacing is not preserved after RT.
  in https://gerrit.libreoffice.org/9197 from Tushar Bende
+ Lots of changes to Tango icons
  in https://gerrit.libreoffice.org/7987 from Miroslav Mazel
+ fdo#77121 Header / Footer positions not preserved after RT
  in https://gerrit.libreoffice.org/9235 from Priyanka Gaikwad


Best,

Your friendly LibreOffice Gerrit Digest Mailer

Note: The bot generating this message can be found and improved here:
   
https://gerrit.libreoffice.org/gitweb?p=dev-tools.git;a=blob;f=gerritbot/send-daily-digest
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: android/Bootstrap desktop/source

2014-07-12 Thread Andrzej Hunt
 android/Bootstrap/src/org/libreoffice/kit/Document.java |3 ++-
 desktop/source/lib/lokandroid.cxx   |   11 +--
 2 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit b7742fd8b831959d3a0865c35f61c3c8740a1fac
Author: Andrzej Hunt 
Date:   Sun Jul 13 08:05:00 2014 +0200

Add getPart(s) to lokandroid too.

I.e. make lokandroid match
4d15212ef8de89a71387c00bdeb7d9a41409e467

diff --git a/android/Bootstrap/src/org/libreoffice/kit/Document.java 
b/android/Bootstrap/src/org/libreoffice/kit/Document.java
index 27893d2..124f768 100644
--- a/android/Bootstrap/src/org/libreoffice/kit/Document.java
+++ b/android/Bootstrap/src/org/libreoffice/kit/Document.java
@@ -16,7 +16,8 @@ public class Document {
 private final long handle;
 
 public native void setPart(int part);
-public native int getNumberOfParts();
+public native int getPart();
+public native int getParts();
 public native long getDocumentHeight();
 public native long getDocumentWidth();
 
diff --git a/desktop/source/lib/lokandroid.cxx 
b/desktop/source/lib/lokandroid.cxx
index 981f556..b9fa1ba 100644
--- a/desktop/source/lib/lokandroid.cxx
+++ b/desktop/source/lib/lokandroid.cxx
@@ -75,11 +75,18 @@ extern "C" SAL_JNI_EXPORT void JNICALL 
Java_org_libreoffice_kit_Document_setPart
 pDocument->pClass->setPart(pDocument, aPart);
 }
 
-extern "C" SAL_JNI_EXPORT jint JNICALL 
Java_org_libreoffice_kit_Document_getNumberOfParts
+extern "C" SAL_JNI_EXPORT jint JNICALL 
Java_org_libreoffice_kit_Document_getPart
 (JNIEnv* pEnv, jobject aObject)
 {
 LibreOfficeKitDocument* pDocument = 
getHandle(pEnv, aObject);
-return (jint) pDocument->pClass->getNumberOfParts(pDocument);
+return (jint) pDocument->pClass->getPart(pDocument);
+}
+
+extern "C" SAL_JNI_EXPORT jint JNICALL 
Java_org_libreoffice_kit_Document_getParts
+(JNIEnv* pEnv, jobject aObject)
+{
+LibreOfficeKitDocument* pDocument = 
getHandle(pEnv, aObject);
+return (jint) pDocument->pClass->getParts(pDocument);
 }
 
 extern "C" SAL_JNI_EXPORT jint JNICALL 
Java_org_libreoffice_kit_Document_getDocumentTypeNative
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits