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

2016-03-30 Thread Miklos Vajna
 sw/qa/extras/rtfexport/data/tdf98806.rtf   |   11 +++
 sw/qa/extras/rtfexport/rtfexport.cxx   |8 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |   14 ++
 3 files changed, 29 insertions(+), 4 deletions(-)

New commits:
commit 3d922d7da4fa11b8c22bbdffd141fa1398b2fcd4
Author: Miklos Vajna 
Date:   Thu Mar 31 08:37:43 2016 +0200

tdf#98806 RTF import: handle bookmarks in table text

Mapper().props() was called directly, so all bookmarks pointed to the
start of the A1 cell instead of the correct text range.

Change-Id: I40eeb85b61d2ae9138cd666d4a6a3c08eda47da3

diff --git a/sw/qa/extras/rtfexport/data/tdf98806.rtf 
b/sw/qa/extras/rtfexport/data/tdf98806.rtf
new file mode 100644
index 000..e356682
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf98806.rtf
@@ -0,0 +1,11 @@
+{\rtf1
+\trowd\cellx4000\cellx8000\pard\plain\intbl
+A1\cell AAA
+{\*\bkmkstart bookmark}
+BBB
+{\*\bkmkend bookmark}
+CCC\cell
+\row
+\pard\plain
+\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx 
b/sw/qa/extras/rtfexport/rtfexport.cxx
index da0712a..6a7d19f 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -1013,6 +1013,14 @@ DECLARE_RTFEXPORT_TEST(testPgnlcltr, "pgnlcltr.rtf")
 CPPUNIT_ASSERT_EQUAL(style::NumberingType::CHARS_LOWER_LETTER_N, 
getProperty(getStyles("PageStyles")->getByName("Converted1"), 
"NumberingType"));
 }
 
+DECLARE_RTFEXPORT_TEST(testTdf98806, "tdf98806.rtf")
+{
+uno::Reference xBookmarksSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xBookmark(xBookmarksSupplier->getBookmarks()->getByName("bookmark"), 
uno::UNO_QUERY);
+// This was empty, bookmark in table wasn't imported correctly.
+CPPUNIT_ASSERT_EQUAL(OUString("BBB"), xBookmark->getAnchor()->getString());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index d0631c5..06dc99a 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -161,7 +161,7 @@ static OString lcl_DTTM22OString(long lDTTM)
 return DateTimeToOString(msfilter::util::DTTM2DateTime(lDTTM));
 }
 
-static writerfilter::Reference::Pointer_t 
lcl_getBookmarkProperties(int nPos, OUString& rString)
+static RTFSprms lcl_getBookmarkProperties(int nPos, OUString& rString)
 {
 RTFSprms aAttributes;
 auto pPos = std::make_shared(nPos);
@@ -172,7 +172,7 @@ static writerfilter::Reference::Pointer_t 
lcl_getBookmarkProperties(
 aAttributes.set(NS_ooxml::LN_CT_Bookmark_name, pString);
 }
 aAttributes.set(NS_ooxml::LN_CT_MarkupRangeBookmark_id, pPos);
-return std::make_shared(aAttributes);
+return aAttributes;
 }
 
 static const char* lcl_RtfToString(RTFKeyword nKeyword)
@@ -5357,7 +5357,10 @@ RTFError RTFDocumentImpl::popState()
 OUString aStr = m_aStates.top().pDestinationText->makeStringAndClear();
 int nPos = m_aBookmarks.size();
 m_aBookmarks[aStr] = nPos;
-Mapper().props(lcl_getBookmarkProperties(nPos, aStr));
+if (!m_aStates.top().pCurrentBuffer)
+
Mapper().props(std::make_shared(lcl_getBookmarkProperties(nPos,
 aStr)));
+else
+m_aStates.top().pCurrentBuffer->push_back(Buf_t(BUFFER_PROPS, 
std::make_shared(lcl_getBookmarkProperties(nPos, aStr)), nullptr));
 }
 break;
 case Destination::BOOKMARKEND:
@@ -5365,7 +5368,10 @@ RTFError RTFDocumentImpl::popState()
 if (&m_aStates.top().aDestinationText != 
m_aStates.top().pDestinationText)
 break; // not for nested group
 OUString aStr = m_aStates.top().pDestinationText->makeStringAndClear();
-Mapper().props(lcl_getBookmarkProperties(m_aBookmarks[aStr], aStr));
+if (!m_aStates.top().pCurrentBuffer)
+
Mapper().props(std::make_shared(lcl_getBookmarkProperties(m_aBookmarks[aStr],
 aStr)));
+else
+m_aStates.top().pCurrentBuffer->push_back(Buf_t(BUFFER_PROPS, 
std::make_shared(lcl_getBookmarkProperties(m_aBookmarks[aStr], 
aStr)), nullptr));
 }
 break;
 case Destination::INDEXENTRY:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-30 Thread Julien Nabet
 sfx2/source/sidebar/EnumContext.cxx |   65 +---
 1 file changed, 31 insertions(+), 34 deletions(-)

New commits:
commit e944b64a3ec3b6dbe8d91638eb46478d6f88d8dc
Author: Julien Nabet 
Date:   Wed Mar 30 22:46:39 2016 +0200

Replace AddContext in sidebar/EnumContext.cxx

+ remove extra duplicate AddEntry("Chart", Context_Chart);

Change-Id: I9624000d5f9470cd4cb5072c24aa24aced740fe4
Reviewed-on: https://gerrit.libreoffice.org/23665
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/sfx2/source/sidebar/EnumContext.cxx 
b/sfx2/source/sidebar/EnumContext.cxx
index db80700..c44e434 100644
--- a/sfx2/source/sidebar/EnumContext.cxx
+++ b/sfx2/source/sidebar/EnumContext.cxx
@@ -171,40 +171,37 @@ void EnumContext::ProvideContextContainers()
 AddEntry("any", Context_Any);
 AddEntry("default", Context_Default);
 AddEntry("empty", Context_Empty);
-#define AddContext(context) AddEntry(#context, Context_##context);
-AddContext(3DObject);
-AddContext(Annotation);
-AddContext(Auditing);
-AddContext(Axis);
-AddContext(Cell);
-AddContext(Chart);
-AddContext(Chart);
-AddContext(ChartElements);
-AddContext(Draw);
-AddContext(DrawLine);
-AddContext(DrawPage);
-AddContext(DrawText);
-AddContext(EditCell);
-AddContext(ErrorBar);
-AddContext(Form);
-AddContext(Frame);
-AddContext(Graphic);
-AddContext(Grid);
-AddContext(HandoutPage);
-AddContext(MasterPage);
-AddContext(Media);
-AddContext(MultiObject);
-AddContext(NotesPage);
-AddContext(OLE);
-AddContext(OutlineText);
-AddContext(Pivot);
-AddContext(Series);
-AddContext(SlidesorterPage);
-AddContext(Table);
-AddContext(Text);
-AddContext(TextObject);
-AddContext(Trendline);
-#undef AddContext
+AddEntry("3DObject", Context_3DObject);
+AddEntry("Annotation", Context_Annotation);
+AddEntry("Auditing", Context_Auditing);
+AddEntry("Axis", Context_Axis);
+AddEntry("Cell", Context_Cell);
+AddEntry("Chart", Context_Chart);
+AddEntry("ChartElements", Context_ChartElements);
+AddEntry("Draw", Context_Draw);
+AddEntry("DrawLine", Context_DrawLine);
+AddEntry("DrawPage", Context_DrawPage);
+AddEntry("DrawText", Context_DrawText);
+AddEntry("EditCell", Context_EditCell);
+AddEntry("ErrorBar", Context_ErrorBar);
+AddEntry("Form", Context_Form);
+AddEntry("Frame", Context_Frame);
+AddEntry("Graphic", Context_Graphic);
+AddEntry("Grid", Context_Grid);
+AddEntry("HandoutPage", Context_HandoutPage);
+AddEntry("MasterPage", Context_MasterPage);
+AddEntry("Media", Context_Media);
+AddEntry("MultiObject", Context_MultiObject);
+AddEntry("NotesPage", Context_NotesPage);
+AddEntry("OLE", Context_OLE);
+AddEntry("OutlineText", Context_OutlineText);
+AddEntry("Pivot", Context_Pivot);
+AddEntry("Series", Context_Series);
+AddEntry("SlidesorterPage", Context_SlidesorterPage);
+AddEntry("Table", Context_Table);
+AddEntry("Text", Context_Text);
+AddEntry("TextObject", Context_TextObject);
+AddEntry("Trendline", Context_Trendline);
 }
 }
 
___
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' - 13 commits - include/sfx2 include/vcl sfx2/inc sfx2/Library_sfx.mk sfx2/source uitest/demo_ui vcl/inc vcl/Library_vcl.mk vcl/source

2016-03-30 Thread Markus Mohrhard
 include/sfx2/tabdlg.hxx |3 
 include/vcl/button.hxx  |   21 ---
 include/vcl/combobox.hxx|2 
 include/vcl/dialog.hxx  |2 
 include/vcl/edit.hxx|2 
 include/vcl/lstbox.hxx  |2 
 include/vcl/spinfld.hxx |2 
 include/vcl/tabctrl.hxx |2 
 include/vcl/uitest/factory.hxx  |   23 +++
 include/vcl/uitest/uiobject.hxx |  238 
 include/vcl/window.hxx  |3 
 sfx2/Library_sfx.mk |1 
 sfx2/inc/uitest/sfx_uiobject.hxx|   41 ++
 sfx2/source/dialog/tabdlg.cxx   |7 +
 sfx2/source/uitest/sfx_uiobject.cxx |   95 ++
 uitest/demo_ui/tabdialog.py |   49 +++
 vcl/Library_vcl.mk  |1 
 vcl/inc/uitest/factory.hxx  |   27 
 vcl/inc/uitest/uiobject_impl.hxx|  230 --
 vcl/source/control/button.cxx   |   11 +
 vcl/source/control/combobox.cxx |6 
 vcl/source/control/edit.cxx |6 
 vcl/source/control/listbox.cxx  |6 
 vcl/source/control/spinfld.cxx  |6 
 vcl/source/control/tabctrl.cxx  |   12 +
 vcl/source/uitest/factory.cxx   |  122 --
 vcl/source/uitest/uiobject.cxx  |   68 +-
 vcl/source/uitest/uitest.cxx|8 -
 vcl/source/window/dialog.cxx|6 
 vcl/source/window/window.cxx|   24 ++-
 30 files changed, 610 insertions(+), 416 deletions(-)

New commits:
commit 3c05f49da80f19756f158677a05884ed00c0
Author: Markus Mohrhard 
Date:   Thu Mar 31 06:11:29 2016 +0200

uitest: add demo for tabdialog handling

Change-Id: I217fb4a5fb1a8743def4e76522f90f0ee6a17917

diff --git a/uitest/demo_ui/tabdialog.py b/uitest/demo_ui/tabdialog.py
new file mode 100644
index 000..ef62bf9
--- /dev/null
+++ b/uitest/demo_ui/tabdialog.py
@@ -0,0 +1,49 @@
+# -*- 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
+
+def select_tab_page_pos(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()
+
+props = {"POS": "1"}
+propsUNO = mkPropertyValues(props)
+xCellsDlg.executeAction("SELECT", propsUNO)
+
+time.sleep(20)
+
+def select_tab_page_name(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()
+
+props = {"NAME": "Borders"}
+propsUNO = mkPropertyValues(props)
+xCellsDlg.executeAction("SELECT", propsUNO)
+
+time.sleep(20)
+
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 14df2ac2d3689c082e1ef8ed6c10fbf15c23013c
Author: Markus Mohrhard 
Date:   Thu Mar 31 06:10:50 2016 +0200

uitest: support selecting different tab pages in tab dialog

Change-Id: I541f83a87f5f3d459b2baf4587b76cb2fce5d5fc

diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 441762c..36c4f34 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -60,6 +60,7 @@ class SFX2_DLLPUBLIC SfxTabDialog : public TabDialog
 private:
 friend class SfxTabPage;
 friend class SfxTabDialogController;
+friend class SfxTabDialogUIObject;
 
 VclPtr m_pBox;
 VclPtr m_pTabCtrl;
diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx
index 2f0b1d9..ba6fc16 100644
--- a/include/vcl/tabctrl.hxx
+++ b/include/vcl/tabctrl.hxx
@@ -189,6 +189,8 @@ public:
 mbLayoutDirty = true;
 }
 
+std::vector GetPageIDs() const;
+
 virtual void queue_resize(StateChangedType eReason = 
StateChangedType::Layout) override;
 };
 
diff --git a/sfx2/source/uitest/sfx_uiobject.cxx 
b/sfx2/source/uitest/sfx_uiobject.cxx
index 138e485..1f41627 100644
--- a/sfx2/source/uitest/sfx_uiobject.cxx
+++ b/sfx2/source/uitest/sfx_uiobject.cxx
@@ -25,16 +25,53 @@ StringMap SfxTabDialogUIObject::get_state()
 {
 StringMap aMap = WindowUIObject::get_state();
 sal_uInt16 nPageId = mxTabDialog->GetCurPageId();
+std::vector aPageIds = mxTabDialog->m_pTabCtrl->GetPageIDs();
+OUString aStrIds;
+OUString aStrNames;
+for (auto itr = aPageIds.begin(), itrEnd = aPageIds.end();
+itr != itrEnd; ++itr)
+ 

[Libreoffice-commits] core.git: external/breakpad RepositoryExternal.mk

2016-03-30 Thread Markus Mohrhard
 RepositoryExternal.mk |4 +-
 external/breakpad/ExternalProject_breakpad.mk |8 -
 external/breakpad/Module_breakpad.mk  |   11 +++
 external/breakpad/StaticLibrary_breakpad.mk   |   36 ++
 4 files changed, 48 insertions(+), 11 deletions(-)

New commits:
commit ff9b7d118b34b53ec947af881fccd822e2aeb1fd
Author: Markus Mohrhard 
Date:   Thu Mar 31 00:00:03 2016 +0200

support building breakpad on windows

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

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 3582790..6a36f9f 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3329,8 +3329,8 @@ $(call gb_LinkTarget_set_include,$(1),\
 )
 
 ifeq ($(COM),MSC)
-$(call gb_LinkTarget_add_libs,$(1),\
-   $(call 
gb_UnpackedTarball_get_dir,breakpad)/build/win32/$(wnt_arch_subdir_optional)$(if
 $(MSVC_USE_DEBUG_RUNTIME),Debug/breakpad.lib,Release/breakpad.lib) \
+$(call gb_LinkTarget_use_static_libraries,$(1),\
+breakpad \
 )
 else
 $(call gb_LinkTarget_add_libs,$(1),\
diff --git a/external/breakpad/ExternalProject_breakpad.mk 
b/external/breakpad/ExternalProject_breakpad.mk
index c0ea5df..70df68e 100644
--- a/external/breakpad/ExternalProject_breakpad.mk
+++ b/external/breakpad/ExternalProject_breakpad.mk
@@ -16,14 +16,6 @@ $(eval $(call gb_ExternalProject_register_targets,breakpad,\
 
 ifeq ($(COM),MSC)
 
-$(call gb_ExternalProject_get_state_target,breakpad,build) :
-   $(call gb_ExternalProject_run,build,\
-   msbuild.exe breakpad.vcxproj /p:Platform=$(if $(filter 
INTEL,$(CPUNAME)),Win32,x64) \
-   /p:Configuration=$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
-   $(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 
/p:VisualStudioVersion=12.0 /ToolsVersion:12.0) \
-   $(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 
/p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \
-   ,build/win32)
-
 else # !ifeq($(COM),MSC)
 
 $(call gb_ExternalProject_get_state_target,breakpad,build) :
diff --git a/external/breakpad/Module_breakpad.mk 
b/external/breakpad/Module_breakpad.mk
index 3902c8e..3880760 100644
--- a/external/breakpad/Module_breakpad.mk
+++ b/external/breakpad/Module_breakpad.mk
@@ -12,7 +12,16 @@ $(eval $(call gb_Module_Module,breakpad))
 $(eval $(call gb_Module_add_targets,breakpad,\
ExternalProject_breakpad \
UnpackedTarball_breakpad \
-   ExternalPackage_breakpad \
 ))
 
+ifneq ($(OS)$(COM),WNTMSC)
+$(eval $(call gb_Module_add_targets,breakpad,\
+   ExternalProject_breakpad \
+))
+else
+$(eval $(call gb_Module_add_targets,breakpad,\
+   StaticLibrary_breakpad \
+))
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/breakpad/StaticLibrary_breakpad.mk 
b/external/breakpad/StaticLibrary_breakpad.mk
new file mode 100644
index 000..bc6abdd
--- /dev/null
+++ b/external/breakpad/StaticLibrary_breakpad.mk
@@ -0,0 +1,36 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,breakpad))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,breakpad))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,breakpad,breakpad))
+
+$(eval $(call gb_StaticLibrary_set_include,breakpad,\
+-I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
+-I$(call gb_UnpackedTarball_get_dir,breakpad)/src/client/windows \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_defs,breakpad,\
+   -DUNICODE \
+))
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,breakpad,cc))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,breakpad,\
+   UnpackedTarball/breakpad/src/client/windows/handler/exception_handler \
+   
UnpackedTarball/breakpad/src/client/windows/crash_generation/client_info \
+   
UnpackedTarball/breakpad/src/client/windows/crash_generation/crash_generation_client
 \
+   
UnpackedTarball/breakpad/src/client/windows/crash_generation/crash_generation_server
 \
+   
UnpackedTarball/breakpad/src/client/windows/crash_generation/minidump_generator 
\
+))
+
+# vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-30 Thread Katarina Behrens
 svx/source/sdr/contact/viewcontactofsdrpage.cxx   |4 +++-
 svx/source/sdr/contact/viewobjectcontactofpageobj.cxx |3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 5f15c7866ef03d7cbbd967e341651fa0c7b64bcd
Author: Katarina Behrens 
Date:   Wed Mar 30 14:17:18 2016 +0200

tdf#89420: Honour doc boundaries (in)visible also in Impress/Draw

I haven't figured out how NOT to draw the frame at all, so let's at
least draw it using the same colour as document background

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

diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx 
b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
index dd12242..607eae0 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
@@ -360,7 +360,9 @@ drawinglayer::primitive2d::Primitive2DContainer 
ViewContactOfInnerPageBorder::cr
 }
 else
 {
-aBorderColor = 
aColorConfig.GetColorValue(svtools::DOCBOUNDARIES).nColor;
+svtools::ColorConfigValue aBorderConfig = 
aColorConfig.GetColorValue(svtools::DOCBOUNDARIES);
+aBorderColor = aBorderConfig.bIsVisible ? aBorderConfig.nColor :
+   
aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor;
 }
 
 // create page outer border primitive
diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx 
b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
index 6f30fb7..c6c1757 100644
--- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
@@ -230,7 +230,8 @@ drawinglayer::primitive2d::Primitive2DContainer 
ViewObjectContactOfPageObj::crea
 // Recursion is possible. Create a replacement primitive
 xPageContent.resize(2);
 const Color 
aDocColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor);
-const Color 
aBorderColor(aColorConfig.GetColorValue(svtools::DOCBOUNDARIES).nColor);
+svtools::ColorConfigValue aBorderConfig = 
aColorConfig.GetColorValue(svtools::DOCBOUNDARIES);
+const Color aBorderColor = aBorderConfig.bIsVisible ? 
aBorderConfig.nColor : aDocColor;
 const basegfx::B2DRange aPageBound(0.0, 0.0, fPageWidth, 
fPageHeight);
 const basegfx::B2DPolygon 
aOutline(basegfx::tools::createPolygonFromRect(aPageBound));
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Implementing SVG attribute "stroke-miterlimit" ( tdf#48066)

2016-03-30 Thread Regina Henschel

Hi Thorsten,

Thorsten Behrens schrieb:

Regina Henschel wrote:

(1) Change the type of maStrokeMiterLimit' to 'double' and change its name
to 'mfStrokeMiterLimit'. That would loose the ability to track, whether the
value was found in the file or set by LO. In case not set in the SVG file,
it would be set to 4.0, as specified as initial value in SVG spec.


Why would knowing if it's the default or read from svg matter?


That's why talking about it is good. Your question point me to the 
solution. Searching around I have found, that the flag is indeed needed. 
When first reading the attribute, this flag is used while resolving 
inheritance. So I cannot drop it and will go with (2).





(2) Extend the enum SvgUnit by an item 'Unit_none'. This likely requires
changes in places where SvgUnit is used. The member mfNumber of class
SvgNumber is already a 'double' and would fit.

My favorite is (2). What do you think?


I think you know the code better than I do, so whatever you prefer. :)


You flatter me, but it is not true.

Kind regards
Regina

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


Beza Moges license statement

2016-03-30 Thread Bezawit G. Moges
All of my past & future contributions to LibreOffice may be licensed under the 
MPLv2/LGPLv3 dual license.

Beza Moges

Sent from Mail for Windows 10

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


Re: Implementing SVG attribute "stroke-miterlimit" ( tdf#48066)

2016-03-30 Thread Thorsten Behrens
Regina Henschel wrote:
> (1) Change the type of maStrokeMiterLimit' to 'double' and change its name
> to 'mfStrokeMiterLimit'. That would loose the ability to track, whether the
> value was found in the file or set by LO. In case not set in the SVG file,
> it would be set to 4.0, as specified as initial value in SVG spec.
>
Why would knowing if it's the default or read from svg matter?

> (2) Extend the enum SvgUnit by an item 'Unit_none'. This likely requires
> changes in places where SvgUnit is used. The member mfNumber of class
> SvgNumber is already a 'double' and would fit.
> 
> My favorite is (2). What do you think?
> 
I think you know the code better than I do, so whatever you prefer. :)

Except if the question above has the 'does not matter' answer, then of
course (1) seems cleaner ...

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

2016-03-30 Thread akash
 framework/source/fwe/helper/titlehelper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f80de31099be1ba7c6f753187f6703a915151c27
Author: akash 
Date:   Fri Mar 25 10:09:07 2016 +0530

tdf#96896-Fix infinite recursion to prevent Writer crash

To prevent infinite recursion set m_xOwner to null.
Removed impl_sendTitleChangedEvent from disposing method ensuring that
title is never constructed for a component that is disposing.

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

diff --git a/framework/source/fwe/helper/titlehelper.cxx 
b/framework/source/fwe/helper/titlehelper.cxx
index 178a92e..9441e5c 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -249,13 +249,13 @@ void SAL_CALL TitleHelper::disposing(const 
css::lang::EventObject& aEvent)
 // SYNCHRONIZED ->
 aLock.reset ();
 
+ m_xOwner= nullptr;
  m_sTitle= OUString ();
  m_nLeasedNumber = css::frame::UntitledNumbersConst::INVALID_NUMBER;
 
 aLock.clear ();
 // <- SYNCHRONIZED
 
-impl_sendTitleChangedEvent ();
 }
 
 void TitleHelper::impl_sendTitleChangedEvent ()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Implementing SVG attribute "stroke-miterlimit" ( tdf#48066)

2016-03-30 Thread Regina Henschel

Hi all,

I have started now and come immediately to the next design decision:

The svg attribute stroke-miterlimit is of type  in SVG, which is 
in context of SVG attributes essentially a 'double'. The meaning of this 
attribute is a ratio. Therefore in SVG is has no unit.

[https://www.w3.org/TR/SVG/painting.html#StrokeMiterlimitProperty]
[https://www.w3.org/TR/SVG/types.html#DataTypeNumber]

But LO imports it into the member 'SvgNumber maStrokeMiterLimit' of an 
object of class SvgStyleAttributes. And class SvgNumber has a member 
'SvgUnit meUnit'. In the ctor of SvgNumber the member meUnit defaults to 
'Unit_px', if not given. But any unit is wrong for stroke-miterlimit.


Possible solutions
(1) Change the type of maStrokeMiterLimit' to 'double' and change its 
name to 'mfStrokeMiterLimit'. That would loose the ability to track, 
whether the value was found in the file or set by LO. In case not set in 
the SVG file, it would be set to 4.0, as specified as initial value in 
SVG spec.
(2) Extend the enum SvgUnit by an item 'Unit_none'. This likely requires 
changes in places where SvgUnit is used. The member mfNumber of class 
SvgNumber is already a 'double' and would fit.


My favorite is (2). What do you think?

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


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

2016-03-30 Thread Andras Timar
 loleaflet/src/admin/AdminSocketOverview.js |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 905ce5744bc64a10bd98bcd2662004f4ce74a225
Author: Andras Timar 
Date:   Wed Mar 30 21:38:38 2016 +0200

loleaflet: s/kill child/terminate session/

diff --git a/loleaflet/src/admin/AdminSocketOverview.js 
b/loleaflet/src/admin/AdminSocketOverview.js
index 28b83fb..afced98 100644
--- a/loleaflet/src/admin/AdminSocketOverview.js
+++ b/loleaflet/src/admin/AdminSocketOverview.js
@@ -27,7 +27,7 @@ var AdminSocketOverview = AdminSocketBase.extend({
return socketOverview._getBasicStats();
}, 5000);
 
-   // Allow table rows to have a context menu for killing children
+   // Allow table rows to have a context menu for terminating 
sessions
$('body').on('contextmenu', 'table tr', function(ev) {
$('#rowContextMenu').css({
display: 'block',
@@ -44,7 +44,7 @@ var AdminSocketOverview = AdminSocketBase.extend({
 
$('#rowContextMenu').on('click', 'a', function() {
vex.dialog.confirm({
-   message: 'Are you sure you want to kill this 
child ?',
+   message: 'Are you sure you want to terminate 
this session?',
callback: function(value) {
if (value) {
var killPid = 
($('#rowContextMenu').data('rowToKill')).substring('doc'.length);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-30 Thread Pranav Kant
 loolwsd/Admin.cpp  |3 ++-
 loolwsd/FileServer.hpp |3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit d26246dab0e2171150767ab3a79499e4241ab783
Author: Pranav Kant 
Date:   Thu Mar 31 00:53:31 2016 +0530

loolwsd: Temporarily use hard-coded path to key file

We will switch to reading all these values as soon as wip
configuration file object is accessible globally.

Change-Id: I16eff339349683050be1985eefabc34854cccba3

diff --git a/loolwsd/Admin.cpp b/loolwsd/Admin.cpp
index 1bbfc22..2ad3d3d 100644
--- a/loolwsd/Admin.cpp
+++ b/loolwsd/Admin.cpp
@@ -356,7 +356,8 @@ void AdminRequestHandler::handleRequest(HTTPServerRequest& 
request, HTTPServerRe
 
 const std::string jwtToken = request["Cookie"].substr(pos + 1);
 Log::info("Verifying JWT token: " + jwtToken);
-const std::string keyPath = 
Poco::Path(Application::instance().commandPath()).parent().toString() + 
SSL_KEY_FILE;
+// TODO: Read key from configuration file
+const std::string keyPath = "/etc/loolwsd/" + 
std::string(SSL_KEY_FILE);
 JWTAuth authAgent(keyPath, "admin", "admin", "admin");
 if (authAgent.verify(jwtToken))
 {
diff --git a/loolwsd/FileServer.hpp b/loolwsd/FileServer.hpp
index 787fbbd..c1c8dd7 100644
--- a/loolwsd/FileServer.hpp
+++ b/loolwsd/FileServer.hpp
@@ -74,7 +74,8 @@ public:
 {
 const std::string htmlMimeType = "text/html";
 // generate and set the cookie
-const std::string keyPath = 
Poco::Path(Application::instance().commandPath()).parent().toString() + 
SSL_KEY_FILE;
+// TODO: Read key from configuration file
+const std::string keyPath = "/etc/loolwsd/" + 
std::string(SSL_KEY_FILE);
 JWTAuth authAgent(keyPath, "admin", "admin", "admin");
 const std::string jwtToken = 
authAgent.getAccessToken();
 Poco::Net::HTTPCookie cookie("jwt", jwtToken);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loleaflet/po loolwsd/LOOLWSD.cpp

2016-03-30 Thread Andras Timar
 loleaflet/po/help-hu.po |2 +-
 loleaflet/po/help-sl.po |2 +-
 loleaflet/po/ui-fr.po   |   30 +-
 loleaflet/po/ui-hu.po   |   31 ++-
 loleaflet/po/ui-sl.po   |   31 ++-
 loolwsd/LOOLWSD.cpp |2 +-
 6 files changed, 56 insertions(+), 42 deletions(-)

New commits:
commit 21cd9167c4ed9c0e716ecb3b00de626c456515dd
Author: Andras Timar 
Date:   Wed Mar 30 20:13:38 2016 +0200

serve loleaflet from apache2, until we solve access control problem

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 0fb89a9..4f6cb52 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -536,7 +536,7 @@ private:
 const std::string mediaType = "text/xml";
 const std::string action = "action";
 const std::string urlsrc = "urlsrc";
-const std::string uriValue = "https://"; + uri.getHost() + ":" + 
std::to_string(uri.getPort()) + "/loleaflet/dist/loleaflet.html?";
+const std::string uriValue = "https://"; + uri.getHost() + 
"/loleaflet/dist/loleaflet.html?";
 
 InputSource inputSrc(discoveryPath);
 AutoPtr docXML = parser.parse(&inputSrc);
commit 198c266f8db2a23ace3670dc59e302a075effdf5
Author: Andras Timar 
Date:   Wed Mar 30 20:13:02 2016 +0200

loleaflet: updated po files

diff --git a/loleaflet/po/help-hu.po b/loleaflet/po/help-hu.po
index ebe2622..878c4ba 100644
--- a/loleaflet/po/help-hu.po
+++ b/loleaflet/po/help-hu.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: CloudSuite Help\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-10 09:57+0200\n"
+"POT-Creation-Date: 2016-03-29 15:41+0200\n"
 "PO-Revision-Date: 2016-01-10 22:10+0100\n"
 "Last-Translator: Andras Timar \n"
 "Language-Team: Hungarian \n"
diff --git a/loleaflet/po/help-sl.po b/loleaflet/po/help-sl.po
index d399b6f..af5523a 100644
--- a/loleaflet/po/help-sl.po
+++ b/loleaflet/po/help-sl.po
@@ -4,7 +4,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: LibreOffice Online - Help\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-10 09:57+0200\n"
+"POT-Creation-Date: 2016-03-29 15:41+0200\n"
 "PO-Revision-Date: 2016-03-10 00:44+0100\n"
 "Last-Translator: Martin Srebotnjak \n"
 "Language-Team: sl.libreoffice.org \n"
diff --git a/loleaflet/po/ui-fr.po b/loleaflet/po/ui-fr.po
index 7b98f79..248cd11 100644
--- a/loleaflet/po/ui-fr.po
+++ b/loleaflet/po/ui-fr.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: CloudSuite Toolbar\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-10 09:57+0100\n"
+"POT-Creation-Date: 2016-03-29 15:41+0200\n"
 "PO-Revision-Date: 2015-12-20 14:14+0100\n"
 "Last-Translator: Andras Timar \n"
 "Language-Team: French \n"
@@ -243,15 +243,15 @@ msgstr "Agrandir"
 msgid "Are you sure you want to delete this page?"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:428 dist/toolbar/toolbar.js:749
+#: dist/toolbar/toolbar.js:428 dist/toolbar/toolbar.js:790
 msgid "Size"
 msgstr "Taille"
 
-#: dist/toolbar/toolbar.js:736
+#: dist/toolbar/toolbar.js:777
 msgid "Style"
 msgstr "Style"
 
-#: dist/toolbar/toolbar.js:744
+#: dist/toolbar/toolbar.js:785
 msgid "Font"
 msgstr "Police"
 
@@ -279,34 +279,38 @@ msgstr ""
 msgid "Enter new sheet name"
 msgstr ""
 
-#: src/core/Socket.js:14 src/core/Socket.js:236
-msgid "Socket connection error"
+#: src/core/Socket.js:14
+msgid "Socket connection error: "
 msgstr ""
 
-#: src/core/Socket.js:105
+#: src/core/Socket.js:108
 msgid "Unexpected loolserver message."
 msgstr ""
 
-#: src/core/Socket.js:109
+#: src/core/Socket.js:112
 msgid "Unsupported server version."
 msgstr ""
 
-#: src/core/Socket.js:120
+#: src/core/Socket.js:123
 msgid "Document requires password to view."
 msgstr ""
 
-#: src/core/Socket.js:123
+#: src/core/Socket.js:126
 msgid "Document requires password to modify."
 msgstr ""
 
-#: src/core/Socket.js:125
+#: src/core/Socket.js:128
 msgid "Hit Cancel to open in view-only mode."
 msgstr ""
 
-#: src/core/Socket.js:129
+#: src/core/Socket.js:132
 msgid "Wrong password provided. Please try again."
 msgstr ""
 
-#: src/core/Socket.js:240
+#: src/core/Socket.js:239
+msgid "Socket connection error"
+msgstr ""
+
+#: src/core/Socket.js:243
 msgid "Socket connection closed"
 msgstr ""
diff --git a/loleaflet/po/ui-hu.po b/loleaflet/po/ui-hu.po
index ca50591..8db5549 100644
--- a/loleaflet/po/ui-hu.po
+++ b/loleaflet/po/ui-hu.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: CloudSuite Toolbar\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-10 09:57+0100\n"
+"POT-Creation-Date: 2016-03-29 15:41+0200\n"
 "PO-Revision-Date: 2016-02-15 10:39+0100\n"
 "Last-Translator: Andras Timar \n"
 "Language-Team: Hungarian \n"
@@ -243,15 +243,15 @@ msgstr "Nagyítás"
 msgid "Are you sure you want to delete this page?"
 msgstr "Biztosan törli ezt az oldalt?"
 
-#: dist/toolbar/toolbar.js:428 dist/toolbar/toolbar.js:749
+#: dist/toolbar/toolbar.js:428 dist/toolbar/toolbar.js:790
 msgid "Size"
 m

Firebird 2.5 Patch to compile with Visual Studio 2015

2016-03-30 Thread marius adrian popa
Final Firebird 2.5 Patch to compile with Visual Studio 2015 is now merged ,
https://github.com/FirebirdSQL/firebird/pull/12

I will add a gerrit for libreoffice also
https://patch-diff.githubusercontent.com/raw/FirebirdSQL/firebird/pull/12.patch

ps: in Firebird tree i will send a pull request with icu small changes
needed also new solutions for VS 2015 were merged earlier
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: basegfx/source compilerplugins/clang include/comphelper include/rtl include/sfx2 include/vcl lotuswordpro/source stoc/source ucb/source

2016-03-30 Thread Stephan Bergmann
 basegfx/source/inc/hommatrixtemplate.hxx|2 
 compilerplugins/clang/nullptr.cxx   |   72 
 include/comphelper/unique_disposing_ptr.hxx |8 +--
 include/rtl/ref.hxx |2 
 include/sfx2/controlwrapper.hxx |6 +-
 include/sfx2/itemconnect.hxx|4 -
 include/vcl/scopedbitmapaccess.hxx  |2 
 lotuswordpro/source/filter/clone.hxx|2 
 stoc/source/corereflection/lrucache.hxx |6 +-
 stoc/source/security/lru_cache.h|   10 +--
 ucb/source/inc/regexpmap.hxx|4 -
 11 files changed, 85 insertions(+), 33 deletions(-)

New commits:
commit d2f9f27774ec138c9f66c55f582a123d8ebd19ff
Author: Stephan Bergmann 
Date:   Wed Mar 30 18:59:54 2016 +0200

loplugin:nullptr: Find some more cases in templates

Change-Id: I1f127d56e40b04f2b4df85c0afbcfd424d68a8cc

diff --git a/basegfx/source/inc/hommatrixtemplate.hxx 
b/basegfx/source/inc/hommatrixtemplate.hxx
index 77e2130..c8cf4ae 100644
--- a/basegfx/source/inc/hommatrixtemplate.hxx
+++ b/basegfx/source/inc/hommatrixtemplate.hxx
@@ -48,7 +48,7 @@ namespace basegfx
 {
 }
 
-explicit ImplMatLine(sal_uInt16 nRow, ImplMatLine< RowSize >* 
pToBeCopied = 0L)
+explicit ImplMatLine(sal_uInt16 nRow, ImplMatLine< RowSize >* 
pToBeCopied = nullptr)
 {
 if(pToBeCopied)
 {
diff --git a/compilerplugins/clang/nullptr.cxx 
b/compilerplugins/clang/nullptr.cxx
index 8003439..1e6311b 100644
--- a/compilerplugins/clang/nullptr.cxx
+++ b/compilerplugins/clang/nullptr.cxx
@@ -51,6 +51,10 @@ public:
 
 bool VisitCXXOperatorCallExpr(CXXOperatorCallExpr const * expr);
 
+bool VisitParmVarDecl(ParmVarDecl const * decl);
+
+bool TraverseConstructorInitializer(CXXCtorInitializer * init);
+
 // bool shouldVisitTemplateInstantiations() const { return true; }
 
 private:
@@ -60,6 +64,10 @@ private:
 
 bool isMacroBodyExpansion(SourceLocation location) const;
 
+void visitCXXCtorInitializer(CXXCtorInitializer const * init);
+
+void handleZero(Expr const * expr);
+
 void handleNull(
 Expr const * expr, char const * castKind,
 Expr::NullPointerConstantKind nullPointerKind);
@@ -142,12 +150,7 @@ bool Nullptr::VisitBinaryOperator(BinaryOperator const * 
expr) {
 default:
 return true;
 }
-//TODO: detect NPCK_ZeroExpression where appropriate
-auto const lit = dyn_cast(e->IgnoreParenImpCasts());
-if (lit == nullptr || lit->getValue().getBoolValue()) {
-return true;
-}
-handleNull(e, nullptr, Expr::NPCK_ZeroLiteral);
+handleZero(e);
 return true;
 }
 
@@ -173,15 +176,30 @@ bool 
Nullptr::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const * expr) {
 default:
 return true;
 }
-//TODO: detect NPCK_ZeroExpression where appropriate
-auto const lit = dyn_cast(e->IgnoreParenImpCasts());
-if (lit == nullptr || lit->getValue().getBoolValue()) {
+handleZero(e);
+return true;
+}
+
+bool Nullptr::VisitParmVarDecl(ParmVarDecl const * decl) {
+if (ignoreLocation(decl)) {
+return true;
+}
+if (!decl->getType()->isPointerType()) {
+return true;
+}
+auto e = decl->getDefaultArg();
+if (e == nullptr) {
 return true;
 }
-handleNull(e, nullptr, Expr::NPCK_ZeroLiteral);
+handleZero(e);
 return true;
 }
 
+bool Nullptr::TraverseConstructorInitializer(CXXCtorInitializer * init) {
+visitCXXCtorInitializer(init);
+return RecursiveASTVisitor::TraverseConstructorInitializer(init);
+}
+
 bool Nullptr::isInLokIncludeFile(SourceLocation spellingLocation) const {
 return compiler.getSourceManager().getFilename(spellingLocation)
 .startswith(SRCDIR "/include/LibreOfficeKit/");
@@ -204,6 +222,40 @@ bool Nullptr::isMacroBodyExpansion(SourceLocation 
location) const {
 #endif
 }
 
+void Nullptr::visitCXXCtorInitializer(CXXCtorInitializer const * init) {
+if (!init->isWritten()) {
+return;
+}
+auto e = init->getInit();
+if (ignoreLocation(e)) {
+return;
+}
+auto d = init->getAnyMember();
+if (d == nullptr || !d->getType()->isPointerType()) {
+return;
+}
+if (auto e2 = dyn_cast(e)) {
+if (e2->getNumExprs() != 1) {
+return;
+}
+e = e2->getExpr(0);
+} else if (auto e2 = dyn_cast(e)) {
+if (e2->getNumInits() != 1) {
+return;
+}
+e = e2->getInit(0);
+}
+handleZero(e);
+}
+
+void Nullptr::handleZero(Expr const * expr) {
+//TODO: detect NPCK_ZeroExpression where appropriate
+auto const lit = dyn_cast(expr->IgnoreParenImpCasts());
+if (lit != nullptr && !lit->getValue().getBoolValue()) {
+handleNull(expr, nullptr, Expr::NPCK_ZeroLiteral);
+}
+}
+
 void Nullptr::handleNull(
 Expr const * expr, char const * castKind,

[Libreoffice-commits] online.git: 2 commits - loolwsd/LOOLWSD.cpp loolwsd/Storage.hpp

2016-03-30 Thread Pranav Kant
 loolwsd/LOOLWSD.cpp |   14 +-
 loolwsd/Storage.hpp |8 +---
 2 files changed, 18 insertions(+), 4 deletions(-)

New commits:
commit ba96b9595491cf3c204a2f2ebdb1f9bc9ba50c32
Author: Pranav Kant 
Date:   Wed Mar 30 21:27:17 2016 +0530

loolwsd: Setup client SSL

We act as a client when we communicate with owncloud server.

For time being, just accept whatever certificates owncloud server
gives us. We might want to get more strict here in future.

Change-Id: I4813d19412b66ecf57d6cdef9c3ac94fbbaa521f

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 7e75e80..0fb89a9 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -70,6 +70,7 @@ DEALINGS IN THE SOFTWARE.
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -955,6 +956,17 @@ void LOOLWSD::initializeSSL()
 
 Poco::Net::Context::Ptr sslContext = new 
Poco::Net::Context(Poco::Net::Context::SERVER_USE, sslParams);
 Poco::Net::SSLManager::instance().initializeServer(consoleHandler, 
invalidCertHandler, sslContext);
+
+// Init client
+Poco::Net::Context::Params sslClientParams;
+// TODO: Be more strict and setup SSL key/certs for owncloud server and us
+sslClientParams.verificationMode = Poco::Net::Context::VERIFY_NONE;
+
+Poco::SharedPtr 
consoleClientHandler = new Poco::Net::KeyConsoleHandler(false);
+Poco::SharedPtr 
invalidClientCertHandler = new Poco::Net::AcceptCertificateHandler(false);
+
+Poco::Net::Context::Ptr sslClientContext = new 
Poco::Net::Context(Poco::Net::Context::CLIENT_USE, sslClientParams);
+Poco::Net::SSLManager::instance().initializeClient(consoleClientHandler, 
invalidClientCertHandler, sslClientContext);
 }
 
 void LOOLWSD::uninitialize()
diff --git a/loolwsd/Storage.hpp b/loolwsd/Storage.hpp
index 1f92541..08bec04 100644
--- a/loolwsd/Storage.hpp
+++ b/loolwsd/Storage.hpp
@@ -16,6 +16,8 @@
 #include 
 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -195,7 +197,7 @@ public:
 Log::debug("Getting info for wopi uri [" + uri.toString() + "].");
 
 Poco::URI uriObject(uri);
-Poco::Net::HTTPClientSession session(uriObject.getHost(), 
uriObject.getPort());
+Poco::Net::HTTPSClientSession session(uriObject.getHost(), 
uriObject.getPort(), Poco::Net::SSLManager::instance().defaultClientContext());
 Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, 
uriObject.getPathAndQuery(), Poco::Net::HTTPMessage::HTTP_1_1);
 request.set("User-Agent", "LOOLWSD WOPI Agent");
 session.sendRequest(request);
@@ -251,7 +253,7 @@ public:
 const auto url = uriObject.getPath() + "/contents?" + 
uriObject.getQuery();
 Log::debug("Wopi requesting: " + url);
 
-Poco::Net::HTTPClientSession session(uriObject.getHost(), 
uriObject.getPort());
+Poco::Net::HTTPSClientSession session(uriObject.getHost(), 
uriObject.getPort(), Poco::Net::SSLManager::instance().defaultClientContext());
 Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, url, 
Poco::Net::HTTPMessage::HTTP_1_1);
 request.set("User-Agent", "LOOLWSD WOPI Agent");
 session.sendRequest(request);
@@ -292,7 +294,7 @@ public:
 const auto url = uriObject.getPath() + "/contents?" + 
uriObject.getQuery();
 Log::debug("Wopi posting: " + url);
 
-Poco::Net::HTTPClientSession session(uriObject.getHost(), 
uriObject.getPort());
+Poco::Net::HTTPSClientSession session(uriObject.getHost(), 
uriObject.getPort(), Poco::Net::SSLManager::instance().defaultClientContext());
 Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_POST, url, 
Poco::Net::HTTPMessage::HTTP_1_1);
 request.set("X-WOPIOverride", "PUT");
 request.setContentType("application/octet-stream");
commit 27a42affd06bb499c1e26556c832fafb81e678d3
Author: Pranav Kant 
Date:   Wed Mar 30 19:23:27 2016 +0530

loolwsd: This is a server, not client

Change-Id: I8db0a73048998566b4b60a7f39fe57617b9dca8d

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index db673cc..7e75e80 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -951,7 +951,7 @@ void LOOLWSD::initializeSSL()
 sslParams.verificationMode = Poco::Net::Context::VERIFY_NONE;
 
 Poco::SharedPtr consoleHandler = 
new Poco::Net::KeyConsoleHandler(true);
-Poco::SharedPtr invalidCertHandler = 
new Poco::Net::ConsoleCertificateHandler(false);
+Poco::SharedPtr invalidCertHandler = 
new Poco::Net::ConsoleCertificateHandler(true);
 
 Poco::Net::Context::Ptr sslContext = new 
Poco::Net::Context(Poco::Net::Context::SERVER_USE, sslParams);
 Poco::Net::SSLManager::instance().initializeServer(consoleHandler, 
invalidCertHandler, sslContext);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-comm

[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - b4/bdcd1a1941089f26210bf76d6d52e05d20c3b9

2016-03-30 Thread Michael Stahl
 b4/bdcd1a1941089f26210bf76d6d52e05d20c3b9 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c52223b0fbd7b5fe3b714c1340d0b91df9a24acf
Author: Michael Stahl 
Date:   Wed Mar 30 16:43:41 2016 +0200

Notes added by 'git notes add'

diff --git a/b4/bdcd1a1941089f26210bf76d6d52e05d20c3b9 
b/b4/bdcd1a1941089f26210bf76d6d52e05d20c3b9
new file mode 100644
index 000..a480f15
--- /dev/null
+++ b/b4/bdcd1a1941089f26210bf76d6d52e05d20c3b9
@@ -0,0 +1 @@
+prefer: e00a3a684e22f45f36b4002ce726cb2975cb36ae
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 2f/3f91ebc012cf8c91b73d2d1aef4b88ebac4b50

2016-03-30 Thread Michael Stahl
 2f/3f91ebc012cf8c91b73d2d1aef4b88ebac4b50 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5147fcc8ffa8200be5237dafddab9c1e0b69a589
Author: Michael Stahl 
Date:   Wed Mar 30 16:47:11 2016 +0200

Notes added by 'git notes add'

diff --git a/2f/3f91ebc012cf8c91b73d2d1aef4b88ebac4b50 
b/2f/3f91ebc012cf8c91b73d2d1aef4b88ebac4b50
new file mode 100644
index 000..8e5c182
--- /dev/null
+++ b/2f/3f91ebc012cf8c91b73d2d1aef4b88ebac4b50
@@ -0,0 +1 @@
+ignore: aoo
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - e8/437bcfd35cb625c15acdf14cd015e3095a2749

2016-03-30 Thread Michael Stahl
 e8/437bcfd35cb625c15acdf14cd015e3095a2749 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 96fe34f3f0a8b8bc8eb30f84936266eb638d3001
Author: Michael Stahl 
Date:   Wed Mar 30 16:46:52 2016 +0200

Notes added by 'git notes add'

diff --git a/e8/437bcfd35cb625c15acdf14cd015e3095a2749 
b/e8/437bcfd35cb625c15acdf14cd015e3095a2749
new file mode 100644
index 000..8e5c182
--- /dev/null
+++ b/e8/437bcfd35cb625c15acdf14cd015e3095a2749
@@ -0,0 +1 @@
+ignore: aoo
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 2c/f713b56abbd798212dd3527bf3ead910421f43

2016-03-30 Thread Michael Stahl
 2c/f713b56abbd798212dd3527bf3ead910421f43 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 28ed3a884100fb9495c830adb4615eb2fb33ca2f
Author: Michael Stahl 
Date:   Wed Mar 30 16:46:15 2016 +0200

Notes added by 'git notes add'

diff --git a/2c/f713b56abbd798212dd3527bf3ead910421f43 
b/2c/f713b56abbd798212dd3527bf3ead910421f43
new file mode 100644
index 000..fb0c486
--- /dev/null
+++ b/2c/f713b56abbd798212dd3527bf3ead910421f43
@@ -0,0 +1 @@
+reject: sal depending on tools is *insane*
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 0a/db92d44d96cbedb94d8bbc47b47707135ccf88

2016-03-30 Thread Michael Stahl
 0a/db92d44d96cbedb94d8bbc47b47707135ccf88 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 008aafab90299024b6823c05f7c33bbed2187533
Author: Michael Stahl 
Date:   Wed Mar 30 16:44:11 2016 +0200

Notes added by 'git notes add'

diff --git a/0a/db92d44d96cbedb94d8bbc47b47707135ccf88 
b/0a/db92d44d96cbedb94d8bbc47b47707135ccf88
new file mode 100644
index 000..a480f15
--- /dev/null
+++ b/0a/db92d44d96cbedb94d8bbc47b47707135ccf88
@@ -0,0 +1 @@
+prefer: e00a3a684e22f45f36b4002ce726cb2975cb36ae
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - bf/a0632c27a1a9c4e763747cd4e307ea44cf39f3

2016-03-30 Thread Michael Stahl
 bf/a0632c27a1a9c4e763747cd4e307ea44cf39f3 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit a56782689876b3f1313af66d0bd33711d738f578
Author: Michael Stahl 
Date:   Wed Mar 30 16:41:52 2016 +0200

Notes added by 'git notes add'

diff --git a/bf/a0632c27a1a9c4e763747cd4e307ea44cf39f3 
b/bf/a0632c27a1a9c4e763747cd4e307ea44cf39f3
new file mode 100644
index 000..c356129
--- /dev/null
+++ b/bf/a0632c27a1a9c4e763747cd4e307ea44cf39f3
@@ -0,0 +1 @@
+prefer: c64ea526dc71da6e3aad188ac71e58047ed74b5a
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-30 Thread Wastack
 l10ntools/source/merge.cxx |4 ++--
 l10ntools/source/po.cxx|8 
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 14060e76e33cfb305c1469fecf7db688bf8a8858
Author: Wastack 
Date:   Tue Mar 29 23:49:41 2016 +0200

tdf#97966 Drop 'static' keywords

Change-Id: I2e495243b75fc239dafbf63c7644115f0a923f4a
Reviewed-on: https://gerrit.libreoffice.org/23607
Tested-by: Jenkins 
Reviewed-by: David Tardon 

diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 7789e3b..7ee2360 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -29,7 +29,7 @@
 
 namespace
 {
-static OString lcl_NormalizeFilename(const OString& rFilename)
+OString lcl_NormalizeFilename(const OString& rFilename)
 {
 return rFilename.copy(
 std::max(
@@ -37,7 +37,7 @@ namespace
 rFilename.lastIndexOf( '/' ))+1);
 };
 
-static bool lcl_ReadPoChecked(
+bool lcl_ReadPoChecked(
 PoEntry& o_rPoEntry, PoIfstream& rPoFile,
 const OString& rFileName)
 {
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 6aa7c1d..1d8223e 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -87,7 +87,7 @@ public:
 namespace
 {
 // Convert a normal string to msg/po output string
-static OString lcl_GenMsgString(const OString& rString)
+OString lcl_GenMsgString(const OString& rString)
 {
 if ( rString.isEmpty() )
 return "\"\"";
@@ -114,7 +114,7 @@ namespace
 }
 
 // Convert msg string to normal form
-static OString lcl_GenNormString(const OString& rString)
+OString lcl_GenNormString(const OString& rString)
 {
 return
 helper::unEscapeAll(
@@ -406,7 +406,7 @@ OString PoEntry::genKeyId(const OString& rGenerator)
 namespace
 {
 // Get actual time in "YEAR-MO-DA HO:MI+ZONE" form
-static OString lcl_GetTime()
+OString lcl_GetTime()
 {
 time_t aNow = time(nullptr);
 struct tm* pNow = localtime(&aNow);
@@ -511,7 +511,7 @@ namespace
 {
 
 // Check the validity of read entry
-static bool lcl_CheckInputEntry(const GenPoEntry& rEntry)
+bool lcl_CheckInputEntry(const GenPoEntry& rEntry)
 {
 const OString sMsgCtxt = rEntry.getMsgCtxt();
 const sal_Int32 nFirstEndLine = sMsgCtxt.indexOf('\n');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 6 commits - extensions.lst external_deps.lst graphite/graphite-2.3.1-CVE-2016-1521.patch graphite/makefile.mk sal/inc sdext/source set_soenv.in

2016-03-30 Thread Andrea Pescetti
 extensions.lst  |   60 ++--
 external_deps.lst   |5 +-
 graphite/graphite-2.3.1-CVE-2016-1521.patch |   20 +
 graphite/makefile.mk|2 
 sal/inc/rtl/string.hxx  |5 ++
 sdext/source/pdfimport/pdfparse/makefile.mk |2 
 set_soenv.in|4 +
 7 files changed, 63 insertions(+), 35 deletions(-)

New commits:
commit 2f3f91ebc012cf8c91b73d2d1aef4b88ebac4b50
Author: Andrea Pescetti 
Date:   Sat Mar 26 11:15:42 2016 +

#i126892# Use a specific mirror for dictionaries, to avoid HTTPS 
redirections.

diff --git a/extensions.lst b/extensions.lst
index efe09a9..4f859b1 100644
--- a/extensions.lst
+++ b/extensions.lst
@@ -39,115 +39,115 @@
 
 # English dictionary
 [ language=en.* || language=de || language=it ]
-f5f6aab4cc5d92a34ab13ad15332770c 
http://sourceforge.net/projects/aoo-extensions/files/17102/21/dict-en.oxt/download
 "dict-en.oxt"
+f5f6aab4cc5d92a34ab13ad15332770c 
http://iweb.dl.sourceforge.net/project/aoo-extensions/17102/21/dict-en.oxt 
"dict-en.oxt"
 
 # English (USA, en_US) dictionary
 [ language==nl || language==ru ]
-e2eab80772ab1aa09716954219351a80 
http://sourceforge.net/projects/aoo-extensions/files/1470/1/en_US.oxt/download 
"en_US.oxt"
+e2eab80772ab1aa09716954219351a80 
http://iweb.dl.sourceforge.net/project/aoo-extensions/1470/1/en_US.oxt 
"en_US.oxt"
 
 # German dictionary.
 [ language=de || language=de_DE || language=nl || language=ru ]
-a9328ce36b272a034b4706721345076d 
http://sourceforge.net/projects/aoo-extensions/files/1075/13/dict-de_de-frami_2013-12-06.oxt/download
 "dict-de_DE-frami_2012-06-17.oxt"
+a9328ce36b272a034b4706721345076d 
http://iweb.dl.sourceforge.net/project/aoo-extensions/1075/13/dict-de_de-frami_2013-12-06.oxt
 "dict-de_DE-frami_2012-06-17.oxt"
 
 # Dutch dictionary.
 [ language=nl ]
-5c0de383ef649cffefc128cfb36b4d43 
http://sourceforge.net/projects/aoo-extensions/files/1456/6/nl-dict-v2.00g.oxt/download
 "nl-dict-v2.00g.oxt"
+5c0de383ef649cffefc128cfb36b4d43 
http://iweb.dl.sourceforge.net/project/aoo-extensions/1456/6/nl-dict-v2.00g.oxt 
"nl-dict-v2.00g.oxt"
 
 # French dictionary.
 [ language=fr || language=nl || language=de || language=de_DE || language=ca 
|| language=ca_XV ]
-48343ddb4f020f1c335189ba56f8f50c 
http://sourceforge.net/projects/aoo-extensions/files/17340/3/lo-oo-ressources-linguistiques-fr-v5.1.oxt/download
 "dict-fr.oxt"
+48343ddb4f020f1c335189ba56f8f50c 
http://iweb.dl.sourceforge.net/project/aoo-extensions/17340/3/lo-oo-ressources-linguistiques-fr-v5.1.oxt
 "dict-fr.oxt"
 
 # Italian dictionary.
 [ language=it || language=de || language=de_DE ]
-b20c2bf3114bdca5749606ad707e19be 
http://sourceforge.net/projects/aoo-extensions/files/1204/14/dict-it.oxt/download
 "dict-it.oxt"
+b20c2bf3114bdca5749606ad707e19be 
http://iweb.dl.sourceforge.net/project/aoo-extensions/1204/14/dict-it.oxt 
"dict-it.oxt"
 
 # Spanish dictionary.
 [ language=es || language=ca || language=ca_XV ]
-59dd45e6785ed644adbbd73f4f126182 
http://sourceforge.net/projects/aoo-extensions/files/1657/3/es_es.oxt/download 
"es_es.oxt"
+59dd45e6785ed644adbbd73f4f126182 
http://iweb.dl.sourceforge.net/project/aoo-extensions/1657/3/es_es.oxt 
"es_es.oxt"
 
 # Danish dictionary.
 [ language=da ]
-b38cba04b6513dd42b031199d617cce6 
http://sourceforge.net/projects/aoo-extensions/files/1388/12/DanskeSynonymer.oxt/download
 "DanskeSynonymer.oxt"
-6ee1e24fb17e44577d8e3200f3e44adc 
http://sourceforge.net/projects/aoo-extensions/files/1429/6/dict-da-current.oxt/download
 "dict-da-current.oxt"
+b38cba04b6513dd42b031199d617cce6 
http://iweb.dl.sourceforge.net/project/aoo-extensions/1388/12/DanskeSynonymer.oxt
 "DanskeSynonymer.oxt"
+6ee1e24fb17e44577d8e3200f3e44adc 
http://iweb.dl.sourceforge.net/project/aoo-extensions/1429/6/dict-da-current.oxt
 "dict-da-current.oxt"
 
 # Lithuanian dictionary.
 [ language=lt ]
-d8d4a3d5c6abfde1b4c81cc1ddd1afa0 
http://sourceforge.net/projects/aoo-extensions/files/17703/0/openoffice-spellcheck-lt-1.3.oxt/download
 "openoffice-spellcheck-lt-1.3.oxt"
+d8d4a3d5c6abfde1b4c81cc1ddd1afa0 
http://iweb.dl.sourceforge.net/project/aoo-extensions/17703/0/openoffice-spellcheck-lt-1.3.oxt
 "openoffice-spellcheck-lt-1.3.oxt"
 
 # Romanian dictionary.
 [ language=ro ]
-b05941b975afc0321df0cd48a4d295c8 
http://sourceforge.net/projects/aoo-extensions/files/1392/8/dict-ro.1.5.oxt/download
 "dict-ro.1.5.oxt"
+b05941b975afc0321df0cd48a4d295c8 
http://iweb.dl.sourceforge.net/project/aoo-extensions/1392/8/dict-ro.1.5.oxt 
"dict-ro.1.5.oxt"
 
 # Russian dictionary.
 [ language=ru ]
-93921f14809a22770f1bd89af65015bc 
http://sourceforge.net/projects/aoo-extensions/files/3233/3/dict_ru_ru-0.3.7.oxt/download
 "dict-ru.oxt"
+93921f14809a22770f1bd89af65015bc 
http://iweb.dl.sourceforge.net/project/aoo-extensions/3233/3/dict_ru_

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

2016-03-30 Thread Michael Stahl
 basctl/source/basicide/basicbox.cxx|2 +-
 basctl/source/basicide/bastype2.cxx|2 +-
 basctl/source/basicide/bastypes.cxx|2 +-
 basctl/source/basicide/macrodlg.cxx|   14 +++---
 basctl/source/basicide/moduldl2.cxx|2 +-
 basctl/source/basicide/moduldlg.cxx|   22 ++
 sc/source/core/data/global.cxx |2 +-
 sc/source/ui/app/inputwin.cxx  |2 +-
 sc/source/ui/condformat/condformatdlgentry.cxx |2 +-
 sc/source/ui/dialogs/searchresults.cxx |6 --
 sc/source/ui/formdlg/formula.cxx   |2 +-
 sc/source/ui/view/tabvwsh5.cxx |2 +-
 sc/source/ui/view/tabvwsh9.cxx |3 ++-
 sc/source/ui/view/tabvwshe.cxx |4 ++--
 sc/source/ui/view/viewfun2.cxx |3 ++-
 sc/source/ui/view/viewfun4.cxx |4 ++--
 sc/source/ui/view/viewfun6.cxx |2 +-
 sc/source/ui/view/viewutil.cxx |2 +-
 sd/source/ui/view/drviews1.cxx |2 +-
 sd/source/ui/view/drviews2.cxx |8 +---
 sd/source/ui/view/drviews5.cxx |6 --
 sd/source/ui/view/drviews9.cxx |3 ++-
 sd/source/ui/view/drviewsa.cxx |2 +-
 sd/source/ui/view/drviewsb.cxx |4 ++--
 sd/source/ui/view/drviewsd.cxx |2 +-
 sd/source/ui/view/drviewse.cxx |2 +-
 sd/source/ui/view/drviewsi.cxx |3 ++-
 27 files changed, 67 insertions(+), 43 deletions(-)

New commits:
commit ba0a866b83f016fd460320e7d057dd107e019f19
Author: Michael Stahl 
Date:   Wed Mar 30 14:39:54 2016 +0200

tdf#96505: fix wrong SfxDispatcher::Execute calls ...

... that are now busted on all 64-bit platforms since commit
57d0caacee2f395be2e89b78f8ece2d47b2c8683 but were already busted only
on 64-bit WNT before.

SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
const SfxPoolItem*  pArg1, ...)
assigns the varargs to a "const SfxPoolItem *", so passing in
"0L" is only correct if long is 64-bit, but on WNT 64-bit long is
32-bit, so use "nullptr" already.

Change-Id: I50448d8ad121c4881be549623d44c44b00e56d98

diff --git a/basctl/source/basicide/basicbox.cxx 
b/basctl/source/basicide/basicbox.cxx
index 847a1a0..131e510 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -311,7 +311,7 @@ void LibBox::NotifyIDE()
 if (SfxDispatcher* pDispatcher = GetDispatcher())
 pDispatcher->Execute(
 SID_BASICIDE_LIBSELECTED,
-SfxCallMode::SYNCHRON, &aDocumentItem, &aLibNameItem, 0
+SfxCallMode::SYNCHRON, &aDocumentItem, &aLibNameItem, nullptr
 );
 }
 ReleaseFocus();
diff --git a/basctl/source/basicide/bastype2.cxx 
b/basctl/source/basicide/bastype2.cxx
index 288d7ed..652d53f 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -932,7 +932,7 @@ bool TreeListBox::OpenCurrent()
 );
 pDispatcher->Execute(
 SID_BASICIDE_SHOWSBX,
-SfxCallMode::SYNCHRON, &aSbxItem, 0
+SfxCallMode::SYNCHRON, &aSbxItem, nullptr
 );
 return true;
 }
diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index 01e0b6d..ae6a9375 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -555,7 +555,7 @@ void TabBar::EndRenaming()
 SfxStringItem aNewName( SID_BASICIDE_ARG_MODULENAME, GetEditText() );
 if (SfxDispatcher* pDispatcher = GetDispatcher())
 pDispatcher->Execute( SID_BASICIDE_NAMECHANGEDONTAB,
-  SfxCallMode::SYNCHRON, &aID, &aNewName, 0 );
+  SfxCallMode::SYNCHRON, &aID, &aNewName, nullptr);
 }
 }
 
diff --git a/basctl/source/basicide/macrodlg.cxx 
b/basctl/source/basicide/macrodlg.cxx
index c4a5fa4..4070b50 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -678,7 +678,10 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, 
pButton, void )
 SfxGetpApp()->ExecuteSlot( aRequest );
 
 if (SfxDispatcher* pDispatcher = GetDispatcher())
-pDispatcher->Execute( SID_BASICIDE_EDITMACRO, 
SfxCallMode::ASYNCHRON, &aInfoItem, 0 );
+{
+pDispatcher->Execute(SID_BASICIDE_EDITMACRO,
+SfxCallMode::ASYNCHRON, &aInfoItem, nullptr);
+}
 EndDialog(Macro_Edit);
 }
 else
@@ -687,8 +690,10 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, 
pButton, void )
 {
 DeleteMacro();
  

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

2016-03-30 Thread Tor Lillqvist
 configure.ac |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1f611f3bb3b3d30b2b30570a09b4477ffb585ce4
Author: Tor Lillqvist 
Date:   Wed Mar 30 14:48:34 2016 +0300

Accept iOS SDK 9.3 (and let's forget 8.x)

(But building for iOS has bit-rotted in several other ways, sure. I
have no plan to fix that.)

Change-Id: I7617cdd363cd1f3750b1afa999de5f654b9f09fa

diff --git a/configure.ac b/configure.ac
index c1657a3..9b88fd4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3068,8 +3068,8 @@ if test $_os = iOS; then
 
 xcode_developer=`xcode-select -print-path`
 
-current_sdk_ver=9.2
-for sdkver in 9.2 9.1 9.0 8.4 8.3 8.2 8.1 8.0; do
+current_sdk_ver=9.3
+for sdkver in 9.3 9.2; do
 
t=$xcode_developer/Platforms/$platform.platform/Developer/SDKs/$platform$sdkver.sdk
 if test -d $t; then
 ios_sdk=$sdkver
@@ -3079,7 +3079,7 @@ if test $_os = iOS; then
 done
 
 if test -z "$sysroot"; then
-AC_MSG_ERROR([Could not find iOS SDK, expected something like 
$xcode_developer/Platforms/$platform.platform/Developer/SDKs/${platform}${current_sdk_ver}])
+AC_MSG_ERROR([Could not find iOS SDK, expected something like 
$xcode_developer/Platforms/$platform.platform/Developer/SDKs/${platform}${current_sdk_ver}.sdk])
 fi
 
 AC_MSG_RESULT($sysroot)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-30 Thread Miklos Vajna
 sw/source/core/text/xmldump.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit f5e0236566b913aebb1376d97c7d37a23c69bd84
Author: Miklos Vajna 
Date:   Wed Mar 30 13:44:11 2016 +0200

sw layout dump: show Prt() next to Frame() of SwFrames

To be able to see what layout thinks about margins.

Change-Id: I45b29cb8f71a96f4720158c2357bcbb295738130

diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 9f8a069..ab5028e 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -360,6 +360,14 @@ void SwFrame::dumpInfosAsXml( xmlTextWriterPtr writer ) 
const
 xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "height" ), "%ld", 
Frame().Height() );
 xmlTextWriterWriteAttribute(writer, BAD_CAST("mbFixSize"), 
BAD_CAST(OString::boolean(HasFixSize()).getStr()));
 xmlTextWriterEndElement( writer );
+
+// output the Prt
+xmlTextWriterStartElement( writer, BAD_CAST( "prtBounds" ) );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "left" ), "%ld", 
Prt().Left() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "top" ), "%ld", 
Prt().Top() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "width" ), "%ld", 
Prt().Width() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "height" ), "%ld", 
Prt().Height() );
+xmlTextWriterEndElement( writer );
 }
 
 // Hack: somehow conversion from "..." to va_list does
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-30 Thread Stephan Bergmann
 extensions/source/update/check/updatecheck.cxx |6 +++---
 sal/osl/unx/signal.cxx |2 +-
 sw/source/core/doc/DocumentRedlineManager.cxx  |6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 9b39649fa1ce4d81658a6c9448cfdf76581813f0
Author: Stephan Bergmann 
Date:   Wed Mar 30 14:06:04 2016 +0200

loplugin:staticanonymous

cf.  "tdf#97966 Compiler 
plugin"; in
code not covered by Tamás's pending "tdf#97966 Drop 'static' keywords" 
changes.

Change-Id: Ifbaef83fdb1fde7e25fafd5746cdbf99c334c5be

diff --git a/extensions/source/update/check/updatecheck.cxx 
b/extensions/source/update/check/updatecheck.cxx
index 74221ea..9899472 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -98,7 +98,7 @@ OUString getReleaseNote(const UpdateInfo& rInfo, sal_uInt8 
pos, bool autoDownloa
 namespace
 {
 
-static inline OUString getBuildId()
+inline OUString getBuildId()
 {
 OUString aPathVal("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" 
SAL_CONFIGFILE("version") ":buildid}");
 rtl::Bootstrap::expandMacros(aPathVal);
@@ -107,7 +107,7 @@ static inline OUString getBuildId()
 
 
 #if defined LINUX || defined SOLARIS
-static inline OUString getBaseInstallation()
+inline OUString getBaseInstallation()
 {
 OUString aPathVal("$BRAND_BASE_DIR");
 rtl::Bootstrap::expandMacros(aPathVal);
@@ -196,7 +196,7 @@ OUString getImageFromFileName(const OUString& aFile)
 }
 
 
-static uno::Reference< beans::XPropertySet > createMenuBarUI(
+uno::Reference< beans::XPropertySet > createMenuBarUI(
 const uno::Reference< uno::XComponentContext >& xContext,
 const uno::Reference< task::XJob >& xJob)
 {
diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 9f44d31..7f86456 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -352,7 +352,7 @@ void callSystemHandler(int signal)
 }
 
 #if defined HAVE_VALGRIND_HEADERS
-static void DUMPCURRENTALLOCS()
+void DUMPCURRENTALLOCS()
 {
 VALGRIND_PRINTF( "=== start memcheck dump of active allocations ===\n" );
 
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx 
b/sw/source/core/doc/DocumentRedlineManager.cxx
index 4974408..58551bd 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -42,7 +42,7 @@ using namespace com::sun::star;
 // helper function for lcl_CheckRedline
 // 1. make sure that pPos->nContent points into pPos->nNode
 // 2. check that position is valid and doesn't point after text
-static void lcl_CheckPosition( const SwPosition* pPos )
+void lcl_CheckPosition( const SwPosition* pPos )
 {
 assert(dynamic_cast(&pPos->nNode.GetNode())
 == pPos->nContent.GetIdxReg());
@@ -58,7 +58,7 @@ using namespace com::sun::star;
 }
 }
 
-static void lcl_CheckPam( const SwPaM* pPam )
+void lcl_CheckPam( const SwPaM* pPam )
 {
 assert(pPam);
 lcl_CheckPosition( pPam->GetPoint() );
@@ -67,7 +67,7 @@ using namespace com::sun::star;
 
 // check validity of the redline table. Checks redline bounds, and make
 // sure the redlines are sorted and non-overlapping.
-static void lcl_CheckRedline( IDocumentRedlineAccess& redlineAccess )
+void lcl_CheckRedline( IDocumentRedlineAccess& redlineAccess )
 {
 const SwRedlineTable& rTable = redlineAccess.GetRedlineTable();
 
___
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' - vcl/inc vcl/win

2016-03-30 Thread Michael Stahl
 vcl/inc/win/salgdi.h |2 ++
 vcl/win/source/gdi/salgdi3.cxx   |   12 
 vcl/win/source/gdi/winlayout.cxx |6 ++
 3 files changed, 20 insertions(+)

New commits:
commit 4ae7ec8c8d22e751b868459e1f51fcecc37dd6b1
Author: Michael Stahl 
Date:   Thu Mar 24 22:20:06 2016 +0100

vcl: tdf#98812: acquire reference count of WinFontInstances

... when they are inserted in WinSalGraphics::mpWinFontEntry.

Not sure why one of these drops to 0 but is not removed from the
WinSalGraphics when formatting this particular bugdoc.

Acquiring the instances when retaining pointers to them should make
the life cycle a little less insane.

(cherry picked from commit 99207a26df0083851ba8e23be72d5c6974f98a3b)

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

diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 3d0046e..085f77e 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -220,6 +220,8 @@ private:
 sal_uIntPtr mnFontKernPairCount;// Number of Kerning Pairs of 
the current Font
 int mnPenWidth; // Linienbreite
 
+ImplFontEntry* GetWinFontEntry(int nFallbackLevel);
+
 public:
 HDC getHDC() const { return mhLocalDC; }
 void setHDC(HDC aNew) { mhLocalDC = aNew; }
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 499c0e5..b1f865d 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1532,12 +1532,23 @@ sal_uInt16 WinSalGraphics::SetFont( FontSelectPattern* 
pFont, int nFallbackLevel
 if( mhFonts[i] )
 ::DeleteFont( mhFonts[i] );
 mhFonts[ i ] = 0;
+if (mpWinFontEntry[i])
+{
+GetWinFontEntry(i)->m_pFontCache->Release(GetWinFontEntry(i));
+}
+mpWinFontEntry[i] = nullptr;
+mpWinFontData[i] = nullptr;
 }
 mhDefFont = 0;
 return 0;
 }
 
 DBG_ASSERT( pFont->mpFontData, "WinSalGraphics mpFontData==NULL");
+if (mpWinFontEntry[nFallbackLevel])
+{
+
GetWinFontEntry(nFallbackLevel)->m_pFontCache->Release(GetWinFontEntry(nFallbackLevel));
+}
+pFont->mpFontEntry->m_pFontCache->Acquire(pFont->mpFontEntry);
 mpWinFontEntry[ nFallbackLevel ] = reinterpret_cast( 
pFont->mpFontEntry );
 mpWinFontData[ nFallbackLevel ] = static_cast( 
pFont->mpFontData );
 
@@ -1560,6 +1571,7 @@ sal_uInt16 WinSalGraphics::SetFont( FontSelectPattern* 
pFont, int nFallbackLevel
 ::DeleteFont( mhFonts[i] );
 mhFonts[i] = 0;
 }
+// note: removing mpWinFontEntry[i] here has obviously bad effects
 }
 }
 
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 3b1f081..d8073fd 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -1347,6 +1347,7 @@ WinLayout::WinLayout(HDC hDC, const ImplWinFontData& 
rWFD, ImplWinFontEntry& rWF
 mrWinFontEntry(rWFE),
 mbUseOpenGL(bUseOpenGL)
 {
+assert(mrWinFontEntry.mnRefCount > 0);
 // keep mrWinFontEntry alive
 mrWinFontEntry.m_pFontCache->Acquire(&mrWinFontEntry);
 }
@@ -4263,6 +4264,11 @@ intWinSalGraphics::GetMinKashidaWidth()
 return nMinKashida;
 }
 
+ImplFontEntry * WinSalGraphics::GetWinFontEntry(int const nFallbackLevel)
+{
+return mpWinFontEntry[nFallbackLevel];
+}
+
 ImplWinFontEntry::ImplWinFontEntry( FontSelectPattern& rFSD )
 :   ImplFontEntry( rFSD )
 ,mpGLyphyAtlas( nullptr )
___
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/qa sw/source

2016-03-30 Thread Miklos Vajna
 sw/qa/extras/uiwriter/data/tdf97601.odt |binary
 sw/qa/extras/uiwriter/uiwriter.cxx  |   28 
 sw/source/uibase/wrtsh/wrtsh1.cxx   |4 ++--
 3 files changed, 30 insertions(+), 2 deletions(-)

New commits:
commit 0be4633755e1e2d3639866e074a456e1de0de3a8
Author: Miklos Vajna 
Date:   Tue Mar 8 09:03:39 2016 +0100

tdf#97601 sw: don't mark an already modified chart as modified

Regression from commit e2b260fc98e833d4e64426b90992094f2da0498c (sw: let
layout not mark embedded object as modified, 2014-06-03), an infinite
loop was caused by:

1) SwDoc::SetOLEObjModified() triggering the maOLEModifiedIdle Idle
2) which at the end called SwWrtShell::CalcAndSetScale()
3) which at the end called chart::ChartModel::setModified()
4) where chart code called back into SwDoc::SetOLEObjModified() via the
modification listener, and this happened again and again.

The original fix wanted to avoid marking the document as modified
without a user interaction, so fix the bug by only calling setModified()
if it prevents a not-modified -> modified transition. This keeps the
original bug fixed, but prevents the infinite loop, that is always a
modified -> modified transition.

(cherry picked from commit 078c00e3a3c971ac83154948d5f08462532b9dc6)

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

diff --git a/sw/qa/extras/uiwriter/data/tdf97601.odt 
b/sw/qa/extras/uiwriter/data/tdf97601.odt
new file mode 100644
index 000..d3995f2
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf97601.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 653b3db..59290bc 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -78,6 +78,8 @@
 #include "com/sun/star/beans/PropertyAttribute.hpp"
 #include "com/sun/star/text/XTextField.hpp"
 #include "com/sun/star/text/TextMarkupType.hpp"
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -150,6 +152,7 @@ public:
 void testTdf80663();
 void testTdf57197();
 void testTdf90808();
+void testTdf97601();
 void testTdf75137();
 void testTdf83798();
 void testTdf89714();
@@ -237,6 +240,7 @@ public:
 CPPUNIT_TEST(testTdf80663);
 CPPUNIT_TEST(testTdf57197);
 CPPUNIT_TEST(testTdf90808);
+CPPUNIT_TEST(testTdf97601);
 CPPUNIT_TEST(testTdf75137);
 CPPUNIT_TEST(testTdf83798);
 CPPUNIT_TEST(testTdf89714);
@@ -2339,6 +2343,30 @@ void SwUiWriterTest::testTdf90808()
 CPPUNIT_ASSERT_THROW(xText->insertTextContent(xCursor, xNumBookmark2, 
true), css::lang::IllegalArgumentException);
 }
 
+void SwUiWriterTest::testTdf97601()
+{
+// Instructions from the bugreport to trigger an infinite loop.
+createDoc("tdf97601.odt");
+uno::Reference 
xEmbeddedObjectsSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference xEmbeddedObjects = 
xEmbeddedObjectsSupplier->getEmbeddedObjects();
+uno::Reference xChart;
+xEmbeddedObjects->getByName("myChart") >>= xChart;
+uno::Reference xChartComponent;
+xChart->getPropertyValue("Component") >>= xChartComponent;
+uno::Sequence< uno::Reference > 
aDataSequences = xChartComponent->getDataSequences();
+uno::Reference xChartState(xChart, 
uno::UNO_QUERY);
+xChartState->getExtendedControlOverEmbeddedObject()->changeState(1);
+uno::Reference 
xDataSequenceModifiable(aDataSequences[2]->getValues(), uno::UNO_QUERY);
+xDataSequenceModifiable->setModified(true);
+
+// Make sure that the chart is marked as modified.
+uno::Reference xModifiable(xChartComponent, 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(true, bool(xModifiable->isModified()));
+calcLayout();
+// This never returned.
+Scheduler::ProcessEventsToIdle();
+}
+
 void SwUiWriterTest::testTdf75137()
 {
 SwDoc* pDoc = createDoc();
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 7de2e33..2c82d5c 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -652,7 +652,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& 
xObj,
 aSz.Width = aSize.Width();
 aSz.Height = aSize.Height();
 
-// Action 'setVisualAreaSize' doesn't have to change the
+// Action 'setVisualAreaSize' doesn't have to turn on the
 // modified state of the document, either.
 bool bModified = false;
 uno::Reference 
xModifiable(xObj->getComponent(), uno::UNO_QUERY);
@@ -660,7 +660,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& 
xObj,
 bModified = xModifiable->isModified();
 xObj->setVisualAreaSize( nAspect, aSz );
 xModifiable.set(xObj->getComponent(), uno::UNO_Q

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

2016-03-30 Thread Miklos Vajna
 sw/qa/extras/rtfimport/data/tdf96326.rtf   |   27 +
 sw/qa/extras/rtfimport/rtfimport.cxx   |   15 +
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |3 +-
 3 files changed, 44 insertions(+), 1 deletion(-)

New commits:
commit 8de829c25511add434373e58e69df997d25e1e5c
Author: Miklos Vajna 
Date:   Tue Mar 1 09:19:41 2016 +0100

tdf#96326 RTF import: handle checkbox form field undefined result

The RTF spec is quite terse on how the form filed result should be
interpreted, but the binary equivalent documents properly that
checkboxes have 3 valid states: 0, 1 and 25, the later meaning
undefined. Use the default value in that case.

(cherry picked from commit 829596eb36de32bd87b426d9ad11901eabeae7be)

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

diff --git a/sw/qa/extras/rtfimport/data/tdf96326.rtf 
b/sw/qa/extras/rtfimport/data/tdf96326.rtf
new file mode 100644
index 000..a19303f
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf96326.rtf
@@ -0,0 +1,27 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033\themelang1035\themelangfe0\themelangcs0
+\pard\plain
+This is not checked:
+{\field\flddirty\fldpriv
+{\*\fldinst
+ FORMCHECKBOX
+{\*\formfield
+{\fftype1\ffres25\fftypetxt0\ffhps20
+\ffdefres0}
+}
+}
+{\fldrslt }
+}
+\par
+This is checked:
+{\field\fldpriv
+{\*\fldinst
+ FORMCHECKBOX
+{\*\formfield
+{\fftype1\ffres25\fftypetxt0\ffhps20
+\ffdefres1}
+}
+}
+{\fldrslt }
+}
+\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx 
b/sw/qa/extras/rtfimport/rtfimport.cxx
index 1c4b457..7c9c098 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -49,6 +49,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1278,6 +1279,20 @@ DECLARE_RTFIMPORT_TEST(testPoshPosv, "posh-posv.rtf")
 CPPUNIT_ASSERT_EQUAL(true, getProperty(getShape(1), 
"FrameIsAutomaticHeight"));
 }
 
+DECLARE_RTFIMPORT_TEST(testTdf96326, "tdf96326.rtf")
+{
+// Make sure this is not checked.
+auto xFormField = getProperty< uno::Reference 
>(getRun(getParagraph(1), 2), "Bookmark");
+uno::Reference xParameters = 
xFormField->getParameters();
+// This was true, ffres=25 was interpreted as checked.
+CPPUNIT_ASSERT_EQUAL(false, bool(xParameters->hasElements()));
+
+// And this is checked.
+xFormField = getProperty< uno::Reference 
>(getRun(getParagraph(2), 2), "Bookmark");
+xParameters = xFormField->getParameters();
+CPPUNIT_ASSERT_EQUAL(true, 
xParameters->getByName("Checkbox_Checked").get());
+}
+
 DECLARE_RTFIMPORT_TEST(testN825305, "n825305.rtf")
 {
 // The problem was that the textbox wasn't transparent, due to 
unimplemented fFilled == 0.
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index f9cf146..db18c5b 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -4438,7 +4438,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword 
nKeyword, int nParam)
 m_aFormfieldSprms.set(NS_ooxml::LN_CT_FFDDList_default, pIntValue);
 break;
 case RTF_FFRES:
-if (m_nFormFieldType == RTFFormFieldType::CHECKBOX)
+// 25 means undefined, see [MS-DOC] 2.9.79, FFDataBits.
+if (m_nFormFieldType == RTFFormFieldType::CHECKBOX && nParam != 25)
 m_aFormfieldSprms.set(NS_ooxml::LN_CT_FFCheckBox_checked, 
pIntValue);
 else if (m_nFormFieldType == RTFFormFieldType::LIST)
 m_aFormfieldSprms.set(NS_ooxml::LN_CT_FFDDList_result, pIntValue);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-30 Thread Michael Stahl
 avmedia/source/framework/mediaplayer.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5f4f6b3146eb56c757b36eda43dcaf63c690ffb9
Author: Michael Stahl 
Date:   Wed Mar 30 13:22:03 2016 +0200

avmedia: fix varargs call for WNT 64-bit

SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
const SfxPoolItem*  pArg1, ...)
assigns the varargs to a "const SfxPoolItem *", so passing in
"0L" is only correct if long is 64-bit, but on WNT 64-bit long is
32-bit, so use "nullptr" already.

Change-Id: Iaf41efa795fd4439daab7ed7ec334d8ad8c476f3

diff --git a/avmedia/source/framework/mediaplayer.cxx 
b/avmedia/source/framework/mediaplayer.cxx
index 489ff5e..5edfd67 100644
--- a/avmedia/source/framework/mediaplayer.cxx
+++ b/avmedia/source/framework/mediaplayer.cxx
@@ -136,7 +136,7 @@ void MediaFloater::dispatchCurrentURL()
 url = mpMediaWindow->getURL();
 }
 const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, url );
-pDispatcher->Execute( SID_INSERT_AVMEDIA, SfxCallMode::RECORD, 
&aMediaURLItem, 0L );
+pDispatcher->Execute(SID_INSERT_AVMEDIA, SfxCallMode::RECORD, 
&aMediaURLItem, nullptr);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-30 Thread Stephan Bergmann
 basegfx/source/inc/hommatrixtemplate.hxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 06895bd2c785d79dd00261ded31def10b5a7157e
Author: Stephan Bergmann 
Date:   Wed Mar 30 13:15:55 2016 +0200

loplugin:nullptr

Change-Id: I7f6d030317fc7910e69c742b3160b0156e9f9200

diff --git a/basegfx/source/inc/hommatrixtemplate.hxx 
b/basegfx/source/inc/hommatrixtemplate.hxx
index ec527d7..77e2130 100644
--- a/basegfx/source/inc/hommatrixtemplate.hxx
+++ b/basegfx/source/inc/hommatrixtemplate.hxx
@@ -101,13 +101,13 @@ namespace basegfx
 
 // reset last line, it equals default
 delete const_cast*>(this)->mpLine;
-const_cast*>(this)->mpLine = 
0L;
+const_cast*>(this)->mpLine = 
nullptr;
 
 return true;
 }
 
 ImplHomMatrixTemplate()
-:   mpLine(0L)
+:   mpLine(nullptr)
 {
 // complete initialization with identity matrix, all lines
 // were initialized with a trailing 1 followed by 0's.
@@ -119,7 +119,7 @@ namespace basegfx
 }
 
 ImplHomMatrixTemplate(const ImplHomMatrixTemplate& rToBeCopied)
-:   mpLine(0L)
+:   mpLine(nullptr)
 {
 // complete initialization using copy
 for(sal_uInt16 a(0); a < (RowSize - 1); a++)
@@ -174,7 +174,7 @@ namespace basegfx
 
 if(!::basegfx::fTools::equal(fDefault, rValue))
 {
-mpLine = new ImplMatLine< RowSize >((RowSize - 1), 0L);
+mpLine = new ImplMatLine< RowSize >((RowSize - 1), 
nullptr);
 mpLine->set(nColumn, rValue);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-30 Thread Michael Stahl
 vcl/Library_vcl.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9feacaf1d884a6eea7e83dcefef4ee2af5c6f2e0
Author: Michael Stahl 
Date:   Wed Mar 30 12:28:53 2016 +0200

vcl: same confusing condition here

Change-Id: I970bd11ac0e818290cf6c3c24314f19ae0322dd0

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 657388c..a3ec5e9 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -120,7 +120,7 @@ $(eval $(call gb_Library_use_externals,vcl,\
lcms2 \
mdds_headers \
 ))
-ifeq ($(ENABLE_OPENGL)$(if $(filter ANDROID,$(OS)),TRUE),TRUE)
+ifneq ($(ENABLE_OPENGL)$(if $(filter ANDROID,$(OS)),TRUE),)
 $(eval $(call gb_Library_use_externals,vcl,\
  glew \
  ))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: RepositoryExternal.mk

2016-03-30 Thread Michael Stahl
 RepositoryExternal.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1fe53fe514dac2445197a663025ccb35ddd6b794
Author: Michael Stahl 
Date:   Wed Mar 30 12:24:02 2016 +0200

RepositoryExternal: fix confusing condition

This looks like it does XOR but vmiklos says it should do OR.

Change-Id: I11cee255fb243d0cd763e97d13da1e31a8e598e9

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index af22fe2..3582790 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -183,7 +183,7 @@ endef
 
 endif # SYSTEM_CPPUNIT
 
-ifeq ($(ENABLE_OPENGL)$(if $(filter ANDROID,$(OS)),TRUE),TRUE)
+ifneq ($(ENABLE_OPENGL)$(if $(filter ANDROID,$(OS)),TRUE),)
 ifneq ($(SYSTEM_GLEW),)
 
 define gb_LinkTarget__use_glew
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-30 Thread Miklos Vajna
 sw/source/core/text/xmldump.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 911261a3a581b9f2f4262f1d5403d9be3bbecf63
Author: Miklos Vajna 
Date:   Wed Mar 30 11:27:26 2016 +0200

sw layout dump: show name of shapes

Change-Id: Iefd4a8e5a61c26a474886c968ebf7e85bcec0396

diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index ede5dc0..9f8a069 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class XmlPortionDumper:public SwPortionHandler
 {
@@ -418,6 +419,9 @@ void SwAnchoredObject::dumpAsXml( xmlTextWriterPtr writer ) 
const
 xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "height" ), "%ld", 
GetObjBoundRect().Height() );
 xmlTextWriterEndElement( writer );
 
+if (const SdrObject* pObject = GetDrawObj())
+pObject->dumpAsXml(writer);
+
 xmlTextWriterEndElement( writer );
 
 if ( bCreateWriter )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 5 commits - framework/source include/sfx2 include/vcl officecfg/registry sfx2/Library_sfx.mk sfx2/sdi sfx2/source sw/sdi sw/source sw/uiconfig sw/UIConfig_swriter.mk vc

2016-03-30 Thread Jan Holesovsky
 framework/source/layoutmanager/layoutmanager.cxx |5 
 include/sfx2/notebookbar/SfxNotebookBar.hxx  |   35 
 include/sfx2/sfxsids.hrc |1 
 include/vcl/notebookbar.hxx  |   32 
 include/vcl/syswin.hxx   |8 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |5 
 sfx2/Library_sfx.mk  |1 
 sfx2/sdi/sfx.sdi |   18 
 sfx2/source/notebookbar/SfxNotebookBar.cxx   |   46 
 sw/UIConfig_swriter.mk   |1 
 sw/sdi/docsh.sdi |5 
 sw/source/uibase/app/docsh.cxx   |7 
 sw/source/uibase/app/docsh2.cxx  |7 
 sw/source/uibase/app/swmodule.cxx|1 
 sw/source/uibase/uiview/view0.cxx|1 
 sw/uiconfig/swriter/ui/notebookbar.ui|  759 
++
 vcl/Library_vcl.mk   |2 
 vcl/UIConfig_vcl.mk  |1 
 vcl/inc/brdwin.hxx   |7 
 vcl/source/control/notebookbar.cxx   |   79 +
 vcl/source/window/brdwin.cxx |   19 
 vcl/source/window/notebookbarwindow.cxx  |   69 
 vcl/source/window/notebookbarwindow.hxx  |   32 
 vcl/source/window/syswin.cxx |   15 
 vcl/uiconfig/ui/notebookbar.ui   |  621 

 25 files changed, 1027 insertions(+), 750 deletions(-)

New commits:
commit 3abd3e5bef7a6157a70423af1a8c027de917b408
Author: Jan Holesovsky 
Date:   Wed Mar 30 10:57:45 2016 +0200

notebookbar: More advanced example of the notebookbar.

Change-Id: I8c56777b8d200f38cd369944d9e9a67f4d41d393

diff --git a/sw/uiconfig/swriter/ui/notebookbar.ui 
b/sw/uiconfig/swriter/ui/notebookbar.ui
index 51d305a..01b29fb 100644
--- a/sw/uiconfig/swriter/ui/notebookbar.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar.ui
@@ -185,56 +185,57 @@
 False
 vertical
 
-  
+  
 True
 False
+6
 
-  
+  
 True
 False
+
+  
+True
+False
+True
+.uno:CharFontName
+  
+  
+True
+True
+  
+
   
   
-False
+True
 True
 0
   
 
 
-  
-
-
-  
-True
-True
-True
-.uno:Shrink
-  
-  
-False
-True
-2
-  
-
-
-  
+  
 True
-True
-True
-.uno:Grow
-0.6002384185791
+False
+
+  
+True
+False
+True
+.uno:FontHeight
+  
+  
+True
+True
+  
+
   
   
 False
 True
-3
+end
+1
  

Re: Implementing SVG attribute "stroke-miterlimit" ( tdf#48066)

2016-03-30 Thread Regina Henschel

Hi Armin, hi Thorsten,

thank you. It is clear now, where to start (when I have enough spare time).

Kind regards
Regina

Armin Le Grand schrieb:

Hi Regina,

Am 24.03.2016 um 16:35 schrieb Regina Henschel:

Hi Armin,

I need an advice/opinion _where_ to hold the information:


Definitely in drawinglayer::attribute::LineAttribute, same place where
basegfx::B2DLineJoin is held. A double, defaulted to 15.0 and read
access will be fine. For setting it, add a 5th parameter to the
constructor, defaulted to 15.0. The LineAttribute is a read-only, not
later changeable class to keep things simple. It is better/safer to
create another one when a value needs to be changed than starting to
keep track of changes and add notification or other stuff.

HTH!

Regards,
Armin


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


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

2016-03-30 Thread Xisco Fauli
 svgio/source/svgreader/svgstyleattributes.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 2c29716d349353997bf7cdde63cd9f867c5baeb6
Author: Xisco Fauli 
Date:   Wed Mar 30 01:52:32 2016 +0200

tdf#97657: SVGIO: Don't iterate over parent's clip-paths...

... when it's a clip-path content

Change-Id: I222b429a61409d9670b9d60357895542a15afc15
Reviewed-on: https://gerrit.libreoffice.org/23624
Tested-by: Jenkins 
Reviewed-by: Xisco Faulí 

diff --git a/svgio/source/svgreader/svgstyleattributes.cxx 
b/svgio/source/svgreader/svgstyleattributes.cxx
index e04999d..36b4e30 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -2639,6 +2639,11 @@ namespace svgio
 
 OUString SvgStyleAttributes::getClipPathXLink() const
 {
+if(mbIsClipPathContent)
+{
+return maClipPathXLink;
+}
+
 if(!maClipPathXLink.isEmpty())
 {
 return maClipPathXLink;
@@ -2662,7 +2667,7 @@ namespace svgio
 
 if(!aClipPath.isEmpty())
 {
-const_cast< SvgStyleAttributes* >(this)->mpClipPathXLink = 
dynamic_cast< const SvgClipPathNode* 
>(mrOwner.getDocument().findSvgNodeById(getClipPathXLink()));
+const_cast< SvgStyleAttributes* >(this)->mpClipPathXLink = 
dynamic_cast< const SvgClipPathNode* 
>(mrOwner.getDocument().findSvgNodeById(aClipPath));
 }
 }
 
@@ -2694,7 +2699,7 @@ namespace svgio
 
 if(!aMask.isEmpty())
 {
-const_cast< SvgStyleAttributes* >(this)->mpMaskXLink = 
dynamic_cast< const SvgMaskNode* 
>(mrOwner.getDocument().findSvgNodeById(getMaskXLink()));
+const_cast< SvgStyleAttributes* >(this)->mpMaskXLink = 
dynamic_cast< const SvgMaskNode* 
>(mrOwner.getDocument().findSvgNodeById(aMask));
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: LibreOfficeKit and the UserInstallation

2016-03-30 Thread Stephan Bergmann

On 03/23/2016 03:30 PM, Stephan Bergmann wrote:

The next line of defence happens to be that LOK apparently bootstraps
enough of the LO code to make the OfficeIPCThread code come into play,
cf.

"Use OfficeIPCThread::WaitForReady rather than sleeping" etc.


Turns out I wasn't quite right there.  Upon closer inspection, 
OfficeIPCThread's defence against multiple processes operating on the 
same UserInstallation had explicitly been disabled for LOK with 
 
"Don't use any IPC pipe when in console-only mode or in a LOKit-based 
program" et al.


That is, at least the use case of the lokdocview widget in 
gnome-documents has always been broken and needs a fix.

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


Re: New Defects reported by Coverity Scan for LibreOffice

2016-03-30 Thread Armin Le Grand

Done

Am 29.03.2016 um 09:30 schrieb Stephan Bergmann:
Armin, can you take a look at the below two issues?  Code came in with 
your 
 
"tdf#98646 Fixed freeze by flattening loops".


On 03/24/2016 08:08 PM, scan-ad...@coverity.com wrote:

** CID 1357165:(DIVIDE_BY_ZERO)
/sd/source/ui/view/drviewsh.cxx: 178 in 
sd::DrawViewShell::MakeVisible(const Rectangle &, vcl::Window &)()
/sd/source/ui/view/drviewsh.cxx: 186 in 
sd::DrawViewShell::MakeVisible(const Rectangle &, vcl::Window &)()
/sd/source/ui/view/drviewsh.cxx: 178 in 
sd::DrawViewShell::MakeVisible(const Rectangle &, vcl::Window &)()
/sd/source/ui/view/drviewsh.cxx: 186 in 
sd::DrawViewShell::MakeVisible(const Rectangle &, vcl::Window &)()



 


*** CID 1357165:(DIVIDE_BY_ZERO)
/sd/source/ui/view/drviewsh.cxx: 178 in 
sd::DrawViewShell::MakeVisible(const Rectangle &, vcl::Window &)()

172 else
173 {
174 const long distBottom(rRect.Bottom() - 
aNewPos.Y() + aVisAreaSize.Height());

175
176 if(distBottom > 0)
177 {

 CID 1357165: (DIVIDE_BY_ZERO)
 In expression "distBottom / nFreeSpaceY", division by 
expression "nFreeSpaceY" which may be zero has undefined behavior.

178 long mult = (distBottom / nFreeSpaceY) + 1;
179 aNewPos.Y() += mult * nFreeSpaceY;
180 }
181
182 const long distTop(aNewPos.Y() - rRect.Top());
183
/sd/source/ui/view/drviewsh.cxx: 186 in 
sd::DrawViewShell::MakeVisible(const Rectangle &, vcl::Window &)()

180 }
181
182 const long distTop(aNewPos.Y() - rRect.Top());
183
184 if(distTop > 0)
185 {

 CID 1357165: (DIVIDE_BY_ZERO)
 In expression "distTop / nFreeSpaceY", division by expression 
"nFreeSpaceY" which may be zero has undefined behavior.

186 long mult = (distTop / nFreeSpaceY) + 1;
187 aNewPos.Y() -= mult * nFreeSpaceY;
188 }
189 }
190 }
191
/sd/source/ui/view/drviewsh.cxx: 178 in 
sd::DrawViewShell::MakeVisible(const Rectangle &, vcl::Window &)()

172 else
173 {
174 const long distBottom(rRect.Bottom() - 
aNewPos.Y() + aVisAreaSize.Height());

175
176 if(distBottom > 0)
177 {

 CID 1357165: (DIVIDE_BY_ZERO)
 In expression "distBottom / nFreeSpaceY", division by 
expression "nFreeSpaceY" which may be zero has undefined behavior.

178 long mult = (distBottom / nFreeSpaceY) + 1;
179 aNewPos.Y() += mult * nFreeSpaceY;
180 }
181
182 const long distTop(aNewPos.Y() - rRect.Top());
183
/sd/source/ui/view/drviewsh.cxx: 186 in 
sd::DrawViewShell::MakeVisible(const Rectangle &, vcl::Window &)()

180 }
181
182 const long distTop(aNewPos.Y() - rRect.Top());
183
184 if(distTop > 0)
185 {

 CID 1357165: (DIVIDE_BY_ZERO)
 In expression "distTop / nFreeSpaceY", division by expression 
"nFreeSpaceY" which may be zero has undefined behavior.

186 long mult = (distTop / nFreeSpaceY) + 1;
187 aNewPos.Y() -= mult * nFreeSpaceY;
188 }
189 }
190 }
191

** CID 1357164:(DIVIDE_BY_ZERO)
/sd/source/ui/view/drviewsh.cxx: 141 in 
sd::DrawViewShell::MakeVisible(const Rectangle &, vcl::Window &)()
/sd/source/ui/view/drviewsh.cxx: 133 in 
sd::DrawViewShell::MakeVisible(const Rectangle &, vcl::Window &)()
/sd/source/ui/view/drviewsh.cxx: 141 in 
sd::DrawViewShell::MakeVisible(const Rectangle &, vcl::Window &)()
/sd/source/ui/view/drviewsh.cxx: 133 in 
sd::DrawViewShell::MakeVisible(const Rectangle &, vcl::Window &)()



 


*** CID 1357164:(DIVIDE_BY_ZERO)
/sd/source/ui/view/drviewsh.cxx: 141 in 
sd::DrawViewShell::MakeVisible(const Rectangle &, vcl::Window &)()

135 }
136
137 const long distLeft(aNewPos.X() - rRect.Left());
138
139 if(distLeft > 0)
140 {

 CID 1357164: (DIVIDE_BY_ZERO)
 In expression "distLeft / nFreeSpaceX", division by 
expression "nFreeSpaceX" which may be zero has undefined behavior.

141 long mult = (distLeft / nFreeSpaceX) + 1;
142 aNewPos.X() -= mult * nFreeSpaceX;
143 }
144 }
145 }
146
/sd/source/

Re: Implementing SVG attribute "stroke-miterlimit" ( tdf#48066)

2016-03-30 Thread Armin Le Grand

Hi Regina,

Am 24.03.2016 um 16:35 schrieb Regina Henschel:

Hi Armin,

I need an advice/opinion _where_ to hold the information:


Definitely in drawinglayer::attribute::LineAttribute, same place where 
basegfx::B2DLineJoin is held. A double, defaulted to 15.0 and read 
access will be fine. For setting it, add a 5th parameter to the 
constructor, defaulted to 15.0. The LineAttribute is a read-only, not 
later changeable class to keep things simple. It is better/safer to 
create another one when a value needs to be changed than starting to 
keep track of changes and add notification or other stuff.


HTH!

Regards,
Armin



I cannot calculate whether to exchange 'miter' with 'bevel' directly 
in svgreader, because there only properties for the whole path are 
handled, but such exchange only happens for a single line pair of the 
path. So I think, the exchange needs to be in createAreaGeometry part 
//check and create linejoin. Is that right?


createAreaGeometry gets all needed information already in distinct 
parameters. The division in single parameters is done inside 
PolygonStrokePrimitive2D::create2DDecomposition part // create fat 
line data. There I need access to 'miterlimit'. How should I hold this 
information? Should I extend LineAttribute, or somethink else?


Kind regards
Regina

Armin Le Grand schrieb:

Hi Regina,

AFAIK it is partially used, but not completely. I know of some cases in
renderers where today a fixed default of 15.0 is used. Various
GraphicSystems use various definitions for it, take care. It would be
necessary to define a definition for it for LO, import where available
and use where available. Some sub-systems can use it, e.g. Gdiplus or
cairo, export to SVG, but no tMetafile (at least not ours). There is
definitely no UI for it.

HTH!
Regards,
Armin

Am 24.03.2016 um 01:39 schrieb Regina Henschel:

Hi all,

the following is, what I have found so far, but it might have errors.
So please correct me.

If two lines build a corner, the corner-style can be None, Rounded,
Beveled or Mitered. That is the property "draw:stroke-linejoin" in ODF
and "stroke-linejoin" in SVG. But SVG has the additional property
"stroke-miterlimit". Using it, the author can determine how sharp the
corner can be before it is turned into kind Beveled. I see no such
property in ODF. LibreOffice turns automatically to kind Bevel using
the default value of svg:stroke-miterlimit.

The API has the struct "StrokeAttributes" in css::rendering. It has
the element "MiterLimit". I do not know any UI for it and don't know,
if and how it is usable at all. The service "LineProperties" in
css::drawing does not provide such property.

In OOXML it is the attribute "lim" in element a:miter (20.1.8.43).


This svg-attribute is read on SVG import. And it could be evaluated by
the method basegfx::tools::createAreaGeometry(), if it got a value
into the already prepared parameter. But between these two ends there
is currently no way to transport the information. The line properties
Width, Color, LineCap and LineJoin are transported via class
"LineAttribute".

So my question is, how to transport the "Miterlimit"-information?
Add a member to class LineAttribute?
Add a member to PolygonStrokePrimitive2D and an additional new
parameter into the chain of calls and constructions?
Only fix svg-import or care for other things too? What would I have to
consider?

Kind regards
Regina




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




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


--
--
ALG (PGP Key: EE1C 4B3F E751 D8BC C485 DEC1 3C59 F953 D81C F4A2)

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


Removed undocumented perftune.ini

2016-03-30 Thread Stephan Bergmann
FYI, 
: 
 "Support was removed for the undocumented perftune.ini flags 
FastPipeCommunication (core commit 
f8f87780f5f7be5ff185b0b8b3206d760d9dfed6) and 
QuickstartPreloadConfiguration (core commit 
d3084fb2442b9584b46fba743158c3fe46defa81)."


I assume nobody using LibreOffice was relying on those undocumented 
features that were added to OpenOffice.org/StarOffice back in the day.

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


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

2016-03-30 Thread Miklos Vajna
 loolwsd/IoUtil.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f30e22d0a39282af853fa9d094d8f74eac7861a4
Author: Miklos Vajna 
Date:   Wed Mar 30 09:39:48 2016 +0200

loolwsd: fix -Werror,-Wshadow

diff --git a/loolwsd/IoUtil.cpp b/loolwsd/IoUtil.cpp
index 96574c3..02ecb09 100644
--- a/loolwsd/IoUtil.cpp
+++ b/loolwsd/IoUtil.cpp
@@ -323,7 +323,7 @@ int PipeReader::readLine(std::string& line,
 return -1;
 }
 
-const char *endOfLine = static_cast(std::memchr(buffer, '\n', bytes));
+endOfLine = static_cast(std::memchr(buffer, '\n', 
bytes));
 if (endOfLine != nullptr)
 {
 // Got end of line.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-30 Thread Stephan Bergmann
 desktop/source/app/officeipcthread.cxx |   37 ---
 desktop/win32/source/officeloader/officeloader.cxx |  196 -
 2 files changed, 1 insertion(+), 232 deletions(-)

New commits:
commit f8f87780f5f7be5ff185b0b8b3206d760d9dfed6
Author: Stephan Bergmann 
Date:   Tue Mar 29 17:51:44 2016 +0200

Remove undocumented perftune.ini FastPipeCommunication

...originally added to OOo in 2005 with 
9277dc7501f70d80ea1302c128c2786c01b69706
and e3eecbfeb639529f3a15c0acfe4697a619d454fb "INTEGRATION: CWS cov2src: 
#126234#
Join MWS COV680 m4 into SRC680".

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

diff --git a/desktop/source/app/officeipcthread.cxx 
b/desktop/source/app/officeipcthread.cxx
index 30b86df..efb23a5 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -37,7 +37,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -483,41 +482,7 @@ RequestHandler::Status RequestHandler::Enable(bool ipc)
 // First we try to create our pipe if this fails we try to connect. We 
have to do this
 // in a loop because the other office can crash or shutdown between 
createPipe
 // and connectPipe!!
-
-OUStringaIniName;
-
-osl_getExecutableFile( &aIniName.pData );
-
-sal_uInt32 lastIndex = aIniName.lastIndexOf('/');
-if ( lastIndex > 0 )
-{
-aIniName= aIniName.copy( 0, lastIndex+1 );
-aIniName+= "perftune";
-#if defined(_WIN32)
-aIniName+= ".ini";
-#else
-aIniName+= "rc";
-#endif
-}
-
-::rtl::Bootstrap aPerfTuneIniFile( aIniName );
-
-OUString aDefault( "0" );
-OUString aPreloadData;
-
-aPerfTuneIniFile.getFrom( "FastPipeCommunication", aPreloadData, aDefault 
);
-
-OUString aUserInstallPathHashCode;
-
-if ( aPreloadData == "1" )
-{
-sal_CharszBuffer[32];
-sprintf( szBuffer, "%d", LIBO_VERSION_MAJOR * 1 + 
LIBO_VERSION_MINOR * 100 + LIBO_VERSION_MICRO * 1 );
-aUserInstallPathHashCode = OUString( szBuffer, strlen(szBuffer), 
osl_getThreadTextEncoding() );
-}
-else
-aUserInstallPathHashCode = CreateMD5FromString( aDummy );
-
+auto aUserInstallPathHashCode = CreateMD5FromString( aDummy );
 
 // Check result to create a hash code from the user install path
 if ( aUserInstallPathHashCode.isEmpty() )
diff --git a/desktop/win32/source/officeloader/officeloader.cxx 
b/desktop/win32/source/officeloader/officeloader.cxx
index 504c000..68c2e55 100644
--- a/desktop/win32/source/officeloader/officeloader.cxx
+++ b/desktop/win32/source/officeloader/officeloader.cxx
@@ -28,14 +28,12 @@
 #pragma warning(push, 1)
 #endif
 #include 
-#include 
 #if defined _MSC_VER
 #pragma warning(pop)
 #endif
 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -48,75 +46,6 @@
 
 #include 
 
-#define PIPE_PREFIX TEXT(".\\pipe\\OSL_PIPE_")
-#define PIPE_POSTFIXTEXT("_SingleOfficeIPC_")
-#define PIPE_TERMINATION_SEQUENCE   "InternalIPC::ProcessingDone"
-
-BOOL WINAPI ConvertSidToStringSid( PSID pSid, LPTSTR* StringSid )
-{
-PSID_IDENTIFIER_AUTHORITY psia;
-DWORD dwSubAuthorities;
-DWORD dwSidRev=SID_REVISION;
-DWORD dwCounter;
-DWORD dwSidSize;
-
-// Validate the binary SID.
-
-if(!IsValidSid(pSid)) return FALSE;
-
-// Get the identifier authority value from the SID.
-
-psia = GetSidIdentifierAuthority(pSid);
-
-// Get the number of subauthorities in the SID.
-
-dwSubAuthorities = *GetSidSubAuthorityCount(pSid);
-
-// Compute the buffer length.
-// S-SID_REVISION- + IdentifierAuthority- + subauthorities- + NULL
-
-dwSidSize=(15 + 12 + (12 * dwSubAuthorities) + 1) * sizeof(TCHAR);
-
-*StringSid = (LPTSTR)LocalAlloc( LMEM_FIXED, dwSidSize );
-
-// Add 'S' prefix and revision number to the string.
-
-dwSidSize=wsprintf(*StringSid, TEXT("S-%lu-"), dwSidRev );
-
-// Add a SID identifier authority to the string.
-
-if ( (psia->Value[0] != 0) || (psia->Value[1] != 0) )
-{
-dwSidSize+=wsprintf(*StringSid + lstrlen(*StringSid),
-TEXT("0x%02hx%02hx%02hx%02hx%02hx%02hx"),
-(USHORT)psia->Value[0],
-(USHORT)psia->Value[1],
-(USHORT)psia->Value[2],
-(USHORT)psia->Value[3],
-(USHORT)psia->Value[4],
-(USHORT)psia->Value[5]);
-}
-else
-{
-dwSidSize+=wsprintf(*StringSid + lstrlen(*StringSid),
-TEXT("%lu"),
-(ULONG)(psia->Value[5]  )   +
-(ULONG)(psia->Value[4] <<  8)   +
-(ULONG)(psia->Value[3] << 16)   +
-(ULONG)(psia->Value[2] << 24)   );
-}
-
-/

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

2016-03-30 Thread Miklos Vajna
 RepositoryExternal.mk  |2 +-
 desktop/source/app/officeipcthread.cxx |4 ++--
 include/vcl/outdev.hxx |2 +-
 vcl/Library_vcl.mk |2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 2428e1164b5f38da9fc2f24c5bb478e548f54a6f
Author: Miklos Vajna 
Date:   Wed Mar 30 09:08:15 2016 +0200

Fix Android build

Change-Id: I7247f19b03302b2270e0f6f32c6e6b6e760fd7bd

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 8df085b..af22fe2 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -183,7 +183,7 @@ endef
 
 endif # SYSTEM_CPPUNIT
 
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_OPENGL)$(if $(filter ANDROID,$(OS)),TRUE),TRUE)
 ifneq ($(SYSTEM_GLEW),)
 
 define gb_LinkTarget__use_glew
diff --git a/desktop/source/app/officeipcthread.cxx 
b/desktop/source/app/officeipcthread.cxx
index 6166138..30b86df 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -53,7 +53,7 @@ using namespace ::com::sun::star::frame;
 
 namespace {
 
-#if HAVE_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP || defined(ANDROID)
 
 static char const ARGUMENT_PREFIX[] = "InternalIPC::Arguments";
 static char const SEND_ARGUMENTS[] = "InternalIPC::SendArguments";
@@ -100,7 +100,7 @@ namespace desktop
 
 namespace {
 
-#if HAVE_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP || defined(ANDROID)
 
 class Parser: public CommandLineArgs::Supplier {
 public:
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 1fb4f9b..9ad1a09 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -613,7 +613,7 @@ public:
  * the underlying SalGraphics and it's implementation
  * changing.
  */
-#if HAVE_FEATURE_OPENGL
+#if HAVE_FEATURE_OPENGL || defined(ANDROID)
 class PaintScope {
 void *pHandle;
 public:
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 0592dd5..1d4cf37 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -120,7 +120,7 @@ $(eval $(call gb_Library_use_externals,vcl,\
lcms2 \
mdds_headers \
 ))
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_OPENGL)$(if $(filter ANDROID,$(OS)),TRUE),TRUE)
 $(eval $(call gb_Library_use_externals,vcl,\
  glew \
  ))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-30 Thread Miklos Vajna
 sw/qa/extras/rtfexport/data/pgnlcltr.rtf   |   23 +++
 sw/qa/extras/rtfexport/data/tdf65642.rtf   |   23 +++
 sw/qa/extras/rtfexport/rtfexport.cxx   |   14 ++
 sw/qa/extras/rtfimport/data/tdf65642.rtf   |   23 ---
 sw/qa/extras/rtfimport/rtfimport.cxx   |8 
 writerfilter/source/dmapper/DomainMapper.cxx   |4 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |7 ++-
 7 files changed, 70 insertions(+), 32 deletions(-)

New commits:
commit 43a17602fb894c10931581b20deec4a47889f310
Author: Miklos Vajna 
Date:   Wed Mar 30 09:05:04 2016 +0200

Related: tdf#65642 RTF filter: import \pgnlcltr

This as a side effect also implements support for DOCX .

Change-Id: I47b60a0390ef081dc15b26e40393e35bf7bad130

diff --git a/sw/qa/extras/rtfexport/data/pgnlcltr.rtf 
b/sw/qa/extras/rtfexport/data/pgnlcltr.rtf
new file mode 100644
index 000..6bc3035
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/pgnlcltr.rtf
@@ -0,0 +1,23 @@
+{\rtf1
+\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
+{\field\fldedit
+{\*\fldinst
+{ PAGE   \\* MERGEFORMAT }
+}
+{\fldrslt
+{1}
+}
+}
+\sect
+\sectd\pgnrestart\pgnlcltr
+{\field\fldedit
+{\*\fldinst
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid525329  PAGE   \\* MERGEFORMAT }
+}
+{\fldrslt
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid9597790 
A}
+}
+}
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid13321744
+\par }
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx 
b/sw/qa/extras/rtfexport/rtfexport.cxx
index 8a544ce..da0712a 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -1007,6 +1007,12 @@ DECLARE_RTFEXPORT_TEST(testTdf65642, "tdf65642.rtf")
 CPPUNIT_ASSERT_EQUAL(static_cast(1), 
getProperty(getParagraph(2), "PageNumberOffset"));
 }
 
+DECLARE_RTFEXPORT_TEST(testPgnlcltr, "pgnlcltr.rtf")
+{
+// The second page's numbering type: this was style::NumberingType::ARABIC.
+CPPUNIT_ASSERT_EQUAL(style::NumberingType::CHARS_LOWER_LETTER_N, 
getProperty(getStyles("PageStyles")->getByName("Converted1"), 
"NumberingType"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 137f5b8..9863c59 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -993,6 +993,10 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
 // A, B, ...
 
pSectionContext->SetPageNumberType(style::NumberingType::CHARS_UPPER_LETTER_N);
 break;
+case NS_ooxml::LN_Value_ST_NumberFormat_lowerLetter:
+// a, b, ...
+
pSectionContext->SetPageNumberType(style::NumberingType::CHARS_LOWER_LETTER_N);
+break;
 }
 }
 break;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 46fbdf4..d0631c5 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3280,7 +3280,6 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword 
nKeyword)
 case RTF_PGNDEC:
 case RTF_PGNUCRM:
 case RTF_PGNLCRM:
-case RTF_PGNLCLTR:
 case RTF_PGNBIDIA:
 case RTF_PGNBIDIB:
 // These should be mapped to NS_ooxml::LN_EG_SectPrContents_pgNumType, 
but dmapper has no API for that at the moment.
@@ -3604,6 +3603,12 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword 
nKeyword)
 lcl_putNestedAttribute(m_aStates.top().aSectionSprms, 
NS_ooxml::LN_EG_SectPrContents_pgNumType, NS_ooxml::LN_CT_PageNumber_fmt, 
pIntValue);
 }
 break;
+case RTF_PGNLCLTR:
+{
+auto pIntValue = 
std::make_shared(NS_ooxml::LN_Value_ST_NumberFormat_lowerLetter);
+lcl_putNestedAttribute(m_aStates.top().aSectionSprms, 
NS_ooxml::LN_EG_SectPrContents_pgNumType, NS_ooxml::LN_CT_PageNumber_fmt, 
pIntValue);
+}
+break;
 default:
 {
 SAL_INFO("writerfilter", "TODO handle flag '" << 
lcl_RtfToString(nKeyword) << "'");
commit 1250ad9561e8f7d3227bb97b9e1f7b2968b5c900
Author: Miklos Vajna 
Date:   Wed Mar 30 09:04:57 2016 +0200

Related: tdf#65642 RTF export: \pgnucltr testcase

There is no reason this unit test is import-only, this area of the
export filter was untested so far.

Change-Id: Ia271bccf59c1b21474e7b854cbaa0992b722e552

diff --git a/sw/qa/extras/rtfimport/data/tdf65642.rtf 
b/sw/qa/extras/rtfexport/data/tdf65642.rtf
similarity index 100%
rename from sw/qa/extras/rtfimport/data/tdf65642.rtf
rename to sw/qa/extras/rtfexport/data/tdf65642.rtf
diff --git