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

2014-07-02 Thread Michael Meeks
 sw/inc/docstyle.hxx   |6 -
 sw/source/uibase/app/docstyle.cxx |   40 +++---
 2 files changed, 34 insertions(+), 12 deletions(-)

New commits:
commit 64b1566e55677217c9c0dd13e5fbf8faf40810f9
Author: Michael Meeks 
Date:   Wed Jul 2 10:14:15 2014 +0100

fdo#76260 - switch O(N^2) lookup in SwStyleSheetIterator to O(N)

The SwStyleSheetIterator is called a lot on import of DOCX;
potentially another N times - so this change saves 15%+ of load time,
81bn cycles of 457bn to startup and load the document.

Change-Id: I70ef0f1ebd3f4e05519be68c8a67f65b00f54719

diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index 63a30e0..0862077 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include "swdllapi.h"
+#include 
 
 #include 
 
@@ -141,10 +142,13 @@ class SwStyleSheetIterator : public 
SfxStyleSheetIterator, public SfxListener
 class SwPoolFmtList
 {
 std::vector maImpl;
+typedef boost::unordered_map 
UniqueHash;
+UniqueHash maUnique;
+void rehash();
 public:
 SwPoolFmtList() {}
 void Append( char cChar, const OUString& rStr );
-void Erase() { maImpl.clear(); }
+void clear() { maImpl.clear(); maUnique.clear(); }
 size_t size() { return maImpl.size(); }
 bool empty() { return maImpl.empty(); }
 sal_uInt32 FindName(SfxStyleFamily eFam, const OUString &rName);
diff --git a/sw/source/uibase/app/docstyle.cxx 
b/sw/source/uibase/app/docstyle.cxx
index 146022b..3f09c0f 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -321,31 +321,49 @@ sal_uInt32 
SwStyleSheetIterator::SwPoolFmtList::FindName(SfxStyleFamily eFam,
 break;
 }
 const OUString sSrch = OUString(cStyle) + rName;
-for(size_t i = 0; i < maImpl.size(); ++i)
-if(maImpl[i] == sSrch)
-return i;
+
+UniqueHash::const_iterator it = maUnique.find(sSrch);
+if (it != maUnique.end())
+{
+sal_uInt32 nIdx = it->second;
+assert (nIdx < maImpl.size());
+assert (maImpl.size() == maUnique.size());
+return nIdx;
+}
 }
 return SAL_MAX_UINT32;
 }
 
+void SwStyleSheetIterator::SwPoolFmtList::rehash()
+{
+maUnique.clear();
+for (size_t i = 0; i < maImpl.size(); i++)
+maUnique[maImpl[i]] = i;
+assert (maImpl.size() == maUnique.size());
+}
+
 void SwStyleSheetIterator::SwPoolFmtList::RemoveName(SfxStyleFamily eFam,
  const OUString &rName)
 {
 sal_uInt32 nTmpPos = FindName( eFam, rName );
 if( nTmpPos < maImpl.size() )
 maImpl.erase(maImpl.begin() + nTmpPos);
+
+// assumption: this seldom occurs, the iterator is built, then emptied.
+rehash();
+assert (maImpl.size() == maUnique.size());
 }
 
 // Add Strings to the list of templates
 void SwStyleSheetIterator::SwPoolFmtList::Append( char cChar, const OUString& 
rStr )
 {
 const OUString aStr = OUString(cChar) + rStr;
-for(std::vector::const_iterator i = maImpl.begin();
-i != maImpl.end(); ++i)
-{
-if(*i == aStr)
-return;
-}
+
+UniqueHash::const_iterator it = maUnique.find(aStr);
+if (it != maUnique.end())
+return;
+
+maUnique[aStr] = (sal_uInt32)maImpl.size();
 maImpl.push_back(aStr);
 }
 
@@ -2553,7 +2571,7 @@ SfxStyleSheetBase*  SwStyleSheetIterator::First()
 // Delete old list
 bFirstCalled = true;
 nLastPos = 0;
-aLst.Erase();
+aLst.clear();
 
 // Delete current
 mxIterSheet->Reset();
@@ -3010,7 +3028,7 @@ void SwStyleSheetIterator::InvalidateIterator()
 // this iterator not use a map?
 bFirstCalled = false;
 nLastPos = 0;
-aLst.Erase();
+aLst.clear();
 }
 
 void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-02 Thread Michael Meeks
 desktop/source/lib/lokandroid.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3a25b45122c374bee92bca5c417e47a27a9e57d2
Author: Michael Meeks 
Date:   Wed Jul 2 12:41:03 2014 +0100

WaE: couple of android / LibreOfficeKit bits.

Change-Id: I2ee864977d8bb266861af95fb64eb5c0852acee8

diff --git a/desktop/source/lib/lokandroid.cxx 
b/desktop/source/lib/lokandroid.cxx
index c23415f..d796342 100644
--- a/desktop/source/lib/lokandroid.cxx
+++ b/desktop/source/lib/lokandroid.cxx
@@ -19,7 +19,7 @@
 
 #include 
 
-#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, 
"LibreOfficeKit", __VA_ARGS__))
+// #define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, 
"LibreOfficeKit", __VA_ARGS__))
 
 /* LibreOfficeKit */
 
@@ -99,7 +99,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL 
Java_org_libreoffice_kit_Document_paintTi
 LibreOfficeKitDocument* pDocument = 
getHandle(pEnv, aObject);
 
 unsigned char* buffer = (unsigned char*) 
pEnv->GetDirectBufferAddress(aByteBuffer);
-jlong capacity = pEnv->GetDirectBufferCapacity(aByteBuffer);
+//jlong capacity = pEnv->GetDirectBufferCapacity(aByteBuffer);
 int nStride = 0;
 pDocument->pClass->paintTile(pDocument, buffer, nCanvasWidth, 
nCanvasHeight, &nStride, nTilePosX, nTilePosY, nTileWidth, nTileHeight);
 (void) nStride;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


minutes of ESC call ...

2014-07-03 Thread Michael Meeks
* Present
+ Cloph, Jacobo, Markus, Ptyl, Adam, David, Stephan, Norbert, Miklos,
  Caolan, Kendy, Eike, Lionel, Robinson, Michael S, Michael M, Andras, Muthu
 
* Completed Action Items:
+ research / seek a saner access2base solution for master (Stephan)
[ should probably do it as a bundled extension.
  pre-registration in 3.6 times caused the trouble.
  No pressing arguments against bundled extensions now. ]
+ look at fillattribute branch wrt. fdo#78908 & fdo#79158 (Miklos)
[ merged to master; discussed back-porting to 4.3 ...
  input appreciated from Michael S. Easiest to revert the
  first part from 4.3.
  Prefer to revert half-finished version for 4.3 (Caolan)
 + have another small fix in-hand, plenty more to come
AI:  + revert onto the -4-3 branch (Miklos)
]
+ review crazy SfxItemPool hash speedup patch (Kendy)
 
* Pending Action Items:
+ ask UX advise wrt. wrench icons (revert or not ?) (Astron)
+ scripting to generate / list last week's UI changes (Cloph)
[ in progress ... ]
+ blog about the sad realities of web plugins (Bjoern)
+ poke potential Boston Hackfest hosters again (Michael)
 
* GSOC Update (Cedric)
AI: ** All mentors, please invite students in good standing to LibOCon!
+ also remember to register for the conference:
 http://conference.libreoffice.org/2014/registration/
 
* Release Engineering update (Christian)
+ 4.3.0 RC2 status - is out.
+ 4.3.0 RC3 - final
+ several patches not integrated & need review.
+ need help reviewing them
+ filed for the -4-3 branch, but not automatically on -4-3-0
AI: ** please submit fixes for -4-3-0 as well.
+ 3x patches pending:

https://gerrit.libreoffice.org/#/q/status:open+project:core+branch:libreoffice-4-3,n,z
+ Triple review required for 4.3.0
+ Double review for libreoffice-4-3
+ 4.2.5 retrospective
+ no known problems; enabled auto-update without issues.
+ 4.2.6 RC1 deadline - Monday 
+ Windows 8 / registry key mangling / Photos
+ broken for Vista and above (Timar)
+ not a good idea to touch the KindMap at all.
+ happened last summer.
+ reported in April; mis-prioritised ?
+ made it a MAB today.
+ will 4.2.6 be released before 4.3.0 ? (Michael)
+ when did the on-line update to recommend 4.2 ?
+ last week (Cloph)
+ fix won't mend the broken system (Timar)
+ can publish a .reg file to mend it.
AI:  + build a 4.2.5.3 with registry fix (Cloph)
+ and ask internally for quick test / ship ?
+ only for Windows (Michael S)
+ Android / iOS remotes
+ Late features ?
+ OpenGL wrapper not finished for Mac (yet) (Markus)
+ no access to a Mac to write OpenGL bindings for VCL
+ not a huge fix, needs to be done by someone with access
+ is remote access good enough ? (Cloph)
 + unclear (Markus)
+ need the core OpenGL framework from Apple (Markus)
+ Announce anyway, and implement for Mac later
+ people are encouraged to contribute on Mac (Miklos)
+ Android only remote eg. (Kendy) 
+ 2 patches removing dialogs and strings to fix bugs (Markus)
+ 
http://cgit.freedesktop.org/libreoffice/core/commit/?id=77cec206e3c49490e6e380c52cb6d45277a03f65
+ 
http://cgit.freedesktop.org/libreoffice/core/commit/chart2?id=c97424f82a8d9d50d98e868cf0c1c2731ee15e74
+ disabling the GL3DChart in the chart wizard
+ workaround for new strings.
AI: + submit for patch review (Markus)
 
* More Mac Hardware (Michael)
  + sad to see OpenGL support not done - lack of macs.
  + approved $1k to buy Markus a Mac Mini (Norbert, Michael, Adam, Caolan)
 
* Crashtest update (Markus)
  + machine rebooting itself at random times midway through... (Markus)
  + on a TDF server, running perf VM & crash testing
  + other VMs run fine (Cloph)
 + no indication on the host side that the VM has problems.
 + just see in the guest that it has rebooted
 + last line in the journal, SEGV's in the test & then reboots ...
 + http://pastie.org/9347335
  + is there some physical machine we can run this on ? (Kendy)
 + problems in the past with machine becoming un-responsive (Markus)
 + happened for the last 3x test runs ...
 + can we run it more slowly (Michael)
+ currently run at ~100% of CPU, but can reduce parallelism 
(Markus)
+ did we get anywhere with distributing the work in the TB script 
(Michael)
+ no (Norbert)
AI: + can we try adding per-process resource limits (Markus)
  + 4.2 results are much worse than 4.3 results;

[Libreoffice-commits] dev-tools.git: scripts/build-portal.pl scripts/esc-bug-stats.pl

2014-07-04 Thread Michael Meeks
 scripts/build-portal.pl  |8 
 scripts/esc-bug-stats.pl |3 +++
 2 files changed, 11 insertions(+)

New commits:
commit 7dd15a2f55a5e1803d72038664ec3edd1a5b01d1
Author: Michael Meeks 
Date:   Fri Jul 4 09:05:24 2014 +0100

Find the perl modules next to the binary.

diff --git a/scripts/build-portal.pl b/scripts/build-portal.pl
index 32c977f..2e8edcc 100755
--- a/scripts/build-portal.pl
+++ b/scripts/build-portal.pl
@@ -1,10 +1,17 @@
 #!/usr/bin/perl -w
 
+use FindBin;
+use lib "$FindBin::Bin";
+
 use strict;
 use Bugzilla;
 
 my $git_dir = '/opt/libreoffice/push-tree';
 
+# FIXME: add a re-build-section thing ...
+# German comments: overall stats ... smallest  modules ...
+# a bit of text on how to fix that etc.
+
 sub usage()
 {
 print "build-portal.pl [--help] [--git path/to/git/repo]\n";
@@ -49,6 +56,7 @@ LibreOffice Development Portal
 $dialogs{ui_files} UI files
 $dialogs{ui_dialogs} dialogs left
 $dialogs{ui_tabpages} tab-pages left
+Get Involved
 
 
 
diff --git a/scripts/esc-bug-stats.pl b/scripts/esc-bug-stats.pl
index 5ac0810..872f9eb 100755
--- a/scripts/esc-bug-stats.pl
+++ b/scripts/esc-bug-stats.pl
@@ -1,5 +1,8 @@
 #!/usr/bin/perl -w
 
+use FindBin;
+use lib "$FindBin::Bin";
+
 use strict;
 use warnings;
 use Bugzilla;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-05 Thread Michael Meeks
 sc/source/core/data/column2.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 284c6681688f7075900d2351976c3611702411ce
Author: Michael Meeks 
Date:   Sat Jul 5 22:13:44 2014 +0100

fdo#80813 - avoid FMR by re-fetch pattern after a potential re-calculation.

Change-Id: Ib197f4cd74cd2c444a5f7c207fe2e5be14eea65d
Reviewed-on: https://gerrit.libreoffice.org/10095
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 18aee24..63c5e0f 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -131,11 +131,15 @@ long ScColumn::GetNeededSize(
 return 0;
 }
 
-//  conditional formatting
+// conditional formatting
 const SfxItemSet* pCondSet = pDocument->GetCondResult( nCol, nRow, nTab );
 
-//  line break?
+// fdo#80813 - fetching conditional result (GetCondResult) above can cause
+// a re-calculate which can delete and re-set the pattern we fetched.
+if (!rOptions.pPattern)
+pPattern = pAttrArray->GetPattern( nRow );
 
+//  line break?
 const SfxPoolItem* pCondItem;
 SvxCellHorJustify eHorJust;
 if (pCondSet &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: filter/CppunitTest_filter_priority.mk filter/CppunitTest_filter_xslt.mk filter/Module_filter.mk filter/qa

2014-07-07 Thread Michael Meeks
 filter/CppunitTest_filter_priority.mk |   42 +++
 filter/CppunitTest_filter_xslt.mk |6 --
 filter/Module_filter.mk   |1 
 filter/qa/cppunit/priority-test.cxx   |   94 ++
 4 files changed, 138 insertions(+), 5 deletions(-)

New commits:
commit 0f8cf397d4de28ab9e16d4d1c6ca408323d7e189
Author: Michael Meeks 
Date:   Mon Jul 7 18:04:33 2014 +0100

fdo#80955 - add a unit test.

Change-Id: Ie79a86827c4ee9feabcabf2530b30466f95905ed

diff --git a/filter/CppunitTest_filter_priority.mk 
b/filter/CppunitTest_filter_priority.mk
new file mode 100644
index 000..e5046ac
--- /dev/null
+++ b/filter/CppunitTest_filter_priority.mk
@@ -0,0 +1,42 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,filter_priority))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,filter_priority))
+$(eval $(call gb_CppunitTest_use_ure,filter_priority))
+
+$(eval $(call gb_CppunitTest_use_configuration,filter_priority))
+
+$(eval $(call gb_CppunitTest_use_external,filter_priority,boost_headers))
+
+$(eval $(call gb_CppunitTest_use_libraries,filter_priority, \
+   comphelper \
+   unotest \
+   cppuhelper \
+   cppu \
+   sal \
+   $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_components,filter_priority,\
+   configmgr/source/configmgr \
+   filter/source/config/cache/filterconfig1 \
+   framework/util/fwk \
+   framework/util/fwl \
+   i18npool/util/i18npool \
+   ucb/source/core/ucb1 \
+   ucb/source/ucp/file/ucpfile1 \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,filter_priority, \
+   filter/qa/cppunit/priority-test \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/filter/CppunitTest_filter_xslt.mk 
b/filter/CppunitTest_filter_xslt.mk
index feaf502..1231490 100644
--- a/filter/CppunitTest_filter_xslt.mk
+++ b/filter/CppunitTest_filter_xslt.mk
@@ -9,11 +9,7 @@
 
 $(eval $(call gb_CppunitTest_CppunitTest,filter_xslt))
 
-$(eval $(call gb_CppunitTest_use_api,filter_xslt,\
-   offapi \
-   udkapi \
-))
-
+$(eval $(call gb_CppunitTest_use_sdk_api,filter_xslt))
 $(eval $(call gb_CppunitTest_use_ure,filter_xslt))
 $(eval $(call gb_CppunitTest_use_vcl,filter_xslt))
 
diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk
index 3558f44..79100a7 100644
--- a/filter/Module_filter.mk
+++ b/filter/Module_filter.mk
@@ -80,6 +80,7 @@ endif
 
 $(eval $(call gb_Module_add_check_targets,filter,\
 CppunitTest_filter_xslt \
+CppunitTest_filter_priority \
 ))
 
 ifneq ($(DISABLE_CVE_TESTS),TRUE)
diff --git a/filter/qa/cppunit/priority-test.cxx 
b/filter/qa/cppunit/priority-test.cxx
new file mode 100644
index 000..70093fb
--- /dev/null
+++ b/filter/qa/cppunit/priority-test.cxx
@@ -0,0 +1,94 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+// Unit test to check that we get the right filters for the right extensions.
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+
+
+using namespace std;
+using namespace css;
+
+namespace {
+
+class PriorityFilterTest
+: public test::BootstrapFixtureBase
+{
+public:
+void testPriority();
+
+CPPUNIT_TEST_SUITE(PriorityFilterTest);
+CPPUNIT_TEST(testPriority);
+CPPUNIT_TEST_SUITE_END();
+};
+
+void PriorityFilterTest::testPriority()
+{
+uno::Reference xDetection(
+
comphelper::getProcessServiceFactory()->createInstance("com.sun.star.document.TypeDetection"),
 uno::UNO_QUERY);
+CPPUNIT_ASSERT_MESSAGE("No type detection component", xDetection.is());
+
+static struct {
+const char *pURL;
+const char *pFormat;
+} aToCheck[] = {
+{ "file:///tmp/foo.xls", "calc_MS_Excel_97" }
+// TODO: expand this to check more of these priorities
+};
+
+for (size_t i = 0; i < SAL_N_ELEMENTS(aToCheck); i++)
+{
+OUString aURL = OUString::createFromAscii(aToCheck[i].pURL);
+try
+{
+OUString aTypeName = xDetection->queryTypeByURL(aURL);
+
+OUString aFormatCorrect = 
OUString::createFromAscii(aToCheck[i].pFormat);
+OUStringBuffer aMsg("Mis-matching formats ");
+aMsg.append("'");
+aMsg.append(aTypeName);
+aMsg.append("

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

2014-07-08 Thread Michael Meeks
 configmgr/source/nodemap.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 58ceb16141eb003d921049cc231578ff2d685e60
Author: Michael Meeks 
Date:   Tue Jul 8 09:39:03 2014 +0100

configmgr: fix node cache clearing.

Change-Id: Idd6c227b8f50446c1d3c48385de6c843faf47466

diff --git a/configmgr/source/nodemap.hxx b/configmgr/source/nodemap.hxx
index dcfac2b..a000b30 100644
--- a/configmgr/source/nodemap.hxx
+++ b/configmgr/source/nodemap.hxx
@@ -52,8 +52,8 @@ class NodeMap
 iterator end() { return maImpl.end(); }
 const_iterator end() const { return maImpl.end(); }
 
-rtl::Reference &operator[](const OUString &aStr) { return 
maImpl[aStr]; /* clearCache(); */ }
-std::pair insert(const value_type &vt) { return 
maImpl.insert(vt); /* clearCache(); */ }
+rtl::Reference &operator[](const OUString &aStr) { clearCache(); 
return maImpl[aStr]; }
+std::pair insert(const value_type &vt) { clearCache(); 
return maImpl.insert(vt); }
 void clear() { maImpl.clear(); clearCache(); }
 void erase(const iterator &it) { maImpl.erase(it); clearCache(); }
 void erase(const OUString &aStr) { maImpl.erase(aStr); clearCache(); }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-08 Thread Michael Meeks
 include/tools/date.hxx  |3 +++
 tools/source/datetime/tdate.cxx |   31 +--
 2 files changed, 24 insertions(+), 10 deletions(-)

New commits:
commit a2b44216f1b1e8d7f4f293e13b257f49ae13de61
Author: Michael Meeks 
Date:   Tue Jul 8 11:49:59 2014 +0100

fdo#66507 - accelerate common datum date conversion to days.

Saves ~40bn cycles, 10% of calculation for the bug document.

Change-Id: I9d48706ad2cfe290965b648306d95b4d66e5fc63

diff --git a/include/tools/date.hxx b/include/tools/date.hxx
index 6b08e4a..e750573 100644
--- a/include/tools/date.hxx
+++ b/include/tools/date.hxx
@@ -190,6 +190,9 @@ public:
 /// Semantically identical to Normalize() member method.
 static bool Normalize( sal_uInt16 & rDay, sal_uInt16 & rMonth, sal_uInt16 
& rYear );
 
+ private:
+/// An accelerated form of DateToDays on this date
+long GetAsNormalizedDays() const;
 };
 
 #endif
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index 4fc2fc0..e1e640d 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -62,6 +62,17 @@ sal_uInt16 Date::GetDaysInMonth( sal_uInt16 nMonth, 
sal_uInt16 nYear )
 return ImplDaysInMonth( nMonth, nYear);
 }
 
+long Date::GetAsNormalizedDays() const
+{
+// This is a very common datum we often calculate from.
+if (nDate == 18991230) // 1899-12-30
+{
+assert(DateToDays( GetDay(), GetMonth(), GetYear() ) == 693594);
+return 693594;
+}
+return DateToDays( GetDay(), GetMonth(), GetYear() );
+}
+
 long Date::DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear )
 {
 long nDays;
@@ -173,7 +184,7 @@ void Date::SetYear( sal_uInt16 nNewYear )
 
 DayOfWeek Date::GetDayOfWeek() const
 {
-return (DayOfWeek)((sal_uIntPtr)(DateToDays( GetDay(), GetMonth(), 
GetYear() )-1) % 7);
+return (DayOfWeek)((sal_uIntPtr)(GetAsNormalizedDays()-1) % 7);
 }
 
 sal_uInt16 Date::GetDayOfYear() const
@@ -263,7 +274,8 @@ sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
 {
 // next x_Sunday == first x_Sunday in the new year
 // == still the same week!
-long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
+long nTempDays = GetAsNormalizedDays();
+
 nTempDays +=  6 - (GetDayOfWeek()+(7-(short)eStartDay)) % 7;
 sal_uInt16  nDay;
 sal_uInt16  nMonth;
@@ -405,7 +417,7 @@ Date& Date::operator +=( long nDays )
 if (nDays == 0)
 return *this;
 
-longnTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
+long nTempDays = GetAsNormalizedDays();
 
 nTempDays += nDays;
 if ( nTempDays > MAX_DAYS )
@@ -430,7 +442,7 @@ Date& Date::operator -=( long nDays )
 if (nDays == 0)
 return *this;
 
-longnTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
+long nTempDays = GetAsNormalizedDays();
 
 nTempDays -= nDays;
 if ( nTempDays > MAX_DAYS )
@@ -451,7 +463,7 @@ Date& Date::operator ++()
 sal_uInt16  nDay;
 sal_uInt16  nMonth;
 sal_uInt16  nYear;
-longnTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
+long nTempDays = GetAsNormalizedDays();
 
 if ( nTempDays < MAX_DAYS )
 {
@@ -468,7 +480,7 @@ Date& Date::operator --()
 sal_uInt16  nDay;
 sal_uInt16  nMonth;
 sal_uInt16  nYear;
-longnTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
+long nTempDays = GetAsNormalizedDays();
 
 if ( nTempDays > 1 )
 {
@@ -509,10 +521,9 @@ Date operator -( const Date& rDate, long nDays )
 
 long operator -( const Date& rDate1, const Date& rDate2 )
 {
-sal_uIntPtr  nTempDays1 = Date::DateToDays( rDate1.GetDay(), 
rDate1.GetMonth(),
-rDate1.GetYear() );
-sal_uIntPtr  nTempDays2 = Date::DateToDays( rDate2.GetDay(), 
rDate2.GetMonth(),
-rDate2.GetYear() );
+sal_uIntPtr nTempDays1 = rDate1.GetAsNormalizedDays();
+sal_uIntPtr nTempDays2 = rDate2.GetAsNormalizedDays();
+
 return nTempDays1 - nTempDays2;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dev-tools.git: scripts/Bugzilla.pm scripts/esc-bug-stats.pl

2014-07-08 Thread Michael Meeks
 scripts/Bugzilla.pm  |1 +
 scripts/esc-bug-stats.pl |   21 +
 2 files changed, 18 insertions(+), 4 deletions(-)

New commits:
commit 19dc302242d4731ccedf249fd06291aa15638ddb
Author: Michael Meeks 
Date:   Tue Jul 8 17:07:37 2014 +0100

Fix scripts for 4.4

diff --git a/scripts/Bugzilla.pm b/scripts/Bugzilla.pm
index 8ee0e58..8093c8b 100644
--- a/scripts/Bugzilla.pm
+++ b/scripts/Bugzilla.pm
@@ -57,6 +57,7 @@ my %sadly_non_libreoffice = (
 'Rex Dieter' => 1,
 'Tom Stellard' => 1,
 'almos' => 1,
+'Andreas Boll' => 1,
 );
 
 sub get_url($)
diff --git a/scripts/esc-bug-stats.pl b/scripts/esc-bug-stats.pl
index 872f9eb..508a95b 100755
--- a/scripts/esc-bug-stats.pl
+++ b/scripts/esc-bug-stats.pl
@@ -29,6 +29,7 @@ sub build_overall_bugstats()
 }
 
 my %bug_to_ver = (
+'4.4' => '79641',
 '4.3' => '75025',
 '4.2' => '65675',
 '4.1' => '60270',
@@ -196,6 +197,12 @@ print << "EOF"
   Closed 4.3
  
  
+  Open 4.4
+ 
+ 
+  Closed 4.4
+ 
+ 
   Total 3.5
  
  
@@ -214,6 +221,9 @@ print << "EOF"
   Total 4.3
  
  
+  Total 4.4
+ 
+ 
   Total Open
  
  
@@ -234,17 +244,20 @@ print << "EOF"
   
  
  
- 
+ 
  
- 
+ 
+ 
+ 
  
  
  
  
  
  
- 
- 
+ 
+ 
+ 
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-09 Thread Michael Meeks
 sw/source/uibase/inc/content.hxx |   14 --
 1 file changed, 14 deletions(-)

New commits:
commit fe6f8010595dafc5fa8baffbaf92a09526aca3df
Author: Michael Meeks 
Date:   Wed Jul 9 10:09:20 2014 +0100

remove apparently unused SwPopup.

Change-Id: I2709a295c69131ec9536e97c27ee8ab46dde203f

diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx
index 880633d..5ff34cd 100644
--- a/sw/source/uibase/inc/content.hxx
+++ b/sw/source/uibase/inc/content.hxx
@@ -33,20 +33,6 @@ class SwRangeRedline;
 
 //  helper classes
 
-class SwPopup : public PopupMenu
-{
-sal_uInt16  nCurId;
-virtual voidSelect() SAL_OVERRIDE {nCurId = GetCurItemId();}
-
-public:
-SwPopup() :
-PopupMenu(),
-nCurId(USHRT_MAX){}
-
-sal_uInt16  GetCurId() const { return nCurId; }
-
-};
-
 class SwOutlineContent : public SwContent
 {
 sal_uInt16  nOutlinePos;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: memory release in libreoffice

2014-07-09 Thread Michael Meeks
Hi Mahesh,

On Tue, 2014-07-08 at 07:47 +, Mahesh Patil wrote:
> I have problem in libreoffice code. Libreoffice is not releasing
> memory after converting document to pdf. Can someone explain me how to
> release memory. which function is called for this.

Hmm - of course, it is quite possible / probable that there are memory
leaks - unfortunately.

> Reference < XCloseable > xClose( xDoc, UNO_QUERY );
> if ( xClose.is() )
> xClose->close( sal_True );
> else
> {
> Reference < XComponent > xComp( xDoc, UNO_QUERY );
> if ( xComp.is() )
> xComp->dispose();
> }

It is possible that you want to do the dispose after the close
unconditionally; but I'm really no expert here.

Have you considered using the LibreOfficeKit API in 4.3 ? (try a recent
4.3.0 rc) that provides a native C/C++ API for linking directly into the
LibreOffice process to do this work - which should make debugging rather
easier.

Beyond that I'd suggest running the soffice.bin binary under lsan or
valgrind to detect leaks and see where the memory is lurking after that
cycle. With some clear leak traces it shouldn't be too hard to work out
what's going on. Unfortunately it is possible that what is apparently
leaked is image caches etc. that are cleaned up at exit (but not on
document close) which would hide the leaks.

How much are you loosing ?

Thanks,

Michael.

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

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


[Libreoffice-commits] core.git: configure.ac

2014-07-09 Thread Michael Meeks
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit af433f404f14c5dbed77b5fb764cf24caca9631e
Author: Michael Meeks 
Date:   Wed Jul 9 13:46:44 2014 +0100

fdo#75937 - package galaxy theme in a form we like; cf. fdo#81103.

Change-Id: If920257f141a2dc4208d1fd322b875fdc8315cee

diff --git a/configure.ac b/configure.ac
index 7be9bd2..5d25cf7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11621,7 +11621,7 @@ dnl 
===
 AC_MSG_CHECKING([which themes to include])
 # if none given use default subset of available themes
 if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
-with_theme="crystal default hicontrast oxygen tango sifr"
+with_theme="crystal default galaxy hicontrast oxygen tango sifr"
 test -z "$ENABLE_RELEASE_BUILD" && with_theme="$with_theme tango_testing"
 fi
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac

2014-07-10 Thread Michael Meeks
 configure.ac |   15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 7413c75b71cb44c5c86a297a3e02784c9f347212
Author: Michael Meeks 
Date:   Thu Jul 10 13:24:17 2014 +0100

Cleanup configure's make recommendations for stale make versions.

Change-Id: Ib0c546e835bd3e6961632d4644901436061dc072

diff --git a/configure.ac b/configure.ac
index 5d25cf7..490097a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13068,6 +13068,14 @@ fi
 
 
 if test "$STALE_MAKE" = "TRUE" -a "$build_os" = "cygwin"; then
+
+cygwin_arch=`echo $MACHTYPE | sed 's/-.*//'`
+if test "$cygwin_arch" = "x86_64"; then
+download_make_url=http://users.freedesktop.org/~michael/x86_64/make
+else
+download_make_url=http://dev-www.libreoffice.org/bin/cygwin/make
+fi
+
 cat << _EOS
 
 WARNING:
@@ -13078,14 +13086,15 @@ to install a pre-compiled binary make for cygwin
 
 mkdir -p /opt/lo/bin
 cd /opt/lo/bin
-wget http://dev-www.libreoffice.org/bin/cygwin/make
+wget $download_make_url
 chmod +x make
 
 to install from source:
 place yourself in a working directory of you choice.
 
-git clone git://anongit.freedesktop.org/libreoffice/contrib/dev-tools
-cd dev-tools/make-3.82-gbuild
+git clone https://gerrit.libreoffice.org/p/gnu-make-lo.git
+cd gnu-make-lo
+autoreconf -i
 ./configure --prefix=/opt/lo
 make
 make install
___
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' - configure.ac

2014-07-10 Thread Michael Meeks
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ba771af1f126f2c3b45a89e2f18689babdb77c45
Author: Michael Meeks 
Date:   Wed Jul 9 13:46:44 2014 +0100

fdo#75937 - package galaxy theme in a form we like; cf. fdo#81103.

Change-Id: If920257f141a2dc4208d1fd322b875fdc8315cee
Reviewed-on: https://gerrit.libreoffice.org/10171
Reviewed-by: Muthu Subramanian K 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/configure.ac b/configure.ac
index ec74b22..35e1534 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11563,7 +11563,7 @@ dnl 
===
 AC_MSG_CHECKING([which themes to include])
 # if none given use default subset of available themes
 if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
-with_theme="crystal default hicontrast oxygen tango sifr"
+with_theme="crystal default galaxy hicontrast oxygen tango sifr"
 test -z "$ENABLE_RELEASE_BUILD" && with_theme="$with_theme tango_testing"
 fi
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


minutes of ESC call ...

2014-07-10 Thread Michael Meeks
* Present:
+ Michael S, Christian, Cedric, Stephan, Ptyl, Miklos, Jacobo, Timar,
  Eike, Caolan, Michael M, Bjoern, Muthu, Jan-Marek, Tibby, David,
  Kohei
 
* Completed Action Items:
+ Developers: please submit fixes for -4-3-0 as well.
+ All mentors, please invite students in good standing to LibOCon!
[ 3 students said they would come already ]
+ scripting to generate / list last week's UI changes (Cloph)
[ to arrive on Saturday ]
+ revert partial fillattribute work on the -4-3 branch (Miklos)
[ one more review appreciated for 4-3-0 ]
+ poke potential Boston Hackfest hosters again (Michael)
[ perhaps Xamarin will host us ].
+ build a 4.2.5.3 with registry fix (Cloph)
[ done a build, will push it live when 4.2.6rc1 is pushed ]
+ invite Umesh Kadam to next ESC call (Michael)
 
* Pending Action Items:
+ ask UX advise wrt. wrench icons (revert or not ?) (Astron)
+ blog about the sad realities of web plugins (Bjoern)
+ submit GL3DChart disable for patch review (Markus)
+ try to add per-process resource limits for crashtest (Markus)
+ eg. bash's builtin ulimit [-SHacdflmnpstuv [limit]] etc.
+ setup some VM's that can be created on-demand (Cloph)
 
* GSOC Update (Cedric)
+ remind mentors to invite students to the conference,
  TDF will pay for their travel (if they book in a timely way)
  + 4/10 is not a great score.
+ also remember to register for the conference:
 http://conference.libreoffice.org/2014/registration/
 
* Release Engineering update (Christian)
+ 4.2.6 RC1 being up-loaded to staging
+ will announce shortly.
+ then will push to the mirrors for general public
+ 4.3.0 RC3 - final deadline on Monday for this
+ make sure your patches are pushed & reviewed in time.

https://gerrit.libreoffice.org/#/q/status:open+project:core+branch:libreoffice-4-3-0,n,z
+ Android / iOS remotes
+ patch in gerrit for gradle build-system.
+ will investigate that wrt. tools for new android developers
+ requirements (Michael)
1. reproducible - gradle allows explicit versions unlike
   black magic / mavern. (Cloph)
2. compliant - need to be able to re-build the same thing
   in future - identically
  + virtually no external deps (Cloph)
 
* 2 minute Umesh / Synezip introduction (Umesh)
  + working on interop. of DOCX, working for last 8-10 months.
  + chart / and other areas.
  + working on combinations of shapes import / export
  + also working on regression tests
  + running scripts on random files from bugzilla
  + see if there is any crash / corruption etc.
  + working on crash/corruption issues too
AI:   + can you open-source those and speak on the conference (Umesh)
 
* Mail Merge (Eilidh,Bjoern,Jan-Marek)
  + Multiple people looking at this (Bjoern)
  + no wonder it is very slow; if you use the std. way of clicking 
through the UI
  + it creates one document, then it merges the 2nd one into that & 
re-layout
with each step.
  + huge cost for 10k documents - some N^2.
  + one reason - is to remember the page number to split the document
  + really quite insane.
  + naive approach - use bookmarks to split the documents ...
  + could save the re-layout.
  + Have some examples - 16k -> 20k documents (Jan Marek)
  + the copying of the docs gets slower & slower.
  + https://bugs.freedesktop.org/show_bug.cgi?id=80823
  + layouting is 3-4% the rest is just copying.
  + in the copying of the underlying document.
  + Primary problem cf. mail (Jan Marek)
  + see 
http://lists.freedesktop.org/archives/libreoffice/2014-July/062227.html for the 
gory details
  + loading of a document is broken: with paragraph-bound anchors.
  + patches in private/jmux/mailmerge-fixes branch - can create copies.
  + before that, copying from A->B is broken.
  + lots of pending patches; want to finish them and write
some unit tests from test docs in mail-merge bugs.
  + https://bugs.freedesktop.org/show_bug.cgi?id=80926
  + Bjoern's callgrind results are different (Bjoern)
  + with an artificial document, perhaps not representative, but
showed the problem ~all in layout.
  + Something has changed wrt. copying the SwNodes (Jan-Marek)
  + performance is hard to keep good (Michael)
  + be great to have a test we can add to our performance tests
  + working on a branch: private/jmux/mailmerge-fixes
  + should all work on same branch ? (Bjoern)
  + currently doing re-factoring elsewhere (Ellie)
  + breaking down the massive / monolithic mail merge fn.
  + mail-merge is now working c

[Libreoffice-commits] core.git: Branch 'libreoffice-4-3-0' - configure.ac

2014-07-11 Thread Michael Meeks
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d1ed906b4cf0ab46a975f3caab8dfd1b5c7f4118
Author: Michael Meeks 
Date:   Wed Jul 9 13:46:44 2014 +0100

fdo#75937 - package galaxy theme in a form we like; cf. fdo#81103.

Change-Id: If920257f141a2dc4208d1fd322b875fdc8315cee
Reviewed-on: https://gerrit.libreoffice.org/10172
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
Reviewed-by: Matúš Kukan 
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/configure.ac b/configure.ac
index 1de8036..047bf0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11563,7 +11563,7 @@ dnl 
===
 AC_MSG_CHECKING([which themes to include])
 # if none given use default subset of available themes
 if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
-with_theme="crystal default hicontrast oxygen tango sifr"
+with_theme="crystal default galaxy hicontrast oxygen tango sifr"
 test -z "$ENABLE_RELEASE_BUILD" && with_theme="$with_theme tango_testing"
 fi
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-11 Thread Michael Meeks
 sax/source/fastparser/fastparser.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 9af1cbf233620e7c9d3fa9d8f55ab0e05dca6c84
Author: Michael Meeks 
Date:   Fri Jul 11 20:49:33 2014 +0100

fdo#81214 - tolerate exceptions thrown inside XFastParser callbacks.

Not an ideal solution; ideally we should not throw the exceptions,
and stop the parser as soon as something bad like this happens; but
hopefully exception throwing is reasonable exceptional.

Change-Id: If619592533b2929c671e2b03eb8a83480bd92c54

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index 17e0213..d3103d1 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -607,12 +607,11 @@ void Entity::throwException( const ::rtl::Reference< 
FastLocatorImpl > &xDocumen
 // the consuming thread.
 void Entity::saveException( const Exception &e )
 {
-// only store the first exception
-if( !maSavedException.hasValue() )
-{
-maSavedException <<= e;
-XML_StopParser( mpParser, /* resumable? */ XML_FALSE );
-}
+// fdo#81214 - allow the parser to run on after an exception,
+// unexpectedly some 'startElements' produce an UNO_QUERY_THROW
+// for XComponent; and yet expect to continue parsing.
+SAL_WARN("sax", "Unexpected exception from XML parser " << e.Message);
+maSavedException <<= e;
 }
 
 } // namespace
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'test/for/libreoffice-4-2'

2014-07-11 Thread Michael Meeks
New branch 'test/for/libreoffice-4-2' available with the following commits:
commit d41228e5ba98be7270a3352cddcd1d860c698e8b
Author: Michael Meeks 
Date:   Fri Jul 11 20:49:33 2014 +0100

fdo#81214 - tolerate exceptions thrown inside XFastParser callbacks.

Not an ideal solution; ideally we should not throw the exceptions,
and stop the parser as soon as something bad like this happens; but
hopefully exception throwing is reasonable exceptional.

Change-Id: If619592533b2929c671e2b03eb8a83480bd92c54

___
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: Branch 'libreoffice-4-3' - sax/source

2014-07-13 Thread Michael Meeks
 sax/source/fastparser/fastparser.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 7cd2871b594ff49267b1fe8c3100e1ca717928c6
Author: Michael Meeks 
Date:   Fri Jul 11 20:49:33 2014 +0100

fdo#81214 - tolerate exceptions thrown inside XFastParser callbacks.

Not an ideal solution; ideally we should not throw the exceptions,
and stop the parser as soon as something bad like this happens; but
hopefully exception throwing is reasonable exceptional.

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

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index 17e0213..d3103d1 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -607,12 +607,11 @@ void Entity::throwException( const ::rtl::Reference< 
FastLocatorImpl > &xDocumen
 // the consuming thread.
 void Entity::saveException( const Exception &e )
 {
-// only store the first exception
-if( !maSavedException.hasValue() )
-{
-maSavedException <<= e;
-XML_StopParser( mpParser, /* resumable? */ XML_FALSE );
-}
+// fdo#81214 - allow the parser to run on after an exception,
+// unexpectedly some 'startElements' produce an UNO_QUERY_THROW
+// for XComponent; and yet expect to continue parsing.
+SAL_WARN("sax", "Unexpected exception from XML parser " << e.Message);
+maSavedException <<= e;
 }
 
 } // namespace
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sax/source

2014-07-14 Thread Michael Meeks
 sax/source/fastparser/fastparser.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit b8d8ec78c3e242d94963beef5aff6335f047ef59
Author: Michael Meeks 
Date:   Fri Jul 11 20:49:33 2014 +0100

fdo#81214 - tolerate exceptions thrown inside XFastParser callbacks.

Not an ideal solution; ideally we should not throw the exceptions,
and stop the parser as soon as something bad like this happens; but
hopefully exception throwing is reasonable exceptional.

Change-Id: If619592533b2929c671e2b03eb8a83480bd92c54
Reviewed-on: https://gerrit.libreoffice.org/10289
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index e10ce3f..2ae9abf 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -627,12 +627,11 @@ void Entity::throwException( const ::rtl::Reference< 
FastLocatorImpl > &xDocumen
 // the consuming thread.
 void Entity::saveException( const Exception &e )
 {
-// only store the first exception
-if( !maSavedException.hasValue() )
-{
-maSavedException <<= e;
-XML_StopParser( mpParser, /* resumable? */ XML_FALSE );
-}
+// fdo#81214 - allow the parser to run on after an exception,
+// unexpectedly some 'startElements' produce an UNO_QUERY_THROW
+// for XComponent; and yet expect to continue parsing.
+SAL_WARN("sax", "Unexpected exception from XML parser " << e.Message);
+maSavedException <<= e;
 }
 
 } // namespace
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2-6' - sax/source

2014-07-15 Thread Michael Meeks
 sax/source/fastparser/fastparser.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 779c4cf10a9fd7e6d3c165d709531946cf68939d
Author: Michael Meeks 
Date:   Fri Jul 11 20:49:33 2014 +0100

fdo#81214 - tolerate exceptions thrown inside XFastParser callbacks.

Not an ideal solution; ideally we should not throw the exceptions,
and stop the parser as soon as something bad like this happens; but
hopefully exception throwing is reasonable exceptional.

Change-Id: If619592533b2929c671e2b03eb8a83480bd92c54
Reviewed-on: https://gerrit.libreoffice.org/10289
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 
(cherry picked from commit b8d8ec78c3e242d94963beef5aff6335f047ef59)
Reviewed-on: https://gerrit.libreoffice.org/10290
Reviewed-by: David Tardon 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index e10ce3f..2ae9abf 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -627,12 +627,11 @@ void Entity::throwException( const ::rtl::Reference< 
FastLocatorImpl > &xDocumen
 // the consuming thread.
 void Entity::saveException( const Exception &e )
 {
-// only store the first exception
-if( !maSavedException.hasValue() )
-{
-maSavedException <<= e;
-XML_StopParser( mpParser, /* resumable? */ XML_FALSE );
-}
+// fdo#81214 - allow the parser to run on after an exception,
+// unexpectedly some 'startElements' produce an UNO_QUERY_THROW
+// for XComponent; and yet expect to continue parsing.
+SAL_WARN("sax", "Unexpected exception from XML parser " << e.Message);
+maSavedException <<= e;
 }
 
 } // namespace
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-16 Thread Michael Meeks
 writerfilter/source/ooxml/OOXMLFactory.cxx |2 +-
 writerfilter/source/ooxml/OOXMLFactory.hxx |   15 +--
 2 files changed, 14 insertions(+), 3 deletions(-)

New commits:
commit 9aeadc76a4f2c878f83f07959d9d1694ff13fddf
Author: Michael Meeks 
Date:   Wed Jul 16 15:56:49 2014 +0100

Cleanup intrusive_ptr usage temporarily.

When we update boost, we should use boost::intrusive_ref_counter
in non-threadsafe mode instead here.

Change-Id: Id63610bf14d7fcb7f681e009a5ac6e4f8e077a81

diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx 
b/writerfilter/source/ooxml/OOXMLFactory.cxx
index c45b4f5..eb5e4b4 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -102,8 +102,8 @@ OOXMLFactory::Pointer_t OOXMLFactory::m_Instance;
 OOXMLFactory::OOXMLFactory()
 {
 // multi-thread-safe mutex for all platforms
-
 osl::MutexGuard aGuard(OOXMLFactory_Mutex::get());
+mnRefCnt = 0;
 }
 
 OOXMLFactory::~OOXMLFactory()
diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx 
b/writerfilter/source/ooxml/OOXMLFactory.hxx
index 405e47a..0150acb 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.hxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.hxx
@@ -148,16 +148,8 @@ public:
 void endAction(OOXMLFastContextHandler * pHandler, Token_t nToken);
 
 virtual ~OOXMLFactory();
-inline void IncRef() const{osl_atomic_increment(&mnRefCnt);}
-inline void DecRef() const
-{
-if (!osl_atomic_decrement(&mnRefCnt))
-const_cast(this)->Delete();
-}
-   inline void Delete() {delete this;}
-   inline oslInterlockedCount GetRef() const { return mnRefCnt; }
-protected:
-  mutable oslInterlockedCount mnRefCnt;// reference count
+public:
+sal_uInt32 mnRefCnt;
 private:
 static Pointer_t m_Instance;
 
@@ -170,13 +162,14 @@ private:
   Token_t Element);
 };
 
-  inline void intrusive_ptr_add_ref(const OOXMLFactory* p)
+  inline void intrusive_ptr_add_ref(OOXMLFactory* p)
   {
-p->IncRef();
+  p->mnRefCnt++;
   }
-  inline void intrusive_ptr_release(const OOXMLFactory* p)
+  inline void intrusive_ptr_release(OOXMLFactory* p)
   {
-p->DecRef();
+  if (!(--p->mnRefCnt))
+  delete p;
   }
 }
 }
commit c04a0895df86f40faef1bc093f7010f374df9d0b
Author: Fahad Al-Saidi 
Date:   Wed Jul 16 11:30:43 2014 +0400

fdo#80907 Implemented OOXMLFactory using boost::intrusive_ptr.

Change-Id: I350bca3544680ab8227d3bb1c093cba981cba5fc

diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx 
b/writerfilter/source/ooxml/OOXMLFactory.hxx
index ac021ad..405e47a 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.hxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.hxx
@@ -28,6 +28,7 @@
 #include 
 
 #include "OOXMLFastContextHandler.hxx"
+#include 
 
 namespace writerfilter {
 namespace ooxml {
@@ -127,7 +128,7 @@ protected:
 class OOXMLFactory
 {
 public:
-typedef boost::shared_ptr Pointer_t;
+typedef boost::intrusive_ptrPointer_t;
 
 static Pointer_t getInstance();
 
@@ -147,7 +148,16 @@ public:
 void endAction(OOXMLFastContextHandler * pHandler, Token_t nToken);
 
 virtual ~OOXMLFactory();
-
+inline void IncRef() const{osl_atomic_increment(&mnRefCnt);}
+inline void DecRef() const
+{
+if (!osl_atomic_decrement(&mnRefCnt))
+const_cast(this)->Delete();
+}
+   inline void Delete() {delete this;}
+   inline oslInterlockedCount GetRef() const { return mnRefCnt; }
+protected:
+  mutable oslInterlockedCount mnRefCnt;// reference count
 private:
 static Pointer_t m_Instance;
 
@@ -160,6 +170,14 @@ private:
   Token_t Element);
 };
 
+  inline void intrusive_ptr_add_ref(const OOXMLFactory* p)
+  {
+p->IncRef();
+  }
+  inline void intrusive_ptr_release(const OOXMLFactory* p)
+  {
+p->DecRef();
+  }
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-24 Thread Michael Meeks
 svtools/source/control/ruler.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit b0cdd038ee192dcc0d83182a33fc8c0242ceb1dd
Author: Michael Meeks 
Date:   Thu Jul 24 14:24:25 2014 -0400

fdo#51534 - rulers should have app-background by default (apparently).

Change-Id: I981febb02074ed323732ef7c19e89f1e946604f1

diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index bf719a3..9d7e288 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1021,7 +1022,10 @@ void Ruler::ImplInitSettings( bool bFont, bool 
bForeground, bool bBackground )
 if ( IsControlBackground() )
 aColor = GetControlBackground();
 else
-aColor = rStyleSettings.GetDialogColor();
+{
+svtools::ColorConfig aColorConfig;
+aColor = Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND 
).nColor );
+}
 SetBackground( aColor );
 }
 
___
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' - svtools/source

2014-07-24 Thread Michael Meeks
 svtools/source/control/ruler.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit e0a7557e97de0bad7ff8510c768bdbed6cdae6f5
Author: Michael Meeks 
Date:   Thu Jul 24 14:24:25 2014 -0400

fdo#51534 - rulers should have app-background by default (apparently).

Change-Id: I981febb02074ed323732ef7c19e89f1e946604f1
Reviewed-on: https://gerrit.libreoffice.org/10519
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 4332966..29655de 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1021,7 +1022,10 @@ void Ruler::ImplInitSettings( bool bFont, bool 
bForeground, bool bBackground )
 if ( IsControlBackground() )
 aColor = GetControlBackground();
 else
-aColor = rStyleSettings.GetDialogColor();
+{
+svtools::ColorConfig aColorConfig;
+aColor = Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND 
).nColor );
+}
 SetBackground( aColor );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: editeng/CppunitTest_editeng_core.mk editeng/qa editeng/source

2014-07-27 Thread Michael Meeks
 editeng/CppunitTest_editeng_core.mk |1 
 editeng/qa/unit/core-test.cxx   |  100 -
 editeng/source/editeng/editdoc.cxx  |  169 
 editeng/source/editeng/editdoc.hxx  |9 +
 editeng/source/editeng/impedit4.cxx |6 -
 5 files changed, 224 insertions(+), 61 deletions(-)

New commits:
commit 274b628a2b523eb45e297352a85f0177c6e747f0
Author: Michael Meeks 
Date:   Sun Jul 27 00:21:50 2014 -0400

bnc#467459 - fix editeng text search with expanded fields.

Change-Id: If59d0e2f886e94148b81cb6cfcad067733fcb918

diff --git a/editeng/CppunitTest_editeng_core.mk 
b/editeng/CppunitTest_editeng_core.mk
index 171a03f..488a5d0 100644
--- a/editeng/CppunitTest_editeng_core.mk
+++ b/editeng/CppunitTest_editeng_core.mk
@@ -62,6 +62,7 @@ $(eval $(call gb_CppunitTest_use_components,editeng_core,\
 configmgr/source/configmgr \
 framework/util/fwk \
 i18npool/util/i18npool \
+   i18npool/source/search/i18nsearch \
 linguistic/source/lng \
 sfx2/util/sfx \
 ucb/source/core/ucb1 \
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index fb3d354..4e9b82b 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -25,6 +25,9 @@
 #include "editeng/postitem.hxx"
 #include "editeng/section.hxx"
 #include "editeng/editobj.hxx"
+#include "editeng/flditem.hxx"
+#include "svl/srchitem.hxx"
+#include "rtl/strbuf.hxx"
 
 #include 
 
@@ -44,22 +47,22 @@ public:
 
 void testConstruction();
 
-/**
- * Test UNO service class that implements text field items.
- */
+/// Test UNO service class that implements text field items.
 void testUnoTextFields();
 
-/**
- * AutoCorrect tests
- */
+/// AutoCorrect tests
 void testAutocorrect();
 
+/// Test hyperlinks
+void testHyperlinkSearch();
+
 void testSectionAttributes();
 
 CPPUNIT_TEST_SUITE(Test);
 CPPUNIT_TEST(testConstruction);
 CPPUNIT_TEST(testUnoTextFields);
 CPPUNIT_TEST(testAutocorrect);
+CPPUNIT_TEST(testHyperlinkSearch);
 CPPUNIT_TEST(testSectionAttributes);
 CPPUNIT_TEST_SUITE_END();
 
@@ -340,6 +343,91 @@ void Test::testAutocorrect()
 }
 }
 
+namespace {
+class UrlEditEngine : public EditEngine
+{
+public:
+UrlEditEngine(SfxItemPool *pPool) : EditEngine(pPool) {}
+
+virtual OUString CalcFieldValue( const SvxFieldItem&, sal_Int32, 
sal_Int32, Color*&, Color*& )
+{
+return OUString("j...@bob.com"); // a sophisticated view of value:
+}
+};
+}
+
+// Odd accounting for hyperlink position & size etc.
+// https://bugzilla.novell.com/show_bug.cgi?id=467459
+void Test::testHyperlinkSearch()
+{
+UrlEditEngine aEngine(mpItemPool);
+EditDoc &rDoc = aEngine.GetEditDoc();
+
+OUString aSampleText = "Please write email to . if you find a fish(not a 
dog).";
+aEngine.SetText(aSampleText);
+
+CPPUNIT_ASSERT_MESSAGE("set text", rDoc.GetParaAsString(sal_Int32(0)) == 
aSampleText);
+
+ContentNode *pNode = rDoc.GetObject(0);
+EditSelection aSel(EditPaM(pNode, 22), EditPaM(pNode, 22));
+SvxURLField aURLField("mailto:///j...@bob.com";, "j...@bob.com",
+  SVXURLFORMAT_REPR);
+SvxFieldItem aField(aURLField, EE_FEATURE_FIELD);
+
+aEngine.InsertField(aSel, aField);
+aEngine.UpdateFields();
+
+OUString aContent = pNode->GetExpandedText();
+CPPUNIT_ASSERT_MESSAGE("get text", aContent ==
+   "Please write email to j...@bob.com. if you find a 
fish(not a dog).");
+CPPUNIT_ASSERT_MESSAGE("wrong length", rDoc.GetTextLen() == 
(sal_uLong)aContent.getLength());
+
+// Check expansion and positioning re-work
+CPPUNIT_ASSERT_MESSAGE("wrong length", pNode->GetExpandedLen() ==
+   (sal_uLong)aContent.getLength());
+for (sal_Int32 n = 0; n < aContent.getLength(); n++)
+{
+sal_Int32 nStart = n, nEnd = n;
+pNode->UnExpandPositions(nStart,nEnd);
+CPPUNIT_ASSERT_MESSAGE("out of bound start", nStart < pNode->Len());
+CPPUNIT_ASSERT_MESSAGE("out of bound end", nEnd <= pNode->Len());
+}
+
+static const struct {
+sal_Int32 mnStart, mnEnd;
+sal_Int32 mnNewStart, mnNewEnd;
+} aTrickyOnes[] = {
+{  0,  1, /* -> */  0, 1 },
+{ 21, 25, /* -> */ 21, 23 }, // the field is really just one char
+{ 25, 27, /* -> */ 22, 23 },
+{ 50, 56, /* -> */ 40, 46 }
+};
+for (size_t n = 0; n < SAL_N_ELEMENTS(aTrickyOnes); n++)
+{
+sal_Int32 nStart = aTrickyOnes[n].mnStart;
+sal_Int32 nEnd = aTrickyOnes[n].mnEnd;
+pNode->UnExpandPositions(nS

Re: [GSOC] Tiled Rendering, ahunt, Weekly Report 10 / WK30

2014-07-28 Thread Michael Meeks
Hi Andrzej,

Wow - some great work here =)

On Mon, 2014-07-28 at 10:23 +0200, Andrzej Hunt wrote:
> * Moved lok_init from shim.c into LibreOfficeKit.h
>(i.e. killing the static library)
> ** https://gerrit.libreoffice.org/#/c/10584/

Nice idea; a few comments in the gerrit commit =)

> Some screens of calc/impress with images visible are attached.

Beautiful stuff =) how are the APIs for determining number of pages /
their page sizes; and toggling the various features there - sheet
numbers, speaker notes etc. ? =)

Anyhow - encouraging progress ! would like to get more of this merged
into master; what are we blocking on there for calc eg. ?

ATB,

Michael.

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

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


[Libreoffice-commits] dev-tools.git: scripts/Bugzilla.pm scripts/esc-bug-stats.pl

2014-07-28 Thread Michael Meeks
 scripts/Bugzilla.pm  |1 +
 scripts/esc-bug-stats.pl |8 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 9aee886ac125693808a14fa71ad37cd28c46033e
Author: Michael Meeks 
Date:   Mon Jul 28 21:19:59 2014 -0400

Update blacklist, and prune migration.

diff --git a/scripts/Bugzilla.pm b/scripts/Bugzilla.pm
index 8093c8b..2a7715f 100644
--- a/scripts/Bugzilla.pm
+++ b/scripts/Bugzilla.pm
@@ -58,6 +58,7 @@ my %sadly_non_libreoffice = (
 'Tom Stellard' => 1,
 'almos' => 1,
 'Andreas Boll' => 1,
+'Tapani Pälli' => 1,
 );
 
 sub get_url($)
diff --git a/scripts/esc-bug-stats.pl b/scripts/esc-bug-stats.pl
index 508a95b..3b299b0 100755
--- a/scripts/esc-bug-stats.pl
+++ b/scripts/esc-bug-stats.pl
@@ -81,8 +81,10 @@ print STDERR "\n";
 
 my %component_count;
 
+my %obsolete_components = ( 'Migration' => 1 );
+
 # custom pieces
-$component_count{'Migration'} = 
Bugzilla::get_deps("https://$Bugzilla::bugserver/showdependencytree.cgi?id=43489&hide_resolved=1";);
+$component_count{'Migration'} = 0; # 
aBugzilla::get_deps("https://$Bugzilla::bugserver/showdependencytree.cgi?id=43489&hide_resolved=1";);
 - kill for now.
 $component_count{'Crashes'} = 
Bugzilla::get_query("https://$Bugzilla::bugserver/buglist.cgi?keywords=regression&keywords_type=allwords&list_id=296015&short_desc=crash&query_based_on=CrashRegressions&query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=NEEDINFO&short_desc_type=allwordssubstr&product=LibreOffice&known_name=CrashRegressions";);
 $component_count{'Borders'} = 
Bugzilla::get_query("https://$Bugzilla::bugserver/buglist.cgi?keywords=regression&keywords_type=allwords&list_id=296016&short_desc=border&query_based_on=BorderRegressions&query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=NEEDINFO&short_desc_type=allwordssubstr&product=LibreOffice&known_name=BorderRegressions";);
 
@@ -94,7 +96,9 @@ for my $component (@reg_toquery) {
 
 print STDERR "\t* ~Component   count net *\n";
 for my $component (sort { $component_count{$b} <=> $component_count{$a} } keys 
%component_count) {
-printf STDERR "\t  %12s - %2d (+?)\n", $component, 
$component_count{$component};
+if (!defined $obsolete_components{$component}) {
+   printf STDERR "\t  %12s - %2d (+?)\n", $component, 
$component_count{$component};
+}
 }
 
 print << "EOF"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - editeng/CppunitTest_editeng_core.mk editeng/qa editeng/source

2014-07-30 Thread Michael Meeks
 editeng/CppunitTest_editeng_core.mk |1 
 editeng/qa/unit/core-test.cxx   |  100 +++-
 editeng/source/editeng/editdoc.cxx  |  173 
 editeng/source/editeng/editdoc.hxx  |   12 ++
 editeng/source/editeng/impedit4.cxx |6 -
 5 files changed, 226 insertions(+), 66 deletions(-)

New commits:
commit 8220b70fe2dc270188751950ac6d872320db1aa2
Author: Michael Meeks 
Date:   Sun Jul 27 00:21:50 2014 -0400

bnc#467459 - fix editeng text search with expanded fields.

(cherry picked from commit 274b628a2b523eb45e297352a85f0177c6e747f0)

Signed-off-by: Matúš Kukan 

Conflicts:
editeng/source/editeng/editdoc.cxx
editeng/source/editeng/editdoc.hxx

Change-Id: If59d0e2f886e94148b81cb6cfcad067733fcb918

diff --git a/editeng/CppunitTest_editeng_core.mk 
b/editeng/CppunitTest_editeng_core.mk
index 301c760..962fd8f 100644
--- a/editeng/CppunitTest_editeng_core.mk
+++ b/editeng/CppunitTest_editeng_core.mk
@@ -61,6 +61,7 @@ $(eval $(call gb_CppunitTest_use_components,editeng_core,\
 configmgr/source/configmgr \
 framework/util/fwk \
 i18npool/util/i18npool \
+   i18npool/source/search/i18nsearch \
 linguistic/source/lng \
 sfx2/util/sfx \
 ucb/source/core/ucb1 \
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 338a6cb7..4e3da9b 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -25,6 +25,9 @@
 #include "editeng/postitem.hxx"
 #include "editeng/section.hxx"
 #include "editeng/editobj.hxx"
+#include "editeng/flditem.hxx"
+#include "svl/srchitem.hxx"
+#include "rtl/strbuf.hxx"
 
 #include 
 
@@ -44,22 +47,22 @@ public:
 
 void testConstruction();
 
-/**
- * Test UNO service class that implements text field items.
- */
+/// Test UNO service class that implements text field items.
 void testUnoTextFields();
 
-/**
- * AutoCorrect tests
- */
+/// AutoCorrect tests
 void testAutocorrect();
 
+/// Test hyperlinks
+void testHyperlinkSearch();
+
 void testSectionAttributes();
 
 CPPUNIT_TEST_SUITE(Test);
 CPPUNIT_TEST(testConstruction);
 CPPUNIT_TEST(testUnoTextFields);
 CPPUNIT_TEST(testAutocorrect);
+CPPUNIT_TEST(testHyperlinkSearch);
 CPPUNIT_TEST(testSectionAttributes);
 CPPUNIT_TEST_SUITE_END();
 
@@ -340,6 +343,91 @@ void Test::testAutocorrect()
 }
 }
 
+namespace {
+class UrlEditEngine : public EditEngine
+{
+public:
+UrlEditEngine(SfxItemPool *pPool) : EditEngine(pPool) {}
+
+virtual OUString CalcFieldValue( const SvxFieldItem&, sal_Int32, 
sal_uInt16, Color*&, Color*& )
+{
+return OUString("j...@bob.com"); // a sophisticated view of value:
+}
+};
+}
+
+// Odd accounting for hyperlink position & size etc.
+// https://bugzilla.novell.com/show_bug.cgi?id=467459
+void Test::testHyperlinkSearch()
+{
+UrlEditEngine aEngine(mpItemPool);
+EditDoc &rDoc = aEngine.GetEditDoc();
+
+OUString aSampleText = "Please write email to . if you find a fish(not a 
dog).";
+aEngine.SetText(aSampleText);
+
+CPPUNIT_ASSERT_MESSAGE("set text", rDoc.GetParaAsString(sal_Int32(0)) == 
aSampleText);
+
+ContentNode *pNode = rDoc.GetObject(0);
+EditSelection aSel(EditPaM(pNode, 22), EditPaM(pNode, 22));
+SvxURLField aURLField("mailto:///j...@bob.com";, "j...@bob.com",
+  SVXURLFORMAT_REPR);
+SvxFieldItem aField(aURLField, EE_FEATURE_FIELD);
+
+aEngine.InsertField(aSel, aField);
+aEngine.UpdateFields();
+
+OUString aContent = pNode->GetExpandedText();
+CPPUNIT_ASSERT_MESSAGE("get text", aContent ==
+   "Please write email to j...@bob.com. if you find a 
fish(not a dog).");
+CPPUNIT_ASSERT_MESSAGE("wrong length", rDoc.GetTextLen() == 
(sal_uLong)aContent.getLength());
+
+// Check expansion and positioning re-work
+CPPUNIT_ASSERT_MESSAGE("wrong length", pNode->GetExpandedLen() ==
+   (sal_uLong)aContent.getLength());
+for (sal_Int32 n = 0; n < aContent.getLength(); n++)
+{
+sal_Int32 nStart = n, nEnd = n;
+pNode->UnExpandPositions(nStart,nEnd);
+CPPUNIT_ASSERT_MESSAGE("out of bound start", nStart < pNode->Len());
+CPPUNIT_ASSERT_MESSAGE("out of bound end", nEnd <= pNode->Len());
+}
+
+static const struct {
+sal_Int32 mnStart, mnEnd;
+sal_Int32 mnNewStart, mnNewEnd;
+} aTrickyOnes[] = {
+{  0,  1, /* -> */  0, 1 },
+{ 21, 25, /* -> */ 21, 23 }, // the field is really just one char
+{ 25, 27, /* -> */ 22, 23 },
+{ 50, 56, /* -> */ 40, 46 }
+};
+

[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - editeng/CppunitTest_editeng_core.mk editeng/qa editeng/source

2014-07-30 Thread Michael Meeks
 editeng/CppunitTest_editeng_core.mk |1 
 editeng/qa/unit/core-test.cxx   |  100 +++--
 editeng/source/editeng/editdoc.cxx  |  170 
 editeng/source/editeng/editdoc.hxx  |9 +
 editeng/source/editeng/impedit4.cxx |6 -
 5 files changed, 225 insertions(+), 61 deletions(-)

New commits:
commit e7c94a5ad8df0873cf7272206c7c0ae123a1e034
Author: Michael Meeks 
Date:   Sun Jul 27 00:21:50 2014 -0400

bnc#467459 - fix editeng text search with expanded fields.

(cherry picked from commit 274b628a2b523eb45e297352a85f0177c6e747f0)

Change-Id: If59d0e2f886e94148b81cb6cfcad067733fcb918
Signed-off-by: Matúš Kukan 

diff --git a/editeng/CppunitTest_editeng_core.mk 
b/editeng/CppunitTest_editeng_core.mk
index 301c760..962fd8f 100644
--- a/editeng/CppunitTest_editeng_core.mk
+++ b/editeng/CppunitTest_editeng_core.mk
@@ -61,6 +61,7 @@ $(eval $(call gb_CppunitTest_use_components,editeng_core,\
 configmgr/source/configmgr \
 framework/util/fwk \
 i18npool/util/i18npool \
+   i18npool/source/search/i18nsearch \
 linguistic/source/lng \
 sfx2/util/sfx \
 ucb/source/core/ucb1 \
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index fb3d354..4e9b82b 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -25,6 +25,9 @@
 #include "editeng/postitem.hxx"
 #include "editeng/section.hxx"
 #include "editeng/editobj.hxx"
+#include "editeng/flditem.hxx"
+#include "svl/srchitem.hxx"
+#include "rtl/strbuf.hxx"
 
 #include 
 
@@ -44,22 +47,22 @@ public:
 
 void testConstruction();
 
-/**
- * Test UNO service class that implements text field items.
- */
+/// Test UNO service class that implements text field items.
 void testUnoTextFields();
 
-/**
- * AutoCorrect tests
- */
+/// AutoCorrect tests
 void testAutocorrect();
 
+/// Test hyperlinks
+void testHyperlinkSearch();
+
 void testSectionAttributes();
 
 CPPUNIT_TEST_SUITE(Test);
 CPPUNIT_TEST(testConstruction);
 CPPUNIT_TEST(testUnoTextFields);
 CPPUNIT_TEST(testAutocorrect);
+CPPUNIT_TEST(testHyperlinkSearch);
 CPPUNIT_TEST(testSectionAttributes);
 CPPUNIT_TEST_SUITE_END();
 
@@ -340,6 +343,91 @@ void Test::testAutocorrect()
 }
 }
 
+namespace {
+class UrlEditEngine : public EditEngine
+{
+public:
+UrlEditEngine(SfxItemPool *pPool) : EditEngine(pPool) {}
+
+virtual OUString CalcFieldValue( const SvxFieldItem&, sal_Int32, 
sal_Int32, Color*&, Color*& )
+{
+return OUString("j...@bob.com"); // a sophisticated view of value:
+}
+};
+}
+
+// Odd accounting for hyperlink position & size etc.
+// https://bugzilla.novell.com/show_bug.cgi?id=467459
+void Test::testHyperlinkSearch()
+{
+UrlEditEngine aEngine(mpItemPool);
+EditDoc &rDoc = aEngine.GetEditDoc();
+
+OUString aSampleText = "Please write email to . if you find a fish(not a 
dog).";
+aEngine.SetText(aSampleText);
+
+CPPUNIT_ASSERT_MESSAGE("set text", rDoc.GetParaAsString(sal_Int32(0)) == 
aSampleText);
+
+ContentNode *pNode = rDoc.GetObject(0);
+EditSelection aSel(EditPaM(pNode, 22), EditPaM(pNode, 22));
+SvxURLField aURLField("mailto:///j...@bob.com";, "j...@bob.com",
+  SVXURLFORMAT_REPR);
+SvxFieldItem aField(aURLField, EE_FEATURE_FIELD);
+
+aEngine.InsertField(aSel, aField);
+aEngine.UpdateFields();
+
+OUString aContent = pNode->GetExpandedText();
+CPPUNIT_ASSERT_MESSAGE("get text", aContent ==
+   "Please write email to j...@bob.com. if you find a 
fish(not a dog).");
+CPPUNIT_ASSERT_MESSAGE("wrong length", rDoc.GetTextLen() == 
(sal_uLong)aContent.getLength());
+
+// Check expansion and positioning re-work
+CPPUNIT_ASSERT_MESSAGE("wrong length", pNode->GetExpandedLen() ==
+   (sal_uLong)aContent.getLength());
+for (sal_Int32 n = 0; n < aContent.getLength(); n++)
+{
+sal_Int32 nStart = n, nEnd = n;
+pNode->UnExpandPositions(nStart,nEnd);
+CPPUNIT_ASSERT_MESSAGE("out of bound start", nStart < pNode->Len());
+CPPUNIT_ASSERT_MESSAGE("out of bound end", nEnd <= pNode->Len());
+}
+
+static const struct {
+sal_Int32 mnStart, mnEnd;
+sal_Int32 mnNewStart, mnNewEnd;
+} aTrickyOnes[] = {
+{  0,  1, /* -> */  0, 1 },
+{ 21, 25, /* -> */ 21, 23 }, // the field is really just one char
+{ 25, 27, /* -> */ 22, 23 },
+{ 50, 56, /* -> */ 40, 46 }
+};
+for (size_t n = 0; n < SAL_N_ELEMENTS(aTrickyOnes); n++)
+{
+sal_Int32 nStart = aTrickyOnes[n].mnSt

minutes of ESC call ...

2014-05-08 Thread Michael Meeks
* Present
+ Christian, Stephan, David, Thorsten, Adam, Miklos, Kendy, Michael M,
  Eike, Andras, Markus, Eilidh, Caolan, Kohei, Bjoern, Miklos,
  Michael S, Robinson, Norbert, Jacobo
 
* Pending Action Items:
+ crashtest box - more research (Moggi/Cloph)
[ calc is working, writer problems can't easily be nailed down,
  have to use multiple processes ]
[ calc numbers increased a bit - but not as bad as expected ]
+ will try filing a lot of small string changes as easy hacks (Astron)
+ encourage icon authors to put them into git (Astron)
+ fix the Java bridge for MSVC2012 for 4.3 (Stephan/Michael S.)
 
* Release Engineering update (Christian)
+ 4.3 status
   + looking so/so - reports that Windows / Alpha wouldn't run at all.
  + need to poke at the windows build environment, or a general
problem with the Alpha.
   + are we past the failing unit tests oddness ?
  + the failing tests are not reproducible in a debug environment
related to a parallel build (most likely).
  + created a new tinderbox with this baseline, which reports only
to tinderbox; hitting failing checks.
  + not always the same tests fail.
  + sd/ filters & sd/ import tests, also seen in sc/
  + more data? (Michael)
  + memory ? which exception fails ? which test ?
  + SEGV from 'make' (Cloph)
  
http://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER&full-log=1399551601.15078
  + seems to fail on the first line etc.
  + re-running make passes in the same tree.
 + sounds like missing UNO components ? or dependencies (Bjoern)
   + maybe good to test 20-100 times after the build completed.
   + and if they're fine - its missing dependencies.
   + if you keep running 'make check' on a full-build
  its unstable (Stephan)
   + slowcheck is a bit more stable than a subsequentcheck (Miklos)
   + if suspected with a failing UNO component ? (Kendy)
   + just add a printf
   + Windows tinderboxes do incremental builds and these
 fail too (Sberg)
 
http://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER&brief-log=1399545019.7798#28531
AI:+ turn the SAL_WARN into a fprintf & send to Cloph ? (Kendy)
AI:+ run the 'make slowcheck' 20x from the top-level & report (Cloph)
+ 4.2.x builds with older compiler & Windows version
   + 4.3 VS 2012 + Windows Server 2012
   + 4.2 VS 2010 + Windows Server 2008 rc2
   + 4.3.0 feature freeze:
   + week after next.
 
+ 4.2.4 RC2 status
   + announced today as final, enabled the update too.
   + update was broken
   + none of the 4.2.x was updated so far, until today.
   + discovered the ver. included the git hash there.
   + thanks to report from Michael Stahl.
   + we lean on QA to check this cf. MozTrap ...
AI:+ poke Sophie to query that (Cloph)
   + BlueZ 5 bits get merged.
   + status of KDE4 support ? (Bjoern)
   + 4.2.3 deadlocked under KDE right away
   + best to poke Lubos - requires some KDE patch.
+ 4.1.6 announce / retrospective
   + Update enabled from 4.1.x -> 4.1.6 today.
   + good to see MAB's migrated to 4.2.x - 4.1.x is dead.
+ Android / iOS remote
   + patch for Android Remote for pointer feature,
   + also (re-)adding an About Dialog
   + with version; discussion ongoing.
+ 4.2.4 removed StarOffice XML export (Michael S)
   + bit unexpected
   + bug was around saving calc as old format (Kohei)
   + opted to remove rather than fix / work around.
   + was not added to release notes: we should add it.
   + failing tests - not running; and tests passed
 and back-ported the fix to the -4-2 branch (Kohei)
   + one of the JUnit tests failed recently (Michael S)
AI:+ Add the removal to 4.2 release notes (Cloph)
 
* 4.3 Features Page (Michael)
+ https://wiki.documentfoundation.org/ReleaseNotes/4.3
+ please update it !
 
* Should we simplify version numbering? (Kendy)
+ So far major.minor.micro, but due to our release plan, all our versions
  are continuous improvements - does it make sense to still keep 'major'?
[ ie. should we do 4.3.0 -> 5.0, 4.4.3 -> 6.3, etc.? ]
+ Technical POV reasoning for stale 1st version number (Bjoern)
+ used to mean stable ABI
+ agreed - not such an issue these days.
+ technical reason is ABI stability, vague anyway.
+ Agreed, technically no need for it (Stephan)
+ What is the cost of change ? (Cloph)
+ book publishers unhappy with this
+ Scripts - implied dependencies: extensions, versions etc. (Bjoern)
+ potentially extensions brea

[Libreoffice-commits] core.git: Changes to 'feature/debugevent'

2014-05-08 Thread Michael Meeks
New branch 'feature/debugevent' available with the following commits:
commit daff06ba3fffa23086f1f1f610207f80f4fe6b44
Author: Michael Meeks 
Date:   Thu May 8 17:03:08 2014 +0100

Initial cut at some infinite monkeys work.

Change-Id: I71c7fe027262305893d8eabee94a726f4aa909d6

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


[Libreoffice-commits] core.git: Branch 'feature/debugevent' - 2 commits - include/vcl vcl/source

2014-05-08 Thread Michael Meeks
 include/vcl/debugevent.hxx   |2 -
 vcl/source/window/debugevent.cxx |   56 ---
 2 files changed, 42 insertions(+), 16 deletions(-)

New commits:
commit 4b74bdd3a2122e64fe43aabb02341a454db77b73
Author: Michael Meeks 
Date:   Thu May 8 21:59:45 2014 +0100

Make the inserted text more European and sensible for now.

Change-Id: I8b2ecef11362c0fc1dc2b76780140881e769bb89

diff --git a/include/vcl/debugevent.hxx b/include/vcl/debugevent.hxx
index ce31570..2700324 100644
--- a/include/vcl/debugevent.hxx
+++ b/include/vcl/debugevent.hxx
@@ -20,7 +20,7 @@ class VCL_DLLPUBLIC DebugEventInjector : Timer {
   DebugEventInjector( sal_uInt32 nMaxEvents );
 
   Window *ChooseWindow();
-  void InjectKeyEvent();
+  void InjectTextEvent();
   void InjectMenuEvent();
   void InjectMouseEvent();
   void InjectEvent();
diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx
index 37ca716..4bd54ed 100644
--- a/vcl/source/window/debugevent.cxx
+++ b/vcl/source/window/debugevent.cxx
@@ -131,22 +131,43 @@ static void InitKeyEvent( SalKeyEvent &rKeyEvent )
 rKeyEvent.mnRepeat = 0;
 }
 
-void DebugEventInjector::InjectKeyEvent()
+void DebugEventInjector::InjectTextEvent()
 {
 SalKeyEvent aKeyEvent;
 Window *pWindow = ChooseWindow();
 
 InitKeyEvent( aKeyEvent );
-sal_uInt16 nCode = getRandom() * KEY_CODE;
-if( getRandom() < 0.05 ) // modifier
-nCode |= (sal_uInt16)( getRandom() * KEY_MODTYPE ) & KEY_MODTYPE;
 
-aKeyEvent.mnCode = nCode;
-aKeyEvent.mnCharCode = getRandom() * 0x;
+if (getRandom() < 0.10) // Occasionally a truly random event
+{
+aKeyEvent.mnCode = getRandom() * KEY_CODE;
+aKeyEvent.mnCharCode = getRandom() * 0x;
+}
+else
+{
+struct {
+sal_uInt16 nCodeStart, nCodeEnd;
+char   aCharStart;
+} nTextCodes[] = {
+{ KEY_0, KEY_9, '0' },
+{ KEY_A, KEY_Z, 'a' }
+};
+
+size_t i = getRandom() * SAL_N_ELEMENTS( nTextCodes );
+int offset = trunc( getRandom() * ( nTextCodes[i].nCodeEnd - 
nTextCodes[i].nCodeStart ) );
+aKeyEvent.mnCode = nTextCodes[i].nCodeStart + offset;
+aKeyEvent.mnCharCode = nTextCodes[i].aCharStart + offset;
+//fprintf( stderr, "Char '%c' offset %d into record %d base '%c'\n",
+// aKeyEvent.mnCharCode, offset, (int)i, 
nTextCodes[i].aCharStart );
+}
+
+if( getRandom() < 0.05 ) // modifier
+aKeyEvent.mnCode |= (sal_uInt16)( getRandom() * KEY_MODTYPE ) & 
KEY_MODTYPE;
 
 bool bHandled = ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYINPUT, 
&aKeyEvent);
-fprintf (stderr, "Injected key 0x%x -> %d win %p\n",
- (int) aKeyEvent.mnCode, (int)bHandled, pWindow);
+fprintf( stderr, "Injected key 0x%x -> %d win %p\n",
+ (int) aKeyEvent.mnCode, (int)bHandled, pWindow );
+ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYUP, &aKeyEvent );
 }
 
 /*
@@ -155,12 +176,14 @@ void DebugEventInjector::InjectKeyEvent()
  */
 void DebugEventInjector::InjectEvent()
 {
+fprintf( stderr, "%6d - ", (int)mnEventsLeft );
+
 double nRand = getRandom();
-if (nRand < 0.50)
+if (nRand < 0.30)
 {
 int nEvents = getRandom() * 10;
 for (int i = 0; i < nEvents; i++)
-InjectKeyEvent();
+InjectTextEvent();
     }
     else if (nRand < 0.60)
 InjectKeyNavEdit();
commit ade994548c593ea1185711a3e226f51a99fbb660
Author: Michael Meeks 
Date:   Thu May 8 21:43:46 2014 +0100

quit after emitting all the events to allow valgrinding.

Change-Id: Ibee9d8f8dd0a266db276772d48deb0bd9d18

diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx
index 2f37678..37ca716 100644
--- a/vcl/source/window/debugevent.cxx
+++ b/vcl/source/window/debugevent.cxx
@@ -120,7 +120,7 @@ void DebugEventInjector::InjectMenuEvent()
 static void InitKeyEvent( SalKeyEvent &rKeyEvent )
 {
 double nRand = getRandom();
-if (nRand < 0.01)
+if (nRand < 0.001)
 rKeyEvent.mnTime = getRandom() * ULONG_MAX;
 else
 rKeyEvent.mnTime = Time::GetSystemTicks();
@@ -216,14 +216,15 @@ void DebugEventInjector::InjectKeyNavEdit()
 InitKeyEvent( aKeyEvent );
 aKeyEvent.mnCode = nKey;
 
-if (getRandom() < 0.10) // modifier
+if (getRandom() < 0.15) // modifier
 aKeyEvent.mnCode |= (sal_uInt16)(getRandom() * KEY_MODTYPE) & 
KEY_MODTYPE;
 
 aKeyEvent.mnCharCode = 0x0; // hopefully unused.
 
-bool bHandled = ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYINPUT, 
&aKeyEvent);
-fprintf (stderr, "Injected edit / move key 0x%x -> %d win %p\n",
- (int) aKeyEvent.mnCode, (int)bHandled, pWindow);
+bool bHand

Re: minutes of ESC call ...

2014-05-09 Thread Michael Meeks

On Fri, 2014-05-09 at 16:09 +0200, Michael Stahl wrote:
> well the main question discussed was whether there were any technical
> reasons to avoid changing the versioning, whether it's actually
> _desirable_ to do it is purely a marketing decision.

Quite - meaning not much to do with the ESC; and everything to do with
the marketing team =) so this is really the wrong list.

ATB,

Michael.

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

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


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

2014-05-12 Thread Michael Meeks
 i18npool/inc/xdictionary.hxx  |   26 +++-
 i18npool/qa/cppunit/test_breakiterator.cxx|   20 ++-
 i18npool/source/breakiterator/xdictionary.cxx |  147 ++
 3 files changed, 117 insertions(+), 76 deletions(-)

New commits:
commit 69a74afb07c7c58b201d315dbd254bc50b9c9f03
Author: Michael Meeks 
Date:   Fri May 9 16:28:18 2014 +0100

Avoid expensive dlopen thrash for break iterators.

Change-Id: I770c1b3e5164cb486b5a5c2b1259f713914a1bae

diff --git a/i18npool/inc/xdictionary.hxx b/i18npool/inc/xdictionary.hxx
index 13078e8..2b1ece0 100644
--- a/i18npool/inc/xdictionary.hxx
+++ b/i18npool/inc/xdictionary.hxx
@@ -40,17 +40,29 @@ struct WordBreakCache {
 bool equals(const sal_Unicode *str, Boundary& boundary);// checking 
cached string
 };
 
-class xdictionary
+struct xdictionarydata
 {
-private:
 const sal_uInt8  * existMark;
 const sal_Int16  * index1;
-const sal_Int32 * index2;
-const sal_Int32 * lenArray;
+const sal_Int32  * index2;
+const sal_Int32  * lenArray;
 const sal_Unicode* dataArea;
-#ifndef DISABLE_DYNLOADING
-oslModule hModule;
-#endif
+xdictionarydata() :
+existMark( NULL ),
+index1( NULL ),
+index2( NULL ),
+lenArray( NULL ),
+dataArea( NULL )
+{
+}
+};
+
+class xdictionary
+{
+private:
+xdictionarydata data;
+void initDictionaryData(const sal_Char *lang);
+
 Boundary boundary;
 bool japaneseWordBreak;
 
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx 
b/i18npool/qa/cppunit/test_breakiterator.cxx
index 6f7b537..36e3d3b 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -68,6 +68,7 @@ public:
 CPPUNIT_TEST_SUITE_END();
 private:
 uno::Reference m_xBreak;
+void doTestJapanese(uno::Reference< i18n::XBreakIterator > &xBreak);
 };
 
 void TestBreakIterator::testLineBreaking()
@@ -906,7 +907,7 @@ void TestBreakIterator::testKhmer()
 }
 #endif
 
-void TestBreakIterator::testJapanese()
+void TestBreakIterator::doTestJapanese(uno::Reference< i18n::XBreakIterator > 
&xBreak)
 {
 lang::Locale aLocale;
 aLocale.Language = "ja";
@@ -917,7 +918,7 @@ void TestBreakIterator::testJapanese()
 const sal_Unicode JAPANESE[] = { 0x30B7, 0x30E3, 0x30C3, 0x30C8, 
0x30C0, 0x30A6, 0x30F3 };
 
 OUString aTest(JAPANESE, SAL_N_ELEMENTS(JAPANESE));
-aBounds = m_xBreak->getWordBoundary(aTest, 5, aLocale,
+aBounds = xBreak->getWordBoundary(aTest, 5, aLocale,
 i18n::WordType::DICTIONARY_WORD, true);
 
 CPPUNIT_ASSERT(aBounds.startPos == 0 && aBounds.endPos == 7);
@@ -927,18 +928,29 @@ void TestBreakIterator::testJapanese()
 const sal_Unicode JAPANESE[] = { 0x9EBB, 0x306E, 0x8449, 0x9EBB, 
0x306E, 0x8449 };
 
 OUString aTest(JAPANESE, SAL_N_ELEMENTS(JAPANESE));
-aBounds = m_xBreak->getWordBoundary(aTest, 1, aLocale,
+aBounds = xBreak->getWordBoundary(aTest, 1, aLocale,
 i18n::WordType::DICTIONARY_WORD, true);
 
 CPPUNIT_ASSERT(aBounds.startPos == 0 && aBounds.endPos == 3);
 
-aBounds = m_xBreak->getWordBoundary(aTest, 5, aLocale,
+aBounds = xBreak->getWordBoundary(aTest, 5, aLocale,
 i18n::WordType::DICTIONARY_WORD, true);
 
 CPPUNIT_ASSERT(aBounds.startPos == 3 && aBounds.endPos == 6);
 }
 }
 
+void TestBreakIterator::testJapanese()
+{
+doTestJapanese(m_xBreak);
+
+// fdo#78479 - test second / cached instantiation of xdictionary
+uno::Reference< i18n::XBreakIterator > 
xTmpBreak(m_xSFactory->createInstance(
+"com.sun.star.i18n.BreakIterator"), uno::UNO_QUERY_THROW);
+
+doTestJapanese(xTmpBreak);
+}
+
 void TestBreakIterator::testChinese()
 {
 lang::Locale aLocale;
diff --git a/i18npool/source/breakiterator/xdictionary.cxx 
b/i18npool/source/breakiterator/xdictionary.cxx
index 6ded123..e83b529 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -20,6 +20,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -57,22 +58,9 @@ sal_Unicode* getDataArea_zh();
 #endif
 
 xdictionary::xdictionary(const sal_Char *lang) :
-existMark( NULL ),
-index1( NULL ),
-index2( NULL ),
-lenArray( NULL ),
-dataArea( NULL ),
-#ifndef DISABLE_DYNLOADING
-hModule( NULL ),
-#endif
 boundary(),
 japaneseWordBreak( false )
 {
-existMark = NULL;
-index1 = NULL;
-index2 = NULL;
-lenArray = NULL;
-dataArea = NULL;
 
 #ifdef DICT_JA_ZH_IN_DATAFILE
 
@@ -96,53 +84,33 @@ xdictionary::xdictionary(const sal_Char *lang) :
 // We have the offsets to the parts of the file at its end, see 
gendict.cxx
 sal_Int64 *pEOF = (sal_Int64*)(pMapping + nFileSize);
 
-existMark = (sal_uInt8*) (pMap

Re: [libreoffice-projects] minutes of ESC call ...

2014-05-13 Thread Michael Meeks

On Tue, 2014-05-13 at 16:07 +0200, Bjoern Michaelsen wrote:
> Ok, this viciously Canonical/Ubuntu branded, but its 10xi5 and it fits on a
> plane in a Pelican box:

Looks cool to me =) to what degree would Canonical be willing to
sponsor / loan those ? [ it seems they have a try-before-you-buy thing
going there anyway ;-].

>  http://blog.dustinkirkland.com/2014/05/the-orange-box-cloud-for-free-man.html

And/or $10k seems a bit above the budget we'd budgeted =)

ATB,

Michael.

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

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


[Libreoffice-commits] dev-tools.git: scripts/esc-bug-stats.pl

2014-05-15 Thread Michael Meeks
 scripts/esc-bug-stats.pl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 99053ffcc1c246d9dddc8d42c1bd447dbcb196f5
Author: Michael Meeks 
Date:   Tue May 13 15:08:09 2014 +0100

Fix calculation bug.

diff --git a/scripts/esc-bug-stats.pl b/scripts/esc-bug-stats.pl
index 9c04230..586bdd0 100755
--- a/scripts/esc-bug-stats.pl
+++ b/scripts/esc-bug-stats.pl
@@ -420,7 +420,7 @@ print << "EOF"
  
  
  
- 
+ 
  
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-16 Thread Michael Meeks
 vcl/unx/gtk/app/gtksys.cxx |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 5eeea7c91d87ee8f0b8bc8c0144c04fb84310bbf
Author: Michael Meeks 
Date:   Fri May 16 21:49:23 2014 +0100

fdo#78799 - ignore overlayed monitors with co-incident origin.

This happens with certain fglrx drivers etc. where 'cloned' is not
set but instead both monitors are placed over the top of each other
(by XFCE) -> work around that.

Change-Id: I9d1846bfae2692681606717f7f5e8408df532d95

diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index 058b5f5..4bd61c7 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -55,15 +55,14 @@ GtkSalSystem::GetDisplayXScreenCount()
 namespace
 {
 
-struct GdkRectangleEqual
+struct GdkRectangleCoincident
 {
+// fdo#78799 - detect and elide overlaying monitors of different sizes
 bool operator()(GdkRectangle const& rLeft, GdkRectangle const& rRight)
 {
 return
 rLeft.x == rRight.x
 && rLeft.y == rRight.y
-&& rLeft.width == rRight.width
-&& rLeft.height == rRight.height
 ;
 }
 };
@@ -95,7 +94,7 @@ GtkSalSystem::countScreenMonitors()
 gdk_screen_get_monitor_geometry(pScreen, j, &aGeometry);
 aGeometries.push_back(aGeometry);
 }
-GdkRectangleEqual aCmp;
+GdkRectangleCoincident aCmp;
 std::sort(aGeometries.begin(), aGeometries.end(), aCmp);
 const std::vector::iterator aUniqueEnd(
 std::unique(aGeometries.begin(), aGeometries.end(), aCmp));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-19 Thread Michael Meeks
 sc/source/core/tool/address.cxx |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 99f096384645234c1299aa97bc433bb0447170ca
Author: Michael Meeks 
Date:   Sat May 17 22:16:28 2014 +0100

ODS load perf: don't allocate temporary strings un-necessarily

Of the 53bn cycles consumed loading a large test; this saves up to
30bn parsing tab names, plus ~1bn not copying strings to convert to
integers.

Change-Id: Ie768ff8c2159dec62418088e643fe468e4cd5d70

diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 7554b92..55a12d2 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1015,6 +1015,7 @@ static sal_uInt16 lcl_ScRange_Parse_XL_A1( ScRange& r,
 }
 
 /**
+@param ppointer to null-terminated sal_Unicode string
 @param pRange   pointer to range where rAddr effectively is *pRange->aEnd,
 used in conjunction with pExtInfo to determine the tab span
 of a 3D reference.
@@ -1023,7 +1024,7 @@ static sal_uInt16 lcl_ScAddress_Parse_OOo( const 
sal_Unicode* p, ScDocument* pDo
ScAddress::ExternalInfo* pExtInfo = 
NULL, ScRange* pRange = NULL )
 {
 sal_uInt16  nRes = 0;
-OUString aDocName;   // der pure Dokumentenname
+OUString aDocName;   // the pure Document Name
 OUString aTab;
 boolbExtDoc = false;
 boolbExtDocInherited = false;
@@ -1072,6 +1073,7 @@ static sal_uInt16 lcl_ScAddress_Parse_OOo( const 
sal_Unicode* p, ScDocument* pDo
 }
 else
 {
+OUStringBuffer aTabAcc;
 while (*p)
 {
 if( *p == '.')
@@ -1081,9 +1083,10 @@ static sal_uInt16 lcl_ScAddress_Parse_OOo( const 
sal_Unicode* p, ScDocument* pDo
 {
 p++; break;
 }
-aTab += OUString(*p);
+aTabAcc.append(*p);
 p++;
 }
+aTab = aTabAcc.makeStringAndClear();
 }
 if( *p++ != '.' )
 nBits = 0;
@@ -1148,8 +1151,7 @@ static sal_uInt16 lcl_ScAddress_Parse_OOo( const 
sal_Unicode* p, ScDocument* pDo
 }
 else
 {
-OUString aTmp( p );
-long n = aTmp.toInt32() - 1;
+long n = rtl_ustr_toInt32( p, 10 ) - 1;
 while (rtl::isAsciiDigit( *p ))
 p++;
 if( n < 0 || n > MAXROW )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-20 Thread Michael Meeks
 sal/cppunittester/cppunittester.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit ef02ced3ec5e66d5c25de52fc37355ae0f44235e
Author: Michael Meeks 
Date:   Tue May 20 13:38:49 2014 +0100

Win32 - warn of extraordinary behaviour with LoadLibrary and long PATHs

Change-Id: I0a8ee157aa548a5b04df67a2355e3f4fd15e84cd

diff --git a/sal/cppunittester/cppunittester.cxx 
b/sal/cppunittester/cppunittester.cxx
index 6e5258b..7ac8ab5 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -206,6 +206,14 @@ public:
 manager.load(testlib, args);
 } catch (const CppUnit::DynamicLibraryManagerException &e) {
 std::cerr << "DynamicLibraryManagerException: \"" << e.what() << 
"\"\n";
+#ifdef WIN32
+const char *pPath = getenv ("PATH");
+if (pPath && strlen (pPath) > 256)
+{
+std::cerr << "Windows has significant build problems with long 
PATH variables ";
+std::cerr << "please check your PATH variable and 
re-autogen.\n";
+}
+#endif
 return false;
 }
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-21 Thread Michael Meeks
 sc/source/core/data/document.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 7732f806dfcc9375757e7ccbe1ca3c1d194af266
Author: Michael Meeks 
Date:   Tue May 20 08:13:53 2014 +0100

ODS load perf: avoid excessive calls to uppercase to compare tab names.

Change-Id: I37b9e49607c8c51f10bc8ff8fc342b02fdb8b7e1

diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index d72e7db..97c10ca 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -237,7 +237,16 @@ bool ScDocument::GetCodeName( SCTAB nTab, OUString& rName 
) const
 
 bool ScDocument::GetTable( const OUString& rName, SCTAB& rTab ) const
 {
-OUString aUpperName = ScGlobal::pCharClass->uppercase(rName);
+OUString aUpperName;
+static OUString aCacheName, aCacheUpperName;
+
+if (aCacheName != rName)
+{
+aCacheName = rName;
+// surprisingly slow ...
+aCacheUpperName = ScGlobal::pCharClass->uppercase(rName);
+}
+aUpperName = aCacheUpperName;
 
 for (SCTAB i=0; i< static_cast(maTabs.size()); i++)
 if (maTabs[i])
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-21 Thread Michael Meeks
 formula/source/core/api/token.cxx |   18 ++
 include/formula/tokenarray.hxx|1 +
 sc/inc/tokenarray.hxx |3 +++
 sc/source/core/tool/token.cxx |   12 
 sc/source/filter/xml/xmlcelli.cxx |   13 +++--
 5 files changed, 41 insertions(+), 6 deletions(-)

New commits:
commit c07b8dedf7b1d0ddb2c97368e1634432974632db
Author: Michael Meeks 
Date:   Mon May 19 20:23:07 2014 +0100

ODS load perf: transfer ownership of the ScTokenArray to save cycles.

Add API to wnsure we don't end up allocating 32k bytes of tokens
for each ScFormulaToken, as happens when you Add a token to a new
empty ScTokenArray.

Change-Id: Ib12a3065eb513243a2146ebb009fbaa650385dd9

diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index c5d7da7..30b0e16 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -687,6 +687,24 @@ void FormulaTokenArray::Assign( const FormulaTokenArray& r 
)
 }
 }
 
+/// Optimisiation for efficiently creating StringXML placeholders
+void FormulaTokenArray::Assign( sal_uInt16 nCode, FormulaToken **pTokens )
+{
+assert( nLen = 0 );
+assert( pCode == NULL );
+
+nLen = nCode;
+pCode = new FormulaToken*[ nLen ];
+
+for( sal_uInt16 i = 0; i < nLen; i++ )
+{
+FormulaToken *t = pTokens[ i ];
+assert( t->GetOpCode() == ocStringXML );
+pCode[ i ] = t;
+t->IncRef();
+}
+}
+
 FormulaTokenArray& FormulaTokenArray::operator=( const FormulaTokenArray& rArr 
)
 {
 Clear();
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index 5654a31..dcc8dc9 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -82,6 +82,7 @@ protected:
 
 protected:
 voidAssign( const FormulaTokenArray& );
+voidAssign( sal_uInt16 nCode, FormulaToken **pTokens );
 
 /// Also used by the compiler. The token MUST had been allocated with new!
 FormulaToken*   Add( FormulaToken* );
diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx
index c2191a8..9538819 100644
--- a/sc/inc/tokenarray.hxx
+++ b/sc/inc/tokenarray.hxx
@@ -110,6 +110,9 @@ public:
 NULL if there is no pCode (which actually would be caller's fault). */
 formula::FormulaToken* MergeRangeReference( const ScAddress & rPos );
 
+/// Assign XML string placeholder to the array
+void AssignXMLString( const OUString &rText, const OUString &rFormulaNmsp 
);
+
 /// Assignment with references to ScToken entries (not copied!)
 ScTokenArray& operator=( const ScTokenArray& );
 
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 4f4cbf6..4ac537f 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -2083,6 +2083,18 @@ FormulaToken* ScTokenArray::AddColRowName( const 
ScSingleRefData& rRef )
 return Add( new ScSingleRefToken( rRef, ocColRowName ) );
 }
 
+void ScTokenArray::AssignXMLString( const OUString &rText, const OUString 
&rFormulaNmsp )
+{
+sal_uInt16 nTokens = 1;
+FormulaToken *aTokens[2];
+
+aTokens[0] = new FormulaStringOpToken( ocStringXML, rText );
+if( !rFormulaNmsp.isEmpty() )
+aTokens[ nTokens++ ] = new FormulaStringOpToken( ocStringXML, 
rFormulaNmsp );
+
+Assign( nTokens, aTokens );
+}
+
 bool ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
 const ScAddress& rPos, ScDirection eDir )
 {
diff --git a/sc/source/filter/xml/xmlcelli.cxx 
b/sc/source/filter/xml/xmlcelli.cxx
index b09f90c..4e4c552 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -1362,7 +1362,6 @@ void ScXMLTableRowCellContext::PutFormulaCell( const 
ScAddress& rCellPos )
 ScDocumentImport& rDoc = rXMLImport.GetDoc();
 
 OUString aText = maFormula->first;
-OUString aFormulaNmsp = maFormula->second;
 
 ::boost::scoped_ptr pExtRefGuard (
 new ScExternalRefManager::ApiGuard(pDoc));
@@ -1372,13 +1371,15 @@ void ScXMLTableRowCellContext::PutFormulaCell( const 
ScAddress& rCellPos )
 if ( aText[0] == '=' && aText.getLength() > 1 )
 {
 // temporary formula string as string tokens
-boost::scoped_ptr pCode(new ScTokenArray);
-pCode->AddStringXML( aText );
-if( (eGrammar == formula::FormulaGrammar::GRAM_EXTERNAL) && 
!aFormulaNmsp.isEmpty() )
-pCode->AddStringXML( aFormulaNmsp );
+ScTokenArray *pCode = new ScTokenArray();
+
+OUString aFormulaNmsp = maFormula->second;
+if( eGrammar != formula::FormulaGrammar::GRAM_EXTERNAL )
+aFormulaNmsp = OUString();
+pCode->AssignXMLString( aText, aFormulaNmsp );
 
 

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

2014-05-21 Thread Michael Meeks
 sc/inc/compiler.hxx  |4 +++-
 sc/source/core/tool/compiler.cxx |   25 +++--
 svl/source/numbers/zforfind.cxx  |1 -
 3 files changed, 22 insertions(+), 8 deletions(-)

New commits:
commit 34f0e4f42594adb97bdb64e5f2e8f00801b48e2e
Author: Michael Meeks 
Date:   Wed May 21 14:26:27 2014 +0100

ODS load perf: 7% of the time re-creating sheet name strings.

No need to create cached versions of stringified sheet tokens for
a given grammar at great for every formula that we compile; defer
until use. Is this a large cost on save ?

Change-Id: I8058ed564dbdc00ff45c02cb483c1a20a48af272

diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 527ad76..8b5158c 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -328,7 +328,9 @@ private:
 boolmbCloseBrackets;// whether to close open brackets 
automatically, default TRUE
 boolmbRewind;   // whether symbol is to be rewound 
to some step during lexical analysis
 std::vector maExternalFiles;
-std::vector maTabNames;
+
+std::vector maTabNames;/// sheet names mangled 
for the current grammer for output
+std::vector &GetSetupTabNames() const; /// get or setup tab 
names for the current grammar
 
 bool   NextNewToken(bool bInArray = false);
 
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 751b98b..6f6b89d 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -228,14 +228,24 @@ void ScCompiler::SetGrammar( const 
FormulaGrammar::Grammar eGrammar )
 if (eMyGrammar != GetGrammar())
 SetGrammarAndRefConvention( eMyGrammar, eOldGrammar);
 }
+}
+
+// Unclear how this was intended to be refreshed when the
+// grammer or sheet count is changed ? Ideally this would be
+// a method on Document that would globally cache these.
+std::vector &ScCompiler::GetSetupTabNames() const
+{
+std::vector &rTabNames = const_cast(this)->maTabNames;
 
-if (pDoc && maTabNames.empty())
+if (pDoc && rTabNames.empty())
 {
-maTabNames = pDoc->GetAllTableNames();
-std::vector::iterator it = maTabNames.begin(), itEnd = 
maTabNames.end();
+rTabNames = pDoc->GetAllTableNames();
+std::vector::iterator it = rTabNames.begin(), itEnd = 
rTabNames.end();
 for (; it != itEnd; ++it)
 ScCompiler::CheckTabQuotes(*it, 
formula::FormulaGrammar::extractRefConvention(meGrammar));
 }
+
+return rTabNames;
 }
 
 void ScCompiler::SetNumberFormatter( SvNumberFormatter* pFormatter )
@@ -4207,17 +4217,20 @@ void 
ScCompiler::CreateStringFromSingleRef(OUStringBuffer& rBuffer,FormulaToken*
 else
 {
 rBuffer.append(ScGlobal::GetRscString(STR_NO_NAME_REF));
-pConv->makeRefStr(rBuffer, meGrammar, aPos, aErrRef, maTabNames, 
aRef, true);
+pConv->makeRefStr(rBuffer, meGrammar, aPos, aErrRef,
+  GetSetupTabNames(), aRef, true);
 }
 }
 else
-pConv->makeRefStr(rBuffer, meGrammar, aPos, aErrRef, maTabNames, aRef, 
true);
+pConv->makeRefStr(rBuffer, meGrammar, aPos, aErrRef,
+  GetSetupTabNames(), aRef, true);
 }
 
 void ScCompiler::CreateStringFromDoubleRef(OUStringBuffer& 
rBuffer,FormulaToken* _pTokenP) const
 {
 OUString aErrRef = GetCurrentOpCodeMap()->getSymbol(ocErrRef);
-pConv->makeRefStr(rBuffer, meGrammar, aPos, aErrRef, maTabNames, 
static_cast(_pTokenP)->GetDoubleRef(), false);
+pConv->makeRefStr(rBuffer, meGrammar, aPos, aErrRef, GetSetupTabNames(),
+  static_cast(_pTokenP)->GetDoubleRef(), false);
 }
 
 void ScCompiler::CreateStringFromIndex(OUStringBuffer& rBuffer,FormulaToken* 
_pTokenP) const
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 0385970..cca342f 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - include/vcl vcl/Library_vcl.mk vcl/source

2014-05-22 Thread Michael Meeks
 include/vcl/debugevent.hxx   |   36 
 include/vcl/window.hxx   |3 
 vcl/Library_vcl.mk   |1 
 vcl/source/app/svmain.cxx|5 
 vcl/source/window/debugevent.cxx |  281 +++
 vcl/source/window/window.cxx |   12 +
 6 files changed, 338 insertions(+)

New commits:
commit 344dc7fd0684acc31f4c18e99e65bfa6700c9c64
Author: Michael Meeks 
Date:   Thu May 8 21:59:45 2014 +0100

Make the inserted text more European and sensible for now.

Change-Id: I8b2ecef11362c0fc1dc2b76780140881e769bb89

diff --git a/include/vcl/debugevent.hxx b/include/vcl/debugevent.hxx
index ce31570..2700324 100644
--- a/include/vcl/debugevent.hxx
+++ b/include/vcl/debugevent.hxx
@@ -20,7 +20,7 @@ class VCL_DLLPUBLIC DebugEventInjector : Timer {
   DebugEventInjector( sal_uInt32 nMaxEvents );
 
   Window *ChooseWindow();
-  void InjectKeyEvent();
+  void InjectTextEvent();
   void InjectMenuEvent();
   void InjectMouseEvent();
   void InjectEvent();
diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx
index 37ca716..e83909e 100644
--- a/vcl/source/window/debugevent.cxx
+++ b/vcl/source/window/debugevent.cxx
@@ -7,7 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
+// #include 
 #include 
 #include 
 #include 
@@ -110,11 +110,11 @@ void DebugEventInjector::InjectMenuEvent()
 SalMenuEvent aEvent = aIds[ getRandom() * aIds.size() ];
 bool bHandled = ImplWindowFrameProc( pSysWin, NULL, nEvent, &aEvent);
 
-fprintf( stderr, "Injected menu event %p (%d) '%s' -> %d\n",
+/*fprintf( stderr, "Injected menu event %p (%d) '%s' -> %d\n",
  aEvent.mpMenu, aEvent.mnId,
  OUStringToOString( ((Menu *)aEvent.mpMenu)->GetItemText( 
aEvent.mnId ),
 RTL_TEXTENCODING_UTF8 ).getStr(),
- (int)bHandled);
+ (int)bHandled); */
 }
 
 static void InitKeyEvent( SalKeyEvent &rKeyEvent )
@@ -131,22 +131,43 @@ static void InitKeyEvent( SalKeyEvent &rKeyEvent )
 rKeyEvent.mnRepeat = 0;
 }
 
-void DebugEventInjector::InjectKeyEvent()
+void DebugEventInjector::InjectTextEvent()
 {
 SalKeyEvent aKeyEvent;
 Window *pWindow = ChooseWindow();
 
 InitKeyEvent( aKeyEvent );
-sal_uInt16 nCode = getRandom() * KEY_CODE;
-if( getRandom() < 0.05 ) // modifier
-nCode |= (sal_uInt16)( getRandom() * KEY_MODTYPE ) & KEY_MODTYPE;
 
-aKeyEvent.mnCode = nCode;
-aKeyEvent.mnCharCode = getRandom() * 0x;
+if (getRandom() < 0.10) // Occasionally a truly random event
+{
+aKeyEvent.mnCode = getRandom() * KEY_CODE;
+aKeyEvent.mnCharCode = getRandom() * 0x;
+}
+else
+{
+struct {
+sal_uInt16 nCodeStart, nCodeEnd;
+char   aCharStart;
+} nTextCodes[] = {
+{ KEY_0, KEY_9, '0' },
+{ KEY_A, KEY_Z, 'a' }
+};
+
+size_t i = getRandom() * SAL_N_ELEMENTS( nTextCodes );
+int offset = trunc( getRandom() * ( nTextCodes[i].nCodeEnd - 
nTextCodes[i].nCodeStart ) );
+aKeyEvent.mnCode = nTextCodes[i].nCodeStart + offset;
+aKeyEvent.mnCharCode = nTextCodes[i].aCharStart + offset;
+//fprintf( stderr, "Char '%c' offset %d into record %d base '%c'\n",
+// aKeyEvent.mnCharCode, offset, (int)i, 
nTextCodes[i].aCharStart );
+}
+
+if( getRandom() < 0.05 ) // modifier
+aKeyEvent.mnCode |= (sal_uInt16)( getRandom() * KEY_MODTYPE ) & 
KEY_MODTYPE;
 
 bool bHandled = ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYINPUT, 
&aKeyEvent);
-fprintf (stderr, "Injected key 0x%x -> %d win %p\n",
- (int) aKeyEvent.mnCode, (int)bHandled, pWindow);
+//fprintf( stderr, "Injected key 0x%x -> %d win %p\n",
+// (int) aKeyEvent.mnCode, (int)bHandled, pWindow );
+ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYUP, &aKeyEvent );
 }
 
 /*
@@ -155,12 +176,14 @@ void DebugEventInjector::InjectKeyEvent()
  */
 void DebugEventInjector::InjectEvent()
 {
+//fprintf( stderr, "%6d - ", (int)mnEventsLeft );
+
 double nRand = getRandom();
-if (nRand < 0.50)
+if (nRand < 0.30)
 {
 int nEvents = getRandom() * 10;
 for (int i = 0; i < nEvents; i++)
-InjectKeyEvent();
+InjectTextEvent();
 }
 else if (nRand < 0.60)
 InjectKeyNavEdit();
@@ -222,8 +245,8 @@ void DebugEventInjector::InjectKeyNavEdit()
 aKeyEvent.mnCharCode = 0x0; // hopefully unused.
 
 bool bHandled = ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYINPUT, 
&aKeyEvent );
-fprintf( stderr, "Injected edit / move key 0x%x -> %d win %p\n",
- (int) aKeyEvent.mnCode, (int)bHandled, pWi

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

2014-05-22 Thread Michael Meeks
 include/vcl/debugevent.hxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 51f92027b49da2375c01594e3e193f7fb1e3d2c1
Author: Michael Meeks 
Date:   Thu May 22 10:28:11 2014 +0100

Fix Windows link issue around missing vtable fn.

Change-Id: I8a9a8c56b91783288e2319ad3a5e9803ab5562d0

diff --git a/include/vcl/debugevent.hxx b/include/vcl/debugevent.hxx
index 56c47ff..c61f93f 100644
--- a/include/vcl/debugevent.hxx
+++ b/include/vcl/debugevent.hxx
@@ -10,6 +10,8 @@
 #ifndef INCLUDED_VCL_DEBUGEVENT_HXX
 #define INCLUDED_VCL_DEBUGEVENT_HXX
 
+#if OSL_DEBUG_LEVEL > 0
+
 #include 
 #include 
 #include 
@@ -31,6 +33,8 @@ class VCL_DLLPUBLIC DebugEventInjector : Timer {
  static DebugEventInjector *getCreate();
 };
 
+#endif // OSL_DEBUG_LEVEL > 0
+
 #endif // INCLUDED_VCL_DEBUGEVENT_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'feature/fastsax'

2014-05-22 Thread Michael Meeks
New branch 'feature/fastsax' available with the following commits:
commit 16454dc15fa98a2064047f87c1981d3d13fb7329
Author: Michael Meeks 
Date:   Wed May 21 21:54:17 2014 +0100

First cut at FastParser wrapper test ...

Change-Id: I4e9f315d6ee56aea2ea36b75680705ead6b67d69

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


minutes of ESC call ...

2014-05-22 Thread Michael Meeks
* Present
+ Christian, Stephan, Bjoern, Norbert, Eike, Andras, Fridrich, Miklos,
  Michael M, Jacobo, Robinson, Eilidh, Markus, Caolan, Tor, Adam,
  Michael S, Norbert, Kendy
 
* Completed Action Items
+ send address sanitiser example (Markus)
+ http://lists.freedesktop.org/archives/libreoffice/2014-May/061142.html
+ chasing build / test intermittency:
[ seem to have vanished ]
+ Add StarOffice OOoXML export removal to 4.2 release notes (Cloph)
+ Add students to the commiter group (Norbert)
+ Avoiding big binary checkins (update git hook) (Miklos)
[ assuming good faith - chatty message to help people ]
+ walk through old gerrit changes, nag people, abandon changes (Bjoern)
[ done before branch-off, some will be abandoned in a week cf. note,
  could expire these automatically - auto-abandon ? ]
+ fix git importing service (Kendy)
 
* Pending Action Items:
+ crashtest box - more research (Moggi/Cloph)
[ ongoing ]
+ encourage icon authors to put them into git (Astron)
+ fix the Java bridge for MSVC2012 for 4.3 (Michael S.)
[ current plan to do before the branch-off ... (bit late) ]
+ create easy hack to find an auto-abandon config/setting for a gerrit 
(Bjoern)
+ schedule a new coverity build (moggi)
[ tried during the weekend,
  coverity analysis takes longer than 24hours etc. (Caolan)
+ may change the timeout to 36 hours ?
+ have enabled debugging so coverity can see asserts
+ not the problem still timing out ... ]
 
* GSOC Update (Fridrich)
+ started on Monday.
+ poke Fridrich / Cedric if no sign of students.
   + should have sent telephone contacts already.
+ please give them a welcome & help to get spun up.
+ all going well.
 
* FISL Brazil Update (Fridrich)
   + huge event, FOSDEM but in Latin America, and no dev-rooms.
  + several big halls for keynotes
   + LibreOffice well represented: several talks
   + Document Liberation & Flat ODF promoted by Fridrich
   + FISL release of LibreOffice etc.
   + great work there, huge community.
 
* Release Engineering update (Christian)
+ 4.3.0 Beta 1 status
   + tagged yesterday.
   + branch libreoffice-4-3 created
  + Windows build delayed, will be tonight / tomorrow
  + MacOS 10.6 needed a patch, not exactly the tag
  + only Beta1 -> no need for a separate tag.
   + investigating Windows test failures (spellchecking)
  + a python issue related to UI mode - not seen when
running from the terminal; different return value
internally; around stdout/in etc.
  + now patched.

http://cgit.freedesktop.org/libreoffice/core/tree/external/python3/python-3.3.3-py17797.patch.1
  + will run on XP and later without crashing.
  + currently a problem with Java runtime on Windows XP
  + problems with Tools->Macros->Python ... tries to init
Java VM.
AI:  + create / promote a 4.3 MAB for WinXP/Java (Cloph)
+ 4.2.5 RC1 status ...
   + deadline next Monday: get fixes into gerrit so on the radar ...
 
+ ... Now Feature Frozen ...
+ tripple approval needed for new features.
+ bug bug fixes welcome on the branch with no review.

+ Late features ?
+ libreofficekit bits / rename etc.
+ OpenGL pieces / status
   + experimentalising 3D chart bits.
   + impress work as well.
+ some changes in language listbox (Eike)
   + switching to a combo-box, so can enter an arbitrary lang_tag
  + due today.
+ preserving & rendering OOXML Artistic Effects (Jacobo)
 
+ Android / iOS remote
   + will build a new version with buttons to start/exit remote
 ptr. feature.
 
+ Credits update:
http://www.libreoffice.org/about-us/credits/
+ crediting translators (Cloph)
   + pointing to the pootle page, that lists translators.
 https://translations.documentfoundation.org/about/contributors/
AI:+ should link to it there (Cloph)
+ page is usually updated for a final release when we update
  the source code.
+ some bugs:
   + 'Contributors to Bundled Templates' - oddly coloured heading.
   + can we separate rows better for readability ?
  + embolden bold name perhaps ?
 
* 4.3 Features Page (Michael)
+ https://wiki.documentfoundation.org/ReleaseNotes/4.3
 
* UX Update (Bjoern)
+ getting into the start menu a 'get involved' button
  -> a help / extensions -> in start center
  + add a get involved button linking to the web / feedback page
  + or replace the help button in the start center (not the prime context 
for help).
 
* Distro branches & commits (Michael)
+ it would be great to see what others are doing in

[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - sal/cppunittester

2014-05-23 Thread Michael Meeks
 sal/cppunittester/cppunittester.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit c6feddb8ecbda5de417e4e0eaebd3ff9eafee7bb
Author: Michael Meeks 
Date:   Tue May 20 13:38:49 2014 +0100

Win32 - warn of extraordinary behaviour with LoadLibrary and long PATHs

Change-Id: I0a8ee157aa548a5b04df67a2355e3f4fd15e84cd

diff --git a/sal/cppunittester/cppunittester.cxx 
b/sal/cppunittester/cppunittester.cxx
index 6e5258b..7ac8ab5 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -206,6 +206,14 @@ public:
 manager.load(testlib, args);
 } catch (const CppUnit::DynamicLibraryManagerException &e) {
 std::cerr << "DynamicLibraryManagerException: \"" << e.what() << 
"\"\n";
+#ifdef WIN32
+const char *pPath = getenv ("PATH");
+if (pPath && strlen (pPath) > 256)
+{
+std::cerr << "Windows has significant build problems with long 
PATH variables ";
+std::cerr << "please check your PATH variable and 
re-autogen.\n";
+}
+#endif
 return false;
 }
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fastsax' - sc/source

2014-05-23 Thread Michael Meeks
 sc/source/filter/xml/xmlwrap.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit d824ea5c012eaae538845deef0b4e3f0144d9dbd
Author: Michael Meeks 
Date:   Fri May 23 13:55:29 2014 +0100

Fix compile issues; squash before merge.

Change-Id: Icbedc2ce374614ba371e75524bee8e70d3ae0bf6

diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index cb5fd28..b6c5be2 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -469,8 +470,7 @@ public:
 
 // The SAX-Parser-Interface
 virtual void SAL_CALL parseStream( const css::xml::sax::InputSource& 
structSource)
-throw ( css::xml::sax::SAXException,
-IOException,
+throw ( css::xml::sax::SAXException, css::io::IOException,
 css::uno::RuntimeException, std::exception) SAL_OVERRIDE
 {
 mxFastParser->parseStream(structSource);
@@ -484,35 +484,35 @@ public:
   new XFastHandlerWrapper( xHandler ) );
 else
 mxHandler.clear();
-mxFastParser->setFastDocumentHandler(xHandle);
+mxFastParser->setFastDocumentHandler(mxHandler);
 }
 
-virtual void SAL_CALL setErrorHandler(const css::uno::Reference< 
XErrorHandler > & xHandler)
+virtual void SAL_CALL setErrorHandler(const css::uno::Reference< 
xml::sax::XErrorHandler > & xHandler)
 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
 {
 mxFastParser->setErrorHandler(xHandler);
 }
 
-virtual void SAL_CALL setDTDHandler(const css::uno::Reference < 
XDTDHandler > & xHandler)
+virtual void SAL_CALL setDTDHandler(const css::uno::Reference < 
xml::sax::XDTDHandler > & /* xHandler */)
 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
 {
-mxFastParser->setDTDHandler(xHandler);
+assert(false);
 }
 
-virtual void SAL_CALL setEntityResolver(const css::uno::Reference<  
XEntityResolver >& xResolver)
+virtual void SAL_CALL setEntityResolver(const css::uno::Reference< 
xml::sax::XEntityResolver >& xResolver)
 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
 {
 mxFastParser->setEntityResolver(xResolver);
 }
 
-virtual void SAL_CALL setLocale( const Locale &locale )
 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
+virtual void SAL_CALL setLocale( const lang::Locale &locale )
+throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
 {
 mxFastParser->setLocale(locale);
 }
 };
 
-
-bool ScXMLImportWrapper::Import(bool bStylesOnly, ErrCode& nError)
+bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError )
 {
 uno::Reference xContext = 
comphelper::getProcessComponentContext();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fastsax' - include/vcl sc/inc sc/source

2014-05-23 Thread Michael Meeks
 include/vcl/debugevent.hxx  |6 +++-
 sc/inc/formulacell.hxx  |2 -
 sc/source/core/data/formulacell.cxx |   49 +---
 3 files changed, 51 insertions(+), 6 deletions(-)

New commits:
commit 5fcd3eb1ca7408bd0fb986b32ab642f5a6533b81
Author: Michael Meeks 
Date:   Fri May 23 21:51:14 2014 +0100

First cut at accelerated formula parsing - saves 29s of 131s for my file.

Change-Id: I48b613eb7131d6eb3902695aa30a1aa1a9ea5f6a

diff --git a/include/vcl/debugevent.hxx b/include/vcl/debugevent.hxx
index 2700324..c61f93f 100644
--- a/include/vcl/debugevent.hxx
+++ b/include/vcl/debugevent.hxx
@@ -10,6 +10,8 @@
 #ifndef INCLUDED_VCL_DEBUGEVENT_HXX
 #define INCLUDED_VCL_DEBUGEVENT_HXX
 
+#if OSL_DEBUG_LEVEL > 0
+
 #include 
 #include 
 #include 
@@ -25,12 +27,14 @@ class VCL_DLLPUBLIC DebugEventInjector : Timer {
   void InjectMouseEvent();
   void InjectEvent();
   void InjectKeyNavEdit();
-  virtual void Timeout();
+  virtual void Timeout() SAL_OVERRIDE;
 
   public:
  static DebugEventInjector *getCreate();
 };
 
+#endif // OSL_DEBUG_LEVEL > 0
+
 #endif // INCLUDED_VCL_DEBUGEVENT_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index 11c5cb1..3301d1e 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -375,7 +375,7 @@ public:
  * Turn a non-grouped cell into the top of a grouped cell.
  */
 ScFormulaCellGroupRef CreateCellGroup( SCROW nLen, bool bInvariant );
-ScFormulaCellGroupRef GetCellGroup();
+ScFormulaCellGroupRef GetCellGroup() const;
 void SetCellGroup( const ScFormulaCellGroupRef &xRef );
 
 CompareState CompareByTokenArray( ScFormulaCell& rOther ) const;
diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index ec07bde..1e66722 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1184,9 +1184,50 @@ void ScFormulaCell::CompileXML( 
sc::CompileFormulaContext& rCxt, ScProgress& rPr
 // pCode may not deleted for queries, but must be empty
 if ( pCode )
 pCode->Clear();
-ScTokenArray* pCodeOld = pCode;
-pCode = aComp.CompileString( aFormula, aFormulaNmsp );
-delete pCodeOld;
+
+bool bSkipCompile = false;
+
+static bool bNewPath = getenv ("FASTFORMULA");
+
+if ( bNewPath && !mxGroup && aFormulaNmsp.isEmpty() ) // optimization
+{
+ScAddress aPreviousCell( aPos );
+aPreviousCell.IncRow( -1 );
+ScFormulaCell *pPreviousCell = pDocument->GetFormulaCell( 
aPreviousCell );
+if( pPreviousCell )
+{
+// Now try to convert to a string quickly ...
+ScCompiler aBackComp( rCxt, aPos, *(pPreviousCell->pCode) );
+OUStringBuffer aShouldBe;
+aBackComp.CreateStringFromTokenArray( aShouldBe );
+
+fprintf (stderr, "compile '%s' ==? '%s'\n",
+ OUStringToOString( aFormula, RTL_TEXTENCODING_UTF8 
).getStr(),
+ OUStringToOString( aShouldBe.toString(), 
RTL_TEXTENCODING_UTF8 ).getStr());
+assert( aFormula[0] == '=' );
+if( aFormula.match(aShouldBe.makeStringAndClear(), 1) )
+{
+// Put them in the same formula group.
+ScFormulaCellGroupRef xGroup = pPreviousCell->GetCellGroup();
+if (!xGroup) // Last cell is not grouped yet. Start a new 
group.
+xGroup = pPreviousCell->CreateCellGroup(1, false);
+++xGroup->mnLength;
+SetCellGroup( xGroup );
+bSkipCompile = true;
+
+fprintf (stderr, "\twhoot ! a match - extended to %d\n",
+ (int)xGroup->mnLength);
+}
+}
+}
+
+if (!bSkipCompile)
+{
+ScTokenArray* pCodeOld = pCode;
+pCode = aComp.CompileString( aFormula, aFormulaNmsp );
+delete pCodeOld;
+}
+
 if( !pCode->GetCodeError() )
 {
 if ( !pCode->GetLen() )
@@ -3494,7 +3535,7 @@ ScFormulaCellGroupRef ScFormulaCell::CreateCellGroup( 
SCROW nLen, bool bInvarian
 return mxGroup;
 }
 
-ScFormulaCellGroupRef ScFormulaCell::GetCellGroup()
+ScFormulaCellGroupRef ScFormulaCell::GetCellGroup() const
 {
 return mxGroup;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - external/cppunit sal/cppunittester

2014-05-24 Thread Michael Meeks
 external/cppunit/ExternalProject_cppunit.mk |8 +++-
 external/cppunit/UnpackedTarball_cppunit.mk |1 +
 sal/cppunittester/cppunittester.cxx |1 +
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 526fa445c7f800852ccb4d7dec053c022786dfe2
Author: Michael Meeks 
Date:   Sat May 24 13:39:59 2014 +0100

cppunit: always compile with debugging symbols on windows.

Also cleanup some makefile pieces and give better error warnings.

Change-Id: I9f20d60f26d5828f60664941946c266c7d166f32

diff --git a/external/cppunit/ExternalProject_cppunit.mk 
b/external/cppunit/ExternalProject_cppunit.mk
index 8e74259..b6ce25a1 100644
--- a/external/cppunit/ExternalProject_cppunit.mk
+++ b/external/cppunit/ExternalProject_cppunit.mk
@@ -13,15 +13,13 @@ $(eval $(call gb_ExternalProject_register_targets,cppunit,\
build \
 ))
 
-
 ifeq ($(OS)$(COM),WNTMSC)
 $(call gb_ExternalProject_get_state_target,cppunit,build) :
$(call gb_ExternalProject_run,build,\
-   msbuild.exe cppunit_dll.vcxproj /p:Configuration=$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
-   $(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110 
/p:VisualStudioVersion=11.0) \
+   PROFILEFLAGS="$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) $(if 
$(filter 110,$(VCVER)),/p:PlatformToolset=v110 /p:VisualStudioVersion=11.0)" \
+   && msbuild.exe cppunit_dll.vcxproj 
/p:Configuration=$${PROFILEFLAGS}  \
&& cd ../DllPlugInTester \
-   && msbuild.exe DllPlugInTester.vcxproj /p:Configuration=$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
-   $(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110 
/p:VisualStudioVersion=11.0) \
+   && msbuild.exe DllPlugInTester.vcxproj 
/p:Configuration=$${PROFILEFLAGS} \
,src/cppunit)
 else
 
diff --git a/external/cppunit/UnpackedTarball_cppunit.mk 
b/external/cppunit/UnpackedTarball_cppunit.mk
index 86dc77d..6ec1e5b 100644
--- a/external/cppunit/UnpackedTarball_cppunit.mk
+++ b/external/cppunit/UnpackedTarball_cppunit.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
external/cppunit/windows.patch \
external/cppunit/unix.patch \
external/cppunit/wundef.patch \
+   external/cppunit/enable-win32-debug.patch \
 ))
 ifeq ($(DISABLE_DYNLOADING),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
diff --git a/sal/cppunittester/cppunittester.cxx 
b/sal/cppunittester/cppunittester.cxx
index 7ac8ab5..b42bf3a 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -214,6 +214,7 @@ public:
 std::cerr << "please check your PATH variable and 
re-autogen.\n";
 }
 #endif
+std::cerr << "Path is '" << getenv("PATH") << "'\n";
 return false;
 }
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - external/cppunit

2014-05-24 Thread Michael Meeks
 external/cppunit/enable-win32-debug.patch |   18 ++
 1 file changed, 18 insertions(+)

New commits:
commit ac93b6392fc34e22b2158f1b74132a13dff784aa
Author: Michael Meeks 
Date:   Sat May 24 14:45:45 2014 +0100

cppunit: Add missing patch.

Change-Id: Ic9216b525be449188d6be726462de893b6e23b5d

diff --git a/external/cppunit/enable-win32-debug.patch 
b/external/cppunit/enable-win32-debug.patch
new file mode 100644
index 000..661bb4b
--- /dev/null
+++ b/external/cppunit/enable-win32-debug.patch
@@ -0,0 +1,18 @@
+--- misc/cppunit-1.13.1/src/cppunit/cppunit_dll.vcxproj
 misc/build/cppunit-1.13.1/src/cppunit/cppunit_dll.vcxproj
+@@ -107,7 +107,6 @@
+   true
+   Level3
+   true
+-  OldStyle
+   
..\..\include;%(AdditionalIncludeDirectories)
+   
WIN32;NDEBUG;_WINDOWS;_USRDLL;CPPUNIT_BUILD_DLL;%(PreprocessorDefinitions)
+   .\ReleaseDll\
+@@ -138,6 +137,7 @@
+ 
+   true
+   true
++  true
+   Console
+   .\ReleaseDll\cppunit_dll.dll
+   .\ReleaseDll\cppunit_dll.lib
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - chart2/source include/vcl vcl/source

2014-05-24 Thread Michael Meeks
 chart2/source/view/charttypes/GL3DBarChart.cxx |5 +
 chart2/source/view/inc/GL3DBarChart.hxx|1 +
 include/vcl/openglwin.hxx  |5 +
 vcl/source/window/openglwin.cxx|   12 
 4 files changed, 23 insertions(+)

New commits:
commit 19871e8f974e9a8da3927d785142f598e2e56123
Author: Michael Meeks 
Date:   Sat May 24 16:43:05 2014 +0100

Stub mouse move events propagation to 3D charts.

Change-Id: If87545df4b1caeece107a20e0c00df88fb8e6fd5

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx 
b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 6d0b6d7..1837736 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -250,6 +250,11 @@ void GL3DBarChart::clickedAt(const Point& rPos)
 mpCamera->zoom(nId);
 }
 
+void GL3DBarChart::mouseDragMove(const Point& rPos, sal_uInt16 nButtons)
+{
+//fprintf(stderr, "drag move %ld %ld (0x%x)\n", rPos.X(), rPos.Y(), 
nButtons);
+}
+
 void GL3DBarChart::contextDestroyed()
 {
 mbValidContext = false;
diff --git a/chart2/source/view/inc/GL3DBarChart.hxx 
b/chart2/source/view/inc/GL3DBarChart.hxx
index 674daf6..5f1bcf9 100644
--- a/chart2/source/view/inc/GL3DBarChart.hxx
+++ b/chart2/source/view/inc/GL3DBarChart.hxx
@@ -47,6 +47,7 @@ public:
 virtual void update() SAL_OVERRIDE;
 
 virtual void clickedAt(const Point& rPos) SAL_OVERRIDE;
+virtual void mouseDragMove(const Point& rPos, sal_uInt16 nButtons) 
SAL_OVERRIDE;
 virtual void contextDestroyed() SAL_OVERRIDE;
 
 private:
diff --git a/include/vcl/openglwin.hxx b/include/vcl/openglwin.hxx
index 8e34d05..f69d0b3 100644
--- a/include/vcl/openglwin.hxx
+++ b/include/vcl/openglwin.hxx
@@ -10,6 +10,7 @@
 #ifndef INCLUDED_VCL_OPENGLWIN_HXX
 #define INCLUDED_VCL_OPENGLWIN_HXX
 
+#include 
 #include 
 #include 
 
@@ -24,6 +25,7 @@ public:
 virtual ~IRenderer() {}
 virtual void update() = 0;
 virtual void clickedAt(const Point& rPos) = 0;
+virtual void mouseDragMove(const Point& rPos, sal_uInt16 nButtons) = 0;
 
 virtual void contextDestroyed() = 0;
 };
@@ -39,7 +41,10 @@ public:
 void setRenderer(IRenderer* pRenderer);
 
 virtual void Paint(const Rectangle&) SAL_OVERRIDE;
+
 virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
+virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
+virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
 
 private:
 boost::scoped_ptr mpImpl;
diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx
index d6e5357..9fd3935 100644
--- a/vcl/source/window/openglwin.cxx
+++ b/vcl/source/window/openglwin.cxx
@@ -65,6 +65,18 @@ void OpenGLWindow::MouseButtonDown( const MouseEvent& rMEvt )
 mpRenderer->clickedAt(aPoint);
 }
 
+void OpenGLWindow::MouseButtonUp( const MouseEvent& /* rMEvt */ )
+{
+// in case we need to track button state ourselves.
+}
+
+void OpenGLWindow::MouseMove( const MouseEvent& rMEvt )
+{
+if(rMEvt.GetButtons())
+mpRenderer->mouseDragMove(rMEvt.GetPosPixel(),
+  rMEvt.GetButtons());
+}
+
 void OpenGLWindow::setRenderer(IRenderer* pRenderer)
 {
 mpRenderer = pRenderer;
___
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-05-24 Thread Michael Meeks
 chart2/source/view/charttypes/GL3DBarChart.cxx |5 +
 chart2/source/view/inc/GL3DBarChart.hxx|1 +
 include/vcl/openglwin.hxx  |5 +
 vcl/source/window/openglwin.cxx|   12 
 4 files changed, 23 insertions(+)

New commits:
commit f2e0eafabc27228f25cbbe6f23b225420b7da470
Author: Michael Meeks 
Date:   Sat May 24 16:43:05 2014 +0100

Stub mouse move events propagation to 3D charts.

Change-Id: If87545df4b1caeece107a20e0c00df88fb8e6fd5

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx 
b/chart2/source/view/charttypes/GL3DBarChart.cxx
index db1dc5b..c9419c2 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -289,6 +289,11 @@ void GL3DBarChart::clickedAt(const Point& rPos)
 mpCamera->zoom(nId);
 }
 
+void GL3DBarChart::mouseDragMove(const Point& rPos, sal_uInt16 nButtons)
+{
+//fprintf(stderr, "drag move %ld %ld (0x%x)\n", rPos.X(), rPos.Y(), 
nButtons);
+}
+
 void GL3DBarChart::contextDestroyed()
 {
 mbValidContext = false;
diff --git a/chart2/source/view/inc/GL3DBarChart.hxx 
b/chart2/source/view/inc/GL3DBarChart.hxx
index 0ca4e23..c85cff8 100644
--- a/chart2/source/view/inc/GL3DBarChart.hxx
+++ b/chart2/source/view/inc/GL3DBarChart.hxx
@@ -50,6 +50,7 @@ public:
 virtual void update() SAL_OVERRIDE;
 
 virtual void clickedAt(const Point& rPos) SAL_OVERRIDE;
+virtual void mouseDragMove(const Point& rPos, sal_uInt16 nButtons) 
SAL_OVERRIDE;
 virtual void contextDestroyed() SAL_OVERRIDE;
 
 private:
diff --git a/include/vcl/openglwin.hxx b/include/vcl/openglwin.hxx
index 8e34d05..f69d0b3 100644
--- a/include/vcl/openglwin.hxx
+++ b/include/vcl/openglwin.hxx
@@ -10,6 +10,7 @@
 #ifndef INCLUDED_VCL_OPENGLWIN_HXX
 #define INCLUDED_VCL_OPENGLWIN_HXX
 
+#include 
 #include 
 #include 
 
@@ -24,6 +25,7 @@ public:
 virtual ~IRenderer() {}
 virtual void update() = 0;
 virtual void clickedAt(const Point& rPos) = 0;
+virtual void mouseDragMove(const Point& rPos, sal_uInt16 nButtons) = 0;
 
 virtual void contextDestroyed() = 0;
 };
@@ -39,7 +41,10 @@ public:
 void setRenderer(IRenderer* pRenderer);
 
 virtual void Paint(const Rectangle&) SAL_OVERRIDE;
+
 virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
+virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
+virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
 
 private:
 boost::scoped_ptr mpImpl;
diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx
index d6e5357..9fd3935 100644
--- a/vcl/source/window/openglwin.cxx
+++ b/vcl/source/window/openglwin.cxx
@@ -65,6 +65,18 @@ void OpenGLWindow::MouseButtonDown( const MouseEvent& rMEvt )
 mpRenderer->clickedAt(aPoint);
 }
 
+void OpenGLWindow::MouseButtonUp( const MouseEvent& /* rMEvt */ )
+{
+// in case we need to track button state ourselves.
+}
+
+void OpenGLWindow::MouseMove( const MouseEvent& rMEvt )
+{
+if(rMEvt.GetButtons())
+mpRenderer->mouseDragMove(rMEvt.GetPosPixel(),
+  rMEvt.GetButtons());
+}
+
 void OpenGLWindow::setRenderer(IRenderer* pRenderer)
 {
 mpRenderer = pRenderer;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - solenv/gbuild

2014-05-24 Thread Michael Meeks
 solenv/gbuild/platform/com_MSC_class.mk |2 +-
 solenv/gbuild/platform/com_MSC_defs.mk  |4 
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 00b61f6717442f494a03c13fd3580a92fdfe6d4d
Author: Michael Meeks 
Date:   Sat May 24 17:21:39 2014 +0100

Win32: fix cppunit test strangeness.

Appending items to our search path for libraries leaves us vulnerable
to similarly named libraries in the system. In my case some
$HOME/AMD APP SDK/2.9/bin/x86/glew32.dll presumably incompatible
with our internal version. Hence prepend important path elements to
better match our program/ setup at run-time.

Change-Id: Iecf266a9d14d71de6c2e402793339e579ec0b987

diff --git a/solenv/gbuild/platform/com_MSC_class.mk 
b/solenv/gbuild/platform/com_MSC_class.mk
old mode 100644
new mode 100755
index fb617ac..60fb59e
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -364,7 +364,7 @@ endef
 # CppunitTest class
 
 gb_CppunitTest_DEFS := -D_DLL
-gb_CppunitTest_CPPTESTPRECOMMAND := $(gb_Helper_set_ld_path):"$(shell cygpath 
-u $(gb_Library_DLLDIR)):$(shell cygpath -u 
$(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/$(if 
$(MSVC_USE_DEBUG_RUNTIME),DebugDll,ReleaseDll))"
+gb_CppunitTest_CPPTESTPRECOMMAND := $(call gb_Helper_prepend_ld_path,$(shell 
cygpath -u $(gb_Library_DLLDIR)):$(shell cygpath -u 
$(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/$(if 
$(MSVC_USE_DEBUG_RUNTIME),DebugDll,ReleaseDll)))
 
 gb_CppunitTest_get_filename = test_$(1).dll
 gb_CppunitTest_get_ilibfilename = itest_$(1).lib
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk 
b/solenv/gbuild/platform/com_MSC_defs.mk
old mode 100644
new mode 100755
index 36c14e9..6e590b5
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -289,4 +289,8 @@ gb_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL)
 
 gb_Helper_set_ld_path := PATH="$$PATH:$(shell cygpath -u 
$(INSTDIR)/$(LIBO_URE_LIB_FOLDER)):$(shell cygpath -u 
$(INSTDIR)/$(LIBO_BIN_FOLDER))"
 
+define gb_Helper_prepend_ld_path
+PATH="$(shell cygpath -u $(INSTDIR)/$(LIBO_URE_LIB_FOLDER)):$(shell cygpath -u 
$(INSTDIR)/$(LIBO_BIN_FOLDER)):$(1):$$PATH"
+endef
+
 # vim: set noet sw=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - external/cppunit sal/cppunittester solenv/gbuild

2014-05-24 Thread Michael Meeks
 external/cppunit/ExternalProject_cppunit.mk |8 +++-
 external/cppunit/UnpackedTarball_cppunit.mk |1 +
 external/cppunit/enable-win32-debug.patch   |   18 ++
 sal/cppunittester/cppunittester.cxx |1 +
 solenv/gbuild/platform/com_MSC_class.mk |2 +-
 solenv/gbuild/platform/com_MSC_defs.mk  |4 
 6 files changed, 28 insertions(+), 6 deletions(-)

New commits:
commit a7653da3317c4e1a52f6152f42d3d9fe3170918e
Author: Michael Meeks 
Date:   Sat May 24 17:21:39 2014 +0100

Win32: fix cppunit test strangeness.

Appending items to our search path for libraries leaves us vulnerable
to similarly named libraries in the system. In my case some
$HOME/AMD APP SDK/2.9/bin/x86/glew32.dll presumably incompatible
with our internal version. Hence prepend important path elements to
better match our program/ setup at run-time.

Change-Id: Iecf266a9d14d71de6c2e402793339e579ec0b987

diff --git a/solenv/gbuild/platform/com_MSC_class.mk 
b/solenv/gbuild/platform/com_MSC_class.mk
old mode 100644
new mode 100755
index fb617ac..60fb59e
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -364,7 +364,7 @@ endef
 # CppunitTest class
 
 gb_CppunitTest_DEFS := -D_DLL
-gb_CppunitTest_CPPTESTPRECOMMAND := $(gb_Helper_set_ld_path):"$(shell cygpath 
-u $(gb_Library_DLLDIR)):$(shell cygpath -u 
$(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/$(if 
$(MSVC_USE_DEBUG_RUNTIME),DebugDll,ReleaseDll))"
+gb_CppunitTest_CPPTESTPRECOMMAND := $(call gb_Helper_prepend_ld_path,$(shell 
cygpath -u $(gb_Library_DLLDIR)):$(shell cygpath -u 
$(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/$(if 
$(MSVC_USE_DEBUG_RUNTIME),DebugDll,ReleaseDll)))
 
 gb_CppunitTest_get_filename = test_$(1).dll
 gb_CppunitTest_get_ilibfilename = itest_$(1).lib
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk 
b/solenv/gbuild/platform/com_MSC_defs.mk
old mode 100644
new mode 100755
index 36c14e9..6e590b5
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -289,4 +289,8 @@ gb_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL)
 
 gb_Helper_set_ld_path := PATH="$$PATH:$(shell cygpath -u 
$(INSTDIR)/$(LIBO_URE_LIB_FOLDER)):$(shell cygpath -u 
$(INSTDIR)/$(LIBO_BIN_FOLDER))"
 
+define gb_Helper_prepend_ld_path
+PATH="$(shell cygpath -u $(INSTDIR)/$(LIBO_URE_LIB_FOLDER)):$(shell cygpath -u 
$(INSTDIR)/$(LIBO_BIN_FOLDER)):$(1):$$PATH"
+endef
+
 # vim: set noet sw=4:
commit 02638a0865271959e7a424622088eb502721e24c
Author: Michael Meeks 
Date:   Sat May 24 13:39:59 2014 +0100

cppunit: always compile with debugging symbols on windows.

Also cleanup some makefile pieces and give better error warnings.

Change-Id: I9f20d60f26d5828f60664941946c266c7d166f32

diff --git a/external/cppunit/ExternalProject_cppunit.mk 
b/external/cppunit/ExternalProject_cppunit.mk
index 9a163e7..30a5905 100644
--- a/external/cppunit/ExternalProject_cppunit.mk
+++ b/external/cppunit/ExternalProject_cppunit.mk
@@ -13,15 +13,13 @@ $(eval $(call gb_ExternalProject_register_targets,cppunit,\
build \
 ))
 
-
 ifeq ($(OS)$(COM),WNTMSC)
 $(call gb_ExternalProject_get_state_target,cppunit,build) :
$(call gb_ExternalProject_run,build,\
-   msbuild.exe cppunit_dll.vcxproj /p:Configuration=$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
-   $(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110_xp 
/p:VisualStudioVersion=11.0) \
+   PROFILEFLAGS="$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) $(if 
$(filter 110,$(VCVER)),/p:PlatformToolset=v110_xp /p:VisualStudioVersion=11.0)" 
\
+   && msbuild.exe cppunit_dll.vcxproj 
/p:Configuration=$${PROFILEFLAGS}  \
&& cd ../DllPlugInTester \
-   && msbuild.exe DllPlugInTester.vcxproj /p:Configuration=$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
-   $(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110_xp 
/p:VisualStudioVersion=11.0) \
+   && msbuild.exe DllPlugInTester.vcxproj 
/p:Configuration=$${PROFILEFLAGS} \
,src/cppunit)
 else
 
diff --git a/external/cppunit/UnpackedTarball_cppunit.mk 
b/external/cppunit/UnpackedTarball_cppunit.mk
index a46e9bf..fbae41b 100644
--- a/external/cppunit/UnpackedTarball_cppunit.mk
+++ b/external/cppunit/UnpackedTarball_cppunit.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
external/cppunit/unix.patch \
external/cppunit/wundef.patch \
external/cppunit/CPPUNIT_PLUGIN_EXPORT.patch.0 \
+   external/cppunit/enable-win32-debug.patch \
 ))
 ifeq ($(DISABLE_DYNLOADING),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
diff --git a/external/cppunit/enable-win32-debug.patch 
b/external/cppunit/enable-win32-debug.patch
new file mode 100644
index 000..661bb4b
--- /dev/null
+++ b/external/cppunit/enable

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

2014-05-24 Thread Michael Meeks
 external/libgltf/UnpackedTarball_libgltf.mk   |1 +
 external/libgltf/patches/openmp-disable.patch |   12 
 2 files changed, 13 insertions(+)

New commits:
commit 42f2f473305372050f012aa952ef21b5596fd1cc
Author: Michael Meeks 
Date:   Sat May 24 20:33:19 2014 +0100

libgltf: turn off openMP usage without any detection code.

Change-Id: Ic823109b812a3d99d8462cf67cd9aa87094bba06

diff --git a/external/libgltf/UnpackedTarball_libgltf.mk 
b/external/libgltf/UnpackedTarball_libgltf.mk
index d8434b6..33889fb 100644
--- a/external/libgltf/UnpackedTarball_libgltf.mk
+++ b/external/libgltf/UnpackedTarball_libgltf.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libgltf,1))
 $(eval $(call gb_UnpackedTarball_add_patches,libgltf,\
external/libgltf/patches/include_path_glew.patch \
external/libgltf/patches/include_path_freetype.patch \
+   external/libgltf/patches/openmp-disable.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libgltf/patches/openmp-disable.patch 
b/external/libgltf/patches/openmp-disable.patch
new file mode 100644
index 000..c084183
--- /dev/null
+++ b/external/libgltf/patches/openmp-disable.patch
@@ -0,0 +1,12 @@
+--- libgltf/src/RenderScene.h
 libgltf/src/RenderScene.h
+@@ -16,7 +16,8 @@
+ #include "FPSCounter.h"
+ #include "Timer.h"
+ 
+-#define OPENMPENABLE   1
++// Needs a configure / etc. detection to see if omp.h is on the system ...
++#define OPENMPENABLE   0
+ #if OPENMPENABLE
+ #include 
+ #define WAVESIZE 4
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-24 Thread Michael Meeks
 sc/source/core/data/formulacell.cxx |   48 +---
 1 file changed, 45 insertions(+), 3 deletions(-)

New commits:
commit 4a5d600a0ab8b851bd7565e36be3419066145908
Author: Michael Meeks 
Date:   Fri May 23 21:51:14 2014 +0100

ODS load perf: accelerate CompileXML for formula by stringify and compare.

For long columns of repeated formula, it is far faster to convert a formula
to a string and compare to see if the next cell in a column matches, than
it is to parse the formula string itself (sad but true).

This saves 29s of 131s of load time for my (admittedly large) ODS file.

Change-Id: I48b613eb7131d6eb3902695aa30a1aa1a9ea5f6a

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index ec07bde..69debaf 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1184,9 +1184,51 @@ void ScFormulaCell::CompileXML( 
sc::CompileFormulaContext& rCxt, ScProgress& rPr
 // pCode may not deleted for queries, but must be empty
 if ( pCode )
 pCode->Clear();
-ScTokenArray* pCodeOld = pCode;
-pCode = aComp.CompileString( aFormula, aFormulaNmsp );
-delete pCodeOld;
+
+bool bSkipCompile = false;
+
+static bool bNewPath = getenv ("FASTFORMULA");
+
+if ( bNewPath && !mxGroup && aFormulaNmsp.isEmpty() ) // optimization
+{
+ScAddress aPreviousCell( aPos );
+aPreviousCell.IncRow( -1 );
+ScFormulaCell *pPreviousCell = pDocument->GetFormulaCell( 
aPreviousCell );
+if( pPreviousCell )
+{
+// Now try to convert to a string quickly ...
+ScCompiler aBackComp( rCxt, aPos, *(pPreviousCell->pCode) );
+OUStringBuffer aShouldBeBuf;
+aBackComp.CreateStringFromTokenArray( aShouldBeBuf );
+
+assert( aFormula[0] == '=' );
+OUString aShouldBe = aShouldBeBuf.makeStringAndClear();
+if( aFormula.getLength() == aShouldBe.getLength() + 1 &&
+aFormula.match( aShouldBe, 1 ) ) // initial '='
+{
+// Put them in the same formula group.
+ScFormulaCellGroupRef xGroup = pPreviousCell->GetCellGroup();
+if (!xGroup) // Last cell is not grouped yet. Start a new 
group.
+xGroup = pPreviousCell->CreateCellGroup(1, false);
+++xGroup->mnLength;
+SetCellGroup( xGroup );
+
+bSkipCompile = true;
+
+SAL_INFO( "sc", "merged '" << aFormula << "' == "
+  "'" << aShouldBe << "'" <<
+  " extend group to " << xGroup->mnLength );
+}
+}
+}
+
+if (!bSkipCompile)
+{
+ScTokenArray* pCodeOld = pCode;
+pCode = aComp.CompileString( aFormula, aFormulaNmsp );
+delete pCodeOld;
+}
+
 if( !pCode->GetCodeError() )
 {
 if ( !pCode->GetLen() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-24 Thread Michael Meeks
 sc/source/core/data/formulacell.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 8400f1092d2ac38ff0570837957250f45c6e156d
Author: Michael Meeks 
Date:   Sat May 24 21:43:16 2014 +0100

ODS load perf: remove left-over / debugging getenv.

Change-Id: I08bae50685ce52b8329b11b8ca3d083648dfc6fc

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 69debaf..1e63308 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1187,9 +1187,7 @@ void ScFormulaCell::CompileXML( 
sc::CompileFormulaContext& rCxt, ScProgress& rPr
 
 bool bSkipCompile = false;
 
-static bool bNewPath = getenv ("FASTFORMULA");
-
-if ( bNewPath && !mxGroup && aFormulaNmsp.isEmpty() ) // optimization
+if ( !mxGroup && aFormulaNmsp.isEmpty() ) // optimization
 {
 ScAddress aPreviousCell( aPos );
 aPreviousCell.IncRow( -1 );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-24 Thread Michael Meeks
 sc/inc/formulacell.hxx  |2 +-
 sc/source/core/data/formulacell.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6540350a710bcd194fda42827878e6eb1b3c45e7
Author: Michael Meeks 
Date:   Fri May 23 21:51:14 2014 +0100

sc: constify GetCellGroup.

Change-Id: I50d47b19391c6b54570bc3982b8ec22563662983

diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index 11c5cb1..3301d1e 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -375,7 +375,7 @@ public:
  * Turn a non-grouped cell into the top of a grouped cell.
  */
 ScFormulaCellGroupRef CreateCellGroup( SCROW nLen, bool bInvariant );
-ScFormulaCellGroupRef GetCellGroup();
+ScFormulaCellGroupRef GetCellGroup() const;
 void SetCellGroup( const ScFormulaCellGroupRef &xRef );
 
 CompareState CompareByTokenArray( ScFormulaCell& rOther ) const;
diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 1e63308..5a79aaa 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -3534,7 +3534,7 @@ ScFormulaCellGroupRef ScFormulaCell::CreateCellGroup( 
SCROW nLen, bool bInvarian
 return mxGroup;
 }
 
-ScFormulaCellGroupRef ScFormulaCell::GetCellGroup()
+ScFormulaCellGroupRef ScFormulaCell::GetCellGroup() const
 {
 return mxGroup;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - 2 commits - sc/source

2014-05-24 Thread Michael Meeks
 sc/source/core/data/formulacell.cxx |   46 +---
 1 file changed, 43 insertions(+), 3 deletions(-)

New commits:
commit 9d9c0b5194839b3cdf814b77f1cc0584b4b43ef5
Author: Michael Meeks 
Date:   Sat May 24 21:43:16 2014 +0100

ODS load perf: remove left-over / debugging getenv.

Change-Id: I08bae50685ce52b8329b11b8ca3d083648dfc6fc

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 69debaf..1e63308 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1187,9 +1187,7 @@ void ScFormulaCell::CompileXML( 
sc::CompileFormulaContext& rCxt, ScProgress& rPr
 
 bool bSkipCompile = false;
 
-static bool bNewPath = getenv ("FASTFORMULA");
-
-if ( bNewPath && !mxGroup && aFormulaNmsp.isEmpty() ) // optimization
+if ( !mxGroup && aFormulaNmsp.isEmpty() ) // optimization
 {
 ScAddress aPreviousCell( aPos );
 aPreviousCell.IncRow( -1 );
commit 7a1f047cf82ae5b8eff3dd1ed16dec93c5f36c52
Author: Michael Meeks 
Date:   Fri May 23 21:51:14 2014 +0100

ODS load perf: accelerate CompileXML for formula by stringify and compare.

For long columns of repeated formula, it is far faster to convert a formula
to a string and compare to see if the next cell in a column matches, than
it is to parse the formula string itself (sad but true).

This saves 29s of 131s of load time for my (admittedly large) ODS file.

Change-Id: I48b613eb7131d6eb3902695aa30a1aa1a9ea5f6a

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index ec07bde..69debaf 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1184,9 +1184,51 @@ void ScFormulaCell::CompileXML( 
sc::CompileFormulaContext& rCxt, ScProgress& rPr
 // pCode may not deleted for queries, but must be empty
 if ( pCode )
 pCode->Clear();
-ScTokenArray* pCodeOld = pCode;
-pCode = aComp.CompileString( aFormula, aFormulaNmsp );
-delete pCodeOld;
+
+bool bSkipCompile = false;
+
+static bool bNewPath = getenv ("FASTFORMULA");
+
+if ( bNewPath && !mxGroup && aFormulaNmsp.isEmpty() ) // optimization
+{
+ScAddress aPreviousCell( aPos );
+aPreviousCell.IncRow( -1 );
+ScFormulaCell *pPreviousCell = pDocument->GetFormulaCell( 
aPreviousCell );
+if( pPreviousCell )
+{
+// Now try to convert to a string quickly ...
+ScCompiler aBackComp( rCxt, aPos, *(pPreviousCell->pCode) );
+OUStringBuffer aShouldBeBuf;
+aBackComp.CreateStringFromTokenArray( aShouldBeBuf );
+
+assert( aFormula[0] == '=' );
+OUString aShouldBe = aShouldBeBuf.makeStringAndClear();
+if( aFormula.getLength() == aShouldBe.getLength() + 1 &&
+aFormula.match( aShouldBe, 1 ) ) // initial '='
+{
+// Put them in the same formula group.
+ScFormulaCellGroupRef xGroup = pPreviousCell->GetCellGroup();
+if (!xGroup) // Last cell is not grouped yet. Start a new 
group.
+xGroup = pPreviousCell->CreateCellGroup(1, false);
+++xGroup->mnLength;
+SetCellGroup( xGroup );
+
+bSkipCompile = true;
+
+SAL_INFO( "sc", "merged '" << aFormula << "' == "
+  "'" << aShouldBe << "'" <<
+  " extend group to " << xGroup->mnLength );
+}
+}
+}
+
+if (!bSkipCompile)
+{
+ScTokenArray* pCodeOld = pCode;
+pCode = aComp.CompileString( aFormula, aFormulaNmsp );
+delete pCodeOld;
+}
+
 if( !pCode->GetCodeError() )
 {
 if ( !pCode->GetLen() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-26 Thread Michael Meeks
 sc/source/core/tool/compiler.cxx |   13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit ef334d5acafd918437fbc5d0555a5e161059feb1
Author: Michael Meeks 
Date:   Mon May 26 13:31:12 2014 +0100

ODS load/save perf: re-use buffer while exporting tab names.

Allocating temporary strings just to append a '.' is a tad silly.

Change-Id: Ifdbd45bcc4d5e36ebee2b052f64ceeed5686d6cf

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 0af9ad3..304767a 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -731,15 +731,13 @@ struct ConventionOOO_A1 : public Convention_A1
 ConventionOOO_A1() : Convention_A1 (FormulaGrammar::CONV_OOO) { }
 ConventionOOO_A1( FormulaGrammar::AddressConvention eConv ) : 
Convention_A1 (eConv) { }
 
-static OUString MakeTabStr( const std::vector& rTabNames, SCTAB 
nTab )
+static void MakeTabStr( OUStringBuffer &rBuf, const std::vector& 
rTabNames, SCTAB nTab )
 {
-OUString aString;
 if (static_cast(nTab) >= rTabNames.size())
-aString = ScGlobal::GetRscString(STR_NO_REF_TABLE);
+rBuf.append(ScGlobal::GetRscString(STR_NO_REF_TABLE));
 else
-aString = rTabNames[nTab];
-aString += ".";
-return aString;
+rBuf.append(rTabNames[nTab]);
+rBuf.append('.');
 }
 
 void MakeOneRefStrImpl(
@@ -759,10 +757,9 @@ struct ConventionOOO_A1 : public Convention_A1
 }
 else
 {
-OUString aRefStr(MakeTabStr(rTabNames, rAbsRef.Tab()));
 if (!rRef.IsTabRel())
 rBuffer.append('$');
-rBuffer.append(aRefStr);
+MakeTabStr(rBuffer, rTabNames, rAbsRef.Tab());
 }
 }
 else if (bODF)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - sc/source

2014-05-26 Thread Michael Meeks
 sc/source/core/tool/compiler.cxx |   13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit ba643a0134a991882f920ad509e88a7e9f10f1de
Author: Michael Meeks 
Date:   Mon May 26 13:31:12 2014 +0100

ODS load/save perf: re-use buffer while exporting tab names.

Allocating temporary strings just to append a '.' is a tad silly.

Change-Id: Ifdbd45bcc4d5e36ebee2b052f64ceeed5686d6cf

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 751b98b..9b032bd 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -721,15 +721,13 @@ struct ConventionOOO_A1 : public Convention_A1
 ConventionOOO_A1() : Convention_A1 (FormulaGrammar::CONV_OOO) { }
 ConventionOOO_A1( FormulaGrammar::AddressConvention eConv ) : 
Convention_A1 (eConv) { }
 
-static OUString MakeTabStr( const std::vector& rTabNames, SCTAB 
nTab )
+static void MakeTabStr( OUStringBuffer &rBuf, const std::vector& 
rTabNames, SCTAB nTab )
 {
-OUString aString;
 if (static_cast(nTab) >= rTabNames.size())
-aString = ScGlobal::GetRscString(STR_NO_REF_TABLE);
+rBuf.append(ScGlobal::GetRscString(STR_NO_REF_TABLE));
 else
-aString = rTabNames[nTab];
-aString += ".";
-return aString;
+rBuf.append(rTabNames[nTab]);
+rBuf.append('.');
 }
 
 void MakeOneRefStrImpl(
@@ -749,10 +747,9 @@ struct ConventionOOO_A1 : public Convention_A1
 }
 else
 {
-OUString aRefStr(MakeTabStr(rTabNames, rAbsRef.Tab()));
 if (!rRef.IsTabRel())
 rBuffer.append('$');
-rBuffer.append(aRefStr);
+MakeTabStr(rBuffer, rTabNames, rAbsRef.Tab());
 }
 }
 else if (bODF)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - chart2/source

2014-05-26 Thread Michael Meeks
 chart2/source/view/inc/3DChartObjects.hxx  |   19 +++
 chart2/source/view/inc/GL3DRenderer.hxx|   13 +++--
 chart2/source/view/main/3DChartObjects.cxx |   24 +++-
 chart2/source/view/main/GL3DRenderer.cxx   |   21 +
 chart2/source/view/main/OpenGLRender.cxx   |   21 -
 chart2/source/view/main/OpenGLRender.hxx   |   11 +--
 6 files changed, 79 insertions(+), 30 deletions(-)

New commits:
commit 24e9b8fda0e0ca6ae8b5fbe26f13948da7d7b6f4
Author: Michael Meeks 
Date:   Mon May 26 20:34:44 2014 +0100

cache the bitmap converted to flat RGBA pixels.

Change-Id: Ied38d4457fbc04ded42fe4fb55a8ec654cefa259

diff --git a/chart2/source/view/inc/3DChartObjects.hxx 
b/chart2/source/view/inc/3DChartObjects.hxx
index 39d2411..4674646 100644
--- a/chart2/source/view/inc/3DChartObjects.hxx
+++ b/chart2/source/view/inc/3DChartObjects.hxx
@@ -15,17 +15,28 @@
 #include "GL3DRenderer.hxx"
 
 #include 
+#include 
 
 namespace chart {
 
 namespace opengl3D {
 
+struct TextCacheItem
+{
+TextCacheItem(sal_uInt8 *pPixels, ::Size aSize)
+: maSize(aSize), maPixels(pPixels)
+{
+}
+::Size maSize;
+boost::shared_array maPixels;
+};
+
 class TextCache
 {
 public:
-const BitmapEx& getText(OUString rText);
+const TextCacheItem &getText(OUString rText);
 private:
-typedef boost::ptr_map TextCacheType;
+typedef boost::ptr_map TextCacheType;
 
 TextCacheType maTextCache;
 };
@@ -85,7 +96,7 @@ public:
 void setPosition(const glm::vec3& rTopLeft, const glm::vec3& rTopRight, 
const glm::vec3& rBottomRight);
 
 private:
-const BitmapEx& mrText;
+TextCacheItem maText;
 glm::vec3 maTopLeft;
 glm::vec3 maTopRight;
 glm::vec3 maBottomRight;
@@ -100,7 +111,7 @@ public:
 void setPosition(const glm::vec2& rTopLeft, const glm::vec2& rBottomRight);
 
 private:
-const BitmapEx& mrText;
+TextCacheItem maText;
 glm::vec2 maTopLeft;
 glm::vec2 maBottomRight;
 };
diff --git a/chart2/source/view/inc/GL3DRenderer.hxx 
b/chart2/source/view/inc/GL3DRenderer.hxx
index c2d6b4b..b16453c 100644
--- a/chart2/source/view/inc/GL3DRenderer.hxx
+++ b/chart2/source/view/inc/GL3DRenderer.hxx
@@ -16,6 +16,7 @@
 #include "glm/gtx/quaternion.hpp"
 
 #include 
+#include 
 #include 
 
 #include 
@@ -162,8 +163,16 @@ public:
 void EndAddShape3DExtrudeObject();
 void SetSize(const Size& rSize);
 void SetCameraInfo(glm::vec3 pos, glm::vec3 direction, glm::vec3 up);
-void CreateTextTexture(const BitmapEx& rBitmapEx, glm::vec3 
vTopLeft,glm::vec3 vTopRight, glm::vec3 vBottomRight, glm::vec3 vBottomLeft, 
sal_uInt32 nUniqueId);
-void CreateScreenTextTexture(const BitmapEx& rBitmapEx, glm::vec2 
vTopLeft, glm::vec2 vBottomRight, sal_uInt32 nUniqueId);
+void CreateTextTexture(const boost::shared_array &bitmapBuf,
+   ::Size maSizePixels,
+   glm::vec3 vTopLeft,glm::vec3 vTopRight,
+   glm::vec3 vBottomRight, glm::vec3 vBottomLeft,
+   sal_uInt32 nUniqueId);
+void CreateScreenTextTexture(const boost::shared_array 
&bitmapBuf,
+ ::Size maSizePixels,
+
+ glm::vec2 vTopLeft, glm::vec2 vBottomRight,
+ sal_uInt32 nUniqueId);
 void ProcessUnrenderedShape();
 
 void SetPickingMode(bool bPickingMode);
diff --git a/chart2/source/view/main/3DChartObjects.cxx 
b/chart2/source/view/main/3DChartObjects.cxx
index b838d31..09ed6aa 100644
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -68,7 +68,7 @@ void Line::setLineColor(const Color& rColor)
 maLineColor = rColor;
 }
 
-const BitmapEx& TextCache::getText(OUString rText)
+const TextCacheItem& TextCache::getText(OUString rText)
 {
 TextCacheType::const_iterator itr = maTextCache.find(rText);
 if(itr != maTextCache.end())
@@ -85,14 +85,16 @@ const BitmapEx& TextCache::getText(OUString rText)
 aDevice.SetBackground(Wallpaper(COL_TRANSPARENT));
 aDevice.DrawText(Point(0,0), rText);
 
-BitmapEx* pText = new BitmapEx(aDevice.GetBitmapEx(Point(0,0), 
aDevice.GetOutputSize()));
-maTextCache.insert(rText, pText);
-return *pText;
+BitmapEx aText(aDevice.GetBitmapEx(Point(0,0), aDevice.GetOutputSize()));
+TextCacheItem *pItem = new 
TextCacheItem(OpenGLHelper::ConvertBitmapExToRGBABuffer(aText), 
aText.GetSizePixel());
+maTextCache.insert(rText, pItem);
+
+return *maTextCache.find(rText)->second;
 }
 
 Text::Text(OpenGL3DRenderer* pRenderer, TextCache& rTextCache, const OUString& 
rStr, sal_uInt32 nId):
 Renderable3DObject(pRenderer, nId),
-mrText(rTextCache.getText(rStr))
+maText(rTextCache.getText(rStr))
 {
 }
 
@@ -100,12 +1

[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - sc/source

2014-05-27 Thread Michael Meeks
 sc/source/core/data/formulacell.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 1ab702a1ec9e06a13ea98a55bc6dad62fdb61568
Author: Michael Meeks 
Date:   Tue May 27 11:14:54 2014 +0100

ODS load perf: fix FMR.

Change-Id: I671c9a441d1c598fbf5fdb5706ab0ed6e1bcf9a8

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 1e63308..35518bc 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1212,6 +1212,7 @@ void ScFormulaCell::CompileXML( 
sc::CompileFormulaContext& rCxt, ScProgress& rPr
 SetCellGroup( xGroup );
 
 bSkipCompile = true;
+pCode = pPreviousCell->pCode;
 
 SAL_INFO( "sc", "merged '" << aFormula << "' == "
   "'" << aShouldBe << "'" <<
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - chart2/source

2014-05-27 Thread Michael Meeks
 chart2/source/view/inc/GL3DRenderer.hxx|1 
 chart2/source/view/main/3DChartObjects.cxx |6 +++-
 chart2/source/view/main/GL3DRenderer.cxx   |   41 -
 3 files changed, 40 insertions(+), 8 deletions(-)

New commits:
commit 331220fd8ccb73f2353d33af0a9a88ee152a3031
Author: Michael Meeks 
Date:   Tue May 27 21:58:31 2014 +0100

Add a grey gradient background to the 3D chartm and tweak text color.

Change-Id: I8b74a1e7f32c30b6a908c0870bbeacc00cdea444

diff --git a/chart2/source/view/inc/GL3DRenderer.hxx 
b/chart2/source/view/inc/GL3DRenderer.hxx
index b16453c..f110693 100644
--- a/chart2/source/view/inc/GL3DRenderer.hxx
+++ b/chart2/source/view/inc/GL3DRenderer.hxx
@@ -181,6 +181,7 @@ public:
 private:
 void MoveModelf(PosVecf3& trans,PosVecf3& angle,PosVecf3& scale);
 
+void ClearBuffer();
 void RenderPolygon3DObject();
 void RenderLine3D(Polygon3DInfo &polygon);
 void RenderPolygon3D(Polygon3DInfo &polygon);
diff --git a/chart2/source/view/main/3DChartObjects.cxx 
b/chart2/source/view/main/3DChartObjects.cxx
index 09ed6aa..038caaf 100644
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -77,7 +77,11 @@ const TextCacheItem& TextCache::getText(OUString rText)
 VirtualDevice aDevice(*Application::GetDefaultDevice(), 0, 0);
 Font aFont = aDevice.GetFont();
 aFont.SetSize(Size(0, 96));
-aFont.SetColor(COL_BLACK);
+static bool bOldRender = getenv("OLDRENDER");
+if (bOldRender)
+aFont.SetColor(COL_BLACK);
+else
+aFont.SetColor(COL_GREEN); // RGB_COLORDATA(0xf0, 0xf0, 0xf0));
 aDevice.SetFont(aFont);
 aDevice.Erase();
 
diff --git a/chart2/source/view/main/GL3DRenderer.cxx 
b/chart2/source/view/main/GL3DRenderer.cxx
index 74f8ec1..bfb7382 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -215,10 +215,7 @@ void OpenGL3DRenderer::init()
 
 glEnable(GL_MULTISAMPLE);
 
-glClearColor (1.0, 1.0, 1.0, 1.0);
-glClear(GL_COLOR_BUFFER_BIT);
-glClearDepth(1.0f);
-glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ClearBuffer();
 
 glGenBuffers(1, &m_CubeVertexBuf);
 glGenBuffers(1, &m_CubeNormalBuf);
@@ -1596,12 +1593,42 @@ void OpenGL3DRenderer::CreateSceneBoxView()
m_CameraInfo.cameraUp);
 }
 
+void OpenGL3DRenderer::ClearBuffer()
+{
+static bool bOldRender = getenv("OLDRENDER");
+if (!bOldRender) // gradient background
+{
+glDisable(GL_DEPTH_TEST);
+glDisable(GL_LIGHTING);
+
+glClearDepth(1.0f);
+glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+glBegin (GL_QUADS);
+glColor3f(0.3,0.3,0.3);
+glVertex3f (-1.0f, -1.0f, -1.0f);
+glVertex3f (1.0f, -1.0f, -1.0f);
+
+glColor3f(0.0,0.0,0.0);
+glVertex3f (1.0f, 1.0f, -1.0f);
+glVertex3f (-1.0f, 1.0f, -1.0f);
+glEnd ();
+
+glEnable(GL_LIGHTING);
+glEnable(GL_DEPTH_TEST);
+}
+else
+{
+glClearDepth(1.0f);
+glClearColor (1.0, 0.5, 0.5, 1.0);
+glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+}
+}
+
 void OpenGL3DRenderer::ProcessUnrenderedShape()
 {
 glViewport(0, 0, m_iWidth, m_iHeight);
-glClearDepth(1.0f);
-glClearColor(1.0, 1.0, 1.0, 1.0);
-glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ClearBuffer();
 CreateSceneBoxView();
 //Polygon
 RenderPolygon3DObject();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-27 Thread Michael Meeks
 sc/source/core/data/formulacell.cxx |   47 +---
 1 file changed, 44 insertions(+), 3 deletions(-)

New commits:
commit 4467c67dc8bf17c67c70985c0d0ea64636884f9f
Author: Michael Meeks 
Date:   Wed May 28 00:06:20 2014 +0100

ODS load perf: accelerate CompileXML for formula by stringify and compare.

For long columns of repeated formula, it is far faster to convert a formula
to a string and compare to see if the next cell in a column matches, than
it is to parse the formula string itself (sad but true).

This saves 29s of 131s of load time for my (admittedly large) ODS file.

Re-instate commit - with pCode now correctly intialized.

Change-Id: Ib25840e7916c3e1c681c8100678770b7ab7222ab

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index afa969d..0429a50 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1184,9 +1184,50 @@ void ScFormulaCell::CompileXML( 
sc::CompileFormulaContext& rCxt, ScProgress& rPr
 // pCode may not deleted for queries, but must be empty
 if ( pCode )
 pCode->Clear();
-ScTokenArray* pCodeOld = pCode;
-pCode = aComp.CompileString( aFormula, aFormulaNmsp );
-delete pCodeOld;
+
+bool bSkipCompile = false;
+
+if ( !mxGroup && aFormulaNmsp.isEmpty() ) // optimization
+{
+ScAddress aPreviousCell( aPos );
+aPreviousCell.IncRow( -1 );
+ScFormulaCell *pPreviousCell = pDocument->GetFormulaCell( 
aPreviousCell );
+if( pPreviousCell )
+{
+// Now try to convert to a string quickly ...
+ScCompiler aBackComp( rCxt, aPos, *(pPreviousCell->pCode) );
+OUStringBuffer aShouldBeBuf;
+aBackComp.CreateStringFromTokenArray( aShouldBeBuf );
+
+assert( aFormula[0] == '=' );
+OUString aShouldBe = aShouldBeBuf.makeStringAndClear();
+if( aFormula.getLength() == aShouldBe.getLength() + 1 &&
+aFormula.match( aShouldBe, 1 ) ) // initial '='
+{
+// Put them in the same formula group.
+ScFormulaCellGroupRef xGroup = pPreviousCell->GetCellGroup();
+if (!xGroup) // Last cell is not grouped yet. Start a new 
group.
+xGroup = pPreviousCell->CreateCellGroup(1, false);
+++xGroup->mnLength;
+SetCellGroup( xGroup );
+
+bSkipCompile = true;
+pCode = pPreviousCell->pCode;
+
+SAL_INFO( "sc", "merged '" << aFormula << "' == "
+  "'" << aShouldBe << "'" <<
+  " extend group to " << xGroup->mnLength );
+}
+}
+}
+
+if (!bSkipCompile)
+{
+ScTokenArray* pCodeOld = pCode;
+pCode = aComp.CompileString( aFormula, aFormulaNmsp );
+delete pCodeOld;
+}
+
 if( !pCode->GetCodeError() )
 {
 if ( !pCode->GetLen() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-28 Thread Michael Meeks
 sc/source/core/data/formulacell.cxx |   51 +---
 1 file changed, 31 insertions(+), 20 deletions(-)

New commits:
commit c3cea107354fecda6dedcd6b998343a2bd33d6f3
Author: Michael Meeks 
Date:   Wed May 28 08:56:35 2014 +0100

ODS load perf: avoid re-compiling an already free'd pCode with ScCompiler.

Change-Id: Ia6c3c587302869a42376cda1363ee9df0b7a74f5

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 0429a50..7891500 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1211,6 +1211,17 @@ void ScFormulaCell::CompileXML( 
sc::CompileFormulaContext& rCxt, ScProgress& rPr
 ++xGroup->mnLength;
 SetCellGroup( xGroup );
 
+// Do setup here based on previous cell.
+
+nFormatType = pPreviousCell->nFormatType;
+bSubTotal = pPreviousCell->bSubTotal;
+bChanged = true;
+bCompile = false;
+StartListeningTo( pDocument );
+
+if (bSubTotal)
+pDocument->AddSubTotalCell(this);
+
 bSkipCompile = true;
 pCode = pPreviousCell->pCode;
 
@@ -1226,31 +1237,31 @@ void ScFormulaCell::CompileXML( 
sc::CompileFormulaContext& rCxt, ScProgress& rPr
 ScTokenArray* pCodeOld = pCode;
 pCode = aComp.CompileString( aFormula, aFormulaNmsp );
 delete pCodeOld;
-}
 
-if( !pCode->GetCodeError() )
-{
-if ( !pCode->GetLen() )
-{
-if ( aFormula[0] == '=' )
-pCode->AddBad( aFormula.copy( 1 ) );
-else
-pCode->AddBad( aFormula );
-}
-bSubTotal = aComp.CompileTokenArray();
 if( !pCode->GetCodeError() )
 {
-nFormatType = aComp.GetNumFormatType();
-bChanged = true;
-bCompile = false;
-StartListeningTo( pDocument );
-}
+if ( !pCode->GetLen() )
+{
+if ( aFormula[0] == '=' )
+pCode->AddBad( aFormula.copy( 1 ) );
+else
+pCode->AddBad( aFormula );
+}
+bSubTotal = aComp.CompileTokenArray();
+if( !pCode->GetCodeError() )
+{
+nFormatType = aComp.GetNumFormatType();
+bChanged = true;
+bCompile = false;
+StartListeningTo( pDocument );
+}
 
-if (bSubTotal)
-pDocument->AddSubTotalCell(this);
+if (bSubTotal)
+pDocument->AddSubTotalCell(this);
+}
+else
+bChanged = true;
 }
-else
-bChanged = true;
 
 //  Same as in Load: after loading, it must be known if ocMacro is in any 
formula
 //  (for macro warning, CompileXML is called at the end of loading XML 
file)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-28 Thread Michael Meeks
 chart2/source/view/inc/GL3DRenderer.hxx|1 
 chart2/source/view/main/3DChartObjects.cxx |6 +++-
 chart2/source/view/main/GL3DRenderer.cxx   |   41 -
 3 files changed, 40 insertions(+), 8 deletions(-)

New commits:
commit 2e2d7d8b6ff25524ce92430bfd7a5365569c853c
Author: Michael Meeks 
Date:   Tue May 27 21:58:31 2014 +0100

Add a grey gradient background to the 3D chartm and tweak text color.

Conflicts:
chart2/source/view/main/GL3DRenderer.cxx

Change-Id: I8b74a1e7f32c30b6a908c0870bbeacc00cdea444

diff --git a/chart2/source/view/inc/GL3DRenderer.hxx 
b/chart2/source/view/inc/GL3DRenderer.hxx
index 20fbca9..a0036ed 100644
--- a/chart2/source/view/inc/GL3DRenderer.hxx
+++ b/chart2/source/view/inc/GL3DRenderer.hxx
@@ -190,6 +190,7 @@ public:
 private:
 void MoveModelf(PosVecf3& trans,PosVecf3& angle,PosVecf3& scale);
 
+void ClearBuffer();
 void RenderPolygon3DObject();
 void RenderLine3D(Polygon3DInfo &polygon);
 void RenderPolygon3D(Polygon3DInfo &polygon);
diff --git a/chart2/source/view/main/3DChartObjects.cxx 
b/chart2/source/view/main/3DChartObjects.cxx
index 2573191..1cf0b49 100644
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -77,7 +77,11 @@ const TextCacheItem& TextCache::getText(OUString const & 
rText)
 VirtualDevice aDevice(*Application::GetDefaultDevice(), 0, 0);
 Font aFont = aDevice.GetFont();
 aFont.SetSize(Size(0, 96));
-aFont.SetColor(COL_BLACK);
+static bool bOldRender = getenv("OLDRENDER");
+if (bOldRender)
+aFont.SetColor(COL_BLACK);
+else
+aFont.SetColor(COL_GREEN); // RGB_COLORDATA(0xf0, 0xf0, 0xf0));
 aDevice.SetFont(aFont);
 aDevice.Erase();
 
diff --git a/chart2/source/view/main/GL3DRenderer.cxx 
b/chart2/source/view/main/GL3DRenderer.cxx
index aded984..af5238b 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -253,10 +253,7 @@ void OpenGL3DRenderer::init()
 
 glEnable(GL_MULTISAMPLE);
 
-glClearColor (1.0, 1.0, 1.0, 1.0);
-glClear(GL_COLOR_BUFFER_BIT);
-glClearDepth(1.0f);
-glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ClearBuffer();
 
 glGenBuffers(1, &m_CubeVertexBuf);
 glGenBuffers(1, &m_CubeNormalBuf);
@@ -1693,12 +1690,42 @@ void OpenGL3DRenderer::CreateSceneBoxView()
m_CameraInfo.cameraUp);
 }
 
+void OpenGL3DRenderer::ClearBuffer()
+{
+static bool bOldRender = getenv("OLDRENDER");
+if (!bOldRender) // gradient background
+{
+glDisable(GL_DEPTH_TEST);
+glDisable(GL_LIGHTING);
+
+glClearDepth(1.0f);
+glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+glBegin (GL_QUADS);
+glColor3f(0.3,0.3,0.3);
+glVertex3f (-1.0f, -1.0f, -1.0f);
+glVertex3f (1.0f, -1.0f, -1.0f);
+
+glColor3f(0.0,0.0,0.0);
+glVertex3f (1.0f, 1.0f, -1.0f);
+glVertex3f (-1.0f, 1.0f, -1.0f);
+glEnd ();
+
+glEnable(GL_LIGHTING);
+glEnable(GL_DEPTH_TEST);
+}
+else
+{
+glClearDepth(1.0f);
+glClearColor (1.0, 0.5, 0.5, 1.0);
+glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+}
+}
+
 void OpenGL3DRenderer::ProcessUnrenderedShape(bool bNewScene)
 {
 glViewport(0, 0, m_iWidth, m_iHeight);
-glClearDepth(1.0f);
-glClearColor(1.0, 1.0, 1.0, 1.0);
-glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ClearBuffer();
 CreateSceneBoxView();
 //Polygon
 RenderPolygon3DObject();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [GSOC] Tiled Rendering, ahunt, Weekly Report 01 / WK22

2014-05-29 Thread Michael Meeks
Hi Andrzej,

On Sun, 2014-05-25 at 19:35 +0100, Andrzej Hunt wrote:
> Current work is happening on feature/gtkbmptiledviewer, the app is under 
> instdir/program/gtktiledviewer.
> (The feature/gtktiledviewer branch is the X11 rendering early version of 
> things.)

Everything you've done sounds awesome =)

> (Unfortunately I'm still in the middle of uni. projects for another 1.5 
> weeks so not fully free yet...)

That's fine; we'll juggle the timings sensibly.

I need to look at your renaming / API movement stuff for back-porting
to 4.3 - the ESC gave some lee-way / head-room for that; thanks ! =)

All the best,

Michael.

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

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


bug stats from deferred ESC call ...

2014-05-29 Thread Michael Meeks

It turns out today is a holiday for many Europeans; so we deferred the
ESC call for a week; nevertheless there was a ton of good work done on
QA by lots of guys; so I append this last week's bug snapshot:

* QA stats:

  + https://bugs.freedesktop.org/page.cgi?id=weekly-bug-summary.html
+227-144(+83 overall)
many thanks to the top bug squashers:
Jorendc 12
Joel Madero 12
Matt Turner  8
Jay Philips  7
Caolán McNamara  7
pierre-yves samyn7
Julien Nabet 6
Cor Nouws5
m.a.riosv5
  
* Open 4.3 MAB
  + 5/16 4/12 2/8 3/7 2/5 1/2 1/2 0/1 0/1
  + https://bugs.freedesktop.org/showdependencytree.cgi?id=75025&hide_resolved=1
 
* Open 4.2 MAB
  + 73/200 64/190 62/184 49/165  18/128 19/124 18/123 24/120 20/112 19/111 
20/111
 36%33%33%29% 14%15%14%20%17%17%18%
  + https://bugs.freedesktop.org/showdependencytree.cgi?id=65675&hide_resolved=1
 
* Open 4.1 MAB
  + 2/139 13/151 18/155 43/179 76/208 78/208 78/208 79/208 79/206 84/206 85/206
 1%8% 11%24%36%37%37%37%38%40%41%
  + https://bugs.freedesktop.org/showdependencytree.cgi?id=60270&hide_resolved=1
 
* Bibisected bugs open: whiteboard 'bibsected'
  + 59/231 48/215 45/208 46/207 47/201 47/198 46/197 39/189 38/185 40/185 39/182
+ http://bit.ly/VQfF3Q
 
* all bugs tagged with 'regression'
 
+ 309(+16) bugs open of 2626(+40) total
~Component   count net *
Writer - 92 (+5)
   Spreadsheet - 39 (+7)
   Crashes - 24 (-3)
   Libreoffice - 22 (+1)
  Presentation - 22 (+0)
UI - 20 (+0)
  Database - 19 (-2)
   Borders - 15 (+1)
  Graphics - 14 (+1)
   Drawing - 13 (+1)
 Chart - 12 (+3)
   Print / PDF -  9 (+0)
   Filters -  9 (+0)
Extensions -  5 (+0)
 framework -  3 (+0)
   Formula -  3 (+0)
Linguistic -  3 (+0)
 BASIC -  3 (+0)
  Installation -  2 (+0)
 Migration -  2 (+0)
   sdk -  0 (+0)
Impress Remote -  0 (+0)
 
  + http://bit.ly/15mM2Yn - for devs ( no NEEDINFO / UNCONFIRMED )
  + 
https://bugs.freedesktop.org/buglist.cgi?keywords=3Dregression%2C%20&=keywords_type=3Dallwords&resolution=3D---&query_format=3Dadvanced&product==3DLibreOffice&list_id=3D36764

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

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


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

2014-06-04 Thread Michael Meeks
 oox/source/export/vmlexport.cxx |8 
 vcl/source/filter/graphicfilter.cxx |2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit a2d2c7f707838511ede017ed920205b9165a35a2
Author: Michael Meeks 
Date:   Tue Jun 3 22:55:05 2014 +0100

Be more sensible about checking buffers of VML points we write.

Change-Id: Id3811dbe0cf2510ef6a851804b3886c14eca01b6

diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 0f3038b..f315766 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -519,6 +519,14 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, 
const Rectangle& rRect
 break;
 default:
 // See 
EscherPropertyContainer::CreateCustomShapeProperties, by default nSeg is simply 
the number of points.
+// FIXME: we miss out a significant amount 
of complexity from
+// the above method here, and do some 
rather odd things to match.
+int nElems = aVertices.nPropSize / ( 
nPointSize * 2);
+if (nSeg > nElems)
+{
+SAL_WARN("oox", "Busted escher export 
" << nSeg << "vs . " << nElems << " truncating point stream");
+nSeg = nElems;
+}
 for (int i = 0; i < nSeg; ++i)
 {
 sal_Int32 nX = 
impl_GetPointComponent(pVerticesIt, nPointSize);
commit 53db456c04ca5a1684395b60fbd6f1bed4c9c114
Author: Michael Meeks 
Date:   Tue Jun 3 21:57:54 2014 +0100

Avoid uninitialized memory read/compare on short reads.

Change-Id: I7537f6d22780bace6ab6da06e087a3d27da8de05

diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index 1f132f3..2274e83 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -704,7 +704,7 @@ static bool ImpPeekGraphicFormat( SvStream& rStream, 
OUString& rFormatExtension,
 {
 nCheckSize = nStreamLen < 2048 ? nStreamLen : 2048;
 rStream.Seek(nStreamPos);
-rStream.Read(sExtendedOrDecompressedFirstBytes, nCheckSize);
+nCheckSize = rStream.Read(sExtendedOrDecompressedFirstBytes, 
nCheckSize);
 }
 
 if(ImplSearchEntry(pCheckArray, (sal_uInt8*)"http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-05 Thread Michael Meeks
 vcl/source/filter/graphicfilter.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 99b7ff506d148ca7d0ef9def56f4e0024e0e43ac
Author: Michael Meeks 
Date:   Tue Jun 3 21:57:54 2014 +0100

Avoid uninitialized memory read/compare on short reads.

Change-Id: I7537f6d22780bace6ab6da06e087a3d27da8de05
(cherry picked from commit 53db456c04ca5a1684395b60fbd6f1bed4c9c114)

diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index 1f132f3..2274e83 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -704,7 +704,7 @@ static bool ImpPeekGraphicFormat( SvStream& rStream, 
OUString& rFormatExtension,
 {
 nCheckSize = nStreamLen < 2048 ? nStreamLen : 2048;
 rStream.Seek(nStreamPos);
-rStream.Read(sExtendedOrDecompressedFirstBytes, nCheckSize);
+nCheckSize = rStream.Read(sExtendedOrDecompressedFirstBytes, 
nCheckSize);
 }
 
 if(ImplSearchEntry(pCheckArray, (sal_uInt8*)"http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-05 Thread Michael Meeks
 oox/source/export/vmlexport.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 591e10c106d9672559672f43346cf000f3a734b3
Author: Michael Meeks 
Date:   Tue Jun 3 22:55:05 2014 +0100

Be more sensible about checking buffers of VML points we write.

Change-Id: Id3811dbe0cf2510ef6a851804b3886c14eca01b6
(cherry picked from commit a2d2c7f707838511ede017ed920205b9165a35a2)

diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 0f3038b..f315766 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -519,6 +519,14 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, 
const Rectangle& rRect
 break;
 default:
 // See 
EscherPropertyContainer::CreateCustomShapeProperties, by default nSeg is simply 
the number of points.
+// FIXME: we miss out a significant amount 
of complexity from
+// the above method here, and do some 
rather odd things to match.
+int nElems = aVertices.nPropSize / ( 
nPointSize * 2);
+if (nSeg > nElems)
+{
+SAL_WARN("oox", "Busted escher export 
" << nSeg << "vs . " << nElems << " truncating point stream");
+nSeg = nElems;
+}
 for (int i = 0; i < nSeg; ++i)
 {
 sal_Int32 nX = 
impl_GetPointComponent(pVerticesIt, nPointSize);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


minutes of ESC call ...

2014-06-05 Thread Michael Meeks
* Present
+ Cloph, David, Eike, Fridrich, Michael M, Stephan, Thorsten, Ptyl, Miklos
  Kendy, Markus, Bjoern, Robinson, Michael S, Caolan, Andras, floeff, Jacobo
 
* Completed Action Items
+ talk to distro vendors wrt. commit access setup (Michael)
+ crashtest box - more research (Moggi/Cloph)
[ new control script in pure python working nicely ].
+ create / promote a 4.3 MAB for WinXP/Java issues (Cloph)
[ was related to python init. now fixed ]
+ add link on Credits page (Cloph)
https://translations.documentfoundation.org/about/contributors/
+ create easy hack to find an auto-abandon config/setting for a gerrit 
(Bjoern)
  https://bugs.freedesktop.org/show_bug.cgi?id=79123
+ fix the Java bridge for MSVC2012 for 4.3 (Michael S.)
[ done committed to -4-3 ]
+ teach the IRC bot. to not show distro commits (Miklos)
+ Tinderbox Admins: please add "LibreOffice 4.3" (Thorsten & co.)
[ tinderboxes for all platforms rolling ].
+ encourage icon authors to put icons into git (Astron)
[ no response from KACST guys ... ]
 
* Pending Action Items:
 
* GSOC Update (Fridrich)
+ students should be hacking.
+ If there are problems with contacting, should report absence
+ mail reports sound positive, ~all at work.
+ no concerns yet.
+ mid-term evaluations: 23rd-27th June.
+ remind to ask the student to blog about what they do (Cedric)
AI: + ask students to blog about it (GSOC Mentors)
+ steady work and progress is appreciated.
 
* Release Engineering update (Christian)
+ 4.2.5 RC2 deadline is next Monday
+ 7x patches queued in gerrit.
+ 4.3.0 Beta 2 status
+ delays around translation, lots of problems with context, not
  strings themselves: now fixed.
+ builds currently being pushed to mirrors; for public this
  evening / tomorrow.
+ 4.3.0 UI and string freeze: week after next - branch for first RC.
+ Android / iOS remote
+ will build a new version with buttons to start/exit remote
  ptr. feature.
+ builds pushed just now for the new version; and available.
 
+ Late features ?
+ libreofficekit bits / rename etc. (blocking on Michael)
+ OpenGL pieces / status
   + impress work as well ?
   + pending GL capabilities check to avoid crashes.
   + experimentalising 3D chart bits.
   + at risk.
+ some changes in language listbox (Eike)
   + switching to a combo-box, so can enter an arbitrary lang_tag
  [ in: https://gerrit.libreoffice.org/9447 ]
+ preserving & rendering OOXML Artistic Effects (Jacobo)
   [ in: https://gerrit.libreoffice.org/9495 ]
+ Calc performanc fixes (?)
 
* Another OpenSSL issue:
+ 
https://securityblog.redhat.com/2014/06/05/openssl-mitm-ccs-injection-attack-cve-2014-0224/
+ http://www.openssl.org/news/secadv_20140605.txt
+ awaiting patch, lower priority - release on normal 4.2.5 cadence
+ should we disable heartbeat completely ? (Bjoern)
+ we don't really need it.
AI: + merge existing Fedora patches (Caolan)
 
* allow upgrade of access2base (Lionel?)
* no - Lionel, no discussion / decision.
 
+ access2base now included in LibreOffice 4.2 and later
+ technical structure: one Basic library (and that's it)
+ for other branches (other forks of OO.org & LibreOffice 4.1 and earlier),
  available as extension
+ competitive "disadvantage": users of other branches
  can have newer access2base faster (install extension)
+ not possible for LibO 4.2 & later because extension not allowed
  to override part of LibreOffice (only other extension)
   + policy exception for access2base can have new features within stable 
line?
  + I don't like that
   + allow extensions to override any part of LibreOffice?
  + no, significant resistance
   + allow extensions to override any *script* or *dialog* library from 
LibreOffice?
   + allow extensions to override any *Basic* or *dialog* library from 
LibreOffice?
   + allow extensions to override any *Basic* (not *dialog*) library from 
LibreOffice?
  + rationale: AFAIK, we don't ship any wizard / conversion / ... code 
as Basic, only examples
  + needs to be validated by domain expert
   + allow extensions to override only access2base?
   + demote access2base to bundled extension?
  + makes Acces2Base much less "official" in LibreOffice :-(
(also more work)
 
* UX Update (Astron)
+ a few UX advise bugs getting discussed.
+ colour of non-printing characters ...
  + customizable or not ?
 
* Crashtest update (Markus)
  + new result including writer/impress/draw
  
http://dev-builds.libreoffice.org/crashtest/7c8b2f10310f0f64b111afb3012e82e9c4a690ac/
  

[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - 3 commits - desktop/source include/LibreOfficeKit smoketest/libtest.cxx

2014-06-12 Thread Michael Meeks
 desktop/source/lib/init.cxx   |4 ++--
 include/LibreOfficeKit/LibreOfficeKit.h   |9 +
 include/LibreOfficeKit/LibreOfficeKit.hxx |8 
 smoketest/libtest.cxx |   12 +++-
 4 files changed, 26 insertions(+), 7 deletions(-)

New commits:
commit 540eb29d08729a853d7405b3eb826e02c42c65b9
Author: Michael Meeks 
Date:   Thu Jun 12 13:28:26 2014 +0100

liblok: check new methods via macros on nSize, not by de-referencing.

We can't check for NULL from beyond the end of a smaller structure.

Change-Id: Id3754bf747c402cf0d767eda5fd4b5ad6b5789e9

diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 97acbab..657c16c 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -18,6 +18,13 @@ extern "C"
 typedef struct _LibreOfficeKit LibreOfficeKit;
 typedef struct _LibreOfficeKitDocument LibreOfficeKitDocument;
 
+// Do we have an extended member in this struct ?
+#define LIBREOFFICEKIT_HAS_MEMBER(strct,member,nSize) \
+int)((unsigned char *)&((strct *) 0)->member) +  \
+  (int)sizeof ((strct *) 0)->member)) <= (nSize))
+
+#define LIBREOFFICEKIT_HAS(pKit,member) 
LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKit,member,(pKit)->nSize)
+
 struct _LibreOfficeKit
 {
   int  nSize;
@@ -28,6 +35,8 @@ struct _LibreOfficeKit
   char*   (*getError)  (LibreOfficeKit *pThis);
 };
 
+#define LIBREOFFICEKIT_DOCUMENT_HAS(pDoc,member) 
LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKitDocument,member,(pDoc)->nSize)
+
 struct _LibreOfficeKitDocument
 {
   int  nSize;
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 956e3cb..ec11313 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -45,11 +45,12 @@ public:
 inline bool saveAsWithOptions(const char* pUrl, const char* pFormat = 
NULL, const char* pFilterOptions = NULL)
 {
 // available since LibreOffice 4.3
-if (!mpDoc->saveAsWithOptions)
+if (!LIBREOFFICEKIT_DOCUMENT_HAS(mpDoc, saveAsWithOptions))
 return false;
 
 return mpDoc->saveAsWithOptions(mpDoc, pUrl, pFormat, pFilterOptions);
 }
+inline LibreOfficeKitDocument *get() { return mpDoc; }
 };
 
 class Office
diff --git a/smoketest/libtest.cxx b/smoketest/libtest.cxx
index 07a13ec..2316b8c 100644
--- a/smoketest/libtest.cxx
+++ b/smoketest/libtest.cxx
@@ -75,6 +75,16 @@ int main (int argc, char **argv)
 return -1;
 }
 
+if (!LIBREOFFICEKIT_DOCUMENT_HAS(pDocument->get(), saveAsWithOptions))
+{
+fprintf( stderr, "using obsolete LibreOffice %d + %d vs. %d\n",
+ (int)((unsigned char *)&((LibreOfficeKitDocument *) 
0)->saveAsWithOptions),
+ (int)sizeof ((LibreOfficeKitDocument *) 0)->saveAsWithOptions,
+ pDocument->get()->nSize );
+return -1;
+}
+
+
 end = getTimeMS();
 fprintf( stderr, "load time: %ld ms\n", (end-start) );
     start = end;
commit 7de8049a17a0d2e11a2e298060bb5495d34d357d
Author: Michael Meeks 
Date:   Thu Jun 12 13:27:27 2014 +0100

liblok: set the size for the correct structure.

Change-Id: Id79d76893bfc931334afd59b05ab96a31e441e02

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 512cfb3..af812c6 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -155,7 +155,7 @@ struct LibLODocument_Impl : public _LibreOfficeKitDocument
 LibLODocument_Impl(const uno::Reference  
&xComponent) :
 mxComponent( xComponent )
 {
-nSize = sizeof(LibreOfficeKit);
+nSize = sizeof(LibreOfficeKitDocument);
 
 destroy = doc_destroy;
 saveAs = doc_saveAs;
@@ -185,7 +185,7 @@ struct LibLibreOffice_Impl : public _LibreOfficeKit
 
 LibLibreOffice_Impl()
 {
-nSize = sizeof(LibreOfficeKitDocument);
+nSize = sizeof(LibreOfficeKit);
 
 destroy = lo_destroy;
 initialize = lo_initialize;
commit 09e5df3991eeba4f6f4280514d466dc52e21bd29
Author: Andrzej Hunt 
Date:   Wed Jun 11 15:37:17 2014 +0100

Complete LibreOfficeKit C++ renaming.

Change-Id: Ice611cf5913051346a3a0c0b00ed35a35a0dfe3c

diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index c3da497..956e3cb 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -87,9 +87,7 @@ public:
 }
 };
 
-}
-
-inline ::lok::Office* lo_cpp_init(const char* pInstallPath)
+inline Office* lok_cpp_init(const char* pInstallPath)
 {
 LibreOfficeKit* pThis = lok_init(pInstallPath);
 if (pThis == NULL || pThis->nSize == 0)
@@ -97,5 +95,6 @@ inline ::lok::Office* lo_cpp_init(const char* pInstallPath)
 return new 

[Libreoffice-commits] core.git: 3 commits - desktop/source include/LibreOfficeKit smoketest/libtest.cxx

2014-06-12 Thread Michael Meeks
 desktop/source/lib/init.cxx   |4 ++--
 include/LibreOfficeKit/LibreOfficeKit.h   |9 +
 include/LibreOfficeKit/LibreOfficeKit.hxx |8 
 smoketest/libtest.cxx |   12 +++-
 4 files changed, 26 insertions(+), 7 deletions(-)

New commits:
commit 202dac6e20f75e87edab3368bb0882d59494d864
Author: Michael Meeks 
Date:   Thu Jun 12 13:28:26 2014 +0100

liblok: check new methods via macros on nSize, not by de-referencing.

We can't check for NULL from beyond the end of a smaller structure.

Change-Id: Id3754bf747c402cf0d767eda5fd4b5ad6b5789e9

diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 97acbab..657c16c 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -18,6 +18,13 @@ extern "C"
 typedef struct _LibreOfficeKit LibreOfficeKit;
 typedef struct _LibreOfficeKitDocument LibreOfficeKitDocument;
 
+// Do we have an extended member in this struct ?
+#define LIBREOFFICEKIT_HAS_MEMBER(strct,member,nSize) \
+int)((unsigned char *)&((strct *) 0)->member) +  \
+  (int)sizeof ((strct *) 0)->member)) <= (nSize))
+
+#define LIBREOFFICEKIT_HAS(pKit,member) 
LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKit,member,(pKit)->nSize)
+
 struct _LibreOfficeKit
 {
   int  nSize;
@@ -28,6 +35,8 @@ struct _LibreOfficeKit
   char*   (*getError)  (LibreOfficeKit *pThis);
 };
 
+#define LIBREOFFICEKIT_DOCUMENT_HAS(pDoc,member) 
LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKitDocument,member,(pDoc)->nSize)
+
 struct _LibreOfficeKitDocument
 {
   int  nSize;
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 956e3cb..ec11313 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -45,11 +45,12 @@ public:
 inline bool saveAsWithOptions(const char* pUrl, const char* pFormat = 
NULL, const char* pFilterOptions = NULL)
 {
 // available since LibreOffice 4.3
-if (!mpDoc->saveAsWithOptions)
+if (!LIBREOFFICEKIT_DOCUMENT_HAS(mpDoc, saveAsWithOptions))
 return false;
 
 return mpDoc->saveAsWithOptions(mpDoc, pUrl, pFormat, pFilterOptions);
 }
+inline LibreOfficeKitDocument *get() { return mpDoc; }
 };
 
 class Office
diff --git a/smoketest/libtest.cxx b/smoketest/libtest.cxx
index 07a13ec..2316b8c 100644
--- a/smoketest/libtest.cxx
+++ b/smoketest/libtest.cxx
@@ -75,6 +75,16 @@ int main (int argc, char **argv)
 return -1;
 }
 
+if (!LIBREOFFICEKIT_DOCUMENT_HAS(pDocument->get(), saveAsWithOptions))
+{
+fprintf( stderr, "using obsolete LibreOffice %d + %d vs. %d\n",
+ (int)((unsigned char *)&((LibreOfficeKitDocument *) 
0)->saveAsWithOptions),
+ (int)sizeof ((LibreOfficeKitDocument *) 0)->saveAsWithOptions,
+ pDocument->get()->nSize );
+return -1;
+}
+
+
 end = getTimeMS();
 fprintf( stderr, "load time: %ld ms\n", (end-start) );
     start = end;
commit 4ed5bacc86e0137d9ace5a2ceda09c2393716793
Author: Michael Meeks 
Date:   Thu Jun 12 13:27:27 2014 +0100

liblok: set the size for the correct structure.

Change-Id: Id79d76893bfc931334afd59b05ab96a31e441e02

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 512cfb3..af812c6 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -155,7 +155,7 @@ struct LibLODocument_Impl : public _LibreOfficeKitDocument
 LibLODocument_Impl(const uno::Reference  
&xComponent) :
 mxComponent( xComponent )
 {
-nSize = sizeof(LibreOfficeKit);
+nSize = sizeof(LibreOfficeKitDocument);
 
 destroy = doc_destroy;
 saveAs = doc_saveAs;
@@ -185,7 +185,7 @@ struct LibLibreOffice_Impl : public _LibreOfficeKit
 
 LibLibreOffice_Impl()
 {
-nSize = sizeof(LibreOfficeKitDocument);
+nSize = sizeof(LibreOfficeKit);
 
 destroy = lo_destroy;
 initialize = lo_initialize;
commit f24f4f92ee37401abf117f5cf3a8a224f39214aa
Author: Andrzej Hunt 
Date:   Wed Jun 11 15:37:17 2014 +0100

Complete LibreOfficeKit C++ renaming.

Change-Id: Ice611cf5913051346a3a0c0b00ed35a35a0dfe3c

diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index c3da497..956e3cb 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -87,9 +87,7 @@ public:
 }
 };
 
-}
-
-inline ::lok::Office* lo_cpp_init(const char* pInstallPath)
+inline Office* lok_cpp_init(const char* pInstallPath)
 {
 LibreOfficeKit* pThis = lok_init(pInstallPath);
 if (pThis == NULL || pThis->nSize == 0)
@@ -97,5 +95,6 @@ inline ::lok::Office* lo_cpp_init(const char* pInstallPath)
 return new 

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

2014-06-12 Thread Michael Meeks
 include/LibreOfficeKit/LibreOfficeKit.h |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit ede15aaeb154f4edef6835f670fdd92043858654
Author: Michael Meeks 
Date:   Thu Jun 12 16:33:23 2014 +0100

liblok: add include for size_t.

Change-Id: Icd7d78a332fbb67e32ab929f0afc5881ab7448eb

diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 43eb212..4c32fd2 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -10,6 +10,8 @@
 #ifndef INCLUDED_DESKTOP_INC_LIBREOFFICEKIT_H
 #define INCLUDED_DESKTOP_INC_LIBREOFFICEKIT_H
 
+#include 
+
 #ifdef __cplusplus
 extern "C"
 {
___
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' - 2 commits - include/LibreOfficeKit smoketest/libtest.cxx

2014-06-12 Thread Michael Meeks
 include/LibreOfficeKit/LibreOfficeKit.h |   10 ++
 smoketest/libtest.cxx   |7 ---
 2 files changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 053fbcfdbe572f4e18f35d66dd365c78a1e6e54e
Author: Michael Meeks 
Date:   Thu Jun 12 16:33:23 2014 +0100

liblok: add include for size_t.

Change-Id: Icd7d78a332fbb67e32ab929f0afc5881ab7448eb

diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 43eb212..4c32fd2 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -10,6 +10,8 @@
 #ifndef INCLUDED_DESKTOP_INC_LIBREOFFICEKIT_H
 #define INCLUDED_DESKTOP_INC_LIBREOFFICEKIT_H
 
+#include 
+
 #ifdef __cplusplus
 extern "C"
 {
commit c297b91fdce2342b4febdf4eff5b89c6526f7e86
Author: Caolán McNamara 
Date:   Thu Jun 12 14:28:17 2014 +0100

cast loses precision

Change-Id: Ic688f08cada4ae70ea1dfb1e29e249a166456452

diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 657c16c..43eb212 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -20,14 +20,14 @@ typedef struct _LibreOfficeKitDocument 
LibreOfficeKitDocument;
 
 // Do we have an extended member in this struct ?
 #define LIBREOFFICEKIT_HAS_MEMBER(strct,member,nSize) \
-int)((unsigned char *)&((strct *) 0)->member) +  \
-  (int)sizeof ((strct *) 0)->member)) <= (nSize))
+size_t)((unsigned char *)&((strct *) 0)->member) +  \
+  sizeof ((strct *) 0)->member)) <= (nSize))
 
 #define LIBREOFFICEKIT_HAS(pKit,member) 
LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKit,member,(pKit)->nSize)
 
 struct _LibreOfficeKit
 {
-  int  nSize;
+  size_t  nSize;
 
   void(*destroy)   (LibreOfficeKit *pThis);
   int (*initialize)(LibreOfficeKit *pThis, const char 
*pInstallPath);
@@ -39,7 +39,7 @@ struct _LibreOfficeKit
 
 struct _LibreOfficeKitDocument
 {
-  int  nSize;
+  size_t  nSize;
 
   void (*destroy)   (LibreOfficeKitDocument* pThis);
   int (*saveAs) (LibreOfficeKitDocument* pThis,
diff --git a/smoketest/libtest.cxx b/smoketest/libtest.cxx
index 2316b8c..51c184b 100644
--- a/smoketest/libtest.cxx
+++ b/smoketest/libtest.cxx
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace ::lok;
@@ -77,9 +78,9 @@ int main (int argc, char **argv)
 
 if (!LIBREOFFICEKIT_DOCUMENT_HAS(pDocument->get(), saveAsWithOptions))
 {
-fprintf( stderr, "using obsolete LibreOffice %d + %d vs. %d\n",
- (int)((unsigned char *)&((LibreOfficeKitDocument *) 
0)->saveAsWithOptions),
- (int)sizeof ((LibreOfficeKitDocument *) 0)->saveAsWithOptions,
+fprintf( stderr, "using obsolete LibreOffice %" SAL_PRI_SIZET "d + %" 
SAL_PRI_SIZET "d vs. %" SAL_PRI_SIZET "d\n",
+ (size_t)((unsigned char *)&((LibreOfficeKitDocument *) 
0)->saveAsWithOptions),
+ sizeof ((LibreOfficeKitDocument *) 0)->saveAsWithOptions,
  pDocument->get()->nSize );
 return -1;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


minutes of ESC call ...

2014-06-12 Thread Michael Meeks
* Present:
+ Eike, David, Thorsten, Adam, Michael M, Andras, Norbert, Stephan,
  Kendy, Miklos, Christian, Caolan, Astron, Markus, Michael S, Lionel,
  Ptyl
 
* Completed Action Items:
+ review/merge LibreOfficeKit rename bits (Michael)
+ ask students to blog about their GSOC work (mentors)
+ merge existing Fedora openSSL patches (Caolan)
 
* GSOC Update (Cedric)
+ all going well, no problems yet.
+ mid-term evaluations: 23rd-27th June.
+ 10 days away ...
+ Fridrich can't attend the mentor summit -> Thorsten going instead.
 
* Release Engineering update (Christian)
+ 4.2.5 RC2 status
+ tagged noon today, delayed by some gerrit problems.
+ building win/linux/mac - should announce tonight to early QA ML.
+ 4.3.0 UI and string freeze: next week - branch libreoffice-4-3-0 two 
weeks after that for second RC.
+ nevertheless 1 review needed after the tag for rc1
+ tinderbox / windows build on 4.3 branch and master hangs
+ what hangs ? (Michael)
+ sometimes hang in unit tests (Norbert)
 + that should be fixed now (Markus)
 + one for a v. short period of time, now fixed (Stephan)
+ last succesful build was a while ago, just killed & re-started (Cloph)
+ need to check the environment
+ Google Drive keys (Norbert)
AI: + need to send GDrive configure / keys to Norbert (Cloph)
+ Android / iOS remote
 + Late features ?
+ libreofficekit bits / rename etc. [ in now ]
+ OpenGL pieces / status
   + impress work as well ?
   + pending GL capabilities check to avoid crashes
   + mostly affects Linux ...
 [ starting to be at risk ! ]
   + experimentalising 3D chart bits.
   + at risk [ Tamas to look at that ]
+ Calc performance fixes (?)
+ Writer performance fix - Tor working on it.
+ libfreetype for Windows? (Kendy)
   + for FPS rendering in glTF...
   + lots of size shipping 500k+ of freetype for an un-seen
 mis-feature (Caolan)
 
* allow upgrade of access2base (Lionel?)
+ access2base now included in LibreOffice 4.2 and later
+ technical structure: one Basic library (and that's it)
   + for other branches (other forks of OO.org & LibreOffice 4.1 and 
earlier),
 available as extension
+ competitive "disadvantage": users of other branches
  can have newer access2base faster (install extension)
+ not possible for LibO 4.2 & later because extension not allowed
  to override part of LibreOffice (only other extension)
   + policy exception for access2base can have new features within stable 
line?
  + I don't like that
   + allow extensions to override any part of LibreOffice?
  + no, significant resistance
   + demote access2base to bundled extension?
  + makes Acces2Base much less "official" in LibreOffice :-(
(also more work)
  + problems with bundled extensions in the past (Michael)
   + allow extensions to override only access2base
  + Lionel's preferred option.
  + problem comes from extension using the same name etc. (Stephan)
   + mostly a problem with basic modules, not an expert there.
   + take Noel's advice from the list.
   + ok to add something for access2base, no general fix.
+ always troubles with namespaces.
  + fairly sure this will work well tested it in the build.
   + change test of who can override what; done on the file-path
+ why not make it a bundled extension ? (Michael Stahl)
  + this is what it was designed for.
  + why did we move away from bundled extensions ? (Lionel)
   + problems with native code bundled extensions (Stephan)
   + problems with the upgrade scenarios.
   + shouldn't affect basic.
  + when was this included ? (Stephan)
   + was included in 4.2 (Lionel)
+ switching to bundling in 4.2 is a larger change
   + vs. a 1-line patch to say it can be overridden (Lionel)
   + happy with a 1-line change in 4.2 (Michael S)
  + concerned wrt. the future making it a bundled extension.
AI:   + merge 1-liner to 4.2 / 4.3 / master (Lionel)
AI:   + research / seek a saner solution for master (Stephan)
 
* UX Update (Astron)
+ not a huge amount of activity.
+ UI status in 4.3
+ conditional formats dialog and named ranges regressed vs. 4.2 / 4.1
+ in dialog layout conversions etc. ?
+ anyone with free cycles
AI: + file bugs for Caolan / students (Astron)
+ "manage named ranges" -> button positioning changed.
+ not functionality: just positioning
+ also "conditional formats" dialog.
   

[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - desktop/source

2014-06-13 Thread Michael Meeks
 desktop/source/lib/init.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 087ec3cb8e55cd207d4cb655dcffbff18e9fcd26
Author: Michael Meeks 
Date:   Thu Jun 12 13:27:27 2014 +0100

liblok: set the size for the correct structure.

(cherry picked from commit 4ed5bacc86e0137d9ace5a2ceda09c2393716793)

Signed-off-by: Andrzej Hunt 

Conflicts:
desktop/source/lib/init.cxx

Change-Id: Id79d76893bfc931334afd59b05ab96a31e441e02

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 204d39b..aaf8929 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -133,7 +133,7 @@ struct LibLODocument_Impl : public _LibreOfficeDocument
 LibLODocument_Impl( const uno::Reference < css::lang::XComponent > 
&xComponent )
 : mxComponent( xComponent )
 {
-nSize = sizeof( LibreOffice );
+nSize = sizeof( LibreOfficeDocument );
 
 destroy = doc_destroy;
 saveAs = doc_saveAs;
@@ -159,7 +159,7 @@ struct LibLibreOffice_Impl : public _LibreOffice
 
 LibLibreOffice_Impl()
 {
-nSize = sizeof( LibreOfficeDocument );
+nSize = sizeof( LibreOffice );
 
 destroy = lo_destroy;
 initialize = lo_initialize;
___
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' - vcl/unx

2014-06-16 Thread Michael Meeks
 vcl/unx/gtk/app/gtksys.cxx |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit e90f591475e38b30df3e28387eb0ba4e2d8e7dc4
Author: Michael Meeks 
Date:   Fri May 16 21:49:23 2014 +0100

fdo#78799 - ignore overlayed monitors with co-incident origin.

This happens with certain fglrx drivers etc. where 'cloned' is not
set but instead both monitors are placed over the top of each other
(by XFCE) -> work around that.

Change-Id: I9d1846bfae2692681606717f7f5e8408df532d95

diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index 0a72054..ab90746 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -55,15 +55,14 @@ GtkSalSystem::GetDisplayXScreenCount()
 namespace
 {
 
-struct GdkRectangleEqual
+struct GdkRectangleCoincident
 {
+// fdo#78799 - detect and elide overlaying monitors of different sizes
 bool operator()(GdkRectangle const& rLeft, GdkRectangle const& rRight)
 {
 return
 rLeft.x == rRight.x
 && rLeft.y == rRight.y
-&& rLeft.width == rRight.width
-&& rLeft.height == rRight.height
 ;
 }
 };
@@ -95,7 +94,7 @@ GtkSalSystem::countScreenMonitors()
 gdk_screen_get_monitor_geometry(pScreen, j, &aGeometry);
 aGeometries.push_back(aGeometry);
 }
-GdkRectangleEqual aCmp;
+GdkRectangleCoincident aCmp;
 std::sort(aGeometries.begin(), aGeometries.end(), aCmp);
 const std::vector::iterator aUniqueEnd(
 std::unique(aGeometries.begin(), aGeometries.end(), aCmp));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svl/CppunitTest_svl_itempool.mk svl/CppunitTest_svl_items.mk svl/Module_svl.mk svl/qa svl/source

2014-06-17 Thread Michael Meeks
 svl/CppunitTest_svl_itempool.mk |   36 ++
 svl/CppunitTest_svl_items.mk|   11 ---
 svl/Module_svl.mk   |1 
 svl/qa/unit/items/test_itempool.cxx |  117 +++
 svl/source/inc/poolio.hxx   |   31 +++--
 svl/source/items/itempool.cxx   |  119 ++--
 svl/source/items/poolio.cxx |   10 +--
 svl/source/items/style.cxx  |1 
 8 files changed, 259 insertions(+), 67 deletions(-)

New commits:
commit 1ca7ac128dcdf03e3749af7458beac8d2da8a708
Author: Michael Meeks 
Date:   Mon Jun 16 22:27:00 2014 +0100

fdo#38513 - Accelerate non-poolable item add / remove.

For large documents we create and destroy a large number of non-poolable
SfxPoolItems, which get inserted into and removed from a vector.
Unfortunately the performance of this (depending on pattern) is O(N) and
this insert/remove/extend pattern can happen per text span we insert.
This patch makes this O(const) via a hash. This gives a 5x speedup for
the above bug; 176s to 34s or so, and moves the remaining performance
issues elsewhere.

Unfortunately, we have to retain the ordered array to keep the binary
file format code (used for editeng cut-and-paste) in place, so have to
keep both a hash, and an array, and a list around for free slots. cf.
fdo#79851 where there is a start at removing that.

This wastes space; but not that much - for a large open document
collection we have O(100's) of SfxItemPools, and O(1000's) of
SfxPoolItemArray_Impls; having fixed fdo#79851 we can consolidate this.

Add skeletal unit test; translate several German comments; remove
un-necessary include.

Change-Id: Ie0de32b1a29217560c5591c71a6cd4e26d39a531

diff --git a/svl/CppunitTest_svl_itempool.mk b/svl/CppunitTest_svl_itempool.mk
new file mode 100644
index 000..4b59498
--- /dev/null
+++ b/svl/CppunitTest_svl_itempool.mk
@@ -0,0 +1,36 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,svl_itempool))
+
+$(eval $(call gb_CppunitTest_use_external,svl_itempool,boost_headers))
+
+$(eval $(call gb_CppunitTest_use_api,svl_itempool, \
+offapi \
+udkapi \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,svl_itempool, \
+   svl/qa/unit/items/test_itempool \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,svl_itempool, \
+   svl \
+   comphelper \
+   sal \
+   cppu \
+   cppuhelper \
+))
+
+$(eval $(call gb_CppunitTest_set_include,svl_itempool,\
+   -I$(SRCDIR)/svl/source/inc \
+   $$(INCLUDE) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/svl/CppunitTest_svl_items.mk b/svl/CppunitTest_svl_items.mk
index d51b8fc..501c91a 100644
--- a/svl/CppunitTest_svl_items.mk
+++ b/svl/CppunitTest_svl_items.mk
@@ -16,11 +16,6 @@ $(eval $(call gb_CppunitTest_use_api,svl_items, \
 udkapi \
 ))
 
-
-#$(eval $(call gb_CppunitTest_use_components,svl_items, \
-#ucb/source/core/ucb1 \
-#))
-
 $(eval $(call gb_CppunitTest_add_exception_objects,svl_items, \
svl/qa/unit/items/test_IndexedStyleSheets \
 ))
@@ -33,10 +28,4 @@ $(eval $(call gb_CppunitTest_use_libraries,svl_items, \
cppuhelper \
 ))
 
-#$(eval $(call gb_CppunitTest_use_ure,svl_items))
-
-#$(eval $(call gb_CppunitTest_use_components,svl_urihelper,\
-#i18npool/util/i18npool \
-#))
-
 # vim: set noet sw=4 ts=4:
diff --git a/svl/Module_svl.mk b/svl/Module_svl.mk
index f52c7a4..7589030 100644
--- a/svl/Module_svl.mk
+++ b/svl/Module_svl.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_Module_add_check_targets,svl,\
CppunitTest_svl_qa_cppunit \
CppunitTest_svl_inetcontenttype \
CppunitTest_svl_items \
+   CppunitTest_svl_itempool \
 ))
 
 #TODO: CppunitTest_svl_urihelper depends on ucb, can only be added once svl is
diff --git a/svl/qa/unit/items/test_itempool.cxx 
b/svl/qa/unit/items/test_itempool.cxx
new file mode 100644
index 000..469287e
--- /dev/null
+++ b/svl/qa/unit/items/test_itempool.cxx
@@ -0,0 +1,117 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+class PoolItemTest : public CppUnit::TestFixture
+{
+  public:
+ PoolItemTest() {}
+virtual ~PoolItemTest() {}
+
+void testPool();
+
+// Adds code needed t

Re: Paris Hackfest 2014 agenda

2014-06-18 Thread Michael Meeks

On Wed, 2014-06-18 at 09:20 +0200, Lionel Elie Mamane wrote:
> What is, in broad terms, the agenda of the hackfest next week? I mean,
> I'm asking for enough information to make my train and hotel
> reservations: at what time does it start on Friday and until when is
> it on Saturday?

Awesome =) looking forward to seeing you ! there is a group of us
staying at the Bastille Ibis (JFYI).

All the best,

Michael.

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

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


minutes of ESC call ...

2014-06-19 Thread Michael Meeks
* Present:
+ Bjoern, Miklos, Michael M, Jacobo, Stephan, Cedric, Christian,
  Lionel, Robinson, David, Kendy, Caolan, Andras
 
* Completed Action Items:
+ file calc dialog bugs in 4.3 for Caolan / students (Astron)
+ merge access2base 1-liner to 4.2 / 4.3 / master (Lionel)
+ send GDrive configure / keys to Norbert (Cloph)
 
* Pending Action Items:
+ research / seek a saner access2base solution for master (Stephan)
+ ask UX advise wrt. wrench icons (revert or not ?) (Astron)
+ scripting to generate / list last week's UI changes (Cloph)
 
* GSOC Update (Cedric)
+ Questions for evaluations (next week) sent out.
+ can prepare answers already.
+ net monday to friday answer.
+ can we file them early ? (Bjoern)
+ no - but Cedric/Fridrich can file for you if necessary.
+ mid-term evaluations: 23rd-27th June.
 
* Release Engineering update (Christian)
+ 4.2.5 status
+ will be released tomorrow, today a German public holiday.
+ 4.3.0 UI and string freeze:
+ 1 review needed after the tag for rc1
+ 4.3.0 RC1
+ up-loaded to pre-releases, and synching to mirrors.
+ should be in time for the bug-hunt
+ tinderbox / windows build on 4.3 branch and master hangs (any joy ?)
+ apparently related to using flock to stop 2x tinderbox scripts
  running.
+ a build / setup issue.
+ had a hang myself in the 'services' and another test (Michael)
+ hanging in 'backtrace', threading issues.
+ unclear what to do ... perhaps 32bit Linux related.
+ Android / iOS remote
+ Late features ?
+ libreofficekit bits / rename etc.
   + changed the ABI to clean it up.
+ OpenGL pieces / status
   + impress work as well ?
+ pending GL capabilities check to avoid crashes
   + mostly affects Linux ...
+ pending various fixes for GLTF rendering.
 [ starting to be at risk ! ]
   + experimentalising 3D chart bits.
   + at risk [ Tamas to look at that ]
+ Calc performance fixes (?)
+ Writer performance fix
   + did see crashes with that on the stack (Stephan)
   + not sure if that's related
AI:+ review crazy hash speedup patch (Kendy)
+ libfreetype for Windows? (Kendy)
+ libgltf: will have a non-freetype FPS rendering update.
 
* Plugin / NPAPI decision
+ Some concerns:
+ https://bugs.freedesktop.org/show_bug.cgi?id=45071
+ Chrome has already dropped NPAPI
+ 
http://blog.chromium.org/2013/09/saying-goodbye-to-our-old-friend-npapi.html
  + LibreOffice / NPAPI currently used by sub 5% of users
 + be good to get harder usage stats if possible (?)
+ All live browsers block them; click-to-activate etc.
+ no really good solutions:
  + no replacement API at all.
  
http://www.firebreath.org/display/documentation/Browser+Plugins+in+a+post-NPAPI+world
  "We have confirmed that PPAPI will not work because while Chrome 
supports it
   they don't provide any way for third parties to install PPAPI 
plugins.
   The only method of doing so involves a command-line argument, 
which is
   unsuitable for most purposes."
AI: + blog about the sad reality of web plugins (Bjoern)
   + NPAPI will be removed in 4.4 ... (still there in 4.3).
+ NB. we use NPAPI for 2x things (Stephan)
   1. to plug ourselves into the browser (dying on the browser side)
   2. to plug the Flash player into Impress etc.
+ should we drop both ?
+ potentially problematic with existing flash embedding documents 
(Miklos)
+ Don't remove 2. - continue to support NPAPI where it works.
+ Could we export tiled rendering to the browser (Lool as a solution?) 
(Kendy)
+ Mozwrapper can be used to support rendering to an existing X window
  for a non-NPAPI supporting APP (Miklos)
+ so functionality is still there.
 
* Crashtest update (Markus)
  + new result based on build from Sunday, June 15th

http://dev-builds.libreoffice.org/crashtest/76f0a1307f779faf4f590fefafc445c077a39f26
  + summary is available as
   
http://dev-builds.libreoffice.org/crashtest/76f0a1307f779faf4f590fefafc445c077a39f26/exportCrashes.csv
   
http://dev-builds.libreoffice.org/crashtest/76f0a1307f779faf4f590fefafc445c077a39f26/importCrash.csv
   
http://dev-builds.libreoffice.org/crashtest/76f0a1307f779faf4f590fefafc445c077a39f26/validationErrors.csv
  + memcheck results
  + thanks to the City Of Largo
  + http://dev-builds.libreoffice.org/crashtest/memcheck.zip
  + grep for 'Invalid' or '

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

2014-06-23 Thread Michael Meeks
 sw/inc/pagedesc.hxx   |1 +
 sw/source/core/doc/docdesc.cxx|2 +-
 sw/source/core/unocore/unostyle.cxx   |   18 +-
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |6 +++---
 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx |2 +-
 5 files changed, 15 insertions(+), 14 deletions(-)

New commits:
commit 295b97b2a654e00ac5a8e6a3545284fa583fce78
Author: Michael Meeks 
Date:   Fri Jun 20 13:50:32 2014 +0100

fdo#76260 - Switch from vector to std::stack.

std::stack uses std::deque which is extremely expensive for this case.
This change saves 43bn of 98bn cycles spent in createFastChildContext.

Change-Id: I63919a9826563171f128e09d7206ac6cfdde336f

diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx 
b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index cc20804..b89a5cf 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -179,7 +179,7 @@ bool OOXMLFastContextHandler::prepareMceContext(Token_t 
nElement, const uno::Ref
 m_bDiscardChildren = false;
 aState.m_bTookChoice = m_bTookChoice;
 m_bTookChoice = false;
-m_aSavedAlternateStates.push(aState);
+m_aSavedAlternateStates.push_back(aState);
 }
 break;
 case OOXML_Choice:
@@ -241,8 +241,8 @@ throw (uno::RuntimeException, xml::sax::SAXException, 
std::exception)
 m_bDiscardChildren = false;
 else if (Element == (NS_mce | OOXML_AlternateContent))
 {
-SavedAlternateState aState(m_aSavedAlternateStates.top());
-m_aSavedAlternateStates.pop();
+SavedAlternateState aState(m_aSavedAlternateStates.back());
+m_aSavedAlternateStates.pop_back();
 m_bDiscardChildren = aState.m_bDiscardChildren;
 m_bTookChoice = aState.m_bTookChoice;
 }
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx 
b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
index 053985d..88b1b80 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
@@ -290,7 +290,7 @@ private:
 uno::Reference< uno::XComponentContext > m_xContext;
 bool m_bDiscardChildren;
 bool m_bTookChoice; ///< Did we take the Choice or want Fallback instead?
-std::stack m_aSavedAlternateStates;
+std::vector m_aSavedAlternateStates;
 
 static sal_uInt32 mnInstanceCount;
 
commit 9e5e9dd1b276043d2e9f45c01d72b2e89d8abdf2
Author: Michael Meeks 
Date:   Thu Jun 19 22:34:55 2014 +0100

fdo#76260 - a better approach for getting element names.

Don't do lots more work than we need to to build the list of names.
It appears that the [] operator does a lot of apparently un-necessary
work.

Change-Id: Id603fb4e717dc7130468465493edccfe51d384c7

diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index c3e94f9..5e2ba64 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -70,6 +70,7 @@
 
 #include 
 #include 
+#include 
 
 //
 #include 
@@ -788,23 +789,22 @@ uno::Any SwXStyleFamily::getByName(const OUString& rName)
 uno::Sequence< OUString > SwXStyleFamily::getElementNames(void) throw( 
uno::RuntimeException, std::exception )
 {
 SolarMutexGuard aGuard;
-uno::Sequence< OUString > aRet;
+comphelper::SequenceAsVector< OUString > aRet;
 if(pBasePool)
 {
-SfxStyleSheetIteratorPtr pIterator = 
pBasePool->CreateIterator(eFamily, SFXSTYLEBIT_ALL);
-const sal_uInt16 nCount = pIterator->Count();
-aRet.realloc(nCount);
-OUString* pArray = aRet.getArray();
+SfxStyleSheetIteratorPtr pIt = pBasePool->CreateIterator(eFamily, 
SFXSTYLEBIT_ALL);
 OUString aString;
-for(sal_uInt16 i = 0; i < nCount; i++)
+for (SfxStyleSheetBase* pStyle = pIt->First(); pStyle; pStyle = 
pIt->Next())
 {
-SwStyleNameMapper::FillProgName((*pIterator)[i]->GetName(), 
aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true );
-pArray[i] = aString;
+SwStyleNameMapper::FillProgName(pStyle->GetName(), aString,
+lcl_GetSwEnumFromSfxEnum ( eFamily 
), true);
+aRet.push_back(aString);
 }
 }
 else
 throw uno::RuntimeException();
-return aRet;
+
+return aRet.getAsConstList();
 }
 
 sal_Bool SwXStyleFamily::hasByName(const OUString& rName) throw( 
uno::RuntimeException, std::exception )
commit 78378af1d404baf78f42930a29dbf8eae22bbe80
Author: Michael Meeks 
Date:   Wed Jun 18 12:56:29 2014 +0100

fdo#76260 - the wrong way to get a 10% win with an N^3 operation.

Micro optimising the inn

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

2014-06-24 Thread Michael Meeks
 sw/inc/pagedesc.hxx   |1 +
 sw/source/core/doc/docdesc.cxx|2 +-
 sw/source/core/unocore/unostyle.cxx   |   18 +-
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |6 +++---
 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx |2 +-
 5 files changed, 15 insertions(+), 14 deletions(-)

New commits:
commit 7d32ac663e7ac4c6f3f22d003c3f36437be43399
Author: Michael Meeks 
Date:   Fri Jun 20 13:50:32 2014 +0100

fdo#76260 - Switch from vector to std::stack.

std::stack uses std::deque which is extremely expensive for this case.
This change saves 43bn of 98bn cycles spent in createFastChildContext.

Change-Id: I63919a9826563171f128e09d7206ac6cfdde336f
(cherry picked from commit 295b97b2a654e00ac5a8e6a3545284fa583fce78)
Signed-off-by: Miklos Vajna 

diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx 
b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 1a436ce..7fd973c 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -181,7 +181,7 @@ bool OOXMLFastContextHandler::prepareMceContext(Token_t 
nElement, const uno::Ref
 m_bDiscardChildren = false;
 aState.m_bTookChoice = m_bTookChoice;
 m_bTookChoice = false;
-m_aSavedAlternateStates.push(aState);
+m_aSavedAlternateStates.push_back(aState);
 }
 break;
 case OOXML_Choice:
@@ -268,8 +268,8 @@ throw (uno::RuntimeException, xml::sax::SAXException, 
std::exception)
 m_bDiscardChildren = false;
 else if (Element == (NS_mce | OOXML_AlternateContent))
 {
-SavedAlternateState aState(m_aSavedAlternateStates.top());
-m_aSavedAlternateStates.pop();
+SavedAlternateState aState(m_aSavedAlternateStates.back());
+m_aSavedAlternateStates.pop_back();
 m_bDiscardChildren = aState.m_bDiscardChildren;
 m_bTookChoice = aState.m_bTookChoice;
 }
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx 
b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
index f8f2638..a7d9bfa 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
@@ -300,7 +300,7 @@ private:
 uno::Reference< uno::XComponentContext > m_xContext;
 bool m_bDiscardChildren;
 bool m_bTookChoice; ///< Did we take the Choice or want Fallback instead?
-std::stack m_aSavedAlternateStates;
+std::vector m_aSavedAlternateStates;
 
 static sal_uInt32 mnInstanceCount;
 
commit 22c818bd9fa79a2c008719cc0a858ba2a74b0d82
Author: Michael Meeks 
Date:   Thu Jun 19 22:34:55 2014 +0100

fdo#76260 - a better approach for getting element names.

Don't do lots more work than we need to to build the list of names.
It appears that the [] operator does a lot of apparently un-necessary
work.

(cherry picked from commit 9e5e9dd1b276043d2e9f45c01d72b2e89d8abdf2)
Signed-off-by: Miklos Vajna 

Conflicts:
sw/source/core/unocore/unostyle.cxx

Change-Id: Id603fb4e717dc7130468465493edccfe51d384c7

diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index 15a4639..ae28998 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -69,6 +69,7 @@
 
 #include 
 #include 
+#include 
 
 //
 #include 
@@ -787,23 +788,22 @@ uno::Any SwXStyleFamily::getByName(const OUString& rName)
 uno::Sequence< OUString > SwXStyleFamily::getElementNames(void) throw( 
uno::RuntimeException, std::exception )
 {
 SolarMutexGuard aGuard;
-uno::Sequence< OUString > aRet;
+comphelper::SequenceAsVector< OUString > aRet;
 if(pBasePool)
 {
-SfxStyleSheetIteratorPtr pIterator = 
pBasePool->CreateIterator(eFamily, SFXSTYLEBIT_ALL);
-sal_uInt16 nCount = pIterator->Count();
-aRet.realloc(nCount);
-OUString* pArray = aRet.getArray();
+SfxStyleSheetIteratorPtr pIt = pBasePool->CreateIterator(eFamily, 
SFXSTYLEBIT_ALL);
 OUString aString;
-for(sal_uInt16 i = 0; i < nCount; i++)
+for (SfxStyleSheetBase* pStyle = pIt->First(); pStyle; pStyle = 
pIt->Next())
 {
-SwStyleNameMapper::FillProgName((*pIterator)[i]->GetName(), 
aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true );
-pArray[i] = aString;
+SwStyleNameMapper::FillProgName(pStyle->GetName(), aString,
+lcl_GetSwEnumFromSfxEnum ( eFamily 
), true);
+aRet.push_back(aString);
 }
 }
 else
 throw uno::RuntimeException();
-return aRet;
+
+return aRet.getAsConstList();
 }
 
 sal_Bool SwXStyleFamily::hasByName(const OU

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

2014-06-24 Thread Michael Meeks
 svl/source/items/itempool.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 21e977167664e8b5ae86c712b08fde045af7fafd
Author: Michael Meeks 
Date:   Tue Jun 24 13:56:51 2014 +0100

Improve SfxItemPool documentation.

Change-Id: If5a555dae067d023c9dd1fd8e0409ca327739f08

diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index d18b122..1990d46 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -711,6 +711,9 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& 
rItem, sal_uInt16 nWhich
 
 SfxPoolItemArrayBase_Impl::iterator ppFree;
 bool ppFreeIsSet = false;
+
+// Is this a 'poolable' item - ie. should we re-use and return
+// the same underlying item for equivalent (==) SfxPoolItems ?
 if ( IsItemFlag_Impl( nIndex, SFX_ITEM_POOLABLE ) )
 {
 // if is already in a pool, then it is worth checking if it is in this 
one.
@@ -751,7 +754,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& 
rItem, sal_uInt16 nWhich
 }
 else
 {
-// look for a freed place
+// Unconditionally insert; check for a recently freed place
 if (pItemArr->maFree.size() > 0)
 {
 SfxPoolItemArrayBase_Impl::iterator itr = pItemArr->begin();
@@ -765,7 +768,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& 
rItem, sal_uInt16 nWhich
 }
 }
 
-// nicht vorhanden, also im PtrArray eintragen
+// 3. not found, so clone to insert into the pointer array.
 SfxPoolItem* pNewItem = rItem.Clone(pImp->mpMaster);
 pNewItem->SetWhich(nWhich);
 #ifdef DBG_UTIL
@@ -782,6 +785,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& 
rItem, sal_uInt16 nWhich
 #endif
 AddRef( *pNewItem, pImp->nInitRefCount );
 
+// 4. finally insert into the pointer array
 assert( pItemArr->maHash.find(pNewItem) == pItemArr->maHash.end() );
 if ( !ppFreeIsSet )
 {
___
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' - 2 commits - sw/inc sw/source

2014-06-25 Thread Michael Meeks
 sw/inc/pagedesc.hxx |1 +
 sw/source/core/doc/docdesc.cxx  |2 +-
 sw/source/core/unocore/unostyle.cxx |   18 +-
 3 files changed, 11 insertions(+), 10 deletions(-)

New commits:
commit cbb5b0e93444bd0b42a22bbef01dd8599c9d4483
Author: Michael Meeks 
Date:   Thu Jun 19 22:34:55 2014 +0100

fdo#76260 - a better approach for getting element names.

Don't do lots more work than we need to to build the list of names.
It appears that the [] operator does a lot of apparently un-necessary
work.

Conflicts:
sw/source/core/unocore/unostyle.cxx

Change-Id: Id603fb4e717dc7130468465493edccfe51d384c7

diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index 4963b68..d5589ec 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -69,6 +69,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -783,23 +784,22 @@ uno::Any SwXStyleFamily::getByName(const OUString& rName)
 uno::Sequence< OUString > SwXStyleFamily::getElementNames(void) throw( 
uno::RuntimeException )
 {
 SolarMutexGuard aGuard;
-uno::Sequence< OUString > aRet;
+comphelper::SequenceAsVector< OUString > aRet;
 if(pBasePool)
 {
-SfxStyleSheetIteratorPtr pIterator = 
pBasePool->CreateIterator(eFamily, SFXSTYLEBIT_ALL);
-sal_uInt16 nCount = pIterator->Count();
-aRet.realloc(nCount);
-OUString* pArray = aRet.getArray();
+SfxStyleSheetIteratorPtr pIt = pBasePool->CreateIterator(eFamily, 
SFXSTYLEBIT_ALL);
 OUString aString;
-for(sal_uInt16 i = 0; i < nCount; i++)
+for (SfxStyleSheetBase* pStyle = pIt->First(); pStyle; pStyle = 
pIt->Next())
 {
-SwStyleNameMapper::FillProgName((*pIterator)[i]->GetName(), 
aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true );
-pArray[i] = aString;
+SwStyleNameMapper::FillProgName(pStyle->GetName(), aString,
+lcl_GetSwEnumFromSfxEnum ( eFamily 
), true);
+aRet.push_back(aString);
 }
 }
 else
 throw uno::RuntimeException();
-return aRet;
+
+return aRet.getAsConstList();
 }
 
 sal_Bool SwXStyleFamily::hasByName(const OUString& rName) throw( 
uno::RuntimeException )
commit edd98c9428e7ac15e16f28503ae831d895ce2a8c
Author: Michael Meeks 
Date:   Wed Jun 18 12:56:29 2014 +0100

fdo#76260 - the wrong way to get a 10% win with an N^3 operation.

Micro optimising the inner-loop is never the right way; on the other
hand this is 10% of load time and is waste.

Change-Id: Ie275be53e30834cbb6576b8e7580c16d2e47bf16
(cherry picked from commit 78378af1d404baf78f42930a29dbf8eae22bbe80)

diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index b0bccec..1498336 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -162,6 +162,7 @@ protected:
 
 public:
 OUString GetName() const { return aDescName; }
+bool HasName( const OUString& rThisName ) { return aDescName == rThisName; 
}
 void SetName( const OUString& rNewName ) { aDescName = rNewName; }
 
 sal_Bool GetLandscape() const { return bLandscape; }
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index c84a5d2..a3c0a93 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -635,7 +635,7 @@ SwPageDesc* SwDoc::FindPageDescByName( const OUString& 
rName, sal_uInt16* pPos )
 if( pPos ) *pPos = USHRT_MAX;
 
 for( sal_uInt16 n = 0, nEnd = maPageDescs.size(); n < nEnd; ++n )
-if( maPageDescs[ n ]->GetName() == rName )
+if( maPageDescs[ n ]->HasName( rName ) )
 {
 pRet = maPageDescs[ n ];
 if( pPos )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-27 Thread Michael Meeks
 cppu/source/typelib/typelib.cxx|4 +++-
 libreofficekit/source/gtk/lokdocview.c |   22 +++---
 2 files changed, 18 insertions(+), 8 deletions(-)

New commits:
commit ab0b8a95ef9ede3d41289593b8fbf68800ff9278
Author: Michael Meeks 
Date:   Tue Jun 24 16:12:08 2014 +0100

fix comment and tiny optimisation for shutdown.

Change-Id: I94e0f55f7fc38529a9ab165786efaf7ac649a9d3

diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 583b737..8533578 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -270,7 +270,9 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl()
 if( pWeakMap )
 {
 std::vector< typelib_TypeDescriptionReference * > ppTDR;
-// save al weak references
+ppTDR.reserve( pWeakMap->size() );
+
+// save all weak references
 WeakMap_Impl::const_iterator aIt = pWeakMap->begin();
 while( aIt != pWeakMap->end() )
 {
commit 3c440aad56cdaf3e0c05af6c7967a3d15b183034
Author: Michael Meeks 
Date:   Thu Jun 26 11:14:50 2014 +0100

LOK DocView: handle document load failure without crashing.

Change-Id: Icd668b3a7ec3ac58322a6af3f1da6008837d0b6b

diff --git a/libreofficekit/source/gtk/lokdocview.c 
b/libreofficekit/source/gtk/lokdocview.c
index 49aaf2e..f813e68 100644
--- a/libreofficekit/source/gtk/lokdocview.c
+++ b/libreofficekit/source/gtk/lokdocview.c
@@ -22,8 +22,9 @@ static void lok_docview_init( LOKDocView* pDocView );
 void lcl_onDestroy( LOKDocView* pDocView, gpointer pData )
 {
 (void) pData;
-pDocView->pDocument->pClass->destroy( pDocView->pDocument );
-pDocView->pDocument = 0;
+if ( pDocView->pDocument )
+pDocView->pDocument->pClass->destroy( pDocView->pDocument );
+pDocView->pDocument = NULL;
 }
 
 SAL_DLLPUBLIC_EXPORT guint lok_docview_get_type()
@@ -139,15 +140,22 @@ SAL_DLLPUBLIC_EXPORT gboolean lok_docview_open_document( 
LOKDocView* pDocView, c
 if ( pDocView->pDocument )
 {
 pDocView->pDocument->pClass->destroy( pDocView->pDocument );
-pDocView->pDocument = 0;
+pDocView->pDocument = NULL;
 }
 
 pDocView->pDocument = pDocView->pOffice->pClass->documentLoad( 
pDocView->pOffice,
-   pPath );
-
-renderDocument( pDocView );
+   pPath );
+if ( !pDocView->pDocument )
+{
+// FIXME: should have a GError parameter and populate it.
+char *pError = pDocView->pOffice->pClass->getError( pDocView->pOffice 
);
+fprintf( stderr, "Error opening document '%s'\n", pError );
+return FALSE;
+}
+else
+renderDocument( pDocView );
 
-return FALSE;
+return TRUE;
 }
 
 SAL_DLLPUBLIC_EXPORT void lok_docview_set_zoom ( LOKDocView* pDocView, float 
fZoom )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-27 Thread Michael Meeks
 filter/source/config/cache/constant.hxx  |  103 +--
 filter/source/config/cache/filtercache.cxx   |   60 +++
 filter/source/config/cache/filterfactory.cxx |2 
 filter/source/config/cache/macros.hxx|9 --
 4 files changed, 81 insertions(+), 93 deletions(-)

New commits:
commit 556981f07815a0de0ad3576ba6f8639671a6c13c
Author: Michael Meeks 
Date:   Fri Jun 27 15:58:14 2014 +0100

filter: remove redundant macro wasting time.

Allocating and freeing strings thousands of times just to compare
them is not a great idea - 0.5% of startup.

Change-Id: I076bc961d3612143b7f81ef024e261ec3ed4ff76

diff --git a/filter/source/config/cache/constant.hxx 
b/filter/source/config/cache/constant.hxx
index 7cb60d1..98327f0 100644
--- a/filter/source/config/cache/constant.hxx
+++ b/filter/source/config/cache/constant.hxx
@@ -27,7 +27,6 @@
 // #define LOAD_IMPLICIT
 
 
-
 /** @short  used to identify a some generic item properties against the
 configuration API and can be used at all name containers
 (based on this filtercache) too.
@@ -71,18 +70,18 @@
 /** @short  used to identify the list of sorted filters for a specific
 office module
  */
-#define  PROPNAME_SORTEDFILTERLIST 
_FILTER_CONFIG_FROM_ASCII_("SortedFilterList")
+#define  PROPNAME_SORTEDFILTERLIST "SortedFilterList"
 
 /** @short  implicit properties. which are used at the container interface 
only.
  */
-#define  PROPNAME_FINALIZED _FILTER_CONFIG_FROM_ASCII_("Finalized")
-#define  PROPNAME_MANDATORY _FILTER_CONFIG_FROM_ASCII_("Mandatory")
+#define  PROPNAME_FINALIZED "Finalized"
+#define  PROPNAME_MANDATORY "Mandatory"
 
 /** @short  used to identify a set of items against the configuration API. */
-#define  CFGSET_TYPES   _FILTER_CONFIG_FROM_ASCII_("Types" 
 )
-#define  CFGSET_FILTERS _FILTER_CONFIG_FROM_ASCII_("Filters"   
 )
-#define  CFGSET_FRAMELOADERS_FILTER_CONFIG_FROM_ASCII_("FrameLoaders"  
 )
-#define  CFGSET_CONTENTHANDLERS 
_FILTER_CONFIG_FROM_ASCII_("ContentHandlers")
+#define  CFGSET_TYPES   "Types"
+#define  CFGSET_FILTERS "Filters"
+#define  CFGSET_FRAMELOADERS"FrameLoaders"
+#define  CFGSET_CONTENTHANDLERS "ContentHandlers"
 
 /** @short  used to address some configuration keys directly.
 
@@ -91,40 +90,40 @@
 
 @TODO   define these direct keys ...
  */
-#define  CFGDIRECTKEY_OFFICELOCALE  
_FILTER_CONFIG_FROM_ASCII_("/org.openoffice.Setup/L10N/ooLocale"
   )
-#define  CFGDIRECTKEY_DEFAULTFRAMELOADER
_FILTER_CONFIG_FROM_ASCII_("/org.openoffice.TypeDetection.Misc/Defaults/DefaultFrameLoader")
-#define  CFGDIRECTKEY_OFFICELOCALE  
_FILTER_CONFIG_FROM_ASCII_("/org.openoffice.Setup/L10N/ooLocale"
   )
-#define  CFGDIRECTKEY_PRODUCTNAME   
_FILTER_CONFIG_FROM_ASCII_("/org.openoffice.Setup/Product/ooName"   
   )
+#define  CFGDIRECTKEY_OFFICELOCALE  
"/org.openoffice.Setup/L10N/ooLocale"
+#define  CFGDIRECTKEY_DEFAULTFRAMELOADER
"/org.openoffice.TypeDetection.Misc/Defaults/DefaultFrameLoader"
+#define  CFGDIRECTKEY_OFFICELOCALE  
"/org.openoffice.Setup/L10N/ooLocale"
+#define  CFGDIRECTKEY_PRODUCTNAME   
"/org.openoffice.Setup/Product/ooName"
 
 // Note that these flag bits have parallel names in
 // comphelper/inc/comphelper/documentconstants.hxx . See that file for
 // documentation on their meaning.
 
 /** @short  names of filter flags, sorted in alphabetical order */
-#define  FLAGNAME_3RDPARTYFILTER
_FILTER_CONFIG_FROM_ASCII_("3RDPARTYFILTER"   )
-#define  FLAGNAME_ALIEN _FILTER_CONFIG_FROM_ASCII_("ALIEN" 
   )
-#define  FLAGNAME_ASYNCHRON _FILTER_CONFIG_FROM_ASCII_("ASYNCHRON" 
   )
-#define  FLAGNAME_BROWSERPREFERRED  
_FILTER_CONFIG_FROM_ASCII_("BROWSERPREFERRED" )
-#define  FLAGNAME_CONSULTSERVICE
_FILTER_CONFIG_FROM_ASCII_("CONSULTSERVICE"   )
-#define  FLAGNAME_DEFAULT   _FILTER_CONFIG_FROM_ASCII_("DEFAULT"   
   )
-#define  FLAGNAME_ENCRYPTION_FILTER_CONFIG_FROM_ASCII_("ENCRYPTION"
   )
-#define  FLAGNAME_EXPORT_FILTER_CONFIG_FROM_ASCII_("EXPORT"
   )
-#define  FLAGNAME_IMPORT_FILTER_CONFIG_FROM_ASCII_("IMPORT"
   )
-#define  FLAGNAME_INTERNAL  _FILTER_CONFIG_FROM_ASCII_("INTERNAL"  
   )
-#define  FLAGNAME_NOTINCHOOSER  _FILTER_CONFIG_FROM_ASCII_("NOTINCHOOSER"  
   )
-#define  FLAGNAME_NOTINFILEDIALOG   
_FILTER_CONFIG_FROM_ASCII_("NOTINFILEDIALOG"  )

[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - svl/CppunitTest_svl_itempool.mk svl/CppunitTest_svl_items.mk svl/Module_svl.mk svl/qa svl/source

2014-06-27 Thread Michael Meeks
 svl/CppunitTest_svl_itempool.mk |   36 ++
 svl/CppunitTest_svl_items.mk|   11 ---
 svl/Module_svl.mk   |1 
 svl/qa/unit/items/test_itempool.cxx |  117 +++
 svl/source/inc/poolio.hxx   |   31 +++--
 svl/source/items/itempool.cxx   |  119 ++--
 svl/source/items/poolio.cxx |   10 +--
 svl/source/items/style.cxx  |1 
 8 files changed, 259 insertions(+), 67 deletions(-)

New commits:
commit 8aff83b95fa5969edfc48022ddaae05031b178cf
Author: Michael Meeks 
Date:   Mon Jun 16 22:27:00 2014 +0100

fdo#38513 - Accelerate non-poolable item add / remove.

For large documents we create and destroy a large number of non-poolable
SfxPoolItems, which get inserted into and removed from a vector.
Unfortunately the performance of this (depending on pattern) is O(N) and
this insert/remove/extend pattern can happen per text span we insert.
This patch makes this O(const) via a hash. This gives a 5x speedup for
the above bug; 176s to 34s or so, and moves the remaining performance
issues elsewhere.

Unfortunately, we have to retain the ordered array to keep the binary
file format code (used for editeng cut-and-paste) in place, so have to
keep both a hash, and an array, and a list around for free slots. cf.
fdo#79851 where there is a start at removing that.

This wastes space; but not that much - for a large open document
collection we have O(100's) of SfxItemPools, and O(1000's) of
SfxPoolItemArray_Impls; having fixed fdo#79851 we can consolidate this.

Add skeletal unit test; translate several German comments; remove
un-necessary include.

Change-Id: Ie0de32b1a29217560c5591c71a6cd4e26d39a531
Reviewed-on: https://gerrit.libreoffice.org/9818
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/svl/CppunitTest_svl_itempool.mk b/svl/CppunitTest_svl_itempool.mk
new file mode 100644
index 000..4b59498
--- /dev/null
+++ b/svl/CppunitTest_svl_itempool.mk
@@ -0,0 +1,36 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,svl_itempool))
+
+$(eval $(call gb_CppunitTest_use_external,svl_itempool,boost_headers))
+
+$(eval $(call gb_CppunitTest_use_api,svl_itempool, \
+offapi \
+udkapi \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,svl_itempool, \
+   svl/qa/unit/items/test_itempool \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,svl_itempool, \
+   svl \
+   comphelper \
+   sal \
+   cppu \
+   cppuhelper \
+))
+
+$(eval $(call gb_CppunitTest_set_include,svl_itempool,\
+   -I$(SRCDIR)/svl/source/inc \
+   $$(INCLUDE) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/svl/CppunitTest_svl_items.mk b/svl/CppunitTest_svl_items.mk
index d51b8fc..501c91a 100644
--- a/svl/CppunitTest_svl_items.mk
+++ b/svl/CppunitTest_svl_items.mk
@@ -16,11 +16,6 @@ $(eval $(call gb_CppunitTest_use_api,svl_items, \
 udkapi \
 ))
 
-
-#$(eval $(call gb_CppunitTest_use_components,svl_items, \
-#ucb/source/core/ucb1 \
-#))
-
 $(eval $(call gb_CppunitTest_add_exception_objects,svl_items, \
svl/qa/unit/items/test_IndexedStyleSheets \
 ))
@@ -33,10 +28,4 @@ $(eval $(call gb_CppunitTest_use_libraries,svl_items, \
cppuhelper \
 ))
 
-#$(eval $(call gb_CppunitTest_use_ure,svl_items))
-
-#$(eval $(call gb_CppunitTest_use_components,svl_urihelper,\
-#i18npool/util/i18npool \
-#))
-
 # vim: set noet sw=4 ts=4:
diff --git a/svl/Module_svl.mk b/svl/Module_svl.mk
index f52c7a4..7589030 100644
--- a/svl/Module_svl.mk
+++ b/svl/Module_svl.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_Module_add_check_targets,svl,\
CppunitTest_svl_qa_cppunit \
CppunitTest_svl_inetcontenttype \
CppunitTest_svl_items \
+   CppunitTest_svl_itempool \
 ))
 
 #TODO: CppunitTest_svl_urihelper depends on ucb, can only be added once svl is
diff --git a/svl/qa/unit/items/test_itempool.cxx 
b/svl/qa/unit/items/test_itempool.cxx
new file mode 100644
index 000..469287e
--- /dev/null
+++ b/svl/qa/unit/items/test_itempool.cxx
@@ -0,0 +1,117 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+class PoolItemTest : public CppUnit::TestFixture
+{

[Libreoffice-commits] dev-tools.git: 3 commits - scripts/Bugzilla.pm scripts/build-portal.pl scripts/esc-bug-stats.pl

2014-06-27 Thread Michael Meeks
 scripts/Bugzilla.pm  |  199 +++
 scripts/build-portal.pl  |   57 +++
 scripts/esc-bug-stats.pl |  238 +--
 3 files changed, 285 insertions(+), 209 deletions(-)

New commits:
commit 681121114eaa2e786ab59cf8563babd6a8c974fd
Author: Michael Meeks 
Date:   Fri Jun 27 17:24:30 2014 +0100

Start splitting Bugzilla stats out into its own perl module.

diff --git a/scripts/Bugzilla.pm b/scripts/Bugzilla.pm
new file mode 100644
index 000..8ee0e58
--- /dev/null
+++ b/scripts/Bugzilla.pm
@@ -0,0 +1,199 @@
+package Bugzilla;
+
+use strict;
+use warnings;
+use URI::Escape qw(uri_escape);
+
+our ($bugserver);
+our @EXPORT_OK = qw(bugserver get_url get_deps get_query read_bugstats);
+
+# Please take the time to check that the script still runs
+# before changing this to something else.
+$bugserver = "bugs.freedesktop.org";
+
+# use me for testing XML pretty printing etc.
+my $fast_debug = 0;
+
+# config for eliding top bug contributors who are
+# not (yet) libreoffice hackers.
+my %sadly_non_libreoffice = (
+'Chris Wilson' => 1,
+'Bastien Nocera' => 1,
+'Kristian Høgsberg' => 1,
+'Simon McVittie' => 1,
+'Søren Sandmann Pedersen' => 1,
+'Daniel Vetter' => 1,
+'Sergey V. Udaltsov' => 1,
+'Marek Olšák' => 1,
+'Emil Velikov' => 1,
+'ajax at nwnk dot net' => 1,
+'Jesse Barnes' => 1,
+'Albert Astals Cid' => 1,
+'Daniel Stone' => 1,
+'Eric Anholt' => 1,
+'Lennart Poettering' => 1,
+'Ilia Mirkin' => 1,
+'Behdad Esfahbod' => 1,
+'Richard Hughes' => 1,
+'Ben Widawsky' => 1,
+'Chengwei Yang' => 1,
+'Dan Nicholson' => 1,
+'Zbigniew Jedrzejewski-Szmek' => 1,
+'Tanu Kaskinen' => 1,
+'Vinson Lee' => 1,
+'Sylvain BERTRAND' => 1,
+'lu hua' => 1,
+'Kenneth Graunke' => 1,
+'Seif Lotfy' => 1,
+'Alex Deucher' => 1,
+'Ian Romanick' => 1,
+'Tollef Fog Heen' => 1,
+'Patrick Ohly' => 1,
+'Peter Hutterer' => 1,
+'Guillaume Desmottes' => 1,
+'Bryce Harrington' => 1,
+'Paolo Zanoni' => 1,
+'David Faure' => 1,
+'Rex Dieter' => 1,
+'Tom Stellard' => 1,
+'almos' => 1,
+);
+
+sub get_url($)
+{
+my $url = shift;
+my @lines;
+my $handle;
+open ($handle, "curl -k -s '$url' 2>&1 |") || die "can't exec curl: $!";
+while (<$handle>) {
+   push @lines, $_;
+}
+close ($handle);
+return @lines;
+}
+
+sub get_deps($)
+{
+my ($url) = @_;
+
+return 42 if ($fast_debug);
+
+my @bugs = get_url($url);
+
+my $bug_count = -1;
+while (my $line = shift (@bugs)) {
+   if ($line =~ m/does not depend on any open bugs/) {
+   $bug_count = 0;
+   last;
+   }
+   elsif ($line =~ m/^\s*depends on\s*$/) {
+   $line = shift @bugs;
+#  print STDERR "Have depends on '$line'\n";
+   if ($line =~ m/^\s*(\d+)\s*$/) {
+   my $num = $1;
+   $line = shift @bugs;
+   $line = shift @bugs;
+   if ($line =~ m/bugs:/) {
+   $bug_count = $num;
+   last;
+   }
+   } elsif ($line =~ m/\s+one\s+/) { # special case for one
+   $bug_count = 1;
+   last;
+   } else {
+   print STDERR "odd depends on follow-on: '$line'\n";
+   }
+   }
+}
+return $bug_count;
+}
+
+sub get_query($)
+{
+my ($url) = @_;
+
+return 6 if ($fast_debug);
+
+my @bugs = get_url($url);
+
+my $bug_count = -1;
+while (my $line = shift (@bugs)) {
+   if ($line =~ m/(\d+) bugs found./) {
+   $bug_count = $1;
+   last;
+   } elsif ($line =~ m/One bug found./) {
+   $bug_count = 1;
+   last;
+   } elsif ($line =~ m/Zarro Boogs found./) {
+   $bug_count = 0;
+   last;
+   }
+}
+return $bug_count;
+}
+
+sub extract_number($)
+{
+my $line = shift;
+chomp ($line);
+$line =~ s/^.*\"\>//;
+$line =~ s/<.*$//;
+return $line;
+}
+
+sub read_bugstats($)
+{
+my @lines = get_url(shift);
+
+my $region = 'header';
+my $closer_name;
+my %closed_stats;
+my $delta = 0;
+
+while ((my $line = shift @lines) && $region ne 'end') {
+#  prin

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

2014-06-28 Thread Michael Meeks
 configmgr/source/access.cxx|   75 ---
 configmgr/source/access.hxx|8 +
 configmgr/source/childaccess.cxx   |   41 +---
 configmgr/source/childaccess.hxx   |5 -
 configmgr/source/components.cxx|2 
 configmgr/source/data.cxx  |   10 --
 configmgr/source/data.hxx  |3 
 configmgr/source/groupnode.cxx |2 
 configmgr/source/localizedpropertynode.cxx |2 
 configmgr/source/localizedvaluenode.cxx|   10 +-
 configmgr/source/localizedvaluenode.hxx|8 +
 configmgr/source/node.hxx  |5 -
 configmgr/source/nodemap.cxx   |   20 +++-
 configmgr/source/nodemap.hxx   |   42 
 configmgr/source/propertynode.cxx  |7 +
 configmgr/source/propertynode.hxx  |1 
 configmgr/source/setnode.cxx   |2 
 configmgr/source/valueparser.cxx   |   67 +++---
 configmgr/source/writemodfile.cxx  |2 
 configmgr/source/xcuparser.cxx |6 -
 filter/source/config/cache/filtercache.cxx |  136 ++---
 filter/source/config/cache/filtercache.hxx |5 +
 vcl/source/app/settings.cxx|4 
 vcl/source/app/svapp.cxx   |8 +
 24 files changed, 320 insertions(+), 151 deletions(-)

New commits:
commit 5fd43384a443aee09dd4c98ffd79572f44f13000
Author: Michael Meeks 
Date:   Sat Jun 28 14:29:34 2014 +0100

configmgr: accelerate getPropertyValue.

Change-Id: Ie0460c8db6b1e7fcc9bab1f5e9ae1fbd00987994

diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 6aeabb4..7402897 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -734,12 +734,12 @@ css::uno::Any Access::getPropertyValue(OUString const & 
PropertyName)
 {
 assert(thisIs(IS_GROUP));
 osl::MutexGuard g(*lock_);
-rtl::Reference< ChildAccess > child(getChild(PropertyName));
-if (!child.is()) {
+
+css::uno::Any value;
+if (!getByNameFast(PropertyName, value))
 throw css::beans::UnknownPropertyException(
 PropertyName, static_cast< cppu::OWeakObject * >(this));
-}
-return child->asValue();
+return value;
 }
 
 void Access::addPropertyChangeListener(
commit 546c7baec791aa3027a45cdde6c4c02bc073d002
Author: Michael Meeks 
Date:   Sat Jun 28 14:19:30 2014 +0100

vcl: don't do expensive desktop probing in headless mode.

Change-Id: I10d6493997b4f3bfab769340c990c01a26f3da20

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index f9fee0b..80ca354 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1599,7 +1599,13 @@ bool Application::GetShowImeStatusWindowDefault()
 
 const OUString& Application::GetDesktopEnvironment()
 {
-return SalGetDesktopEnvironment();
+if (IsHeadlessModeEnabled())
+{
+static OUString aNone("none");
+return aNone;
+}
+else
+return SalGetDesktopEnvironment();
 }
 
 void Application::AddToRecentDocumentList(const OUString& rFileUrl, const 
OUString& rMimeType, const OUString& rDocumentService)
commit 879aa54e895a56cb65f93ae98e6a9e7b08981a47
Author: Michael Meeks 
Date:   Sat Jun 28 14:18:32 2014 +0100

configmgr: accelerate simple config key fetches.

Avoid heap allocating UNO object wrappers for the underlying Node
structures only to convert to Any and immediately free them agian
when we can.

Change-Id: Iae4612e9602f872f5d8cca2e516df594c9f1118c

diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 665b3cd..6aeabb4 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -344,6 +344,42 @@ sal_Bool Access::hasElements() throw 
(css::uno::RuntimeException, std::exception
 return !getAllChildren().empty(); //TODO: optimize
 }
 
+bool Access::getByNameFast(const OUString & name, css::uno::Any & value)
+{
+bool bGotValue = false;
+rtl::Reference< ChildAccess > child;
+
+if (getNode()->kind() != Node::KIND_LOCALIZED_PROPERTY)
+{ // try to get it directly
+ModifiedChildren::iterator i(modifiedChildren_.find(name));
+if (i != modifiedChildren_.end())
+{
+child = getModifiedChild(i);
+if (child.is())
+{
+value = child->asValue();
+bGotValue = true;
+}
+}
+else
+{
+rtl::Reference< Node > node(getNode()->getMember(name));
+if (!node.is())
+return false;
+bGotValue = ChildAccess::asSimpleValue(node, value, components_);
+}
+}
+
+if (!bGotValue)
+{
+child = getChild(name);
+if (!child.is())
+return false;
+value = child->asValue();
+}
+ret

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

2014-06-30 Thread Michael Meeks
 configmgr/source/access.hxx   |9 +-
 configmgr/source/components.hxx   |3 
 configmgr/source/config_map.hxx   |   35 
 configmgr/source/data.hxx |4 
 configmgr/source/nodemap.hxx  |4 
 sw/inc/docstyle.hxx   |   26 +++---
 sw/source/uibase/app/docstyle.cxx |   60 +++---
 writerfilter/source/ooxml/OOXMLFactory.cxx|   74 +-
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |2 
 writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx|   37 -
 writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx|7 -
 11 files changed, 150 insertions(+), 111 deletions(-)

New commits:
commit 4771c8836a3e4d5e8ac25a7212293a13fb1e73ba
Author: Michael Meeks 
Date:   Sat Jun 28 22:59:33 2014 +0100

writerfilter: use XFastAttributes more efficiently.

Don't duplicate UTF8 as UCS2 before converting to integers.
Don't double convert every attribute, and allocate it twice.

Change-Id: Ibb15d703f011865dac8eb72f18408a5d62b60d96

diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx 
b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 597631b..c45b4f5 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 #include "OOXMLFactory.hxx"
 #include "OOXMLFastHelper.hxx"
 
@@ -131,59 +132,61 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * 
pHandler,
 AttributeToResourceMap::const_iterator aIt;
 AttributeToResourceMap::const_iterator aEndIt = pMap->end();
 
+assert( dynamic_cast< sax_fastparser::FastAttributeList *>( 
Attribs.get() ) != NULL );
+sax_fastparser::FastAttributeList *pAttribs;
+pAttribs = static_cast< sax_fastparser::FastAttributeList *>( 
Attribs.get() );
+
 for (aIt = pMap->begin(); aIt != aEndIt; ++aIt)
 {
-Id nId = (*pTokenToIdMap)[aIt->first];
-if (Attribs->hasAttribute(aIt->first))
+sal_Int32 nToken = aIt->first;
+if (pAttribs->hasAttribute(nToken))
 {
+Id nId = (*pTokenToIdMap)[nToken];
+
 switch (aIt->second.m_nResource)
 {
 case RT_Boolean:
 {
-OUString aValue(Attribs->getValue(aIt->first));
-
OOXMLFastHelper::newProperty(pHandler, nId, aValue);
-
-OOXMLValue::Pointer_t pValue(new 
OOXMLBooleanValue(aValue));
-pFactory->attributeAction(pHandler, aIt->first, 
pValue);
+const char *pValue = "";
+pAttribs->getAsChar(nToken, pValue);
+OOXMLValue::Pointer_t xValue(new 
OOXMLBooleanValue(pValue));
+pHandler->newProperty(nId, xValue);
+pFactory->attributeAction(pHandler, nToken, xValue);
 }
 break;
 case RT_String:
 {
-OUString aValue(Attribs->getValue(aIt->first));
-OOXMLFastHelper::newProperty
-(pHandler, nId, aValue);
-
-OOXMLValue::Pointer_t pValue(new 
OOXMLStringValue(aValue));
-pFactory->attributeAction(pHandler, aIt->first, 
pValue);
+OUString aValue(pAttribs->getValue(nToken));
+OOXMLValue::Pointer_t xValue(new 
OOXMLStringValue(aValue));
+pHandler->newProperty(nId, xValue);
+pFactory->attributeAction(pHandler, nToken, xValue);
 }
 break;
 case RT_Integer:
 {
-OUString aValue(Attribs->getValue(aIt->first));
-OOXMLFastHelper::newProperty
-(pHandler, nId, aValue);
-
-OOXMLValue::Pointer_t pValue(new 
OOXMLIntegerValue(aValue));
-pFactory->attributeAction(pHandler, aIt->first, 
pValue);
+sal_Int32 nValue;
+pAttribs->getAsInteger(nToken,nValue);
+OOXMLValue::Pointer_t xValue(new 
OOXMLIntegerValue(nValue));
+pHandler->newProperty(nId, xValue);
+pFactory->attributeAction(pHandler, nToken, xValue);
 }
 break;
 case RT_Hex:
 {
-OUString aValue(Attribs->getValue(aIt->first));
- 

minutes of ESC call ...

2014-08-21 Thread Michael Meeks
* Present:
+ Cloph, Stephan, Andras, David, Michael M, Eike, Caolan, Robinson,
  Norbert, Bjoern, Fridrich, Thorsten, Lionel, Miklos, Markus, Michael S,
  Adam, Muthu
 
* Completed Action Items:
+ Ask for 1-2 more dev-list moderators & re-visit next-week (Michael)
[ currently quite quiet - large wave has vanished ].
+ help Cloph with the quickstarter disabling (Andras)
https://bugs.freedesktop.org/show_bug.cgi?id=80927
  https://gerrit.libreoffice.org/#/c/10817/
  https://gerrit.libreoffice.org/#/c/10669/
Patches in gerrit to disable quickstarter completely. No objections
to have that included; all merged - will be in 4.3.1 release.
 
* Pending Action Items:
+ ask UX advise wrt. wrench icons (revert or not ?) (Astron)
+ blog about the sad realities of web plugins (Bjoern)
+ open-source newer Synezip tests / speak at the conference (Umesh)
+ contact Michael / the list when students show up (Jan Marek)
 
* GSOC Update (Fridrich)
+ Evaluation deadline is tomorrow - but everything is filed already
+ 100% pass-rate, should be grateful for that.
+ not a bad year at all.
AI: + Get work / screenshots into the 4.4 feature list (Students)
https://wiki.documentfoundation.org/ReleaseNotes/4.4
+ Integrated PageMaker filter, 0.0.1 release
+ Linked frames - looking good
+ refactor huge objects -- looking fine, good progress there
+ Tiled rendering excellent - for calc still pending
 
* Release Engineering update (Christian)
+ 4.3.1 RC2 somewhat delayed / tagging tomorrow
+ 4.2.7 - due in week 40 - 29th Sept freeze.
+ Potential for new incremental releases sooner.
+ Android Remote
 
* FOSDEM room
+ deadline for dev room proposal, September, 15th
AI: + reach out to work out what to do (Thorsten)
 
* OSX 10.6 for 4.4 ? (Michael)
+ need 10.8 for OpenGL support (Markus)
+ Goal is to go there (Norbert)
AI: + fix the 4.4 feature page (Norbert):
   + https://wiki.documentfoundation.org/ReleaseNotes/4.4#Mac_OS_X
 
* Crashtest update (Markus)
+ 
http://dev-builds.libreoffice.org/crashtest/66c6d1ef204f3507e7663a1b8b1be05b9ec71092/
+ new results look quite good, fixing appreciated.
+ script will from now on mail the dev list when it finishes
+ Caolan old CVE documents through CERT's 'Basic File Fuzzer'
+ doing a number of fixes there.
+ option to run these in an automated way
+ need someone to tend Markus' builds while he's away - 5x weeks.
+ check that the VM is still running, not hanging in an infinite
  loop etc.
AI: + take care of crash-test / VM maintenance in September/October (Miklos)
 
* Certification Committee (Stephan/Bjoern/Kendy)
+ waiting until ~September after the conf.
 
* USA Hackfest update (Michael)
+ Boston Hackfest
+ Amazon / VMs were awesome - thanks Cloph.
+ great way to ge started.
 
* Hackfests (Bjoern)
+ Seattle 'Libre-Fest' (Robinson)
https://wiki.documentfoundation.org/Events/2014/Seattle_LibreFest
+ October 26, 2014
+ Bug-triaging/Intro-to-community event
+ Following SeaGL conference
+ Munich hack-fest (Jan-Marek):
http://www.it-muenchen-blog.de/2014/07/bug-squashing-party-2014/
+ will have a BSP come-together; if someone says they're coming
  just show up etc.
   + November 21st-23rd, 2014
   https://wiki.debian.org/BSP/2014/11/de/Munich
   + we should drop by with 2 or 3 developers, if possible
+ Toulouse Hackfest ...
+ Confirmed for Nov. 15-16th
+ more details: 
https://wiki.documentfoundation.org/Hackfest/Toulouse2014
+ Be great to have -really- easy easy hacks for devs (Bjoern)
 
* ~25 LiMux Mail Merge patches:
+ 
https://gerrit.libreoffice.org/#/q/owner:%22Jan-Marek+Glogowski%22+status:open,n,z
+ volunteer reviewers wanted ;)
+ is it sufficiently bad it can't get worse ? (Michael)
+ nearly - except its so bad it is also fragile (Bjoern)
+ Bjoern + Michael S to have a look at some stage.
 
* QA (Robinson)
+ UNCONFIRMED count increasing. Recruiting again.
+ Multiple q's/bugs filed re: video playback support in Impress
  https://bugs.freedesktop.org/show_bug.cgi?id=79546 - OSX (plays in QT, 
not in LO)
+ Do we document our policy for video/audio playback? (using system 
framework)
+ Status of VLC support?
+ 
https://wiki.documentfoundation.org/Development/GSoC/Successfully_Implemented_Ideas#VLC_integration
+ Different support on different distros (Bjoern)
+ VLC is not ideal - not a multimedia framework;
   eg. playing live video to thumbnail etc.
+ We use the native platform multimedia framework (Michael)
+ There is no good cross-platform mm format that works with all
  codecs out of the box.
+ V

Fwd: Performance samples & de-virtualization for LibreOffice ...

2014-08-22 Thread Michael Meeks
Hi guys,

So Jan has been doing awesome work as normal on pre-linking and
optimization =) It'd be great to let others see / get involved / help
out there, hence fwding it to the list; prolly a better place for the
discussion.

Thanks Jan !

Michael.

 Forwarded Message From: Jan Hubicka 
To: Michael Meeks 
Cc: Jan Hubicka , Matúš Kukan

Subject: Re: Performance samples for LibreOffice ...
Date: Thu, 21 Aug 2014 15:56:26 +0200

> Hi Jan,
> 
>   Any chance I can share this with the list ?
...
Feel free to share the list.  I am not sure if you want to annotate all
types/methods from the list (because the fact they have no derived types may
depend on configuration/plugins/etc)- I would sort of expect these to need
manual inspection...

Honza
...
> On Thu, 2014-08-21 at 05:58 +0200, Jan Hubicka wrote:
> > Hi,
> > after another break I got back to play with libreoffice.  I still did not
> > worked out how to build LO with profile feedback (avoid the TLS model 
> > conflict)
> > but fixed GCC mainline to build it at least and got the compilation 
> > noticeably
> > faster ;)
> > 
> > I was recently working on warning that would suggest adding final keywords 
> > to
> > types and methods to allow better devirtualization. Here are warnings I get 
> > for
> > libmerge (from February tree, sorry)
> > http://kam.mff.cuni.cz/~hubicka/final-warnings-libreoffice.txt
> > (search also for -Wsuggest-final-methods)
> > 
> > Overall I get:
> > 107730 polymorphic calls, 0 devirtualized, 20787 speculatively 
> > devirtualized, 31324 cold
> > 53983 have multiple targets, 0 overwritable, 0 already speculated (0 agree, 
> > 0 disagree), 1 external, 351 not defined, 0 artificial
> > 
> > good portion of the 20787 calls that do get devirtualized would be turned 
> > to direct calls
> > if all the annotations was added :)
> > 
> > Honza
> 

On Fri, 2014-08-22 at 08:11 +0200, Jan Hubicka wrote:
> Michael,
> > I also played bit more with the profile guided optimization problem.  The 
> > issue is that all unit tests fails
> > becuase of "cannot load any more object with static TLS".  I do not really 
> > get why this happens - while GCC
> > profling runtime does use TLS, I am quite sure it is global-dynamic. Anyway 
> > a hack around is:
> > CPPUNITTRACE="LD_PRELOAD=/aux/hubicka/libreoffice/50-fdo/instdir/program/libmergedlo.so"
> > 
> > This makes dynamic linker to allocate enought of the DTV slosts.  Still 
> > easier than recompiling glibc with increased
> > DTV surplus.
> > 
> > Any idea where are the DTV slots go?
> 
> Actual main reason to email you was because I wrote a bit about the final 
> warnings here
> http://hubicka.blogspot.ca/2014/08/devirtualization-in-c-part-5-asking.html
> 
> I would be happy to know if they seem useful for LO.


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

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


[Libreoffice-commits] core.git: 4 commits - editeng/source include/editeng include/unotools sw/inc sw/source unotools/source vcl/inc vcl/source

2014-08-22 Thread Michael Meeks
 editeng/source/misc/SvXMLAutoCorrectImport.cxx |2 
 editeng/source/misc/svxacorr.cxx   |   11 +--
 include/editeng/svxacorr.hxx   |2 
 include/unotools/fontdefs.hxx  |2 
 sw/inc/swacorr.hxx |2 
 sw/source/core/sw3io/swacorr.cxx   |4 -
 unotools/source/misc/fontcvt.cxx   |   10 +--
 unotools/source/misc/fontdefs.cxx  |   11 ++-
 vcl/inc/PhysicalFontCollection.hxx |1 
 vcl/source/font/PhysicalFontCollection.cxx |   76 ++---
 vcl/source/font/PhysicalFontFamily.cxx |   11 +++
 vcl/source/gdi/font.cxx|4 -
 vcl/source/outdev/font.cxx |   17 +
 13 files changed, 74 insertions(+), 79 deletions(-)

New commits:
commit 8d6697587776136f3121733e1c29d4200720dbd9
Author: Michael Meeks 
Date:   Fri Aug 22 00:37:46 2014 +0100

fdo#79761 - avoid re-canonicalising each font name on clone repeatedly.

Change-Id: I5b32787943ab3f824249359e9924eae25ba5783b

diff --git a/vcl/source/font/PhysicalFontFamily.cxx 
b/vcl/source/font/PhysicalFontFamily.cxx
index 3cba470..6307ac0 100644
--- a/vcl/source/font/PhysicalFontFamily.cxx
+++ b/vcl/source/font/PhysicalFontFamily.cxx
@@ -281,6 +281,10 @@ void PhysicalFontFamily::GetFontHeights( std::set& 
rHeights ) const
 void PhysicalFontFamily::UpdateCloneFontList( PhysicalFontCollection& 
rFontCollection,
   bool bScalable, bool bEmbeddable 
) const
 {
+// This is rather expensive to do per face.
+OUString aFamilyName = GetEnglishSearchFontName( GetFamilyName() );
+PhysicalFontFamily* pFamily = rFontCollection.FindOrCreateFamily( 
aFamilyName );
+
 for( PhysicalFontFace* pFace = mpFirst; pFace; pFace = 
pFace->GetNextFace() )
 {
 if( bScalable && !pFace->IsScalable() )
@@ -289,7 +293,12 @@ void PhysicalFontFamily::UpdateCloneFontList( 
PhysicalFontCollection& rFontColle
 continue;
 
 PhysicalFontFace* pClonedFace = pFace->Clone();
-rFontCollection.Add( pClonedFace );
+
+assert( pClonedFace->GetFamilyName() == GetFamilyName() );
+assert( rFontCollection.FindOrCreateFamily( GetEnglishSearchFontName( 
pClonedFace->GetFamilyName() ) ) == pFamily );
+
+if (! pFamily->AddFontFace( pClonedFace ) )
+delete pClonedFace;
 }
 }
 
commit 46ac7d60dde9a09239709716efcfcf66dd0e0a85
Author: Michael Meeks 
Date:   Fri Aug 22 00:08:04 2014 +0100

font lookup - cleanup GetEnglishSearchName function signature.

Change-Id: I6e3ca358d88e0285fe6e07b0617f3078a5edb857

diff --git a/include/unotools/fontdefs.hxx b/include/unotools/fontdefs.hxx
index 6e20b88..7ac715e 100644
--- a/include/unotools/fontdefs.hxx
+++ b/include/unotools/fontdefs.hxx
@@ -81,7 +81,7 @@ public:
 
 UNOTOOLS_DLLPUBLIC OUString GetNextFontToken( const OUString& rTokenStr, 
sal_Int32& rIndex );
 
-UNOTOOLS_DLLPUBLIC void GetEnglishSearchFontName( OUString& rName );
+UNOTOOLS_DLLPUBLIC OUString GetEnglishSearchFontName( const OUString& rName );
 
 /** Determine if the font is the special Star|Open Symbol font
 
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
index 1cb82c1..f91ab9a 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -1412,11 +1412,10 @@ static ConvertChar aImplStarSymbolCvt = { NULL, 
"StarBats", ImplStarSymbolToStar
 const ConvertChar* ConvertChar::GetRecodeData( const OUString& rOrgFontName, 
const OUString& rMapFontName )
 {
 const ConvertChar* pCvt = NULL;
-OUString aOrgName( rOrgFontName );
-GetEnglishSearchFontName( aOrgName );
-OUString aMapName( rMapFontName );
+
 // clean up and lowercase font name
-GetEnglishSearchFontName( aMapName );
+OUString aOrgName( GetEnglishSearchFontName( rOrgFontName ) );
+OUString aMapName( GetEnglishSearchFontName( rMapFontName ) );
 
 if( aMapName == "starsymbol"
  || aMapName == "opensymbol" )
@@ -1457,8 +1456,7 @@ FontToSubsFontConverter CreateFontToSubsFontConverter( 
const OUString& rOrgName,
 {
 const ConvertChar* pCvt = NULL;
 
-OUString aName = rOrgName;
-GetEnglishSearchFontName( aName );
+OUString aName = GetEnglishSearchFontName( rOrgName );
 
 if ( nFlags & FONTTOSUBSFONT_IMPORT )
 {
diff --git a/unotools/source/misc/fontdefs.cxx 
b/unotools/source/misc/fontdefs.cxx
index 4a45fce..3b6b722 100644
--- a/unotools/source/misc/fontdefs.cxx
+++ b/unotools/source/misc/fontdefs.cxx
@@ -320,8 +320,10 @@ static ImplLocalizedFontName aImplLocalizedNamesList[] =
 {   NULL,   NULL },
 };
 
-void GetEnglishSearchFontName( OUString& rName )
+OUString GetEnglishSearchFontName( const OUString& rInName )
 {
+OUString rName( rInName );
+
   

Re: Performance samples for LibreOffice ...

2014-08-22 Thread Michael Meeks
Hi Matus,

Any chance you can fix / commit this one ? :-)

Jan - wow - that is a nice error =) are there any other ODR issues ?
they habitually bite us hard so ... great to get libmerged debugged even
more. CC'ing the list too.

Thanks !

Michael.


On Fri, 2014-08-22 at 17:05 +0200, Jan Hubicka wrote:
> Hi,
> this is another warning that may be worth fixing
> /aux/hubicka/libreoffice/sc/source/ui/vba/vbastyles.cxx:68:7: warning: type 
> �struct EnumWrapper� violates one definition rule [-Wodr]
>  class EnumWrapper : public EnumerationHelper_BASE
>^
> /aux/hubicka/libreoffice/sc/source/ui/vba/vbaoleobjects.cxx:74:7: note: a 
> different type is defined in another translation unit
>  class EnumWrapper : public EnumerationHelper_BASE
>^
> /aux/hubicka/libreoffice/sc/source/ui/vba/vbastyles.cxx:70:50: note: the 
> first difference of corresponding definitions is field �m_xIndexAccess�
>  uno::Reference m_xIndexAccess;
>   ^
> /aux/hubicka/libreoffice/sc/source/ui/vba/vbaoleobjects.cxx:77:43: note: a 
> field with different name is defined in another translation unit
>  uno::Reference m_xParent;
> 

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

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


minutes of ESC call ...

2014-09-01 Thread Michael Meeks
* Present:
+ Bjoern, Andras, Jan-Marek G, Michael M, Christian, Stephan, Muthu,
  David, Eike, Kohei, Michael S, Markus, Miklos, Robinson, Cedric, Lionel
 
* Completed Action Items:
+ contact Michael / the list when students show up (Jan Marek)
   [ students mostly coming to Bern for the conference ]
+ fix the 4.4 feature page (Norbert):
   + https://wiki.documentfoundation.org/ReleaseNotes/4.4#Mac_OS_X
+ speak at the conference on testing (Umesh)
+ trained in crash-test / VM maintenance for September/October (Miklos)
 
* Pending Action Items:
+ ask UX advise wrt. wrench icons (revert or not ?) (Astron)
+ blog about the sad realities of web plugins (Bjoern)
+ open-source newer Synezip tests (Umesh)
+ get work / screenshots into the 4.4 feature list (Mentors ask students)
+ reach out / plan wrt. FOSDEM dev-rooms (Thorsten)
 
* Release Engineering update (Christian)
+ 4.2.6-security release announced
+ 4.3.1 released early too
+ build issues with the VM, requiring re-starts.
+ rest of release schedule un-affected
+ 4.3.2 - branch off at the conference.
+ 4.2.7 - due in week 40 - 29th Sept freeze.
+ Potential for new incremental releases sooner.
+ Android Remote
+ pushed changes to the build-system to use gradle
+ in future, will be created using Android Studio.
+ now rather easier to hack on.
 
* emergency release numbering policy (Bjoern/Eike)
+ if we always bump micro (major.minor.micro.nano)
  then we have problems with bugzilla "fixed in "
  comments, not just attribute (Eike)
+ potentially update nano - as in 4.2.6.3 - no text changes
+ for this OOB release, recommend people patch don't ver. bump
  themselves if necessary.
 
* GSOC Update (Cedric)
+ all set.
+ Remaining things to do:
+ Students should send a small blog / links etc. of what they
  did to Cedric so he can write a summary post.
+ Google re-blogs this often, so - prettiness is mandatory.
+ if help needed wrt. tar-ball creation; it's easy see here:
+ https://wiki.documentfoundation.org/Development/GSoc#Code_submission
 
* Crashtest update (Markus)
+ run out of disk space -- new build will take 5 days
+ freed up 15Gb.
+ Miklos will take over in September/October
+ 
http://dev-builds.libreoffice.org/crashtest/66c6d1ef204f3507e7663a1b8b1be05b9ec71092/
+ new results look quite good, fixing appreciated.
 
* Munich update (Jan-Marek)
+ student interns arrived
+ managed to get them to the conference; 9x people there
+ patches in gerrit for review already
+ pleased with css::util vs. utl and uno-tools changes (Miklos)
+ #libreoffice-lhm has people there.
+ still reviewing mail-merge patches (Bjoern)
+ 
https://gerrit.libreoffice.org/#/q/owner:%22Jan-Marek+Glogowski%22+status:open,n,z
 
* Certification Committee (Stephan/Bjoern/Kendy)
+ waiting until ~September after the conf.
 
* Conference preparation (Moggi)
+ Agenda for face-to-face - 5pm ESC meeting.
   + UX work
   + QA / bug trends review
   + looming design disasters
 
* Hackfests (Bjoern)
+ Seattle 'Libre-Fest' (Robinson)
https://wiki.documentfoundation.org/Events/2014/Seattle_LibreFest
+ October 26, 2014
+ Bug-triaging/Intro-to-community event
+ Following SeaGL conference
+ Munich hack-fest (Jan-Marek):
http://www.it-muenchen-blog.de/2014/07/bug-squashing-party-2014/
+ will have a BSP come-together; if someone says they're coming
  just show up etc.
   + November 21st-23rd, 2014
   https://wiki.debian.org/BSP/2014/11/de/Munich
   + we should drop by with 2 or 3 developers, if possible
+ Toulouse Hackfest ...
+ Confirmed for Nov. 15-16th
+ more details: 
https://wiki.documentfoundation.org/Hackfest/Toulouse2014
+ Be great to have -really- easy easy hacks for devs (Bjoern)
 
* QA (Robinson)
+ UNCONFIRMED count up a bit last week,
+ some interesting new regressions
+ Multimedia on OS/X - changed
   + OS/X moved from quicktime to AVFoundation
   + a number of users with embedded multimedia not working.
   + would love a concise bug report (Michael)
+ Robinson's Mac arrived for triage
+ Speech Editor Siri of MAC OS 10.9.4 does not work with Libreoffice 4.3.0.3
  https://bugs.freedesktop.org/show_bug.cgi?id=81759
+ lower case greek alphabet missing in localized Math symbol table
  https://bugs.freedesktop.org/show_bug.cgi?id=80650
+ S.Storti filing a number of writer / RTF issues recently. (Miklos)
 
* UX Update (Astron / Mirek)
 
* QA stats:
  + https://bugs.freedesktop.org/page.cgi?id=weekly-bug-summary.html
+153-98(+55 overall)
many thanks to the top bug squashers:
Maxim Monastirsky9
Urmas7
Eike Rathke  7
A

  1   2   3   4   5   6   7   8   9   10   >