Diana Sedlak License Statement

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


[Libreoffice-commits] core.git: Branch 'feature/ui-test' - 83 commits - bin/gbuild-to-ide comphelper/qa comphelper/source include/comphelper include/sfx2 include/svtools include/vcl Makefile.in offapi

2016-06-17 Thread Markus Mohrhard
Rebased ref, commits from common ancestor:
commit 7133422859e1d47905acdaa45c1f81552c15c2b2
Author: Markus Mohrhard 
Date:   Thu May 26 12:44:34 2016 +0200

uitest: make the calc keycode demo a bit easier to understand

Change-Id: Ia24747994dc45b8c6636aee37a55d2ba4672993a

diff --git a/uitest/calc_tests/gridwindow.py b/uitest/calc_tests/gridwindow.py
index ae16e40..1f01ec9 100644
--- a/uitest/calc_tests/gridwindow.py
+++ b/uitest/calc_tests/gridwindow.py
@@ -55,10 +55,11 @@ def special_keys(xContext):
 selectProps = mkPropertyValues({"CELL": "C3"})
 xGridWindow.executeAction("SELECT", selectProps)
 
-# TODO: how to handle the enter
 typeProps = mkPropertyValues({"KEYCODE": "CTRL+DOWN"})
 xGridWindow.executeAction("TYPE", typeProps)
 
+time.sleep(2)
+
 ui_test.close_doc()
 
 # vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 0522ffc54a798849e967650fa07a2ced00632a0c
Author: Markus Mohrhard 
Date:   Thu May 26 12:43:23 2016 +0200

uitest: add more impress tests

Change-Id: I89bd0af49e530382f0201a108f8798f9a9d689e3

diff --git a/uitest/impress_tests/start.py b/uitest/impress_tests/start.py
index 0c5ef2a..c817cfe 100644
--- a/uitest/impress_tests/start.py
+++ b/uitest/impress_tests/start.py
@@ -29,6 +29,86 @@ def start_impress(xContext):
 
 ui_test.create_doc_in_start_center("impress")
 
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+xEditWin.executeAction("SET", mkPropertyValues({"ZOOM": "200"}))
+
+print(xEditWin.getChildren())
+
+time.sleep(5)
+
+ui_test.close_doc()
+
+def select_page(xContext):
+xUITest = xContext.ServiceManager.createInstanceWithContext(
+"org.libreoffice.uitest.UITest", xContext)
+
+ui_test = UITest(xUITest, xContext)
+
+ui_test.create_doc_in_start_center("impress")
+
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+
+time.sleep(10)
+print(get_state_as_dict(xEditWin))
+
+xEditWin.executeAction("GOTO", mkPropertyValues({"PAGE": "2"}))
+
+time.sleep(5)
+
+print(get_state_as_dict(xEditWin))
+
+ui_test.close_doc()
+
+def select_text(xContext):
+xUITest = xContext.ServiceManager.createInstanceWithContext(
+"org.libreoffice.uitest.UITest", xContext)
+
+ui_test = UITest(xUITest, xContext)
+
+ui_test.create_doc_in_start_center("impress")
+
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+
+time.sleep(10)
+
+print(get_state_as_dict(xEditWin))
+
+ui_test.close_doc()
+
+def select_object(xContext):
+xUITest = xContext.ServiceManager.createInstanceWithContext(
+"org.libreoffice.uitest.UITest", xContext)
+
+ui_test = UITest(xUITest, xContext)
+
+ui_test.create_doc_in_start_center("impress")
+
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+
+xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed 
Drawinglayer object 1"}))
+time.sleep(2)
+xEditWin.executeAction("DESELECT", tuple())
+
+time.sleep(4)
+
+print(get_state_as_dict(xEditWin))
+
 ui_test.close_doc()
 
 # vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 36340321ea9eb076746c3e982b9d95b2d547dcf0
Author: Markus Mohrhard 
Date:   Mon May 23 05:22:33 2016 +0200

uitest: support more impress operations

Change-Id: I74ab526dabbee1f8c203274f187c065d9fb413fd

diff --git a/sd/source/ui/inc/uiobject.hxx b/sd/source/ui/inc/uiobject.hxx
index f8b7e57..8e3d479 100644
--- a/sd/source/ui/inc/uiobject.hxx
+++ b/sd/source/ui/inc/uiobject.hxx
@@ -16,6 +16,9 @@ class DrawViewShell;
 
 }
 
+class SdrObject;
+class SdrPageView;
+
 class ImpressWindowUIObject : public WindowUIObject
 {
 public:
@@ -27,6 +30,8 @@ public:
 virtual void execute(const OUString& rAction,
 const StringMap& rParameters) override;
 
+virtual std::set get_children() const override;
+
 static std::unique_ptr create(vcl::Window* pWindow);
 
 protected:
@@ -37,7 +42,11 @@ private:
 
 VclPtr mxWindow;
 
-sd::DrawViewShell* getViewShell();
+sd::DrawViewShell* getViewShell() const;
+
+SdrObject* getObject(const OUString& rName);
+
+SdrPageView* getPageView();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/uitest/uiobject.cxx b/sd/source/ui/uitest/uiobject.cxx
index 90535c6..a8c0227 100644
--- a/sd/source/ui/uitest/uiobject.cxx
+++ b/sd/source/ui/uitest/uiobject.cxx
@@ -11,6 +11,7 @@
 
 #include "Window.hxx"
 #include "DrawViewShell.hxx"
+#include "sdp

[Libreoffice-commits] core.git: Branch 'feature/ui-test' - 83 commits - bin/gbuild-to-ide comphelper/qa comphelper/source include/comphelper include/sfx2 include/svtools include/vcl Makefile.in offapi

2016-06-17 Thread Markus Mohrhard
Rebased ref, commits from common ancestor:
commit 1f94db1280568dbb89def9b7ad37cf4b8ebbac58
Author: Markus Mohrhard 
Date:   Thu May 26 12:44:34 2016 +0200

uitest: make the calc keycode demo a bit easier to understand

Change-Id: Ia24747994dc45b8c6636aee37a55d2ba4672993a

diff --git a/uitest/calc_tests/gridwindow.py b/uitest/calc_tests/gridwindow.py
index ae16e40..1f01ec9 100644
--- a/uitest/calc_tests/gridwindow.py
+++ b/uitest/calc_tests/gridwindow.py
@@ -55,10 +55,11 @@ def special_keys(xContext):
 selectProps = mkPropertyValues({"CELL": "C3"})
 xGridWindow.executeAction("SELECT", selectProps)
 
-# TODO: how to handle the enter
 typeProps = mkPropertyValues({"KEYCODE": "CTRL+DOWN"})
 xGridWindow.executeAction("TYPE", typeProps)
 
+time.sleep(2)
+
 ui_test.close_doc()
 
 # vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 809c127860c4b28bb7930ec614d61faf2f9994db
Author: Markus Mohrhard 
Date:   Thu May 26 12:43:23 2016 +0200

uitest: add more impress tests

Change-Id: I89bd0af49e530382f0201a108f8798f9a9d689e3

diff --git a/uitest/impress_tests/start.py b/uitest/impress_tests/start.py
index 0c5ef2a..c817cfe 100644
--- a/uitest/impress_tests/start.py
+++ b/uitest/impress_tests/start.py
@@ -29,6 +29,86 @@ def start_impress(xContext):
 
 ui_test.create_doc_in_start_center("impress")
 
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+xEditWin.executeAction("SET", mkPropertyValues({"ZOOM": "200"}))
+
+print(xEditWin.getChildren())
+
+time.sleep(5)
+
+ui_test.close_doc()
+
+def select_page(xContext):
+xUITest = xContext.ServiceManager.createInstanceWithContext(
+"org.libreoffice.uitest.UITest", xContext)
+
+ui_test = UITest(xUITest, xContext)
+
+ui_test.create_doc_in_start_center("impress")
+
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+
+time.sleep(10)
+print(get_state_as_dict(xEditWin))
+
+xEditWin.executeAction("GOTO", mkPropertyValues({"PAGE": "2"}))
+
+time.sleep(5)
+
+print(get_state_as_dict(xEditWin))
+
+ui_test.close_doc()
+
+def select_text(xContext):
+xUITest = xContext.ServiceManager.createInstanceWithContext(
+"org.libreoffice.uitest.UITest", xContext)
+
+ui_test = UITest(xUITest, xContext)
+
+ui_test.create_doc_in_start_center("impress")
+
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+
+time.sleep(10)
+
+print(get_state_as_dict(xEditWin))
+
+ui_test.close_doc()
+
+def select_object(xContext):
+xUITest = xContext.ServiceManager.createInstanceWithContext(
+"org.libreoffice.uitest.UITest", xContext)
+
+ui_test = UITest(xUITest, xContext)
+
+ui_test.create_doc_in_start_center("impress")
+
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+
+xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed 
Drawinglayer object 1"}))
+time.sleep(2)
+xEditWin.executeAction("DESELECT", tuple())
+
+time.sleep(4)
+
+print(get_state_as_dict(xEditWin))
+
 ui_test.close_doc()
 
 # vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 52cf5a170464c307050a0de849c5f8928dfcdb37
Author: Markus Mohrhard 
Date:   Mon May 23 05:22:33 2016 +0200

uitest: support more impress operations

Change-Id: I74ab526dabbee1f8c203274f187c065d9fb413fd

diff --git a/sd/source/ui/inc/uiobject.hxx b/sd/source/ui/inc/uiobject.hxx
index f8b7e57..8e3d479 100644
--- a/sd/source/ui/inc/uiobject.hxx
+++ b/sd/source/ui/inc/uiobject.hxx
@@ -16,6 +16,9 @@ class DrawViewShell;
 
 }
 
+class SdrObject;
+class SdrPageView;
+
 class ImpressWindowUIObject : public WindowUIObject
 {
 public:
@@ -27,6 +30,8 @@ public:
 virtual void execute(const OUString& rAction,
 const StringMap& rParameters) override;
 
+virtual std::set get_children() const override;
+
 static std::unique_ptr create(vcl::Window* pWindow);
 
 protected:
@@ -37,7 +42,11 @@ private:
 
 VclPtr mxWindow;
 
-sd::DrawViewShell* getViewShell();
+sd::DrawViewShell* getViewShell() const;
+
+SdrObject* getObject(const OUString& rName);
+
+SdrPageView* getPageView();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/uitest/uiobject.cxx b/sd/source/ui/uitest/uiobject.cxx
index 90535c6..a8c0227 100644
--- a/sd/source/ui/uitest/uiobject.cxx
+++ b/sd/source/ui/uitest/uiobject.cxx
@@ -11,6 +11,7 @@
 
 #include "Window.hxx"
 #include "DrawViewShell.hxx"
+#include "sdp

[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp loolwsd/loolwsd.xml.in loolwsd/test

2016-06-17 Thread Ashod Nakashian
 loolwsd/LOOLWSD.cpp  |7 +++
 loolwsd/loolwsd.xml.in   |5 +
 loolwsd/test/Makefile.am |2 ++
 3 files changed, 14 insertions(+)

New commits:
commit d1d9ec61683b1ed51f1d353fe9544c653aab8938
Author: Ashod Nakashian 
Date:   Wed Jun 15 18:46:13 2016 -0400

loolwsd: max_concurrency setting added

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

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index b210206..052070e 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -23,6 +23,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -1268,6 +1269,12 @@ void LOOLWSD::initialize(Application& self)
 NumPreSpawnedChildren = config().getUInt("num_prespawn_children", 1);
 }
 
+const auto maxConcurrency = 
config().getInt("per_document.max_concurrency");
+if (maxConcurrency > 0)
+{
+setenv("MAX_CONCURRENCY", std::to_string(maxConcurrency).c_str(), 1);
+}
+
 StorageBase::initialize();
 
 ServerApplication::initialize(self);
diff --git a/loolwsd/loolwsd.xml.in b/loolwsd/loolwsd.xml.in
index cb524a8..96c80dc 100644
--- a/loolwsd/loolwsd.xml.in
+++ b/loolwsd/loolwsd.xml.in
@@ -1,5 +1,7 @@
 
 
+
+
 
 
 
@@ -10,6 +12,9 @@
 
 
 1
+
+4
+
 
 loleaflet.html
 
diff --git a/loolwsd/test/Makefile.am b/loolwsd/test/Makefile.am
index f4b49e3..9da80cd 100644
--- a/loolwsd/test/Makefile.am
+++ b/loolwsd/test/Makefile.am
@@ -1,3 +1,5 @@
+# Cap threadpools to 4 threads.
+export MAX_CONCURRENCY=4
 AUTOMAKE_OPTION = serial-tests
 
 check_PROGRAMS = test
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Ashod Nakashian
 loolwsd/test/TileCacheTests.cpp  |   15 
 loolwsd/test/data/calc_render.xls|binary
 loolwsd/test/data/calc_render_0_512x512.3840,0.7680x7680.png |binary
 loolwsd/test/helpers.hpp |   25 ++
 loolwsd/test/httpwstest.cpp  |   41 +++
 5 files changed, 66 insertions(+), 15 deletions(-)

New commits:
commit bf66f7a908431e344f73215b46452ad839ac0a82
Author: Ashod Nakashian 
Date:   Mon Jun 13 20:31:14 2016 -0400

loolwsd: Calc tile rendering test with editing

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

diff --git a/loolwsd/test/TileCacheTests.cpp b/loolwsd/test/TileCacheTests.cpp
index cd50d83..d537616 100644
--- a/loolwsd/test/TileCacheTests.cpp
+++ b/loolwsd/test/TileCacheTests.cpp
@@ -86,21 +86,6 @@ class TileCacheTests : public CPPUNIT_NS::TestFixture
 return v;
 }
 
-static
-std::vector readDataFromFile(std::unique_ptr& file)
-{
-file->seekg(0, std::ios_base::end);
-const std::streamsize size = file->tellg();
-
-std::vector v;
-v.resize(size);
-
-file->seekg(0, std::ios_base::beg);
-file->read(v.data(), size);
-
-return v;
-}
-
 public:
 TileCacheTests()
 : _uri(helpers::getTestServerURI())
diff --git a/loolwsd/test/data/calc_render.xls 
b/loolwsd/test/data/calc_render.xls
new file mode 100644
index 000..be80ea1
Binary files /dev/null and b/loolwsd/test/data/calc_render.xls differ
diff --git a/loolwsd/test/data/calc_render_0_512x512.3840,0.7680x7680.png 
b/loolwsd/test/data/calc_render_0_512x512.3840,0.7680x7680.png
new file mode 100644
index 000..cfc51c8
Binary files /dev/null and 
b/loolwsd/test/data/calc_render_0_512x512.3840,0.7680x7680.png differ
diff --git a/loolwsd/test/helpers.hpp b/loolwsd/test/helpers.hpp
index 54fac74..e5d3984 100644
--- a/loolwsd/test/helpers.hpp
+++ b/loolwsd/test/helpers.hpp
@@ -49,6 +49,31 @@
 namespace helpers
 {
 inline
+std::vector readDataFromFile(const std::string& filename)
+{
+std::ifstream ifs(Poco::Path(TDOC, filename).toString());
+
+std::istream_iterator start(ifs);
+std::istream_iterator end;
+return std::vector(start, end);
+}
+
+inline
+std::vector readDataFromFile(std::unique_ptr& file)
+{
+file->seekg(0, std::ios_base::end);
+const std::streamsize size = file->tellg();
+
+std::vector v;
+v.resize(size);
+
+file->seekg(0, std::ios_base::beg);
+file->read(v.data(), size);
+
+return v;
+}
+
+inline
 void getDocumentPathAndURL(const char* document, std::string& documentPath, 
std::string& documentURL)
 {
 documentPath = Util::getTempFilePath(TDOC, document);
diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp
index cef99e7..6b8cb0f 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -81,6 +82,7 @@ class HTTPWSTest : public CPPUNIT_NS::TestFixture
 CPPUNIT_TEST(testInsertAnnotationWriter);
 CPPUNIT_TEST(testEditAnnotationWriter);
 CPPUNIT_TEST(testInsertAnnotationCalc);
+CPPUNIT_TEST(testCalcEditRendering);
 CPPUNIT_TEST(testFontList);
 
 CPPUNIT_TEST_SUITE_END();
@@ -112,6 +114,7 @@ class HTTPWSTest : public CPPUNIT_NS::TestFixture
 void testInsertAnnotationWriter();
 void testEditAnnotationWriter();
 void testInsertAnnotationCalc();
+void testCalcEditRendering();
 void testFontList();
 
 void loadDoc(const std::string& documentURL);
@@ -1532,6 +1535,44 @@ void HTTPWSTest::testInsertAnnotationCalc()
 CPPUNIT_ASSERT_EQUAL(std::string("textselectioncontent: aaa bbb ccc"), 
res);
 }
 
+void HTTPWSTest::testCalcEditRendering()
+{
+std::string documentPath, documentURL;
+getDocumentPathAndURL("calc_render.xls", documentPath, documentURL);
+Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, 
documentURL);
+
+auto socket = loadDocAndGetSocket(_uri, documentURL);
+
+const std::string x = "5000";
+const std::string y = "165";
+sendTextFrame(socket, "mouse type=buttondown x=" + x + " y=" + y + " 
count=1 buttons=1 modifier=0");
+sendTextFrame(socket, "mouse type=buttonup x=" + x + " y=" + y + " count=1 
buttons=1 modifier=0");
+sendTextFrame(socket, "key type=input char=97 key=0");
+sendTextFrame(socket, "key type=input char=98 key=0");
+sendTextFrame(socket, "key type=input char=99 key=0");
+
+assertResponseLine(socket, "invalidatetiles:", "calcEditRendering ");
+assertResponseLine(socket, "invalidatetiles:", "calcEditRendering ");
+
+const auto req = "tilecombine part=0 width=512 height=512 tileposx=3840 
tileposy=0 tilewidth=7680 tileheight=7680";
+sendTextFrame(socket, req);
+
+const auto

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

2016-06-17 Thread Ashod Nakashian
 sc/source/ui/view/gridwin4.cxx |   13 +
 1 file changed, 13 insertions(+)

New commits:
commit 63f15b36f7a196edb20ce7a0aba6f6b3d28dd652
Author: Ashod Nakashian 
Date:   Sun Jun 12 22:04:50 2016 -0400

LOK: fast tile rendering (cell editing)

Cell editing uses editeng which has a different
set of requirements. The coordinates are in
100th mm and so we have to convert the ofsets
to 100mm.

Change-Id: I278457ffc2273eb786101875c85ddfb959d4c5e3
Reviewed-on: https://gerrit.libreoffice.org/26205
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 0dbffca63191712d9f77297061a3d4651b8410aa)
Reviewed-on: https://gerrit.libreoffice.org/26377
Tested-by: Jenkins 

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index fb2a9c1..3bd 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -943,6 +943,19 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
 // paint the background
 rDevice.DrawRect(rDevice.PixelToLogic(aBackground));
 
+if (bIsTiledRendering)
+{
+auto aOrigin = aOriginalMode.GetOrigin();
+aOrigin.setX(aOrigin.getX() / TWIPS_PER_PIXEL + nScrX);
+aOrigin.setY(aOrigin.getY() / TWIPS_PER_PIXEL + nScrY);
+static const double twipFactor = 15 * 1.7639; // 26.4585
+aOrigin = Point(aOrigin.getX() * twipFactor,
+aOrigin.getY() * twipFactor);
+MapMode aNew = rDevice.GetMapMode();
+aNew.SetOrigin(aOrigin);
+rDevice.SetMapMode(aNew);
+}
+
 // paint the editeng text
 pEditView->Paint(rDevice.PixelToLogic(Rectangle(Point(nScrX, nScrY), 
Size(aOutputData.GetScrW(), aOutputData.GetScrH(, &rDevice);
 rDevice.SetMapMode(MAP_PIXEL);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Ashod Nakashian
 sc/source/ui/view/gridwin4.cxx |3 ++
 svx/source/sdr/contact/objectcontactofpageview.cxx |   28 -
 vcl/source/outdev/bitmap.cxx   |   15 +--
 3 files changed, 43 insertions(+), 3 deletions(-)

New commits:
commit 9d6f4cf26e59b846bcdf4139c6aeb76db5a554f7
Author: Ashod Nakashian 
Date:   Sat Jun 4 21:29:30 2016 -0400

LOK: fast tile rendering (graphics and buttons)

Since embedded graphics and buttons use
absolute coordinates, we set the origin
to be the top-left corner of the tile.
This includes the origin + ScrPos (see
previous patch).

Then, the coordinates of the graphic is
shifted by this amount to make sure it
renders in its relative position to the tile.

This renders embedded graphics and buttons
at their correct position, with some limitations.

Tiles large enough to cover a graphic object
show the graphic object where it should be.
However, rendering a relatively small tile
doesn't render the graphic. This seems to be
an issue with moving the graphic's coordinate
at a later stage than the 2D Processor decides
what objects intersect with the 'view area'
that is rendered.

Another issue is that graphs don't render.
What they seem to suffer is incorrect scale
and a fix coordinates (they show up as tiny
thumbnails at the top-left corner and grow
in proportion to the real graph when resized).

These shall be addressed in a separate patch.

Reviewed-on: https://gerrit.libreoffice.org/26204
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 5f01d80f75dc86b393cc2fdb66b94aece964c674)

Change-Id: I4b71bf5f2e357d1114d46022bc00905ceed0c2f9
Reviewed-on: https://gerrit.libreoffice.org/26376
Tested-by: Jenkins 
Reviewed-by: Ashod Nakashian 

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 315fba7..fb2a9c1 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -821,6 +821,9 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const 
ScTableInfo& rTableI
 auto aOrigin = aOriginalMode.GetOrigin();
 aOrigin.setX(aOrigin.getX() / TWIPS_PER_PIXEL + nScrX);
 aOrigin.setY(aOrigin.getY() / TWIPS_PER_PIXEL + nScrY);
+static const double twipFactor = 15 * 1.7639; // 26.4585
+aOrigin = Point(aOrigin.getX() - aOrigin.getX() / twipFactor,
+aOrigin.getY() - aOrigin.getY() / twipFactor);
 aNew.SetOrigin(aOrigin);
 pContentDev->SetMapMode(aNew);
 }
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx 
b/svx/source/sdr/contact/objectcontactofpageview.cxx
index 6dcd577..cead940 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "eventhandler.hxx"
 #include 
@@ -168,7 +169,7 @@ namespace sdr
 bool bClipRegionPushed(false);
 const vcl::Region& rRedrawArea(rDisplayInfo.GetRedrawArea());
 
-if(!rRedrawArea.IsEmpty())
+if(!rRedrawArea.IsEmpty() && 
!comphelper::LibreOfficeKit::isActive())
 {
 bClipRegionPushed = true;
 pOutDev->Push(PushFlags::CLIPREGION);
@@ -231,6 +232,14 @@ namespace sdr
 
 // transform to world coordinates
 
aViewRange.transform(rTargetOutDev.GetInverseViewTransformation());
+if (comphelper::LibreOfficeKit::isActive())
+{
+const int TWIPS_PER_PIXEL = 15;
+aViewRange = 
basegfx::B2DRange(aViewRange.getMinimum().getX(),
+   
aViewRange.getMinimum().getY(),
+   
aViewRange.getMaximum().getX() * TWIPS_PER_PIXEL,
+   
aViewRange.getMaximum().getY() * TWIPS_PER_PIXEL);
+}
 }
 
 // update local ViewInformation2D
@@ -292,15 +301,32 @@ namespace sdr
 rDisplayInfo.ClearGhostedDrawMode(); // reset, else the 
VCL-paint with the processor will not do the right thing
 pOutDev->SetLayoutMode(ComplexTextLayoutFlags::Default); // 
reset, default is no BiDi/RTL
 
+// Save the map-mode since creating the 2D processor will 
replace it.
+const MapMode aOrigMapMode = pOutDev->GetMapMode();
+
 // create renderer
 std::unique_ptr 
pProcessor2D(
 
drawinglayer::processor2d::createProcessor2DFromOutputDevice(
 rTargetOutDev, getViewInformation2D()));
 
+if (comphelper::LibreOfficeKit::isActive())
+{
+// Re

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

2016-06-17 Thread Ashod Nakashian
 sc/source/ui/view/gridwin4.cxx |  136 +
 1 file changed, 123 insertions(+), 13 deletions(-)

New commits:
commit 9113f17e65b1dafbc178fd269e2967c1e2632f0e
Author: Ashod Nakashian 
Date:   Sat Jun 4 20:39:20 2016 -0400

LOK: fast tile rendering (text only)

For every tile, the bounding columns and
rows are found. The origin of the device
is set to the top-left corner of the
top-most row and left-most column, respectively.

Because tiles don't have to align with a
column or row, the ScrX and ScrY (Screen Position)
coordinates are set to the offset a tile has
to its top-most row and left-most column.

Rendering of text is super fast as the
minimum area is rendered for a given tile.

However, it doesn't work for embedded objects.
This is addressed in a separate patch.

One pending issue with text is when editing.
The text doesn't correctly render while
editing a cell. This is almost certainly
because the edit control is not rendered
at the correct offset (in the middle top
row it can be seen showing up to the right
of where it should be).

Reviewed-on: https://gerrit.libreoffice.org/26203
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit ecc33ce663625ae1114a56fe3d1625c5ed274685)

Change-Id: I6f1ea0aa2f19a7fda926f596a2009290680c593c
Reviewed-on: https://gerrit.libreoffice.org/26375
Tested-by: Jenkins 
Reviewed-by: Ashod Nakashian 

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index aedd922..315fba7 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -468,8 +468,8 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, 
SCROW nY2, ScUpdateMod
 
 ScTableInfo aTabInfo;
 rDoc.FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab,
-nPPTX, nPPTY, false, 
rOpts.GetOption(VOPT_FORMULAS),
-&pViewData->GetMarkData() );
+   nPPTX, nPPTY, false, rOpts.GetOption(VOPT_FORMULAS),
+   &pViewData->GetMarkData() );
 
 Fraction aZoomX = pViewData->GetZoomX();
 Fraction aZoomY = pViewData->GetZoomY();
@@ -588,6 +588,8 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const 
ScTableInfo& rTableI
 bEditMode = false;
 }
 
+const MapMode aOriginalMode = rDevice.GetMapMode();
+
 // define drawing layer map mode and paint rectangle
 MapMode aDrawMode = GetDrawMapMode();
 if (bIsTiledRendering)
@@ -811,10 +813,27 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
 
 pContentDev->SetMapMode(aDrawMode);
 
+// Bitmaps and buttons are in absolute pixel coordinates.
+const MapMode aOrig = pContentDev->GetMapMode();
+if (bIsTiledRendering)
+{
+MapMode aNew = aOrig;
+auto aOrigin = aOriginalMode.GetOrigin();
+aOrigin.setX(aOrigin.getX() / TWIPS_PER_PIXEL + nScrX);
+aOrigin.setY(aOrigin.getY() / TWIPS_PER_PIXEL + nScrY);
+aNew.SetOrigin(aOrigin);
+pContentDev->SetMapMode(aNew);
+}
+
 DrawRedraw( aOutputData, eMode, SC_LAYER_FRONT );
 DrawRedraw( aOutputData, eMode, SC_LAYER_INTERN );
 DrawSdrGrid( aDrawingRectLogic, pContentDev );
 
+if (bIsTiledRendering)
+{
+pContentDev->SetMapMode(aOrig);
+}
+
 if (!bIsInScroll)   // Drawing marks
 {
 if(eMode == SC_UPDATE_CHANGED && aOutputData.SetChangedClip())
@@ -945,6 +964,41 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
 mpNoteMarker->Draw(); // Above the cursor, in drawing map mode
 }
 
+namespace {
+// Find the row/col just -before- the nPosition in pixels and its offset
+inline void mapConservativeToRowCol(ScDocument *pDoc,
+sal_Int32  *nIndex,
+sal_Int32  *nOffset,
+sal_Int32  *nOrigin,
+sal_Int32   nTabNo,
+sal_Int32   nPosition,
+boolbRowNotCol,
+double  nPPTX,
+double  nPPTY)
+{
+long nTmp = 0; // row/col to render for nPosition
+long nLastScrPos = 0, nScrPos = 0;
+while (nScrPos <= nPosition && nTmp < MAXROW)
+{
+long nSize = bRowNotCol ? pDoc->GetRowHeight( nTmp, nTabNo )
+: pDoc->GetColWidth( nTmp, nTabNo );
+if (nSize)
+{
+nLastScrPos = nScrPos;
+nScrPos += ScViewData::ToPixel( nSize, bRowNotCol ? nPPTY : 
nPPTX );
+} // else - FIXME 'skip multiple

Re: [comment] tdf#98110: fix to handling

2016-06-17 Thread Akash Deshpande
Hi Andras,

This was the bug I was trying to work on:
https://bugs.documentfoundation.org/show_bug.cgi?id=98110

As you can see, I had very similar comments such as yours, asking if the
problem was still there.  Then, after getting a confirmation from Dennis
and noting that there may be multiple tasks before the problem is fixed, I
decided to mock up input as described in the ticket.

Also, sorry for introducing a bug.  I will be more careful next time onward
in testing.

In any case, Jan has closed the ticket as WONTFIX.  So I will look for
other tasks.

Thank you all for your time.  I have learnt a lot already and look forward
to taking tasks and working on them without asking too many questions.

Akash


On Fri, Jun 17, 2016 at 5:24 AM, Andras Timar 
wrote:

> Hi Akash,
>
> I ran the script on actual help source files. What problem did you try
> to solve? If it was an artificial, made-up problem, then it's possible
> that you solved it. But the net result of the patch was a regression.
> %PRODUCTNAME strings from source has to be replaced with {{ProductName}}
> in wiki text, otherwise the replacement to LibreOffice will not be made.
>
> Let's see the original report: CommandCtrl on pages.
> History of Draw/Shortcut Keys for Drawing Objects shows, that the last
> update of this page was in 2011.
>
> https://help.libreoffice.org/WikiAction/history/Draw/Shortcut_Keys_for_Drawing_Objects
>
> Example:
> #Press {{KeyCode|CommandCtrl+F6}} to enter the document.
>
> But in my recently generated wiki text file I see (with or without your
> patch):
>
> #Press
> {{System|default={{KeyCode|Ctrl}}|mac={{KeyCode|Command{{KeyCode|+F6}}
> to enter the document.
>
> So, the bug was fixed earlier, but wiki was not updated. Can you please
> repeat my experiment on actual help files, with and without your patch,
> and check, if you get the same as me?
>
> Regards,
> Andras
>
> On 06/17/2016 01:04 AM, Akash Deshpande wrote:
> > Hi Andras,
> >
> > Thank you for the review.
> >
> > Actually, as I noted in my comments, I made a custom input file and
> checked
> > to make sure the output was as described by Dennis in the ticket as
> > requirement:
> https://bugs.documentfoundation.org/show_bug.cgi?id=98110#c7
> >
> > In a related/parent ticket, Dennis mentioned there may be two parts
> > (easyHacks):
> https://bugs.documentfoundation.org/show_bug.cgi?id=62292#c5
> >
> > So I wasn't expecting this to fix the wiki pages by itself.
> >
> > Also, sorry for a silly question: does 'regression' mean adverse impact
> or
> > side effect?  I will take a look in the next few days for sure.
> >
> > If this explanation is not good and if you or Dennis have other ideas on
> > how to tackle this task, please share some high level details.  I would
> > love to work on it.
> >
> > I am studying other aspects of the project (python related) and also
> > learning git.  Norbert and others helped me a lot with my first
> submission
> > (on IRC) and I feel like I have forgotten some of the commands already :(
> >
> > Thank you all again and I am looking forward to addressing this issue or
> > looking for other tickets in the summer.  Feel free to suggest anything
> > python related (I am looking at 'making unittests more pythonic' etc.)
> >
> > Akash
> >
> > On Thu, Jun 16, 2016 at 3:57 AM, Andras Timar (via Code Review) <
> > ger...@gerrit.libreoffice.org> wrote:
> >
> >> Andras Timar has posted comments on this change.
> >>
> >> Change subject: tdf#98110: fix to  handling
> >> ..
> >>
> >>
> >> Patch Set 3: Code-Review-1
> >>
> >> I generated help wiki pages with ./help-to-wiki.py -n command with and
> >> without the patch and I compared the results.
> >>
> >> I did not see improvements, but I saw a regression: {{ProductName}}
> turned
> >> into %PRODUCTNAME in 219 occasions.
> >>
> >> --
> >> To view, visit https://gerrit.libreoffice.org/25000
> >> To unsubscribe, visit https://gerrit.libreoffice.org/settings
> >>
> >> Gerrit-MessageType: comment
> >> Gerrit-Change-Id: I841bf638d9975d78ac0ffeba40697bbc614cde4a
> >> Gerrit-PatchSet: 3
> >> Gerrit-Project: help
> >> Gerrit-Branch: master
> >> Gerrit-Owner: Akash Deshpande 
> >> Gerrit-Reviewer: Andras Timar 
> >> Gerrit-Reviewer: dennisroczek 
> >> Gerrit-Reviewer: jan iversen 
> >> Gerrit-HasComments: No
> >>
> >
> >
> >
> --
> Andras Timar
> Product Development Manager
> Collabora Productivity Ltd.
> https://collaboraoffice.com/
>



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


[Libreoffice-commits] core.git: Branch 'feature/ui-test' - 137 commits - bin/gbuild-to-ide comphelper/qa comphelper/source desktop/source include/comphelper include/sfx2 include/svtools include/vcl Ma

2016-06-17 Thread Markus Mohrhard
Rebased ref, commits from common ancestor:
commit 9f885e52c8415dd1f1955d3da32a8de92b15583e
Author: Markus Mohrhard 
Date:   Thu May 26 12:44:34 2016 +0200

uitest: make the calc keycode demo a bit easier to understand

Change-Id: Ia24747994dc45b8c6636aee37a55d2ba4672993a

diff --git a/uitest/calc_tests/gridwindow.py b/uitest/calc_tests/gridwindow.py
index ae16e40..1f01ec9 100644
--- a/uitest/calc_tests/gridwindow.py
+++ b/uitest/calc_tests/gridwindow.py
@@ -55,10 +55,11 @@ def special_keys(xContext):
 selectProps = mkPropertyValues({"CELL": "C3"})
 xGridWindow.executeAction("SELECT", selectProps)
 
-# TODO: how to handle the enter
 typeProps = mkPropertyValues({"KEYCODE": "CTRL+DOWN"})
 xGridWindow.executeAction("TYPE", typeProps)
 
+time.sleep(2)
+
 ui_test.close_doc()
 
 # vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit d55a3a05f4ca47b379e9c972e1d5bb51e0788a8e
Author: Markus Mohrhard 
Date:   Thu May 26 12:43:23 2016 +0200

uitest: add more impress tests

Change-Id: I89bd0af49e530382f0201a108f8798f9a9d689e3

diff --git a/uitest/impress_tests/start.py b/uitest/impress_tests/start.py
index 0c5ef2a..c817cfe 100644
--- a/uitest/impress_tests/start.py
+++ b/uitest/impress_tests/start.py
@@ -29,6 +29,86 @@ def start_impress(xContext):
 
 ui_test.create_doc_in_start_center("impress")
 
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+xEditWin.executeAction("SET", mkPropertyValues({"ZOOM": "200"}))
+
+print(xEditWin.getChildren())
+
+time.sleep(5)
+
+ui_test.close_doc()
+
+def select_page(xContext):
+xUITest = xContext.ServiceManager.createInstanceWithContext(
+"org.libreoffice.uitest.UITest", xContext)
+
+ui_test = UITest(xUITest, xContext)
+
+ui_test.create_doc_in_start_center("impress")
+
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+
+time.sleep(10)
+print(get_state_as_dict(xEditWin))
+
+xEditWin.executeAction("GOTO", mkPropertyValues({"PAGE": "2"}))
+
+time.sleep(5)
+
+print(get_state_as_dict(xEditWin))
+
+ui_test.close_doc()
+
+def select_text(xContext):
+xUITest = xContext.ServiceManager.createInstanceWithContext(
+"org.libreoffice.uitest.UITest", xContext)
+
+ui_test = UITest(xUITest, xContext)
+
+ui_test.create_doc_in_start_center("impress")
+
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+
+time.sleep(10)
+
+print(get_state_as_dict(xEditWin))
+
+ui_test.close_doc()
+
+def select_object(xContext):
+xUITest = xContext.ServiceManager.createInstanceWithContext(
+"org.libreoffice.uitest.UITest", xContext)
+
+ui_test = UITest(xUITest, xContext)
+
+ui_test.create_doc_in_start_center("impress")
+
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+
+xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed 
Drawinglayer object 1"}))
+time.sleep(2)
+xEditWin.executeAction("DESELECT", tuple())
+
+time.sleep(4)
+
+print(get_state_as_dict(xEditWin))
+
 ui_test.close_doc()
 
 # vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit e20b021de0166eae6d0edf257b2bd98daffee803
Author: Markus Mohrhard 
Date:   Mon May 23 05:22:33 2016 +0200

uitest: support more impress operations

Change-Id: I74ab526dabbee1f8c203274f187c065d9fb413fd

diff --git a/sd/source/ui/inc/uiobject.hxx b/sd/source/ui/inc/uiobject.hxx
index f8b7e57..8e3d479 100644
--- a/sd/source/ui/inc/uiobject.hxx
+++ b/sd/source/ui/inc/uiobject.hxx
@@ -16,6 +16,9 @@ class DrawViewShell;
 
 }
 
+class SdrObject;
+class SdrPageView;
+
 class ImpressWindowUIObject : public WindowUIObject
 {
 public:
@@ -27,6 +30,8 @@ public:
 virtual void execute(const OUString& rAction,
 const StringMap& rParameters) override;
 
+virtual std::set get_children() const override;
+
 static std::unique_ptr create(vcl::Window* pWindow);
 
 protected:
@@ -37,7 +42,11 @@ private:
 
 VclPtr mxWindow;
 
-sd::DrawViewShell* getViewShell();
+sd::DrawViewShell* getViewShell() const;
+
+SdrObject* getObject(const OUString& rName);
+
+SdrPageView* getPageView();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/uitest/uiobject.cxx b/sd/source/ui/uitest/uiobject.cxx
index 90535c6..a8c0227 100644
--- a/sd/source/ui/uitest/uiobject.cxx
+++ b/sd/source/ui/uitest/uiobject.cxx
@@ -11,6 +11,7 @@
 
 #include "Window.hxx"
 #include "DrawViewShell.hxx"
+#include "sdp

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

2016-06-17 Thread Caolán McNamara
 include/svx/fmtools.hxx|4 ++--
 svx/source/fmcomp/gridctrl.cxx |3 +--
 svx/source/form/fmtools.cxx|   10 ++
 3 files changed, 5 insertions(+), 12 deletions(-)

New commits:
commit 51192fa69388df69a7a5d8f03fec53de61b69050
Author: Caolán McNamara 
Date:   Thu Jun 16 16:52:55 2016 +0100

Resolves: tdf#82532 parent mutex dtored before child dtor uses it

Mutex belonged to DisposeListenerGridBridge which inherits from
FmXDisposeListener, FmXDisposeListener dtor accesses a reference
to the parent mutex in its dtor, but the mutex has been destroyed
at this point.

Move the mutex from parent to child. FWIW these classes are on
the candidate list to merge.

(cherry picked from commit e841ed93d6c6d817be1f7fdc18ff971325c861cc)

(cherry picked from commit 1c0d1199fe02666de0d162f071ce7e6e812a23df)

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

diff --git a/include/svx/fmtools.hxx b/include/svx/fmtools.hxx
index 3c970a0..dde82f3 100644
--- a/include/svx/fmtools.hxx
+++ b/include/svx/fmtools.hxx
@@ -161,10 +161,10 @@ class SAL_WARN_UNUSED FmXDisposeListener
 friend class FmXDisposeMultiplexer;
 
 FmXDisposeMultiplexer*  m_pAdapter;
-::osl::Mutex&   m_rMutex;
+osl::Mutex   m_aMutex;
 
 public:
-FmXDisposeListener(::osl::Mutex& _rMutex) : m_pAdapter(nullptr), 
m_rMutex(_rMutex) { }
+FmXDisposeListener() : m_pAdapter(nullptr) { }
 virtual ~FmXDisposeListener();
 
 virtual void disposing(const css::lang::EventObject& _rEvent, sal_Int16 
_nId) throw( css::uno::RuntimeException ) = 0;
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index d677cd3..53bf0f8 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -195,7 +195,6 @@ void GridFieldValueListener::dispose()
 
 class DisposeListenerGridBridge : public FmXDisposeListener
 {
-osl::Mutex  m_aMutex;
 DbGridControl&  m_rParent;
 FmXDisposeMultiplexer*  m_pRealListener;
 
@@ -207,7 +206,7 @@ public:
 };
 
 DisposeListenerGridBridge::DisposeListenerGridBridge(DbGridControl& _rParent, 
const Reference< XComponent >& _rxObject, sal_Int16 _rId)
-:FmXDisposeListener(m_aMutex)
+:FmXDisposeListener()
 ,m_rParent(_rParent)
 ,m_pRealListener(nullptr)
 {
diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx
index 8db5d53..497bdea 100644
--- a/svx/source/form/fmtools.cxx
+++ b/svx/source/form/fmtools.cxx
@@ -259,7 +259,6 @@ void CursorWrapper::ImplConstruct(const Reference< 
css::sdbc::XResultSet>& _rxCu
 m_xGeneric = m_xMoveOperations.get();
 }
 
-
 const CursorWrapper& CursorWrapper::operator=(const Reference< 
css::sdbc::XRowSet>& _rxCursor)
 {
 m_xMoveOperations.set(_rxCursor, UNO_QUERY);
@@ -274,32 +273,28 @@ const CursorWrapper& CursorWrapper::operator=(const 
Reference< css::sdbc::XRowSe
 return *this;
 }
 
-
 FmXDisposeListener::~FmXDisposeListener()
 {
 setAdapter(nullptr);
 }
 
-
 void FmXDisposeListener::setAdapter(FmXDisposeMultiplexer* pAdapter)
 {
 if (m_pAdapter)
 {
-::osl::MutexGuard aGuard(m_rMutex);
+::osl::MutexGuard aGuard(m_aMutex);
 m_pAdapter->release();
 m_pAdapter = nullptr;
 }
 
 if (pAdapter)
 {
-::osl::MutexGuard aGuard(m_rMutex);
+::osl::MutexGuard aGuard(m_aMutex);
 m_pAdapter = pAdapter;
 m_pAdapter->acquire();
 }
 }
 
-
-
 FmXDisposeMultiplexer::FmXDisposeMultiplexer(FmXDisposeListener* _pListener, 
const Reference< css::lang::XComponent>& _rxObject, sal_Int16 _nId)
 :m_xObject(_rxObject)
 ,m_pListener(_pListener)
@@ -311,7 +306,6 @@ 
FmXDisposeMultiplexer::FmXDisposeMultiplexer(FmXDisposeListener* _pListener, con
 m_xObject->addEventListener(this);
 }
 
-
 FmXDisposeMultiplexer::~FmXDisposeMultiplexer()
 {
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Michael Stahl
 sw/inc/doc.hxx |3 ++
 sw/inc/fesh.hxx|3 ++
 sw/source/core/doc/docfly.cxx  |   54 +
 sw/source/core/frmedt/feshview.cxx |6 
 sw/source/uibase/utlui/content.cxx |9 +++---
 5 files changed, 71 insertions(+), 4 deletions(-)

New commits:
commit 459e240eb4d64bd005e7afd84f3c4cfcf9460582
Author: Michael Stahl 
Date:   Thu Jun 16 22:04:26 2016 +0200

sw: speed up the navigator

The call to SwTextBoxHelper::findTextBoxes() in SwDoc::GetFlyNum() made
this so unbelievably slow that in a dbgutil build opening the navigator
on the bugdoc of tdf#94212 the UI freezes because getting all the fly
frames takes longer than the 1 second timeout.

Lets's not retrieve the flys one by one but instead all at once, which
makes it usable again.

Change-Id: Ic41c1648a82dcc3f758ae1b08bac6058f541f25e
(cherry picked from commit 5593d9e1422cbf8a122fa612713a832274d30559)
Reviewed-on: https://gerrit.libreoffice.org/26428
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 44d8f1e..9bcae12 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -858,6 +858,9 @@ public:
 Iterate over Flys - for Basic-Collections. */
 size_t GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL, bool 
bIgnoreTextBoxes = false ) const;
 SwFrameFormat* GetFlyNum(size_t nIdx, FlyCntType eType = FLYCNTTYPE_ALL, 
bool bIgnoreTextBoxes = false );
+std::vector GetFlyFrameFormats(
+FlyCntType eType = FLYCNTTYPE_ALL,
+bool bIgnoreTextBoxes = false);
 
 // Copy formats in own arrays and return them.
 SwFrameFormat  *CopyFrameFormat ( const SwFrameFormat& );
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 19d2f7c..16e7594 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -418,6 +418,9 @@ public:
 size_t GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL, bool 
bIgnoreTextBoxes = false ) const;
 const SwFrameFormat* GetFlyNum(size_t nIdx, FlyCntType eType = 
FLYCNTTYPE_ALL, bool bIgnoreTextBoxes = false) const;
 
+std::vector GetFlyFrameFormats(
+FlyCntType eType = FLYCNTTYPE_ALL, bool bIgnoreTextBoxes = false);
+
 /// If a fly is selected, it draws cursor into the first ContentFrame.
 const SwFrameFormat* SelFlyGrabCursor();
 
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index c2ae5a0..517933b 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -171,6 +171,60 @@ SwFrameFormat* SwDoc::GetFlyNum( size_t nIdx, FlyCntType 
eType, bool bIgnoreText
 return pRetFormat;
 }
 
+std::vector SwDoc::GetFlyFrameFormats(
+FlyCntType const eType, bool const bIgnoreTextBoxes)
+{
+SwFrameFormats& rFormats = *GetSpzFrameFormats();
+const size_t nSize = rFormats.size();
+
+std::set aTextBoxes;
+if (bIgnoreTextBoxes)
+aTextBoxes = SwTextBoxHelper::findTextBoxes(this);
+
+std::vector ret;
+ret.reserve(nSize);
+
+for (size_t i = 0; i < nSize; ++i)
+{
+SwFrameFormat const*const pFlyFormat = rFormats[ i ];
+
+if (bIgnoreTextBoxes && aTextBoxes.find(pFlyFormat) != 
aTextBoxes.end())
+{
+continue;
+}
+
+if (RES_FLYFRMFMT != pFlyFormat->Which())
+{
+continue;
+}
+
+SwNodeIndex const*const pIdx(pFlyFormat->GetContent().GetContentIdx());
+if (pIdx && pIdx->GetNodes().IsDocNodes())
+{
+SwNode const*const pNd = GetNodes()[ pIdx->GetIndex() + 1 ];
+switch (eType)
+{
+case FLYCNTTYPE_FRM:
+if (!pNd->IsNoTextNode())
+ret.push_back(pFlyFormat);
+break;
+case FLYCNTTYPE_GRF:
+if (pNd->IsGrfNode())
+ret.push_back(pFlyFormat);
+break;
+case FLYCNTTYPE_OLE:
+if (pNd->IsOLENode())
+ret.push_back(pFlyFormat);
+break;
+default:
+ret.push_back(pFlyFormat);
+}
+}
+}
+
+return ret;
+}
+
 static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch,
 const SwFrameFormat* pFlyFormat )
 {
diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 6e2917e..2dbe0e3f 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2333,6 +2333,12 @@ const SwFrameFormat*  SwFEShell::GetFlyNum(size_t nIdx, 
FlyCntType eType, bool b
 return GetDoc()->GetFlyNum(nIdx, eType, bIgnoreTextBoxes);
 }
 
+std::vector SwFEShell::GetFlyFrameFormats(
+FlyCntType const eType, bool const bIgnoreTextBoxes)
+{
+return GetDoc()->GetFlyFrameFormats(eType, bIgnoreTextBoxes);
+}
+
 // show the current selected object
 void 

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

2016-06-17 Thread Michael Stahl
 cppuhelper/source/weak.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 131e604073f89e6c1dd54be88b94b7befd881f2e
Author: Michael Stahl 
Date:   Fri Jun 17 21:58:09 2016 +0200

cppuhelper: fix use-after-free race in OWeakConnectionPoint

OWeakObject::m_pWeakConnectionPoint is returned from
OWeakObject::queryAdapter(), and stored in
OWeakRefListener::m_xWeakConnectionPoint.

This is cleared in OWeakRefListener::dispose(), called from
OWeakConnectionPoint::dispose(), called from
OWeakObject::disposeWeakConnectionPoint(), but it can happen that
another thread is in WeakReferenceHelper::get() and has copied
m_xWeakConnectionPoint onto the stack before the OWeakObject is
released and deleted, then calls OWeakConnectionPoint::queryAdapted()
after it is released, accessing the dead m_pObject.

Change-Id: I7782e6fb7e07f5a48cf7064115217376714ba8e8

diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index ed1f772..85cf3f6 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -111,6 +111,9 @@ void SAL_CALL OWeakConnectionPoint::dispose() 
throw(css::uno::RuntimeException)
 std::vector> aCopy;
 { // only hold the mutex while we access the field
 MutexGuard aGuard(getWeakMutex());
+// OWeakObject is not the only owner of this, so clear m_pObject
+// so that queryAdapted() won't use it now that it's dead
+m_pObject = nullptr;
 // other code is going to call removeReference while we are doing 
this, so we need a
 // copy, but since we are disposing and going away, we can just take 
the original data
 aCopy.swap(m_aReferences);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Markus Mohrhard
New branch 'feature/ui-test' available with the following commits:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [libreoffice-projects] Re: [libreoffice-design] Minutes of the Design Hangout: 2016-Jun-17

2016-06-17 Thread Heiko Tietze
On Freitag, 17. Juni 2016 16:13:46 CEST Stephan Bergmann wrote:
> On 06/17/2016 03:47 PM, Heiko Tietze wrote:
> > Enhancements and proposals
> > + Push extensions (Heiko)
> Just to clarify: You're talking about .oxt extensions here?

If you want so, yes. Whether binary code or python script, extensions should be 
utilized in a similar ways as for Mozilla's software. I'm aware of the 
problems, beginning with the increased effort to enable external access rather 
than code directly. 

signature.asc
Description: This is a digitally signed message part.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'private/moggi/ui-test' - 0 commits -

2016-06-17 Thread Markus Mohrhard
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/moggi/ui-test' - 3496 commits - accessibility/inc accessibility/source android/README android/source avmedia/inc avmedia/Library_avmedia.mk avmedia/Modu

2016-06-17 Thread Markus Mohrhard
Rebased ref, commits from common ancestor:
commit 23d92a8b87b80b016324d7f194927a21faec42d5
Author: Markus Mohrhard 
Date:   Thu May 26 12:48:06 2016 +0200

uitest: add the radiobutton demo

Change-Id: I271a7388c2114304da26050f909c366edd8143b5

diff --git a/uitest/demo_ui/radiobutton.py b/uitest/demo_ui/radiobutton.py
new file mode 100644
index 000..bd8b1db
--- /dev/null
+++ b/uitest/demo_ui/radiobutton.py
@@ -0,0 +1,43 @@
+# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 
*/
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest_helper import UITest
+
+from helper import mkPropertyValues
+
+import time
+
+try:
+import pyuno
+import uno
+import unohelper
+except ImportError:
+print("pyuno not found: try to set PYTHONPATH and URE_BOOTSTRAP variables")
+print("PYTHONPATH=/installation/opt/program")
+print("URE_BOOTSTRAP=file:///installation/opt/program/fundamentalrc")
+raise
+
+def toggle_radiobutton(xContext):
+xUITest = xContext.ServiceManager.createInstanceWithContext(
+"org.libreoffice.uitest.UITest", xContext)
+
+ui_test = UITest(xUITest, xContext)
+
+ui_test.create_doc_in_start_center("calc")
+
+ui_test.execute_dialog_through_command(".uno:FormatCellDialog")
+xCellsDlg = xUITest.getTopFocusWindow()
+xNegativeNumRedCB = xCellsDlg.getChild("negnumred")
+xNegativeNumRedCB.executeAction("CLICK",tuple())
+
+okBtn = xCellsDlg.getChild("ok")
+okBtn.executeAction("CLICK", tuple())
+
+ui_test.close_doc()
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab: */
+
commit dfe27484f43248a60b438c91b604f43986ebf6cc
Author: Markus Mohrhard 
Date:   Thu May 26 12:44:34 2016 +0200

uitest: make the calc keycode demo a bit easier to understand

Change-Id: Ia24747994dc45b8c6636aee37a55d2ba4672993a

diff --git a/uitest/calc_tests/gridwindow.py b/uitest/calc_tests/gridwindow.py
index ae16e40..1f01ec9 100644
--- a/uitest/calc_tests/gridwindow.py
+++ b/uitest/calc_tests/gridwindow.py
@@ -55,10 +55,11 @@ def special_keys(xContext):
 selectProps = mkPropertyValues({"CELL": "C3"})
 xGridWindow.executeAction("SELECT", selectProps)
 
-# TODO: how to handle the enter
 typeProps = mkPropertyValues({"KEYCODE": "CTRL+DOWN"})
 xGridWindow.executeAction("TYPE", typeProps)
 
+time.sleep(2)
+
 ui_test.close_doc()
 
 # vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit a4c8c2a5e8a035ee6234816d7f1f1db27d500c58
Author: Markus Mohrhard 
Date:   Thu May 26 12:43:23 2016 +0200

uitest: add more impress tests

Change-Id: I89bd0af49e530382f0201a108f8798f9a9d689e3

diff --git a/uitest/impress_tests/start.py b/uitest/impress_tests/start.py
index 0c5ef2a..c817cfe 100644
--- a/uitest/impress_tests/start.py
+++ b/uitest/impress_tests/start.py
@@ -29,6 +29,86 @@ def start_impress(xContext):
 
 ui_test.create_doc_in_start_center("impress")
 
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+xEditWin.executeAction("SET", mkPropertyValues({"ZOOM": "200"}))
+
+print(xEditWin.getChildren())
+
+time.sleep(5)
+
+ui_test.close_doc()
+
+def select_page(xContext):
+xUITest = xContext.ServiceManager.createInstanceWithContext(
+"org.libreoffice.uitest.UITest", xContext)
+
+ui_test = UITest(xUITest, xContext)
+
+ui_test.create_doc_in_start_center("impress")
+
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+
+time.sleep(10)
+print(get_state_as_dict(xEditWin))
+
+xEditWin.executeAction("GOTO", mkPropertyValues({"PAGE": "2"}))
+
+time.sleep(5)
+
+print(get_state_as_dict(xEditWin))
+
+ui_test.close_doc()
+
+def select_text(xContext):
+xUITest = xContext.ServiceManager.createInstanceWithContext(
+"org.libreoffice.uitest.UITest", xContext)
+
+ui_test = UITest(xUITest, xContext)
+
+ui_test.create_doc_in_start_center("impress")
+
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xEditWin = xImpressDoc.getChild("impress_win")
+
+time.sleep(10)
+
+print(get_state_as_dict(xEditWin))
+
+ui_test.close_doc()
+
+def select_object(xContext):
+xUITest = xContext.ServiceManager.createInstanceWithContext(
+"org.libreoffice.uitest.UITest", xContext)
+
+ui_test = UITest(xUITest, xContext)
+
+ui_test.create_doc_in_start_center("impress")
+
+xImpressDoc = xUITest.getTopFocusWindow()
+print(get_state_as_dict(xImpressDoc))
+print(xImpressDoc.getChildren())
+
+xE

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

2016-06-17 Thread Michael Stahl
 sw/inc/doc.hxx |3 ++
 sw/inc/fesh.hxx|3 ++
 sw/source/core/doc/docfly.cxx  |   54 +
 sw/source/core/frmedt/feshview.cxx |6 
 sw/source/uibase/utlui/content.cxx |9 +++---
 5 files changed, 71 insertions(+), 4 deletions(-)

New commits:
commit 8389616baa8c03f878be5dfeb0a9f2db546bb66f
Author: Michael Stahl 
Date:   Thu Jun 16 22:04:26 2016 +0200

sw: speed up the navigator

The call to SwTextBoxHelper::findTextBoxes() in SwDoc::GetFlyNum() made
this so unbelievably slow that in a dbgutil build opening the navigator
on the bugdoc of tdf#94212 the UI freezes because getting all the fly
frames takes longer than the 1 second timeout.

Lets's not retrieve the flys one by one but instead all at once, which
makes it usable again.

Change-Id: Ic41c1648a82dcc3f758ae1b08bac6058f541f25e
(cherry picked from commit 5593d9e1422cbf8a122fa612713a832274d30559)
Reviewed-on: https://gerrit.libreoffice.org/26425
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index e9b3be5..edf5287 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -857,6 +857,9 @@ public:
 Iterate over Flys - for Basic-Collections. */
 size_t GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL, bool 
bIgnoreTextBoxes = false ) const;
 SwFrameFormat* GetFlyNum(size_t nIdx, FlyCntType eType = FLYCNTTYPE_ALL, 
bool bIgnoreTextBoxes = false );
+std::vector GetFlyFrameFormats(
+FlyCntType eType = FLYCNTTYPE_ALL,
+bool bIgnoreTextBoxes = false);
 
 // Copy formats in own arrays and return them.
 SwFrameFormat  *CopyFrameFormat ( const SwFrameFormat& );
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index ac85192..a99b4e4 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -418,6 +418,9 @@ public:
 size_t GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL, bool 
bIgnoreTextBoxes = false ) const;
 const SwFrameFormat* GetFlyNum(size_t nIdx, FlyCntType eType = 
FLYCNTTYPE_ALL, bool bIgnoreTextBoxes = false) const;
 
+std::vector GetFlyFrameFormats(
+FlyCntType eType = FLYCNTTYPE_ALL, bool bIgnoreTextBoxes = false);
+
 /// If a fly is selected, it draws cursor into the first ContentFrame.
 const SwFrameFormat* SelFlyGrabCursor();
 
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index e749759..e1291b6 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -171,6 +171,60 @@ SwFrameFormat* SwDoc::GetFlyNum( size_t nIdx, FlyCntType 
eType, bool bIgnoreText
 return pRetFormat;
 }
 
+std::vector SwDoc::GetFlyFrameFormats(
+FlyCntType const eType, bool const bIgnoreTextBoxes)
+{
+SwFrameFormats& rFormats = *GetSpzFrameFormats();
+const size_t nSize = rFormats.size();
+
+std::set aTextBoxes;
+if (bIgnoreTextBoxes)
+aTextBoxes = SwTextBoxHelper::findTextBoxes(this);
+
+std::vector ret;
+ret.reserve(nSize);
+
+for (size_t i = 0; i < nSize; ++i)
+{
+SwFrameFormat const*const pFlyFormat = rFormats[ i ];
+
+if (bIgnoreTextBoxes && aTextBoxes.find(pFlyFormat) != 
aTextBoxes.end())
+{
+continue;
+}
+
+if (RES_FLYFRMFMT != pFlyFormat->Which())
+{
+continue;
+}
+
+SwNodeIndex const*const pIdx(pFlyFormat->GetContent().GetContentIdx());
+if (pIdx && pIdx->GetNodes().IsDocNodes())
+{
+SwNode const*const pNd = GetNodes()[ pIdx->GetIndex() + 1 ];
+switch (eType)
+{
+case FLYCNTTYPE_FRM:
+if (!pNd->IsNoTextNode())
+ret.push_back(pFlyFormat);
+break;
+case FLYCNTTYPE_GRF:
+if (pNd->IsGrfNode())
+ret.push_back(pFlyFormat);
+break;
+case FLYCNTTYPE_OLE:
+if (pNd->IsOLENode())
+ret.push_back(pFlyFormat);
+break;
+default:
+ret.push_back(pFlyFormat);
+}
+}
+}
+
+return ret;
+}
+
 static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch,
 const SwFrameFormat* pFlyFormat )
 {
diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index c921e7f..6c8f7c1 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2332,6 +2332,12 @@ const SwFrameFormat*  SwFEShell::GetFlyNum(size_t nIdx, 
FlyCntType eType, bool b
 return GetDoc()->GetFlyNum(nIdx, eType, bIgnoreTextBoxes);
 }
 
+std::vector SwFEShell::GetFlyFrameFormats(
+FlyCntType const eType, bool const bIgnoreTextBoxes)
+{
+return GetDoc()->GetFlyFrameFormats(eType, bIgnoreTextBoxes);
+}
+
 // show the current selected object
 void SwFEShell::MakeSelVisible()
 {
diff -

[Libreoffice-commits] core.git: comphelper/source dbaccess/source framework/source include/comphelper reportdesign/source sc/source

2016-06-17 Thread Stephan Bergmann
 comphelper/source/property/propertybag.cxx |4 
 comphelper/source/property/propertycontainerhelper.cxx |   14 -
 dbaccess/source/core/api/RowSetBase.cxx|6 
 framework/source/layoutmanager/layoutmanager.cxx   |3 
 include/comphelper/propertycontainerhelper.hxx |6 
 reportdesign/source/core/api/ReportDefinition.cxx  |  170 +++--
 sc/source/ui/unoobj/celllistsource.cxx |5 
 sc/source/ui/unoobj/cellvaluebinding.cxx   |5 
 sc/source/ui/unoobj/chartuno.cxx   |4 
 9 files changed, 98 insertions(+), 119 deletions(-)

New commits:
commit bb1e59d596ffa29d40b4538e18a08e5e91d469a9
Author: Stephan Bergmann 
Date:   Fri Jun 17 19:40:58 2016 +0200

Simplify OPropertyContainerHelper::registerPropertyNoMember's _pInitialValue

Change-Id: Ibfb27b3eded45e2646dada37ce3663f427985ae9

diff --git a/comphelper/source/property/propertybag.cxx 
b/comphelper/source/property/propertybag.cxx
index 7f32dd9..019c2b9 100644
--- a/comphelper/source/property/propertybag.cxx
+++ b/comphelper/source/property/propertybag.cxx
@@ -120,7 +120,7 @@ namespace comphelper
 
 // register the property
 OSL_ENSURE( _nAttributes & PropertyAttribute::MAYBEVOID, 
"PropertyBag::addVoidProperty: this is for default-void properties only!" );
-registerPropertyNoMember( _rName, _nHandle, _nAttributes | 
PropertyAttribute::MAYBEVOID, _rType, nullptr );
+registerPropertyNoMember( _rName, _nHandle, _nAttributes | 
PropertyAttribute::MAYBEVOID, _rType, css::uno::Any() );
 
 // remember the default
 m_pImpl->aDefaults.insert( MapInt2Any::value_type( _nHandle, Any() ) );
@@ -143,7 +143,7 @@ namespace comphelper
 
 // register the property
 registerPropertyNoMember( _rName, _nHandle, _nAttributes, 
aPropertyType,
-_rInitialValue.hasValue() ? _rInitialValue.getValue() : nullptr );
+_rInitialValue );
 
 // remember the default
 m_pImpl->aDefaults.insert( MapInt2Any::value_type( _nHandle, 
_rInitialValue ) );
diff --git a/comphelper/source/property/propertycontainerhelper.cxx 
b/comphelper/source/property/propertycontainerhelper.cxx
index 9122ba0..5e7fa4f 100644
--- a/comphelper/source/property/propertycontainerhelper.cxx
+++ b/comphelper/source/property/propertycontainerhelper.cxx
@@ -121,21 +121,21 @@ void 
OPropertyContainerHelper::registerMayBeVoidProperty(const OUString& _rName,
 
 
 void OPropertyContainerHelper::registerPropertyNoMember(const OUString& 
_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes,
-const Type& _rType, const void* _pInitialValue)
+const Type& _rType, css::uno::Any const & _pInitialValue)
 {
 OSL_ENSURE(!_rType.equals(cppu::UnoType::get()),
 "OPropertyContainerHelper::registerPropertyNoMember : don't give my 
the type of an uno::Any ! Really can't handle this !");
-OSL_ENSURE(_pInitialValue || ((_nAttributes & 
PropertyAttribute::MAYBEVOID) != 0),
-"OPropertyContainerHelper::registerPropertyNoMember : you should not 
omit the initial value if the property can't be void! This will definitively 
crash later!");
+OSL_ENSURE(
+(_pInitialValue.isExtractableTo(_rType)
+ || (!_pInitialValue.hasValue()
+ && (_nAttributes & PropertyAttribute::MAYBEVOID) != 0)),
+"bad initial value");
 
 PropertyDescription aNewProp;
 aNewProp.aProperty = Property( _rName, _nHandle, _rType, 
(sal_Int16)_nAttributes );
 aNewProp.eLocated = PropertyDescription::LocationType::HoldMyself;
 aNewProp.aLocation.nOwnClassVectorIndex = m_aHoldProperties.size();
-if (_pInitialValue)
-m_aHoldProperties.push_back(Any(_pInitialValue, _rType));
-else
-m_aHoldProperties.push_back(Any());
+m_aHoldProperties.push_back(_pInitialValue);
 
 implPushBackProperty(aNewProp);
 }
diff --git a/dbaccess/source/core/api/RowSetBase.cxx 
b/dbaccess/source/core/api/RowSetBase.cxx
index a007159..3bfa9b1 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -96,10 +96,8 @@ ORowSetBase::ORowSetBase( const 
Reference& _rContext, ::cppu:
 {
 sal_Int32 nRBT  = PropertyAttribute::READONLY   | PropertyAttribute::BOUND 
 | PropertyAttribute::TRANSIENT;
 
-sal_Int32 nInitialRowCountValue = 0;
-sal_Bool bInitialRowCountFinalValue( false );
-registerPropertyNoMember( PROPERTY_ROWCOUNT,PROPERTY_ID_ROWCOUNT,  
  nRBT, cppu::UnoType::get(), 
&nInitialRowCountValue );
-registerPropertyNoMember( PROPERTY_ISROWCOUNTFINAL, 
PROPERTY_ID_ISROWCOUNTFINAL, nRBT, cppu::UnoType::get(),  
&bInitialRowCountFinalValue );
+registerPropertyNoMember( PROPERTY_ROWCOUNT,PROPERTY_ID_ROWCOUNT,  
  nRBT, cppu::UnoType::get(), css::uno::makeAny(0) );
+registerPropertyNoMember( PROPERTY_ISROWCOUNTFINAL, 
PROPERTY_ID_ISROWCOUNTFINAL, nRBT, cppu::Uno

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

2016-06-17 Thread Miklos Vajna
 sw/qa/extras/rtfimport/data/flip.rtf|   96 +
 sw/qa/extras/rtfimport/data/tdf91684.rtf|  460 
 sw/qa/extras/rtfimport/rtfimport.cxx|   27 +
 writerfilter/source/rtftok/rtfsdrimport.cxx |   24 +
 4 files changed, 606 insertions(+), 1 deletion(-)

New commits:
commit 6a10ad7145c0d77a8e9cf2481f2527a5c4d32173
Author: Miklos Vajna 
Date:   Thu Jun 16 09:13:04 2016 +0200

tdf#91684 RTF import: handle fFlipH and fFlipV shape props

Also:

Related: tdf#91684 RTF import: fix scaling of group shape children

It was assumed that the child size is in twips, but it's in relative
coordinates.

(cherry picked from commits c3acc06230169f141930945ebbff43b1a88dfdee and
63965d7dc571c7dce80737f9d57a7c5151da)

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

diff --git a/sw/qa/extras/rtfimport/data/flip.rtf 
b/sw/qa/extras/rtfimport/data/flip.rtf
new file mode 100644
index 000..84e9c2c
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/flip.rtf
@@ -0,0 +1,96 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31506\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0
+\pard\plain \ltrpar\ql 
\li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0
+\f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid12721412
+{\shp
+{\*\shpinst\shpleft537\shptop201\shpright2361\shpbottom1136\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid1026
+{\sp
+{\sn shapeType}
+{\sv 6}
+}
+{\sp
+{\sn fFlipH}
+{\sv 1}
+}
+{\sp
+{\sn fFlipV}
+{\sv 1}
+}
+{\sp
+{\sn wzName}
+{\sv h-and-v}
+}
+}
+{\shprslt
+}
+}
+{\shp
+{\*\shpinst\shpleft537\shptop1201\shpright2361\shpbottom2136\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid1026
+{\sp
+{\sn shapeType}
+{\sv 6}
+}
+{\sp
+{\sn fFlipH}
+{\sv 1}
+}
+{\sp
+{\sn fFlipV}
+{\sv 0}
+}
+{\sp
+{\sn wzName}
+{\sv h-only}
+}
+}
+{\shprslt
+}
+}
+{\shp
+{\*\shpinst\shpleft537\shptop2201\shpright2361\shpbottom3136\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid1026
+{\sp
+{\sn shapeType}
+{\sv 6}
+}
+{\sp
+{\sn fFlipH}
+{\sv 0}
+}
+{\sp
+{\sn fFlipV}
+{\sv 1}
+}
+{\sp
+{\sn wzName}
+{\sv v-only}
+}
+}
+{\shprslt
+}
+}
+{\shp
+{\*\shpinst\shpleft537\shptop3201\shpright2361\shpbottom4136\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid1026
+{\sp
+{\sn shapeType}
+{\sv 6}
+}
+{\sp
+{\sn fFlipH}
+{\sv 0}
+}
+{\sp
+{\sn fFlipV}
+{\sv 0}
+}
+{\sp
+{\sn wzName}
+{\sv neither-h-nor-v}
+}
+}
+{\shprslt
+}
+}
+}
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid13321744
+\par }
+}
diff --git a/sw/qa/extras/rtfimport/data/tdf91684.rtf 
b/sw/qa/extras/rtfimport/data/tdf91684.rtf
new file mode 100644
index 000..4ec9e26
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf91684.rtf
@@ -0,0 +1,460 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31506\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0
+\pard\plain \ltrpar\ql 
\li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 
\f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 
+{\field\fldedit\fldlock
+{\*\fldinst 
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid8943332  SHAPE  \\* MERGEFORMAT }
+}
+{\fldrslt 
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid8943332 
+{\shpgrp
+{\*\shpinst\shpleft0\shptop0\shpright780\shpbottom759\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplockanchor\shplid1026
+{\sp
+{\sn groupLeft}
+{\sv 8754}
+}
+{\sp
+{\sn groupTop}
+{\sv 11945}
+}
+{\sp
+{\sn groupRight}
+{\sv 11634}
+}
+{\sp
+{\sn groupBottom}
+{\sv 14804}
+}
+{\sp
+{\sn rotation}
+{\sv 0}
+}
+{\sp
+{\sn fLockAgainstUngrouping}
+{\sv 0}
+}
+{\sp
+{\sn fLockRotation}
+{\sv 0}
+}
+{\sp
+{\sn fLockAspectRatio}
+{\sv 0}
+}
+{\sp
+{\sn fLockPosition}
+{\sv 0}
+}
+{\sp
+{\sn fLockAgainstSelect}
+{\sv 0}
+}
+{\sp
+{\sn fLockAgainstGrouping}
+{\sv 0}
+}
+{\sp
+{\sn wzName}
+{\sv Group 
+450}
+}
+{\sp
+{\sn lidRegroup}
+{\sv 0}
+}
+{\sp
+{\sn posh}
+{\sv 0}
+}
+{\sp
+{\sn posrelh}
+{\sv 3}
+}
+{\sp
+{\sn posv}
+{\sv 0}
+}
+{\sp
+{\sn posrelv}
+{\sv 3}
+}
+{\sp
+{\sn dhgt}
+{\sv 0}
+}
+{\sp
+{\sn fAllowOverlap}
+{\sv 1}
+}
+{\sp
+{\sn fBehindDocument}
+{\sv 0}
+}
+{\sp
+{\sn fHidden}
+{\sv 0}
+}
+{\sp
+{\sn fPseudoInline}
+{\sv 1}
+}
+{\sp
+{\sn pctHorizPos}
+{\sv -10001}
+}
+{\sp
+{\sn pctVertPos}
+{\sv -10

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

2016-06-17 Thread Miklos Vajna
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   11 ++---
 desktop/source/lib/init.cxx |   16 +++
 include/LibreOfficeKit/LibreOfficeKit.h |8 +--
 include/LibreOfficeKit/LibreOfficeKit.hxx   |8 +--
 include/sfx2/lokhelper.hxx  |9 ++--
 libreofficekit/source/gtk/lokdocview.cxx|7 ++-
 sfx2/source/view/lokhelper.cxx  |   59 ++--
 7 files changed, 62 insertions(+), 56 deletions(-)

New commits:
commit 45c2410041c48c22bd860efb42d4daadad7869b0
Author: Miklos Vajna 
Date:   Fri Jun 17 16:38:04 2016 +0200

LOK: change type of view ids to uintptr_t

This fixes the following problem:

- createView() = 1
- createView() = 2
- destroyView(1)

and then view #2 was renumbered to 1.

Instead expose the pointer address of the SfxViewShell as the ID, which
is not changing in such a situation.

Note that the SfxViewShell <-> ID mapping is an implementation detail of
SfxLokHelper, and only pointers are converted to IDs, user-supplied IDs
are never converted back to pointers.

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

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 3fd6634..d341c76 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -295,16 +295,17 @@ void DesktopLOKTest::testCreateView()
 LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
 CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViews(pDocument));
 
-int nId = pDocument->m_pDocumentClass->createView(pDocument);
+std::uintptr_t nId0 = pDocument->m_pDocumentClass->getView(pDocument);
+std::uintptr_t nId1 = pDocument->m_pDocumentClass->createView(pDocument);
 CPPUNIT_ASSERT_EQUAL(2, pDocument->m_pDocumentClass->getViews(pDocument));
 
 // Make sure the created view is the active one, then switch to the old
 // one.
-CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getView(pDocument));
-pDocument->m_pDocumentClass->setView(pDocument, 0);
-CPPUNIT_ASSERT_EQUAL(0, pDocument->m_pDocumentClass->getView(pDocument));
+CPPUNIT_ASSERT_EQUAL(nId1, 
pDocument->m_pDocumentClass->getView(pDocument));
+pDocument->m_pDocumentClass->setView(pDocument, nId0);
+CPPUNIT_ASSERT_EQUAL(nId0, 
pDocument->m_pDocumentClass->getView(pDocument));
 
-pDocument->m_pDocumentClass->destroyView(pDocument, nId);
+pDocument->m_pDocumentClass->destroyView(pDocument, nId1);
 CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViews(pDocument));
 }
 
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a0aebee..c0477a5 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -364,10 +364,10 @@ static void doc_setClientZoom(LibreOfficeKitDocument* 
pThis,
 int nTileTwipWidth,
 int nTileTwipHeight);
 static void doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, 
int nY, int nWidth, int nHeight);
-static int doc_createView(LibreOfficeKitDocument* pThis);
-static void doc_destroyView(LibreOfficeKitDocument* pThis, int nId);
-static void doc_setView(LibreOfficeKitDocument* pThis, int nId);
-static int doc_getView(LibreOfficeKitDocument* pThis);
+static uintptr_t doc_createView(LibreOfficeKitDocument* pThis);
+static void doc_destroyView(LibreOfficeKitDocument* pThis, uintptr_t nId);
+static void doc_setView(LibreOfficeKitDocument* pThis, uintptr_t nId);
+static uintptr_t doc_getView(LibreOfficeKitDocument* pThis);
 static int doc_getViews(LibreOfficeKitDocument* pThis);
 static unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis,
   const char *pFontName,
@@ -1850,28 +1850,28 @@ static void 
doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, int
 pDoc->setClientVisibleArea(aRectangle);
 }
 
-static int doc_createView(LibreOfficeKitDocument* /*pThis*/)
+static uintptr_t doc_createView(LibreOfficeKitDocument* /*pThis*/)
 {
 SolarMutexGuard aGuard;
 
 return SfxLokHelper::createView();
 }
 
-static void doc_destroyView(LibreOfficeKitDocument* /*pThis*/, int nId)
+static void doc_destroyView(LibreOfficeKitDocument* /*pThis*/, uintptr_t nId)
 {
 SolarMutexGuard aGuard;
 
 SfxLokHelper::destroyView(nId);
 }
 
-static void doc_setView(LibreOfficeKitDocument* /*pThis*/, int nId)
+static void doc_setView(LibreOfficeKitDocument* /*pThis*/, uintptr_t nId)
 {
 SolarMutexGuard aGuard;
 
 SfxLokHelper::setView(nId);
 }
 
-static int doc_getView(LibreOfficeKitDocument* /*pThis*/)
+static uintptr_t doc_getView(LibreOfficeKitDocument* /*pThis*/)
 {
 SolarMutexGuard aGuard;
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/inc

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - 3 commits - external/mdds sw/source

2016-06-17 Thread Caolán McNamara
 external/mdds/UnpackedTarball_mdds.mk |1 +
 external/mdds/tdf90579.patch.0|   23 +++
 sw/source/core/access/acctable.cxx|   14 --
 sw/source/core/layout/tabfrm.cxx  |7 +--
 sw/source/core/layout/wsfrm.cxx   |2 +-
 5 files changed, 38 insertions(+), 9 deletions(-)

New commits:
commit 6114072a59cfff36218aea70e1b52fa4c3ba64b4
Author: Caolán McNamara 
Date:   Fri Jun 17 14:37:17 2016 +0100

Resolves: tdf#90579 swap_single_to_multi_blocks seems broken

when there is associated data in the src. Its copies those pointers
into the block that will appear in the destination. Then can destroy
the source block, which deletes the contents of those pointers, and
then inserts the new block which has dangling pointers to the deleted
data.

https://gitlab.com/mdds/mdds/merge_requests/2

Change-Id: Id9614d95652c8032b03cb5748a284917043d8d21
(cherry picked from commit 9ec54e92407cd632c4e38317f914edd557835a86)

diff --git a/external/mdds/UnpackedTarball_mdds.mk 
b/external/mdds/UnpackedTarball_mdds.mk
index c015f4c..bd57593 100644
--- a/external/mdds/UnpackedTarball_mdds.mk
+++ b/external/mdds/UnpackedTarball_mdds.mk
@@ -14,6 +14,7 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL)))
 $(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
+external/mdds/tdf90579.patch.0 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/mdds/tdf90579.patch.0 b/external/mdds/tdf90579.patch.0
new file mode 100644
index 000..5ef1bc7
--- /dev/null
+++ b/external/mdds/tdf90579.patch.0
@@ -0,0 +1,23 @@
+diff --git a/include/mdds/multi_type_vector_def.inl 
b/include/mdds/multi_type_vector_def.inl
+index 0e2a15a..fe9c767 100644
+--- include/mdds/multi_type_vector_def.inl
 include/mdds/multi_type_vector_def.inl
+@@ -2306,6 +2306,9 @@ void multi_type_vector<_CellBlockFunc, 
_EventFunc>::swap_single_to_multi_blocks(
+ {
+ // Source range is at the top of a block.
+ 
++// Shrink the current block by erasing the top part.
++element_block_func::erase(*blk_src->mp_data, 0, len);
++
+ if (src_tail_len == 0)
+ {
+ // the whole block needs to be replaced.
+@@ -2314,8 +2317,6 @@ void multi_type_vector<_CellBlockFunc, 
_EventFunc>::swap_single_to_multi_blocks(
+ }
+ else
+ {
+-// Shrink the current block by erasing the top part.
+-element_block_func::erase(*blk_src->mp_data, 0, len);
+ blk_src->m_size -= len;
+ }
+ 
commit ff7028465c5c5cd30a9bb28ac6aa610e67c4e843
Author: Caolán McNamara 
Date:   Fri Jun 17 10:10:33 2016 +0100

Resolves: tdf#100421, don't crash on deleting particular table

Change-Id: I52a4cf0732240aa26147313ae6a52c4fd8d8933c
(cherry picked from commit 4561119a8bab986df25a5ce2a544aa96394cbd5d)

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 002b653..422d64e 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4326,8 +4326,10 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool 
bTst, bool bInfo )
 
 //Only shrink as much as the content of the biggest cell allows.
 SwTwips nRealDist = nDist;
+SwFormat* pMod = GetFormat();
+if (pMod)
 {
-const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize();
+const SwFormatFrameSize &rSz = pMod->GetFrameSize();
 SwTwips nMinHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ?
  rSz.GetHeight() :
  0;
@@ -4361,7 +4363,8 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool 
bTst, bool bInfo )
 Frame().Pos().X() += nReal;
 }
 
-SwTwips nTmp = GetUpper()->Shrink( nReal, bTst );
+SwLayoutFrame* pFrame = GetUpper();
+SwTwips nTmp = pFrame ? pFrame->Shrink(nReal, bTst) : 0;
 if ( !bShrinkAnyway && !GetNext() && nTmp != nReal )
 {
 //The last one gets the leftover in the upper and therefore takes
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 1635463..9451c0a 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -1216,7 +1216,7 @@ SwTwips SwFrame::Shrink( SwTwips nDist, bool bTst, bool 
bInfo )
 const SwTabFrame* pTab = FindTabFrame();
 
 // NEW TABLES
-if ( pTab->IsVertical() != IsVertical() ||
+if ( (pTab && pTab->IsVertical() != IsVertical()) ||
  pThisCell->GetLayoutRowSpan() < 1 )
 return 0;
 }
commit f054ba24056dba34576bc43a86abb0b828917585
Author: Caolán McNamara 
Date:   Fri Jun 17 09:44:26 2016 +0100

Related: tdf#100421 crash in a11y on load of source odt

stldebug assert because end is before start and we can'

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

2016-06-17 Thread Caolán McNamara
 external/mdds/UnpackedTarball_mdds.mk |1 +
 external/mdds/tdf90579.patch.0|   23 +++
 2 files changed, 24 insertions(+)

New commits:
commit 9ec54e92407cd632c4e38317f914edd557835a86
Author: Caolán McNamara 
Date:   Fri Jun 17 14:37:17 2016 +0100

Resolves: tdf#90579 swap_single_to_multi_blocks seems broken

when there is associated data in the src. Its copies those pointers
into the block that will appear in the destination. Then can destroy
the source block, which deletes the contents of those pointers, and
then inserts the new block which has dangling pointers to the deleted
data.

https://gitlab.com/mdds/mdds/merge_requests/2

Change-Id: Id9614d95652c8032b03cb5748a284917043d8d21

diff --git a/external/mdds/UnpackedTarball_mdds.mk 
b/external/mdds/UnpackedTarball_mdds.mk
index c015f4c..bd57593 100644
--- a/external/mdds/UnpackedTarball_mdds.mk
+++ b/external/mdds/UnpackedTarball_mdds.mk
@@ -14,6 +14,7 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL)))
 $(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
+external/mdds/tdf90579.patch.0 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/mdds/tdf90579.patch.0 b/external/mdds/tdf90579.patch.0
new file mode 100644
index 000..5ef1bc7
--- /dev/null
+++ b/external/mdds/tdf90579.patch.0
@@ -0,0 +1,23 @@
+diff --git a/include/mdds/multi_type_vector_def.inl 
b/include/mdds/multi_type_vector_def.inl
+index 0e2a15a..fe9c767 100644
+--- include/mdds/multi_type_vector_def.inl
 include/mdds/multi_type_vector_def.inl
+@@ -2306,6 +2306,9 @@ void multi_type_vector<_CellBlockFunc, 
_EventFunc>::swap_single_to_multi_blocks(
+ {
+ // Source range is at the top of a block.
+ 
++// Shrink the current block by erasing the top part.
++element_block_func::erase(*blk_src->mp_data, 0, len);
++
+ if (src_tail_len == 0)
+ {
+ // the whole block needs to be replaced.
+@@ -2314,8 +2317,6 @@ void multi_type_vector<_CellBlockFunc, 
_EventFunc>::swap_single_to_multi_blocks(
+ }
+ else
+ {
+-// Shrink the current block by erasing the top part.
+-element_block_func::erase(*blk_src->mp_data, 0, len);
+ blk_src->m_size -= len;
+ }
+ 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/networkdays_excel2003.fods | 1080 ++
 1 file changed, 1080 insertions(+)

New commits:
commit cc355c50e34aab0b5fcb15037ad1e8e394622772
Author: Zdeněk Crhonek 
Date:   Thu Jun 16 20:13:32 2016 +0200

add NETWORKDAYS_EXCEL2003 test case

Change-Id: Ib56c08f916cdae74c54bc13d4ef7ced46a227520
Reviewed-on: https://gerrit.libreoffice.org/26384
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/networkdays_excel2003.fods 
b/sc/qa/unit/data/functions/fods/networkdays_excel2003.fods
new file mode 100644
index 000..a46ab81
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/networkdays_excel2003.fods
@@ -0,0 +1,1080 @@
+
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-14T07:28:45.49300P0D1LibreOffice/5.1.3.2$Windows_x86
 
LibreOffice_project/644e4637d1d8544fd9f56425bd6cec110e49301b
+ 
+  
+   0
+   0
+   31552
+   5954
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+  
+   3
+   9
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+ 
+ Sheet2
+ 1420
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+
+   
+  
+  
+   true
+   true
+   true
+   true
+   12632256
+   true
+   false
+   true
+   3
+   true
+   false
+   false
+   1270
+   1270
+   1
+   1
+   true
+   true
+   false
+   PDF-XChange 4.0
+   +AX+/1BERi1YQ2hhbmdlIDQuMAAAUERGLVhDaGFuZ2UgNC4wAAAWAAEAGgUEAAhSAAAEdAAAM1ROVwYAUABEAEYALQBYAEMAaABhAG4AZwBlACAANAAuADEEAATcADgEEwwBAAEACQCaCzQIZAABLAECAAEALAEAQQA0GDQIAACaCwAAAERDWFAEAQA0CAAAmgssAQAAZAEAAABDAHUAcgByAGUAbgB0
 
QwA6AFwAcABvAHIAdABhAGIAbABlAFwAUABvAHIAdABhAGIAbABlAEEAcABwAHMAXABMAGkAYgByAGUATwBmAGYAaQBjAGUAUABvAHIAdABhAGIAbABlAFwAQQBw

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

2016-06-17 Thread Michael Stahl
 cppuhelper/source/weak.cxx |   11 ---
 include/cppuhelper/weakref.hxx |   20 
 2 files changed, 20 insertions(+), 11 deletions(-)

New commits:
commit 2051d7b849105c2020887635e18687c30cdc88c7
Author: Michael Stahl 
Date:   Fri Jun 17 13:35:08 2016 +0200

cppuhelper: WeakReference isn't thread-safe

... but its documentation claims that it is, which is partially
misleading, so fix both the documentation and the data race in
WeakReferenceHelper::clear().

This actually crashed in clear() in the multi-threaded ZipPackage code
on exporting the bugdoc from tdf#94212, presumably because clear()
races against OWeakRefListener::dispose().

(cherry picked from commit debe788bcf3ec258b6b95df3db1f7bfeba881be1)

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

diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index a67f881..72b8896 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -34,6 +34,7 @@ namespace cppu
 {
 
 // due to static Reflection destruction from usr, there must be a mutex leak 
(#73272#)
+// this is used to lock all instances of OWeakConnectionPoint and 
OWeakRefListener as well as OWeakObject::m_pWeakConnectionPoint
 inline static Mutex & getWeakMutex()
 {
 static Mutex * s_pMutex = nullptr;
@@ -333,7 +334,7 @@ public:
 
 /// The reference counter.
 oslInterlockedCount m_aRefCount;
-/// The connection point of the weak object
+/// The connection point of the weak object, guarded by getWeakMutex()
 Reference< XAdapter >   m_XWeakConnectionPoint;
 };
 
@@ -438,12 +439,7 @@ void WeakReferenceHelper::clear()
 {
 if (m_pImpl)
 {
-if (m_pImpl->m_XWeakConnectionPoint.is())
-{
-m_pImpl->m_XWeakConnectionPoint->removeReference(
-static_cast(m_pImpl));
-m_pImpl->m_XWeakConnectionPoint.clear();
-}
+m_pImpl->dispose();
 m_pImpl->release();
 m_pImpl = nullptr;
 }
@@ -488,6 +484,7 @@ Reference< XInterface > WeakReferenceHelper::get() const
 {
 Reference< XAdapter > xAdp;
 {
+// must lock to access m_XWeakConnectionPoint
 MutexGuard guard(cppu::getWeakMutex());
 if( m_pImpl && m_pImpl->m_XWeakConnectionPoint.is() )
 xAdp = m_pImpl->m_XWeakConnectionPoint;
diff --git a/include/cppuhelper/weakref.hxx b/include/cppuhelper/weakref.hxx
index 458bd93..f8ea369 100644
--- a/include/cppuhelper/weakref.hxx
+++ b/include/cppuhelper/weakref.hxx
@@ -39,8 +39,14 @@ namespace uno
 
 class OWeakRefListener;
 
-/** The WeakReferenceHelper holds a weak reference to an object. This object 
must implement
-the css::uno::XWeak interface.  The implementation is thread safe.
+/** The WeakReferenceHelper holds a weak reference to an object.
+
+This object must implement the css::uno::XWeak interface.
+
+The WeakReferenceHelper itself is *not* thread safe, just as
+Reference itself isn't, but the implementation of the listeners etc.
+behind it *is* thread-safe, so multiple threads can have their own
+WeakReferences to the same XWeak object.
 */
 class CPPUHELPER_DLLPUBLIC WeakReferenceHelper
 {
@@ -113,8 +119,14 @@ protected:
 /// @endcond
 };
 
-/** The WeakReference<> holds a weak reference to an object. This object must 
implement
-the css::uno::XWeak interface.  The implementation is thread safe.
+/** The WeakReference<> holds a weak reference to an object.
+
+This object must implement the css::uno::XWeak interface.
+
+The WeakReference itself is *not* thread safe, just as
+Reference itself isn't, but the implementation of the listeners etc.
+behind it *is* thread-safe, so multiple threads can have their own
+WeakReferences to the same XWeak object.
 
 @tparam interface_type type of interface
 */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/networkdays.intl.fods | 1403 +++
 1 file changed, 1403 insertions(+)

New commits:
commit b7a217c1c43a5374d6f557cd946a9c0d7e4dc806
Author: Zdeněk Crhonek 
Date:   Thu Jun 16 20:06:39 2016 +0200

add NETWORDAYS.INTL test case

Change-Id: Ia78f9d29025e593dfa4202af67c95bdb5432d15c
Reviewed-on: https://gerrit.libreoffice.org/26383
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/networkdays.intl.fods 
b/sc/qa/unit/data/functions/fods/networkdays.intl.fods
new file mode 100644
index 000..3d11ed9
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/networkdays.intl.fods
@@ -0,0 +1,1403 @@
+
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-16T19:59:56.707410342P0D1LibreOfficeDev/5.2.0.0.alpha1$Linux_X86_64
 
LibreOffice_project/fa9416906e615f5f19ad8524176d2ed693662769
+ 
+  
+   0
+   0
+   31552
+   10696
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+  
+   3
+   25
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   jQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAswAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkE0AAASAENPTVBBVF9EVVBMRVhfTU9ERQoARFVQTEVYX09GRg==
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   £
+
+   
+  
+  
+   -
+   £

Re: Voting page in wiki

2016-06-17 Thread Bjoern Michaelsen
On Fri, Jun 17, 2016 at 04:02:43PM +0200, Thorsten Behrens wrote:
> It's a bit dubious to have a page that's not widely published, since
> the stats are heavily skewed then; and at the same time the reasons
> _not_ to publicize it widely are good ones & similar to the fact we
> don't have the feature in bugzilla...

FWIW, IIRC the page was created as a testballoon as some requested a "vote"
feature in bugzilla. I take the fact that the page isnt in a good state as a
sign that test balloon has crashed because it didnt provide useful
feedback/selections for our decentralized development effort.

So Id say, yeah, lets bury this.

Best,

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


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

2016-06-17 Thread Michael Stahl
 cppuhelper/source/weak.cxx |   11 ---
 include/cppuhelper/weakref.hxx |   20 
 2 files changed, 20 insertions(+), 11 deletions(-)

New commits:
commit 8020863d409eb441cf48c55450a7cd48fed05108
Author: Michael Stahl 
Date:   Fri Jun 17 13:35:08 2016 +0200

cppuhelper: WeakReference isn't thread-safe

... but its documentation claims that it is, which is partially
misleading, so fix both the documentation and the data race in
WeakReferenceHelper::clear().

This actually crashed in clear() in the multi-threaded ZipPackage code
on exporting the bugdoc from tdf#94212, presumably because clear()
races against OWeakRefListener::dispose().

Change-Id: I85665c11b8157e90d15e8263758e24e66efeb86c
(cherry picked from commit debe788bcf3ec258b6b95df3db1f7bfeba881be1)
Reviewed-on: https://gerrit.libreoffice.org/26424
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index b6abef5..ed1f772 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -34,6 +34,7 @@ namespace cppu
 {
 
 // due to static Reflection destruction from usr, there must be a mutex leak 
(#73272#)
+// this is used to lock all instances of OWeakConnectionPoint and 
OWeakRefListener as well as OWeakObject::m_pWeakConnectionPoint
 inline static Mutex & getWeakMutex()
 {
 static Mutex * s_pMutex = nullptr;
@@ -358,7 +359,7 @@ public:
 
 /// The reference counter.
 oslInterlockedCount m_aRefCount;
-/// The connection point of the weak object
+/// The connection point of the weak object, guarded by getWeakMutex()
 Reference< XAdapter >   m_XWeakConnectionPoint;
 };
 
@@ -463,12 +464,7 @@ void WeakReferenceHelper::clear()
 {
 if (m_pImpl)
 {
-if (m_pImpl->m_XWeakConnectionPoint.is())
-{
-m_pImpl->m_XWeakConnectionPoint->removeReference(
-static_cast(m_pImpl));
-m_pImpl->m_XWeakConnectionPoint.clear();
-}
+m_pImpl->dispose();
 m_pImpl->release();
 m_pImpl = nullptr;
 }
@@ -513,6 +509,7 @@ Reference< XInterface > WeakReferenceHelper::get() const
 {
 Reference< XAdapter > xAdp;
 {
+// must lock to access m_XWeakConnectionPoint
 MutexGuard guard(cppu::getWeakMutex());
 if( m_pImpl && m_pImpl->m_XWeakConnectionPoint.is() )
 xAdp = m_pImpl->m_XWeakConnectionPoint;
diff --git a/include/cppuhelper/weakref.hxx b/include/cppuhelper/weakref.hxx
index 7836494..9cd422b 100644
--- a/include/cppuhelper/weakref.hxx
+++ b/include/cppuhelper/weakref.hxx
@@ -39,8 +39,14 @@ namespace uno
 
 class OWeakRefListener;
 
-/** The WeakReferenceHelper holds a weak reference to an object. This object 
must implement
-the css::uno::XWeak interface.  The implementation is thread safe.
+/** The WeakReferenceHelper holds a weak reference to an object.
+
+This object must implement the css::uno::XWeak interface.
+
+The WeakReferenceHelper itself is *not* thread safe, just as
+Reference itself isn't, but the implementation of the listeners etc.
+behind it *is* thread-safe, so multiple threads can have their own
+WeakReferences to the same XWeak object.
 */
 class CPPUHELPER_DLLPUBLIC WeakReferenceHelper
 {
@@ -116,8 +122,14 @@ protected:
 /// @endcond
 };
 
-/** The WeakReference<> holds a weak reference to an object. This object must 
implement
-the css::uno::XWeak interface.  The implementation is thread safe.
+/** The WeakReference<> holds a weak reference to an object.
+
+This object must implement the css::uno::XWeak interface.
+
+The WeakReference itself is *not* thread safe, just as
+Reference itself isn't, but the implementation of the listeners etc.
+behind it *is* thread-safe, so multiple threads can have their own
+WeakReferences to the same XWeak object.
 
 @tparam interface_type type of interface
 */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/Rosemary/change-tracking' - sw/source xmloff/source

2016-06-17 Thread Rosemary Sebastian
 sw/source/core/unocore/unoredline.cxx   |   12 
 xmloff/source/text/XMLRedlineExport.cxx |2 +-
 2 files changed, 5 insertions(+), 9 deletions(-)

New commits:
commit 70c230c10ad6ba678c00cf5b61235e7c261c7393
Author: Rosemary Sebastian 
Date:   Fri Jun 17 20:24:52 2016 +0530

Prevent crash

This is not the correct way to find the element type.
Hardcode the element type as "text" for now, to see the character
start and end positions in the resulting xml.

Change-Id: I254769ee922d6ecfd593e590293ee964878b0d0f

diff --git a/sw/source/core/unocore/unoredline.cxx 
b/sw/source/core/unocore/unoredline.cxx
index 37743a0..b83a3ee 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -311,11 +311,7 @@ uno::Any  SwXRedlinePortion::GetPropertyValue( const 
OUString& rPropertyName, co
 }
 else if (rPropertyName == UNO_NAME_REDLINE_ELEMENT_TYPE)
 {
-SwNodeIndex* pNodeIdx = rRedline.GetContentIdx();
-if ( 2 < ( pNodeIdx->GetNode().EndOfSectionIndex() - 
pNodeIdx->GetNode().GetIndex() ) )
-aRet <<= OUString("paragraph");
-else
-aRet <<= OUString("text");
+aRet <<= OUString("text");
 }
 else if (rPropertyName == UNO_NAME_REDLINE_UNDO_START)
 {
@@ -323,7 +319,7 @@ uno::Any  SwXRedlinePortion::GetPropertyValue( const 
OUString& rPropertyName, co
 }
 else if (rPropertyName == UNO_NAME_REDLINE_UNDO_END)
 {
-aRet <<= rRedline.GetPoint()->nContent.GetNext()->GetIndex();
+aRet <<= rRedline.GetPoint()->nContent.GetIndex();
 }
 return aRet;
 }
@@ -357,13 +353,13 @@ uno::Sequence< beans::PropertyValue > 
SwXRedlinePortion::CreateRedlineProperties
 pRet[nPropIdx++].Value <<= !rRedline.IsDelLastPara();
 
 pRet[nPropIdx].Name = UNO_NAME_REDLINE_ELEMENT_TYPE;
-pRet[nPropIdx++].Value <<= OUString("paragraph");
+pRet[nPropIdx++].Value <<= OUString("text");
 
 pRet[nPropIdx].Name = UNO_NAME_REDLINE_UNDO_START;
 pRet[nPropIdx++].Value <<= rRedline.GetPoint()->nContent.GetIndex() + 1;
 
 pRet[nPropIdx].Name = UNO_NAME_REDLINE_UNDO_END;
-pRet[nPropIdx++].Value <<= rRedline.GetMark()->nContent.GetIndex() + 1;
+pRet[nPropIdx++].Value <<= rRedline.GetPoint()->nContent.GetIndex() + 1;
 
 SwNodeIndex* pNodeIdx = rRedline.GetContentIdx();
 if(pNodeIdx )
diff --git a/xmloff/source/text/XMLRedlineExport.cxx 
b/xmloff/source/text/XMLRedlineExport.cxx
index 8459764..6d44992 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -341,7 +341,7 @@ void XMLRedlineExport::ExportChangedRegion(
 rPropSet->getPropertyValue("RedlineUndoStart") >>= nCharStart;
 rPropSet->getPropertyValue("RedlineUndoEnd") >>= nCharEnd;
 
-XMLTokenEnum eElementType = XML_PARAGRAPH;
+XMLTokenEnum eElementType = XML_TEXT;
 OUString sElementType;
 aAny = rPropSet->getPropertyValue(sRedlineElementType);
 aAny >>= sElementType;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/commonsallayout' - 2 commits - configure.ac vcl/inc vcl/Library_vcl.mk vcl/source

2016-06-17 Thread Akash Jain
Rebased ref, commits from common ancestor:
commit 1f9cba0539e22bcfd92bff4dde9c04625a839914
Author: Akash Jain 
Date:   Tue Jun 14 14:52:16 2016 +0530

Modify HARFBUZZ_LIBS flag if compiling with MSVC

MSVC has a different format for specifying libs to be linked.
Therefore, modify libs flag accordingly.

Change-Id: Ib919c4b6b0cdac47a8a6ad6730d20e19bc05b0d4

diff --git a/configure.ac b/configure.ac
index b9565a9..e0993b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9219,6 +9219,9 @@ if test "$with_harfbuzz" = "yes" -o \( $_os != WINNT -a 
$_os != Darwin -a $_os !
 else
 libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz >= 
0.9.10],[-I${WORKDIR}/UnpackedTarball/harfbuzz/src],["-L${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs
 -lharfbuzz -lharfbuzz-icu"])
 fi
+if test "$COM" = "MSC"; then # override the above
+
HARFBUZZ_LIBS="${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs/libharfbuzz.lib 
${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs/libharfbuzz-icu.lib"
+fi
 else
 AC_MSG_RESULT([no])
 fi
commit 9934d2bd43b9cf5d756a8c1b83e37819422dd36f
Author: Akash Jain 
Date:   Tue Jun 14 14:38:12 2016 +0530

New CommonSalLayout class created

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index a43402b..026a42d 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -299,6 +299,8 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/gdi/textlayout \
 vcl/source/gdi/virdev \
 vcl/source/gdi/wall \
+vcl/source/gdi/scrptrun \
+vcl/source/gdi/CommonSalLayout \
 vcl/source/bitmap/bitmapfilter \
 vcl/source/bitmap/bitmapscalesuper \
 vcl/source/bitmap/BitmapScaleConvolution \
diff --git a/vcl/inc/CommonSalLayout.hxx b/vcl/inc/CommonSalLayout.hxx
new file mode 100755
index 000..0d941f9
--- /dev/null
+++ b/vcl/inc/CommonSalLayout.hxx
@@ -0,0 +1,55 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifdef _WIN32
+#include "win/winlayout.hxx"
+#elif defined(MACOSX) || defined(IOS)
+// TODO add quartz headers
+#else
+#include "unx/freetype_glyphcache.hxx"
+#endif
+
+#include 
+#include 
+#include 
+
+class CommonSalLayout : public GenericSalLayout
+{
+hb_face_t* mpHBFace;
+FontSelectPattern maFontSelData;
+css::uno::Reference mxBreak;
+#ifdef _WIN32
+HDC mhDC;
+#endif
+
+public:
+#if defined(_WIN32)
+explicitCommonSalLayout(HDC, const WinFontFace&, 
WinFontInstance&);
+#elif defined(MACOSX) || defined(IOS)
+explicitCommonSalLayout(const CoreTextStyle*);
+#else
+explicitCommonSalLayout(ServerFont&);
+#endif
+virtual ~CommonSalLayout();
+voidSetNeedFallback(ImplLayoutArgs&, sal_Int32, bool);
+voidAdjustLayout(ImplLayoutArgs&) override;
+virtual boolLayoutText(ImplLayoutArgs&) override;
+virtual voidDrawText( SalGraphics& ) const override;
+std::shared_ptr CreateTextLayoutCache(OUString 
const&) const override;
+};
diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
new file mode 100755
index 000..c01b2eb
--- /dev/null
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -0,0 +1,401 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apac

[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - bin/unpack-sources

2016-06-17 Thread Christian Lohmaier
 0 files changed

New commits:
commit a9593e8db116edd000a7a19f7d83256474faed6f
Author: Christian Lohmaier 
Date:   Fri Jun 17 16:27:00 2016 +0200

tdf#100453 – bin/unpack-sources needs to be executable

otherwise building from source-tarballs fails when it tries to extract
fetched submodule tarballs

Change-Id: I75bcd6821e244ca2a3375ec2916ee7c38ec9844e
(cherry picked from commit 10f112376b5767aacef99aff239c87b17ac38d27)

diff --git a/bin/unpack-sources b/bin/unpack-sources
old mode 100644
new mode 100755
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - bin/unpack-sources

2016-06-17 Thread Christian Lohmaier
 0 files changed

New commits:
commit 08664ec1f7553acc88719a2b8779cca2eab75f76
Author: Christian Lohmaier 
Date:   Fri Jun 17 16:27:00 2016 +0200

tdf#100453 – bin/unpack-sources needs to be executable

otherwise building from source-tarballs fails when it tries to extract
fetched submodule tarballs

Change-Id: I75bcd6821e244ca2a3375ec2916ee7c38ec9844e
(cherry picked from commit 10f112376b5767aacef99aff239c87b17ac38d27)

diff --git a/bin/unpack-sources b/bin/unpack-sources
old mode 100644
new mode 100755
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/unpack-sources

2016-06-17 Thread Christian Lohmaier
 0 files changed

New commits:
commit 10f112376b5767aacef99aff239c87b17ac38d27
Author: Christian Lohmaier 
Date:   Fri Jun 17 16:27:00 2016 +0200

tdf#100453 – bin/unpack-sources needs to be executable

otherwise building from source-tarballs fails when it tries to extract
fetched submodule tarballs

Change-Id: I75bcd6821e244ca2a3375ec2916ee7c38ec9844e

diff --git a/bin/unpack-sources b/bin/unpack-sources
old mode 100644
new mode 100755
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Miklos Vajna
 cui/source/inc/cuitabarea.hxx|4 ++--
 cui/source/tabpages/tpgradnt.cxx |4 ++--
 cui/source/tabpages/tphatch.cxx  |4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit eb0fb156e483bf20cb046f0226f0fc363c37f91a
Author: Miklos Vajna 
Date:   Fri Jun 17 16:13:56 2016 +0200

cui: fix loplugin:passstuffbyref warnings

Change-Id: Ic756db3decb4b4bfde345bc0adc092907622287e

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 98f2c32..b382e72 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -429,7 +429,7 @@ private:
 
 long CheckChanges_Impl();
 void SetControlState_Impl( css::awt::GradientStyle eXGS );
-sal_Int32 SearchGradientList(OUString aGradientName);
+sal_Int32 SearchGradientList(const OUString& rGradientName);
 
 public:
 SvxGradientTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  );
@@ -512,7 +512,7 @@ private:
 DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void );
 
 long CheckChanges_Impl();
-sal_Int32 SearchHatchList(OUString aHatchName);
+sal_Int32 SearchHatchList(const OUString& rHatchName);
 
 public:
 SvxHatchTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  );
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 6ab4d12..a5aad0a 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -927,7 +927,7 @@ void SvxGradientTabPage::SetControlState_Impl( 
css::awt::GradientStyle eXGS )
 }
 }
 
-sal_Int32 SvxGradientTabPage::SearchGradientList(OUString aGradientName)
+sal_Int32 SvxGradientTabPage::SearchGradientList(const OUString& rGradientName)
 {
 long nCount = m_pGradientList->Count();
 bool bValidGradientName = true;
@@ -935,7 +935,7 @@ sal_Int32 SvxGradientTabPage::SearchGradientList(OUString 
aGradientName)
 
 for(long i = 0;i < nCount && bValidGradientName;i++)
 {
-if(aGradientName == m_pGradientList->GetGradient( i )->GetName())
+if(rGradientName == m_pGradientList->GetGradient( i )->GetName())
 {
 nPos = i;
 bValidGradientName = false;
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index a1a2c2b..489ab78 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -313,7 +313,7 @@ long SvxHatchTabPage::CheckChanges_Impl()
 return 0L;
 }
 
-sal_Int32 SvxHatchTabPage::SearchHatchList(OUString aHatchName)
+sal_Int32 SvxHatchTabPage::SearchHatchList(const OUString& rHatchName)
 {
 long nCount = m_pHatchingList->Count();
 bool bValidHatchName = true;
@@ -321,7 +321,7 @@ sal_Int32 SvxHatchTabPage::SearchHatchList(OUString 
aHatchName)
 
 for(long i = 0;i < nCount && bValidHatchName;i++)
 {
-if(aHatchName == m_pHatchingList->GetHatch( i )->GetName())
+if(rHatchName == m_pHatchingList->GetHatch( i )->GetName())
 {
 nPos = i;
 bValidHatchName = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [libreoffice-design] Minutes of the Design Hangout: 2016-Jun-17

2016-06-17 Thread Stephan Bergmann

On 06/17/2016 03:47 PM, Heiko Tietze wrote:

Enhancements and proposals
+ Push extensions (Heiko)
  + e.g. tdf#71176, tdf#91874, or color replacer, or overall paragraph 
changer etc.
  + Extensions keep the main UI clean and simple but allows to enhance the 
app for special use cases
  + Suggestion is to have a separate component/keyword in the bugtracker 
for tasks that can be enhancements
  + Find users/coders to work on extensions
  + We have a component extension (kendy), qa team should make clear what 
it is used for (Jay)
  + Would need some needDevEval before moving a bug to this component (Jay)
  + Will bring it up to ESC for pushing it to the community


Just to clarify: You're talking about .oxt extensions here?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-06-17 Thread Katarina Behrens
 sd/Module_sd.mk |1 -
 1 file changed, 1 deletion(-)

New commits:
commit fcd3564077d4cdcbc33ea1fcb6e1567371d10201
Author: Katarina Behrens 
Date:   Fri Jun 17 16:10:26 2016 +0200

Let's not run this w/ the rest of the tests for now

Change-Id: Ia5fc46f5030285049acf4836ba4cbd6285cbe5ae

diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk
index 3c40ce4..80f31fa 100644
--- a/sd/Module_sd.mk
+++ b/sd/Module_sd.mk
@@ -32,7 +32,6 @@ $(eval $(call gb_Module_add_check_targets,sd,\
 CppunitTest_sd_import_tests \
 CppunitTest_sd_export_tests \
 CppunitTest_sd_filters_test \
-CppunitTest_sd_dialogs_test \
 CppunitTest_sd_misc_tests \
 CppunitTest_sd_html_export_tests \
 ))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Caolán McNamara
 external/mdds/README |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a72b705ec232d2d3abd4c4dcff994751591e1135
Author: Caolán McNamara 
Date:   Fri Jun 17 15:09:24 2016 +0100

update mdds README for new home

Change-Id: I2641abe8e049361d5eb92e19b9ed57b8e7209386

diff --git a/external/mdds/README b/external/mdds/README
index bd635ee..140f07b 100644
--- a/external/mdds/README
+++ b/external/mdds/README
@@ -1,4 +1,4 @@
-Multi-dimensional data structure (mdds) library, available from 
[http://code.google.com/p/multidimalgorithm/].
+Multi-dimensional data structure (mdds) library, available from 
[https://gitlab.com/mdds/mdds].
 
 mdds primarily provides data structures that are used by the calc
-core.
\ No newline at end of file
+core.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/Rosemary/change-tracking' - sw/source xmloff/source

2016-06-17 Thread Rosemary Sebastian
 sw/source/core/unocore/unoredline.cxx   |   24 
 xmloff/source/text/XMLRedlineExport.cxx |2 +-
 2 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit ef1380d84b36bf0f8d8bb5b77c2eabe4a0d04f61
Author: Rosemary Sebastian 
Date:   Fri Jun 17 19:32:04 2016 +0530

Get the start position of redline

Change-Id: I3fd5674b47e33f769cbb22203ab92444a1bb8d47

diff --git a/sw/source/core/unocore/unoredline.cxx 
b/sw/source/core/unocore/unoredline.cxx
index 0f8d115..37743a0 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -317,15 +317,13 @@ uno::Any  SwXRedlinePortion::GetPropertyValue( const 
OUString& rPropertyName, co
 else
 aRet <<= OUString("text");
 }
-else if (rPropertyName == UNO_NAME_REDLINE_UNDO_START || rPropertyName == 
UNO_NAME_REDLINE_UNDO_END)
+else if (rPropertyName == UNO_NAME_REDLINE_UNDO_START)
 {
-sal_Int32 nStart, nEnd;
-   SwNodeIndex* pNodeIdx = rRedline.GetContentIdx();
-   rRedline.CalcStartEnd(pNodeIdx->GetNode().GetIndex(), nStart, nEnd);
-   if(rPropertyName == UNO_NAME_REDLINE_UNDO_START)
-   aRet <<= nStart;
-   else
-   aRet <<= nEnd;
+aRet <<= rRedline.GetPoint()->nContent.GetIndex() + 1;
+}
+else if (rPropertyName == UNO_NAME_REDLINE_UNDO_END)
+{
+aRet <<= rRedline.GetPoint()->nContent.GetNext()->GetIndex();
 }
 return aRet;
 }
@@ -361,6 +359,12 @@ uno::Sequence< beans::PropertyValue > 
SwXRedlinePortion::CreateRedlineProperties
 pRet[nPropIdx].Name = UNO_NAME_REDLINE_ELEMENT_TYPE;
 pRet[nPropIdx++].Value <<= OUString("paragraph");
 
+pRet[nPropIdx].Name = UNO_NAME_REDLINE_UNDO_START;
+pRet[nPropIdx++].Value <<= rRedline.GetPoint()->nContent.GetIndex() + 1;
+
+pRet[nPropIdx].Name = UNO_NAME_REDLINE_UNDO_END;
+pRet[nPropIdx++].Value <<= rRedline.GetMark()->nContent.GetIndex() + 1;
+
 SwNodeIndex* pNodeIdx = rRedline.GetContentIdx();
 if(pNodeIdx )
 {
@@ -369,10 +373,6 @@ uno::Sequence< beans::PropertyValue > 
SwXRedlinePortion::CreateRedlineProperties
 uno::Reference xRet = new 
SwXRedlineText(rRedline.GetDoc(), *pNodeIdx);
 pRet[nPropIdx].Name = UNO_NAME_REDLINE_TEXT;
 pRet[nPropIdx++].Value <<= xRet;
-pRet[nPropIdx].Name = UNO_NAME_REDLINE_UNDO_START;
-pRet[nPropIdx++].Value <<= pNodeIdx->GetNode().GetIndex();
-pRet[nPropIdx].Name = UNO_NAME_REDLINE_UNDO_END;
-pRet[nPropIdx++].Value <<= pNodeIdx->GetNode().EndOfSectionIndex();
 }
 else {
 OSL_FAIL("Empty section in redline portion! (end node immediately 
follows start node)");
diff --git a/xmloff/source/text/XMLRedlineExport.cxx 
b/xmloff/source/text/XMLRedlineExport.cxx
index 1d085b8..8459764 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -337,7 +337,7 @@ void XMLRedlineExport::ExportChangedRegion(
 OUString sType;
 aAny >>= sType;
 
-sal_Int16 nParagraphIdx = 2, nCharStart, nCharEnd;
+sal_uInt32 nParagraphIdx = 2, nCharStart, nCharEnd;
 rPropSet->getPropertyValue("RedlineUndoStart") >>= nCharStart;
 rPropSet->getPropertyValue("RedlineUndoEnd") >>= nCharEnd;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Voting page in wiki

2016-06-17 Thread Thorsten Behrens
Norbert Thiebaud wrote:
> > Is that a page we actively use (if so, I need to give it more attention) ?
> 
> No.
>
I'd even say 'emphatically not'. :)

It's a bit dubious to have a page that's not widely published, since
the stats are heavily skewed then; and at the same time the reasons
_not_ to publicize it widely are good ones & similar to the fact we
don't have the feature in bugzilla...

Cheers,

-- Thorsten


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


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

2016-06-17 Thread Katarina Behrens
 sd/qa/unit/dialogs-test.cxx   |   20 ++--
 sfx2/source/dialog/tabdlg.cxx |4 ++--
 2 files changed, 16 insertions(+), 8 deletions(-)

New commits:
commit bae9bd0c7d096dcf0f8ef0806f918acc77f2fa07
Author: Katarina Behrens 
Date:   Fri Jun 17 16:03:34 2016 +0200

Fix build after rebase

Change-Id: I882c9fa6349d59419be5a5b2ed49a712eb4c07f1

diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index 2103a13..c5a6d4d 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -37,6 +37,7 @@
 #include 
 #include "unomodel.hxx"
 #include "ViewShell.hxx"
+#include "Window.hxx"
 #include "drawview.hxx"
 #include "DrawViewShell.hxx"
 #include 
@@ -290,6 +291,7 @@ VclAbstractDialog* 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 
 // needs an SfxItemSet, use the one from the 1st object
 pRetval = getSdAbstractDialogFactory()->CreateCopyDlg(
+getViewShell()->GetActiveWindow(),
 getSfxItemSetFromSdrObject(),
 pColorList,
 getDrawView());
@@ -302,6 +304,7 @@ VclAbstractDialog* 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 CPPUNIT_ASSERT(pDrawDoc);
 
 pRetval = getSdAbstractDialogFactory()->CreateSdCustomShowDlg(
+getViewShell()->GetActiveWindow(),
 *pDrawDoc);
 break;
 }
@@ -311,6 +314,7 @@ VclAbstractDialog* 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 // needs an SfxItemSet, use an empty constructed one
 // needs a 'SfxObjectShell* pDocShell', crashes without
 pRetval = getSdAbstractDialogFactory()->CreateSdTabCharDialog(
+getViewShell()->GetActiveWindow(),
 &getEmptySfxItemSet(),
 getDocShell());
 break;
@@ -321,6 +325,7 @@ VclAbstractDialog* 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 // needs a special SfxItemSet with merged content from page and 
other stuff, crashes without that (2nd page)
 // needs a 'SfxObjectShell* pDocShell', crashes without. Also 
sufficient: FillStyleItemSet with XFILL_NONE set
 pRetval = getSdAbstractDialogFactory()->CreateSdTabPageDialog(
+getViewShell()->GetActiveWindow(),
 &getEmptyFillStyleSfxItemSet(),
 getDocShell(),
 true);
@@ -328,11 +333,7 @@ VclAbstractDialog* 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 }
 case 6:
 {
-// CreateAssistentDlg(bool bAutoPilot) override;
-// This is also a 'wizard' in that it has prev/next buttons and 
implicitly
-// multiple pages. To make use of that it is necessary that the 
implementation
-// supports the 'Screenshot interface', see AssistentDlg class
-pRetval = getSdAbstractDialogFactory()->CreateAssistentDlg(true);
+// CreateAssistentDlg(bool bAutoPilot) has been dropped
 break;
 }
 case 7:
@@ -353,6 +354,7 @@ VclAbstractDialog* 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_X, 0));
 aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_Y, 0));
 pRetval = getSdAbstractDialogFactory()->CreateSdSnapLineDlg(
+getViewShell()->GetActiveWindow(),
 aNewAttr,
 getDrawView());
 break;
@@ -372,6 +374,7 @@ VclAbstractDialog* 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 aNewAttr.Put(SdAttrLayerLocked());
 aNewAttr.Put(SdAttrLayerThisPage());
 pRetval = getSdAbstractDialogFactory()->CreateSdInsertLayerDlg(
+getViewShell()->GetActiveWindow(),
 aNewAttr,
 true, // alternative: false
 SD_RESSTR(STR_INSERTLAYER) /* alternative: STR_MODIFYLAYER */);
@@ -384,6 +387,7 @@ VclAbstractDialog* 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 CPPUNIT_ASSERT(pDrawDoc);
 const OUString aFileName("foo");
 pRetval = getSdAbstractDialogFactory()->CreateSdInsertPagesObjsDlg(
+getViewShell()->GetActiveWindow(),
 pDrawDoc,
 nullptr,
 aFileName);
@@ -409,6 +413,7 @@ VclAbstractDialog* 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 {
 // CreateSdOutlineBulletTabDlg(const SfxItemSet* pAttr, 
::sd::View* pView = nullptr) override;
 pRetval = 
getSdAbstractDialogFactory()->CreateSdOutlineBulletTabDlg(
+getViewShell()->GetActiveWindow(),
 &getEmptySfxItemSet(),
 getDrawView());
 break;
@@ -417,6 +422,7 @@ VclAbstractDialog* 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 {
 // CreateSdParagraphTabDlg(const SfxItemSet* pAttr) override;
 pRetval = getSdAbstractDialogFact

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

2016-06-17 Thread Susobhan Ghosh
 sw/inc/cmdid.h   |8 +
 sw/sdi/_viewsh.sdi   |   40 +
 sw/sdi/swriter.sdi   |  144 +++
 sw/source/uibase/sidebar/PageFooterPanel.cxx |  201 +--
 sw/source/uibase/sidebar/PageFooterPanel.hxx |   41 +
 sw/source/uibase/sidebar/PageHeaderPanel.cxx |  192 +
 sw/source/uibase/sidebar/PageHeaderPanel.hxx |   33 +++-
 sw/source/uibase/sidebar/SwPanelFactory.cxx  |2 
 sw/source/uibase/uiview/viewtab.cxx  |  165 ++
 sw/uiconfig/swriter/ui/pagefooterpanel.ui|  153 
 sw/uiconfig/swriter/ui/pageheaderpanel.ui|  151 
 11 files changed, 958 insertions(+), 172 deletions(-)

New commits:
commit b461236af355d8f504064ac6cfe259b9f8a7b01e
Author: Susobhan Ghosh 
Date:   Wed Jun 1 19:29:34 2016 +0530

tdf#83830: Page Header Panel & Page Footer Panel

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

diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 94bbb0e..a832571 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -850,6 +850,14 @@
 #define SID_ATTR_PAGE_COLUMN(FN_SIDEBAR + 0)
 #define SID_ATTR_PAGE_ULSPACE   (FN_SIDEBAR + 1)
 #define SID_ATTR_PAGE_LRSPACE   (FN_SIDEBAR + 2)
+#define SID_ATTR_PAGE_HEADER(FN_SIDEBAR + 3)
+#define SID_ATTR_PAGE_HEADER_LRMARGIN   (FN_SIDEBAR + 4)
+#define SID_ATTR_PAGE_HEADER_SPACING(FN_SIDEBAR + 5)
+#define SID_ATTR_PAGE_HEADER_LAYOUT (FN_SIDEBAR + 6)
+#define SID_ATTR_PAGE_FOOTER(FN_SIDEBAR + 7)
+#define SID_ATTR_PAGE_FOOTER_LRMARGIN   (FN_SIDEBAR + 8)
+#define SID_ATTR_PAGE_FOOTER_SPACING(FN_SIDEBAR + 9)
+#define SID_ATTR_PAGE_FOOTER_LAYOUT (FN_SIDEBAR + 10)
 
 //Member IDs for Fill / SetVariable of items
 #define MID_STYLE   0xe0
diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index 6113dc9..c63d359 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -441,6 +441,46 @@ interface BaseTextEditView
 ExecMethod = ExecTabWin ;
 StateMethod = StateTabWin ;
 ]
+SID_ATTR_PAGE_HEADER
+[
+ExecMethod = ExecTabWin ;
+StateMethod = StateTabWin ;
+]
+SID_ATTR_PAGE_HEADER_LRMARGIN
+[
+ExecMethod = ExecTabWin ;
+StateMethod = StateTabWin ;
+]
+SID_ATTR_PAGE_HEADER_SPACING
+[
+ExecMethod = ExecTabWin ;
+StateMethod = StateTabWin ;
+]
+SID_ATTR_PAGE_HEADER_LAYOUT
+[
+ExecMethod = ExecTabWin ;
+StateMethod = StateTabWin ;
+]
+SID_ATTR_PAGE_FOOTER
+[
+ExecMethod = ExecTabWin ;
+StateMethod = StateTabWin ;
+]
+SID_ATTR_PAGE_FOOTER_LRMARGIN
+[
+ExecMethod = ExecTabWin ;
+StateMethod = StateTabWin ;
+]
+SID_ATTR_PAGE_FOOTER_SPACING
+[
+ExecMethod = ExecTabWin ;
+StateMethod = StateTabWin ;
+]
+SID_ATTR_PAGE_FOOTER_LAYOUT
+[
+ExecMethod = ExecTabWin ;
+StateMethod = StateTabWin ;
+]
 SID_ATTR_PAGE_ULSPACE
 [
 ExecMethod = ExecTabWin ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 1b6c16a..d4246d6 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -7489,6 +7489,150 @@ SvxLongLRSpaceItem SwPageLRMargin SID_ATTR_PAGE_LRSPACE
 GroupId = GID_FORMAT;
 ]
 
+SfxBoolItem SwPageHeaderItem SID_ATTR_PAGE_HEADER
+
+[
+AutoUpdate = FALSE,
+FastCall = FALSE,
+ReadOnlyDoc = TRUE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+
+AccelConfig = FALSE,
+MenuConfig = FALSE,
+ToolBoxConfig = FALSE,
+GroupId = GID_FORMAT;
+]
+
+SvxLongLRSpaceItem SwPageHeaderLRMargin SID_ATTR_PAGE_HEADER_LRMARGIN
+
+[
+AutoUpdate = FALSE,
+FastCall = FALSE,
+ReadOnlyDoc = TRUE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+
+AccelConfig = FALSE,
+MenuConfig = FALSE,
+ToolBoxConfig = FALSE,
+GroupId = GID_FORMAT;
+]
+
+SvxLongULSpaceItem SwPageHeaderSpacing SID_ATTR_PAGE_HEADER_SPACING
+
+[
+AutoUpdate = FALSE,
+FastCall = FALSE,
+ReadOnlyDoc = TRUE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+
+AccelConfig = FALSE,
+MenuConfig = FALSE,
+ToolBoxConfig = FALSE,
+GroupId = GID_FORMAT;
+]
+
+SfxInt16Item SwPageHeaderLayout SID_ATTR_PAGE_HEADER_LAYOUT
+
+[
+AutoUpdate = FALSE,
+FastCall = FALSE,
+ReadOnlyDoc = TRUE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+
+AccelConfig = FALSE,
+MenuConfig = FALSE,
+ToolBoxConfig = FALSE,
+GroupId = GID_FORMAT;
+]
+
+SfxBoolItem SwPageFooterItem SID_ATTR_PAGE_FOOTER
+
+[
+AutoUpdate

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

2016-06-17 Thread Akshay Deep
 sfx2/source/control/recentdocsview.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit a503fb0df9960bb1a76a7a35273d740d0ea31f32
Author: Akshay Deep 
Date:   Fri Jun 17 09:39:01 2016 +0530

tdf#79198 START CENTER: Close button doesn't reappear after being clicked

Change-Id: I23e3aed71eec85e8b8f0aceac125809fd56be4d5
Reviewed-on: https://gerrit.libreoffice.org/26399
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 27bd030aa033565dfdff56c298c797c80cee5160)
Reviewed-on: https://gerrit.libreoffice.org/26416

diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index 74e3a7f..15c2400 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -232,8 +232,14 @@ void RecentDocsView::MouseButtonUp(const MouseEvent& rMEvt)
 ThumbnailViewItem* pItem = ImplGetItem(nPos);
 
 if (pItem && nPos == mnLastMouseDownItem)
+{
 pItem->MouseButtonUp(rMEvt);
 
+ThumbnailViewItem* pNewItem = ImplGetItem(nPos);
+if(pNewItem)
+pNewItem->setHighlight(true);
+}
+
 mnLastMouseDownItem = THUMBNAILVIEW_ITEM_NOTFOUND;
 
 if (pItem)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Stephan Bergmann
 sax/qa/cppunit/xmlimport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 48d71ee45fbf1e70b9b46ab61dcf3b45e13f2e44
Author: Stephan Bergmann 
Date:   Fri Jun 17 15:53:11 2016 +0200

loplugin:passstuffbyref

Change-Id: I2fb13854a6da3f114dba386169e5aef7f741b922

diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index fe4af60..76c2445 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -83,7 +83,7 @@ private:
 public:
 TestDocumentHandler() {}
 const OUString& getString() { return m_aStr; }
-void setString( const OUString aStr ) { m_aStr = aStr; }
+void setString( const OUString & aStr ) { m_aStr = aStr; }
 
 // XDocumentHandler
 virtual void SAL_CALL startDocument() throw (SAXException, 
RuntimeException, exception) override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Stephan Bergmann
 sax/qa/cppunit/xmlimport.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 0ce234f954368c4a508740669b1703f5c186
Author: Stephan Bergmann 
Date:   Fri Jun 17 15:58:19 2016 +0200

loplugin:refcounting

Change-Id: I39fbc89cffe25e85b8cd1f2e36f0a20c07e33497

diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index 76c2445..bc2d70b 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -351,12 +351,12 @@ class XMLImportTest : public test::BootstrapFixture
 {
 private:
 OUString m_sDirPath;
-Reference< TestDocumentHandler > m_xDocumentHandler;
-Reference< TestFastDocumentHandler > m_xFastDocumentHandler;
+rtl::Reference< TestDocumentHandler > m_xDocumentHandler;
+rtl::Reference< TestFastDocumentHandler > m_xFastDocumentHandler;
 Reference< XParser > m_xParser;
 Reference< XFastParser > m_xFastParser;
 Reference< XParser > m_xLegacyFastParser;
-Reference< TestLegacyDocumentHandler > m_xLegacyDocumentHandler;
+rtl::Reference< TestLegacyDocumentHandler > m_xLegacyDocumentHandler;
 Reference< XFastTokenHandler > m_xFastTokenHandler;
 
 public:
@@ -381,12 +381,12 @@ void XMLImportTest::setUp()
 m_xFastTokenHandler.set( new TestTokenHandler() );
 m_xParser = Parser::create( xContext );
 m_xFastParser = FastParser::create( xContext );
-m_xParser->setDocumentHandler( m_xDocumentHandler );
-m_xFastParser->setFastDocumentHandler( m_xFastDocumentHandler );
+m_xParser->setDocumentHandler( m_xDocumentHandler.get() );
+m_xFastParser->setFastDocumentHandler( m_xFastDocumentHandler.get() );
 m_xFastParser->setTokenHandler( m_xFastTokenHandler );
 m_xLegacyFastParser.set( 
xContext->getServiceManager()->createInstanceWithContext
 ( "com.sun.star.xml.sax.LegacyFastParser", xContext ), 
UNO_QUERY );
-m_xLegacyFastParser->setDocumentHandler( m_xLegacyDocumentHandler );
+m_xLegacyFastParser->setDocumentHandler( m_xLegacyDocumentHandler.get() );
 m_sDirPath = m_directories.getPathFromSrc( "/sax/qa/data/" );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Minutes of the Design Hangout: 2016-Jun-17

2016-06-17 Thread Heiko Tietze
Present:
+ Cor, Kendy, Bubli, Samuel, Jay, Heiko, Akshay, Sushobhan

Confirmed easy hacks
+ https://bugs.documentfoundation.org/show_bug.cgi?id=92152 (half arrow 
head; skill: svg/design)
  + Blog post: 
https://docs.google.com/document/d/1lgAD-aE54IswyAwg6yJ6MeTstCjznPvQR1nV_R95OXs/edit#
  + like the idea, comunication with Jan is necessary (and was done over 
the ML) (kendy)
  + consider that credits/copyrigths will not be given to the designer if 
the code is commited by someone else (Bubli)
  + publish (all)

GSoC
  * Template Manager (Akshay)
+ Patches are merged, qa/documentation is to be done now
  * Progress of Area Fill project (Rishabh)
  + Pattern/bitmap split will be finshed today
  + Creating the new bitmap tab is planned for next week
  * Progress of Sidebar Improvements (Susobhan)
  + Styles Panel patch finished, up for review - 
https://gerrit.libreoffice.org/#/c/26020/
  + Merged Page Background Panel to master (from Impress to Draw), should 
be in 5.2
  + Working on existing issues and enhancements for Area Content Panel - 
https://bugs.documentfoundation.org/show_bug.cgi?id=90078#c4
  + Start with Shapes Tab next week after Area Content Panel enhancements
   * Notebokbar (kendy)
 + Rework of code is ongoing
   * Table Styles (kendy)
 + Focus on core work; import/export to odf
 + Table style is Writer specific and not relevant for Draw/Impress and Calc

Enhancements and proposals
+ Push extensions (Heiko)
  + e.g. tdf#71176, tdf#91874, or color replacer, or overall paragraph 
changer etc.
  + Extensions keep the main UI clean and simple but allows to enhance the 
app for special use cases
  + Suggestion is to have a separate component/keyword in the bugtracker 
for tasks that can be enhancements
  + Find users/coders to work on extensions
  + We have a component extension (kendy), qa team should make clear what 
it is used for (Jay)
  + Would need some needDevEval before moving a bug to this component (Jay)
  + Will bring it up to ESC for pushing it to the community
  
+ Disable automatic linking of urls by default (Samuel)
  + https://bugs.documentfoundation.org/show_bug.cgi?id=100424
  + Sticking with common behavior is preferrable (Jay)
  + Fixing all the bugs has first priority
  + Bug closed as WONTFIX

+ Results from poll about bookmarks on root level
  + https://plus.google.com/107566594492891737454/posts/FA4RgWeUDmT
  + 35% for simplicity, 65% for functionality (bookmark and cross-reference 
at the root level) (48 votes)
  + Reversed and placed at root level - https://gerrit.libreoffice.org/26418

signature.asc
Description: This is a digitally signed message part.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: officecfg/registry sw/uiconfig

2016-06-17 Thread Yousuf Philips
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |8 

 sw/uiconfig/swriter/menubar/menubar.xml  |8 
++--
 2 files changed, 2 insertions(+), 14 deletions(-)

New commits:
commit 42dc04de01cb937b5a64d23f54e8dfe5f4c9b35f
Author: Yousuf Philips 
Date:   Fri Jun 17 17:40:19 2016 +0400

tdf#91781 Move bookmark and cross-reference to root insert menu

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

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index e1024f8..c077a8e 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -3256,14 +3256,6 @@
   1
 
   
-  
-
-  ~Bookmark and Cross-reference
-
-
-  1
-
-  
   
 
   Footnote and Endno~te
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml 
b/sw/uiconfig/swriter/menubar/menubar.xml
index 914a6ae..2002dad 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -262,12 +262,8 @@
   
   
   
-  
-
-  
-  
-
-  
+  
+  
   
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Maxim Monastirsky
 framework/source/uielement/popuptoolbarcontroller.cxx |   48 ++
 1 file changed, 27 insertions(+), 21 deletions(-)

New commits:
commit 003431294d7c02d1acc24a822f7550e45db2dbb1
Author: Maxim Monastirsky 
Date:   Thu Jun 16 20:11:14 2016 +0300

SaveToolbarController: back to using XStorable

See 747a0fdda2a7723c2f8a8a022b468bcf29c700e3
("SaveToolbarController: Better support of readonly docs")
for the background. However this doesn't work, because
the save slot is disabled in other cases too, not just for
r/o docs (e.g. locked UI during file save, or when cond.
formatting window open in Calc).

Until a better solution is found, at least make sure that
the button is disabled, instead of going into the normal
save mode, which doesn't work.

Change-Id: If6e1b91b7c780fffac22cdb25c82bbd0a8520dc4
(cherry picked from commit 011128aa9493a680c3e9da6d074f125a90ec455c)
Reviewed-on: https://gerrit.libreoffice.org/26417
Reviewed-by: Maxim Monastirsky 
Tested-by: Maxim Monastirsky 

diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx 
b/framework/source/uielement/popuptoolbarcontroller.cxx
index 2bdce6a..5d7b6d8 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -356,16 +357,15 @@ public:
 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 
throw ( css::uno::RuntimeException ) override;
 
 private:
-bool m_bSaveAsModeAllowed;
-bool m_bSaveAsModeActive;
+bool m_bReadOnly;
 bool m_bModified;
+css::uno::Reference< css::frame::XStorable > m_xStorable;
 css::uno::Reference< css::util::XModifiable > m_xModifiable;
 };
 
 SaveToolbarController::SaveToolbarController( const css::uno::Reference< 
css::uno::XComponentContext >& rxContext )
 : ImplInheritanceHelper( rxContext, ".uno:SaveAsMenu" )
-, m_bSaveAsModeAllowed( true )
-, m_bSaveAsModeActive( false )
+, m_bReadOnly( false )
 , m_bModified( false )
 {
 }
@@ -377,22 +377,22 @@ void SaveToolbarController::initialize( const 
css::uno::Sequence< css::uno::Any
 
 ToolBox* pToolBox = nullptr;
 sal_uInt16 nId = 0;
-if ( getToolboxId( nId, &pToolBox ) && pToolBox->GetItemCommand( nId ) != 
m_aCommandURL )
-{
-m_bSaveAsModeAllowed = false;
-pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) & ~ 
ToolBoxItemBits::DROPDOWN );
-}
+if ( !getToolboxId( nId, &pToolBox ) )
+return;
 
 css::uno::Reference< css::frame::XController > xController( 
m_xFrame->getController(), css::uno::UNO_QUERY );
 if ( xController.is() )
 m_xModifiable.set( xController->getModel(), css::uno::UNO_QUERY );
 
-if ( !m_xModifiable.is() )
-{
+if ( m_xModifiable.is() && pToolBox->GetItemCommand( nId ) == 
m_aCommandURL )
+// Will also enable the save as only mode.
+m_xStorable.set( m_xModifiable, css::uno::UNO_QUERY );
+else if ( !m_xModifiable.is() )
 // Can be in table/query design.
-m_bSaveAsModeAllowed = false;
 m_xModifiable.set( xController, css::uno::UNO_QUERY );
-}
+else
+// Simple save button, without the dropdown.
+pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) & ~ 
ToolBoxItemBits::DROPDOWN );
 }
 
 void SaveToolbarController::update()
@@ -436,7 +436,7 @@ void SaveToolbarController::updateImage()
 bool bLargeIcons = pToolBox->GetToolboxButtonSize() == 
TOOLBOX_BUTTONSIZE_LARGE;
 Image aImage;
 
-if ( m_bSaveAsModeActive )
+if ( m_bReadOnly )
 {
 aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( 
".uno:SaveAs", bLargeIcons, m_xFrame );
 }
@@ -461,17 +461,19 @@ void SaveToolbarController::statusChanged( const 
css::frame::FeatureStateEvent&
 if ( !getToolboxId( nId, &pToolBox ) )
 return;
 
-if ( !m_bSaveAsModeAllowed )
-pToolBox->EnableItem( nId, rEvent.IsEnabled );
-else if ( m_bSaveAsModeActive == bool( rEvent.IsEnabled ) )
+bool bLastReadOnly = m_bReadOnly;
+m_bReadOnly = m_xStorable.is() && m_xStorable->isReadonly();
+if ( bLastReadOnly != m_bReadOnly )
 {
-m_bSaveAsModeActive = !m_bSaveAsModeActive;
 pToolBox->SetQuickHelpText( nId,
-vcl::CommandInfoProvider::Instance().GetTooltipForCommand( 
rEvent.IsEnabled ? m_aCommandURL : OUString( ".uno:SaveAs" ), m_xFrame ) );
-pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) & ~( 
rEvent.IsEnabled ? ToolBoxItemBits::DROPDOWNONLY : ToolBoxItemBits::DROPDOWN ) 
);
-pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) |  ( 
rEvent.IsEnabled ? ToolBoxItemBits::DROPDOWN : ToolBoxItemBits::DROPDOWNONLY ) 
);
+vcl::CommandInfoProvider::Instance().GetTooltipForCommand( 
m_bReadOnly ? OUString( ".uno:SaveAs" ) 

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

2016-06-17 Thread Michael Stahl
 cppuhelper/source/weak.cxx |   11 ---
 include/cppuhelper/weakref.hxx |   20 
 2 files changed, 20 insertions(+), 11 deletions(-)

New commits:
commit debe788bcf3ec258b6b95df3db1f7bfeba881be1
Author: Michael Stahl 
Date:   Fri Jun 17 13:35:08 2016 +0200

cppuhelper: WeakReference isn't thread-safe

... but its documentation claims that it is, which is partially
misleading, so fix both the documentation and the data race in
WeakReferenceHelper::clear().

This actually crashed in clear() in the multi-threaded ZipPackage code
on exporting the bugdoc from tdf#94212, presumably because clear()
races against OWeakRefListener::dispose().

Change-Id: I85665c11b8157e90d15e8263758e24e66efeb86c

diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index b6abef5..ed1f772 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -34,6 +34,7 @@ namespace cppu
 {
 
 // due to static Reflection destruction from usr, there must be a mutex leak 
(#73272#)
+// this is used to lock all instances of OWeakConnectionPoint and 
OWeakRefListener as well as OWeakObject::m_pWeakConnectionPoint
 inline static Mutex & getWeakMutex()
 {
 static Mutex * s_pMutex = nullptr;
@@ -358,7 +359,7 @@ public:
 
 /// The reference counter.
 oslInterlockedCount m_aRefCount;
-/// The connection point of the weak object
+/// The connection point of the weak object, guarded by getWeakMutex()
 Reference< XAdapter >   m_XWeakConnectionPoint;
 };
 
@@ -463,12 +464,7 @@ void WeakReferenceHelper::clear()
 {
 if (m_pImpl)
 {
-if (m_pImpl->m_XWeakConnectionPoint.is())
-{
-m_pImpl->m_XWeakConnectionPoint->removeReference(
-static_cast(m_pImpl));
-m_pImpl->m_XWeakConnectionPoint.clear();
-}
+m_pImpl->dispose();
 m_pImpl->release();
 m_pImpl = nullptr;
 }
@@ -513,6 +509,7 @@ Reference< XInterface > WeakReferenceHelper::get() const
 {
 Reference< XAdapter > xAdp;
 {
+// must lock to access m_XWeakConnectionPoint
 MutexGuard guard(cppu::getWeakMutex());
 if( m_pImpl && m_pImpl->m_XWeakConnectionPoint.is() )
 xAdp = m_pImpl->m_XWeakConnectionPoint;
diff --git a/include/cppuhelper/weakref.hxx b/include/cppuhelper/weakref.hxx
index 7836494..9cd422b 100644
--- a/include/cppuhelper/weakref.hxx
+++ b/include/cppuhelper/weakref.hxx
@@ -39,8 +39,14 @@ namespace uno
 
 class OWeakRefListener;
 
-/** The WeakReferenceHelper holds a weak reference to an object. This object 
must implement
-the css::uno::XWeak interface.  The implementation is thread safe.
+/** The WeakReferenceHelper holds a weak reference to an object.
+
+This object must implement the css::uno::XWeak interface.
+
+The WeakReferenceHelper itself is *not* thread safe, just as
+Reference itself isn't, but the implementation of the listeners etc.
+behind it *is* thread-safe, so multiple threads can have their own
+WeakReferences to the same XWeak object.
 */
 class CPPUHELPER_DLLPUBLIC WeakReferenceHelper
 {
@@ -116,8 +122,14 @@ protected:
 /// @endcond
 };
 
-/** The WeakReference<> holds a weak reference to an object. This object must 
implement
-the css::uno::XWeak interface.  The implementation is thread safe.
+/** The WeakReference<> holds a weak reference to an object.
+
+This object must implement the css::uno::XWeak interface.
+
+The WeakReference itself is *not* thread safe, just as
+Reference itself isn't, but the implementation of the listeners etc.
+behind it *is* thread-safe, so multiple threads can have their own
+WeakReferences to the same XWeak object.
 
 @tparam interface_type type of interface
 */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx|2 +
 cui/source/tabpages/tpgradnt.cxx |   66 ---
 cui/source/tabpages/tphatch.cxx  |   72 ++-
 3 files changed, 68 insertions(+), 72 deletions(-)

New commits:
commit 6b3eb4788f63602c0a446ad8f56539d3b65bb302
Author: Rishabh Kumar 
Date:   Thu Jun 16 19:18:20 2016 +0530

Reduce duplicate code and remove DBG_ASSERT

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

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 9e1da38..98f2c32 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -429,6 +429,7 @@ private:
 
 long CheckChanges_Impl();
 void SetControlState_Impl( css::awt::GradientStyle eXGS );
+sal_Int32 SearchGradientList(OUString aGradientName);
 
 public:
 SvxGradientTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  );
@@ -511,6 +512,7 @@ private:
 DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void );
 
 long CheckChanges_Impl();
+sal_Int32 SearchHatchList(OUString aHatchName);
 
 public:
 SvxHatchTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  );
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 8d87220..6ab4d12 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -240,7 +240,7 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet&  )
 INetURLObject   aURL( m_pGradientList->GetPath() );
 
 aURL.Append( m_pGradientList->GetName() );
-DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "invalid 
URL" );
+SAL_WARN_IF( aURL.GetProtocol() == INetProtocol::NotValid, 
"cui.tabpages", "invalid URL" );
 
 if ( aURL.getBase().getLength() > 18 )
 {
@@ -302,7 +302,7 @@ long SvxGradientTabPage::CheckChanges_Impl()
   SVX_RESSTR( 
RID_SVXSTR_GRADIENT ),
   CUI_RESSTR( 
RID_SVXSTR_ASK_CHANGE_GRADIENT ),
   &aWarningBoxImage );
-DBG_ASSERT(aMessDlg, "Dialog creation failed!");
+assert(aMessDlg && "Dialog creation failed!");
 aMessDlg->SetButtonText( SvxMessDialogButton::N1,
 OUString( ResId( RID_SVXSTR_CHANGE, rMgr ) 
) );
 aMessDlg->SetButtonText( SvxMessDialogButton::N2,
@@ -370,7 +370,7 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
 (sal_uInt16) m_pMtrColorFrom->GetValue(),
 (sal_uInt16) m_pMtrColorTo->GetValue() ));
 }
-DBG_ASSERT( pXGradient, "XGradient konnte nicht erzeugt werden" );
+assert( pXGradient && "XGradient could not be created" );
 rSet->Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) );
 rSet->Put( XFillGradientItem( aString, *pXGradient ) );
 rSet->Put( XGradientStepCountItem( nValue ) );
@@ -465,18 +465,12 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, 
ClickAddHdl_Impl, Button*, void)
 
 long nCount = m_pGradientList->Count();
 long j = 1;
-bool bDifferent = false;
+bool bValidGradientName = false;
 
-while( !bDifferent )
+while( !bValidGradientName )
 {
-aName  = aNewName;
-aName += " ";
-aName += OUString::number( j++ );
-bDifferent = true;
-
-for( long i = 0; i < nCount && bDifferent; i++ )
-if( aName == m_pGradientList->GetGradient( i )->GetName() )
-bDifferent = false;
+aName  = aNewName + " " + OUString::number( j++ );
+bValidGradientName = (SearchGradientList(aName) == 
LISTBOX_ENTRY_NOTFOUND);
 }
 
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -488,15 +482,9 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, 
ClickAddHdl_Impl, Button*, void)
 {
 pDlg->GetName( aName );
 
-bDifferent = true;
+bValidGradientName = (SearchGradientList(aName) == 
LISTBOX_ENTRY_NOTFOUND);
 
-for (long i = 0; i < nCount && bDifferent; ++i)
-{
-if( aName == m_pGradientList->GetGradient( i )->GetName() )
-bDifferent = false;
-}
-
-if (bDifferent)
+if (bValidGradientName)
 {
 nError = 0;
 break;
@@ -566,29 +554,21 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, 
ClickModifyHdl_Impl, Button*, void)
 {
 OUString aDesc( CUI_RES( RID_SVXSTR_DESC_GRADIENT ) );
 OUString aName( m_pGradientList->GetGradient( nPos )->GetName() );
-OUString aOldName = aName;
 
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-DBG_ASSERT(pFact, "Dialog creation faile

[Libreoffice-commits] core.git: comphelper/source desktop/README.vars desktop/source editeng/source include/comphelper libreofficekit/qa sc/inc sc/source sd/source sfx2/source svx/source sw/source

2016-06-17 Thread Miklos Vajna
 comphelper/source/misc/lok.cxx  |   12 ---
 desktop/README.vars |1 
 desktop/source/lib/init.cxx |   27 +---
 desktop/source/lib/lokinteractionhandler.cxx|2 
 editeng/source/editeng/editview.cxx |   10 ---
 editeng/source/editeng/impedit.cxx  |   24 +--
 include/comphelper/lok.hxx  |5 -
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx |   16 ++--
 sc/inc/global.hxx   |3 
 sc/source/core/data/documen3.cxx|   22 +-
 sc/source/core/data/document.cxx|   56 +
 sc/source/core/data/global.cxx  |   17 -
 sc/source/ui/app/inputhdl.cxx   |   35 ++
 sc/source/ui/docshell/docsh3.cxx|   15 +---
 sc/source/ui/unoobj/docuno.cxx  |5 -
 sc/source/ui/view/gridwin.cxx   |   65 
 sc/source/ui/view/gridwin4.cxx  |9 --
 sc/source/ui/view/tabcont.cxx   |5 -
 sc/source/ui/view/tabview3.cxx  |   15 
 sc/source/ui/view/tabview5.cxx  |9 --
 sc/source/ui/view/viewdata.cxx  |7 --
 sc/source/ui/view/viewfun2.cxx  |   24 +--
 sd/source/core/drawdoc2.cxx |   32 +++--
 sd/source/ui/func/fusel.cxx |9 --
 sd/source/ui/view/Outliner.cxx  |   64 ---
 sd/source/ui/view/drviews1.cxx  |9 --
 sd/source/ui/view/sdwindow.cxx  |9 --
 sfx2/source/control/dispatch.cxx|   12 ---
 sfx2/source/control/unoctitm.cxx|   12 ---
 svx/source/svdraw/svdedxv.cxx   |5 -
 svx/source/svdraw/svdmodel.cxx  |5 -
 svx/source/svdraw/svdmrkv.cxx   |   43 ++---
 svx/source/table/tablecontroller.cxx|   34 ++
 sw/source/core/crsr/crsrsh.cxx  |   10 ---
 sw/source/core/crsr/viscrs.cxx  |   30 +
 sw/source/core/view/viewsh.cxx  |5 -
 sw/source/uibase/docvw/SidebarScrollBar.cxx |5 -
 sw/source/uibase/docvw/SidebarTxtControl.cxx|5 -
 sw/source/uibase/docvw/SidebarWin.cxx   |8 --
 sw/source/uibase/docvw/edtwin.cxx   |8 --
 sw/source/uibase/uiview/viewsrch.cxx|   36 ++-
 sw/source/uibase/wrtsh/wrtsh2.cxx   |5 -
 42 files changed, 164 insertions(+), 566 deletions(-)

New commits:
commit 5b5706f41f97998785e1e7ad356580772da80c42
Author: Miklos Vajna 
Date:   Fri Jun 17 11:45:02 2016 +0200

comphelper lok: remove the g_bViewCallback global

Its purpose was to allow incrementally migrate all callers of
SdrModel::libreOfficeKitCallback() to use
SfxViewShell::libreOfficeKitViewCallback() (which allows notifying only
the currently active or all views) instead. That is done by now, so it
can go.

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

diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index f9c9031..a6abd2a 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -17,8 +17,6 @@ namespace LibreOfficeKit
 
 static bool g_bActive(false);
 
-static bool g_bViewCallback(true);
-
 void setActive(bool bActive)
 {
 g_bActive = bActive;
@@ -29,16 +27,6 @@ bool isActive()
 return g_bActive;
 }
 
-void setViewCallback(bool bViewCallback)
-{
-g_bViewCallback = bViewCallback;
-}
-
-bool isViewCallback()
-{
-return g_bViewCallback;
-}
-
 static void (*pStatusIndicatorCallback)(void *data, 
statusIndicatorCallbackType type, int percent)(nullptr);
 static void *pStatusIndicatorCallbackData(nullptr);
 
diff --git a/desktop/README.vars b/desktop/README.vars
index 39e3aaa..67c6056 100644
--- a/desktop/README.vars
+++ b/desktop/README.vars
@@ -13,4 +13,3 @@ LibreOfficeKit
 --
 
 LOK_DEBUG - Draw a small red rectangle in the top left corner so that it's 
easy to see where a new tile begins.
-LOK_MODEL_CALLBACK - Use old document-global callback instead of multiple 
per-view ones.
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index bd31b9b5..a0aebee 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1342,25 +1342,11 @@ static void 
doc_registerCallback(LibreOfficeKitDocument* pThis,
 SolarMutexGuard aGuard;
 LibLODocument_Impl* pDocument = static_cast(pThis);
 
-std::size_t nView = comphelper::LibreOfficeKit::isViewCallback() ? 
Sfx

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

2016-06-17 Thread Stephan Bergmann
 sal/osl/w32/salinit.cxx |   28 
 1 file changed, 28 deletions(-)

New commits:
commit e30f3bcd25762236eb739584dc71691123527c9f
Author: Stephan Bergmann 
Date:   Fri Jun 17 10:56:24 2016 +0200

Revert "fdo#38913: Prevent invalid parameter handler crashes"

This reverts commit a82e532ce006c54b2740de74d1da5d11307da7c1.  That hack 
should
no longer be necessary now that the root cause for tdf#38913 has probably 
been
found and fixed with b5876bfcb69a65c87d602bae687b3c0634c0a1e7 "passing a 
NULL
pointer to fileno is not allowed".

Conflicts:
sal/osl/w32/salinit.cxx

Change-Id: Id3a3d3163945acc9b5d5e74a8d357dfa2ce63f37
Reviewed-on: https://gerrit.libreoffice.org/26411
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/sal/osl/w32/salinit.cxx b/sal/osl/w32/salinit.cxx
index 04fab27..afa63de 100644
--- a/sal/osl/w32/salinit.cxx
+++ b/sal/osl/w32/salinit.cxx
@@ -19,9 +19,6 @@
 
 #include "sal/config.h"
 
-#include 
-#include 
-
 #include "system.h"
 #include 
 #include 
@@ -34,23 +31,6 @@ extern "C" {
 //From time.c
 void sal_initGlobalTimer();
 
-// _set_invalid_parameter_handler appears unavailable with MinGW:
-#if defined _MSC_VER
-namespace {
-
-extern "C" void invalidParameterHandler(
-wchar_t const * expression, wchar_t const * function, wchar_t const * file,
-unsigned int line, SAL_UNUSED_PARAMETER uintptr_t)
-{
-std::wcerr
-<< L"Invalid parameter in \"" << (expression ? expression : L"???")
-<< L"\" (" << (function ? function : L"???") << ") at "
-<< (file ? file : L"???") << L':' << line << std::endl;
-}
-
-}
-#endif
-
 // Prototypes for initialization and deinitialization of SAL library
 
 void sal_detail_initialize(int argc, char ** argv)
@@ -103,14 +83,6 @@ void sal_detail_initialize(int argc, char ** argv)
 // How to handle a very unlikely error ???
 }
 
-#if defined _MSC_VER // appears unavailable with MinGW
-// It appears that at least some jvm.dll versions can cause calls to
-// _fileno(NULL), which leads to a call of the invalid parameter handler,
-// and the default handler causes the application to crash, so install a
-// "harmless" one (cf. fdo#38913):
-_set_invalid_parameter_handler(&invalidParameterHandler);
-#endif
-
 osl_setCommandArgs(argc, argv);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Akshay Deep
 sfx2/source/control/recentdocsview.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit bcefc1a01507b8b4316e0b5801298c9edb3f75e8
Author: Akshay Deep 
Date:   Fri Jun 17 09:39:01 2016 +0530

tdf#79198 START CENTER: Close button doesn't reappear after being clicked

Change-Id: I23e3aed71eec85e8b8f0aceac125809fd56be4d5
Reviewed-on: https://gerrit.libreoffice.org/26399
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 27bd030aa033565dfdff56c298c797c80cee5160)
Reviewed-on: https://gerrit.libreoffice.org/26415
Reviewed-by: Akshay Deep 
Tested-by: Akshay Deep 

diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index 1d6e0c1..abfc888 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -233,8 +233,14 @@ void RecentDocsView::MouseButtonUp(const MouseEvent& rMEvt)
 ThumbnailViewItem* pItem = ImplGetItem(nPos);
 
 if (pItem && nPos == mnLastMouseDownItem)
+{
 pItem->MouseButtonUp(rMEvt);
 
+ThumbnailViewItem* pNewItem = ImplGetItem(nPos);
+if(pNewItem)
+pNewItem->setHighlight(true);
+}
+
 mnLastMouseDownItem = THUMBNAILVIEW_ITEM_NOTFOUND;
 
 if (pItem)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Jakub Trzebiatowski
 sw/inc/tblafmt.hxx  |8 +
 sw/inc/unoprnms.hxx |4 ++
 sw/inc/unostyle.hxx |   10 ++
 sw/source/core/doc/tblafmt.cxx  |   23 +++
 sw/source/core/unocore/unomap.cxx   |4 ++
 sw/source/core/unocore/unostyle.cxx |   54 
 6 files changed, 103 insertions(+)

New commits:
commit 98e3e2414b4cf80343af3499414f6a5ef86d7ae8
Author: Jakub Trzebiatowski 
Date:   Thu Jun 16 11:56:01 2016 +0200

GSoC Table Styles, Add TableStyle properties

Added properties for the following odf attributes:
table:first-row-end-column
table:first-row-start-column
table:last-row-end-column
table:last-row-start-column

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

diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index 6ed138d..fc698ef 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -118,6 +118,8 @@ public:
 ~SwBoxAutoFormat();
 
 SwBoxAutoFormat& operator=( const SwBoxAutoFormat& rNew );
+/// Comparing based of boxes backgrounds.
+bool operator==(const SwBoxAutoFormat& rRight);
 
 // The get-methods.
 const SvxFontItem   &GetFont() const{ return m_aFont; }
@@ -300,6 +302,12 @@ public:
 void SetValueFormat( const bool bNew )  { bInclValueFormat = bNew; }
 void SetWidthHeight( const bool bNew )  { bInclWidthHeight = bNew; }
 
+/// These methods returns what style (row or column) is applied first on 
given Cell
+bool FirstRowEndColumnIsRow();
+bool FirstRowStartColumnIsRow();
+bool LastRowEndColumnIsRow();
+bool LastRowStartColumnIsRow();
+
 bool Load( SvStream& rStream, const SwAfVersions& );
 bool Save( SvStream& rStream, sal_uInt16 fileVersion ) const;
 
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 8a43709..0d1322d 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -843,6 +843,10 @@
 #define UNO_NAME_ROW_INTEROP_GRAB_BAG "RowInteropGrabBag"
 #define UNO_NAME_TABLE_INTEROP_GRAB_BAG "TableInteropGrabBag"
 
+#define UNO_NAME_TABLE_FIRST_ROW_END_COLUMN "FirstRowEndColumn"
+#define UNO_NAME_TABLE_FIRST_ROW_START_COLUMN "FirstRowStartColumn"
+#define UNO_NAME_TABLE_LAST_ROW_END_COLUMN "LastRowEndColumn"
+#define UNO_NAME_TABLE_LAST_ROW_START_COLUMN "LastRowStartColumn"
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index bac73cf..cbb04f5 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -253,6 +253,7 @@ typedef std::map CellStyleNameMap;
 class SwXTextTableStyle : public cppu::WeakImplHelper
 <
 css::style::XStyle,
+css::beans::XPropertySet,
 css::container::XNameAccess,
 css::lang::XServiceInfo
 >
@@ -290,6 +291,15 @@ public:
 virtual OUString SAL_CALL getName() throw(css::uno::RuntimeException, 
std::exception) override;
 virtual void SAL_CALL setName(const OUString& rName) 
throw(css::uno::RuntimeException, std::exception) override;
 
+//XPropertySet
+virtual css::uno::Reference SAL_CALL 
getPropertySetInfo() throw(css::uno::RuntimeException, std::exception) override;
+virtual void SAL_CALL setPropertyValue(const OUString& aPropertyName, 
const css::uno::Any& aValue) throw(css::beans::UnknownPropertyException, 
css::beans::PropertyVetoException, css::lang::IllegalArgumentException, 
css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) 
override;
+virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& 
PropertyName) throw(css::beans::UnknownPropertyException, 
css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) 
override;
+virtual void SAL_CALL addPropertyChangeListener(const OUString& 
aPropertyName, const css::uno::Reference& 
xListener) throw(css::beans::UnknownPropertyException, 
css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) 
override;
+virtual void SAL_CALL removePropertyChangeListener(const OUString& 
aPropertyName, const css::uno::Reference& 
aListener) throw(css::beans::UnknownPropertyException, 
css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) 
override;
+virtual void SAL_CALL addVetoableChangeListener(const OUString& 
PropertyName, const css::uno::Reference& 
aListener) throw(css::beans::UnknownPropertyException, 
css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) 
override;
+virtual void SAL_CALL removeVetoableChangeListener(const OUString& 
PropertyName, const css::uno::Reference& 
aListener) throw(css::beans::UnknownPropertyException, 
css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) 
override;
+
 //XNameAccess
 virtual css::uno::Any SAL_CALL getByName(const OUString& rName) 
throw(css::container::NoSuchElementEx

Re: Voting page in wiki

2016-06-17 Thread Norbert Thiebaud
On Fri, Jun 17, 2016 at 6:28 AM, jan iversen
 wrote:
> Hi.
>
> During me work with the development pages in our Wiki, I came across this page
>
>
> https://wiki.documentfoundation.org/Vote_for_Enhancement
>
> Is that a page we actively use (if so, I need to give it more attention) ?

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


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

2016-06-17 Thread Michael Stahl
 sw/inc/doc.hxx |3 ++
 sw/inc/fesh.hxx|3 ++
 sw/source/core/doc/docfly.cxx  |   54 +
 sw/source/core/frmedt/feshview.cxx |6 
 sw/source/uibase/utlui/content.cxx |9 +++---
 5 files changed, 71 insertions(+), 4 deletions(-)

New commits:
commit 5593d9e1422cbf8a122fa612713a832274d30559
Author: Michael Stahl 
Date:   Thu Jun 16 22:04:26 2016 +0200

sw: speed up the navigator

The call to SwTextBoxHelper::findTextBoxes() in SwDoc::GetFlyNum() made
this so unbelievably slow that in a dbgutil build opening the navigator
on the bugdoc of tdf#94212 the UI freezes because getting all the fly
frames takes longer than the 1 second timeout.

Lets's not retrieve the flys one by one but instead all at once, which
makes it usable again.

Change-Id: Ic41c1648a82dcc3f758ae1b08bac6058f541f25e

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 71d4886..1fb0514 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -859,6 +859,9 @@ public:
 Iterate over Flys - for Basic-Collections. */
 size_t GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL, bool 
bIgnoreTextBoxes = false ) const;
 SwFrameFormat* GetFlyNum(size_t nIdx, FlyCntType eType = FLYCNTTYPE_ALL, 
bool bIgnoreTextBoxes = false );
+std::vector GetFlyFrameFormats(
+FlyCntType eType = FLYCNTTYPE_ALL,
+bool bIgnoreTextBoxes = false);
 
 // Copy formats in own arrays and return them.
 SwFrameFormat  *CopyFrameFormat ( const SwFrameFormat& );
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index bd68cb1..543914f 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -418,6 +418,9 @@ public:
 size_t GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL, bool 
bIgnoreTextBoxes = false ) const;
 const SwFrameFormat* GetFlyNum(size_t nIdx, FlyCntType eType = 
FLYCNTTYPE_ALL, bool bIgnoreTextBoxes = false) const;
 
+std::vector GetFlyFrameFormats(
+FlyCntType eType = FLYCNTTYPE_ALL, bool bIgnoreTextBoxes = false);
+
 /// If a fly is selected, it draws cursor into the first ContentFrame.
 const SwFrameFormat* SelFlyGrabCursor();
 
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index e749759..e1291b6 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -171,6 +171,60 @@ SwFrameFormat* SwDoc::GetFlyNum( size_t nIdx, FlyCntType 
eType, bool bIgnoreText
 return pRetFormat;
 }
 
+std::vector SwDoc::GetFlyFrameFormats(
+FlyCntType const eType, bool const bIgnoreTextBoxes)
+{
+SwFrameFormats& rFormats = *GetSpzFrameFormats();
+const size_t nSize = rFormats.size();
+
+std::set aTextBoxes;
+if (bIgnoreTextBoxes)
+aTextBoxes = SwTextBoxHelper::findTextBoxes(this);
+
+std::vector ret;
+ret.reserve(nSize);
+
+for (size_t i = 0; i < nSize; ++i)
+{
+SwFrameFormat const*const pFlyFormat = rFormats[ i ];
+
+if (bIgnoreTextBoxes && aTextBoxes.find(pFlyFormat) != 
aTextBoxes.end())
+{
+continue;
+}
+
+if (RES_FLYFRMFMT != pFlyFormat->Which())
+{
+continue;
+}
+
+SwNodeIndex const*const pIdx(pFlyFormat->GetContent().GetContentIdx());
+if (pIdx && pIdx->GetNodes().IsDocNodes())
+{
+SwNode const*const pNd = GetNodes()[ pIdx->GetIndex() + 1 ];
+switch (eType)
+{
+case FLYCNTTYPE_FRM:
+if (!pNd->IsNoTextNode())
+ret.push_back(pFlyFormat);
+break;
+case FLYCNTTYPE_GRF:
+if (pNd->IsGrfNode())
+ret.push_back(pFlyFormat);
+break;
+case FLYCNTTYPE_OLE:
+if (pNd->IsOLENode())
+ret.push_back(pFlyFormat);
+break;
+default:
+ret.push_back(pFlyFormat);
+}
+}
+}
+
+return ret;
+}
+
 static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch,
 const SwFrameFormat* pFlyFormat )
 {
diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 35f3421..dd7fc5f 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2332,6 +2332,12 @@ const SwFrameFormat*  SwFEShell::GetFlyNum(size_t nIdx, 
FlyCntType eType, bool b
 return GetDoc()->GetFlyNum(nIdx, eType, bIgnoreTextBoxes);
 }
 
+std::vector SwFEShell::GetFlyFrameFormats(
+FlyCntType const eType, bool const bIgnoreTextBoxes)
+{
+return GetDoc()->GetFlyFrameFormats(eType, bIgnoreTextBoxes);
+}
+
 // show the current selected object
 void SwFEShell::MakeSelVisible()
 {
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index c6ea275..85a65f4 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/con

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

2016-06-17 Thread Katarina Behrens
 sd/CppunitTest_sd_dialogs_test.mk |   71 +++
 sd/qa/unit/dialogs-test.cxx   |  685 ++
 2 files changed, 756 insertions(+)

New commits:
commit d8f1c63cff0652b2cd87ba183b351fa406a55954
Author: Katarina Behrens 
Date:   Fri Jun 17 13:56:07 2016 +0200

Actually add the relevant cppunit files

Change-Id: I9fd716671c7d1dc568d14b914c9a802fc6239a5e

diff --git a/sd/CppunitTest_sd_dialogs_test.mk 
b/sd/CppunitTest_sd_dialogs_test.mk
new file mode 100644
index 000..d6027e6
--- /dev/null
+++ b/sd/CppunitTest_sd_dialogs_test.mk
@@ -0,0 +1,71 @@
+# -*- 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,sd_dialogs_test))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sd_dialogs_test, \
+sd/qa/unit/dialogs-test \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,sd_dialogs_test))
+
+$(eval $(call gb_CppunitTest_set_include,sd_dialogs_test,\
+-I$(SRCDIR)/sd/source/ui/inc \
+-I$(SRCDIR)/sd/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sd_dialogs_test, \
+basegfx \
+comphelper \
+cppu \
+cppuhelper \
+drawinglayer \
+editeng \
+i18nlangtag \
+i18nutil \
+msfilter \
+oox \
+sal \
+salhelper \
+sax \
+sd \
+sdui \
+sfx \
+sot \
+svl \
+svt \
+svx \
+svxcore \
+test \
+tl \
+tk \
+ucbhelper \
+unotest \
+utl \
+vcl \
+xo \
+$(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_external,sd_dialogs_test,boost_headers))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,sd_dialogs_test))
+
+$(eval $(call gb_CppunitTest_use_ure,sd_dialogs_test))
+$(eval $(call gb_CppunitTest_use_vcl_non_headless,sd_dialogs_test))
+
+$(eval $(call gb_CppunitTest_use_rdb,sd_dialogs_test,services))
+
+# $(eval $(call gb_CppunitTest_use_configuration,sd_dialogs_test))
+$(eval $(call gb_CppunitTest_use_instdir_configuration,sd_dialogs_test))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
new file mode 100644
index 000..2103a13
--- /dev/null
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -0,0 +1,685 @@
+/* -*- 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 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "drawdoc.hxx"
+#include "../source/ui/inc/DrawDocShell.hxx"
+
+#include 
+#include 
+
+#include "sdabstdlg.hxx"
+#include 
+#include "unomodel.hxx"
+#include "ViewShell.hxx"
+#include "drawview.hxx"
+#include "DrawViewShell.hxx"
+#include 
+#include "stlsheet.hxx"
+#include "sdattr.hrc"
+#include "strings.hrc"
+#include "sdresid.hxx"
+#include "sdattr.hxx"
+#include "prltempl.hrc"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+//#include "DrawController.hxx"
+//#include "ViewShellBase.hxx"
+
+using namespace ::com::sun::star;
+
+/// Test opening a dialog in sd
+class SdDialogsTest : public test::BootstrapFixture, public unotest::MacrosTest
+{
+private:
+/// Document and ComponentContext
+uno::Reference  mxComponentContext;
+uno::ReferencemxComponent;
+
+/// initially created SdAbstractDialogFactory and pointer to document
+SdAbstractDialogFactory*mpFact;
+SdXImpressDocument* mpImpressDocument;
+
+/// on-demand created instances required for varoius dialogs to open
+::sd::DrawDocShell* mpDocShell;
+::sd::ViewShell*mpViewShell;
+::sd::DrawView* mpDrawView;
+const SfxItemSet*   mpSfxItemSetFromSdrObject;
+const SfxItemSet*   mpEmptySfxItemSet;
+SfxItemSet* mpEmptyFillStyleSfxItemSet;
+
+/// helpers
+SdAbstractDialogFactory* getSdAbstractDialogFactory();
+SdXImpressDocument* getSdXImpressDocument();
+::sd::DrawDocShell* getDocShell();
+::sd::ViewShell* getViewShell();
+::sd::DrawView* getDrawView();
+const SfxItemSet& getSfxItemSetFromSdrObject();
+const SfxItemSet& getEmptySfxItemSet();
+const SfxItemSet& getEmpt

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

2016-06-17 Thread Stephan Bergmann
 compilerplugins/clang/override.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 793fd7e54856216bd58e1d402f63cec208291019
Author: Stephan Bergmann 
Date:   Fri Jun 17 13:56:58 2016 +0200

loplugin:override: No more need to request dtor be marked 'virtual'

...rather than 'override', cf. 
"loplugin:override: No more need for the "MSVC dtor override" workaround".

Change-Id: Ib528938ed4be248117bb7114f34d4e9421bc3275

diff --git a/compilerplugins/clang/override.cxx 
b/compilerplugins/clang/override.cxx
index 155f4ce..69155d4 100644
--- a/compilerplugins/clang/override.cxx
+++ b/compilerplugins/clang/override.cxx
@@ -67,7 +67,7 @@ bool Override::VisitCXXMethodDecl(CXXMethodDecl const * decl) 
{
 report(
 DiagnosticsEngine::Warning,
 ("overriding destructor declaration not explicitly marked"
- " 'virtual'"),
+ " 'override'"),
 decl->getLocation())
 << decl->getSourceRange();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Stephan Bergmann
 svtools/source/config/helpopt.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f70a9eebf61c562fd9f4d9e4f128d3fc8a5c6473
Author: Stephan Bergmann 
Date:   Fri Jun 17 13:54:54 2016 +0200

loplugin:override

Change-Id: I2c33f5f91f16c465cb329204529b76e1c6165535

diff --git a/svtools/source/config/helpopt.cxx 
b/svtools/source/config/helpopt.cxx
index ca6b9c0..3ba33a8 100644
--- a/svtools/source/config/helpopt.cxx
+++ b/svtools/source/config/helpopt.cxx
@@ -65,7 +65,7 @@ class SvtHelpOptions_Impl : public utl::ConfigItem
 
 public:
 SvtHelpOptions_Impl();
-~SvtHelpOptions_Impl();
+~SvtHelpOptions_Impl() override;
 
 virtual voidNotify( const css::uno::Sequence< OUString >& 
aPropertyNames ) override;
 voidLoad( const css::uno::Sequence< OUString>& aPropertyNames);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes24' - 3 commits -

2016-06-17 Thread László Németh
 0 files changed

New commits:
commit 2b84216bdaa83bfb3fc30de1018424e8d4860c0e
Author: László Németh 
Date:   Fri Jun 17 13:47:04 2016 +0200

empty commit (repeat)

Change-Id: Ie81d9430426aa8f9d102ecaf70b4b65c33b58961
commit dcdb99da6ef79d2f07ba7831b57bb6712962a05f
Author: László Németh 
Date:   Fri Jun 17 13:46:47 2016 +0200

empty commit (repeat)

Change-Id: I5a02d6d43e51920bad2e6bfddf55cebb2b173252
commit ddbc1e76cb941cb2628677674ae34a397148418c
Author: László Németh 
Date:   Fri Jun 17 13:45:06 2016 +0200

empty commit (Writer proc. idle text typing, window resiz.)

Change-Id: Idf242d668fee6a183f6179764c8d57893b896c3c
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[API CHANGE] double Value member appended to com::sun::star::sheet::MemberResult

2016-06-17 Thread Eike Rathke
Hi,

https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=dc6bf6c8ae94fd89f30e39d63dfe02fdb042e98d

appends a double Value member to com::sun::star::sheet::MemberResult

In case someone is using the unpublished API, at least it's documented in
the OOo DevGuide
https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Levels

  Eike

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


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


Re: Update to Firebird 3.0 - attempted build on OSX

2016-06-17 Thread Bunth Tamás
> Same commit numbers ?

Yes, I uploaded it with git commit --amend.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-06-17 Thread Eike Rathke
 offapi/com/sun/star/sheet/MemberResult.idl |9 ++
 sc/source/core/data/dpoutput.cxx   |   43 ++---
 sc/source/core/data/dptabres.cxx   |   11 +++
 3 files changed, 53 insertions(+), 10 deletions(-)

New commits:
commit dc6bf6c8ae94fd89f30e39d63dfe02fdb042e98d
Author: Eike Rathke 
Date:   Fri Jun 17 13:31:48 2016 +0200

Resolves: tdf#91365 use underlying numeric value if available [API CHANGE]

... at least for setting the cell content. There are more places where
the numeric value could be transported but all Data Pilot pivot stuff is
based on text strings :-/

This appends a double Value member to com::sun::star::sheet::MemberResult

Change-Id: Ia9e8ac47d0877bd4a59a69d5921ce4ea082e8a69

diff --git a/offapi/com/sun/star/sheet/MemberResult.idl 
b/offapi/com/sun/star/sheet/MemberResult.idl
index 8cb4c22..7de14f3 100644
--- a/offapi/com/sun/star/sheet/MemberResult.idl
+++ b/offapi/com/sun/star/sheet/MemberResult.idl
@@ -46,6 +46,15 @@ struct MemberResult
  */
 long Flags;
 
+
+/** the underlying numeric value of the field if Flags
+indicate so by having
+com::sun::star::sheet::MemberResultFlags::NUMERIC set.
+
+May be NaN if value is not available or unknown.
+ */
+double Value;
+
 };
 
 
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 6b32a84..5d4550d 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -81,15 +81,19 @@ struct ScDPOutLevelData
 longnDimPos;
 sal_uInt32 mnSrcNumFmt; /// Prevailing number format used in the source 
data.
 uno::Sequence  aResult;
-OUString   maName;   /// Name is the internal field 
name.
-OUString   maCaption; /// Caption is the name visible 
in the output table.
+OUStringmaName; /// Name is the internal 
field name.
+OUStringmaCaption;  /// Caption is the name 
visible in the output table.
+double  mfValue;/// Value is the 
underlying numeric value, if any, or NaN
 boolmbHasHiddenMember:1;
 boolmbDataLayout:1;
 boolmbPageDim:1;
 
 ScDPOutLevelData() :
-nDim(-1), nHier(-1), nLevel(-1), nDimPos(-1), mnSrcNumFmt(0), 
mbHasHiddenMember(false), mbDataLayout(false), mbPageDim(false)
-{}
+nDim(-1), nHier(-1), nLevel(-1), nDimPos(-1), mnSrcNumFmt(0), 
mbHasHiddenMember(false), mbDataLayout(false),
+mbPageDim(false)
+{
+rtl::math::setNan(&mfValue);
+}
 
 bool operator<(const ScDPOutLevelData& r) const
 { return nDimPos 
getVisiblePageMembersAsResults( const uno::Re
 bool bVisible = ScUnoHelpFunctions::GetBoolProperty(xMemPS, 
SC_UNO_DP_ISVISIBLE);
 
 if (bVisible)
-aRes.push_back(sheet::MemberResult(rName, aCaption, 0));
+{
+/* TODO: any numeric value to obtain? */
+double fValue;
+rtl::math::setNan(&fValue);
+aRes.push_back(sheet::MemberResult(rName, aCaption, 0, fValue));
+}
 }
 
 if (aNames.getLength() == static_cast(aRes.size()))
@@ -601,6 +610,10 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const 
uno::ReferenceSetValue( nCol, nRow, nTab, rData.Value);
+}
 else
-aParam.setTextInput();
+{
+ScSetStringParam aParam;
+if (bNumeric)
+aParam.setNumericInput();
+else
+aParam.setTextInput();
 
-pDoc->SetString(nCol, nRow, nTab, rData.Caption, &aParam);
+pDoc->SetString(nCol, nRow, nTab, rData.Caption, &aParam);
+}
 }
 
 if ( nFlags & sheet::MemberResultFlags::SUBTOTAL )
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index af5ad12..12a40cc 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -1313,6 +1313,8 @@ void ScDPResultMember::FillMemberResults(
 OSL_ENSURE( rPos+nSize <= pSequences->getLength(), "bumm" );
 
 bool bIsNumeric = false;
+double fValue;
+rtl::math::setNan(&fValue);
 OUString aName;
 if ( pMemberName )  // if pMemberName != NULL, use instead of real 
member name
 {
@@ -1338,6 +1340,11 @@ void ScDPResultMember::FillMemberResults(
 
 ScDPItemData::Type eType = aItemData.GetType();
 bIsNumeric = eType == ScDPItemData::Value || eType == 
ScDPItemData::GroupValue;
+// IsValue() is not identical to bIsNumeric, i.e.
+// ScDPItemData::GroupValue is excluded and not stored in the double,
+// so even if the item is numeric the Value may be NaN.
+if (aItemData.IsValue())
+fValue = aItemData.GetValue();
 }
 
 const ScDPD

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

2016-06-17 Thread Maxim Monastirsky
 framework/source/uielement/popuptoolbarcontroller.cxx |   48 ++
 1 file changed, 27 insertions(+), 21 deletions(-)

New commits:
commit 011128aa9493a680c3e9da6d074f125a90ec455c
Author: Maxim Monastirsky 
Date:   Thu Jun 16 20:11:14 2016 +0300

SaveToolbarController: back to using XStorable

See 747a0fdda2a7723c2f8a8a022b468bcf29c700e3
("SaveToolbarController: Better support of readonly docs")
for the background. However this doesn't work, because
the save slot is disabled in other cases too, not just for
r/o docs (e.g. locked UI during file save, or when cond.
formatting window open in Calc).

Until a better solution is found, at least make sure that
the button is disabled, instead of going into the normal
save mode, which doesn't work.

Change-Id: If6e1b91b7c780fffac22cdb25c82bbd0a8520dc4

diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx 
b/framework/source/uielement/popuptoolbarcontroller.cxx
index 2bdce6a..5d7b6d8 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -356,16 +357,15 @@ public:
 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 
throw ( css::uno::RuntimeException ) override;
 
 private:
-bool m_bSaveAsModeAllowed;
-bool m_bSaveAsModeActive;
+bool m_bReadOnly;
 bool m_bModified;
+css::uno::Reference< css::frame::XStorable > m_xStorable;
 css::uno::Reference< css::util::XModifiable > m_xModifiable;
 };
 
 SaveToolbarController::SaveToolbarController( const css::uno::Reference< 
css::uno::XComponentContext >& rxContext )
 : ImplInheritanceHelper( rxContext, ".uno:SaveAsMenu" )
-, m_bSaveAsModeAllowed( true )
-, m_bSaveAsModeActive( false )
+, m_bReadOnly( false )
 , m_bModified( false )
 {
 }
@@ -377,22 +377,22 @@ void SaveToolbarController::initialize( const 
css::uno::Sequence< css::uno::Any
 
 ToolBox* pToolBox = nullptr;
 sal_uInt16 nId = 0;
-if ( getToolboxId( nId, &pToolBox ) && pToolBox->GetItemCommand( nId ) != 
m_aCommandURL )
-{
-m_bSaveAsModeAllowed = false;
-pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) & ~ 
ToolBoxItemBits::DROPDOWN );
-}
+if ( !getToolboxId( nId, &pToolBox ) )
+return;
 
 css::uno::Reference< css::frame::XController > xController( 
m_xFrame->getController(), css::uno::UNO_QUERY );
 if ( xController.is() )
 m_xModifiable.set( xController->getModel(), css::uno::UNO_QUERY );
 
-if ( !m_xModifiable.is() )
-{
+if ( m_xModifiable.is() && pToolBox->GetItemCommand( nId ) == 
m_aCommandURL )
+// Will also enable the save as only mode.
+m_xStorable.set( m_xModifiable, css::uno::UNO_QUERY );
+else if ( !m_xModifiable.is() )
 // Can be in table/query design.
-m_bSaveAsModeAllowed = false;
 m_xModifiable.set( xController, css::uno::UNO_QUERY );
-}
+else
+// Simple save button, without the dropdown.
+pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) & ~ 
ToolBoxItemBits::DROPDOWN );
 }
 
 void SaveToolbarController::update()
@@ -436,7 +436,7 @@ void SaveToolbarController::updateImage()
 bool bLargeIcons = pToolBox->GetToolboxButtonSize() == 
TOOLBOX_BUTTONSIZE_LARGE;
 Image aImage;
 
-if ( m_bSaveAsModeActive )
+if ( m_bReadOnly )
 {
 aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( 
".uno:SaveAs", bLargeIcons, m_xFrame );
 }
@@ -461,17 +461,19 @@ void SaveToolbarController::statusChanged( const 
css::frame::FeatureStateEvent&
 if ( !getToolboxId( nId, &pToolBox ) )
 return;
 
-if ( !m_bSaveAsModeAllowed )
-pToolBox->EnableItem( nId, rEvent.IsEnabled );
-else if ( m_bSaveAsModeActive == bool( rEvent.IsEnabled ) )
+bool bLastReadOnly = m_bReadOnly;
+m_bReadOnly = m_xStorable.is() && m_xStorable->isReadonly();
+if ( bLastReadOnly != m_bReadOnly )
 {
-m_bSaveAsModeActive = !m_bSaveAsModeActive;
 pToolBox->SetQuickHelpText( nId,
-vcl::CommandInfoProvider::Instance().GetTooltipForCommand( 
rEvent.IsEnabled ? m_aCommandURL : OUString( ".uno:SaveAs" ), m_xFrame ) );
-pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) & ~( 
rEvent.IsEnabled ? ToolBoxItemBits::DROPDOWNONLY : ToolBoxItemBits::DROPDOWN ) 
);
-pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) |  ( 
rEvent.IsEnabled ? ToolBoxItemBits::DROPDOWN : ToolBoxItemBits::DROPDOWNONLY ) 
);
+vcl::CommandInfoProvider::Instance().GetTooltipForCommand( 
m_bReadOnly ? OUString( ".uno:SaveAs" ) : m_aCommandURL, m_xFrame ) );
+pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) & ~( 
m_bReadOnly ? ToolBoxItemBits::DROPDOWN : ToolBoxItemBits::DROPDOWNONLY ) );
+pToolBox

Voting page in wiki

2016-06-17 Thread jan iversen
Hi.

During me work with the development pages in our Wiki, I came across this page


https://wiki.documentfoundation.org/Vote_for_Enhancement

Is that a page we actively use (if so, I need to give it more attention) ?

I would prefer, not to run votes as such, but have a ideas page (exist already) 
which has the total content, with comments but without votes.

thoughts ?

rgds
jan I.


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


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

2016-06-17 Thread Vasily Melenchuk
 include/test/bootstrapfixture.hxx |3 ++-
 test/source/bootstrapfixture.cxx  |   11 ++-
 2 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit c3453ea24608123195588ea910b8db7b13922054
Author: Vasily Melenchuk 
Date:   Fri Jun 17 10:36:38 2016 +0300

Add MS binary format validator support in test fixture

bffvalidator (Microsoft Office Binary File Format Validator) can now be
used for verification of MS binary export tests

Change-Id: Ibc65e64726a454cdd33946006b36427b9cc6fbd2
Reviewed-on: https://gerrit.libreoffice.org/26405
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/include/test/bootstrapfixture.hxx 
b/include/test/bootstrapfixture.hxx
index 448605a..5e24753 100644
--- a/include/test/bootstrapfixture.hxx
+++ b/include/test/bootstrapfixture.hxx
@@ -30,7 +30,8 @@ namespace test {
 enum ValidationFormat
 {
 OOXML,
-ODF
+ODF,
+MSBINARY
 };
 
 // Class to do lots of heavy-lifting UNO & environment
diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index f274dbc..c28615d 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -173,10 +173,19 @@ void test::BootstrapFixture::validate(const OUString& 
rPath, test::ValidationFor
 {
 var = "OFFICEOTRON";
 }
-else
+else if ( eFormat == test::ODF )
 {
 var = "ODFVALIDATOR";
 }
+else if ( eFormat == test::MSBINARY )
+{
+#if HAVE_BFFVALIDATOR
+var = "BFFVALIDATOR";
+#else
+// Binary Format Validator is disabled
+return;
+#endif
+}
 OUString aValidator;
 oslProcessError e = osl_getEnvironment(var.pData, &aValidator.pData);
 CPPUNIT_ASSERT_EQUAL_MESSAGE(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Akshay Deep
 sfx2/source/control/recentdocsview.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 27bd030aa033565dfdff56c298c797c80cee5160
Author: Akshay Deep 
Date:   Fri Jun 17 09:39:01 2016 +0530

tdf#79198 START CENTER: Close button doesn't reappear after being clicked

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

diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index 1d6e0c1..abfc888 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -233,8 +233,14 @@ void RecentDocsView::MouseButtonUp(const MouseEvent& rMEvt)
 ThumbnailViewItem* pItem = ImplGetItem(nPos);
 
 if (pItem && nPos == mnLastMouseDownItem)
+{
 pItem->MouseButtonUp(rMEvt);
 
+ThumbnailViewItem* pNewItem = ImplGetItem(nPos);
+if(pNewItem)
+pNewItem->setHighlight(true);
+}
+
 mnLastMouseDownItem = THUMBNAILVIEW_ITEM_NOTFOUND;
 
 if (pItem)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Akshay Deep
 sfx2/source/dialog/backingwindow.cxx |   20 
 sfx2/source/dialog/backingwindow.hxx |2 ++
 2 files changed, 22 insertions(+)

New commits:
commit 80cb33570557010547a08b5b1cd6bc0c1ee018fc
Author: Akshay Deep 
Date:   Fri Jun 17 13:41:00 2016 +0530

tdf#75369 Start Center: Non-installed applications aren't greyed out

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

diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index 730627c..9c054d5 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -26,6 +26,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -280,6 +281,8 @@ void BackingWindow::initControls()
 setupButton( mpImpressAllButton );
 setupButton( mpMathAllButton );
 
+checkInstalledModules();
+
 mpExtensionsButton->SetClickHdl(LINK(this, BackingWindow, 
ExtLinkClickHdl));
 
 // setup nice colors
@@ -358,6 +361,23 @@ void BackingWindow::setupButton( MenuButton* pButton )
 pButton->SetSelectHdl(LINK(this, BackingWindow, MenuSelectHdl));
 }
 
+void BackingWindow::checkInstalledModules()
+{
+SvtModuleOptions aModuleOpt;
+
+mpWriterAllButton->Enable( aModuleOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::WRITER ));
+
+mpCalcAllButton->Enable( aModuleOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::CALC ) );
+
+mpImpressAllButton->Enable( aModuleOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::IMPRESS ) );
+
+mpDrawAllButton->Enable( aModuleOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::DRAW ) );
+
+mpMathAllButton->Enable(aModuleOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::MATH ));
+
+mpDBAllButton->Enable(aModuleOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::DATABASE ));
+}
+
 void BackingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
 {
 Resize();
diff --git a/sfx2/source/dialog/backingwindow.hxx 
b/sfx2/source/dialog/backingwindow.hxx
index cfaf984..4c80c9f 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -111,6 +111,8 @@ class BackingWindow : public vcl::Window, public 
VclBuilderContainer
 
 void initializeLocalView();
 
+void checkInstalledModules();
+
 public:
 explicit BackingWindow(vcl::Window* pParent);
 virtual ~BackingWindow();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Miklos Vajna
 sal/qa/osl/pipe/osl_Pipe.cxx |4 ++--
 sal/qa/rtl/cipher/rtl_cipher.cxx |   36 ++--
 2 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit be4dd3954a57518168647c18af298ecda0fb2428
Author: Miklos Vajna 
Date:   Fri Jun 17 08:49:04 2016 +0200

CppunitTest_sal_rtl_cipher: fix loplugin:cppunitassertequals warnings

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

diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx
index a2fad9f..af5f947 100644
--- a/sal/qa/osl/pipe/osl_Pipe.cxx
+++ b/sal/qa/osl/pipe/osl_Pipe.cxx
@@ -485,8 +485,8 @@ namespace osl_Pipe
 aPipe.close( );
 int nRet = aPipe.send( m_pTestString1.getStr(), 3 );
 
-CPPUNIT_ASSERT_MESSAGE( "#test comment#: use after close.",
-OSL_PIPE_FAIL == nRet );
+CPPUNIT_ASSERT_EQUAL_MESSAGE( "#test comment#: use after 
close.",
+nRet, OSL_PIPE_FAIL );
 }
 
 CPPUNIT_TEST_SUITE( close );
diff --git a/sal/qa/rtl/cipher/rtl_cipher.cxx b/sal/qa/rtl/cipher/rtl_cipher.cxx
index e24e6c5..a2a55ff 100644
--- a/sal/qa/rtl/cipher/rtl_cipher.cxx
+++ b/sal/qa/rtl/cipher/rtl_cipher.cxx
@@ -43,7 +43,7 @@ public:
 void create_002()
 {
 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmInvalid, 
rtl_Cipher_ModeECB);
-CPPUNIT_ASSERT_MESSAGE("create provide wrong object.", aCipher == 
nullptr);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("create provide wrong object.", 
static_cast(nullptr), aCipher);
 }
 void create_003()
 {
@@ -54,7 +54,7 @@ public:
 void create_004()
 {
 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmInvalid, 
rtl_Cipher_ModeCBC);
-CPPUNIT_ASSERT_MESSAGE("create provide wrong object.", aCipher == 
nullptr);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("create provide wrong object.", 
static_cast(nullptr), aCipher);
 }
 void create_005()
 {
@@ -65,17 +65,17 @@ public:
 void create_006()
 {
 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmInvalid, 
rtl_Cipher_ModeStream);
-CPPUNIT_ASSERT_MESSAGE("create provide wrong object.", aCipher == 
nullptr);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("create provide wrong object.", 
static_cast(nullptr), aCipher);
 }
 void create_007()
 {
 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, 
rtl_Cipher_ModeInvalid);
-CPPUNIT_ASSERT_MESSAGE("create provide wrong object.", aCipher == 
nullptr);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("create provide wrong object.", 
static_cast(nullptr), aCipher);
 }
 void create_008()
 {
 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmInvalid, 
rtl_Cipher_ModeInvalid);
-CPPUNIT_ASSERT_MESSAGE("create provide wrong object.", aCipher == 
nullptr);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("create provide wrong object.", 
static_cast(nullptr), aCipher);
 }
 
 // Change the following lines only, if you add, remove or rename
@@ -119,7 +119,7 @@ public:
 void createBF_004()
 {
 rtlCipher aCipher = rtl_cipher_createBF(rtl_Cipher_ModeInvalid);
-CPPUNIT_ASSERT_MESSAGE("create provide wrong object.", aCipher == 
nullptr);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("create provide wrong object.", 
static_cast(nullptr), aCipher);
 // rtl_cipher_destroy(aCipher);
 }
 // Change the following lines only, if you add, remove or rename
@@ -154,7 +154,7 @@ public:
 pArgBuffer[0] = _nArgValue;
 
 rtlCipherError aError = rtl_cipher_init(aCipher, 
rtl_Cipher_DirectionEncode, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen);
-CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong init", rtl_Cipher_E_None, 
aError);
 
 sal_uInt32 nPlainTextLen = 16;
 sal_uInt8 *pPlainTextBuffer = new sal_uInt8[ nPlainTextLen ];
@@ -166,7 +166,7 @@ public:
 memset(pCipherBuffer, 0, nCipherLen);
 
 /* rtlCipherError */ aError = rtl_cipher_encode(aCipher, 
pPlainTextBuffer, nPlainTextLen, pCipherBuffer, nCipherLen);
-CPPUNIT_ASSERT_MESSAGE("wrong encode", aError == 
rtl_Cipher_E_None);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong encode", rtl_Cipher_E_None, 
aError);
 
 sal_uInt32 nPlainText2Len = 16;
 sal_uInt8 *pPlainText2Buffer = new sal_uInt8[ nPlainText2Len ];
@@ -202,7 +202,7 @@ public:
 pArgBuffer[0] = _nArgValue;
 
 rtlCipherError aError = rtl_cipher_init(aCipher, 
rtl_Cipher_DirectionBoth, pKeyBuffer, nKey

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

2016-06-17 Thread Mohammed Abdul Azeem
 sax/Library_expwrap.mk |1 
 sax/qa/cppunit/xmlimport.cxx   |   53 -
 sax/source/expatwrap/expwrap.component |4 
 sax/source/fastparser/legacyfastparser.cxx |  275 +
 4 files changed, 325 insertions(+), 8 deletions(-)

New commits:
commit 551a5066fcc8000850d34408d8c1bcdd5b599db3
Author: Mohammed Abdul Azeem 
Date:   Mon Jun 13 23:30:09 2016 +0530

GSoC: Mapping legacy sax parser and XFastParser

This implements legacy parser interface using XFastParser, and
unit test is also added.

Change-Id: Ia2eb7d517d80a3f7ec0cf26ffa2e5747ad22b186
Reviewed-on: https://gerrit.libreoffice.org/26229
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/sax/Library_expwrap.mk b/sax/Library_expwrap.mk
index e8e049a..6b38278 100644
--- a/sax/Library_expwrap.mk
+++ b/sax/Library_expwrap.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_Library_add_exception_objects,expwrap,\
sax/source/expatwrap/saxwriter \
sax/source/expatwrap/xml2utf \
sax/source/fastparser/fastparser \
+   sax/source/fastparser/legacyfastparser \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index c8bd217..fe4af60 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -83,6 +83,7 @@ private:
 public:
 TestDocumentHandler() {}
 const OUString& getString() { return m_aStr; }
+void setString( const OUString aStr ) { m_aStr = aStr; }
 
 // XDocumentHandler
 virtual void SAL_CALL startDocument() throw (SAXException, 
RuntimeException, exception) override;
@@ -319,15 +320,43 @@ public:
 }
 };
 
+class TestLegacyDocumentHandler : public TestDocumentHandler
+{
+public:
+virtual void SAL_CALL startElement( const OUString& aName, const 
Reference< XAttributeList >& xAttribs ) throw (SAXException, RuntimeException, 
exception) override;
+virtual void SAL_CALL endElement( const OUString& aName ) throw 
(SAXException, RuntimeException, exception) override;
+};
+
+void SAL_CALL TestLegacyDocumentHandler::startElement( const OUString& aName, 
const Reference< XAttributeList >& xAttribs )
+throw( SAXException, RuntimeException, exception )
+{
+setString( getString() + aName );
+sal_uInt16 len = xAttribs->getLength();
+for (sal_uInt16 i = 0; i < len; i++)
+{
+OUString sAttrName = xAttribs->getNameByIndex(i);
+OUString sAttrValue = xAttribs->getValueByIndex(i);
+setString( getString() + sAttrName + sAttrValue );
+}
+}
+
+
+void SAL_CALL TestLegacyDocumentHandler::endElement( const OUString& aName )
+throw( SAXException, RuntimeException, exception )
+{
+setString( getString() + aName );
+}
 
 class XMLImportTest : public test::BootstrapFixture
 {
 private:
 OUString m_sDirPath;
-rtl::Reference< TestDocumentHandler > m_xDocumentHandler;
-rtl::Reference< TestFastDocumentHandler > m_xFastDocumentHandler;
+Reference< TestDocumentHandler > m_xDocumentHandler;
+Reference< TestFastDocumentHandler > m_xFastDocumentHandler;
 Reference< XParser > m_xParser;
 Reference< XFastParser > m_xFastParser;
+Reference< XParser > m_xLegacyFastParser;
+Reference< TestLegacyDocumentHandler > m_xLegacyDocumentHandler;
 Reference< XFastTokenHandler > m_xFastTokenHandler;
 
 public:
@@ -345,16 +374,19 @@ public:
 void XMLImportTest::setUp()
 {
 test::BootstrapFixture::setUp();
+Reference< XComponentContext > xContext = 
comphelper::getProcessComponentContext();
 m_xDocumentHandler.set( new TestDocumentHandler() );
 m_xFastDocumentHandler.set( new TestFastDocumentHandler() );
+m_xLegacyDocumentHandler.set( new TestLegacyDocumentHandler() );
 m_xFastTokenHandler.set( new TestTokenHandler() );
-m_xParser = Parser::create(
-::comphelper::getProcessComponentContext() );
-m_xFastParser = FastParser::create(
-::comphelper::getProcessComponentContext() );
-m_xParser->setDocumentHandler( m_xDocumentHandler.get() );
-m_xFastParser->setFastDocumentHandler( m_xFastDocumentHandler.get() );
+m_xParser = Parser::create( xContext );
+m_xFastParser = FastParser::create( xContext );
+m_xParser->setDocumentHandler( m_xDocumentHandler );
+m_xFastParser->setFastDocumentHandler( m_xFastDocumentHandler );
 m_xFastParser->setTokenHandler( m_xFastTokenHandler );
+m_xLegacyFastParser.set( 
xContext->getServiceManager()->createInstanceWithContext
+( "com.sun.star.xml.sax.LegacyFastParser", xContext ), 
UNO_QUERY );
+m_xLegacyFastParser->setDocumentHandler( m_xLegacyDocumentHandler );
 m_sDirPath = m_directories.getPathFromSrc( "/sax/qa/data/" );
 }
 
@@ -382,7 +414,12 @@ void XMLImportTest::parse()
 m_xFastParser->parseStream(source);
 const OUString& rFastParserStr = m_xFastDocumentHandler->getString();
 
+source.aInputStream = createStreamFr

Re: Update to Firebird 3.0 - attempted build on OSX

2016-06-17 Thread Alexander Thurgood
Le 17/06/2016 à 10:43, Bunth Tamás a écrit :

Hi Tamás,


> I forget to comment out those patches. I uploaded a patch to gerrit
> now, could you please try it with the new version again?
> 


Same commit numbers ?

Alex



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


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

2016-06-17 Thread Caolán McNamara
 sw/source/core/access/acctable.cxx |   10 ++
 sw/source/core/layout/tabfrm.cxx   |7 +--
 sw/source/core/layout/wsfrm.cxx|2 +-
 3 files changed, 12 insertions(+), 7 deletions(-)

New commits:
commit 4561119a8bab986df25a5ce2a544aa96394cbd5d
Author: Caolán McNamara 
Date:   Fri Jun 17 10:10:33 2016 +0100

Resolves: tdf#100421, don't crash on deleting particular table

Change-Id: I52a4cf0732240aa26147313ae6a52c4fd8d8933c

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 002b653..422d64e 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4326,8 +4326,10 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool 
bTst, bool bInfo )
 
 //Only shrink as much as the content of the biggest cell allows.
 SwTwips nRealDist = nDist;
+SwFormat* pMod = GetFormat();
+if (pMod)
 {
-const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize();
+const SwFormatFrameSize &rSz = pMod->GetFrameSize();
 SwTwips nMinHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ?
  rSz.GetHeight() :
  0;
@@ -4361,7 +4363,8 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool 
bTst, bool bInfo )
 Frame().Pos().X() += nReal;
 }
 
-SwTwips nTmp = GetUpper()->Shrink( nReal, bTst );
+SwLayoutFrame* pFrame = GetUpper();
+SwTwips nTmp = pFrame ? pFrame->Shrink(nReal, bTst) : 0;
 if ( !bShrinkAnyway && !GetNext() && nTmp != nReal )
 {
 //The last one gets the leftover in the upper and therefore takes
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 1635463..9451c0a 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -1216,7 +1216,7 @@ SwTwips SwFrame::Shrink( SwTwips nDist, bool bTst, bool 
bInfo )
 const SwTabFrame* pTab = FindTabFrame();
 
 // NEW TABLES
-if ( pTab->IsVertical() != IsVertical() ||
+if ( (pTab && pTab->IsVertical() != IsVertical()) ||
  pThisCell->GetLayoutRowSpan() < 1 )
 return 0;
 }
commit e41a694c8b4fd1503b31f3a9da326e9f7ddd1b79
Author: Caolán McNamara 
Date:   Fri Jun 17 09:44:26 2016 +0100

Related: tdf#100421 crash in a11y on load of source odt

stldebug assert because end is before start and we can'g
get to start from end in a std::set

Change-Id: I0471220d3940e08b564f88841703a539aaf369d6

diff --git a/sw/source/core/access/acctable.cxx 
b/sw/source/core/access/acctable.cxx
index 28611e2..8f2c4e3 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -557,15 +557,17 @@ void SwAccessibleTableData_Impl::GetRowColumnAndExtent(
 maRows.upper_bound( rBox.Bottom() - maTabFramePos.Y() ) );
 rRow =
  static_cast< sal_Int32 >( std::distance( maRows.begin(), aStt ) );
-rRowExtent =
- static_cast< sal_Int32 >( std::distance( aStt, aEnd ) );
+sal_Int32 nRowEnd =
+ static_cast< sal_Int32 >( std::distance( maRows.begin(), aEnd ) );
+rRowExtent = nRowEnd - rRow;
 
 aStt = maColumns.lower_bound( rBox.Left() - maTabFramePos.X() );
 aEnd = maColumns.upper_bound( rBox.Right() - maTabFramePos.X() );
 rColumn =
  static_cast< sal_Int32 >( std::distance( maColumns.begin(), aStt ) );
-rColumnExtent =
- static_cast< sal_Int32 >( std::distance( aStt, aEnd ) );
+sal_Int32 nColumnEnd =
+ static_cast< sal_Int32 >( std::distance( maColumns.begin(), aEnd ) );
+rColumnExtent = nColumnEnd - rColumn;
 }
 
 class SwAccSingleTableSelHander_Impl : public SwAccTableSelHander_Impl
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Xisco Fauli
 include/svtools/helpopt.hxx   |3 +-
 svtools/source/config/helpopt.cxx |   56 ++
 2 files changed, 29 insertions(+), 30 deletions(-)

New commits:
commit 81071d8a877c5883b871a2699955ab3ef62b0bee
Author: Xisco Fauli 
Date:   Wed Jun 15 01:56:58 2016 +0200

tdf#89329: use shared_ptr for pImpl in helpopt

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

diff --git a/include/svtools/helpopt.hxx b/include/svtools/helpopt.hxx
index c9f44c7..3651469 100644
--- a/include/svtools/helpopt.hxx
+++ b/include/svtools/helpopt.hxx
@@ -24,12 +24,13 @@
 #include 
 #include 
 #include 
+#include 
 
 class SvtHelpOptions_Impl;
 
 class SVT_DLLPUBLIC SvtHelpOptions: public utl::detail::Options
 {
-SvtHelpOptions_Impl*pImp;
+std::shared_ptrpImpl;
 
 public:
 SvtHelpOptions();
diff --git a/svtools/source/config/helpopt.cxx 
b/svtools/source/config/helpopt.cxx
index 94edac0..ca6b9c0 100644
--- a/svtools/source/config/helpopt.cxx
+++ b/svtools/source/config/helpopt.cxx
@@ -36,9 +36,10 @@ using namespace utl;
 using namespace com::sun::star::uno;
 using namespace com::sun::star;
 
-
-static SvtHelpOptions_Impl* pOptions = nullptr;
-static sal_Int32   nRefCount = 0;
+namespace {
+//global
+std::weak_ptr g_pHelpOptions;
+}
 
 enum class HelpProperty
 {
@@ -60,10 +61,11 @@ class SvtHelpOptions_Impl : public utl::ConfigItem
 
 static Sequence< OUString > GetPropertyNames();
 
-virtual voidImplCommit() override;
+virtual voidImplCommit() SAL_FINAL override;
 
 public:
 SvtHelpOptions_Impl();
+~SvtHelpOptions_Impl();
 
 virtual voidNotify( const css::uno::Sequence< OUString >& 
aPropertyNames ) override;
 voidLoad( const css::uno::Sequence< OUString>& aPropertyNames);
@@ -119,7 +121,6 @@ Sequence< OUString > SvtHelpOptions_Impl::GetPropertyNames()
 return *pMutex;
 }
 
-
 SvtHelpOptions_Impl::SvtHelpOptions_Impl()
 : ConfigItem( OUString( "Office.Common/Help" ) )
 , bExtendedHelp( false )
@@ -131,6 +132,11 @@ SvtHelpOptions_Impl::SvtHelpOptions_Impl()
 EnableNotification( aNames );
 }
 
+SvtHelpOptions_Impl::~SvtHelpOptions_Impl()
+{
+if ( IsModified() )
+Commit();
+}
 
 static int lcl_MapPropertyName( const OUString& rCompare,
 const uno::Sequence< OUString>& aInternalPropertyNames)
@@ -211,7 +217,6 @@ void  SvtHelpOptions_Impl::Load(const uno::Sequence< 
OUString>& rPropertyNames)
 }
 }
 
-
 void SvtHelpOptions_Impl::ImplCommit()
 {
 Sequence< OUString > aNames = GetPropertyNames();
@@ -246,7 +251,6 @@ void SvtHelpOptions_Impl::ImplCommit()
 PutProperties( aNames, aValues );
 }
 
-
 void SvtHelpOptions_Impl::Notify( const Sequence& aPropertyNames )
 {
 Load( aPropertyNames );
@@ -256,73 +260,67 @@ SvtHelpOptions::SvtHelpOptions()
 {
 // Global access, must be guarded (multithreading)
 ::osl::MutexGuard aGuard( SvtHelpOptions_Impl::getInitMutex() );
-++nRefCount;
-if ( !pOptions )
-{
-pOptions = new SvtHelpOptions_Impl;
 
+pImpl = g_pHelpOptions.lock();
+if ( !pImpl )
+{
+pImpl = std::make_shared();
+g_pHelpOptions = pImpl;
 svtools::ItemHolder2::holdConfigItem(E_HELPOPTIONS);
 }
-pImp = pOptions;
 }
 
-
 SvtHelpOptions::~SvtHelpOptions()
 {
 // Global access, must be guarded (multithreading)
 ::osl::MutexGuard aGuard( SvtHelpOptions_Impl::getInitMutex() );
-if ( !--nRefCount )
-{
-if ( pOptions->IsModified() )
-pOptions->Commit();
-DELETEZ( pOptions );
-}
+
+pImpl.reset();
 }
 
 void SvtHelpOptions::SetExtendedHelp( bool b )
 {
-pImp->SetExtendedHelp( b );
+pImpl->SetExtendedHelp( b );
 }
 
 bool SvtHelpOptions::IsExtendedHelp() const
 {
-return pImp->IsExtendedHelp();
+return pImpl->IsExtendedHelp();
 }
 
 void SvtHelpOptions::SetHelpTips( bool b )
 {
-pImp->SetHelpTips( b );
+pImpl->SetHelpTips( b );
 }
 
 bool SvtHelpOptions::IsHelpTips() const
 {
-return pImp->IsHelpTips();
+return pImpl->IsHelpTips();
 }
 
-
 void SvtHelpOptions::SetWelcomeScreen( bool b )
 {
-pImp->SetWelcomeScreen( b );
+pImpl->SetWelcomeScreen( b );
 }
 
 bool SvtHelpOptions::IsWelcomeScreen() const
 {
-return pImp->IsWelcomeScreen();
+return pImpl->IsWelcomeScreen();
 }
 
 OUString SvtHelpOptions::GetSystem() const
 {
-return pImp->GetSystem();
+return pImpl->GetSystem();
 }
 
 const OUString&   SvtHelpOptions::GetHelpStyleSheet()const
 {
-return pImp->GetHelpStyleSheet();
+return pImpl->GetHelpStyleSheet();
 }
 
 void  SvtHelpOptions::SetHelpStyleSheet(const OUString& rStyleSheet)
 {
-pImp->SetHelpStyleSheet(rStyleSheet);
+pImpl->SetHelpStyleSheet(rStyleSheet);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 e

Re: [comment] tdf#98110: fix to handling

2016-06-17 Thread Andras Timar
Hi Akash,

I ran the script on actual help source files. What problem did you try
to solve? If it was an artificial, made-up problem, then it's possible
that you solved it. But the net result of the patch was a regression.
%PRODUCTNAME strings from source has to be replaced with {{ProductName}}
in wiki text, otherwise the replacement to LibreOffice will not be made.

Let's see the original report: CommandCtrl on pages.
History of Draw/Shortcut Keys for Drawing Objects shows, that the last
update of this page was in 2011.
https://help.libreoffice.org/WikiAction/history/Draw/Shortcut_Keys_for_Drawing_Objects

Example:
#Press {{KeyCode|CommandCtrl+F6}} to enter the document.

But in my recently generated wiki text file I see (with or without your
patch):

#Press
{{System|default={{KeyCode|Ctrl}}|mac={{KeyCode|Command{{KeyCode|+F6}}
to enter the document.

So, the bug was fixed earlier, but wiki was not updated. Can you please
repeat my experiment on actual help files, with and without your patch,
and check, if you get the same as me?

Regards,
Andras

On 06/17/2016 01:04 AM, Akash Deshpande wrote:
> Hi Andras,
> 
> Thank you for the review.
> 
> Actually, as I noted in my comments, I made a custom input file and checked
> to make sure the output was as described by Dennis in the ticket as
> requirement:  https://bugs.documentfoundation.org/show_bug.cgi?id=98110#c7
> 
> In a related/parent ticket, Dennis mentioned there may be two parts
> (easyHacks): https://bugs.documentfoundation.org/show_bug.cgi?id=62292#c5
> 
> So I wasn't expecting this to fix the wiki pages by itself.
> 
> Also, sorry for a silly question: does 'regression' mean adverse impact or
> side effect?  I will take a look in the next few days for sure.
> 
> If this explanation is not good and if you or Dennis have other ideas on
> how to tackle this task, please share some high level details.  I would
> love to work on it.
> 
> I am studying other aspects of the project (python related) and also
> learning git.  Norbert and others helped me a lot with my first submission
> (on IRC) and I feel like I have forgotten some of the commands already :(
> 
> Thank you all again and I am looking forward to addressing this issue or
> looking for other tickets in the summer.  Feel free to suggest anything
> python related (I am looking at 'making unittests more pythonic' etc.)
> 
> Akash
> 
> On Thu, Jun 16, 2016 at 3:57 AM, Andras Timar (via Code Review) <
> ger...@gerrit.libreoffice.org> wrote:
> 
>> Andras Timar has posted comments on this change.
>>
>> Change subject: tdf#98110: fix to  handling
>> ..
>>
>>
>> Patch Set 3: Code-Review-1
>>
>> I generated help wiki pages with ./help-to-wiki.py -n command with and
>> without the patch and I compared the results.
>>
>> I did not see improvements, but I saw a regression: {{ProductName}} turned
>> into %PRODUCTNAME in 219 occasions.
>>
>> --
>> To view, visit https://gerrit.libreoffice.org/25000
>> To unsubscribe, visit https://gerrit.libreoffice.org/settings
>>
>> Gerrit-MessageType: comment
>> Gerrit-Change-Id: I841bf638d9975d78ac0ffeba40697bbc614cde4a
>> Gerrit-PatchSet: 3
>> Gerrit-Project: help
>> Gerrit-Branch: master
>> Gerrit-Owner: Akash Deshpande 
>> Gerrit-Reviewer: Andras Timar 
>> Gerrit-Reviewer: dennisroczek 
>> Gerrit-Reviewer: jan iversen 
>> Gerrit-HasComments: No
>>
> 
> 
> 
-- 
Andras Timar
Product Development Manager
Collabora Productivity Ltd.
https://collaboraoffice.com/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - comphelper/CppunitTest_comphelper_threadpool_test.mk comphelper/Module_comphelper.mk comphelper/qa comphelper/source include/comphelper packa

2016-06-17 Thread Ashod Nakashian
 comphelper/CppunitTest_comphelper_threadpool_test.mk |   30 ++
 comphelper/Module_comphelper.mk  |1 
 comphelper/qa/unit/threadpooltest.cxx|   55 +++
 comphelper/source/misc/threadpool.cxx|   24 +++-
 include/comphelper/threadpool.hxx|6 ++
 package/source/zippackage/ZipPackageStream.cxx   |2 
 sc/source/filter/excel/xetable.cxx   |2 
 sc/source/filter/oox/workbookfragment.cxx|2 
 solenv/gbuild/CppunitTest.mk |3 +
 9 files changed, 121 insertions(+), 4 deletions(-)

New commits:
commit c739cc104844893955dc9a4de2bf8050759703f2
Author: Ashod Nakashian 
Date:   Tue Jun 14 07:19:20 2016 -0400

tdf#98955 hardware_concurrency not ideal for thread pools

A new static member getPreferredConcurrency added to
comphelper::ThreadPool to return a configurable max
number of threads.

By default the new function returns the hardware_concurrency
value provided by std::thread. When MAX_CONCURRENCY envar is
defined, the return value is limited to whatever is set there.

Three call-sites that used std::thread::hardware_concurrency
have been replaced with getPreferredConcurrency.

Unittests added to cover the functionality of the new member.

Unittests are capped to 4 threads.

Reviewed-on: https://gerrit.libreoffice.org/26254
Tested-by: Jenkins 
Reviewed-by: Ashod Nakashian 
(cherry picked from commit 60e75fb276778459f6055360646d879b8c615d83)

Change-Id: I3332e393a88a5ed436316fa712ed920a4b37f4af
Reviewed-on: https://gerrit.libreoffice.org/26395
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 

diff --git a/comphelper/CppunitTest_comphelper_threadpool_test.mk 
b/comphelper/CppunitTest_comphelper_threadpool_test.mk
new file mode 100644
index 000..aa4e0f0
--- /dev/null
+++ b/comphelper/CppunitTest_comphelper_threadpool_test.mk
@@ -0,0 +1,30 @@
+# -*- 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,comphelper_threadpool_test))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,comphelper_threadpool_test, 
\
+comphelper/qa/unit/threadpooltest \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,comphelper_threadpool_test,\
+   boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,comphelper_threadpool_test))
+
+$(eval $(call gb_CppunitTest_use_libraries,comphelper_threadpool_test, \
+comphelper \
+cppuhelper \
+cppu \
+sal \
+   $(gb_UWINAPI) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/comphelper/Module_comphelper.mk b/comphelper/Module_comphelper.mk
index 2eba43d..7a1925f 100644
--- a/comphelper/Module_comphelper.mk
+++ b/comphelper/Module_comphelper.mk
@@ -28,6 +28,7 @@ $(eval $(call 
gb_Module_add_subsequentcheck_targets,comphelper,\
 ))
 
 $(eval $(call gb_Module_add_check_targets,comphelper,\
+CppunitTest_comphelper_threadpool_test \
 CppunitTest_comphelper_syntaxhighlight_test \
 CppunitTest_comphelper_variadictemplates_test \
CppunitTest_comphelper_ifcontainer \
diff --git a/comphelper/qa/unit/threadpooltest.cxx 
b/comphelper/qa/unit/threadpooltest.cxx
new file mode 100644
index 000..d71a111
--- /dev/null
+++ b/comphelper/qa/unit/threadpooltest.cxx
@@ -0,0 +1,55 @@
+/* -*- 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 "cppunit/TestAssert.h"
+#include "cppunit/TestFixture.h"
+#include "cppunit/extensions/HelperMacros.h"
+#include "cppunit/plugin/TestPlugIn.h"
+
+#include 
+#include 
+
+class ThreadPoolTest : public CppUnit::TestFixture
+{
+public:
+void testPreferredConcurrency();
+
+CPPUNIT_TEST_SUITE(ThreadPoolTest);
+CPPUNIT_TEST(testPreferredConcurrency);
+CPPUNIT_TEST_SUITE_END();
+};
+
+void ThreadPoolTest::testPreferredConcurrency() {
+
+// Check default.
+auto nThreads = comphelper::ThreadPool::getPreferredConcurrency();
+sal_Int32 nExpected = 4; // UTs are capped to 4.
+CPPUNIT_ASSERT_MESSAGE("Expected no more than 4 threads", nExpected >= 
nThreads);
+
+#ifndef _WIN32_WINNT
+// The result should be cached, so this should change anything.
+nThreads = std::thread::hardware_concurrency() * 2;
+setenv("MAX_CONCURRENCY", std::to_string(nThreads).c_str(), true);
+nThreads = comphelper::ThreadPool::getP

Re: [Libreoffice-commits] core.git: passing a NULL pointer to fileno is not allowed

2016-06-17 Thread Stephan Bergmann

On 06/17/2016 09:59 AM, Markus Mohrhard wrote:

On Fri, Jun 17, 2016 at 9:38 AM, Stephan Bergmann mailto:sberg...@redhat.com>> wrote:

On 06/15/2016 09:52 PM, Markus Mohrhard wrote:

commit b5876bfcb69a65c87d602bae687b3c0634c0a1e7
Author: Markus Mohrhard mailto:markus.mohrh...@googlemail.com>>
Date:   Wed Jun 15 20:15:20 2016 +0200

passing a NULL pointer to fileno is not allowed

See crash reports at

[...]

What I don't quite understand is:


"fdo#38913: Prevent invalid parameter handler crashes" establishes a
_set_invalid_parameter_handler (that outputs to std::wcerr and then
returns), so one would assume that calling fileno(nullptr) would not
abort via MSVCR's _invalid_parameter_noinfo (see

)
but rather return EINVAL.

If breakpad is enabled it overwrites the invalid parameter handler. We
can of course change that behavior (just a different flag to the
breakpad init code) but at least I think that it is a good thing to not
ignore these errors.


Ah, that explains it.

Now that the root cause for 
 "CRASH at 
startup citing msvcr90.dll after upgrade (most likely related to 
javasettings_Windows_x86.xml in the user profile)" has probably been 
found and fixed with the above commit, I think it is best to revert 
 
"fdo#38913: Prevent invalid parameter handler crashes" again and remove 
the _set_invalid_parameter_handler hack from sal/osl/w32/salinit.cxx. 
Done that now with  "Revert 
'fdo#38913: Prevent invalid parameter handler crashes'".

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


[Libreoffice-commits] help.git: Branch 'libreoffice-5-2' - source/text

2016-06-17 Thread Adolfo Jayme Barrientos
 source/text/swriter/04/0102.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9bb675b1f2e47338be07252e78f680b7d2f64d0d
Author: Adolfo Jayme Barrientos 
Date:   Fri Jun 17 03:49:05 2016 -0500

tdf#100445 Fix name of style applied on Ctrl+0

Change-Id: I38bb9fb7c6d79f19b22391feab08ddaa18ccc29a
(cherry picked from commit fe617af636ad6b2a9b0b45d290a7d23604624733)
Reviewed-on: https://gerrit.libreoffice.org/26410
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/source/text/swriter/04/0102.xhp 
b/source/text/swriter/04/0102.xhp
index 3de1b0b..96c1a8e 100644
--- a/source/text/swriter/04/0102.xhp
+++ b/source/text/swriter/04/0102.xhp
@@ -383,7 +383,7 @@
 Ctrl+0 
(zero)
 
 
-   Apply Default paragraph styleUFI: see 
spec "Assign Keyboard Shortcuts to Styles"
+   Apply Text Body paragraph style
 
  
  
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - helpcontent2

2016-06-17 Thread Adolfo Jayme Barrientos
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4547fd4c3c58287076a6492d5c9f23ccc45578dc
Author: Adolfo Jayme Barrientos 
Date:   Fri Jun 17 03:49:05 2016 -0500

Updated core
Project: help  9bb675b1f2e47338be07252e78f680b7d2f64d0d

tdf#100445 Fix name of style applied on Ctrl+0

Change-Id: I38bb9fb7c6d79f19b22391feab08ddaa18ccc29a
(cherry picked from commit fe617af636ad6b2a9b0b45d290a7d23604624733)
Reviewed-on: https://gerrit.libreoffice.org/26410
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index 0bece95..9bb675b 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 0bece9575e2902f43e987711c3b293f17164869b
+Subproject commit 9bb675b1f2e47338be07252e78f680b7d2f64d0d
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2016-06-17 Thread Adolfo Jayme Barrientos
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 63db3a2bf78225b9304d08397c9c53316a3c9d4a
Author: Adolfo Jayme Barrientos 
Date:   Fri Jun 17 03:49:05 2016 -0500

Updated core
Project: help  fe617af636ad6b2a9b0b45d290a7d23604624733

tdf#100445 Fix name of style applied on Ctrl+0

Change-Id: I38bb9fb7c6d79f19b22391feab08ddaa18ccc29a

diff --git a/helpcontent2 b/helpcontent2
index 2b3576a..fe617af 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 2b3576acb7553a05ff5935dcd346306be8488b3a
+Subproject commit fe617af636ad6b2a9b0b45d290a7d23604624733
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Adolfo Jayme Barrientos
 source/text/swriter/04/0102.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fe617af636ad6b2a9b0b45d290a7d23604624733
Author: Adolfo Jayme Barrientos 
Date:   Fri Jun 17 03:49:05 2016 -0500

tdf#100445 Fix name of style applied on Ctrl+0

Change-Id: I38bb9fb7c6d79f19b22391feab08ddaa18ccc29a

diff --git a/source/text/swriter/04/0102.xhp 
b/source/text/swriter/04/0102.xhp
index 3de1b0b..96c1a8e 100644
--- a/source/text/swriter/04/0102.xhp
+++ b/source/text/swriter/04/0102.xhp
@@ -383,7 +383,7 @@
 Ctrl+0 
(zero)
 
 
-   Apply Default paragraph styleUFI: see 
spec "Assign Keyboard Shortcuts to Styles"
+   Apply Text Body paragraph style
 
  
  
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Update to Firebird 3.0 - attempted build on OSX

2016-06-17 Thread Bunth Tamás
On Thu, Jun 16, 2016 at 01:56:35PM +0200, Alexander Thurgood wrote:
> Le 30/05/2016 à 19:13, Bunth Tamás a écrit :
>
> Hi Tamas,
>
> I cherry picked your commits to my master build tree and attempted a
> build, which failed at the patch. I have 3 reject files created, do you
> want them ?
>
> Alex

Hi Alex,

I forget to comment out those patches. I uploaded a patch to gerrit
now, could you please try it with the new version again?

Thank you,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - helpcontent2

2016-06-17 Thread Adolfo Jayme Barrientos
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2a8ef6d017ff2740a14d57b63b3ecaf37da16716
Author: Adolfo Jayme Barrientos 
Date:   Fri Jun 17 03:24:43 2016 -0500

Updated core
Project: help  0bece9575e2902f43e987711c3b293f17164869b

Checkbox renamed to “Enable cursor”

Change-Id: I0b73868c51d6d6637fa933f6ba37f897f1429f3b
(cherry picked from commit 2b3576acb7553a05ff5935dcd346306be8488b3a)
Reviewed-on: https://gerrit.libreoffice.org/26409
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index 8ff2c5f..0bece95 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 8ff2c5f505ed1f29901313692b8e3ca5d100d225
+Subproject commit 0bece9575e2902f43e987711c3b293f17164869b
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'libreoffice-5-2' - source/text

2016-06-17 Thread Adolfo Jayme Barrientos
 source/text/shared/optionen/01040600.xhp |2 +-
 source/text/swriter/01/04120211.xhp  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0bece9575e2902f43e987711c3b293f17164869b
Author: Adolfo Jayme Barrientos 
Date:   Fri Jun 17 03:24:43 2016 -0500

Checkbox renamed to “Enable cursor”

Change-Id: I0b73868c51d6d6637fa933f6ba37f897f1429f3b
(cherry picked from commit 2b3576acb7553a05ff5935dcd346306be8488b3a)
Reviewed-on: https://gerrit.libreoffice.org/26409
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/source/text/shared/optionen/01040600.xhp 
b/source/text/shared/optionen/01040600.xhp
index 4e6ffbe..f22b095 100644
--- a/source/text/shared/optionen/01040600.xhp
+++ b/source/text/shared/optionen/01040600.xhp
@@ -110,7 +110,7 @@
 When 
the Direct Cursor is used, a corresponding number of tabs and spaces are 
inserted in the new paragraph as necessary until the clicked position is 
reached.
 All insert options refer only to the current paragraph generated 
with the Direct Cursor.
 
-Cursor in protected areas - Enabled
+Protected Areas - Enable cursor
 Specifies that you can 
set the cursor in a protected area, but cannot make any 
changes.
 
 
diff --git a/source/text/swriter/01/04120211.xhp 
b/source/text/swriter/01/04120211.xhp
index 23cc5ca..535aacc 100644
--- a/source/text/swriter/01/04120211.xhp
+++ b/source/text/swriter/01/04120211.xhp
@@ -45,7 +45,7 @@
  Enter a 
title for the selected index.
 
 Protected against manual changes
- Prevents the contents of the 
index from being changed. Manual changes that you make to an index are 
lost when the index is refreshed. If you want the cursor to scroll through a 
protected area, choose %PRODUCTNAME - 
PreferencesTools - 
Options - %PRODUCTNAME Writer - 
Formatting Aids, and then select the Cursor in protected areas - 
Enabled check box.
+ Prevents 
the contents of the index from being changed. Manual changes that you 
make to an index are lost when the index is refreshed. If you want the cursor 
to scroll through a protected area, choose %PRODUCTNAME - 
PreferencesTools - 
Options - %PRODUCTNAME Writer - 
Formatting Aids, and then select the Enable cursor check 
box in the Protected Areas section.
   
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread David Tardon
 sfx2/source/control/bindings.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9aa437deffb10ed11e9f1a8d09c8d1dd4615056a
Author: David Tardon 
Date:   Fri Jun 17 10:27:27 2016 +0200

use assert, this time correctly

Change-Id: I845d9a8e49ca3ecbd7052875783519d18596dd52

diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 43a3d2b..a068ab3 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -648,7 +648,7 @@ void SfxBindings::Invalidate
 // Next SID
 if ( !*++pIds )
 break;
-assert( *pIds > *(pIds-1) || "pIds unsorted" );
+assert( *pIds > *(pIds-1) );
 }
 
 // if not enticed to start update timer
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Adolfo Jayme Barrientos
 source/text/shared/optionen/01040600.xhp |2 +-
 source/text/swriter/01/04120211.xhp  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2b3576acb7553a05ff5935dcd346306be8488b3a
Author: Adolfo Jayme Barrientos 
Date:   Fri Jun 17 03:24:43 2016 -0500

Checkbox renamed to “Enable cursor”

Change-Id: I0b73868c51d6d6637fa933f6ba37f897f1429f3b

diff --git a/source/text/shared/optionen/01040600.xhp 
b/source/text/shared/optionen/01040600.xhp
index 4e6ffbe..f22b095 100644
--- a/source/text/shared/optionen/01040600.xhp
+++ b/source/text/shared/optionen/01040600.xhp
@@ -110,7 +110,7 @@
 When 
the Direct Cursor is used, a corresponding number of tabs and spaces are 
inserted in the new paragraph as necessary until the clicked position is 
reached.
 All insert options refer only to the current paragraph generated 
with the Direct Cursor.
 
-Cursor in protected areas - Enabled
+Protected Areas - Enable cursor
 Specifies that you can 
set the cursor in a protected area, but cannot make any 
changes.
 
 
diff --git a/source/text/swriter/01/04120211.xhp 
b/source/text/swriter/01/04120211.xhp
index 23cc5ca..535aacc 100644
--- a/source/text/swriter/01/04120211.xhp
+++ b/source/text/swriter/01/04120211.xhp
@@ -45,7 +45,7 @@
  Enter a 
title for the selected index.
 
 Protected against manual changes
- Prevents the contents of the 
index from being changed. Manual changes that you make to an index are 
lost when the index is refreshed. If you want the cursor to scroll through a 
protected area, choose %PRODUCTNAME - 
PreferencesTools - 
Options - %PRODUCTNAME Writer - 
Formatting Aids, and then select the Cursor in protected areas - 
Enabled check box.
+ Prevents 
the contents of the index from being changed. Manual changes that you 
make to an index are lost when the index is refreshed. If you want the cursor 
to scroll through a protected area, choose %PRODUCTNAME - 
PreferencesTools - 
Options - %PRODUCTNAME Writer - 
Formatting Aids, and then select the Enable cursor check 
box in the Protected Areas section.
   
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2016-06-17 Thread Adolfo Jayme Barrientos
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3449ceadd9adab9bbed420d0a602b781067640e1
Author: Adolfo Jayme Barrientos 
Date:   Fri Jun 17 03:24:43 2016 -0500

Updated core
Project: help  2b3576acb7553a05ff5935dcd346306be8488b3a

Checkbox renamed to “Enable cursor”

Change-Id: I0b73868c51d6d6637fa933f6ba37f897f1429f3b

diff --git a/helpcontent2 b/helpcontent2
index 5f7e3ad..2b3576a 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 5f7e3ad041ddf022f6b0feb11fac1debbcf835b2
+Subproject commit 2b3576acb7553a05ff5935dcd346306be8488b3a
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread David Tardon
 sfx2/source/control/bindings.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2a5f6ad9b926cac23e4a1c128681a8e8d9c75d86
Author: David Tardon 
Date:   Thu Jun 16 16:44:55 2016 +0200

use assert

Change-Id: I12113ddefbba9120427aeed6d1246ff12c92188a

diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index cfc899f..43a3d2b 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -648,7 +648,7 @@ void SfxBindings::Invalidate
 // Next SID
 if ( !*++pIds )
 break;
-DBG_ASSERT( *pIds > *(pIds-1), "pIds unsorted" );
+assert( *pIds > *(pIds-1) || "pIds unsorted" );
 }
 
 // if not enticed to start update timer
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] core.git: convert DBG_ASSERT in vcl

2016-06-17 Thread Stephan Bergmann

On 06/17/2016 08:39 AM, Noel Grandin wrote:

New commits:
commit 9c79945ca62b18213728cdd23d9f390304aee1de
Author: Noel Grandin 
Date:   Sun Jun 12 20:11:20 2016 +0200

convert DBG_ASSERT in vcl

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

diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index dae0aef..b5a1499 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -107,7 +107,7 @@ AquaSalFrame::~AquaSalFrame()
 pSalData->maFrameCheck.erase( this );
 pSalData->maPresentationFrames.remove( this );

-DBG_ASSERT( this != s_pCaptureFrame, "capture frame destroyed" );
+SAL_WARN_IF( this == s_pCaptureFrame, "vcl", "capture frame destroyed" );
 if( this == s_pCaptureFrame )
 s_pCaptureFrame = nullptr;


[...]

Such wholesale replacement of (potentially ambiguous) DBG_ASSERT etc. 
with SAL_WARN is what I always feared.  The main problem with the old 
macros is their unclear semantics.  Are they meant to flag programming 
errors (in which case they should be replaced with assert) or to log 
warnings about unusual events (in which case SAL_WARN is fine).


Some cases (like the example above) seem to give it away, by explicitly 
handling condition c after DBG_ASSERT'ing !c.  But even that can be an 
outgrowth of unhelpful "defensive programming" rather than competent code.


Of course, it is often anything but trivial to decide the right 
replacement in an existing piece of code.  So maybe we do need to do 
some "light-hearted" mass conversions for the sake of getting rid of the 
old macros after all.  My original hope was that, after replacing all 
occurrences of the old macros, every occurrence of the "good" ones 
(assert, SAL_WARN, SAL_INFO) would be faithful to its semantics.  But 
that is probably already muddied past repair, anyway. ;)


(Not picking on this particular commit, and didn't verify closely 
whether any of the replacements in it are actually "unfaithful".  Just 
thought it couldn't hurt to mention this again.)

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


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

2016-06-17 Thread Caolán McNamara
 extensions/source/abpilot/datasourcehandling.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 1cf6c67f629dd21a0fbcd223ef0dcdfabd4b6a9f
Author: Caolán McNamara 
Date:   Fri Jun 17 09:13:38 2016 +0100

Resolves: tdf#96251 address wizard crash when run from start center

Change-Id: I20de1fbdd3ca609a1818dfe8f81ba66b1cb15281
(cherry picked from commit d6665da4eae15cf21eecaf048d1c9eb7381b3b99)

diff --git a/extensions/source/abpilot/datasourcehandling.cxx 
b/extensions/source/abpilot/datasourcehandling.cxx
index 4ed9384..a8afb62 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -365,7 +365,8 @@ namespace abp
 OSL_ENSURE( xStorable.is(),"DataSource is no XStorable!" );
 if ( xStorable.is() )
 {
-SfxObjectShell* pObjectShell = 
SfxViewFrame::Current()->GetObjectShell();
+SfxViewFrame* pFrame = SfxViewFrame::Current();
+SfxObjectShell* pObjectShell = pFrame ? 
pFrame->GetObjectShell() : nullptr;
 OUString aOwnURL = lcl_getOwnURL(pObjectShell);
 if (aOwnURL.isEmpty() || !rSettings.bEmbedDataSource)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Caolán McNamara
 extensions/source/abpilot/datasourcehandling.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d6665da4eae15cf21eecaf048d1c9eb7381b3b99
Author: Caolán McNamara 
Date:   Fri Jun 17 09:13:38 2016 +0100

Resolves: tdf#96251 address wizard crash when run from start center

Change-Id: I20de1fbdd3ca609a1818dfe8f81ba66b1cb15281

diff --git a/extensions/source/abpilot/datasourcehandling.cxx 
b/extensions/source/abpilot/datasourcehandling.cxx
index 4ed9384..a8afb62 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -365,7 +365,8 @@ namespace abp
 OSL_ENSURE( xStorable.is(),"DataSource is no XStorable!" );
 if ( xStorable.is() )
 {
-SfxObjectShell* pObjectShell = 
SfxViewFrame::Current()->GetObjectShell();
+SfxViewFrame* pFrame = SfxViewFrame::Current();
+SfxObjectShell* pObjectShell = pFrame ? 
pFrame->GetObjectShell() : nullptr;
 OUString aOwnURL = lcl_getOwnURL(pObjectShell);
 if (aOwnURL.isEmpty() || !rSettings.bEmbedDataSource)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Daniël van Vuuren licence statement

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

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

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

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

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

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


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

2016-06-17 Thread Akshay Deep
 sfx2/source/dialog/backingwindow.cxx |   71 ---
 sfx2/source/dialog/backingwindow.hxx |2 
 sfx2/uiconfig/ui/startcenter.ui  |   13 +-
 3 files changed, 54 insertions(+), 32 deletions(-)

New commits:
commit 59c45c8e6d16cb145f3551f9ecd1a3c45ca5d4d8
Author: Akshay Deep 
Date:   Fri Jun 17 12:59:44 2016 +0530

tdf#90577 Start Center: Clear List item should more accessible

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

diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index 350dc4a..730627c 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -25,6 +25,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -260,6 +261,7 @@ void BackingWindow::initControls()
 mpLocalView->Hide();
 
 mpTemplateButton->SetMenuMode( MENUBUTTON_MENUMODE_TIMED );
+mpRecentButton->SetMenuMode( MENUBUTTON_MENUMODE_TIMED );
 
 //set handlers
 mpLocalView->setCreateContextMenuHdl(LINK(this, BackingWindow, 
CreateContextMenuHdl));
@@ -587,43 +589,52 @@ IMPL_LINK_TYPED( BackingWindow, ClickHdl, Button*, 
pButton, void )
 
 IMPL_LINK_TYPED( BackingWindow, MenuSelectHdl, MenuButton*, pButton, void )
 {
-initializeLocalView();
-
-OString sId = pButton->GetCurItemIdent();
-
-if( sId == "filter_writer" )
+if(pButton == mpRecentButton)
 {
-
mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::WRITER));
-}
-else if( sId == "filter_calc" )
-{
-
mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::CALC));
-}
-else if( sId == "filter_impress" )
-{
-
mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::IMPRESS));
-}
-else if( sId == "filter_draw" )
-{
-
mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::DRAW));
+SvtHistoryOptions().Clear(ePICKLIST);
+mpAllRecentThumbnails->Reload();
+return;
 }
-else if( sId == "manage" )
+else if(pButton == mpTemplateButton)
 {
-Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY );
+initializeLocalView();
 
-Sequence< css::beans::PropertyValue > aArgs(1);
-PropertyValue* pArg = aArgs.getArray();
-pArg[0].Name = "Referer";
-pArg[0].Value <<= OUString("private:user");
+OString sId = pButton->GetCurItemIdent();
 
-dispatchURL( ".uno:NewDoc", OUString(), xFrame, aArgs );
+if( sId == "filter_writer" )
+{
+
mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::WRITER));
+}
+else if( sId == "filter_calc" )
+{
+
mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::CALC));
+}
+else if( sId == "filter_impress" )
+{
+
mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::IMPRESS));
+}
+else if( sId == "filter_draw" )
+{
+
mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::DRAW));
+}
+else if( sId == "manage" )
+{
+Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY );
 
-}
+Sequence< css::beans::PropertyValue > aArgs(1);
+PropertyValue* pArg = aArgs.getArray();
+pArg[0].Name = "Referer";
+pArg[0].Value <<= OUString("private:user");
 
-mpAllRecentThumbnails->Hide();
-mpLocalView->Show();
-mpLocalView->reload();
-mpLocalView->GrabFocus();
+dispatchURL( ".uno:NewDoc", OUString(), xFrame, aArgs );
+
+}
+
+mpAllRecentThumbnails->Hide();
+mpLocalView->Show();
+mpLocalView->reload();
+mpLocalView->GrabFocus();
+}
 }
 
 IMPL_LINK_TYPED(BackingWindow, CreateContextMenuHdl, ThumbnailViewItem*, 
pItem, void)
diff --git a/sfx2/source/dialog/backingwindow.hxx 
b/sfx2/source/dialog/backingwindow.hxx
index 199302f..cfaf984 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -59,7 +59,7 @@ class BackingWindow : public vcl::Window, public 
VclBuilderContainer
 css::uno::Reference 
mxDropTargetListener;
 
 VclPtr mpOpenButton;
-VclPtr mpRecentButton;
+VclPtr mpRecentButton;
 VclPtr mpRemoteButton;
 VclPtr mpTemplateButton;
 
diff --git a/sfx2/uiconfig/ui/startcenter.ui b/sfx2/uiconfig/ui/startcenter.ui
index 2591be7..68ab548 100644
--- a/sfx2/uiconfig/ui/startcenter.ui
+++ b/sfx2/uiconfig/ui/startcenter.ui
@@ -18,6 +18,17 @@
 False
 res/odg_32_8.png
   
+  
+True
+False
+
+  
+True
+False
+Clear Recent 
Documents
+  
+
+  
   
 True
 False
@@ -160,7 +171,7 @@
   
 
 

Re: [Libreoffice-commits] core.git: passing a NULL pointer to fileno is not allowed

2016-06-17 Thread Markus Mohrhard
Hey Stephan,

On Fri, Jun 17, 2016 at 9:38 AM, Stephan Bergmann 
wrote:

> On 06/15/2016 09:52 PM, Markus Mohrhard wrote:
>
>> commit b5876bfcb69a65c87d602bae687b3c0634c0a1e7
>> Author: Markus Mohrhard 
>> Date:   Wed Jun 15 20:15:20 2016 +0200
>>
>> passing a NULL pointer to fileno is not allowed
>>
>> See crash reports at
>> http://crashreport.libreoffice.org/stats/signature/do_msvcr_magic+0x7
>> and documentation at
>> https://msdn.microsoft.com/en-us/library/zs6wbdhx.aspx
>>
>> Change-Id: Ia9166d3b9fa10b87585821504e39cdfecbd22eda
>> Reviewed-on: https://gerrit.libreoffice.org/26317
>> Reviewed-by: Michael Stahl 
>> Tested-by: Markus Mohrhard 
>>
>> diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
>> b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
>> index fad3c0a9..43ddc82 100644
>> --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
>> +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
>> @@ -548,6 +548,9 @@ static void do_msvcr_magic(rtl_uString *jvm_dll)
>>
>>  FILE *f = _wfopen(reinterpret_cast(Module->buffer), L"rb");
>>
>> +if (!f)
>> +return;
>> +
>>  if (fstat(fileno(f), &st) == -1)
>>  {
>>  fclose(f);
>>
>
> What I don't quite understand is: <
> https://cgit.freedesktop.org/libreoffice/core/commit/?id=a82e532ce006c54b2740de74d1da5d11307da7c1>
> "fdo#38913: Prevent invalid parameter handler crashes" establishes a
> _set_invalid_parameter_handler (that outputs to std::wcerr and then
> returns), so one would assume that calling fileno(nullptr) would not abort
> via MSVCR's _invalid_parameter_noinfo (see <
> http://crashreport.libreoffice.org/stats/crash_details/8e1e262d-3281-431c-89b5-a5642033fe94>)
> but rather return EINVAL.
>


If breakpad is enabled it overwrites the invalid parameter handler. We can
of course change that behavior (just a different flag to the breakpad init
code) but at least I think that it is a good thing to not ignore these
errors.

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


Re: Alexis PAQUIN license statement

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

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

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

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

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

rgds
Jan Iversen.


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


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

2016-06-17 Thread Mark Page
 filter/source/flash/swfexporter.cxx  |7 +++
 filter/source/flash/swfwriter.cxx|3 +--
 filter/source/flash/swfwriter1.cxx   |   13 ++---
 filter/source/flash/swfwriter2.cxx   |   19 +--
 filter/source/placeware/exporter.cxx |   17 -
 filter/source/svg/svgfilter.hxx  |2 --
 6 files changed, 27 insertions(+), 34 deletions(-)

New commits:
commit 48b7176fc09279d06d12fbab5619770767faad60
Author: Mark Page 
Date:   Thu Jun 16 14:39:57 2016 +0100

Remove the "using namespace std" from filter

Change-Id: Ied355374a0bf662a9be70d83615446cbac9ee0b2
Reviewed-on: https://gerrit.libreoffice.org/26373
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/filter/source/flash/swfexporter.cxx 
b/filter/source/flash/swfexporter.cxx
index 3bdceb8..a79a7ed 100644
--- a/filter/source/flash/swfexporter.cxx
+++ b/filter/source/flash/swfexporter.cxx
@@ -42,7 +42,6 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::presentation;
 using namespace ::com::sun::star::task;
-using namespace ::std;
 using namespace ::swf;
 
 using com::sun::star::io::XOutputStream;
@@ -63,8 +62,8 @@ PageInfo::PageInfo()
 
 PageInfo::~PageInfo()
 {
-vector::iterator aIter( maShapesVector.begin() );
-const vector::iterator aEnd( maShapesVector.end() );
+std::vector::iterator aIter( maShapesVector.begin() );
+const std::vector::iterator aEnd( maShapesVector.end() );
 while( aIter != aEnd )
 {
 delete (*aIter++);
@@ -505,7 +504,7 @@ void FlashExporter::exportShapes( const Reference< XShapes 
>& xShapes, bool bStr
 {
 OSL_ENSURE( (xShapes->getCount() <= 0x), "overflow in 
FlashExporter::exportDrawPageContents()" );
 
-sal_uInt16 nShapeCount = (sal_uInt16)min( xShapes->getCount(), 
(sal_Int32)0x );
+sal_uInt16 nShapeCount = (sal_uInt16)std::min( xShapes->getCount(), 
(sal_Int32)0x );
 sal_uInt16 nShape;
 
 Reference< XShape > xShape;
diff --git a/filter/source/flash/swfwriter.cxx 
b/filter/source/flash/swfwriter.cxx
index b91c0f3..22841bf 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -23,7 +23,6 @@
 #include 
 
 using namespace ::swf;
-using namespace ::std;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::io;
 
@@ -110,7 +109,7 @@ void ImplCopySvStreamToXOutputStream( SvStream& rIn, 
Reference< XOutputStream >
 sal_uInt32 nSize = rIn.Tell();
 rIn.Seek( STREAM_SEEK_TO_BEGIN );
 
-Sequence< sal_Int8 > aBuffer( min( nBufferSize, nSize ) );
+Sequence< sal_Int8 > aBuffer( std::min( nBufferSize, nSize ) );
 
 while( nSize )
 {
diff --git a/filter/source/flash/swfwriter1.cxx 
b/filter/source/flash/swfwriter1.cxx
index 4bc5557..5d1d057 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -39,7 +39,6 @@
 #include 
 
 using namespace ::swf;
-using namespace ::std;
 using namespace ::com::sun::star::i18n;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -175,7 +174,7 @@ void Writer::Impl_addShapeRecordChange( BitStream& rBits, 
sal_Int16 dx, sal_Int1
 rBits.writeUB( bFilled ? 1 : 0, 1 );// StateFillStyle1
 rBits.writeUB( 1, 1 );  // StateMoveTo
 
-sal_uInt16 nMoveBits = max( getMaxBitsSigned( dx ), getMaxBitsSigned( dy ) 
);
+sal_uInt16 nMoveBits = std::max( getMaxBitsSigned( dx ), getMaxBitsSigned( 
dy ) );
 
 rBits.writeUB( nMoveBits, 5 );  // Number of bits per value
 // TODO: Optimize horizontal and vertical 
lines
@@ -193,7 +192,7 @@ void Writer::Impl_addStraightEdgeRecord( BitStream& rBits, 
sal_Int16 dx, sal_Int
 rBits.writeUB( 1, 1 );  // TypeFlag
 rBits.writeUB( 1, 1 );  // StraightFlag
 
-sal_uInt16 nBits = max( getMaxBitsSigned( dx ), getMaxBitsSigned( dy ) );
+sal_uInt16 nBits = std::max( getMaxBitsSigned( dx ), getMaxBitsSigned( dy 
) );
 
 rBits.writeUB( nBits - 2, 4 );  // Number of bits per value
 
@@ -227,10 +226,10 @@ void Writer::Impl_addCurvedEdgeRecord( BitStream& rBits, 
sal_Int16 control_dx, s
 rBits.writeUB( 0, 1 );  // CurvedFlag
 
 sal_uInt8 nBits = static_cast(
-max( getMaxBitsSigned( control_dx ),
-max( getMaxBitsSigned( control_dy ),
-max( getMaxBitsSigned( anchor_dx ),
-max( getMaxBitsSigned( anchor_dy ), (sal_uInt16)3 ) ) ) ) 
);
+std::max( getMaxBitsSigned( control_dx ),
+std::max( getMaxBitsSigned( control_dy ),
+std::max( getMaxBitsSigned( anchor_dx ),
+std::max( getMaxBitsSigned( anchor_dy ), (sal_uInt16)3 ) ) 
) ) );
 
 rBits.writeUB( nBits - 2, 4 );  // Number of bits per value
 
diff --git a/filter/source/flash/swfwriter2.cxx 
b/filter/source/flash/swfwriter2.cxx
index 2b2e8c1..ca6dc1e 100644
--- a/filt

Re: [Libreoffice-commits] core.git: passing a NULL pointer to fileno is not allowed

2016-06-17 Thread Stephan Bergmann

On 06/15/2016 09:52 PM, Markus Mohrhard wrote:

commit b5876bfcb69a65c87d602bae687b3c0634c0a1e7
Author: Markus Mohrhard 
Date:   Wed Jun 15 20:15:20 2016 +0200

passing a NULL pointer to fileno is not allowed

See crash reports at
http://crashreport.libreoffice.org/stats/signature/do_msvcr_magic+0x7
and documentation at
https://msdn.microsoft.com/en-us/library/zs6wbdhx.aspx

Change-Id: Ia9166d3b9fa10b87585821504e39cdfecbd22eda
Reviewed-on: https://gerrit.libreoffice.org/26317
Reviewed-by: Michael Stahl 
Tested-by: Markus Mohrhard 

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index fad3c0a9..43ddc82 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -548,6 +548,9 @@ static void do_msvcr_magic(rtl_uString *jvm_dll)

 FILE *f = _wfopen(reinterpret_cast(Module->buffer), L"rb");

+if (!f)
+return;
+
 if (fstat(fileno(f), &st) == -1)
 {
 fclose(f);


What I don't quite understand is: 
 
"fdo#38913: Prevent invalid parameter handler crashes" establishes a 
_set_invalid_parameter_handler (that outputs to std::wcerr and then 
returns), so one would assume that calling fileno(nullptr) would not 
abort via MSVCR's _invalid_parameter_noinfo (see 
) 
but rather return EINVAL.

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


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

2016-06-17 Thread Miklos Vajna
 loolwsd/Util.cpp |2 +-
 loolwsd/Util.hpp |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5e1b21089117a8df25003879ad7cbf46dc588e43
Author: Miklos Vajna 
Date:   Fri Jun 17 09:18:26 2016 +0200

Util: pass by const ref

diff --git a/loolwsd/Util.cpp b/loolwsd/Util.cpp
index 3920ae1..6224534 100644
--- a/loolwsd/Util.cpp
+++ b/loolwsd/Util.cpp
@@ -128,7 +128,7 @@ namespace Util
 return name;
 }
 
-std::string getTempFilePath(const std::string srcDir, const std::string& 
srcFilename)
+std::string getTempFilePath(const std::string& srcDir, const std::string& 
srcFilename)
 {
 const std::string srcPath = srcDir + '/' + srcFilename;
 const std::string dstPath = Poco::Path::temp() + 
encodeId(rng::getNext()) + '_' + srcFilename;
diff --git a/loolwsd/Util.hpp b/loolwsd/Util.hpp
index b3065a4..fd76c54 100644
--- a/loolwsd/Util.hpp
+++ b/loolwsd/Util.hpp
@@ -82,7 +82,7 @@ namespace Util
 /// Primarily used by tests to avoid tainting the originals.
 /// srcDir shouldn't end with '/' and srcFilename shouldn't contain '/'.
 /// Returns the created file path.
-std::string getTempFilePath(const std::string srcDir, const std::string& 
srcFilename);
+std::string getTempFilePath(const std::string& srcDir, const std::string& 
srcFilename);
 
 /// Returns the name of the signal.
 const char *signalName(int signo);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-17 Thread Jakub Trzebiatowski
 sw/qa/python/check_styles.py|   20 +
 sw/source/core/unocore/unostyle.cxx |   54 ++--
 2 files changed, 72 insertions(+), 2 deletions(-)

New commits:
commit 17f440e7e7f1621edebc58f8be5e85b68ee7dcf4
Author: Jakub Trzebiatowski 
Date:   Thu Jun 16 13:40:59 2016 +0200

GSoC Table Styles, TableStyle isInUse, isUserDefined, mutex fixes

Also added:
+ SwXTextCellStyle::IsInUse()
+ check_styles.py
SwXTextTableStyle::isUserDefined() tests

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

diff --git a/sw/qa/python/check_styles.py b/sw/qa/python/check_styles.py
index d2ea6a9..7a3e80e 100644
--- a/sw/qa/python/check_styles.py
+++ b/sw/qa/python/check_styles.py
@@ -183,6 +183,26 @@ class CheckStyle(unittest.TestCase):
 xCellStyle.getPropertyValue("foobarbaz")
 xDoc.dispose()
 
+def test_tableStyleIsInUse(self):
+# extend when TableStyle insertByName comes
+xDoc = CheckStyle._uno.openEmptyWriterDoc()
+xBodyText = xDoc.getText()
+xCursor = xBodyText.createTextCursor()
+xTable = xDoc.createInstance("com.sun.star.text.TextTable")
+xTable.initialize(1, 1)
+xBodyText.insertTextContent(xCursor, xTable, True)
+xDefaultTableStyle = 
xDoc.StyleFamilies.getByName("TableStyles").getByName("Default Style")
+xDefaultCellStyle = 
xDoc.StyleFamilies.getByName("CellStyles").getByName("Default Style.1")
+self.assertFalse(xDefaultTableStyle.isInUse())
+self.assertFalse(xDefaultCellStyle.isInUse())
+xTable.setPropertyValue("TableTemplateName", "Default Style")
+self.assertTrue(xDefaultTableStyle.isInUse())
+self.assertTrue(xDefaultCellStyle.isInUse())
+xTable.setPropertyValue("TableTemplateName", "")
+self.assertFalse(xDefaultTableStyle.isInUse())
+self.assertFalse(xDefaultCellStyle.isInUse())
+xDoc.dispose()
+
 def test_CellFamily(self):
 xDoc = CheckStyle._uno.openEmptyWriterDoc()
 xCellStyles = xDoc.StyleFamilies["CellStyles"]
diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index ffc9619..ab000ae 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -61,6 +61,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -4408,11 +4409,36 @@ const CellStyleNameMap& 
SwXTextTableStyle::GetCellStyleNameMap()
 // XStyle
 sal_Bool SAL_CALL SwXTextTableStyle::isUserDefined() throw 
(uno::RuntimeException, std::exception)
 {
-return false;
+SolarMutexGuard aGuard;
+// only first style is not user defined
+if (m_pDocShell->GetDoc()->GetTableStyles()[0].GetName() == 
m_sTableAutoFormatName)
+return false;
+
+return true;
 }
 
 sal_Bool SAL_CALL SwXTextTableStyle::isInUse() throw (uno::RuntimeException, 
std::exception)
 {
+SolarMutexGuard aGuard;
+uno::Reference 
xTablesSupp(m_pDocShell->GetModel(), uno::UNO_QUERY);
+if (!xTablesSupp.is())
+return false;
+
+uno::Reference 
xTables(xTablesSupp->getTextTables(), uno::UNO_QUERY);
+if (!xTables.is())
+return false;
+
+const sal_Int32 nCount = xTables->getCount();
+for (sal_Int32 i=0; i < nCount; ++i)
+{
+uno::Reference xTablePropertySet;
+xTables->getByIndex(i) >>= xTablePropertySet;
+OUString sTableTemplateName;
+if (xTablePropertySet.is() && 
(xTablePropertySet->getPropertyValue("TableTemplateName") >>= 
sTableTemplateName)
+&& sTableTemplateName == m_sTableAutoFormatName)
+return true;
+}
+
 return false;
 }
 
@@ -4427,6 +4453,7 @@ void SAL_CALL SwXTextTableStyle::setParentStyle(const 
OUString& /*aParentStyle*/
 //XNamed
 OUString SAL_CALL SwXTextTableStyle::getName() throw(uno::RuntimeException, 
std::exception)
 {
+SolarMutexGuard aGuard;
 OUString sProgName;
 SwStyleNameMapper::FillProgName(m_sTableAutoFormatName, sProgName, 
nsSwGetPoolIdFromName::GET_POOLID_TABSTYLE, true);
 return m_sTableAutoFormatName;
@@ -4621,6 +4648,7 @@ css::uno::Reference 
SwXTextCellStyle::CreateXTextCellStyle(S
 // XStyle
 sal_Bool SAL_CALL SwXTextCellStyle::isUserDefined() throw 
(css::uno::RuntimeException, std::exception)
 {
+SolarMutexGuard aGuard;
 // if this cell belong to first table style then its defaut style
 if (&m_pDocShell->GetDoc()->GetTableStyles()[0] == 
m_pDocShell->GetDoc()->GetTableStyles().FindAutoFormat(m_sParentStyle))
 return false;
@@ -4630,7 +4658,26 @@ sal_Bool SAL_CALL SwXTextCellStyle::isUserDefined() 
throw (css::uno::RuntimeExce
 
 sal_Bool SAL_CALL SwXTextCellStyle::isInUse() throw 
(css::uno::RuntimeException, std::exception)
 {
-return false;
+SolarMutexGuard aGuard;
+uno::Reference 
xFamiliesSupplier(m_pD

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

2016-06-17 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/weeknum.fods | 1148 
 1 file changed, 1148 insertions(+)

New commits:
commit 67afad9f35f1fa7838a2beca43be0d9b330a755a
Author: Zdeněk Crhonek 
Date:   Thu Jun 16 20:35:46 2016 +0200

add WEEKNUM test case

Change-Id: Id9d104f7d1a2ed429444769d560bd4caf17694a4
Reviewed-on: https://gerrit.libreoffice.org/26387
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/weeknum.fods 
b/sc/qa/unit/data/functions/fods/weeknum.fods
new file mode 100644
index 000..7129ed7
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/weeknum.fods
@@ -0,0 +1,1148 @@
+
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-16T20:35:01.736746556P0D1LibreOfficeDev/5.2.0.0.alpha1$Linux_X86_64
 
LibreOffice_project/fa9416906e615f5f19ad8524176d2ed693662769
+ 
+  
+   0
+   0
+   27714
+   12747
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+  
+   10
+   19
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   jQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAswAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkE0AAASAENPTVBBVF9EVVBMRVhfTU9ERQoARFVQTEVYX09GRg==
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   £
+
+   
+  
+  
+   -
+   £
+
+   
+   
+  
+  
+   £
+
+   
+  
+  
+   -
+   £
+
+   
+ 

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

2016-06-17 Thread Akshay Deep
 sfx2/source/control/templateabstractview.cxx |5 -
 sfx2/source/control/templatelocalview.cxx|1 +
 sfx2/source/control/templatesearchview.cxx   |8 +++-
 sfx2/source/doc/templatedlg.cxx  |3 ---
 4 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit edd2f7b4793b29ae1aff05e1e54c957ac0fed15d
Author: Akshay Deep 
Date:   Thu Jun 16 19:18:30 2016 +0530

tdf#100423 Template Manager: ctrl + A and del should work correctly

Change-Id: Ibe0326827e6dacb670bb948ca4f6e9797ab7edeb
Reviewed-on: https://gerrit.libreoffice.org/26374
Reviewed-by: Akshay Deep 
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 
(cherry picked from commit 5b8c86f2a3eb5e092fb96f5ae2eaf58c10c8f4f0)
Reviewed-on: https://gerrit.libreoffice.org/26403
Tested-by: Akshay Deep 

diff --git a/sfx2/source/control/templateabstractview.cxx 
b/sfx2/source/control/templateabstractview.cxx
index a29b4b0..45f644d 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -258,7 +258,10 @@ void TemplateAbstractView::KeyInput( const KeyEvent& rKEvt 
)
 if ( aQueryDlg->Execute() != RET_YES )
 return;
 
-for (ThumbnailViewItem* pItem : mFilteredItemList)
+//copy to avoid changing filtered item list during deletion
+ThumbnailValueItemList mFilteredItemListCopy = mFilteredItemList;
+
+for (ThumbnailViewItem* pItem : mFilteredItemListCopy)
 {
 if (pItem->isSelected())
 {
diff --git a/sfx2/source/control/templatelocalview.cxx 
b/sfx2/source/control/templatelocalview.cxx
index 5374af0..3608334 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -239,6 +239,7 @@ IMPL_LINK_TYPED(TemplateLocalView, ContextMenuSelectHdl, 
Menu*, pMenu, bool)
 break;
 
 maDeleteTemplateHdl.Call(maSelectedItem);
+reload();
 }
 break;
 case MNI_DEFAULT_TEMPLATE:
diff --git a/sfx2/source/control/templatesearchview.cxx 
b/sfx2/source/control/templatesearchview.cxx
index 0767c13..b225b29 100644
--- a/sfx2/source/control/templatesearchview.cxx
+++ b/sfx2/source/control/templatesearchview.cxx
@@ -64,11 +64,17 @@ void TemplateSearchView::KeyInput( const KeyEvent& rKEvt )
 if ( aQueryDlg->Execute() != RET_YES )
 return;
 
-for (ThumbnailViewItem* pItem : mFilteredItemList)
+//copy to avoid changing filtered item list during deletion
+ThumbnailValueItemList mFilteredItemListCopy = mFilteredItemList;
+
+for (ThumbnailViewItem* pItem : mFilteredItemListCopy)
 {
 if (pItem->isSelected())
 {
 maDeleteTemplateHdl.Call(pItem);
+RemoveItem(pItem->mnId);
+
+CalculateItemPositions();
 }
 }
 }
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 9e83a73..df1e7bf 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -847,9 +847,6 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, DeleteTemplateHdl, 
ThumbnailViewItem*, pI
 OUString aMsg( SfxResId(STR_MSG_ERROR_DELETE_TEMPLATE).toString() );
 ScopedVclPtrInstance::Create(this, 
aMsg.replaceFirst("$1",aDeletedTemplate))->Execute();
 }
-
-if(mpSearchView->IsVisible())
-SearchUpdateHdl(*mpSearchFilter);
 }
 
 IMPL_LINK_TYPED(SfxTemplateManagerDlg, DefaultTemplateHdl, ThumbnailViewItem*, 
pItem, void)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Update to Firebird 3.0 - attempted build on OSX

2016-06-17 Thread Lionel Elie Mamane
Hi Tamás,

Just making sure you are aware of the below email, since it was not CCed to
you.

On Thu, Jun 16, 2016 at 01:56:35PM +0200, Alexander Thurgood wrote:
> Le 30/05/2016 à 19:13, Bunth Tamás a écrit :
> 
> Hi Tamas,
> 
> I cherry picked your commits to my master build tree and attempted a
> build, which failed at the patch. I have 3 reject files created, do you
> want them ?
> 
> Alex
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


  1   2   >