[Libreoffice-commits] core.git: qadevOOo/objdsc sc/qa solenv/clang-format

2019-09-13 Thread Jens Carl (via logerrit)
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAnnotationShapeObj.csv |4 
 sc/qa/extras/scannotationshapeobj.cxx|   88 
++
 solenv/clang-format/blacklist|1 
 3 files changed, 54 insertions(+), 39 deletions(-)

New commits:
commit 0d0e8533afe565564835e6d51500e64066fd565b
Author: Jens Carl 
AuthorDate: Fri Sep 13 22:19:32 2019 -0700
Commit: Jens Carl 
CommitDate: Sat Sep 14 08:17:59 2019 +0200

tdf#45904 Move XShape Java tests to C++

Move XShape Java tests to C++ for ScAnnotationShapeObj.

Change-Id: I26658ea7b0b26f68659024100c4d3c40e383899e
Reviewed-on: https://gerrit.libreoffice.org/78898
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git 
a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAnnotationShapeObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAnnotationShapeObj.csv
index 8709cf403bc5..c65940379cc2 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAnnotationShapeObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAnnotationShapeObj.csv
@@ -221,10 +221,6 @@
 
"ScAnnotationShapeObj";"com::sun::star::beans::XPropertySet";"removePropertyChangeListener()"
 
"ScAnnotationShapeObj";"com::sun::star::beans::XPropertySet";"addVetoableChangeListener()"
 
"ScAnnotationShapeObj";"com::sun::star::beans::XPropertySet";"removeVetoableChangeListener()"
-"ScAnnotationShapeObj";"com::sun::star::drawing::XShape";"getPosition()"
-"ScAnnotationShapeObj";"com::sun::star::drawing::XShape";"setPosition()"
-"ScAnnotationShapeObj";"com::sun::star::drawing::XShape";"getSize()"
-"ScAnnotationShapeObj";"com::sun::star::drawing::XShape";"setSize()"
 "ScAnnotationShapeObj";"com::sun::star::text::XText";"insertTextContent()"
 "ScAnnotationShapeObj";"com::sun::star::text::XText";"removeTextContent()"
 
"ScAnnotationShapeObj";"com::sun::star::style::ParagraphPropertiesAsian#optional";"ParaIsHangingPunctuation"
diff --git a/sc/qa/extras/scannotationshapeobj.cxx 
b/sc/qa/extras/scannotationshapeobj.cxx
index 77fce301ce1f..5cf3fc927464 100644
--- a/sc/qa/extras/scannotationshapeobj.cxx
+++ b/sc/qa/extras/scannotationshapeobj.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
 /*
  * This file is part of the LibreOffice project.
  *
@@ -8,22 +8,35 @@
  */
 
 #include 
-#include 
 #include 
+#include 
+#include 
 
+#include 
+#include 
+#include 
+#include 
 #include 
-#include 
 #include 
-#include 
+#include 
+#include 
 #include 
+#include 
 #include 
+#include 
+#include 
+#include 
 
-using namespace css;
-using namespace css::uno;
+#include 
 
-namespace sc_apitest {
+using namespace css;
 
-class ScAnnotationShapeObj : public CalcUnoApiTest, public apitest::XText, 
public apitest::CaptionShape
+namespace sc_apitest
+{
+class ScAnnotationShapeObj : public CalcUnoApiTest,
+ public apitest::CaptionShape,
+ public apitest::XShape,
+ public apitest::XText
 {
 public:
 ScAnnotationShapeObj();
@@ -35,20 +48,24 @@ public:
 
 CPPUNIT_TEST_SUITE(ScAnnotationShapeObj);
 
-// XText
-CPPUNIT_TEST(testInsertRemoveTextContent);
-
 // CaptionShape
 CPPUNIT_TEST(testCaptionShapeProperties);
 
+// XShape
+CPPUNIT_TEST(testGetSetSize);
+CPPUNIT_TEST(testGetSetPosition);
+
+// XText
+CPPUNIT_TEST(testInsertRemoveTextContent);
+
 CPPUNIT_TEST_SUITE_END();
 
 private:
-uno::Reference mxComponent;
-static uno::Reference mxField;
+uno::Reference m_xComponent;
+static uno::Reference m_xField;
 };
 
-uno::Reference ScAnnotationShapeObj::mxField;
+uno::Reference ScAnnotationShapeObj::m_xField;
 
 ScAnnotationShapeObj::ScAnnotationShapeObj()
 : CalcUnoApiTest("sc/qa/extras/testdocuments")
@@ -58,58 +75,61 @@ ScAnnotationShapeObj::ScAnnotationShapeObj()
 void ScAnnotationShapeObj::setUp()
 {
 CalcUnoApiTest::setUp();
-mxComponent = loadFromDesktop("private:factory/scalc");
+m_xComponent = loadFromDesktop("private:factory/scalc");
 }
 
 void ScAnnotationShapeObj::tearDown()
 {
-mxField.clear();
-closeDocument(mxComponent);
+m_xField.clear();
+closeDocument(m_xComponent);
 
 CalcUnoApiTest::tearDown();
 }
 
 uno::Reference ScAnnotationShapeObj::init()
 {
-uno::Reference xDoc(mxComponent, 
UNO_QUERY_THROW);
+uno::Reference xDoc(m_xComponent, 
uno::UNO_QUERY_THROW);
 
-uno::Reference xIA(xDoc->getSheets(), 
UNO_QUERY_THROW);
-uno::Reference xSheet(xIA->getByIndex(0), 
UNO_QUERY_THROW);
+uno::Reference xIA(xDoc->getSheets(), 
uno::UNO_QUERY_THROW);
+uno::Reference xSheet(xIA->getByIndex(0), 
uno::UNO_QUERY_THROW);
 
 // Use cell A1 for this.
-
 table::CellAddress aNotePos(0, 0, 0);
-Reference xAnnosSupp(xSheet, 
UNO_QUERY_THROW);
-Reference xAn

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

2019-09-13 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkframe.cxx |   87 +-
 1 file changed, 45 insertions(+), 42 deletions(-)

New commits:
commit 5e4d564e27d062a48fd04cb7263b769819dd3a50
Author: Caolán McNamara 
AuthorDate: Fri Sep 13 15:37:33 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat Sep 14 06:52:26 2019 +0200

rework IM underline impl wrt mix of UTF-8/16/32 units

e.g. ctrl+shift+e type boy then space twice in writer. The UTF-32 units
are 0x65 0x1f466 0x1f3fb. The underline should encompass the whole range,
prior to this the trailing Emoji Modifier Fitzpatrick was separated from
the boy base emoji by an incomplete underline

Change-Id: I2e846e8eeedf96f341ed7f50d504883768e9eff0
Reviewed-on: https://gerrit.libreoffice.org/78878
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index e4c4f45a3dd9..624cc6154f97 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3991,34 +3991,59 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( 
GtkIMContext*, gpointer im_
 pThis->m_bPreeditJustChanged = true;
 
 bool bEndPreedit = (!pText || !*pText) && pThis->m_aInputEvent.mpTextAttr 
!= nullptr;
-pThis->m_aInputEvent.maText = pText ? OUString( pText, 
strlen(pText), RTL_TEXTENCODING_UTF8 ) : OUString();
-pThis->m_aInputEvent.mnCursorPos= nCursorPos;
-pThis->m_aInputEvent.mnCursorFlags  = 0;
+gint nUtf8Len = pText ? strlen(pText) : 0;
+pThis->m_aInputEvent.maText = pText ? OUString(pText, 
nUtf8Len, RTL_TEXTENCODING_UTF8) : OUString();
+const OUString& rText = pThis->m_aInputEvent.maText;
 
-pThis->m_aInputFlags = std::vector( std::max( 1, 
static_cast(pThis->m_aInputEvent.maText.getLength()) ), 
ExtTextInputAttr::NONE );
+std::vector aUtf16Offsets;
+for (sal_Int32 nUtf16Offset = 0; nUtf16Offset < rText.getLength(); 
rText.iterateCodePoints(&nUtf16Offset))
+aUtf16Offsets.push_back(nUtf16Offset);
+
+int nUtf32Len = aUtf16Offsets.size();
+aUtf16Offsets.push_back(rText.getLength());
+
+// sanitize the CurPos which is in utf-32
+if (nCursorPos < 0)
+nCursorPos = 0;
+else if (nCursorPos > nUtf32Len)
+nCursorPos = nUtf32Len;
+
+pThis->m_aInputEvent.mnCursorPos = aUtf16Offsets[nCursorPos];
+pThis->m_aInputEvent.mnCursorFlags = 0;
+
+pThis->m_aInputFlags = std::vector( std::max( 1, 
static_cast(rText.getLength()) ), ExtTextInputAttr::NONE );
 
 PangoAttrIterator *iter = pango_attr_list_get_iterator(pAttrs);
 do
 {
 GSList *attr_list = nullptr;
 GSList *tmp_list = nullptr;
-gint start, end;
+gint nUtf8Start, nUtf8End;
 ExtTextInputAttr sal_attr = ExtTextInputAttr::NONE;
 
-pango_attr_iterator_range (iter, &start, &end);
-if (start == G_MAXINT || end == G_MAXINT)
-{
-auto len = pText ? g_utf8_strlen(pText, -1) : 0;
-if (end == G_MAXINT)
-end = len;
-if (start == G_MAXINT)
-start = len;
-}
-if (end == start)
+// docs say... "Get the range of the current segment ... the stored
+// return values are signed, not unsigned like the values in
+// PangoAttribute", which implies that the units are otherwise the same
+// as that of PangoAttribute whose docs state these units are "in
+// bytes"
+// so this is the utf8 range
+pango_attr_iterator_range(iter, &nUtf8Start, &nUtf8End);
+
+// sanitize the utf8 range
+nUtf8Start = std::min(nUtf8Start, nUtf8Len);
+nUtf8End = std::min(nUtf8End, nUtf8Len);
+if (nUtf8Start >= nUtf8End)
 continue;
 
-start = g_utf8_pointer_to_offset (pText, pText + start);
-end = g_utf8_pointer_to_offset (pText, pText + end);
+// get the utf32 range
+sal_Int32 nUtf32Start = g_utf8_pointer_to_offset(pText, pText + 
nUtf8Start);
+sal_Int32 nUtf32End = g_utf8_pointer_to_offset(pText, pText + 
nUtf8End);
+
+// sanitize the utf32 range
+nUtf32Start = std::min(nUtf32Start, nUtf32Len);
+nUtf32End = std::min(nUtf32End, nUtf32Len);
+if (nUtf32Start >= nUtf32End)
+continue;
 
 tmp_list = attr_list = pango_attr_iterator_get_attrs (iter);
 while (tmp_list)
@@ -4047,35 +4072,13 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( 
GtkIMContext*, gpointer im_
 sal_attr |= ExtTextInputAttr::Underline;
 g_slist_free (attr_list);
 
-// rhbz#1648281 make underline work with the UCS-4 positions we're 
given
-if (!pThis->m_aInputEvent.maText.isEmpty())
-{
-sal_Int32 i(0), nLen = pThis->m_aInputEvent.maText.getLength();
-
-sal_Int32 nUTF16Start(0);
-while (i < start

[Libreoffice-commits] core.git: chart2/source dbaccess/source extensions/source include/vcl svtools/source sw/source vcl/source

2019-09-13 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/dialogs/dlg_CreationWizard.cxx |2 
 chart2/source/controller/inc/dlg_CreationWizard.hxx |3 
 dbaccess/source/ui/dlg/dbwiz.cxx|4 
 dbaccess/source/ui/dlg/dbwizsetup.cxx   |   12 -
 dbaccess/source/ui/inc/WCopyTable.hxx   |2 
 dbaccess/source/ui/inc/dbwiz.hxx|3 
 dbaccess/source/ui/inc/dbwizsetup.hxx   |4 
 extensions/source/abpilot/abspilot.cxx  |3 
 extensions/source/abpilot/abspilot.hxx  |3 
 extensions/source/dbpilots/gridwizard.hxx   |2 
 extensions/source/dbpilots/groupboxwiz.hxx  |2 
 extensions/source/dbpilots/listcombowizard.hxx  |3 
 include/vcl/roadmapwizard.hxx   |   41 ++--
 include/vcl/wizardmachine.hxx   |   74 +++
 svtools/source/uno/wizard/wizardshell.cxx   |2 
 svtools/source/uno/wizard/wizardshell.hxx   |8 
 sw/source/uibase/inc/mailmergewizard.hxx|3 
 vcl/source/control/roadmapwizard.cxx|   58 +++---
 vcl/source/control/wizardmachine.cxx|  153 +++-
 19 files changed, 197 insertions(+), 185 deletions(-)

New commits:
commit df809481d4fcee0ac51cf056161ee4953ade44bd
Author: Caolán McNamara 
AuthorDate: Thu Sep 12 16:17:30 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat Sep 14 06:51:30 2019 +0200

inherit from one class

Change-Id: Ia3cb14429a42e445c14cecc20728d59d985f4b5d
Reviewed-on: https://gerrit.libreoffice.org/78837
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx 
b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index 85f263b1c21f..adf1a52cdb70 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -33,6 +33,8 @@
 
 using namespace css;
 
+using vcl::RoadmapWizardTypes::WizardPath;
+
 namespace chart
 {
 #define PATH_FULL   1
diff --git a/chart2/source/controller/inc/dlg_CreationWizard.hxx 
b/chart2/source/controller/inc/dlg_CreationWizard.hxx
index db64d9d1cb9d..ae5067503bef 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard.hxx
@@ -30,6 +30,9 @@
 namespace com { namespace sun { namespace star { namespace chart2 { class 
XChartDocument; } } } }
 namespace com { namespace sun { namespace star { namespace uno { class 
XComponentContext; } } } }
 
+using vcl::WizardTypes::WizardState;
+using vcl::WizardTypes::CommitPageReason;
+
 namespace chart
 {
 
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index 9e6fef02f0e6..af03675abd71 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -105,9 +105,9 @@ IMPL_LINK(ODbTypeWizDialog, OnTypeSelected, OGeneralPage&, 
_rTabPage, void)
 enableButtons(WizardButtonFlags::FINISH,!bURLRequired);
 }
 
-vcl::WizardTypes::WizardState ODbTypeWizDialog::determineNextState( 
WizardState _nCurrentState ) const
+WizardState ODbTypeWizDialog::determineNextState( WizardState _nCurrentState ) 
const
 {
-WizardTypes::WizardState nNextState = WZS_INVALID_STATE;
+WizardState nNextState = WZS_INVALID_STATE;
 switch(_nCurrentState)
 {
 case START_PAGE:
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx 
b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index cc901bd84817..e37edfa475fe 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -99,6 +99,8 @@ using namespace ::com::sun::star::document;
 using namespace ::comphelper;
 using namespace ::cppu;
 
+using vcl::RoadmapWizardTypes::WizardPath;
+
 // ODbTypeWizDialogSetup
 ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(weld::Window* _pParent
,SfxItemSet const * _pItems
@@ -152,7 +154,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(weld::Window* 
_pParent
 for(PathId i = 1;aIter != aEnd;++aIter,++i)
 {
 const OUString& sURLPrefix = aIter.getURLPrefix();
-vcl::RoadmapWizardTypes::WizardPath aPath;
+WizardPath aPath;
 aPath.push_back(PAGE_DBSETUPWIZARD_INTRO);
 m_pCollection->fillPageIds(sURLPrefix,aPath);
 aPath.push_back(PAGE_DBSETUPWIZARD_AUTHENTIFICATION);
@@ -161,7 +163,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(weld::Window* 
_pParent
 declareAuthDepPath(sURLPrefix,i,aPath);
 }
 
-vcl::RoadmapWizardTypes::WizardPath aPath;
+WizardPath aPath;
 aPath.push_back(PAGE_DBSETUPWIZARD_INTRO);
 declarePath( static_cast(m_pCollection->size()+1), aPath);
 
@@ -174,7 +176,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(weld::Window* 
_pParent
 m_xAssistant->set_current_page(0);
 }
 
-void ODbTypeWizDia

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - desktop/Executable_soffice.mk desktop/win32

2019-09-13 Thread Jan-Marek Glogowski (via logerrit)
 desktop/Executable_soffice.mk  |4 +
 desktop/win32/source/officeloader/officeloader.cxx |   51 +
 2 files changed, 55 insertions(+)

New commits:
commit f77b3510eadc1024108789087f0172bd198a5433
Author: Jan-Marek Glogowski 
AuthorDate: Wed Sep 11 14:35:19 2019 +0200
Commit: Thorsten Behrens 
CommitDate: Fri Sep 13 21:28:50 2019 +0200

WIN allow setting a memory limit for soffice.bin

This adds a Win32 section and two keys to the bootstrap.ini, which
can be used to apply a memory limit to the soffice.bin process on
Windows. Per default the limit won't affect any sub-processes,
because the 2nd key adds JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK to
the Jobs' flag list.

To activte the limit, extend the bootstrap.ini like this:

[Win32]
LimitMaximumMemoryInMB=0
ExcludeChildProcessesFromLimit=true

and adapt the values to your needs. Zero disables the limit.

Reviewed-on: https://gerrit.libreoffice.org/78819
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 6df7568e46b7f307ad6ae94730809fe63a6981a6)

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

diff --git a/desktop/Executable_soffice.mk b/desktop/Executable_soffice.mk
index d1847d7bf76a..5c9a081ff22e 100644
--- a/desktop/Executable_soffice.mk
+++ b/desktop/Executable_soffice.mk
@@ -11,6 +11,10 @@ $(eval $(call gb_Executable_Executable,soffice))
 
 $(eval $(call gb_Executable_set_targettype_gui,soffice,YES))
 
+$(eval $(call gb_Executable_use_externals,soffice,\
+boost_headers \
+))
+
 $(eval $(call gb_Executable_use_system_win32_libs,soffice,\
 advapi32 \
 shell32 \
diff --git a/desktop/win32/source/officeloader/officeloader.cxx 
b/desktop/win32/source/officeloader/officeloader.cxx
index cd471ca2a5f9..1108371d02f9 100644
--- a/desktop/win32/source/officeloader/officeloader.cxx
+++ b/desktop/win32/source/officeloader/officeloader.cxx
@@ -23,6 +23,9 @@
 #include 
 #include 
 
+#include 
+#include 
+
 #include "../loader.hxx"
 
 static LPWSTR *GetCommandArgs( int *pArgc )
@@ -65,6 +68,47 @@ int WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int )
 cwdLen = 0;
 }
 
+// read limit values from bootstrap.ini
+unsigned int nMaxMemoryInMB = 0;
+bool bExcludeChildProcesses = true;
+
+const WCHAR* szIniFile = L"\\bootstrap.ini";
+const size_t nDirLen = wcslen(szIniDirectory);
+if (wcslen(szIniFile) + nDirLen < MAX_PATH)
+{
+WCHAR szBootstrapIni[MAX_PATH];
+wcscpy(szBootstrapIni, szIniDirectory);
+wcscpy(&szBootstrapIni[nDirLen], szIniFile);
+
+try
+{
+boost::property_tree::ptree pt;
+std::fstream aFile(szBootstrapIni);
+boost::property_tree::ini_parser::read_ini(aFile, pt);
+nMaxMemoryInMB = pt.get("Win32.LimitMaximumMemoryInMB", 
nMaxMemoryInMB);
+bExcludeChildProcesses = 
pt.get("Win32.ExcludeChildProcessesFromLimit", bExcludeChildProcesses);
+}
+catch (...)
+{
+nMaxMemoryInMB = 0;
+}
+}
+
+// create a Windows JobObject with a memory limit
+HANDLE hJobObject = NULL;
+if (nMaxMemoryInMB > 0)
+{
+JOBOBJECT_EXTENDED_LIMIT_INFORMATION aJobLimit;
+aJobLimit.BasicLimitInformation.LimitFlags = 
JOB_OBJECT_LIMIT_JOB_MEMORY;
+if (bExcludeChildProcesses)
+aJobLimit.BasicLimitInformation.LimitFlags |= 
JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK;
+aJobLimit.JobMemoryLimit = nMaxMemoryInMB * 1024 * 1024;
+hJobObject = CreateJobObjectW(NULL, NULL);
+if (hJobObject != NULL)
+SetInformationJobObject(hJobObject, 
JobObjectExtendedLimitInformation, &aJobLimit,
+
sizeof(JOBOBJECT_EXTENDED_LIMIT_INFORMATION));
+}
+
 do
 {
 if ( bFirst ) {
@@ -157,6 +201,9 @@ int WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int )
 {
 DWORD   dwWaitResult;
 
+if (hJobObject)
+AssignProcessToJobObject(hJobObject, aProcessInfo.hProcess);
+
 do
 {
 // On Windows XP it seems as the desktop calls 
WaitForInputIdle after "OpenWidth" so we have to do so
@@ -180,6 +227,10 @@ int WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int )
 }
 } while ( fSuccess
   && ( EXITHELPER_CRASH_WITH_RESTART == dwExitCode || 
EXITHELPER_NORMAL_RESTART == dwExitCode ));
+
+if (hJobObject)
+CloseHandle(hJobObject);
+
 delete[] lpCommandLine;
 LocalFree(argv);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-09-13 Thread Jan-Marek Glogowski (via logerrit)
 desktop/StaticLibrary_winloader.mk |4 ++
 desktop/win32/source/loader.cxx|   51 +
 2 files changed, 55 insertions(+)

New commits:
commit 6df7568e46b7f307ad6ae94730809fe63a6981a6
Author: Jan-Marek Glogowski 
AuthorDate: Wed Sep 11 14:35:19 2019 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Fri Sep 13 20:11:38 2019 +0200

WIN allow setting a memory limit for soffice.bin

This adds a Win32 section and two keys to the bootstrap.ini, which
can be used to apply a memory limit to the soffice.bin process on
Windows. Per default the limit won't affect any sub-processes,
because the 2nd key adds JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK to
the Jobs' flag list.

To activte the limit, extend the bootstrap.ini like this:

[Win32]
LimitMaximumMemoryInMB=0
ExcludeChildProcessesFromLimit=true

and adapt the values to your needs. Zero disables the limit.

Change-Id: Ic474c6d6cdfe5ff3cfadbe6614030442171df1ae
Reviewed-on: https://gerrit.libreoffice.org/78819
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/desktop/StaticLibrary_winloader.mk 
b/desktop/StaticLibrary_winloader.mk
index ca4fe691eed5..abee2aa3eef9 100644
--- a/desktop/StaticLibrary_winloader.mk
+++ b/desktop/StaticLibrary_winloader.mk
@@ -10,6 +10,10 @@
 
 $(eval $(call gb_StaticLibrary_StaticLibrary,winloader))
 
+$(eval $(call gb_StaticLibrary_use_externals,winloader,\
+boost_headers \
+))
+
 $(eval $(call gb_StaticLibrary_add_exception_objects,winloader,\
 desktop/win32/source/loader \
 ))
diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx
index d86a3b692ba4..8b750f45df6c 100644
--- a/desktop/win32/source/loader.cxx
+++ b/desktop/win32/source/loader.cxx
@@ -26,6 +26,9 @@
 #include 
 #include 
 
+#include 
+#include 
+
 namespace {
 
 void fail()
@@ -160,6 +163,47 @@ int officeloader_impl(bool bAllowConsole)
 }
 std::vector aEscapedArgs;
 
+// read limit values from bootstrap.ini
+unsigned int nMaxMemoryInMB = 0;
+bool bExcludeChildProcesses = true;
+
+const WCHAR* szIniFile = L"\\bootstrap.ini";
+const size_t nDirLen = wcslen(szIniDirectory);
+if (wcslen(szIniFile) + nDirLen < MAX_PATH)
+{
+WCHAR szBootstrapIni[MAX_PATH];
+wcscpy(szBootstrapIni, szIniDirectory);
+wcscpy(&szBootstrapIni[nDirLen], szIniFile);
+
+try
+{
+boost::property_tree::ptree pt;
+std::fstream aFile(szBootstrapIni);
+boost::property_tree::ini_parser::read_ini(aFile, pt);
+nMaxMemoryInMB = pt.get("Win32.LimitMaximumMemoryInMB", 
nMaxMemoryInMB);
+bExcludeChildProcesses = 
pt.get("Win32.ExcludeChildProcessesFromLimit", bExcludeChildProcesses);
+}
+catch (...)
+{
+nMaxMemoryInMB = 0;
+}
+}
+
+// create a Windows JobObject with a memory limit
+HANDLE hJobObject = NULL;
+if (nMaxMemoryInMB > 0)
+{
+JOBOBJECT_EXTENDED_LIMIT_INFORMATION aJobLimit;
+aJobLimit.BasicLimitInformation.LimitFlags = 
JOB_OBJECT_LIMIT_JOB_MEMORY;
+if (bExcludeChildProcesses)
+aJobLimit.BasicLimitInformation.LimitFlags |= 
JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK;
+aJobLimit.JobMemoryLimit = nMaxMemoryInMB * 1024 * 1024;
+hJobObject = CreateJobObjectW(NULL, NULL);
+if (hJobObject != NULL)
+SetInformationJobObject(hJobObject, 
JobObjectExtendedLimitInformation, &aJobLimit,
+
sizeof(JOBOBJECT_EXTENDED_LIMIT_INFORMATION));
+}
+
 do
 {
 if (bFirst)
@@ -247,6 +291,9 @@ int officeloader_impl(bool bAllowConsole)
 {
 DWORD dwWaitResult;
 
+if (hJobObject)
+AssignProcessToJobObject(hJobObject, aProcessInfo.hProcess);
+
 do
 {
 // On Windows XP it seems as the desktop calls 
WaitForInputIdle after "OpenWith" so
@@ -272,6 +319,10 @@ int officeloader_impl(bool bAllowConsole)
 } while (fSuccess
  && (EXITHELPER_CRASH_WITH_RESTART == dwExitCode
  || EXITHELPER_NORMAL_RESTART == dwExitCode));
+
+if (hJobObject)
+CloseHandle(hJobObject);
+
 delete[] lpCommandLine;
 
 return fSuccess ? dwExitCode : -1;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-09-13 Thread Tamás Zolnai (via logerrit)
New branch 'feature/sc_lok_invalidation' available with the following commits:
commit bef85b25b7cf17a27969305426b97c3e7cb7a811
Author: Tamás Zolnai 
Date:   Fri Sep 13 19:35:40 2019 +0200

sc lok tests: Store all invalidation rectangles.

Change-Id: I214a98d1901af0d0c25897ebfbdb644e92714f5c

commit 43a8a9e51f7633feaa83cf4dea9d3b2ad41560de
Author: Tamás Zolnai 
Date:   Fri Sep 13 17:44:36 2019 +0200

sc lok: Test invalidation after sheet change

Change-Id: I799089fc65d92fe72d7e76afbcd44bd4161d25f4

commit 01641a128a47431f65df2a7c23974129b4f7d929
Author: Tamás Zolnai 
Date:   Fri Sep 13 17:19:57 2019 +0200

sc lok: Test also the invalidation rectangle in case of row/column insertion

Change-Id: I5dffc0521ae7ef3ddd47574a85457ddcec2a0566

commit 5bb4f1987ebcfa11da1df96833d3b7c756710ab7
Author: Tamás Zolnai 
Date:   Fri Sep 13 15:59:54 2019 +0200

sc lok: Add unit test about inalidation triggered by PageDown

Change-Id: Id54a679b60e440f17371a3a532928bd161077e90

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

[Libreoffice-commits] core.git: Branch 'feature/msforms' - 0 commits -

2019-09-13 Thread (via logerrit)
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-09-13 Thread Caolán McNamara (via logerrit)
 include/vcl/weld.hxx   |   10 
 sfx2/source/appl/sfxhelp.cxx   |   43 +---
 sfx2/uiconfig/ui/helpmanual.ui |   48 ++---
 3 files changed, 57 insertions(+), 44 deletions(-)

New commits:
commit d37330ce1b356c71b2b3d635ff03f1259bee2fca
Author: Caolán McNamara 
AuthorDate: Fri Sep 13 11:12:28 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 13 17:16:01 2019 +0200

document how to align extra widgets with message dialog labels

Change-Id: I6c64d1b637120cab71de5f521c0c0268f2f80732
Reviewed-on: https://gerrit.libreoffice.org/78870
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 18637cceda7b..d3fd087333df 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1936,6 +1936,16 @@ protected:
 std::unique_ptr m_xOrigParent;
 
 public:
+/* @param rRelocateId - optional argument of the name of a widget in the 
.ui file
+which should be relocated into the content area of 
the dialog.
+
+e.g. a checkbox for a "Never show this again" 
option.
+
+This results in the named widget relocating to the 
same container
+as the messages.  This enables aligning the extra 
widget with the
+message labels in the content area container which 
doesn't
+explicitly exist in the ui description, but is 
only implied.
+*/
 MessageDialogController(weld::Widget* pParent, const OUString& rUIFile,
 const OString& rDialogId, const OString& 
rRelocateId = OString());
 virtual Dialog* getDialog() override;
commit e40e04c83f3c8e962c838d63124e653d7dfede89
Author: Caolán McNamara 
AuthorDate: Fri Sep 13 10:52:25 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 13 17:15:52 2019 +0200

Related: tdf#127195 use MessageDialogController to relocate checkbox

MessageDialogController has an argument which indicates what
widget in a message dialog should be rearranged to be aligned
with the message box messsage area, "hidedialog" in this case

remove the indent amount as the relocate logic takes care of
the intent of that

Change-Id: I92f138e41ec3fd50771d210db8358e9236684157
Reviewed-on: https://gerrit.libreoffice.org/78869
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index d709ed3591f2..e6942da14fd6 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -998,6 +998,25 @@ namespace
 }
 }
 
+class HelpManualMessage : public weld::MessageDialogController
+{
+private:
+std::unique_ptr m_xHideOfflineHelpCB;
+
+public:
+HelpManualMessage(weld::Widget* pParent)
+: MessageDialogController(pParent, "sfx/ui/helpmanual.ui", 
"onlinehelpmanual", "hidedialog")
+, m_xHideOfflineHelpCB(m_xBuilder->weld_check_button("hidedialog"))
+{
+LanguageTag aLangTag = Application::GetSettings().GetUILanguageTag();
+OUString sLocaleString = 
SvtLanguageTable::GetLanguageString(aLangTag.getLanguageType());
+OUString sPrimText = get_primary_text();
+set_primary_text(sPrimText.replaceAll("$UILOCALE", sLocaleString));
+}
+
+bool GetOfflineHelpPopUp() const { return 
!m_xHideOfflineHelpCB->get_active(); }
+};
+
 bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, 
const OUString& rKeyword)
 {
 OUStringBuffer aHelpRootURL("vnd.sun.star.help://");
@@ -1126,16 +1145,10 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const 
vcl::Window* pWindow, const
 {
 weld::Window* pWeldWindow = pWindow ? pWindow->GetFrameWeld() 
: nullptr;
 aBusy.incBusy(pWeldWindow);
-std::unique_ptr 
xBuilder(Application::CreateBuilder(pWeldWindow, "sfx/ui/helpmanual.ui"));
-std::unique_ptr 
xQueryBox(xBuilder->weld_message_dialog("onlinehelpmanual"));
-std::unique_ptr 
m_xHideOfflineHelpCB(xBuilder->weld_check_button("hidedialog"));
-LanguageTag aLangTag = 
Application::GetSettings().GetUILanguageTag();
-OUString sLocaleString = SvtLanguageTable::GetLanguageString( 
aLangTag.getLanguageType() );
-OUString sPrimText = xQueryBox->get_primary_text();
-xQueryBox->set_primary_text(sPrimText.replaceAll("$UILOCALE", 
sLocaleString));
-short OnlineHelpBox = xQueryBox->run();
+HelpManualMessage aQueryBox(pWeldWindow);
+short OnlineHelpBox = aQueryBox.run();
 bShowOfflineHelpPopUp = OnlineHelpBox != RET_OK;
-
aHelpOptions.SetOfflineHelpPopUp(!m_xHideOfflineHelpCB

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

2019-09-13 Thread Caolán McNamara (via logerrit)
 sfx2/uiconfig/ui/helpmanual.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 363e895b016b80589c55e6348d6aab60b4e7f75c
Author: Caolán McNamara 
AuthorDate: Fri Sep 13 08:43:12 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 13 16:28:27 2019 +0200

double >>

Change-Id: I3edbab8b8a9003cce6aa62d32dcefe46b2d94f50
Reviewed-on: https://gerrit.libreoffice.org/78868
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sfx2/uiconfig/ui/helpmanual.ui b/sfx2/uiconfig/ui/helpmanual.ui
index dfa8d8990e7e..6fe76ea115e2 100644
--- a/sfx2/uiconfig/ui/helpmanual.ui
+++ b/sfx2/uiconfig/ui/helpmanual.ui
@@ -22,7 +22,7 @@
 end
 
   
->Do not show this dialog again
+Do not show this dialog again
 True
 True
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - cui/source editeng/source include/editeng include/svx sc/source svx/source

2019-09-13 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/SpellDialog.cxx   |  116 +---
 cui/source/inc/SpellDialog.hxx   |   31 -
 editeng/source/misc/weldeditview.cxx |   62 ++
 include/editeng/weldeditview.hxx |   10 +
 include/svx/ClassificationEditView.hxx   |   46 +--
 sc/source/ui/inc/tphfedit.hxx|   39 +-
 sc/source/ui/pagedlg/tphfedit.cxx|  156 +--
 svx/source/dialog/ClassificationDialog.cxx   |   23 ++-
 svx/source/dialog/ClassificationEditView.cxx |  140 +---
 9 files changed, 125 insertions(+), 498 deletions(-)

New commits:
commit 6d2efae662a57bf49fd4367e603f307b50885620
Author: Caolán McNamara 
AuthorDate: Tue Jun 25 15:21:40 2019 +0100
Commit: Miklos Vajna 
CommitDate: Fri Sep 13 15:10:34 2019 +0200

use common WeldEditView

Reviewed-on: https://gerrit.libreoffice.org/74705
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 2cebba0e4042ca2cab37cf38874c2576c2ac6a6f)

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

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 6d77aebe8d07..74af6f7d2a57 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1120,108 +1120,8 @@ void 
SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
 {
 Size aSize(pDrawingArea->get_approximate_digit_width() * 60,
pDrawingArea->get_text_height() * 6);
-
 pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
-SetOutputSizePixel(aSize);
-
-weld::CustomWidgetController::SetDrawingArea(pDrawingArea);
-
-EnableRTL(false);
-
-const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
-Color aBgColor = rStyleSettings.GetWindowColor();
-
-OutputDevice& rDevice = pDrawingArea->get_ref_device();
-
-rDevice.SetMapMode(MapMode(MapUnit::MapTwip));
-rDevice.SetBackground(aBgColor);
-
-Size aOutputSize(rDevice.PixelToLogic(aSize));
-aSize = aOutputSize;
-aSize.setHeight( aSize.Height() * 4 );
-
-m_xEditEngine.reset(new EditEngine(EditEngine::CreatePool()));
-m_xEditEngine->SetPaperSize( aSize );
-m_xEditEngine->SetRefDevice( &rDevice );
-
-m_xEditEngine->SetControlWord(m_xEditEngine->GetControlWord() | 
EEControlBits::MARKFIELDS);
-
-m_xEdView.reset(new EditView(m_xEditEngine.get(), nullptr));
-m_xEdView->setEditViewCallbacks(this);
-m_xEdView->SetOutputArea(tools::Rectangle(Point(0,0), aOutputSize));
-
-m_xEdView->SetBackgroundColor(aBgColor);
-m_xEditEngine->InsertView(m_xEdView.get());
-
-pDrawingArea->set_cursor(PointerStyle::Text);
-}
-
-void SentenceEditWindow_Impl::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect)
-{
-//note: ClassificationEditView::Paint is similar
-
-rRenderContext.Push(PushFlags::ALL);
-rRenderContext.SetClipRegion();
-
-const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
-Color aBgColor = rStyleSettings.GetWindowColor();
-
-m_xEdView->SetBackgroundColor(aBgColor);
-
-rRenderContext.SetBackground(aBgColor);
-
-tools::Rectangle aLogicRect(rRenderContext.PixelToLogic(rRect));
-m_xEdView->Paint(aLogicRect, &rRenderContext);
-
-if (HasFocus())
-{
-m_xEdView->ShowCursor();
-vcl::Cursor* pCursor = m_xEdView->GetCursor();
-pCursor->DrawToDevice(rRenderContext);
-}
-
-std::vector aLogicRects;
-
-// get logic selection
-m_xEdView->GetSelectionRectangles(aLogicRects);
-
-rRenderContext.SetLineColor();
-rRenderContext.SetFillColor(COL_BLACK);
-rRenderContext.SetRasterOp(RasterOp::Invert);
-
-for (const auto &rSelectionRect : aLogicRects)
-rRenderContext.DrawRect(rSelectionRect);
-
-rRenderContext.Pop();
-}
-
-bool SentenceEditWindow_Impl::MouseMove(const MouseEvent& rMEvt)
-{
-return m_xEdView->MouseMove(rMEvt);
-}
-
-bool SentenceEditWindow_Impl::MouseButtonDown(const MouseEvent& rMEvt)
-{
-if (!HasFocus())
-GrabFocus();
-
-return m_xEdView->MouseButtonDown(rMEvt);
-}
-
-bool SentenceEditWindow_Impl::MouseButtonUp(const MouseEvent& rMEvt)
-{
-return m_xEdView->MouseButtonUp(rMEvt);
-}
-
-void SentenceEditWindow_Impl::Resize()
-{
-OutputDevice& rDevice = GetDrawingArea()->get_ref_device();
-Size aOutputSize(rDevice.PixelToLogic(GetOutputSizePixel()));
-Size aSize(aOutputSize);
-aSize.setHeight( aSize.Height() * 4 );
-m_xEditEngine->SetPaperSize(aSize);
-m_xEdView->SetOutputArea(tools::Rectangle(Point(0,0), aOutputSize));
-weld::CustomWidgetController::Resize();
+WeldEditView::SetDrawingArea(pDrawingArea);
 }
 
 SentenceEditWindow_Impl::~Sent

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

2019-09-13 Thread Heiko Tietze (via logerrit)
 cui/uiconfig/ui/tipofthedaydialog.ui |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 22f3cca81039ac97bee96ba47498fbea1ccc1557
Author: Heiko Tietze 
AuthorDate: Fri Sep 13 10:55:28 2019 +0200
Commit: Heiko Tietze 
CommitDate: Fri Sep 13 14:25:24 2019 +0200

Revert "Resolves tdf#127317 - Make text of tips of the day selectable"

Selectable text makes the GtkLabel unwrap; revert is needed until the 
control works properly

This reverts commit 54a3044ebd7f946235ba1d0a8af11ad94872afb7.

Change-Id: I7b63e0e29a22f3feddac99ac42735a1880a9b1c2
Reviewed-on: https://gerrit.libreoffice.org/78864
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/uiconfig/ui/tipofthedaydialog.ui 
b/cui/uiconfig/ui/tipofthedaydialog.ui
index 8807f7bb6dfe..a24a90107243 100644
--- a/cui/uiconfig/ui/tipofthedaydialog.ui
+++ b/cui/uiconfig/ui/tipofthedaydialog.ui
@@ -140,7 +140,6 @@
 False
 True
 True
-True
 50
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-09-13 Thread Heiko Tietze (via logerrit)
 cui/uiconfig/ui/tipofthedaydialog.ui |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 3d85f485dee1c4e0c3a30f2e088fe34be69e1b06
Author: Heiko Tietze 
AuthorDate: Sun Sep 8 11:29:29 2019 +0200
Commit: Heiko Tietze 
CommitDate: Fri Sep 13 12:07:22 2019 +0200

Resolves tdf#127436 - Display issues of TotD on macOS

Dialog resizing blocked

Change-Id: Ie61880d2d08adabf64a60e97a9bf00c02247f1ce
Reviewed-on: https://gerrit.libreoffice.org/78761
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/uiconfig/ui/tipofthedaydialog.ui 
b/cui/uiconfig/ui/tipofthedaydialog.ui
index ee8ac6cbd17a..8807f7bb6dfe 100644
--- a/cui/uiconfig/ui/tipofthedaydialog.ui
+++ b/cui/uiconfig/ui/tipofthedaydialog.ui
@@ -6,7 +6,9 @@
 False
 6
 Tip of the day
+False
 True
+center-on-parent
 dialog
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: wsd/README

2019-09-13 Thread Andras Timar (via logerrit)
 wsd/README |   26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 8d2dead15b04967da587155b5e50559f9fd33ae0
Author: Andras Timar 
AuthorDate: Fri Sep 13 10:15:48 2019 +0200
Commit: Andras Timar 
CommitDate: Fri Sep 13 11:02:04 2019 +0200

Update documentation of Poco packages + ./autogen.sh

Change-Id: If3177e5defacf2b95390dad452992f814fc88dfa
Reviewed-on: https://gerrit.libreoffice.org/78862
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/wsd/README b/wsd/README
index 6a854c1cd..30d9b3766 100644
--- a/wsd/README
+++ b/wsd/README
@@ -7,33 +7,33 @@ Dependencies
 LibreOffice Online WebSocket server has the following dependencies:
 
 * libpng
-* Poco library: http://pocoproject.org/index.html.
+* Poco library: http://pocoproject.org/
 * libcap-progs
 
-If your Linux distro doesn't provide a Poco package (versions 1.7.x or
-1.8.x should work), you can build it yourself and install in a
-location of your choice.
+If your Linux distro doesn't provide a Poco package (versions 1.7.5 and
+newer should work), you can build it yourself and install in a
+location of your choice, or you can download packages from Collabora's
+website.
 
-On openSUSE, you can use:
+On openSUSE Leap 15.1, you can use:
 
 zypper ar 
http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_Leap_15.1/devel:libraries:c_c++.repo
 zypper in poco-devel libcap-progs
 
-On Debian 8 (Linux x86_64) you can use in /etc/apt/sources.list:
+Similar repos exist for other openSUSE and SLE releases.
 
-deb https://www.collaboraoffice.com/apt-poco/ /
+Collabora provides Poco packages for Debian 8, Debian 9, Ubuntu 16.04 LTS,
+and CentOS 7 via the CODE (Collabora Online Development Edition) repositories.
+
+See: https://www.collaboraoffice.com/code/linux-packages/
 
 Building
 
 
 loolwsd uses autoconf/automake, so especially when building from .git
-(as opposed to from a distribution tarball) you need the usual fun:
+(as opposed to from a distribution tarball) you need to run:
 
-libtoolize
-aclocal
-automake --add-missing
-autoreconf
-autoheader
+./autogen.sh
 
 and then
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: docker/Dockerfile

2019-09-13 Thread Andras Timar (via logerrit)
 docker/Dockerfile |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e268299aa2d75b9b99c060fd3d612b37bc155939
Author: Andras Timar 
AuthorDate: Thu Sep 12 22:12:47 2019 +0200
Commit: Andras Timar 
CommitDate: Fri Sep 13 11:01:45 2019 +0200

Since LibreOfficeOnline.conf has --disable-gui, we don't need these packages

Change-Id: Ic57af67bf50774c3cafdb26737ee4eeac2f54da0
Reviewed-on: https://gerrit.libreoffice.org/78852
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/docker/Dockerfile b/docker/Dockerfile
index 4b352321b..1b9e8a3b6 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -12,7 +12,7 @@ RUN apt-get update && apt-get upgrade -y
 # install LibreOffice run-time dependencies
 # install adduser, findutils, openssl and cpio that we need later
 # install an editor
-RUN apt-get -y install locales-all libpng16-16 libxinerama1 libgl1-mesa-glx 
libfontconfig1 libfreetype6 libxrender1 libxcb-shm0 libxcb-render0 adduser cpio 
findutils nano libpocoxml50 libpocoutil50 libpoconetssl50 libpoconet50 
libpocojson50 libpocofoundation50 libpococrypto50 libcap2-bin openssl 
inotify-tools procps
+RUN apt-get -y install locales-all libpng16-16 fontconfig adduser cpio 
findutils nano libpocoxml50 libpocoutil50 libpoconetssl50 libpoconet50 
libpocojson50 libpocofoundation50 libpococrypto50 libcap2-bin openssl 
inotify-tools procps
 
 # tdf#117557 - Add CJK Fonts to LibreOffice Online Docker Image
 RUN apt-get -y install fonts-wqy-zenhei fonts-wqy-microhei 
fonts-droid-fallback fonts-noto-cjk
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: distro-configs/LibreOfficeOnline.conf

2019-09-13 Thread Andras Timar (via logerrit)
 distro-configs/LibreOfficeOnline.conf |1 +
 1 file changed, 1 insertion(+)

New commits:
commit b59a67b4e3186660155038906ecb6d6fb11df834
Author: Andras Timar 
AuthorDate: Thu Sep 12 21:53:24 2019 +0200
Commit: Andras Timar 
CommitDate: Fri Sep 13 11:00:27 2019 +0200

Disable use of X11 or Wayland to reduce dependencies of Online

Change-Id: Iea7ab7d2aedf33ce7924b2b26f406f69bdffc0eb
Reviewed-on: https://gerrit.libreoffice.org/78848
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/distro-configs/LibreOfficeOnline.conf 
b/distro-configs/LibreOfficeOnline.conf
index 70b7824164f4..75b885a4afb1 100644
--- a/distro-configs/LibreOfficeOnline.conf
+++ b/distro-configs/LibreOfficeOnline.conf
@@ -10,6 +10,7 @@
 --disable-gstreamer-1-0
 --disable-gtk
 --disable-gtk3
+--disable-gui
 --disable-qt5
 --disable-kf5
 --disable-odk
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-09-13 Thread Andras Timar (via logerrit)
 sw/qa/extras/odfimport/odfimport.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 6b84f67c7b48b4ed8703d9d6cbd9650d83c87913
Author: Andras Timar 
AuthorDate: Thu Sep 12 21:22:59 2019 +0200
Commit: Andras Timar 
CommitDate: Fri Sep 13 10:59:04 2019 +0200

Disable test testFdo37606Copy::Import when we don't have UI

The test uses clipboard which works differently when there is
no UI therefore it fails. In Online, when configured with
--disable-gui, the actual operations work, i.e. one can copy
the table from top of the document and paste it at the end
of the document.

Change-Id: I530e01a5d81dc46514fbf34502a31fef4c1e4995
Reviewed-on: https://gerrit.libreoffice.org/78846
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/sw/qa/extras/odfimport/odfimport.cxx 
b/sw/qa/extras/odfimport/odfimport.cxx
index 629a7f194e62..616580f31274 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -583,6 +583,8 @@ DECLARE_ODFIMPORT_TEST(testFdo37606, "fdo37606.odt")
 CPPUNIT_ASSERT(!pContentNode->FindTableNode());
 }
 }
+
+#if HAVE_FEATURE_UI
 DECLARE_ODFIMPORT_TEST(testFdo37606Copy, "fdo37606.odt")
 {
 SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
@@ -609,6 +611,7 @@ DECLARE_ODFIMPORT_TEST(testFdo37606Copy, "fdo37606.odt")
 uno::Reference 
xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables->getCount());
 }
+#endif
 
 DECLARE_ODFIMPORT_TEST(testFdo69862, "fdo69862.odt")
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - editeng/Library_editeng.mk editeng/source include/editeng

2019-09-13 Thread Caolán McNamara (via logerrit)
 editeng/Library_editeng.mk   |1 
 editeng/source/misc/weldeditview.cxx |  147 +++
 include/editeng/weldeditview.hxx |   62 ++
 3 files changed, 210 insertions(+)

New commits:
commit ed7c96738298a19d375937f38642be08e65fcf46
Author: Caolán McNamara 
AuthorDate: Tue Jun 25 14:20:29 2019 +0100
Commit: Miklos Vajna 
CommitDate: Fri Sep 13 10:45:46 2019 +0200

factor out to a common WeldEditView

Change-Id: Ife7b6f57c80d310bd11a8ed89e36fdc99742d158
Reviewed-on: https://gerrit.libreoffice.org/74698
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 7b726e587ec7bbe8926fd00a50c0192ad32b3858)
Reviewed-on: https://gerrit.libreoffice.org/78543
Reviewed-by: Miklos Vajna 

diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk
index 9354071b3a70..fc47842b650f 100644
--- a/editeng/Library_editeng.mk
+++ b/editeng/Library_editeng.mk
@@ -98,6 +98,7 @@ $(eval $(call gb_Library_add_exception_objects,editeng,\
 editeng/source/misc/swafopt \
 editeng/source/misc/txtrange \
 editeng/source/misc/unolingu \
+editeng/source/misc/weldeditview \
 editeng/source/outliner/outleeng \
 editeng/source/outliner/outlin2 \
 editeng/source/outliner/outliner \
diff --git a/editeng/source/misc/weldeditview.cxx 
b/editeng/source/misc/weldeditview.cxx
new file mode 100644
index ..dab3796f9b17
--- /dev/null
+++ b/editeng/source/misc/weldeditview.cxx
@@ -0,0 +1,147 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+Size WeldEditView::GetPreferredSize() const { return Size(500, 100); }
+
+void WeldEditView::SetDrawingArea(weld::DrawingArea* pDrawingArea)
+{
+Size aSize(GetPreferredSize());
+pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
+SetOutputSizePixel(aSize);
+
+weld::CustomWidgetController::SetDrawingArea(pDrawingArea);
+
+EnableRTL(false);
+
+const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
+Color aBgColor = rStyleSettings.GetWindowColor();
+
+OutputDevice& rDevice = pDrawingArea->get_ref_device();
+
+rDevice.SetMapMode(MapMode(MapUnit::MapTwip));
+rDevice.SetBackground(aBgColor);
+
+Size aOutputSize(rDevice.PixelToLogic(aSize));
+aSize = aOutputSize;
+aSize.setHeight(aSize.Height());
+
+m_xEdEngine.reset(new EditEngine(EditEngine::CreatePool()));
+m_xEdEngine->SetPaperSize(aSize);
+m_xEdEngine->SetRefDevice(&rDevice);
+
+m_xEdEngine->SetControlWord(m_xEdEngine->GetControlWord() | 
EEControlBits::MARKFIELDS);
+
+m_xEdView.reset(new EditView(m_xEdEngine.get(), nullptr));
+m_xEdView->setEditViewCallbacks(this);
+m_xEdView->SetOutputArea(tools::Rectangle(Point(0, 0), aOutputSize));
+
+m_xEdView->SetBackgroundColor(aBgColor);
+m_xEdEngine->InsertView(m_xEdView.get());
+
+pDrawingArea->set_cursor(PointerStyle::Text);
+}
+
+WeldEditView::~WeldEditView() {}
+
+void WeldEditView::Resize()
+{
+OutputDevice& rDevice = GetDrawingArea()->get_ref_device();
+Size aOutputSize(rDevice.PixelToLogic(GetOutputSizePixel()));
+Size aSize(aOutputSize);
+m_xEdEngine->SetPaperSize(aSize);
+m_xEdView->SetOutputArea(tools::Rectangle(Point(0, 0), aOutputSize));
+weld::CustomWidgetController::Resize();
+}
+
+void WeldEditView::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect)
+{
+//note: ScEditWindow::Paint is similar
+
+rRenderContext.Push(PushFlags::ALL);
+rRenderContext.SetClipRegion();
+
+const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
+Color aBgColor = rStyleSettings.GetWindowColor();
+
+m_xEdView->SetBackgroundColor(aBgColor);
+
+rRenderContext.SetBackground(aBgColor);
+
+tools::Rectangle aLogicRect(rRenderContext.PixelToLogic(rRect));
+m_xEdView->Paint(aLogicRect, &rRenderContext);
+
+if (HasFocus())
+{
+m_xEdView->ShowCursor();
+vcl::Cursor* pCursor = m_xEdView->GetCursor();
+pCursor->DrawToDevice(rRenderContext);
+}
+
+std::vector aLogicRects;
+
+// get logic selection
+m_xEdView->GetSelectionRectangles(aLogicRects);
+
+rRenderContext.SetLineColor();
+rRenderContext.SetFillColor(COL_BLACK);
+rRenderContext.SetRasterOp(RasterOp::Invert);
+
+for (const auto& rSelectionRect : aLogicRects)
+rRenderContext.DrawRect(rSelectionRect);
+
+rRenderContext.Pop();
+}
+
+bool WeldEditView::MouseMove(const MouseEvent& rMEvt) { return 
m_xEdView->MouseMove(r

[Libreoffice-commits] core.git: dbaccess/inc dbaccess/source extensions/inc extensions/source offapi/com reportdesign/inc reportdesign/source xmloff/source

2019-09-13 Thread Ilhan Yesil (via logerrit)
 dbaccess/inc/strings.hxx  |1 
 dbaccess/source/core/api/TableDeco.cxx|3 
 dbaccess/source/core/api/datasettings.cxx |3 
 dbaccess/source/core/api/table.cxx|3 
 dbaccess/source/core/inc/datasettings.hxx |1 
 dbaccess/source/inc/stringconstants.hxx   |1 
 extensions/inc/helpids.h  |1 
 extensions/inc/strings.hrc|1 
 extensions/source/propctrlr/formmetadata.cxx  |4 -
 extensions/source/propctrlr/formmetadata.hxx  |1 
 extensions/source/propctrlr/formstrings.hxx   |1 
 offapi/com/sun/star/report/XReportComponent.idl   |   10 ++
 reportdesign/inc/ReportHelperDefines.hxx  |2 
 reportdesign/inc/helpids.h|1 
 reportdesign/inc/strings.hrc  |1 
 reportdesign/inc/strings.hxx  |2 
 reportdesign/source/core/inc/ReportComponent.hxx  |2 
 reportdesign/source/core/inc/ReportHelperImpl.hxx |9 ++
 reportdesign/source/filter/xml/xmlColumn.cxx  |   25 +--
 reportdesign/source/filter/xml/xmlExport.cxx  |   39 +++
 reportdesign/source/filter/xml/xmlExport.hxx  |1 
 reportdesign/source/filter/xml/xmlHelper.cxx  |3 
 reportdesign/source/filter/xml/xmlTable.cxx   |2 
 reportdesign/source/filter/xml/xmlTable.hxx   |7 +-
 reportdesign/source/ui/inc/metadata.hxx   |   61 +-
 reportdesign/source/ui/inspection/GeometryHandler.cxx |1 
 reportdesign/source/ui/inspection/metadata.cxx|2 
 xmloff/source/table/XMLTableExport.cxx|4 -
 28 files changed, 149 insertions(+), 43 deletions(-)

New commits:
commit 260caebf8a2382bcde1fb9ff74ceb1b940654e6f
Author: Ilhan Yesil 
AuthorDate: Tue May 8 14:17:56 2018 +0200
Commit: Lionel Elie Mamane 
CommitDate: Fri Sep 13 10:45:01 2019 +0200

tdf#45789 [API CHANGE] Automatic row height in reports

The controls have now an AutoGrow flag which is saved as
style:min-row-height instead of style:row-height on
style:table-row-properties in content.xml.
In this case the table row height will be allowed to grow to accommodate
the content.

Note: in the conceptual model of reportdesigner this is a per-control
property but in the current implementation, it is a per-row property in
the ODF file. Thus, as soon as one control in the row has the AutoGrow
property set, they all do.

Change-Id: I95c25599e06af0f2f12e72a7cfc0881206f02039
Reviewed-on: https://gerrit.libreoffice.org/53977
Reviewed-by: Lionel Elie Mamane 
Tested-by: Jenkins

diff --git a/dbaccess/inc/strings.hxx b/dbaccess/inc/strings.hxx
index a0909f00c639..793807f0c58c 100644
--- a/dbaccess/inc/strings.hxx
+++ b/dbaccess/inc/strings.hxx
@@ -89,6 +89,7 @@
 #define PROPERTY_HELPFILENAME "HelpFileName"
 #define PROPERTY_WIDTH "Width"
 #define PROPERTY_ROW_HEIGHT "RowHeight"
+#define PROPERTY_AUTOGROW "AutoGrow"
 #define PROPERTY_FORMATKEY "FormatKey"
 #define PROPERTY_ALIGN "Align"
 #define PROPERTY_FONT "FontDescriptor"
diff --git a/dbaccess/source/core/api/TableDeco.cxx 
b/dbaccess/source/core/api/TableDeco.cxx
index c2c99f269e91..ddc04e4750bd 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -110,6 +110,7 @@ sal_Bool SAL_CALL 
ODBTableDecorator::convertFastPropertyValue(
 case PROPERTY_ID_APPLYFILTER:
 case PROPERTY_ID_FONT:
 case PROPERTY_ID_ROW_HEIGHT:
+case PROPERTY_ID_AUTOGROW:
 case PROPERTY_ID_TEXTCOLOR:
 case PROPERTY_ID_TEXTLINECOLOR:
 case PROPERTY_ID_TEXTEMPHASIS:
@@ -156,6 +157,7 @@ void 
ODBTableDecorator::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, con
 case PROPERTY_ID_APPLYFILTER:
 case PROPERTY_ID_FONT:
 case PROPERTY_ID_ROW_HEIGHT:
+case PROPERTY_ID_AUTOGROW:
 case PROPERTY_ID_TEXTCOLOR:
 case PROPERTY_ID_TEXTLINECOLOR:
 case PROPERTY_ID_TEXTEMPHASIS:
@@ -236,6 +238,7 @@ void ODBTableDecorator::getFastPropertyValue(Any& _rValue, 
sal_Int32 _nHandle) c
 case PROPERTY_ID_APPLYFILTER:
 case PROPERTY_ID_FONT:
 case PROPERTY_ID_ROW_HEIGHT:
+case PROPERTY_ID_AUTOGROW:
 case PROPERTY_ID_TEXTCOLOR:
 case PROPERTY_ID_TEXTLINECOLOR:
 case PROPERTY_ID_TEXTEMPHASIS:
diff --git a/dbaccess/source/core/api/datasettings.cxx 
b/dbaccess/source/core/api/datasettings.cxx
index 37ec588f4de3..0eabe9fa9b12 100644
--- a/dbaccess/source/core/api/datasettings.cxx
+++ b/dbaccess/source/core/api/datasettings.cxx
@@ -65,6 +65,9 @@ void ODataSettings::registerPropertiesFor(ODataSettings_Base* 
_pItem)
 registerMayBeVoidProperty(PROPERTY_ROW_HEIGHT, PROPERTY_ID_ROW_HEIGHT, 
PropertyAttribu

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-09-13 Thread Tomáš Chvátal (via logerrit)
 vcl/unx/generic/fontmanager/fontconfig.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 30312e66acb030b24fa4cf327a96fe19c5c571f7
Author: Tomáš Chvátal 
AuthorDate: Wed Sep 11 09:58:43 2019 +0200
Commit: Caolán McNamara 
CommitDate: Fri Sep 13 09:38:10 2019 +0200

Check for EMOJI content only on ICU 57 and newer

The older ICU does not have the logic to work with there as it is
feature of the new icu only:
  http://bugs.icu-project.org/trac/ticket/11802

Change-Id: Icd21be1e20b7cb988e94d107406a4f81d00116a7
Reviewed-on: https://gerrit.libreoffice.org/78812
Reviewed-by: Tomáš Chvátal 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx 
b/vcl/unx/generic/fontmanager/fontconfig.cxx
index c7bfbb47e9bd..a36dfc868329 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -798,7 +798,11 @@ namespace
 
 bool isEmoji(sal_uInt32 nCurrentChar)
 {
+#if U_ICU_VERSION_MAJOR_NUM >= 57
 return u_hasBinaryProperty(nCurrentChar, UCHAR_EMOJI);
+#else
+   return false;
+#endif
 }
 
 //returns true if the given code-point couldn't possibly be in rLangTag.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-09-13 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/check.hxx   |   11 +++
 compilerplugins/clang/redundantfcast.cxx  |   80 +-
 compilerplugins/clang/test/redundantfcast.cxx |9 ++
 3 files changed, 98 insertions(+), 2 deletions(-)

New commits:
commit d27e70fce2acfc9b14f2f07c9096daa50dc2acd8
Author: Stephan Bergmann 
AuthorDate: Fri Sep 13 08:31:20 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Sep 13 09:27:20 2019 +0200

Avoid some false loplugin:redundantfcast involving std::function and lambdas

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

diff --git a/compilerplugins/clang/check.hxx b/compilerplugins/clang/check.hxx
index 4ac4f8e99cb6..e027a5ca709f 100644
--- a/compilerplugins/clang/check.hxx
+++ b/compilerplugins/clang/check.hxx
@@ -87,6 +87,8 @@ public:
 
 inline ContextCheck Struct(llvm::StringRef id) const;
 
+inline ContextCheck ClassOrStruct(llvm::StringRef id) const;
+
 inline ContextCheck Union(llvm::StringRef id) const;
 
 inline ContextCheck Function(llvm::StringRef id) const;
@@ -212,6 +214,15 @@ ContextCheck DeclCheck::Struct(llvm::StringRef id) const
 return detail::checkRecordDecl(decl_, clang::TTK_Struct, id);
 }
 
+ContextCheck DeclCheck::ClassOrStruct(llvm::StringRef id) const
+{
+auto const c1 = Class(id);
+if (c1) {
+return c1;
+}
+return Struct(id);
+}
+
 ContextCheck DeclCheck::Union(llvm::StringRef id) const
 {
 return detail::checkRecordDecl(decl_, clang::TTK_Union, id);
diff --git a/compilerplugins/clang/redundantfcast.cxx 
b/compilerplugins/clang/redundantfcast.cxx
index 8879a386d621..260fe1852417 100644
--- a/compilerplugins/clang/redundantfcast.cxx
+++ b/compilerplugins/clang/redundantfcast.cxx
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace
 {
@@ -165,12 +166,87 @@ public:
 
 // Find redundant cast to std::function, where clang reports
 // two different types for the inner and outer
-static bool isRedundantStdFunctionCast(CXXFunctionalCastExpr const* expr)
+bool isRedundantStdFunctionCast(CXXFunctionalCastExpr const* expr)
 {
+bool deduced = false;
+QualType target;
+auto const written = expr->getTypeAsWritten();
+if (auto const t1 = 
written->getAs())
+{
+auto const decl = t1->getTemplateName().getAsTemplateDecl();
+if (!decl)
+{
+return false;
+}
+if (!loplugin::DeclCheck(decl->getTemplatedDecl())
+ .ClassOrStruct("function")
+ .StdNamespace())
+{
+return false;
+}
+deduced = true;
+}
+else if (auto const t2 = written->getAs())
+{
+auto const decl = t2->getTemplateName().getAsTemplateDecl();
+if (!decl)
+{
+return false;
+}
+if (!loplugin::DeclCheck(decl->getTemplatedDecl())
+ .ClassOrStruct("function")
+ .StdNamespace())
+{
+return false;
+}
+if (t2->getNumArgs() != 1)
+{
+if (isDebugMode())
+{
+report(DiagnosticsEngine::Fatal,
+   "TODO: unexpected std::function with %0 template 
arguments",
+   expr->getExprLoc())
+<< t2->getNumArgs() << expr->getSourceRange();
+}
+return false;
+}
+if (t2->getArg(0).getKind() != TemplateArgument::Type)
+{
+if (isDebugMode())
+{
+report(DiagnosticsEngine::Fatal,
+   "TODO: unexpected std::function with non-type 
template argument",
+   expr->getExprLoc())
+<< expr->getSourceRange();
+}
+return false;
+}
+target = t2->getArg(0).getAsType();
+}
+else
+{
+return false;
+}
 auto cxxConstruct = 
dyn_cast(compat::IgnoreImplicit(expr->getSubExpr()));
 if (!cxxConstruct)
 return false;
-return isa(cxxConstruct->getArg(0));
+auto const lambda = dyn_cast(cxxConstruct->getArg(0));
+if (!lambda)
+return false;
+if (deduced)
+// std::function([...](Args)->Ret{...}) should always be redundant:
+return true;
+auto const decl = lambda->getCallOperator();
+std::vector args;
+for (unsigned i = 0; i != decl->getNumParams(); ++i)
+{
+args.push_back(decl->getParamDecl(i)->getType());
+}
+auto const source
+= compiler.getASTCont

[Libreoffice-commits] core.git: solenv/bin xmloff/inc xmloff/source xmloff/util

2019-09-13 Thread Miklos Vajna (via logerrit)
 solenv/bin/native-code.py   |1 +
 xmloff/inc/facreg.hxx   |7 ---
 xmloff/source/core/facreg.cxx   |1 -
 xmloff/source/draw/sdxmlexp.cxx |   13 -
 xmloff/util/xo.component|3 ++-
 5 files changed, 15 insertions(+), 10 deletions(-)

New commits:
commit eefd7c12f71197ffeb8a29528045e97cbf5c6d2a
Author: Miklos Vajna 
AuthorDate: Thu Sep 12 23:50:32 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Sep 13 09:26:10 2019 +0200

xmloff: create XMLDrawExportOOO instances with an uno constructor

See tdf#74608 for motivation.

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

diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index aeb73892d64d..3e2edaa26462 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -281,6 +281,7 @@ core_constructor_list = [
 "com_sun_star_comp_Impress_XMLMetaExporter_get_implementation",
 "com_sun_star_comp_Impress_XMLSettingsExporter_get_implementation",
 "com_sun_star_comp_Impress_XMLExporter_get_implementation",
+"com_sun_star_comp_Draw_XMLExporter_get_implementation",
 "com_sun_star_comp_Draw_XMLOasisImporter_get_implementation",
 "com_sun_star_comp_Draw_XMLOasisStylesImporter_get_implementation",
 "com_sun_star_comp_Draw_XMLOasisContentImporter_get_implementation",
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index bef148811eaa..431bb1126de7 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -60,14 +60,7 @@ css::uno::Sequence 
XMLDrawSettingsExportOasis_getSupportedServiceNames
 css::uno::Reference 
XMLDrawSettingsExportOasis_createInstance(
 css::uno::Reference const & rSMgr);
 
-// draw OOo import
-
 // draw OOo export
-OUString XMLDrawExportOOO_getImplementationName() throw();
-css::uno::Sequence XMLDrawExportOOO_getSupportedServiceNames() 
throw();
-/// @throws css::uno::Exception
-css::uno::Reference XMLDrawExportOOO_createInstance(
-css::uno::Reference const & rSMgr);
 OUString XMLDrawStylesExportOOO_getImplementationName() throw();
 css::uno::Sequence XMLDrawStylesExportOOO_getSupportedServiceNames() 
throw();
 /// @throws css::uno::Exception
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index f25c4262a477..1b79ff004184 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -66,7 +66,6 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const 
sal_Char * pImplName, voi
 else SINGLEFACTORY( XMLDrawSettingsExportOasis )
 
 // draw OOo export
-else SINGLEFACTORY( XMLDrawExportOOO )
 else SINGLEFACTORY( XMLDrawStylesExportOOO )
 else SINGLEFACTORY( XMLDrawContentExportOOO )
 else SINGLEFACTORY( XMLDrawMetaExportOOO )
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index c271f26b78db..d874973bc707 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2705,13 +2705,24 @@ 
com_sun_star_comp_Impress_XMLExporter_get_implementation(uno::XComponentContext*
 | SvXMLExportFlags::EMBEDDED));
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Draw_XMLExporter_get_implementation(uno::XComponentContext* 
pCtx,
+  uno::Sequence 
const& /*rSeq*/)
+{
+return cppu::acquire(new SdXMLExport(
+pCtx, "XMLDrawExportOOO", true,
+SvXMLExportFlags::META | SvXMLExportFlags::STYLES | 
SvXMLExportFlags::MASTERSTYLES
+| SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT | 
SvXMLExportFlags::SCRIPTS
+| SvXMLExportFlags::SETTINGS | SvXMLExportFlags::FONTDECLS
+| SvXMLExportFlags::EMBEDDED));
+}
+
 SERVICE( XMLDrawExportOasis, "com.sun.star.comp.Draw.XMLOasisExporter", 
"XMLDrawExportOasis", true, 
SvXMLExportFlags::OASIS|SvXMLExportFlags::META|SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::SETTINGS|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::EMBEDDED
 );
 SERVICE( XMLDrawStylesExportOasis, 
"com.sun.star.comp.Draw.XMLOasisStylesExporter", "XMLDrawStylesExportOasis", 
true, 
SvXMLExportFlags::OASIS|SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS
 );
 SERVICE( XMLDrawContentExportOasis, 
"com.sun.star.comp.Draw.XMLOasisContentExporter", "XMLDrawContentExportOasis", 
true, 
SvXMLExportFlags::OASIS|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::FONTDECLS
 );
 SERVICE( XMLDrawMetaExportOasis, 
"com.sun.star.comp.Draw.XMLOasisMetaExporter", "XMLDrawMetaExportOasis", true, 
SvXMLExportFlags::OASIS|SvXMLExportFlags::META );
 SERVICE( XMLDrawSettingsExportOasis, 
"com.sun.star.comp.Draw.XMLOasisSett

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

2019-09-13 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/diagramdialog.ui |   43 ++-
 1 file changed, 38 insertions(+), 5 deletions(-)

New commits:
commit a029ca4dbdeb7bad0ffec500f1117f71bacaa81a
Author: Caolán McNamara 
AuthorDate: Thu Sep 12 22:22:37 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 13 09:20:20 2019 +0200

add missing model to treeview

Change-Id: Idf268ea30da1b80d9418419b2336979685d7cf8c
Reviewed-on: https://gerrit.libreoffice.org/78858
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/uiconfig/ui/diagramdialog.ui b/cui/uiconfig/ui/diagramdialog.ui
index c52376f0b3a3..98a67717209a 100644
--- a/cui/uiconfig/ui/diagramdialog.ui
+++ b/cui/uiconfig/ui/diagramdialog.ui
@@ -2,6 +2,14 @@
 
 
   
+  
+
+  
+  
+  
+  
+
+  
   
 False
 dialog
@@ -53,12 +61,37 @@
   
 
 
-  
+  
 True
 True
-False
-
-  
+True
+True
+in
+
+  
+True
+True
+True
+True
+liststore1
+False
+False
+0
+False
+
+  
+
+
+  
+
+  
+  
+0
+  
+
+  
+
+  
 
   
   
@@ -110,4 +143,4 @@
   btnCancel
 
   
-
\ No newline at end of file
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-09-13 Thread Caolán McNamara (via logerrit)
 sw/source/ui/table/tabledlg.cxx|   26 --
 sw/source/uibase/table/tablepg.hxx |3 +++
 2 files changed, 27 insertions(+), 2 deletions(-)

New commits:
commit e1ec771c60d1fe03651b24f938589863c3882bc8
Author: Caolán McNamara 
AuthorDate: Thu Sep 12 21:31:59 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 13 09:20:06 2019 +0200

Related: tdf#122791 take *final* dialog preferred size

as the size to consider when trying to fit as many column widgets into
it. Not the size it is when the column page is inserted, which
is just that of the column page and preceeding pages

Change-Id: Id78085c92e9b5718e7282bf8ebd2bde1cdc50689
Reviewed-on: https://gerrit.libreoffice.org/78855
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index adcd25af5d4c..f56e3c26a64e 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -702,6 +702,7 @@ DeactivateRC SwFormatTablePage::DeactivatePage( SfxItemSet* 
_pSet )
 SwTableColumnPage::SwTableColumnPage(TabPageParent pParent, const SfxItemSet& 
rSet)
 : SfxTabPage(pParent, "modules/swriter/ui/tablecolumnpage.ui", 
"TableColumnPage", &rSet)
 , pTableData(nullptr)
+, m_pSizeHdlEvent(nullptr)
 , nTableWidth(0)
 , nMinWidth(MINLAY)
 , nMetFields(MET_FIELDS)
@@ -731,9 +732,19 @@ SwTableColumnPage::SwTableColumnPage(TabPageParent 
pParent, const SfxItemSet& rS
 {
 SetExchangeSupport();
 
+// fire off this handler to happen on next event loop when all the rest of
+// the pages are instantiated and the dialog preferred size is that of the
+// all the pages that currently exist and the rest to come after this one
+m_pSizeHdlEvent = Application::PostUserEvent(LINK(this, SwTableColumnPage, 
SizeHdl));
+}
+
+IMPL_LINK_NOARG(SwTableColumnPage, SizeHdl, void*, void)
+{
+m_pSizeHdlEvent = nullptr;
+
 //tdf#120420 keeping showing column width fields unless
 //the dialog begins to grow, then stop adding them
-weld::Window* pTopLevel = pParent.GetFrameWeld();
+weld::Window* pTopLevel = GetDialogFrameWeld();
 Size aOrigSize = pTopLevel->get_preferred_size();
 for (sal_uInt16 i = 0; i < MET_FIELDS; ++i)
 {
@@ -750,12 +761,23 @@ SwTableColumnPage::SwTableColumnPage(TabPageParent 
pParent, const SfxItemSet& rS
 }
 
 const SfxPoolItem* pItem;
-Init(SfxItemState::SET == rSet.GetItemState( SID_HTML_MODE, false,&pItem )
+Init(SfxItemState::SET == GetItemSet().GetItemState(SID_HTML_MODE, false, 
&pItem)
  && static_cast(pItem)->GetValue() & 
HTMLMODE_ON);
 }
 
 SwTableColumnPage::~SwTableColumnPage()
 {
+disposeOnce();
+}
+
+void SwTableColumnPage::dispose()
+{
+if (m_pSizeHdlEvent)
+{
+Application::RemoveUserEvent(m_pSizeHdlEvent);
+m_pSizeHdlEvent = nullptr;
+}
+SfxTabPage::dispose();
 }
 
 VclPtr SwTableColumnPage::Create(TabPageParent pParent, const 
SfxItemSet* rAttrSet)
diff --git a/sw/source/uibase/table/tablepg.hxx 
b/sw/source/uibase/table/tablepg.hxx
index e5b47fb2f35d..f9d7c8d9ec50 100644
--- a/sw/source/uibase/table/tablepg.hxx
+++ b/sw/source/uibase/table/tablepg.hxx
@@ -93,6 +93,7 @@ public:
 class SwTableColumnPage : public SfxTabPage
 {
 SwTableRep* pTableData;
+ImplSVEvent*m_pSizeHdlEvent;
 SwTwips nTableWidth;
 SwTwips nMinWidth;
 sal_uInt16  nMetFields;
@@ -121,12 +122,14 @@ class SwTableColumnPage : public SfxTabPage
 voidUpdateCols( sal_uInt16 nCurrentPos );
 SwTwips GetVisibleWidth(sal_uInt16 nPos);
 voidSetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth);
+DECL_LINK(SizeHdl, void*, void);
 
 using TabPage::ActivatePage;
 using TabPage::DeactivatePage;
 
 public:
 SwTableColumnPage(TabPageParent pParent, const SfxItemSet& rSet);
+virtual void dispose() override;
 virtual ~SwTableColumnPage() override;
 
 static VclPtr  Create( TabPageParent pParent, const 
SfxItemSet* rAttrSet);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits